lusgs Module

Reference: Sharov, D., Luo, H., Baum, J., and Loehner, R., “Implementation of unstructured grid GMRES+LU-SGS method on shared-memory, cache-based parallel computers,” 38th Aerospace Sciences Meeting and Exhibit, vol. 927, 2000, p. 2000.


Uses

  • module~~lusgs~~UsesGraph module~lusgs lusgs module~wall_dist wall_dist module~lusgs->module~wall_dist module~global_kkl global_kkl module~lusgs->module~global_kkl module~global_sst global_sst module~lusgs->module~global_sst module~viscosity viscosity module~lusgs->module~viscosity module~gradients gradients module~lusgs->module~gradients module~utils utils module~lusgs->module~utils module~vartypes vartypes module~lusgs->module~vartypes module~global_sa global_sa module~lusgs->module~global_sa module~wall_dist->module~utils module~wall_dist->module~vartypes iso_fortran_env iso_fortran_env module~global_kkl->iso_fortran_env module~global_sst->iso_fortran_env module~viscosity->module~wall_dist module~viscosity->module~global_kkl module~viscosity->module~global_sst module~viscosity->module~gradients module~viscosity->module~utils module~viscosity->module~vartypes module~viscosity->module~global_sa module~copy_bc copy_bc module~viscosity->module~copy_bc module~gradients->module~utils module~gradients->module~vartypes module~vartypes->iso_fortran_env module~global_sa->iso_fortran_env module~copy_bc->module~vartypes

Used by

  • module~~lusgs~~UsedByGraph module~lusgs lusgs module~update update module~update->module~lusgs module~solver solver module~solver->module~update program~main main program~main->module~solver

Contents


Variables

TypeVisibility AttributesNameInitial
real(kind=wp), public, dimension(:,:,:,:), allocatable:: delQ

change of state variable (solution) over one time-step

real(kind=wp), public, dimension(:,:,:,:), allocatable:: delQstar

Intermediate change of state variable over one time-step

real(kind=wp), public, dimension(:,:,:), allocatable, target:: dummy

dummy variable

real(kind=wp), public, dimension(:,:,:), pointer:: tmu

Pionter to turbulent viscosity

real(kind=wp), public, dimension(:,:,:), pointer:: mmu

Pointer to molecular viscosity

integer, public :: imx
integer, public :: jmx
integer, public :: kmx
integer, public :: n_var
real(kind=wp), public :: gm
real(kind=wp), public :: mu_ref
real(kind=wp), public :: Reynolds_number
real(kind=wp), public :: free_stream_tu
real(kind=wp), public :: tk_inf
real(kind=wp), public :: tkl_inf
real(kind=wp), public :: tPr
real(kind=wp), public :: Pr
real(kind=wp), public :: R_gas

Functions

public function Flux(ql, qr, du, inputs)

calculate the total flux through face for laminar flow.

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(1:n_var):: ql
real(kind=wp), intent(in), dimension(1:n_var):: qr
real(kind=wp), intent(in), dimension(1:n_var):: du
real(kind=wp), intent(in), dimension(1:7):: inputs

Return Value real(kind=wp), dimension(1:n_var)

public function SpectralRadius(ql, qr, inputs, c1, c2)

Calculate the spectral radius

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(1:n_var):: ql
real(kind=wp), intent(in), dimension(1:n_var):: qr
real(kind=wp), intent(in), dimension(1:7):: inputs
real(kind=wp), intent(in), dimension(1:3):: c1
real(kind=wp), intent(in), dimension(1:3):: c2

Return Value real(kind=wp)

public function SSTFlux(ql, qr, du, inputs)

calculate the total flux through face for turbulent flow (SST)

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(1:n_var):: ql
real(kind=wp), intent(in), dimension(1:n_var):: qr
real(kind=wp), intent(in), dimension(1:n_var):: du
real(kind=wp), intent(in), dimension(1:8):: inputs

Return Value real(kind=wp), dimension(1:n_var)

public function KKLFlux(ql, qr, du, inputs)

calculate the total flux through face for turbulent flow (k-kL)

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(1:n_var):: ql
real(kind=wp), intent(in), dimension(1:n_var):: qr
real(kind=wp), intent(in), dimension(1:n_var):: du
real(kind=wp), intent(in), dimension(1:7):: inputs

Return Value real(kind=wp), dimension(1:n_var)

public function SAFlux(ql, qr, du, inputs)

calculate the total flux through face for turbulent flow (SA)

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(1:n_var):: ql
real(kind=wp), intent(in), dimension(1:n_var):: qr
real(kind=wp), intent(in), dimension(1:n_var):: du
real(kind=wp), intent(in), dimension(1:7):: inputs

Return Value real(kind=wp), dimension(1:n_var)

public function lctm2015flux(ql, qr, du, inputs)

