Variable density issue for for gas combustion with EBU model

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
CandiceLIU
Posts: 11
Joined: Thu Mar 02, 2023 5:36 pm

Variable density issue for for gas combustion with EBU model

Post by CandiceLIU »

Dear Code_Saturne developers and users,
There seems to be a bug in the code regarding the activation of irovar=1 option in the main part of the code when gas phase combustion, especially the EBU model. The case setup has been done in the same manner as I have done it in Version-2 of Code_Saturne. What I have noticed is that SRROM is not reported in the listings file which was the case in version-2. Also, the density is not output in the postprocessing. I have also noticed that the velocity on the product side of the flame does not change which means that irovar=1 option is not transferred to the main part of the code and the density remains constant. To clarify, I have set-up the case in the fortran and c user subroutines and this case is to test the code. The reason for using the subroutines rather than the GUI is that I want to develop the code with different models, and this cannot be done if the GUI is used. The SRC has been attached.

To check why the relaxation coefficient was not written in V7, I found it is suspicious in the following part, the relaxation coefficient will be output on condition ippmod(iphpar).ge.2 as I highlight in the snippet 1 (/base/impini.f90). However, as you can see from snippet 2(/pprt/ppincl.f90), it can only be switched on for the specific physics plus radiative transfer problems.
I was wondering if someone else has the same issue with density not being variable despite irovar being defined (coini1.f90 & cs_user_parameter.c) while using the standard EBU model.

Best regards,
Liyuan
Attachments
Picture2.png
Picture3.png
SRC.7z
(169.39 KiB) Downloaded 39 times
Li Ma
Posts: 7
Joined: Thu Nov 17, 2022 3:54 pm

Re: Variable density issue for for gas combustion with EBU model

Post by Li Ma »

Hello,

irovar = 1 doesn't necessarily mean that the density variation is taken into account in the fluids equations, it indicates the density may be a function of a state law. You may find the idilat option in setup.log of your run folder that indicates which dilatation model you used.
Could you please attach this file?
CandiceLIU
Posts: 11
Joined: Thu Mar 02, 2023 5:36 pm

Re: Variable density issue for for gas combustion with EBU model

Post by CandiceLIU »

Hello Li,

Thanks for your reply. idilat=1 in the setup.log and I have attached the file.

Best regards,
Liyuan
Attachments
setup.log
(26.09 KiB) Downloaded 43 times
Li Ma
Posts: 7
Joined: Thu Nov 17, 2022 3:54 pm

Re: Variable density issue for for gas combustion with EBU model

Post by Li Ma »

you can change te idilat to 2 in cs_user_parameters-base.c
by setting
void
cs_user_parameters(cs_domain_t *domain)
{
cs_glob_velocity_pressure_param->idilat = 2 ;
}

In addition, it is possible that density is not postprocessed in visualization output.
You can enforce the option by setting
void
cs_user_finalize_setup(cs_domain_t *domain)
{
CS_UNUSED(domain);

cs_field_set_key_int(CS_F_(rho), cs_field_key_id("post_vis"), CS_POST_ON_LOCATION | CS_POST_MONITOR);
}
in the cs_user_parameters-base.c
CandiceLIU
Posts: 11
Joined: Thu Mar 02, 2023 5:36 pm

Re: Variable density issue for for gas combustion with EBU model

Post by CandiceLIU »

Dear Li,

Thanks for your swift reply. The density has been output in the post processing.

I have implemented that code and now it has an error like below:

‘cs_velocity_pressure_param_t’ {aka ‘const struct <anonymous>’} has no member named ‘idilat’

it seems like idilat is a static variable. I have already switched it to 2 in the code but it still doesn't work. The density is still constant in my case.

I have posted the setup.log.

Best regards,
Liyuan
Attachments
setup.log
(26.3 KiB) Downloaded 32 times
Li Ma
Posts: 7
Joined: Thu Nov 17, 2022 3:54 pm

Re: Variable density issue for for gas combustion with EBU model

Post by Li Ma »

I made a mistake of structure name.
It should be
cs_velocity_pressure_model_t *vp_model
= cs_get_glob_velocity_pressure_model();
then you can change it by
vp_model->idilat = 2;
Post Reply