![]() |
programmer's documentation
|
Definition of physical variable laws. More...
Functions/Subroutines | |
subroutine | usphyv (nvar, nscal, mbrom, dt) |
subroutine | uselph |
subroutine | usvist (nvar, nscal, ncepdp, ncesmp, icepdc, icetsm, itypsm, dt, ckupdc, smacel) |
usvist More... | |
subroutine | ussmag |
subroutine | usvima (nvar, nscal, dt, viscmx, viscmy, viscmz) |
usvima More... | |
subroutine | usatph |
usatph More... | |
Definition of physical variable laws.
usphyv Definition of physical variable laws.
It is forbidden to modify turbulent viscosity visct
here (a specific subroutine is dedicated to that: usvist)
viscls
.ro0
)viscl0
)Warning: if the scalar is the temperature, cpro_vscalt corresponds to its conductivity (Lambda) in W/(m K)
The types of boundary faces at the previous time step are available (except at the first time step, where arrays itypfb
and itrifb
have not been initialized yet)
It is recommended to keep only the minimum necessary in this file (i.e. remove all unused example code)
Cells may be identified using the getcel subroutine. The syntax of this subroutine is described in the cs_user_boundary_conditions subroutine, but a more thorough description can be found in the user guide.
subroutine usatph | ( | ) |
usatph
User subroutine dedicated to modifie physical properties of the atmospheric module
This subroutine is called at beginning of each time step at the end of atphyv.
subroutine uselph | ( | ) |
subroutine usphyv | ( | integer | nvar, |
integer | nscal, | ||
integer | mbrom, | ||
double precision, dimension(ncelet) | dt | ||
) |
[in] | nvar | total number of variables |
[in] | nscal | total number of scalars |
[in] | mbrom | indicator of filling of romb array |
[in] | dt | time step (per cell) |
subroutine ussmag | ( | ) |
subroutine usvima | ( | integer | nvar, |
integer | nscal, | ||
double precision, dimension(ncelet) | dt, | ||
double precision, dimension(ncelet) | viscmx, | ||
double precision, dimension(ncelet) | viscmy, | ||
double precision, dimension(ncelet) | viscmz | ||
) |
usvima
User subroutine dedicated the use of ALE (Arbitrary Lagrangian Eulerian Method): fills mesh viscosity arrays.
This subroutine is called at the beginning of each time step.
Here one can modify mesh viscosity value to prevent cells and nodes from huge displacements in awkward areas, such as boundary layer for example.
IF variable IORTVM = 0, mesh viscosity modeling is isotropic therefore VISCMX array only needs to be filled. IF variable IORTVM = 1, mesh viscosity modeling is orthotropic therefore all arrays VISCMX, VISCMY and VISCMZ need to be filled.
Note that VISCMX, VISCMY and VISCMZ arrays are initialized at the first time step to the value of 1.
Cells may be identified using the getcel subroutine. The syntax of this subroutine is described in the cs_user_boundary_conditions subroutine, but a more thorough description can be found in the user guide.
[in] | nvar | total number of variables |
[in] | nscal | total number of scalars |
[in] | dt | time step (per cell) |
[out] | viscmx | mesh viscosity in X direction |
[out] | viscmy | mesh viscosity in Y direction |
[out] | viscmz | mesh viscosity in Z direction |
subroutine usvist | ( | integer | nvar, |
integer | nscal, | ||
integer | ncepdp, | ||
integer | ncesmp, | ||
integer, dimension(ncepdp) | icepdc, | ||
integer, dimension(ncesmp) | icetsm, | ||
integer, dimension(ncesmp,nvar) | itypsm, | ||
double precision, dimension(ncelet) | dt, | ||
double precision, dimension(ncepdp,6) | ckupdc, | ||
double precision, dimension(ncesmp,nvar) | smacel | ||
) |
usvist
Modify turbulent viscosity
This subroutine is called at beginning of each time step after the computation of the turbulent viscosity (physical quantities have already been computed in usphyv).
Turbulent viscosity (kg/(m s)) can be modified.
A modification of the turbulent viscosity can lead to very significant differences betwwen solutions and even give wrong results.
This subroutine is therefore reserved to expert users.
[in] | nvar | total number of variables |
[in] | nscal | total number of scalars |
[in] | ncepdp | number of cells with head loss |
[in] | ncesmp | number of cells with mass source term |
[in] | icepdc | head loss cell numbering |
[in] | icetsm | numbering of cells with mass source term |
[in] | itypsm | kind of mass source for each variable (cf. Examples of data settings for mass source terms (cs_user_mass_source_terms.f90)) |
[in] | dt | time step (per cell) |
[in] | ckupdc | work array for head loss terms |
[in] | smacel | values of variables related to mass source term. If ivar=ipr, smacel=mass flux |