calculate the total flux through face for turbulent/transition flow (LCTM2015)

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(1:n_var):: ql
real(kind=wp), intent(in), dimension(1:n_var):: qr
real(kind=wp), intent(in), dimension(1:n_var):: du
real(kind=wp), intent(in), dimension(1:8):: inputs

Return Value real(kind=wp), dimension(1:n_var)


Subroutines

public subroutine setup_lusgs(control, scheme, flow, dims)

allocate array memory for data communication

Arguments

Type IntentOptional AttributesName
type(controltype), intent(in) :: control

Control parameters

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

public subroutine update_with_lusgs(qp, residue, delta_t, cells, Ifaces, Jfaces, Kfaces, scheme, dims)

Time-integrate with LU_SGS method

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(inout), 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(in), dimension(:, :, :, :):: residue

Store residue at each cell-center

real(kind=wp), intent(in), dimension(1:dims%imx-1, 1:dims%jmx-1, 1:dims%kmx-1):: delta_t

Local time increment value at each cell center

type(celltype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: cells

Input cell quantities: volume

type(facetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2):: Ifaces

Input varaible which stores I faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2):: Jfaces

Input varaible which stores J faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3):: Kfaces

Input varaible which stores K faces' area and unit normal

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

finite-volume Schemes

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

Extent of the domain:imx,jmx,kmx

public subroutine update_laminar_variables(qp, residue, delta_t, cells, Ifaces, Jfaces, Kfaces, dims)

Update laminar flow with LU-SGS scheme

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(inout), 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(in), dimension(:, :, :, :):: residue

Store residue at each cell-center

real(kind=wp), intent(in), dimension(1:dims%imx-1, 1:dims%jmx-1, 1:dims%kmx-1):: delta_t

Local time increment value at each cell center

type(celltype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: cells

Input cell quantities: volume

type(facetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2):: Ifaces

Input varaible which stores I faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2):: Jfaces

Input varaible which stores J faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3):: Kfaces

Input varaible which stores K faces' area and unit normal

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

Extent of the domain:imx,jmx,kmx

public subroutine update_SST_variables(qp, residue, delta_t, cells, Ifaces, Jfaces, Kfaces, dims)

Update the RANS (SST) equation with LU-SGS

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(inout), 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(in), dimension(:, :, :, :):: residue

Store residue at each cell-center

real(kind=wp), intent(in), dimension(1:dims%imx-1, 1:dims%jmx-1, 1:dims%kmx-1):: delta_t

Local time increment value at each cell center

type(celltype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: cells

Input cell quantities: volume

type(facetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2):: Ifaces

Input varaible which stores I faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2):: Jfaces

Input varaible which stores J faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3):: Kfaces

Input varaible which stores K faces' area and unit normal

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

Extent of the domain:imx,jmx,kmx

public subroutine update_KKL_variables(qp, residue, delta_t, cells, Ifaces, Jfaces, Kfaces, dims)

Update the RANS (k-kL) equation with LU-SGS

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(inout), 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(in), dimension(:, :, :, :):: residue

Store residue at each cell-center

real(kind=wp), intent(in), dimension(1:dims%imx-1, 1:dims%jmx-1, 1:dims%kmx-1):: delta_t

Local time increment value at each cell center

type(celltype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: cells

Input cell quantities: volume

type(facetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2):: Ifaces

Input varaible which stores I faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2):: Jfaces

Input varaible which stores J faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3):: Kfaces

Input varaible which stores K faces' area and unit normal

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

Extent of the domain:imx,jmx,kmx

public subroutine update_SA_variables(qp, residue, delta_t, cells, Ifaces, Jfaces, Kfaces, dims)

Update the RANS (SA) equation with LU-SGS

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(inout), 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(in), dimension(:, :, :, :):: residue

Store residue at each cell-center

real(kind=wp), intent(in), dimension(1:dims%imx-1, 1:dims%jmx-1, 1:dims%kmx-1):: delta_t

Local time increment value at each cell center

type(celltype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: cells

Input cell quantities: volume

type(facetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2):: Ifaces

Input varaible which stores I faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2):: Jfaces

Input varaible which stores J faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3):: Kfaces

Input varaible which stores K faces' area and unit normal

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

Extent of the domain:imx,jmx,kmx

public subroutine update_lctm2015(qp, residue, delta_t, cells, Ifaces, Jfaces, Kfaces, dims)

Update the RANS (LCTM2015 transition model with SST2003) equation with LU-SGS

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(inout), 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(in), dimension(:, :, :, :):: residue

Store residue at each cell-center

real(kind=wp), intent(in), dimension(1:dims%imx-1, 1:dims%jmx-1, 1:dims%kmx-1):: delta_t

Local time increment value at each cell center

type(celltype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: cells

Input cell quantities: volume

type(facetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2):: Ifaces

Input varaible which stores I faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2):: Jfaces

Input varaible which stores J faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3):: Kfaces

Input varaible which stores K faces' area and unit normal

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

Extent of the domain:imx,jmx,kmx