## CFD - Computational Fluid Dynamics, Motorsport, Formula 1

Here are our CFD links and discussions about aerodynamics, suspension, driver safety and tyres. Please stick to F1 on this forum.
Wayne Kerr
0
Joined: Tue Dec 20, 2016 5:19 am

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

timhuang77 wrote: Hi all,

I'm on an FSAE team trying to start Aero simulations for our car this year. I run Star-CCM+ v11 and are getting more and more familiar with CFD analysis. My question being: Where is the line drawn between 2D and 3D simulations? I understand that 3D is better at simulating viscous effects and estimating downforce and drag numbers. Currently, most of the vehicle simulations are done in 3D and ideally some would be done in 2D (as it is magnitudes faster computationally speaking). Our airfoil selection is done in 2D, but I would like to do more to speed up and simplify the process. Thanks
Have you watched the tutorial on steve portal for fsae? I'd start there if you haven't.

For your application, I probably wouldn't spend too much time on 2D. Depending on your computational powers, narrow it down to 2 / 3 shape choices and then start your 3D from there. I'd probably ask myself the question "how can I justify this in 2D to the judges" if you're ever caught debating 2D vs 3D

Vyssion
138
Joined: Sun Jun 10, 2012 1:40 pm

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

timhuang77 wrote: Hi all,

I'm on an FSAE team trying to start Aero simulations for our car this year. I run Star-CCM+ v11 and are getting more and more familiar with CFD analysis. My question being: Where is the line drawn between 2D and 3D simulations? I understand that 3D is better at simulating viscous effects and estimating downforce and drag numbers. Currently, most of the vehicle simulations are done in 3D and ideally some would be done in 2D (as it is magnitudes faster computationally speaking). Our airfoil selection is done in 2D, but I would like to do more to speed up and simplify the process. Thanks
2D is good for initial aerofoil designing and to some extent, rough diffuser angle'shape testing. Beyond that, you cant really do much else with it as there are so many 3D effects (i.e. vortices) which you simply can't ignore when designing a vehicle. If you are serious about simplifying the process a bit, then what I would do is break the car symmetrically along its longitudinal axis to half solver time, and then if that still isn't enough, look at designing your front wing or rear wing in isolation as a smaller 3D simulation. Once you're happy with that, plug it all into the same model and simulate it all together and see what happens and adjust the design accordingly. but I would be careful with 2D things and the "numbers" you get out of it - I would only work in deltas; that is, "this design has a higher number than this one, therefore it is better". You can't really say that this 2D aerofoil gives me 1234.56789 Newtons of force where as the old one was only 1234.0000 Newtons, therefore its better.
If you can't explain it simply, then you don't understand it well enough.
- Albert Einstein

The great thing about facts is that they are true, whether or not you believe them.
- Neil deGrasse Tyson

Vyssion Scribd - Aerodynamics Papers

keroro.90
1
Joined: Mon Jul 01, 2013 8:32 pm

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

timhuang77 wrote:
Fri Dec 02, 2016 1:54 am
Hi all,

I'm on an FSAE team trying to start Aero simulations for our car this year. I run Star-CCM+ v11 and are getting more and more familiar with CFD analysis. My question being: Where is the line drawn between 2D and 3D simulations? I understand that 3D is better at simulating viscous effects and estimating downforce and drag numbers. Currently, most of the vehicle simulations are done in 3D and ideally some would be done in 2D (as it is magnitudes faster computationally speaking). Our airfoil selection is done in 2D, but I would like to do more to speed up and simplify the process. Thanks
I think depends strongly on what type of solver you're going to use...If you are going to use a very accurate approach with or without closure model like a DNS or a LES you will find some big difference....while if you use a RANS, the differences will be less...

Xwang
5
Joined: Sun Dec 02, 2012 10:12 am

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

I have a question for you.
Is there any limit on the scale used when doing CFD?
I know that only up to 60% model can be used in wind galleries studies, is the same for CFD or are they 100% dimension?
Is it easier to validate CFD vs wind gallery if the gallery environment is used (60% scale, gallery walls and so on) for CFD?
I've read that Force India Chief Designer has said that their CFD and gallery data correlate well, but both are different from track data.

Vyssion
138
Joined: Sun Jun 10, 2012 1:40 pm

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

Xwang wrote:
Sat Apr 14, 2018 11:21 am
Is there any limit on the scale used when doing CFD?
I know that only up to 60% model can be used in wind galleries studies, is the same for CFD or are they 100% dimension?
No, the limit that teams have is related to the number of TeraFLOPS they have available to use each week.

In computing, floating point operations per second (FLOPS, flops or flop/s) is a measure of computer performance for algorithms which require floating-point calculations. For these sorts of calculations, such as CFD, it is a more accurate measure than measuring instructions per second.

