Boundary finite element method in Maple

In summary, the conversation is about a problem with a Maple program for a project that calculates the lift of an airfoil using the Boundary Finite Elements Method. The program stops before the end of the code and gives an error related to the printing of results. The error appears to be caused by a line of code where the dimension of the variable P is incorrect. The person is not very good at programming and is asking for help in fixing both the error message and getting the correct answer, but it may require going back to the original equations. They plan to ask their teacher for assistance.
  • #1
Charles95
3
0
TL;DR Summary
Fix Maple error in a home made program on Maple
I would like any tips about a Maple ''home made'' program that I received for a project but this program seems to stop before the very end of the code. I want to find de lift of an airfoil with Boundary finites elements method. I have this error at the very end :
Error, (in fprintf) number expected for floating point format. This code is very long, so I don't want to send all of it. I sent the code lines at the end of the program and the text is in french if you need to translate. The program want to find the speed potential, his derivative, the pressure at the extrados and intrados and finally the lift and lift coefficient. I also think that this error occurs near the end of the code for the printing of results. So here is five pictures that resume the end of the program which think would be related to my error. Is someone can help me?

1.JPG
2.JPG
3.JPG
fin1.JPG
fin.JPG
resultats.JPG

As you can see for the point #200 it doesn't calculate the last Pressure value and I think it's the reason why the programm doesn't calculate the lift of the airfoil as supposed in picture #3.
Vp is speed perturbated, Vinf is speed at infinity in the domain far from the airfoil. X, Y ,Z are coordinates on the airfoil boundary. If you need any informations please ask me.

Thank you very much!
 
Physics news on Phys.org
  • #2
The problem appears to come from the line
Code:
P_aba[i]:=1E-6*P[k]
when k=101. I suspect that P has a dimension of 100 (is N=100?).
 
  • #3
Yes N = 100. What do I need to change? I'm not very good in programming, but if I change P[k] to P[k-1] or P_aba to P_aba[i-1] could it solves my problem?

Thanks!
 
  • #4
Charles95 said:
Yes N = 100. What do I need to change? I'm not very good in programming, but if I change P[k] to P[k-1] or P_aba to P_aba[i-1] could it solves my problem?

Thanks!
If by solving the problem, you mean "get rid of the error message," then yes. If instead you mean "get the correct answer," then probably not.

Fixing this will require going back to the original equations and figuring out what is going wrong.
 
  • #5
DrClaude said:
If by solving the problem, you mean "get rid of the error message," then yes. If instead you mean "get the correct answer," then probably not.

Fixing this will require going back to the original equations and figuring out what is going wrong.
I would like to fix both, but when I write P[k-1] it put the error at the beginning of the vector result. So it means that at P[0] I get the error 0.1E-05*P[0] instead of 0.1E-05*P[101]. How should I fix that? I would like to solve the problem for the correct answer, but I just don't know how we could proceed so I guess I need to turn back to my teacher...
 

Related to Boundary finite element method in Maple

1. What is the Boundary Finite Element Method (BFEM)?

The Boundary Finite Element Method (BFEM) is a numerical method used to solve partial differential equations (PDEs) defined on a boundary. It is based on the finite element method (FEM) and is particularly useful for solving problems with complex boundary geometries.

2. How does the BFEM work?

The BFEM works by discretizing the boundary into a series of smaller elements. These elements are connected at specific points called nodes. The PDEs are then solved at each node, taking into account the boundary conditions and the behavior of the PDE within each element. The solutions at each node are then combined to obtain the overall solution for the boundary.

3. What are the advantages of using Maple for BFEM?

Maple is a powerful software program that has built-in tools for solving PDEs using the BFEM. It allows for easy and efficient implementation of the method, as well as visualization of the results. Additionally, Maple has a user-friendly interface which makes it more accessible for users with varying levels of programming experience.

4. What types of problems can be solved using the BFEM in Maple?

The BFEM in Maple can be used to solve a wide range of boundary value problems, including problems in heat transfer, fluid mechanics, and structural analysis. It is particularly useful for problems with complex boundary geometries and can handle both linear and nonlinear PDEs.

5. Are there any limitations to using the BFEM in Maple?

As with any numerical method, there are limitations to using the BFEM in Maple. It may not be suitable for problems with highly irregular boundary geometries or for problems with highly discontinuous solutions. Additionally, the accuracy of the results may be affected by the choice of element size and the complexity of the PDEs being solved.

Similar threads

Replies
3
Views
854
Replies
4
Views
851
  • Mechanical Engineering
Replies
0
Views
162
  • Mechanical Engineering
Replies
9
Views
2K
Replies
9
Views
2K
Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Programming and Computer Science
Replies
4
Views
704
Back
Top