Page 1 of 2

large eddy simulation and combustion

Posted: Mon Sep 03, 2018 2:53 pm
by nedcyrille
good afternoon
i would like to simulate the combustion H2/air in code saturne 5.0.8 (window) using the large eddy simulation;
i've noticed that when i activate the combustion, the large eddy simulation is desactivated automatically.
is that normal?
is there a way to avoid that?

Re: large eddy simulation and combustion

Posted: Mon Sep 03, 2018 10:18 pm
by Yvan Fournier
Hello,

Yes, it is normal, because the combustion model is tested only with RANS models, and might not be compatible with an LES model.

Testing adaptation of LES to combustion would require "unlocking" the model by modifying verini.f90, activating LES instead of k-epsilon or RSM in cs_user_parameters.f90, and modifying all the relevant areas in the "comb" and model might be possible using user functions (if the code complains, you might need to modify some other subroutines (such as verini.f90) to "unlock" the use of this model, and then adapt routines in src/cogz (gas combustion) where "itytur" appears (itytur 2 for k-eps, 3 for RSM). The volume of code to adapt is relatively small, so it is probably not very hard, but there has been no validation of thee models in LES to my knowledge, so there might be other issues.

I'll check if there has been recent work on LES in combustion which might not be integrated yet, but this is not part of the current research subjects to my knowledge.

Regards,

Yvan

Re: large eddy simulation and combustion

Posted: Tue Sep 04, 2018 7:46 am
by nedcyrille
Thank you for the information

Re: large eddy simulation and combustion

Posted: Fri Sep 14, 2018 11:25 am
by nedcyrille
good morning
i succeeded to simulate turbulent combustion using large eddy simulation.
the model of combustion is the one proposed by code saturne 5.0.8.
But I have some problems:
- the velocity diffuse too much;
- when I activate species transport in GUI, an error appears.

../../../../src/code_saturne-5.0.7/src/base/cs_field.c:1075: Fatal error.

Fortran pointer of rank 2 requested for values of field "molecular_viscosity",
which have rank 1.


I don't have that problem when i use RANS
how can solve that issue?

Re: large eddy simulation and combustion

Posted: Fri Sep 14, 2018 3:25 pm
by Yvan Fournier
Hello,

There might be a bug in your code (at least for the second issue). Could you post your code modifications ?

Regards,

Yvan

Re: large eddy simulation and combustion

Posted: Sat Sep 15, 2018 2:48 pm
by nedcyrille
good afternoon

these are the codes that I used to activate LES in code saturne.

Re: large eddy simulation and combustion

Posted: Sat Sep 15, 2018 2:55 pm
by nedcyrille
- varpos
ischtp=1 at line 200

- cs_parameters_check.c

I added 4 at line 1342

- covofi
I added iturb.eq.41 or iturb.eq.40 at line 707
I modified rhovst at line 951

- cs_users_parameters
iturb=41

when you write ischtp=2, the calculation diverges

Re: large eddy simulation and combustion

Posted: Sun Sep 16, 2018 5:25 pm
by Yvan Fournier
Hello,

I tried running your setup (on another mesh) to see why you have the issue with species addition, but i debug_mode, I have a crash in cs_user_parameters.f90, where you call cs_rotation_define with a [0, 0, 0] axis definition, which leads to a division by zero.

I recommend not starting with a system under rotation. Note that if you did not want rotation, it means you started from a cs_user_parameters.f90 full of examples, without cleaning it, instead of starting with an "empty" subroutine and adding just whar is needed from examples. IF that is the case, you need to clean your user subroutines first.

Alos, I do not understand why you needed to change covofi.f90 (at least at this stage) while you did not adapt the subroutines from the "comb" source directory for LES, meaning many source terms are probably wrong or missing.

Best regards,

Yvan

Re: large eddy simulation and combustion

Posted: Mon Sep 17, 2018 7:15 pm
by nedcyrille
good evening
I've clean my subroutine cs_user_parameters.f90 and every thing is now fine.
thank you very much.
I used covofi for the followings reasons:
it's inside covofi there's the dissipation term for the variance of the mixture fraction;
from the literature, that dissipation term in RANS and LES is different.
if we want the dissipation term of the variance to be considered or the production term, we have to activate the LES (line 698 from original covofi) ;
I need the variance to determine the species and temperature;
I did not think about "comb"; anyway, I will look at that.

Re: large eddy simulation and combustion

Posted: Tue Sep 18, 2018 12:30 am
by Yvan Fournier
Hello,

Do you still have divergence with the 2nd order scheme or is that part now OK ?

I know there is a "FIXME" in covofi near the area you modified, so I assume this is relevant. I'll also check if we can improve this in the dev version.

Best regards,

Yvan