Allocate memory to laminar gradients if flow is viscous and allocate memory to tubulence gradients base upon the model being used
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | n_grad | = | 4 | Number of variable to store gradient for |
|
real(kind=wp), | public, | dimension(:, :, :, :), allocatable, target | :: | gradqp_x | Store gradient of n_grad variables with respect to direction x |
||
real(kind=wp), | public, | dimension(:, :, :, :), allocatable, target | :: | gradqp_y | Store gradient of n_grad variables with respect to direction y |
||
real(kind=wp), | public, | dimension(:, :, :, :), allocatable, target | :: | gradqp_z | Store gradient of n_grad variables with respect to direction z |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradu_x | Gradient of variable U with respect to direction x |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradu_y | Gradient of variable U with respect to direction y |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradu_z | Gradient of variable U with respect to direction z |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradv_x | Gradient of variable V with respect to direction x |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradv_y | Gradient of variable V with respect to direction y |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradv_z | Gradient of variable V with respect to direction z |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradw_x | Gradient of variable W with respect to direction x |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradw_y | Gradient of variable W with respect to direction y |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradw_z | Gradient of variable W with respect to direction z |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradT_x | Gradient of variable Temperature with respect to direction x |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradT_y | Gradient of variable Temperature with respect to direction y |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradT_z | Gradient of variable Temperature with respect to direction z |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtk_x | Gradient of variable turbulent kinetic energy with respect to direction x |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtk_y | Gradient of variable turbulent kinetic energy with respect to direction y |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtk_z | Gradient of variable turbulent kinetic energy with respect to direction z |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtw_x | Gradient of variable dissipation rate with respect to direction x |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtw_y | Gradient of variable dissipation rate with respect to direction y |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtw_z | Gradient of variable dissipation rate with respect to direction z |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtkl_x | Gradient of variable kL with respect to direction x |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtkl_y | Gradient of variable kL with respect to direction y |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtkl_z | Gradient of variable kL with respect to direction z |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradte_x | Gradient of variable turbulent energy dissiaption with respect to direction x |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradte_y | Gradient of variable turbulent energy dissiaption with respect to direction y |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradte_z | Gradient of variable turbulent energy dissiaption with respect to direction z |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtv_x | Gradient of variable turbulenct visocity(SA mode) with respect to direction x |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtv_y | Gradient of variable turbulenct visocity(SA mode) with respect to direction y |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtv_z | Gradient of variable turbulenct visocity(SA mode) with respect to direction z |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtgm_x | Gradient of variable intermittency with respect to direction x |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtgm_y | Gradient of variable intermittency with respect to direction y |
||
real(kind=wp), | public, | dimension(:, :, :), pointer | :: | gradtgm_z | Gradient of variable intermittency with respect to direction z |
||
real(kind=wp), | public | :: | R_gas | ||||
integer, | public | :: | imx | ||||
integer, | public | :: | jmx | ||||
integer, | public | :: | kmx | ||||
integer, | public | :: | n_var |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | imin | ||||
integer, | public | :: | imax | ||||
integer, | public | :: | il | ||||
integer, | public | :: | iu | ||||
integer, | public | :: | jmin | ||||
integer, | public | :: | jmax | ||||
integer, | public | :: | jl | ||||
integer, | public | :: | ju | ||||
integer, | public | :: | kmin | ||||
integer, | public | :: | kmax | ||||
integer, | public | :: | kl | ||||
integer, | public | :: | ku | ||||
integer, | public | :: | sig | = | 1 |
Memoery allocation to the gradient variables and setup pointer to the slice to the main gradient variable based on the various models being used.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Set number of variables for which gradient is required based on the being used
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(schemetype), | intent(in) | :: | scheme | finite-volume Schemes |
Call to all the required gradients and apply boundary condition for ghost cell gradients
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), Target | :: | qp | Store primitive variable at cell center |
|
real(kind=wp), | intent(in), | dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2) | :: | Temp | Store Temperature variable at 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(boundarytype), | intent(in) | :: | bc | boundary conditions and fixed values |
||
type(extent), | intent(in) | :: | dims | Extent of the domain:imx,jmx,kmx |
Compute gradient of any input scalar
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(out), | dimension( 0:dims%imx , 0:dims%jmx , 0:dims%kmx ) | :: | grad | Output variable storing the graident of var |
|
real(kind=wp), | intent(in), | dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2) | :: | var | Input variable of which graident is required |
|
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 | |||
character(len=*), | intent(in) | :: | dir | Direction with respect to which gradients are calculated |
Call same subroutine for all the face Apply/set value of all gradient in the ghost cells gradqp_G = (qp_I - qp_G)Area_Wunit_normal_G/(volume_G) volume_G = volume_I
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 | Input variable of which graident is required |
|
real(kind=wp), | intent(in), | dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2) | :: | Temp | Intput Temperature variable |
|
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(boundarytype), | intent(in) | :: | bc | |||
type(extent), | intent(in) | :: | dims | Extent of the domain:imx,jmx,kmx |
Call same subroutine for all the face Apply/set value of all gradient in the ghost cells gradqp_G = (qp_I - qp_G)Area_Wunit_normal_G/(volume_G) volume_G = volume_I
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 | Input variable of which graident is required |
|
real(kind=wp), | intent(in), | dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2) | :: | Temp | Intput Temperature variable |
|
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) | :: | faces | Input varaible which stores any(I,J,K) faces' area and unit normal |
|
type(extent), | intent(in) | :: | dims | Extent of the domain:imx,jmx,kmx |
||
type(singlesub), | intent(in) | :: | domain | flags for direction |
||
integer, | intent(in) | :: | bc_id | |||
real(kind=wp), | intent(in) | :: | fixed_temp |