Boundary finite element method in Maple

Click For Summary
SUMMARY

The forum discussion focuses on troubleshooting a Maple program utilizing the Boundary Finite Element Method to calculate the lift of an airfoil. The user encounters an error related to floating point formatting in the fprintf function, specifically when trying to print the pressure values at the airfoil's extrados and intrados. The issue arises from an array dimension mismatch, where the variable P has a dimension of 100, leading to incorrect indexing when accessing P[k]. The suggested solutions include adjusting the indexing to P[k-1] or P_aba[i-1], but these may not resolve the underlying problem of obtaining accurate results.

PREREQUISITES
  • Familiarity with Maple programming language
  • Understanding of Boundary Finite Element Method
  • Knowledge of numerical methods for fluid dynamics
  • Basic programming skills for debugging and error resolution
NEXT STEPS
  • Review Maple's fprintf function documentation for proper usage
  • Study array indexing and dimension handling in Maple
  • Learn about the Boundary Finite Element Method in fluid dynamics
  • Investigate debugging techniques for numerical simulations in Maple
USEFUL FOR

Students and researchers in computational fluid dynamics, Maple users working on numerical simulations, and developers seeking to implement the Boundary Finite Element Method for airfoil analysis.

Charles95
Messages
3
Reaction score
0
TL;DR
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
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?).
 
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!
 
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.
 
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...
 

Similar threads

Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
1
Views
1K