Open source CFD software for 'plane design

bobc

10 kW
Joined
Jan 20, 2011
Messages
993
Location
Knutsford England
Just gossip here really: I use the open source CFD package "OpenFoam" for aerodynamics simulations looking at drag and stability for low speed greenpower racing cars and the electric landspeed record project I'm working on. I just read about Dale Kramer's electric microlyte and was terrifically impressed & inspired to look rather closer at personal flight. So I thought I'd see how I got on trying to design an electric aircraft (on the rock solid basis of having NO aeroplane design knowledge) by just playing with models in the CFD software.
So I spent an hour or so throwing a basic aeroplane model together, another hour or so setting up a CFD simulation cell and meshing the air in it, and have been simulating it at 30mph for a few hours. AT the moment I'm getting nearly 100kg lift at the price of 112N drag (say 9:1) with the pilot out in the fresh air and with main wing angle of incidence about 1 in 10. The figures actually look reasonably close to the 'real' data from Kramer's build log ( he needs about 3kW and 40mph to fly level).
I'm just having fun with this, I have no intention of building a real aircraft, but at some stage it would be interesting to compare this approach to designing a craft to the traditional one (which I assume has many "golden rules" about particular design characteristics.)
I'll add some pictures later on.
Maybe one day I will build a plane - I just can't do it right now. Again I like Kramer's appoach;- make it a seaplane & you can actually use it to go places! However in mine, the pilot will sit IN the main monohull float (just his head sticking out the top) & it will form a faired cockpit. With the pilot laying back rather than sitting upright, the "joysticK" will need to be operated by the right hand only - can anyone say if my right hand would be strong enough to do this ina microlyte? (yes it gets lots of exercise..... ;^) The left hand does 2 throttles - I like the 2 engine approach: 1) redundancy, 2) easy maneovring onthe water 3) the motors are a reasonable size
 
and pictures of CFD results. You can see that I need to simulate for quite a lot longer before it actually settles properly. The problem is that the object is instantly called into its virtual existance and it takes a while for the airflow to settle down around it. Note the model has no wheels or framework supporting the pilot.
microlite.jpg

pilot.jpg

wingtip.jpg

The software is free off the web & runs on a home PC, but it takes a while - there's about18hrs of a quad core machine going flat out above ;^)
The model has a span of 10m and a chord(?) of about 1.3. The simulation had run for 0.4s (distance 5m) for the snapshots above - probably explains the limits on the rotation of the wing tip vortex
 
With over a second of simulation done, lift is nearly 1100N and drag down to 103N. And yes the wingtip vortex rotates out of sight... Lift still increasing at 1.2s but I reckon it's most of the way to its final value.
 
I'll keep playing with this. I appreciate that as it stands I could make a thing that got off the ground, but would quickly kill its driver if they tried to manouvre - things like tip stalls, spins (unrecoverable!) etc. all waiting "in the wings". Also my aerofoil was just something that "looked ok" based on a cubic spline - easy but probably not ideal, no washout or dihedral. All stuff to play with ;^)
 
That software looks nice, but it may overwhelm any old pc I own.

Can the resolution be dumbed-down, or other way to get simple models for small EVs?
 
It's not really nice, it's a pig to get going, and sometimes just gets its knickers in a twist and craps out for no reason. The documentation is iffy (but there's a forum of "dedicated helpers). The complexity of the model is entirely down to how you mesh the air surrounding it - the fewer & bigger the cells the faster and less accurate the results. The smallest cells on my mesh were about 2cm & o.4s of simulation (box size 5m x 20m x 20m) took 18hrs on a 2.6GHz quad core machine. Yes you can make it use all the cores ;^). so a smaller, coarser model would run proportionally faster. There's also the time step to choose (so called courant number - how far does the simulation go across the smallest cell in a time step) I think this was about 0.07 on this model - in theory you can set this up towards 1 but in my experience it all goes pear shaped if you do....
Steps are -
1) get a 3d model in stl format
2) define a box you'll simulate it in using blockMesh
3) mesh the air around the model into the box using snappyHexMesh (yes really...)
4) set up initial conditions
5) split the job up among the processors using decomposePar
6) run a pisoFoam simulation (mpirun runs it in parallel)
7) look at the simulation results using paraFoam
For what it is, a FREE comprehensive CFD resource, OpenFOAM is astonishing. Comparable commercial software costs 10s of thousands.
But it's a bit of a pig to use.
Oh yeah - that is an "incompressible" fluid simulation, when you get near supersonic you need adiabatics in there too - a whole extra world of hurt....
Bob
 
I'm using the linux version of OpenFoam, I believe there's a windows port now too.
OK so I added some taper, washout and dihedral to the wing - here it is at 40mph generating well over 500lbs of lift at the expense of 46lbs of drag; I'll do a seaplane- float open cockpit next which should make it slightly less draggy... though l/d over 10 is not too bad (better than the space shuttle anyway........ and lots of hang gliders)
newwing2.jpg

newwing.jpg

sorry but I just love those wingtip vortices.... Fascinating stuff this - look how the negative pressure over the wing completely dwarfs any positive pressures anywhere (coluor is pressure blue neg, red + and green=0). The 2nd pic shows quite graphically how the lift is generated by shoving a BIG chunk of air downwards.
Control surfaces:- rudder & elevator - the whole fin turns in a bicycle headset tigged into the boom tube (for each). Ailerons - use an aerofoil section brace between the pilot's seat and the wing - this brace can twist on rose joints to BE the aileron - I need a proper plane designer to give me a dose of reality......
 
What the heck - I put a seaplane hull round the pilot and added some winglets (just 3mm sheets in a fairly arbitrary shape....) & let it simulate over christmas. Surprisingly good results - L/d now 14 - wing tip trailing vortices almost gone. I probably won't do anything with this for a few years, but I suspect that when I retire, designing and building an electric ultralite will become my hobby - and it may very well look rather like the below...
winglets.jpg
 
Back
Top