0
$\begingroup$

I'm a software engineer and I've just started to fly rc-planes. I'm currently building a self learning auto-pilot for my plane and I'm really interested in CFD. I installed OpenFOAM and ran through some examples. I see there's A LOT to learn but before I start learning OpenFOAM I wonder whether it is actually capable of doing what I want to achieve.

Ultimately I want to design a new airplane and then let my autopilot simulate a flight using CFD. That means that while the simulation runs, I want to be able to control the plane by adjusting the flaps. This could be used to develop the plane but also to train the auto-pilot.

I know I've got tons to learn before I am there, but my question is; is this actually possible with OpenFOAM? Or is OpenFOAM only for predefined simulations which cannot be altered during the simulation?

All tips are welcome!

$\endgroup$
  • $\begingroup$ To be clear: you are not looking for a real-time interactive simulation, just something where parameters can be controlled by another program and the program can draw state information from the simulation? $\endgroup$ – Richard Feb 7 at 3:31
  • $\begingroup$ @Richard - That is correct. I'm not looking for real time "game play". I understand that simulations (can) take longer than the time they simulate. Another program (my self built auto-pilot) should interact with it. Do you think that is possible? $\endgroup$ – kramer65 Feb 7 at 5:51
  • $\begingroup$ To add to that. I just need to be able to get the orientation (pitch, yaw, roll) from the airplane, and based on that, control the flaps. $\endgroup$ – kramer65 Feb 7 at 5:59
  • $\begingroup$ I'm afraid I don't know anything about OpenFOAM. I just wanted to ensure your question was clear for other folks who might. $\endgroup$ – Richard Feb 7 at 8:21
  • $\begingroup$ I'm not an OpenFOAM specialist neither, but OpenFOAM is a CFD tool: it will give you information on the speed of the wind in a mesh around your airplane; it will not "move up" your airplane in the air if you change a flap position.... I think you need to look for other simulation tools... $\endgroup$ – GertVdE Feb 7 at 11:27
2
$\begingroup$

OpenFOAM doesn't have the degree of prescribed mesh motion you are looking for. It has 6 DOF, but thats not sufficient. What you need is a CFD tool which is:

A) 3D

B) Unsteady

C) Has strong mesh motion capability

D) has control surface capabilities (can read meshes that define ailerons and other control surfaces, move them (the surface mesh) in accordance with your controller and deform the (CFD) mesh accordingly)

E) can be partnered with your code

I cannot think of a code that would work for you, and you might find the computational cost to be prohibitive. There are some universities and companies that have specialized capabilities that can do this sort of thing, but those would not be open source.

$\endgroup$
  • $\begingroup$ That is very unfortunate to hear. So is what I'm asking for actually a very advanced way of simulating things? I would think these sorts of simulations would be very common for aerospace manufacturers (Boeing/Airbus), which made me thing there are open source tools which are able to do this. Do you know if any of the other CFD tools around (alternativeto.net/software/openfoam) are able to do a simulation which comes close to what I want? $\endgroup$ – kramer65 Feb 8 at 13:51
  • $\begingroup$ It's a very expensive problem. 3D wing body shapes aren't cheap to simulate. Of you want to add in gaps, control surfaces, etc., It become much more so. The unsteady simulation for the amount of time to do a maneuver is expensive as well. And yes, Boeing and Airbus may have tools that can do this, but they aren't open source. $\endgroup$ – EMP Feb 9 at 5:40
  • $\begingroup$ The US Air force has a code (Helios I think) which has been designed to do CFD simulation of flight maneuver. The computational cost of such a simulation in 3D is insane. We are talking about multiple days of calculation with 1000+ cores. CFD is a lot more expensive/ complex than you might think. $\endgroup$ – BlaB Feb 10 at 13:19
  • $\begingroup$ Helios can definitely do that sort of thing. But it's designed for helicopters mainly, and is ITAR, and as you said, crazy expensive. $\endgroup$ – EMP Feb 11 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.