Hello,
I'm simulating a internal standard steam flow and I would like to implement the oxydation of the tube inner wall: the steam consummation and the oxyde generation, which remains at the wall. But I am stuck.
How can I define a new variable at the wall (like wall_temperature or Y_plus, for example) ?
And where should I implement the equations governing the exchange between the wall and the fluid?
fyi: I'm using version 3.3
Creating new variable at the wall
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Creating new variable at the wall
Hello,
I recommend using the cs_user_modules.f90 user file, in which you may add anything you like/need.
The examples in the file are minimalist, and are not called automatically. I recommend calling an initialization at the end of another user subroutine, such as usipsu (in cs_user_parameters.f90).
You can easily define a new "field" similar to wall_temperature or y_plus in such an initialization.
Check src/base/fldini.f90, near lines 234 or 322 (in version 3.3) for examples of such boundary fields.
As for the equations, there are many options. For example, do you plan to handle them using source terms, or boundary conditions ?
I'll let others help you on this, as I won't have web access next week.
Regards,
Yvan
I recommend using the cs_user_modules.f90 user file, in which you may add anything you like/need.
The examples in the file are minimalist, and are not called automatically. I recommend calling an initialization at the end of another user subroutine, such as usipsu (in cs_user_parameters.f90).
You can easily define a new "field" similar to wall_temperature or y_plus in such an initialization.
Check src/base/fldini.f90, near lines 234 or 322 (in version 3.3) for examples of such boundary fields.
As for the equations, there are many options. For example, do you plan to handle them using source terms, or boundary conditions ?
I'll let others help you on this, as I won't have web access next week.
Regards,
Yvan
Re: Creating new variable at the wall
Hello Yvan,
Thanks a lot for your explanation. I'm gonna try to handle the equations using source terms.
Best regards,
Leandro
Thanks a lot for your explanation. I'm gonna try to handle the equations using source terms.
Best regards,
Leandro
Re: Creating new variable at the wall
Hello again,
Following Yvan's recommendations I've created a new field (defined at the wall) and it works well. Now I'm trying to implement the equations as source terms in the source-terms.f90 file... Since the subroutines found in this file are dedicated to N-S terms, scalars and turbulence models, when I try something like "ivar = ID_of_my_new_field" it doesn't work.
Should I create a new subroutine which may consider this new field?
And how could it work defining source terms for an equation that's not even defined anywhere?
Regards,
Leandro
Following Yvan's recommendations I've created a new field (defined at the wall) and it works well. Now I'm trying to implement the equations as source terms in the source-terms.f90 file... Since the subroutines found in this file are dedicated to N-S terms, scalars and turbulence models, when I try something like "ivar = ID_of_my_new_field" it doesn't work.
Should I create a new subroutine which may consider this new field?
And how could it work defining source terms for an equation that's not even defined anywhere?
Regards,
Leandro