Page 1 of 1

A question on restarting file

Posted: Tue Sep 29, 2015 1:44 pm
by MartianDuan
Hello users,

I need to use k-omega-sst to do some simulation. However, the simulating case keeps diverging. To make the simulation converge, I tried to simulate it is as liaminar flow. This gives me a very rough predictions, I turned on the turbelence model afterward.

However, as there is no fiel for K and omega in the restart file created by the liaminar flow simualting case. The turbuelnce cased can not be run.

I am wondering whether we can add extra field in the restarting file. Or is it possibel to turn off some functions of the turbulence model at the very beginning to give the case a rough prediction and turn them on afterwards?

The listing log is attached.

Thanks very much.

Kindest regards,

Yu.

Re: A question on restarting file

Posted: Tue Sep 29, 2015 6:58 pm
by Yvan Fournier
Hello,

Most quantities are computed, but turbulent values are not (it is easier to restart from k-epsilon to k-omega, as turbulence variables are "converted"). You may try to initialize k and omega values in a better manner using the usiniv subroutine (in cs_user_initialization.f90 file), as it is called after the restart file is read.

Regards,

Yvan

Re: A question on restarting file

Posted: Mon Oct 05, 2015 9:42 am
by MartianDuan
Hi Yvan,

Thanks for your suggestions. But I did not find the 'usiniv' on the cs_user_initialization.f90. I am not sure whether it is because the version of code_saturne is different from yours. I am using code_saturne 4.0.2.

Can you please give me hints?

Best regards,

Yu.
Yvan Fournier wrote:Hello,

Most quantities are computed, but turbulent values are not (it is easier to restart from k-epsilon to k-omega, as turbulence variables are "converted"). You may try to initialize k and omega values in a better manner using the usiniv subroutine (in cs_user_initialization.f90 file), as it is called after the restart file is read.

Regards,

Yvan

Re: A question on restarting file

Posted: Mon Oct 05, 2015 9:45 am
by MartianDuan
Hi Yvan,

I am sorry that I did not include the subroutine in the previous post.

It is attache now.

Best regards,

Yu.
Yvan Fournier wrote:Hello,

Most quantities are computed, but turbulent values are not (it is easier to restart from k-epsilon to k-omega, as turbulence variables are "converted"). You may try to initialize k and omega values in a better manner using the usiniv subroutine (in cs_user_initialization.f90 file), as it is called after the restart file is read.

Regards,

Yvan

Re: A question on restarting file

Posted: Mon Oct 05, 2015 10:41 am
by Yvan Fournier
Hello,

Sorry, usiniv was the old name. cs_user_initialization is the correct routine.

So defining turbulence values based on a reference velocity and the litterature is probably a good start.

Regards,

Yvan

Re: A question on restarting file

Posted: Mon Oct 05, 2015 2:45 pm
by MartianDuan
Hello Yvan,

Actually I tried the method you suggested. however, I still have the same problem.

I am wondering whether it is due to the subfuntion such as 'call field_get_val_s(ivarfl(ik), cvar_k)'.

I guess it is to get the scaler or velocity field. I am wondering whether it is necessary to do so in the initialization?

Thanks for all your help.

Regards,

Yu.

Yvan Fournier wrote:Hello,

Sorry, usiniv was the old name. cs_user_initialization is the correct routine.

So defining turbulence values based on a reference velocity and the litterature is probably a good start.

Regards,

Yvan

Re: A question on restarting file

Posted: Mon Oct 05, 2015 8:21 pm
by Yvan Fournier
Hello,

Tee field_get_val_s_function allows you to access the field values, but it does nothing if you do not modifiy or otherwise use those values.

Regards,

Yvan