SetDiffusion_ESAtmo3D_t Subroutine

public subroutine SetDiffusion_ESAtmo3D_t(this, nu, kappa, eta_penalty)

Set the constant-coefficient Laplacian diffusion coefficients (kinematic momentum diffusivity and thermal diffusivity, both in m^2/s) and the dimensionless SIPG jump penalty. Setting nu or kappa > 0 enables the gradient pipeline so that the diffusive flux methods receive solutionGradient.

length_scale is computed from the volume Jacobian: for a hex reference cell [-1,1]^3 with volume 8, the physical element volume is 8 so the characteristic edge length is 2^(1/3). The smallest length over the mesh is conservative.

Arguments

TypeIntentOptionalAttributesName
class(ESAtmo3D_t), intent(inout) :: this
real(kind=prec), intent(in) :: nu
real(kind=prec), intent(in) :: kappa
real(kind=prec), intent(in), optional :: eta_penalty

Contents


Source Code

  subroutine SetDiffusion_ESAtmo3D_t(this,nu,kappa,eta_penalty)
    !! Set the constant-coefficient Laplacian diffusion coefficients
    !! (kinematic momentum diffusivity and thermal diffusivity, both
    !! in m^2/s) and the dimensionless SIPG jump penalty. Setting nu
    !! or kappa > 0 enables the gradient pipeline so that the diffusive
    !! flux methods receive solutionGradient.
    !!
    !! length_scale is computed from the volume Jacobian: for a hex
    !! reference cell [-1,1]^3 with volume 8, the physical element
    !! volume is 8*<J> so the characteristic edge length is
    !! 2*<J>^(1/3). The smallest length over the mesh is conservative.
    implicit none
    class(ESAtmo3D_t),intent(inout) :: this
    real(prec),intent(in) :: nu
    real(prec),intent(in) :: kappa
    real(prec),intent(in),optional :: eta_penalty
    ! Local
    real(prec) :: jmin

    this%nu = nu
    this%kappa = kappa
    if(present(eta_penalty)) this%eta_penalty = eta_penalty
    if(nu > 0.0_prec .or. kappa > 0.0_prec) then
      this%gradient_enabled = .true.
    endif

    jmin = minval(this%geometry%J%interior)
    this%length_scale = 2.0_prec*jmin**(1.0_prec/3.0_prec)

  endsubroutine SetDiffusion_ESAtmo3D_t