Boundary finite element method in Maple

Click For Summary

Discussion Overview

The discussion revolves around troubleshooting a Maple program designed to calculate the lift of an airfoil using the Boundary Finite Element Method. Participants are focused on resolving an error encountered at the end of the code, specifically related to the calculation of pressure values and the subsequent lift coefficient.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant reports an error message indicating a problem with floating point format in the output function, suggesting it occurs near the end of the program.
  • Another participant identifies a potential issue with the dimension of the array P, suspecting it may be causing the error when accessing P[k] where k=101.
  • A participant questions whether changing P[k] to P[k-1] or P_aba to P_aba[i-1] would resolve the issue, indicating a lack of programming experience.
  • There is a suggestion that while changing the index may eliminate the error message, it may not yield the correct results, prompting a need to revisit the original equations.
  • A participant expresses a desire to resolve both the error and obtain the correct answer, noting that changing the index leads to errors at the beginning of the vector result.

Areas of Agreement / Disagreement

Participants generally agree that the error message can be addressed by modifying the indexing, but there is no consensus on whether this will lead to the correct calculation of the lift. The discussion remains unresolved regarding the best approach to ensure both error resolution and accurate results.

Contextual Notes

Limitations include the potential misunderstanding of array dimensions and the need to clarify the original equations used in the program. The discussion does not resolve the mathematical steps necessary to achieve the desired outcomes.

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