Go Back   EcoModder Forum > EcoModding > Aerodynamics
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 09-22-2013, 12:50 PM   #1 (permalink)
Master EcoModder
 
christofoo's Avatar
 
Join Date: Mar 2012
Location: Salt Lake City
Posts: 292

00C - '00 Toyota Corolla
90 day: 43.54 mpg (US)
Thanks: 147
Thanked 190 Times in 73 Posts
Review of OpenFOAM: free CFD

OpenFOAM has been mentioned once or twice in this forum before, but it hasn't been given a fair shake. It is a rather general-purpose open-source numerical solver, with capabilities ranging from chemical reactions (think ICE cumbustion simulation) to 3d wind-tunnel CFD.

I think the short story is that it works and it's free; it's just a much steeper learning curve than commercial CFD packages that have GUI's.

Here is a screen-shot. I ran a tutorial which imported a 3d model of this motorbike and ran a (computationally simplistic - probably inaccurate - in this case) wind-tunnel CFD. Then I opened it in the paraviewer and put in a transverse slice and stream-tracer (a virtual smoke-wand).

That's about all I've been able to do so far.

My goal is to be able to write as simple a tutorial as possible describing running a car and mods through an OpenFOAM virtual wind-tunnel CFD.

Given how far away I am from that goal, and how low a priority this is for me, I hesitate to post now - I may not get there for another 3-12 months - but maybe this will stimulate some interest.

Learning curve, prerequisite, initial thoughts:
  1. I guestimate a single study will require in the neighborhood of 2 million floating-point-operations for an automotive scale wind-tunnel, so I'm guessing an Intel I5-3570K clocked at 4.5 GHz, for reference, will take around 4 hours. My laptop with an I5-3210M might be more like 15 hours, as long as the heat doesn't slow it down. However the study I'm basing this on lacked some of the CPU specifics, so consider it a crude guess.
  2. Linux required: those not already running Linux need to setup a new partition (google gparted livecd), and install Linux, preferably a supported Ubuntu version such as 12.04 LTS or 13.04. See the OpenFOAM download page: Download OpenFOAMŪ. I'm a Debian guy, and it wasn't a big deal to build OpenFOAM and the thirdparty package from the source packages on Wheezy, but it was a disaster on Squeeze (the previous release). Actually, I did find a Windows build using Cygwin, but I noticed it was out-of-date. Why bother? In my opinion the Linux hurdle is small compared to the others.
  3. The learning curve is quite steep, I'm guessing in the 100-hour neighborhood. Consider OpenFOAM a command-line utility with text-file controls. I need to learn how to a) import a 3d model from STL, b) mesh the model, c) setup appropriate pre-processing and processing, d) analyze results using Paraview.
  4. You need a good STL model of your car and a CAD program to create mods in the first place. I'm using Solidworks, which I have access to, but I don't see why Sketchup wouldn't work (or Geomagic Design or FreeCAD). I still haven't found a satisfactory Civic model for free. If you want to buy a model they often run around $75, although one website I know of will net 5 different models for $125, so maybe there's an opportunity to pool for car models at $25 each.
  5. Even after all this, CFD will give the best results if you have a reference case that you can compare in detail to the CFD results. I think in principle that if you increase the resolution and computational detail (and simulation time) to some unreasonable quantity then the CFD results should end up being accurate. But in practice, where simulation time is not an infinite resource, there needs to be a real-world reference case to ensure the CFD isn't overly truncated.

OpenFOAM in literature
  • I like to read master's theses; I often learn from the background reading as well as the subject matter. This one features a comparison of OpenFOAM to a commercial CFD package - Fluent. OpenFOAM: A tool for predicting automotive relevant flow fields. In summary: OpenFOAM's predictions are realistic, but not as realistic as Fluent in terms of detatchment points, and also OpenFOAM is slower than Fluent. Also, OpenFOAM has a steep learning curve and requires investment of a lot of time to operate it properly.
  • Some of the Coventry University 2011 research has been posted on Ecomodder previously; I noticed they used OpenFOAM in some of their CFD studies. Aerodynamic Drag Reduction and its Effects on Electric Vehicles

