In order to calculate pressure gradient in the transition model, two quantities are required: the distance of the cell-center from the wall andn the normal made by the distance vector field (from wall to cell-center). This module calucate both with gradient of V.n also.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | public, | dimension(:, :, :), allocatable | :: | CCnormalX | Cell-Center normal nx with respect to wall; used for transition model (pressure gradient calcualtion) |
||
real(kind=wp), | public, | dimension(:, :, :), allocatable | :: | CCnormalY | Cell-Center normal ny with respect to wall; used for transiton model (pressure gradient calculation) |
||
real(kind=wp), | public, | dimension(:, :, :), allocatable | :: | CCnormalZ | Cell-Center normal nz with respect to wall; used for transiton model (pressure gradient calculation) |
||
real(kind=wp), | private, | dimension(:, :, :), allocatable | :: | CCVn | Store value at Cell-Center of dot product between velocity vector and cell-center normal. {vec(Velocity).normal} |
||
real(kind=wp), | public, | dimension(:, :, :), allocatable | :: | DCCVnX | Store Derivative of Cell-Center CCVn with respect to x |
||
real(kind=wp), | public, | dimension(:, :, :), allocatable | :: | DCCVnY | Store Derivative of Cell-Center CCVn with respect to y |
||
real(kind=wp), | public, | dimension(:, :, :), allocatable | :: | DCCVnZ | Store Derivative of Cell-Center CCVn with respect to z |
Allocate memory for the cell center variable only in case of transition model
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(schemetype), | intent(in) | :: | scheme | |||
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 |
Find the cell-center unit normal
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Taking a dot product between Cell-center velocity and unit normal
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(-2:dims%imx,-2:dims%jmx,-2:dims%kmx,-2:dims%n_var) | :: | qp | ||
type(extent), | intent(in) | :: | dims |
Find gradient of the dot product between cell velocity and unit normal
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(-2:dims%imx,-2:dims%jmx,-2:dims%kmx,-2:dims%n_var) | :: | qp | ||
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 |
Generalized subroutine to calculate gradients
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(out), | dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2) | :: | grad | ||
real(kind=wp), | intent(in), | dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2) | :: | var | ||
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 |
|
character(len=*), | intent(in) | :: | dir | |||
type(extent), | intent(in) | :: | dims |