8.1
general documentation
cs_user_physical_properties.f90 File Reference

Definition of physical variable laws. More...

Functions/Subroutines

subroutine usphyv (nvar, nscal, mbrom, dt)
 Definition of physical variable laws. More...
 

Detailed Description

Definition of physical variable laws.

See of 1-D thermal conduction Equation for examples.

Function/Subroutine Documentation

◆ usphyv()

subroutine usphyv ( integer  nvar,
integer  nscal,
integer  mbrom,
double precision, dimension(ncelet)  dt 
)

Definition of physical variable laws.

Warning

It is forbidden to modify turbulent viscosity visct here (a specific subroutine is dedicated to that: cs_user_physical_properties_turb_viscosity)

  • icp = 0 must have been specified in usipsu if we wish to define a variable specific heat cpro_cp (otherwise: memory overwrite).
  • the kivisl field integer key (diffusivity_id) must have been specified in usipsu if we wish to define a variable viscosity viscls.
Remarks
  • This routine is called at the beginning of each time step Thus, AT THE FIRST TIME STEP (non-restart case), the only values initialized before this call are those defined
  • We may define here variation laws for cell properties, for:
    • density: rom kg/m3
    • density at boundary faces: romb kg/m3)
    • molecular viscosity: cpro_viscl kg/(m s)
    • specific heat: cpro_cp J/(kg degrees)
    • diffusivities associated with scalars: cpro_vscalt kg/(m s)

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 identification

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.

Parameters
[in]nvartotal number of variables
[in]nscaltotal number of scalars
[in]mbromindicator of filling of romb array
[in]dttime step (per cell)