Dear team,
I have a problem with porosity model in C_S 4.0. I try to define a porosity in some cells of the fluid domain that change dynamically during the computation.
I read in the user's guide that "To define the porosity, the user must fill in the subroutine usporo and set the keyword iporos to 1 in the cs user parameters file. This subroutine is called every time step."
I set the 'iporos' keyword to 1 in 'usipsu' subroutine of cs_user_parameters.f90 user's file and I try to define a porosity in 'usporo' subroutine of cs_user_porosity.f90 user's file (I don't use the GUI).
But the usporo subroutine seems to be called only once at the beginning of the job (even before the cs_user_initialization subroutine) and it's not called for later time steps. So my value for porosity can't be updated during the computation.
Could you please tell me if there's a trick to get usporo() called at each time steps?
Thank you for your feedback.
Jeremie
porosity model : usporo() subroutine called every time step?
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Re: porosity model : usporo() subroutine called every time s
Hi jtache,
for what is my experience i worked on porosity values importing their value also in cs_user_extra_operations, such subroutine is loaded at the end of each time step, and thus i'm able to have a changing porosity value
for what is my experience i worked on porosity values importing their value also in cs_user_extra_operations, such subroutine is loaded at the end of each time step, and thus i'm able to have a changing porosity value
Re: porosity model : usporo() subroutine called every time s
Hi Pisolino,
This works perfectly! I didn't realize that I could call field_get_val_s(ipori, xxx) in cs_user_extra_operations...
Thanks a lot!
This works perfectly! I didn't realize that I could call field_get_val_s(ipori, xxx) in cs_user_extra_operations...
Thanks a lot!
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: porosity model : usporo() subroutine called every time s
Hello,
Yes, usporo is called before the time loop, not inside the loop as advertised.
I'll check with the other developers if we have any good reason for this. If not, we'll fix it for 5.0.
In the meantime, the solution suggested by Andrea should work fine.
Best regards,
Yvan
Yes, usporo is called before the time loop, not inside the loop as advertised.
I'll check with the other developers if we have any good reason for this. If not, we'll fix it for 5.0.
In the meantime, the solution suggested by Andrea should work fine.
Best regards,
Yvan