SetDiffusion_ESAtmo2D_t Subroutine

public subroutine SetDiffusion_ESAtmo2D_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 area Jacobian: for a quad reference cell [-1,1]^2 with area 4, the physical element area is 4 so the characteristic edge length is 2^(1/2). The smallest length over the mesh is conservative.

Arguments

TypeIntentOptionalAttributesName
class(ESAtmo2D_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_ESAtmo2D_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 area Jacobian: for a quad
    !! reference cell [-1,1]^2 with area 4, the physical element area
    !! is 4*<J> so the characteristic edge length is 2*<J>^(1/2).
    !! The smallest length over the mesh is conservative.
    implicit none
    class(ESAtmo2D_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*sqrt(jmin)

  endsubroutine SetDiffusion_ESAtmo2D_t