If you assume that each "cell" of a mesh in CFD is one FLOP (it isnt... obviously), then if your mesh has 100 milllion elements, you have 100 MFLOPS each time you solve. Since cell size is dependant on geometry and flow feature sizes, whether you are at 100% or 60%, you will have to scale your cell size down in order to maintain resolution of the geometric and aerodynamic flow features. So you would probably still end up with 100 MFLOPS regardless. (again, just as an example!!)

Xwang wrote:
Sat Apr 14, 2018 11:21 am
Is it easier to validate CFD vs wind gallery if the gallery environment is used (60% scale, gallery walls and so on) for CFD?
Typically, the order of preference with regards to obtaining data and aerodynamic performance is:
Track Testing > Wind Tunnel > CFD
The scale of a model which is different from 100% scale becomes harder in general. This is because of similarity parameters. Reynolds Number is the most famous of these, however, it is not the only one: Mach Number is another one.

In a nutshell, there are two physical qualities about air which need similarity factors to be equatable: The air's viscosity and compressibility.

Reynolds Number controls the airs viscosity (or "stickiness") and is the ratio of inertial forces to viscous forces.
Mach Number relates to the air's compressibility (or "springiness") and is the ratio of the air's velocity to the speed of sound. Usually this isn't too much of a problem due to air's ability to be essentially assumed as incompressible below about 0.3 Mach.
Xwang wrote:
Sat Apr 14, 2018 11:21 am
I've read that Force India Chief Designer has said that their CFD and gallery data correlate well, but both are different from track data.
Just be wary - "correlate" doesn't necessarily infer "equal"... Track data will always be superior to almost any wind tunnel or CFD method.
If you can't explain it simply, then you don't understand it well enough.
- Albert Einstein

The great thing about facts is that they are true, whether or not you believe them.
- Neil deGrasse Tyson

Vyssion Scribd - Aerodynamics Papers

Xwang
5
Joined: Sun Dec 02, 2012 10:12 am

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

Thanks

A15013950
2
Joined: Tue Jun 12, 2018 3:34 pm

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

How do you calculate initial k and omega when using that turbulence model for external aerodynamics?

Vyssion
138
Joined: Sun Jun 10, 2012 1:40 pm

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

A15013950 wrote:
Sun Jul 22, 2018 10:01 am
How do you calculate initial k and omega when using that turbulence model for external aerodynamics?
I will go over all the "major" variables that people may or may wish to calculate here - there are ways to skip to the ones you want, but this way will give you all that you need, I hope.

One equation for turbulent kinetic energy (k), in J/kg, is:

$k=\frac{\overline{u'_i u'_i}}{2}$

This basically reads as "k" being equal to the time average of the velocity fluctuations in one direction squared, all divided by 2. So a rough way to calculate this would be to take your domain's inlet velocity, multiply it by your turbulence intensity (i.e. 5% = 0.05 ), and then square it. From there, you divide by 2, but since we only looked into one direction, a crude way of approximating this throughout the domain is to multiply that final result by 3; one for each axis, since there will be fluctuations in velocity in all directions.

Alternatively, you can split them out into each separate axis if you have a vector with a non-zero second or third component. If that is the case, do the same thing but use this equation below:

