mus_updateSrcVar_turbChanForce Subroutine

public subroutine mus_updateSrcVar_turbChanForce(fun, auxField, iLevel, varSys, phyConvFac, derVarPos)

Compute dynamic force term using auxField for turbulent channel force.

If wall model BC is applied than compute the friction velocity If wall model BC is not used than compute the friction velocity from the single sided finite difference's and perform the spatial averaging. Friction velocity is computed only on elements intersected by shape_utau defined in musubi.lua. Bulk mean velocity part of forcing is independent whether a wall


class(mus_source_op_type), intent(inout) :: fun

Description of method to update source

real(kind=rk), intent(in) :: auxField(:)

input auxField array on current level

integer, intent(in) :: iLevel

current level

type(tem_varSys_type), intent(in) :: varSys

variable system definition

type(mus_convertFac_type), intent(in) :: phyConvFac

Physics conversion factor on current level

type(mus_derVarPos_type), intent(in) :: derVarPos(:)

position of derived quantities in varsys


proc~~mus_updatesrcvar_turbchanforce~~CallsGraph proc~mus_updatesrcvar_turbchanforce mus_updateSrcVar_turbChanForce map2global_utau map2global_utau proc~mus_updatesrcvar_turbchanforce->map2global_utau graddatatot graddatatot proc~mus_updatesrcvar_turbchanforce->graddatatot map2global_umean map2global_umean proc~mus_updatesrcvar_turbchanforce->map2global_umean auxfieldtot auxfieldtot proc~mus_updatesrcvar_turbchanforce->auxfieldtot proc~tem_levelof tem_LevelOf proc~mus_updatesrcvar_turbchanforce->proc~tem_levelof mpi_allreduce mpi_allreduce proc~mus_updatesrcvar_turbchanforce->mpi_allreduce levelpointer levelpointer proc~mus_updatesrcvar_turbchanforce->levelpointer visckinetot visckinetot proc~mus_updatesrcvar_turbchanforce->visckinetot



integer, private :: vel_pos(3)
integer, private :: iElem
integer, private :: nElemsGlobal_uTau
integer, private :: posInTotal
integer, private :: elemOff
type(mus_varSys_data_type), private, pointer:: fPtr
integer, private :: iErr
integer, private :: iBC
integer, private :: iLvlLoc
real(kind=rk), private :: vel_bulk
real(kind=rk), private :: vel_tau
real(kind=rk), private :: avgVelBulk
real(kind=rk), private :: avgVelTau
real(kind=rk), private :: avgVel(2)
real(kind=rk), private :: avgVelGlobal(2)
real(kind=rk), private :: forceDyn
real(kind=rk), private :: gradU(3,3,1)
logical, private :: velTauFromBnd