I want to change the relaxation factor for pressure from 1 to 0.7 in a simulation with LES.
According to this post I think I should add relaxv(ipr)=0.7 in to the cs_user_parameters.f90 file in the usipsu subroutine. But when I add this line, the compiler says:
The function relaxv does not have an implicit type.
And when I define it as double precision it gives this error:
Unclassified statement at (1).
Can you please help me with this? I'm not good in FORTRAN.
The post is obsolete. The syntax has changed. relaxv is now a member of the var_cal_opt structure (usable from both C and Fortran), for which the Doxygen examples should show how to access/modify members (see examples in cs_user_parameters-base.c for iwarni or blencv, and do the same for relaxv).
The post is obsolete. The syntax has changed. relaxv is now a member of the var_cal_opt structure (usable from both C and Fortran), for which the Doxygen examples should show how to access/modify members (see examples in cs_user_parameters-base.c for iwarni or blencv, and do the same for relaxv).
Regards,
Yvan
Thank you for your great support Yvan!
I did the same for relaxv in cs_user_parameters.f90 and in the usipsu subroutine.
My code is:
There is no compiler error now, but the setup.log still shows relaxation factor of 1 for pressure. And surprisingly the simulation seems converging now!
Did you also copy the settings back (in C, we can get the pointer to avoid needing this, but in Fortran,
you need to copy local values back to the field data); if you have not done it, it explains why it does not appear modified in setup.log:
Did you also copy the settings back (in C, we can get the pointer to avoid needing this, but in Fortran,
you need to copy local values back to the field data); if you have not done it, it explains why it does not appear modified in setup.log: