A question on restarting file

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

A question on restarting file

Post by MartianDuan » Tue Sep 29, 2015 1:44 pm

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.
Attachments
listing.log
(27.76 KiB) Downloaded 240 times

Yvan Fournier
Posts: 3055
Joined: Mon Feb 20, 2012 3:25 pm

Re: A question on restarting file

Post by Yvan Fournier » Tue Sep 29, 2015 6:58 pm

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

MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

Re: A question on restarting file

Post by MartianDuan » Mon Oct 05, 2015 9:42 am

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

MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

Re: A question on restarting file

Post by MartianDuan » Mon Oct 05, 2015 9:45 am

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
Attachments
cs_user_initialization.f90
(8.55 KiB) Downloaded 226 times

Yvan Fournier
Posts: 3055
Joined: Mon Feb 20, 2012 3:25 pm

Re: A question on restarting file

Post by Yvan Fournier » Mon Oct 05, 2015 10:41 am

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

MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

Re: A question on restarting file

Post by MartianDuan » Mon Oct 05, 2015 2:45 pm

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

Yvan Fournier
Posts: 3055
Joined: Mon Feb 20, 2012 3:25 pm

Re: A question on restarting file

Post by Yvan Fournier » Mon Oct 05, 2015 8:21 pm

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

Post Reply