firemodels / fds

Fire Dynamics Simulator
https://pages.nist.gov/fds-smv/
Other
642 stars 616 forks source link

increase in the total CPU time in FDS5 vs FDS6 for a jet fan simulation #2107

Closed gforney closed 9 years ago

gforney commented 9 years ago
FDS Version: 5 and 6
SVN Revision Number:
Compile Date:
Smokeview Version/Revision:
Operating System: win 64 bits

Describe details of the issue below:
The simulation process spends 5 times more in FDS 6 than in FDS5. 

untitled2012.fds is the data file used in FDS 5, whilst untitled3.fds is the data file
used in FDS 6.

could anyone tell me why?

Original issue reported on code.google.com by alex.maymo.molina on 2014-04-30 16:18:15


gforney commented 9 years ago
I'll take a look at it.

Original issue reported on code.google.com by mcgratta on 2014-04-30 17:08:25

gforney commented 9 years ago
A few things things I notice.  

First, your cases are not identical. In the FDS6 input you have a REAC which adds some
cost in tracking species.  Also, FDS6 uses a lumped species containing water vapor
and carbon dioxide as the default gas where 5 just uses nitrogen.  This results in
the radiation solver being invoked in 6 since there are absorbing species.

FDS6 has a somewhat tighter CFL criteria, if you look at the timesteps you will see
that FDS6 is using a slightly smaller timestep (about 10 %).  This is part of the cost.

A big item in your case is FDS6 also tries to do better with mass and energy exchange
at the boundaries of meshes.  With your mesh boundary just at the base of the jet fan
you impose a large shear flow at the mesh interface.  The tighter tolerances in FDS6
are forcing multiple pressure iterations with each time step.  Changing your mesh lines
to:

&MESH ID='MESH-a', IJK=50,40,8, XB=0.0,10.0,0.0,8.0,0.0,1.6/
&MESH ID='MESH-b', IJK=50,60,8, XB=0.0,10.0,8.0,20.0,0.0,1.6/
&MESH ID='MESH-a01', IJK=100,80,9, XB=0.0,10.0,0.0,8.0,1.6,2.5/
&MESH ID='MESH-b01', IJK=50,60,9, XB=0.0,10.0,8.0,20.0,1.6,2.5/

and getting rid of the REAC  and turning off the radiation solver drops it from a factor
of 5 to less than a factor of 2.

In addition to the CFL criteria there have been other changes between 5 and 6 that
have increased the cost overall.    

Original issue reported on code.google.com by drjfloyd on 2014-04-30 20:29:16

gforney commented 9 years ago
Note also that FDS 6 does not use the Smagorinsky model, thus C_SMAG is meaningless
in 6. Your FDS 5 simulation using C_SMAG=0.4 changes the dynamics of the jet noticeably.
Why would you want to do this? If you want to smooth out interesting fluid dynamics,
use a RANS model.

Take Dr Floyd's advice and let us know if things speed up for you.

Original issue reported on code.google.com by mcgratta on 2014-04-30 21:47:51

gforney commented 9 years ago
Hi again!

Thanks for sharing your knowledge and taking the time to look into this issue. 

Apologies for the delay to answer, but I was on holidays...

I have modified the model according to the advice above (see "untitled20122.fds" for
FDS5 and "untitled4.fds" for FDS6) and the total CPU time is still more than 3 times
higher... what have I done wrong?

My computer is a 32 cores one, HP Z820, could that be also part of the problem?

Is there any additional advice to speed up the process? I use this software to make
simulations of big volumes involving jet fans. Those simulations used to spend over
200hrs in FDS5 and I'm afraid that now, with FDS6, similar models would take me more
than 600hrs...

Thanks in advance,

Original issue reported on code.google.com by alex.maymo.molina on 2014-05-06 08:59:27


gforney commented 9 years ago
See section 1.4 in the User's guide.

Original issue reported on code.google.com by drjfloyd on 2014-05-06 11:15:57

gforney commented 9 years ago
This is not a question of right or wrong. There are some strategies you can adopt to
speed things up a bit, but FDS 6 is slower than FDS 5 because of improvements to the
accuracy of various routines. Your original case with FDS 5 used a Smagorinsky constant
of 0.4, which only served to dampen naturally occurring turbulent fluctuations that
have a significant effect on the mean velocity along the jet center line. We have found
that the default turbulence model in FDS 6 (Deardorff) is not as dissipative as the
default model in FDS 5 (constant coefficient Smagorinsky). The end result is that we
get more accurate results with FDS 6. In the FDS Verification Guide, there is a section
on turbulent jets (3.4). It shows that the constant Smag model can give poor results
on a relatively coarse mesh, and my guess is that you are often working with relatively
coarse meshes. So ask yourself this question -- do you want to get the wrong answer
twice as quickly? If you have some measurements of your own to compare FDS 5 and 6
against, and you find that FDS 5 is comparable or better than FDS 6 in accuracy, then
I would recommend that you stay with FDS 5. But please let us know if you find evidence
that FDS 5 is more accurate than FDS 6. We do want to make the code fast, but we can't
compromise accuracy for speed.

Original issue reported on code.google.com by mcgratta on 2014-05-06 12:28:29

gforney commented 9 years ago
I think it is worth looking at the velocity solutions these two cases give you.  Take
a look at the attached images.  You have an Re_D for your jet of ~340,000, turbulent
flow.  Which version of FDS at your current grid resolution is giving you a solution
that looks like turbulent jet flow?

Original issue reported on code.google.com by drjfloyd on 2014-05-06 15:50:04


gforney commented 9 years ago
(No text was entered with this change)

Original issue reported on code.google.com by drjfloyd on 2014-05-19 17:42:29

gforney commented 9 years ago
Sorry for delay in response...

I read in a paper than the jet fans modelling was better performed with a k-eps turbulent
model and also read that in FDS5 the smag factor of 0.40 showed acceptable results.
Therefore, I did some comparison between experimental data and CFD results and the
general jet fan plume match seemed to be acceptable. 

Note, however, that the modelled jet fan casing was very different to the real one
as I gave priority to the plume results over the real jet fan geometry. 

For this reason I accepted this smag factor to be ok... Unfortunately, I cannot share
this information for all the public so I kindly ask you to provide your "personal"
mail if you would like to check them.

Regarding the mesh, I typically use a finer mesh close to the jet fan, and a coarser
one far from it. What would you consider to be a coarse or an acceptable mesh to capture
the jet fan outlet plume?

Thanks for your time and consideration,

Original issue reported on code.google.com by alex.maymo.molina on 2014-05-21 10:41:31

gforney commented 9 years ago
If I spent some time searching the literature, I could find you many papers that say
k-eps is better, and many that say LES is better. It all depends on the details of
the models. An "acceptable" mesh depends on comparisons to actual data, so if you get
results that are acceptable to you, that is all that matters. I would say that in the
long run, you are better off with LES on a reasonably fine grid because it will give
you a simulation that requires less tuning. The Smag constant of 0.4 may have "worked"
in one case, but that might just be lucky. Ideally, you want good results without having
to tune numerical parameters. We have found that the Deardorff model that is now the
default in FDS 6 does a good job over a wide variety of applications, and there is
no tuning required.

Original issue reported on code.google.com by mcgratta on 2014-05-21 12:57:50