Cheers,
Chris

Attached Thumbnails
Click image for larger version

Name:	examplemotorbikeview1.jpg
Views:	2544
Size:	114.6 KB
ID:	13780  

Last edited by christofoo; 09-22-2013 at 12:59 PM..
  Reply With Quote
The Following 4 Users Say Thank You to christofoo For This Useful Post:
Cd (12-20-2014), cfd_guy (09-22-2013), julien.decharentenay (09-23-2013), KamperBob (09-23-2013)
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 09-22-2013, 05:26 PM   #2 (permalink)
EcoModding Lurker
 
Join Date: Sep 2013
Location: Indianapolis / Chicago
Posts: 27

cfdguy - '13 VW Golf TDI
Thanks: 6
Thanked 18 Times in 7 Posts
I use OpenFOAM daily. I can help people out pretty easily set up a case properly (not just to get pretty pictures).

My linux machine use to look like this:


What a simple iteration case looks like after solving:


Simple surface mesh of simplified Scion FRS:


Close up of mesh generation with snappyHexMesh:

**Not the best mesh generation provided in that picture...just for representation**

Semi case I worked on:


FRS case:


Top Fuel Dragster:


I can help start a tutorial if needed also. I have been using OpenFOAM for about 2 years and using it for aero consulting for the last year.
  Reply With Quote
The Following 5 Users Say Thank You to cfd_guy For This Useful Post:
Cd (12-08-2014), christofoo (09-22-2013), eggroller (09-22-2013), julien.decharentenay (09-23-2013), KamperBob (09-23-2013)
Old 09-22-2013, 06:21 PM   #3 (permalink)
Master EcoModder
 
christofoo's Avatar
 
Join Date: Mar 2012
Location: Salt Lake City
Posts: 292

00C - '00 Toyota Corolla
90 day: 43.54 mpg (US)
Thanks: 147
Thanked 190 Times in 73 Posts
Sweet, some expertise!

Do you have enough posts to attach a sample snappyHexMeshDict (ecomodder accepts zip files up to 97.7kb, maybe I should ask for all your dictionary files for one case, if possible)? [PM me if needed; we can do a dropbox or setup an FTP folder on my server or something, if that helps.]
  Reply With Quote
Old 09-22-2013, 08:03 PM   #4 (permalink)
EcoModding Lurker
 
Join Date: Sep 2013
Location: Indianapolis / Chicago
Posts: 27

cfdguy - '13 VW Golf TDI
Thanks: 6
Thanked 18 Times in 7 Posts
I think I can attach files now. The snappyHexMeshDict is only around 3kB so I bet I can attach them all. I think what I will do is set up a specific case for my Golf I am going to start running cfd on. I will share my files for that for everybody to see and then it will also have the ability to see how I analyze the data. I cannot share the exact files on the cases I consulted on. I will get working on that this week between other projects

Let me know if you run into any trouble before then on specific problems
  Reply With Quote
Old 09-23-2013, 02:21 AM   #5 (permalink)
EcoModding Lurker
 
Join Date: Aug 2013
Location: Brisbane, Australia
Posts: 20
Thanks: 4
Thanked 8 Times in 5 Posts
Great examples. Just to add that there are a couple of native Windows port of openFoam available - try to avoid cygwin ports as computational time really increases.

Free one at: https://code.google.com/p/bluecfd-singlecore/ - it does not support multiple core though.
  Reply With Quote
Old 09-23-2013, 09:03 AM   #6 (permalink)
Master EcoModder
 
NeilBlanchard's Avatar
 
Join Date: May 2008
Location: Maynard, MA Eaarth
Posts: 7,907

Mica Blue - '05 Scion xA RS 2.0
Team Toyota
90 day: 42.48 mpg (US)

