state Module

Allocate memory to the state variables and initialize them The state of the system is defined using the density, velocity and pressure (primitive variables qp), and trubulent and transition variables at the cell-center points.


Uses

  • module~~state~~UsesGraph module~state state module~utils utils module~state->module~utils module~check_output_control check_output_control module~state->module~check_output_control module~read_output read_output module~state->module~read_output module~vartypes vartypes module~state->module~vartypes module~check_output_control->module~vartypes module~read_output->module~utils module~read_output->module~check_output_control module~read_output->module~vartypes module~read_output_vtk read_output_vtk module~read_output->module~read_output_vtk module~read_output_tec read_output_tec module~read_output->module~read_output_tec iso_fortran_env iso_fortran_env module~vartypes->iso_fortran_env module~read_output_vtk->module~utils module~read_output_vtk->module~vartypes module~read_output_tec->module~utils module~read_output_tec->module~vartypes

Used by

  • module~~state~~UsedByGraph module~state state module~solver solver module~solver->module~state program~main main program~main->module~solver

Contents


Variables

TypeVisibility AttributesNameInitial
integer, private :: n_var
integer, private :: imx
integer, private :: jmx
integer, private :: kmx

Functions

private function sound_speed_inf(flow) result(a)

Return the free stream speed of sound.

Arguments

Type IntentOptional AttributesName
type(flowtype), intent(in) :: flow

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

Return Value real(kind=wp)

output variable: speed of sound


Subroutines

public subroutine setup_state(files, qp, control, scheme, flow, dims)

Setup the state module. This subroutine should be run before the state variables are initilized. This subroutine allocates the memory for state variables and sets up the aliases to refer to the components of the state

Arguments

Type IntentOptional AttributesName
type(filetype), intent(inout) :: files

Files' name and handler

real(kind=wp), intent(inout), dimension(:,:,:,:), allocatable, target:: qp

Store primitive variable at cell center

type(controltype), intent(inout) :: control

Control parameters

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

finite-volume Schemes

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

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

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

Extent of the domain:imx,jmx,kmx

private subroutine init_infinity_values(scheme, flow)

Set the values of the infinity variables "qp_inf"

Arguments

Type IntentOptional AttributesName
type(schemetype), intent(in) :: scheme

finite-volume Schemes: turbulence, transition model, etc

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

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

private subroutine initstate(files, qp, control, scheme, flow, dims)

Initialize the state. If load file(start_from) is 0, then the state should be set to the infinity values. Otherwise, read the state_file to get the state values

Arguments

Type IntentOptional AttributesName
type(filetype), intent(inout) :: files

Files' name and handler

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

Store primitive variable at cell center

type(controltype), intent(inout) :: 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

private subroutine init_state_with_infinity_values(qp, scheme, flow, dims)

Initialize the state based on the infinity values

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), target:: qp

Store primitive variable at cell center

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

private subroutine set_n_var_value(control, scheme)

Set number of variable to solver for based on the tubulence and transition model being used

Arguments

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

Control parameters

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

finite-volume Schemes