Get the previous time step values for temperature field
Posted: Wed Oct 21, 2020 2:12 pm
Hello all
I'm using code_saturne 6.0 and I need, for an extra calculation, to get the previous values of the temperature field, itemp.
I've seen that the option of keeping the previous time step is disabled for temperature and I wonder how to activate it.
I've tried to use "call field_set_n_previous(itemp,1)" in the initialization but it seems not working. Indeed, I have no longer errors when I compile my code with "call field_get_val_prev_s(itemp, cvara_temp)" but I have one when I run the code with the "cs run --param DATA/setup.xml --nprocs 24" for the line where I use cvara_temp :
"Fortran runtime error: Index '1' of dimension 1 of array 'cvara_temp' above upper bound of 0"
So it seems that it didn't save the previous step correctly.
Do you have any recommendations to make it work?
Best regards,
Camille.
I'm using code_saturne 6.0 and I need, for an extra calculation, to get the previous values of the temperature field, itemp.
I've seen that the option of keeping the previous time step is disabled for temperature and I wonder how to activate it.
I've tried to use "call field_set_n_previous(itemp,1)" in the initialization but it seems not working. Indeed, I have no longer errors when I compile my code with "call field_get_val_prev_s(itemp, cvara_temp)" but I have one when I run the code with the "cs run --param DATA/setup.xml --nprocs 24" for the line where I use cvara_temp :
"Fortran runtime error: Index '1' of dimension 1 of array 'cvara_temp' above upper bound of 0"
So it seems that it didn't save the previous step correctly.
Do you have any recommendations to make it work?
Best regards,
Camille.