muscl Module

Reference:Hirsch, C., Numerical computation of internal and external flows: The fundamentals of computational fluid dynamics, Elsevier, 2007

MUSCL (Monotone Upwing Schemes for Scalar Conservation Laws is a scheme which replaces the piecewise constant approximation by reconstructing the states at the left and right side of each face. This is a one parameter upwind scheme which results in at most 3rd order accuracy.


Uses

  • module~~muscl~~UsesGraph module~muscl muscl module~vartypes vartypes module~muscl->module~vartypes iso_fortran_env iso_fortran_env module~vartypes->iso_fortran_env

Used by

  • module~~muscl~~UsedByGraph module~muscl muscl module~face_interpolant face_interpolant module~face_interpolant->module~muscl module~boundary_state_reconstruction boundary_state_reconstruction module~boundary_state_reconstruction->module~face_interpolant module~time time module~time->module~face_interpolant module~ausmp ausmP module~ausmp->module~face_interpolant module~scheme scheme module~scheme->module~face_interpolant module~scheme->module~ausmp module~update update module~update->module~face_interpolant module~update->module~boundary_state_reconstruction module~update->module~time module~update->module~scheme module~solver solver module~solver->module~time module~solver->module~scheme module~solver->module~update program~main main program~main->module~solver

Contents


Variables

TypeVisibility AttributesNameInitial
real(kind=wp), private :: phi =1.0
real(kind=wp), private :: kappa =1./3.
integer, private :: switch_L =1

Limiter switch


Subroutines

private subroutine pressure_based_switching(qp, f_qp_left, f_qp_right, pdif, flags, flow, dims)

Pressure based switching. User x,y, or z for I,J,or K face respectively

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2, 1:dims%n_var):: qp

Store primitive variable at cell center

real(kind=wp), intent(inout), dimension(1-flags(1):dims%imx-1+2*flags(1), 1-flags(2):dims%jmx-1+2*flags(2), 1-flags(3):dims%kmx-1+2*flags(3), 1:dims%n_var):: f_qp_left

primitive variable at cell faces

real(kind=wp), intent(inout), dimension(1-flags(1):dims%imx-1+2*flags(1), 1-flags(2):dims%jmx-1+2*flags(2), 1-flags(3):dims%kmx-1+2*flags(3), 1:dims%n_var):: f_qp_right

primitive variable at cell faces

real(kind=wp), intent(inout), dimension(0:dims%imx,0:dims%jmx,0:dims%kmx):: pdif

pressure difference

integer, intent(in), dimension(3):: flags

flags for direction switch

type(flowtype), intent(in) :: flow

Information about fluid flow: freestream-speed, ref-viscosity,etc.

type(extent), intent(in) :: dims

Extent of the domain:imx,jmx,kmx

private subroutine compute_face_state(qp, f_qp_left, f_qp_right, flags, lam_switch, turb_switch, dims)

Subroutine to calculate state at the face, generalized for all direction : I,J, and K.

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2, 1:dims%n_var):: qp

Store primitive variable at cell center

real(kind=wp), intent(inout), dimension(1-flags(1):dims%imx-1+2*flags(1), 1-flags(2):dims%jmx-1+2*flags(2), 1-flags(3):dims%kmx-1+2*flags(3), 1:dims%n_var):: f_qp_left

primitive variable at cell faces

real(kind=wp), intent(inout), dimension(1-flags(1):dims%imx-1+2*flags(1), 1-flags(2):dims%jmx-1+2*flags(2), 1-flags(3):dims%kmx-1+2*flags(3), 1:dims%n_var):: f_qp_right

primitive variable at cell faces

integer, intent(in), dimension(3):: flags

Flags for direction switch

integer, intent(in) :: lam_switch

Limiter switch for laminar variables

integer, intent(in) :: turb_switch

Limiter switch for turbulent variables

type(extent), intent(in) :: dims

Extent of the domain:imx,jmx,kmx

public subroutine compute_muscl_states(qp, x_qp_l, x_qp_r, y_qp_l, y_qp_r, z_qp_l, z_qp_r, pdif, scheme, flow, dims)

Implement MUSCL scheme to get left and right states at each face. The computation is done through all cells and first level ghost cells

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2, 1:dims%n_var):: qp

Store primitive variable at cell center

real(kind=wp), intent(inout), dimension(0:dims%imx+1,1:dims%jmx-1,1:dims%kmx-1,1:dims%n_var):: x_qp_l

Store primitive state at the I-face

real(kind=wp), intent(inout), dimension(0:dims%imx+1,1:dims%jmx-1,1:dims%kmx-1,1:dims%n_var):: x_qp_r

Store primitive state at the I-face

real(kind=wp), intent(inout), dimension(1:dims%imx-1,0:dims%jmx+1,1:dims%kmx-1,1:dims%n_var):: y_qp_l

Store primitive state at the J-face

real(kind=wp), intent(inout), dimension(1:dims%imx-1,0:dims%jmx+1,1:dims%kmx-1,1:dims%n_var):: y_qp_r

Store primitive state at the J-face

real(kind=wp), intent(inout), dimension(1:dims%imx-1,1:dims%jmx-1,0:dims%kmx+1,1:dims%n_var):: z_qp_l

Store primitive state at the K-face

real(kind=wp), intent(inout), dimension(1:dims%imx-1,1:dims%jmx-1,0:dims%kmx+1,1:dims%n_var):: z_qp_r

Store primitive state at the K-face

real(kind=wp), intent(inout), dimension(0:dims%imx,0:dims%jmx,0:dims%kmx):: pdif

pressure difference

type(schemetype), intent(in) :: scheme

finite-volume Schemes

type(flowtype), intent(in) :: flow

Information about fluid flow: freestream-speed, ref-viscosity,etc.

type(extent), intent(in) :: dims

Extent of the domain:imx,jmx,kmx