Source terms associated at the boundary faces and the neighboring cells with surface condensation.
This function fills the condensation source terms for each variable at the cell center associated to the boundary faces identifed in the mesh. The fluid exchange coefficient is computed with a empirical law to be imposed at the boundary face where the condensation phenomenon occurs.
This user function is called which allows the setting of the condensation source term.
This function fills the condensation source term array gamma_cond adding to the following equations:
The equation for mass conservation:
The equation for a variable :
discretized as below:
Remarks
is the value of associated to the injected condensation rate.
With 2 options are available:
the condensation rate is injected with the local value of variable in this case the variable is not modified.
the condensation rate is injected with a specific value for the specified value given by the user.
Usage
The three stages in the code where this User subroutine is called (with
iappel = 1, 2 and 3
)
iappel = 1
Calculation of the number of cells where a mass source term is imposed: ncesmp Called once at the beginning of the calculation
iappel = 2
Identification of the cells where a mass source term is imposed: array icesmp(ncesmp) Called once at the beginning of the calculation
iappel = 3
Calculation of the values of the mass source term Called at each time step
specific variables to define with is user subroutine
ifbpcd(ieltcd): identification of the faces where a condensation source term is imposed.
itypcd(ieltcd,ivar): type of treatment for variable ivar in the ieltcd cell with condensation source term.
itypcd = 0 – * injection of ivar at local value
itypcd = 1 – * injection of ivar at user specified value.
spcond(ielscd,ipr): value of the injection condensation rate gamma_cond (kg/m3/s) in the ieltcd cell with condensation source term.
spcond(ieltcd,ivar): specified value for variable ivar associated to the injected condensation in the ieltcd cell with a condensation source term except for ivar=ipr.
Remarks
For each face where a condensation source terms is imposed ielscd in [1;nfbpcd]), ifbpcd(ielscd) is the global index number of the corresponding face (ifbpcd(ieltcd) in [1;ncel]).
if itypcd(ieltcd,ivar)=0, spcond(ielpcd,ivar) is not used.
if spcond(ieltcd,ipr)<0, mass is removed from the system, therefore Code_Saturna automatically considers f_i=f^(n+1), whatever the values of itypcd or smacel specified by the user
Examples of settings for boundary condensation mass source terms