The usvosy subroutine is used to compute a volume exchange coefficient for SYRTHES coupling.
Examples
The following code blocks show two examples of computation of a volume exchange coefficient.
Arguments of usvosy
integer ncecpl
integer iscal , inbcou
integer lcecpl(ncecpl)
double precision dt(ncelet)
double precision hvol(ncecpl)
Variable declaration
integer iiscvr, iel, iloc, ifcvsl
double precision nu, re, pr
double precision hcorr, hvol_cst, lambda_over_cp
double precision, dimension(:), pointer :: cpro_rom
double precision, dimension(:,:), pointer :: cvar_vel
double precision, dimension(:), pointer :: cpro_viscl, cpro_viscls, cpro_cp
Initialization
The values of the different fields that will be needed for the computation of the volume exchange coefficient are retrieved.
call field_get_val_v(ivarfl(iu), cvar_vel)
call field_get_val_s(icrom, cpro_rom)
call field_get_val_s(iviscl, cpro_viscl)
if (icp.ge.0) call field_get_val_s(icp, cpro_cp)
call field_get_key_int (ivarfl(isca(iscal)), kivisl, ifcvsl)
if (ifcvsl.ge.0) then
call field_get_val_s(ifcvsl, cpro_viscls)
else
cpro_viscls => null()
endif
Example 1
The first example corresponds to a constant volume exchange coefficient.
hvol_cst = 1.0d6
do iloc = 1, ncecpl
hvol(iloc) = hvol_cst
enddo
Example 2
The second example corresponds to a variable volume exchange coefficient defined as follows :
with S is the surface area where exchanges take place by unit of volume and
sexcvo = 36.18d0
l = 0.03d0
do iloc = 1, ncecpl
iel = lcecpl(iloc)
if (icp.ge.0) then
else
endif
if (ifcvsl.ge.0) then
if (iscacp(iscal).eq.1) then
else
lambda_over_cp = cpro_viscls(iel)
endif
else
if (iscacp(iscal).eq.1) then
else
lambda_over_cp = visls0(iscal)
endif
endif
uloc = sqrt(cvar_vel(1,iel)**2 + cvar_vel(2,iel)**2 + cvar_vel(3,iel)**2)
re = max(uloc*
rho*l/
mu, 1.d0)
nu = 0.023d0 * re**0.8d0 * pr**(1.d0/3.d0)
hvol(iloc) = hcorr * sexcvo
enddo