Forest - '15 Nissan Leaf S
Team Nissan
90 day: 156.46 mpg (US)

Number 7 - '15 VW e-Golf SEL
TEAM VW AUDI Group
90 day: 155.81 mpg (US)
Thanks: 3,475
Thanked 2,950 Times in 1,844 Posts
My challenge is that the hardware I have available to run Linux is pretty old.

My other challenge is getting my holey and rough SketchUp model into a file format that OpenFOAM can import.
__________________
Sincerely, Neil

http://neilblanchard.blogspot.com/
  Reply With Quote
Old 09-23-2013, 06:10 PM   #7 (permalink)
EcoModding Lurker
 
Join Date: Aug 2013
Location: Brisbane, Australia
Posts: 20
Thanks: 4
Thanked 8 Times in 5 Posts
Quote:
Originally Posted by NeilBlanchard View Post
My challenge is that the hardware I have available to run Linux is pretty old.
I am not sure I can help there....

Quote:
Originally Posted by NeilBlanchard View Post
My other challenge is getting my holey and rough SketchUp model into a file format that OpenFOAM can import.
openFoam uses STL and obj format. You can export from SketchUp into STL using stl4su STL for Sketchup - Browse Files at SourceForge.net. To install you need to download the stl4su.rb file and copy it in the plugins directory of the SketchUp installation. Then start SketchUp and the plugin should have added a "Export to STL" entry to the Tool menu (at least it does so under SketchUp 8).

I can't really help with the rough part of the SketchUp model, but for the holey part there are a number of things you can do:

- Leave it holey and cross your finger (it works sometime);
- Fix it using the openFoam utilities;
- [my preference] Fix it using Netfabb Studio Basic (free) netfabb Basic
- Fix it using another mesh tool such as MeshLab.
  Reply With Quote
The Following 2 Users Say Thank You to julien.decharentenay For This Useful Post:
KamperBob (09-25-2013), NeilBlanchard (09-24-2013)
Old 09-23-2013, 06:11 PM   #8 (permalink)
EcoModding Lurker
 
Join Date: Aug 2013
Location: Brisbane, Australia
Posts: 20
Thanks: 4
Thanked 8 Times in 5 Posts
Quote:
Originally Posted by cfd_guy View Post
Let me know if you run into any trouble before then on specific problems
I was wondering if you may be aware of Best Practice Guide/Guidelines that are tailored for automotive aerodynamic. I am aware of a few BPG (Ercoftact, Marine, etc) but none that is automotive specific.
  Reply With Quote
Old 09-23-2013, 10:55 PM   #9 (permalink)
EcoModding Lurker
 
Join Date: Sep 2013
Location: Indianapolis / Chicago
Posts: 27

cfdguy - '13 VW Golf TDI
Thanks: 6
Thanked 18 Times in 7 Posts
Quote:
Originally Posted by julien.decharentenay View Post
I was wondering if you may be aware of Best Practice Guide/Guidelines that are tailored for automotive aerodynamic. I am aware of a few BPG (Ercoftact, Marine, etc) but none that is automotive specific.
Can you be more specific? If so I should be able to send you in the right direction or just tell you myself if I know.
  Reply With Quote
Old 09-24-2013, 12:20 AM   #10 (permalink)
EcoModding Lurker
 
Join Date: Aug 2013
Location: Brisbane, Australia
Posts: 20
Thanks: 4
Thanked 8 Times in 5 Posts
I was wondering if there was a single document covering issues such as:

- geometry: What simplifications are "acceptable"?
- size of the computational domain, incl blockage ratio, number of length before and after;
- mesh such as first layer size, number of layer in boundary layer, mesh resolution in near and far field;
- boundary conditions;
- physical, incl turbulence models, and numerical models;
- typical validation models;
- and ideally a discussion on limitations.

If you have access to the Ercoftac BPG, I would be looking for something similar but applied to the automotive industry.

  Reply With Quote
Reply  Post New Thread


Thread Tools




Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com