${\displaystyle k={\frac {1}{2}}\left(\,{\overline {(u')^{2}}}+{\overline {(v')^{2}}}+{\overline {(w')^{2}}}\,\right)}$

For Omega, its a little more involved... Assuming you know the air Pressure [Pa] and Temperature [K}, then you can use the ideal gas law equation to calculate your air density:

$\rho = \frac{p}{R_{\rm specific} T}$

From there, we need to use Sutherland's Law for calculating the fluid dynamic viscosity of air as it relates to temperature:

${\displaystyle \mu =\mu _{0}{\frac {T_{0}+C}{T+C}}\left({\frac {T}{T_{0}}}\right)^{\frac {3}{2}}.}$

which can be written as:

${\displaystyle \mu =\lambda {\frac {T^{\frac {3}{2}}}{T+C}}}$ , where ${\displaystyle \lambda ={\frac {\mu _{0}\left(T_{0}+C\right)}{T_{0}^{\frac {3}{2}}}}}$

Taking "$\lambda$" as being equal to 0.000001458 and "C" as being equal to 110.4 (these are commonly used values of dynamic viscosity of air at a specific temperature within CFD literature), you can then calculate back through to get your actual at your given temperature in [ Pa . s ].

Next we need to calculate the turbulent length scale [m] of the flow, which can be done crudely (yes, I am aware that the k-$\epsilon$ model has it's own definition of the length scale utilizing the relationship between k, epsilon and $C_\mu$) by:

$l = 0.038 \; d_h$

Note that $d_h$ is the hydraulic diameter and so depending on your shape of domain, there will be a different equation for calculating the equivalent circular section. For a rectangular domain, use this equation:

${\displaystyle D_{\text{H}}={\frac {4ab}{2(a+b)}}={\frac {2ab}{a+b}}}$

Next, we can calculate Epsilon [J / kg . s ] by using the k-$\epsilon$ specific coefficient $C_\mu$ = 0.09 along with the turbulent length scale we just worked out and the turbulent kinetic energy (k) from before:

$\epsilon = C_\mu \, \frac{k^\frac{3}{2}}{l}$

Next we need to calculate something called nuTilda which is our turbulent viscosity [ m^2 /s ]. We can do that by

${ \mu }_{ t }={ C }_{ \mu }\frac { { k }^{ 2 } }{ \varepsilon }$

Finally, for Omega [J / kg . s ]

$\omega = \frac{\rho \, k}{\mu} \, (\frac{\mu_t}{\mu})^{-1}$

Where "k" is the turbulent energy, $\rho$ is the density, $\mu$ is the molecular dynamic viscosity and $\frac{\mu_t}{\mu}$ is the eddy viscosity ratio.

Hope this helps!!
If you can't explain it simply, then you don't understand it well enough.
- Albert Einstein

The great thing about facts is that they are true, whether or not you believe them.
- Neil deGrasse Tyson

Vyssion Scribd - Aerodynamics Papers

A15013950
2
Joined: Tue Jun 12, 2018 3:34 pm

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

Thank you that helps a lot. My second gear fluid mechanics module covered some cfd but not important simulation things like calculating initial conditions. That was a much more thorough explaination that others I have found which didn’t really help. Hopefully this solves the problem of getting ridiculous CFD results that’s been happening recently. Can I ask what your education history is, just curious about that path you took to get so knowledgable in fluid mechanics/aeirofynamics/cfd as that’s what engineering career I would like but feel I’ve made a mistake in going for mehnaical degree. Thanks again for the help

A15013950
2
Joined: Tue Jun 12, 2018 3:34 pm

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

Vyssion wrote:
Sun Jul 22, 2018 9:34 pm
A15013950 wrote:
Sun Jul 22, 2018 10:01 am
How do you calculate initial k and omega when using that turbulence model for external aerodynamics?
To avoid confusion previous post was a reply to this post

Vyssion
138
Joined: Sun Jun 10, 2012 1:40 pm

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

A15013950 wrote:
Sun Jul 22, 2018 11:19 pm
Thank you that helps a lot. My second gear fluid mechanics module covered some cfd but not important simulation things like calculating initial conditions. That was a much more thorough explaination that others I have found which didn’t really help. Hopefully this solves the problem of getting ridiculous CFD results that’s been happening recently. Can I ask what your education history is, just curious about that path you took to get so knowledgable in fluid mechanics/aeirofynamics/cfd as that’s what engineering career I would like but feel I’ve made a mistake in going for mehnaical degree. Thanks again for the help
I have three degrees actually, and one of them is Mechanical Engineering, so don't be too dismayed at it You are often given semi-autonomy with your final project, so if you are really keen on doing fluid dynamics, then I would suggest picking one with a fluids background, or choosing aerodynamics units as your electives. All that being said, most of my learning has been in the industry, and without going too much into it, encompasses both motorsport and aerospace as an aerodynamicist and/or CFD engineer.

Judging from your question, I would hazard a guess that you are playing around with OpenFOAM with the "0" folder for your initialization values?
If you can't explain it simply, then you don't understand it well enough.
- Albert Einstein

The great thing about facts is that they are true, whether or not you believe them.
- Neil deGrasse Tyson

Vyssion Scribd - Aerodynamics Papers

A15013950
2
Joined: Tue Jun 12, 2018 3:34 pm

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

Vyssion wrote:
Mon Jul 23, 2018 12:07 am

I have three degrees actually, and one of them is Mechanical Engineering, so don't be too dismayed at it You are often given semi-autonomy with your final project, so if you are really keen on doing fluid dynamics, then I would suggest picking one with a fluids background, or choosing aerodynamics units as your electives. All that being said, most of my learning has been in the industry, and without going too much into it, encompasses both motorsport and aerospace as an aerodynamicist and/or CFD engineer.

Judging from your question, I would hazard a guess that you are playing around with OpenFOAM with the "0" folder for your initialization values?
That’s impressive, I haven’t finished one degree yet and I really want to be done so I can get a job, although I probably need a masters to get the job I want. And yeah I’m using OpenFoam, or trying at least. I’m attempting to design and analyse a car to improve my cad skills and better learn cfd, but also because I find it fun

A15013950
2
Joined: Tue Jun 12, 2018 3:34 pm

### Re: CFD - Computational Fluid Dynamics, Motorsport, Formula 1

Although the first couple simulations I tried I got lift and drag coefficients x10^23 so I’m thinking I made a mistake