CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Automotive test case (https://www.cfd-online.com/Forums/openfoam-solving/58416-automotive-test-case.html)

vinz August 6, 2007 05:58

Hi everybody, I'm intereste
 
Hi everybody,

I'm interested in automotive (more specificaly racing car) simulation. I'd like to know if someone allready tried to simulate such things using OpenFOAM.
Furthermore, a lot of test cases can be found on wings simulation for instance, does someone know if similar test cases can be found for cars?
Any informations are welcome.

Vincent

bastil August 6, 2007 13:30

Hi Vincent, I think this is
 
Hi Vincent,

I think this is a interesting topic. What racing cars are you exactly interested in? I also considered that but I have not found any caeses.

Basti

connclark August 6, 2007 13:37

What exactly are you trying to
 
What exactly are you trying to simulate? Engine combustion, Aerodynamic drag, down force, etc.. ?

It sounds as if your trying to do aerodynamics of some sort.

I'm trying to learn openfoam and CFD myself. As my first exercise I was going to see what sort of drag my Mercedes 300SD had at mach 2.5. I will try and come up with a tutorial as I learn how to do it. It may take a while though as I'm quite busy and trapped using windows until I get some work projects done.

vinz August 6, 2007 13:47

Hi all, Indeed, I'd like to
 
Hi all,

Indeed, I'd like to do aerodynamics (drag,...) on a racing car. I would like to try a formula 1 or something like that (something quite fast).
I'm facing another problem, the need of some interesting stl files to mesh. Does someone know a kind of data bank of stl files?
Thanks for the answers.

Vincent

connclark August 6, 2007 14:44

I use blender ( http://www.ble
 
I use blender ( http://www.blender.org/ ) to convert common file types to stl files. That is how I got the data for my car.

vinz August 6, 2007 15:54

Hi Conn Clark, I allready u
 
Hi Conn Clark,

I allready use blender to convert files to stl. The problem is to obtain original files.
What was the original extension of your car? 3ds?iges? step?
Are there data banks of any of these formats?
Thanks for your help.

Vincent

connclark August 6, 2007 17:57

look here for some free car mo
 
look here for some free car models http://dmi.chez-alice.fr/models1.html

There is a links section that has a list of sites that have free models.

Just remember your going to need a lot of compute time to simulate for these.

bastil August 7, 2007 15:34

HI, also remember that for
 
HI,

also remember that for these complex geometris mesh generation is a challange. I guess you need some commercial meshers. What program are you thinking about?

Basti

vinz August 7, 2007 15:40

Hi, Thanks for the link. It
 
Hi,

Thanks for the link. It's very usefull.

For the mesher, I'll use the one we use usually, i.e GridPro.

And I'd like to try, two cfd codes OpenFOAM, and our in-house developed code named MISTRAL.

Vincent

seang August 7, 2007 21:02

try the Ahmed bluff body. rela
 
try the Ahmed bluff body. relatively simple geometry, but plenty of measurements available.

vinz August 9, 2007 03:28

Hi Kuan, Thanks for the hin
 
Hi Kuan,

Thanks for the hint. Indeed I found some papers on the topic. I'll do the mesh today and will begin the simulations after.

I'll inform everydody of my results when available.

Vincent

vega August 10, 2007 10:10

Vincent, A very good referenc
 
Vincent,
A very good reference for Automotive Aerodyanmics is:
Aerodynamics of Road Vehicles, by W. Hucho

vinz August 10, 2007 11:21

Thanks, I order it on amazon
 
Thanks,
I order it on amazon right now.

The mesh for the ahmed bluff body is allmost ready and I should be able to get some results next week.

Vincent

vinz August 24, 2007 04:29

Hi everybody, First of all
 
Hi everybody,

First of all thanks Rajneesh for the advise on the book, I received it and it's great.

However I need some help to run the ahmed test case on openfoam. I tried to use simpleFoam but I don't get the results I want.

Do you people think simpleFoam is the right solver to use in this case? Are there other more suited solvers available in OpenFOAM for this kind of studies?

Thanks in advance for your help.

Vincent

cedric_duprat August 24, 2007 05:26

Hi Vincent, what do you mea
 
Hi Vincent,

what do you mean by "I don't get the results I want" cause this is exactly the good question...
what do you want ?
simpleFoam is a RANS, steady solver so, if you are looking for unsteady turbulent structure, simpleFoam won't be the best way.
I know that some teams are working on a coupled RANS/LES for this test case so :
1- only LES is not possible yet
2- RANS may be not enought.

Well, nice speatch, ...
hope it can help you

regards,
Cedric

vinz August 24, 2007 05:44

Hi Cedric, I saw this probl
 
Hi Cedric,

I saw this problem regarding RANS and LES.
Looks like the RANS/LES approach is the best way to do it but I guess such approach being experimental so far, it's not implemented in OpenFOAM.

Actually when I say "I don't get the good results", I'm closer to a "I don't get results at all!!!". In fact running with simpleFoam is ok if I don't use a refined mesh at the wall which I don't like that much because of poor boundary layer catching.

Then if I used a refined boundary layer (around 1e-05 for the first cell thick) the computation is crashing after few iterations...which is even worse than the first approach.

To be simple my goal is to simulate a racing car! To do that, I'd like to validate the code before on simpler cases, and the ahmed one looks a good choice. Then the question is:
In your opinion (cedric or others), what is the best solvers for this kind of case in OpenFOAM? Or is it totaly impossible to do race cars simulations using OpenFOAM (that's not a blame, just a question)?

I hope I've been more clear. Thans for your help.

Vincent

fra76 August 24, 2007 06:34

Sometimes problems like this a
 
Sometimes problems like this are related to the turbulence model.
Try to run the simulation for a few iterations without turbulence, and then switch it on.
Or use small underrelaxation factors for a while.
Or use a different turbulence model (relizable key-epsilon, RNG key-epsilon, kOmegaSST, ...)
Or any combinations of the above!

A couple of years ago, one of my students produced some very nice results on a Ahmed body...

vinz August 24, 2007 06:42

Hi Francesco, Nice to know
 
Hi Francesco,

Nice to know that somebody succeed. There is some hope!

Actually for my simulation, even running without turbulence doesn't solve the problem.

I would be interested to know which solver your student used (environment and boundary conditions..etc). Do you have a paper with its results maybe? It could help me to find my problem, at least to make it run, we'll see look for result accuracy later!

Anyway thanks for the reply.

Vincent

ariorus August 24, 2007 06:57

Just out of curiosity: what is
 
Just out of curiosity: what is the Reynolds number in the test you mentioned? What kind of turbulence model are you using in simpleFoam?

vinz August 24, 2007 07:05

Hi Rosario, nu is equal to
 
Hi Rosario,

nu is equal to 1.475e-05, U=60m/s and the length of the body is 1.044m. So I would say the Reynolds number is around 4.24678e06.
But I tried something much smaller by using nu of 0.1 and it doesn't change anything.
I may post the case this afternoon. It will give the possibility to other people to have a look at the settings.

Vincent

ariorus August 24, 2007 07:27

ooops.. it seems we was writin
 
ooops.. it seems we was writing at the same time :-)

Just another question:

at the solid face what kind of cell elements do you have? It would be recommendable to have prisms there, particularly if you are trying to model boundary layer.

Try also in laplacian schemes to use linear limited (0.5 for instance), or not to correct laplacian term at all and see what happen; this is useful if your grid doesn't have good orthogonality (you should be able to achieve convergence at least).

Yes it would be interesting to look at your case, but you should post also the mesh...

Good luck.

Rosario

vinz August 24, 2007 09:27

Hmmm, very interesting, Rosari
 
Hmmm, very interesting, Rosario you made me find something.

I have two computers here, one with OpenFoam 1.4 and one with openfoam 1.4.1. My mesh is generated with GridPro (so hexa multiblock). Then to use OpenFOAM I create three meshes with GridPro2FOAM, one coarse, one medium and one fine.

When I run OpenFOAM either 1.4 or 1.4.1 on the coarse mesh, well everything's fine. Running the medium mesh (with starting conditions mapped from coarse mesh) my computation is blowing up with 1.4.1 and not with 1.4!!! Strange...

So I was wondering whether something would have changed between those two versions?

Unfortunately I can't post my case since it weights few hundreds of Mo.

Vincent

vega August 24, 2007 11:34

I have been using Fluent for r
 
I have been using Fluent for racing car (NASCAR) applications for past several years. Steady state RANS solver (simpleFoam type algorithm) seems to give reasonable predictions for drag. Lift is not as good. Speeds are similar to the ones you are trying. Few details of process:
1. Prism layers on exterior surfaces
2. Realizable KE turbulence model
3. Refinement in the wake area and other interesting regions.

PS: I have also recently started playing with OpenFoam and currently setting it up for 20 deg Ahmad model.

vinz August 24, 2007 11:53

This is very interesting Rajne
 
This is very interesting Rajneesh since my model has also a 20deg angle.

Would be great if you could tell me what kind of results you obtain with simpleFoam and eventually settings you are using. With these informations I'll be able to see if my problems come from my mesh or something else.

Vincent

vinz September 5, 2007 03:59

Hi Rajneesh, What kind of m
 
Hi Rajneesh,

What kind of mesh generator are you using your race cars?
Are you going to use the same in OpenFOAM?
And did you get some results on the ahmed bluff body?

Thanks in advance.

Vincent

vega September 5, 2007 23:01

I use Fluent/Tgrid/Ansa at my
 
I use Fluent/Tgrid/Ansa at my work for CFD simulations.

I have used Tgrid ( Prism layers on body + Tetra) to create symmetric half and full models of Ahmed body of 12.5 and 30 deg. I came across the original paper of Ahmed and the paper has some flow viz data for these two shapes. So I am going to focus on these two models. I have got
some numbers for ~0.5 mill elements model (looks reasonable) but I will be upgrading my computer next week to run ~2Mill models. I will compare Fluent/OF/test after that.

thanks

--
Rajneesh

vega September 7, 2007 00:34

12.5 Deg Half model results wi
 
12.5 Deg Half model results with openFoam (model size ~0.6 Mill)

Pressure Drag: 0.189
Viscous Drag: 0.006!!

Pressure drag is very close to the experimental numbers and the Fluent's prediction with ~3 Mill elements full model. (BTW Fluent got exactly same number as the Ahmed's test after applying continuity correction. Test section had a blockage of ~4%. I was really shocked/surprised at this perfect match. I will know tomorrow on what happens for 30deg Ahmed model.)


OpenFoam's Viscous drag is definitely incorrect. It should of order of ~0.04. I need to double check the LiftDrag utility (thanks Srini & Bos) and my model to make sure there are no errors
in computing viscous drag.

If anyone needs this mesh to play for external Aero simulations, let me know.

vega September 7, 2007 01:02

looks like contribution from t
 
looks like contribution from the turbulence are not
added to the viscous drag. I think I need
to compute turbDragCoefficient as well. If this correct, can anyone please explain the first
argument of this function?

turbDragCoefficient
(
const autoPtr<foam::turbulencemodel>& turbulence,
const volVectorField& U,
const volScalarField& p,
const dimensionedScalar& mu,
const word& patchName,
const vector& Uinf,
const scalar& Aref
);

thanks

--
Rajneesh

msrinath80 September 7, 2007 01:19

Rajneesh, I have performed
 
Rajneesh,

I have performed validations with Fluent for incompressible laminar unsteady/steady flow using the adapted version of the liftDrag utility originally compiled by Frank Bos. It works very nicely and gives accurate results. A few weeks ago, Frank raised a concern on how accurate the pressure and viscous contributions are when calculated using the adapted liftDrag routines. To answer that question, I started a validation test with a journal article. Preliminary observations show that OpenFOAM does give the correct lift/Drag coefficients. I will post the results shortly.

vinz September 7, 2007 03:41

Hi everybody, Rajneesh, you
 
Hi everybody,

Rajneesh, your results look great, at least for the pressure drag. That's a good begening.

Could I know a bit more about your configuration:
- which solver are you using?
- which turbulence model?
- do you check the mesh convergence? I mean, doing coarse, medium and fine mesh computations or you only use one mesh?

The best to understantd the differences between your computation and mine would be to have access to your mesh or even better the test case implementation. I don't know if it's possible for you?

I think it's a good thing if we succeed in getting results on this test case, it would be one more validation of OpenFOAM capacities.

Vincent

bastil September 7, 2007 11:38

Hi Rajneesh, I would be int
 
Hi Rajneesh,

I would be interested in that mesh or better the OF model to play around with it. Could you send it to me, please?
The differences in viscous drag are strange, maybe I can take a look at it.

Thanks

Basti

vega September 7, 2007 17:26

Srini, As far as I could fi
 
Srini,

As far as I could figure out from liftDrag.C,
viscous drag is computed separately from
laminar and turbulent viscosity. I am not getting the contributions from the turbulent viscosity as yet. I hope case you are trying out is for
turbulent flow case.

Vincent, BastiL

I will tar/zip files over this weekend and upload it here or on the website mentioned in my profile.
I am using simpleFoam at conditions similar to the Ahmed's experiment.

--
Rajneesh

msrinath80 September 7, 2007 17:30

You are correct. However my co
 
You are correct. However my computations are for laminar flows. For turbulent flows you need to include the contribution from turbulent viscosity.

vinz September 10, 2007 09:52

Hi everybody, It looks like
 
Hi everybody,

It looks like the liftDrag tool I'm using is not computing my turbulent viscosity part neither.

On a rotating wheel I get lower values for turbulent case with respect to laminar case, which is a bit strange.

Which is currently the best (taking everything into account) liftDrag tool available for OF 1.4?

Thanks in advance.

bastil September 11, 2007 06:20

Hi all, I a mdoing simular
 
Hi all,

I a mdoing simular tests on a more realistic body. I am struggling how to setup BC for simpleFoam. How can I define the rotating wheels? In my eyes this is a rotating wall BC?

Thanks

vinz September 11, 2007 06:37

Hi BastiL, I am using a too
 
Hi BastiL,

I am using a tool name rotationBC posted on this message board by a foam user. Actually, you set up a wall condition on your wheel, and rotationBC is going to compute a non uniform field to put in the bc file for U.

You can find the code in this thread:
http://www.cfd-online.com/OpenFOAM_D...es/1/4473.html

Which software are you going to use for the mesh?
Which reference are you going to take to compare with?
I would be really interested in comparing our results if you want.

Regards,

Vincent

Vincent

bastil September 11, 2007 12:26

This is a mesh converted from
 
This is a mesh converted from proSTAR using ccm26ToFoam. This went fine. I skipped rotating boundaries and started with simple walls. I can not get simpleFoam running. After few iterations residuals get very low but continutiy errors are very high. Foam struggles with an floating point error afterwards. I tried to play with nonothoganal correctors an relaxation but without success so far. Checkmesh reports few non-ortoganals and skews. What can I do next?

I am going to compare with STAR which runs without problems on this mesh. Comparing results is difficult for me, sorry.
I guess I am doing something wrong with simplefoam, please help. Thanks.

vinz September 11, 2007 17:28

Hi Bastil, Looks like OpenF
 
Hi Bastil,

Looks like OpenFOAM really doesn't like skewed or non orthogonal meshes.

For the ahmed body, I have two different meshes, one passing checkMesh without problem and one reporting some bugs like yours, and simpleFoam fails on the last one with the same results as you have on the wheel. I guess this is comming from some cell skewness. Your problem may be the same.

However I also noticed differences in stability between OpenFOAM 1.4 and 1.4.1, version 1.4 being suprisingly the more stable. I still don't have any answer on this differences but if you are using OF 1.4.1 so far, you may try OF 1.4 just to check if it's going better.

However I'm not an OpenFOAM specialist, and other people may know beeter solutions to your problem.
Hope that helped, let me know.


Vincent

marco2 September 11, 2007 19:37

Rajneesh and Vincent I' m a
 
Rajneesh and Vincent

I' m able to calculate turbDragCoefficient only modifying the simpleFoam code as the example posted in this forum for turbFoam (search "turbFoam_1"), but with two adds:
1- adding to the local liftDrag.H file the definition and the code of turbDragCoefficient from the original OpenFoam liftDrag.C and liftDrag.H files
2- adding to the local computeForces.H also the call to turbDragCoefficient, adding as first argument simply turbulence (before U).

I needed also to change in createFields.H the word PISO to SIMPLE, bur only because I apply these modification to simpleFoam and not to turbFoam.

Surely should be possible to modify the original liftDrag utility, but I'm not expert of C++ and I' m not be able to find which is the error if I apply the modification 2 directly to the original liftDrag utility.
The drag and lift with turbulent contribution seem to me reasonables, but I've not yet verify the results with some test case.

Regards

vega September 12, 2007 00:42

Vincent, BastiL, I have not
 
Vincent, BastiL,

I have not been able to upload the whole Ahmad mesh model to my googlepage site. Its about 20Mb after gzipping. I am not sure if uploading such a huge file to this forum is possible or
considered polite

Here is rest of stuff from openFoam setup for this problem for simpleFoam solver
http://aertheos.googlepages.com/ahma...efoam-setup.gz

thanks

--
Rajneesh


All times are GMT -4. The time now is 19:37.