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.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | private | :: | phi | = | 1.0 | ||
real(kind=wp), | private | :: | kappa | = | 1./3. | ||
integer, | private | :: | switch_L | = | 1 | Limiter switch |
Pressure based switching. User x,y, or z for I,J,or K face respectively
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Subroutine to calculate state at the face, generalized for all direction : I,J, and K.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Implement MUSCL scheme to get left and right states at each face. The computation is done through all cells and first level ghost cells
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |