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.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | n_var | ||||
integer, | private | :: | imx | ||||
integer, | private | :: | jmx | ||||
integer, | private | :: | kmx |
Return the free stream speed of sound.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flowtype), | intent(in) | :: | flow | Information about fluid flow: freestream-speed, ref-viscosity,etc. |
output variable: speed of sound
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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Set the values of the infinity variables "qp_inf"
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Initialize the state based on the infinity values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Set number of variable to solver for based on the tubulence and transition model being used
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(controltype), | intent(inout) | :: | control | Control parameters |
||
type(schemetype), | intent(in) | :: | scheme | finite-volume Schemes |