Restart error-Invalid (not a number) values detected for a field

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Restart error-Invalid (not a number) values detected for a field

Post by Yvan Fournier »

Hello,

The fix I suggested and its syntax were for C code. If you use the Fortran variant of the cs_user_parameters file, you need to adapt it. I'll let you check the equivalences in the Doxygen documentation, but is is something like this

Code: Select all

integer k_id, f_id

call field_get_id("total_pressure", f_id)
call field_get_key_id("restart_file", k_id)
call field_set_key_int(f_id, k_id, value)
Where you need to replace value with the Fortran equivalent of CS_RESTART_AUXILIARY (I'll let you check this).

Regards,

Yvan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Restart error-Invalid (not a number) values detected for a field

Post by Ruonan »

Hello Yvan,

Thank you for your code! Besides this, I found an easier way to solve this problem, which is your suggested "Standard I/O serial" method.

Before I mistakenly thought this method would not work, because I only changed this setting in the current case, not in the case that I want to restart from. I found I should use this serial I/O for both the current case and the previous result.

So now my restarting problem has been partially solved. But there is another bug when restarting LES from RANS. I have reported it in one neighboring post.

Many thanks,
Ruonan
Post Reply