Hello,
I have a question about the post-processing in Code_Saturne version 3.0 beta.
I’d like to know how to get a gradient component of a vector (ex. du/dz; dv/dz) and of a scalar (ex. dT/dz) in "cs_user_postprocess_var.f90".
Please give me some detailed information, not only the name of the subroutine such as "getcel". THX.
Regards,
how to get a gradient component
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: how to get a gradient component
Hello,
For a scalar gradient example, you can look in cs_user_extra_operations-energy_balance.f90 example (in the SRC/EXAMPLES subdirectory of a case, or the src/user_examples directory of the source tree). The function which is called is grdcel, and its arguments define both the input values arrays, algorithm options, boundary conditions arrays, and output arrays. The meaning of each argument is defined in the src/alge/cs_gradient.h file, in case you need clearer definitions, and in any case, when studying the example, look at the 10 lines before and 15 lines after the call to grdcel.
There is also another example in cs_user_physical_properties.
For a vector gradient, depending on whether you are using coupled velocity components (ivelco = 0, the previous default, or ivelco = 1, the default since version 2.3), the answer is different:
Regards,
Yvan
For a scalar gradient example, you can look in cs_user_extra_operations-energy_balance.f90 example (in the SRC/EXAMPLES subdirectory of a case, or the src/user_examples directory of the source tree). The function which is called is grdcel, and its arguments define both the input values arrays, algorithm options, boundary conditions arrays, and output arrays. The meaning of each argument is defined in the src/alge/cs_gradient.h file, in case you need clearer definitions, and in any case, when studying the example, look at the 10 lines before and 15 lines after the call to grdcel.
There is also another example in cs_user_physical_properties.
For a vector gradient, depending on whether you are using coupled velocity components (ivelco = 0, the previous default, or ivelco = 1, the default since version 2.3), the answer is different:
- in all cases, you may use grdvni (which calls grdcel in succesion for each component, but adds some special handling in case of perioridicty of rotation);
with coupled velocity components, use of grdvec is more consistent regarding the handling of boundary conditions, but it requires an interleaved boundary conditions vector.
Regards,
Yvan