Time averaging with offset after restart
Posted: Wed Aug 24, 2016 6:16 pm
Hi,
In Code_Saturne version 4.0.4., I want to write out time averages of a number of variables, for which I aim on using cs_time_moment_define_by_field_ids() in cs_user_parameters.c like this example:
However, I want to use the 1000 timesteps (nt_start) as an offset from the timestep number of the previous simulation in case of a restart, i.e. ntpabs + 1000. I tried using ntpabs directly in this function, but it didn't work. Do you have any suggestion?
Many thanks for your help!
In Code_Saturne version 4.0.4., I want to write out time averages of a number of variables, for which I aim on using cs_time_moment_define_by_field_ids() in cs_user_parameters.c like this example:
Code: Select all
int moment_f_id[] = {CS_F_(u)->id};
int moment_c_id[] = {-1};
int n_fields = 1;
cs_time_moment_define_by_field_ids("U_mean",
n_fields,
moment_f_id,
moment_c_id,
CS_TIME_MOMENT_MEAN,
1000, /* nt_start */
-1, /* t_start */
CS_TIME_MOMENT_RESTART_AUTO,
NULL);
Many thanks for your help!