Utitlity that manages interpolations and differential operators
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public, | allocatable | :: | alpha(:) |
Morinishi's coeff for high-order schemes |
||
| type(block_obj), | public, | pointer | :: | block | => | null() |
Parent block structure |
| real(kind=wp), | public, | allocatable | :: | c_d1dx1(:,:) |
Differentiate x1-centered data in x1-dir, result is at x1m |
||
| real(kind=wp), | public, | allocatable | :: | c_d1dx1m(:,:) |
Differentiate x1m-centered data in x1-dir, result is at x1 |
||
| real(kind=wp), | public, | allocatable | :: | c_d1dx2(:,:) |
Differentiate x2-centered data in x2-dir, result is at x2m |
||
| real(kind=wp), | public, | allocatable | :: | c_d1dx2m(:,:) |
Differentiate x2m-centered data in x2-dir, result is at x2 |
||
| real(kind=wp), | public, | allocatable | :: | c_d1dx3(:,:) |
Differentiate x3-centered data in x3-dir, result is at x3m |
||
| real(kind=wp), | public, | allocatable | :: | c_d1dx3m(:,:) |
Differentiate x3m-centered data in x3-dir, result is at x3 |
||
| real(kind=wp), | public, | allocatable | :: | c_intrp1(:,:) |
Interpolate from x1 to x1m |
||
| real(kind=wp), | public, | allocatable | :: | c_intrp1m(:,:) |
Interpolate from x1m to x1 |
||
| real(kind=wp), | public, | allocatable | :: | c_intrp2(:,:) |
Interpolate from x2 to x2m |
||
| real(kind=wp), | public, | allocatable | :: | c_intrp2m(:,:) |
Interpolate from x2m to x2 |
||
| real(kind=wp), | public, | allocatable | :: | c_intrp3(:,:) |
Interpolate from x3 to x3m |
||
| real(kind=wp), | public, | allocatable | :: | c_intrp3m(:,:) |
Interpolate from x3m to x3 |
||
| real(kind=wp), | public, | allocatable | :: | morinishi_ddx(:,:) |
Morinishi's differntiations |
||
| real(kind=wp), | public, | allocatable | :: | morinishi_int(:,:) |
Morinishi's interpolations |
||
| type(parallel_obj), | public, | pointer | :: | parallel | => | null() |
Parent parallel structure |
| integer, | public | :: | st | = | 1 |
Stencil size |
|
| integer, | private | :: | scheme_order | = | 2 |
Operator order (supports up to 6th order) |
Applies Dirichlet boundary conditions to the RHS of a Laplacian equation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(inout) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(inout) | :: | rhs |
Right hand side |
||
| type(bc_set), | intent(inout) | :: | bcs |
Boundary conditions utility |
||
| character(len=*), | intent(in) | :: | varname |
Variable name |
Builds Laplacian operator using Morinishi's schemes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(inout) | :: | this |
Differential operators utility |
||
| real(kind=wp), | intent(out), | allocatable | :: | mat(:,:,:,:,:) |
Matrix that stores the laplacian operator |
|
| integer, | intent(out) | :: | stm |
Stencil extent |
Finalizes object and frees memory.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(inout) | :: | this |
Differential operators utility |
Initializes object. The operator order can be specified by the optional parameter. Otherwise, the object initializes 2nd order operators by default.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(inout) | :: | this |
Differential operators utility |
||
| type(block_obj), | intent(in), | target | :: | block |
A block object |
|
| type(parallel_obj), | intent(in), | target | :: | parallel |
Parallel structure to link with |
|
| integer, | intent(in), | optional | :: | Order |
Order of interpolation/differentiation schemes |
Computes the strain rate tensor from the velocity field. Result is on mid points (staggering=0). Tensor is stored as follows: S = 0.5*( grad(u) + grad(u)^T ) ( S(1) S(4) S(6) ) = ( S(4) S(2) S(5) ) ( S(6) S(5) S(3) )
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | U |
Fluid velocity field in 1-dir |
||
| type(eulerian_obj_r), | intent(in) | :: | V |
Fluid velocity field in 2-dir |
||
| type(eulerian_obj_r), | intent(in) | :: | W |
Fluid velocity field in 3-dir |
Result
Computes d(U1 U1)/dx1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in1 |
Convecting velocity: Ui |
||
| type(eulerian_obj_r), | intent(in) | :: | in2 |
Velocity Uj |
Result
Computes d(U1 U2)/dx1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in1 |
Convecting velocity: Ui |
||
| type(eulerian_obj_r), | intent(in) | :: | in2 |
Velocity Uj |
Result
Computes d(U1 U1)/dx1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in1 |
Convecting velocity: Ui |
||
| type(eulerian_obj_r), | intent(in) | :: | in2 |
Velocity Uj |
Result
Computes d(U2 U1)/dx2.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in1 |
Convecting velocity: Ui |
||
| type(eulerian_obj_r), | intent(in) | :: | in2 |
Velocity Uj |
Result
Computes d(U2 U2)/dx2.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in1 |
Convecting velocity: Ui |
||
| type(eulerian_obj_r), | intent(in) | :: | in2 |
Velocity Uj |
Result
Computes d(U2 U1)/dx2.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in1 |
Convecting velocity: Ui |
||
| type(eulerian_obj_r), | intent(in) | :: | in2 |
Velocity Uj |
Result
Computes d(U3 U1)/dx1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in1 |
Convecting velocity: Ui |
||
| type(eulerian_obj_r), | intent(in) | :: | in2 |
Velocity Uj |
Result
Computes d(U3 U1)/dx1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in1 |
Convecting velocity: Ui |
||
| type(eulerian_obj_r), | intent(in) | :: | in2 |
Velocity Uj |
Result
Computes d(U3 U1)/dx1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in1 |
Convecting velocity: Ui |
||
| type(eulerian_obj_r), | intent(in) | :: | in2 |
Velocity Uj |
Result
Computes the derivative in the x1-direction. Note: If input is face-centered (on x1), result is cell-centered (on x1m). If input is cell-centered (on x1m), result is face-centered (on x1).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in |
Field to differentiate |
Result
Computes the derivative in the x2-direction. Note: If input is face-centered (on x2), result is cell-centered (on x2m). If input is cell-centered (on x2m), result is face-centered (on x2).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in |
Field to differentiate |
Result
Computes the derivative in the x3-direction. Note: If input is face-centered (on x3), result is cell-centered (on x3m). If input is cell-centered (on x3m), result is face-centered (on x3).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in |
Field to differentiate |
Result
Computes the divergence of a vector (in1,in2,in3). This function takes in1,in2,in3 cell-centered (stag=0) and returns the divergence on cell centers (stag=0)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| character(len=*), | intent(in) | :: | name |
Name to give this variable |
||
| type(eulerian_obj_r), | intent(in) | :: | in1 |
Component in 1-dir |
||
| type(eulerian_obj_r), | intent(in) | :: | in2 |
Component in 2-dir |
||
| type(eulerian_obj_r), | intent(in) | :: | in3 |
Component in 3-dir |
Result
Interpolates in the x1-direction. Note: If input is face-centered (on x1), result is cell-centered (on x1m). If input is cell-centered (on x1m), result is face-centered (on x1).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in |
Field to interpolate |
Result
Interpolates in the x2-direction. Note: If input is face-centered (on x2), result is cell-centered (on x2m). If input is cell-centered (on x2m), result is face-centered (on x2).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in |
Field to interpolate |
Result
Interpolates in the x3-direction. Note: If input is face-centered (on x3), result is cell-centered (on x3m). If input is cell-centered (on x3m), result is face-centered (on x3).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in |
Field to interpolate |
Result
type :: op_obj !> Utitlity that manages interpolations and differential operators type(parallel_obj), pointer :: parallel => null() !! Parent parallel structure type(block_obj), pointer :: block => null() !! Parent block structure integer, private :: scheme_order = 2 !! Operator order (supports up to 6th order) integer :: st = 1 !! Stencil size real(wp), allocatable :: morinishi_int(:,:) !! Morinishi's interpolations real(wp), allocatable :: morinishi_ddx(:,:) !! Morinishi's differntiations real(wp), allocatable :: alpha(:) !! Morinishi's coeff for high-order schemes real(wp), allocatable :: c_intrp1m(:,:) !! Interpolate from x1m to x1 real(wp), allocatable :: c_intrp2m(:,:) !! Interpolate from x2m to x2 real(wp), allocatable :: c_intrp3m(:,:) !! Interpolate from x3m to x3 real(wp), allocatable :: c_intrp1 (:,:) !! Interpolate from x1 to x1m real(wp), allocatable :: c_intrp2 (:,:) !! Interpolate from x2 to x2m real(wp), allocatable :: c_intrp3 (:,:) !! Interpolate from x3 to x3m real(wp), allocatable :: c_d1dx1m(:,:) !! Differentiate x1m-centered data in x1-dir, result is at x1 real(wp), allocatable :: c_d1dx2m(:,:) !! Differentiate x2m-centered data in x2-dir, result is at x2 real(wp), allocatable :: c_d1dx3m(:,:) !! Differentiate x3m-centered data in x3-dir, result is at x3 real(wp), allocatable :: c_d1dx1 (:,:) !! Differentiate x1-centered data in x1-dir, result is at x1m real(wp), allocatable :: c_d1dx2 (:,:) !! Differentiate x2-centered data in x2-dir, result is at x2m real(wp), allocatable :: c_d1dx3 (:,:) !! Differentiate x3-centered data in x3-dir, result is at x3m contains procedure :: Initialize => op_obj_Init procedure :: Finalize => op_obj_Final procedure :: BuildLaplacian => op_obj_BuildLaplacian procedure :: ApplyLaplacianDC => op_obj_ApplyLaplacianDC procedure :: StrainRate => op_obj_StrainRate procedure :: div => op_obj_div ! Interpolations: procedure :: intrp1 => op_obj_intrp1 procedure :: intrp2 => op_obj_intrp2 procedure :: intrp3 => op_obj_intrp3 ! Differentiation: d(phi)/dx_i procedure :: d1dx1 => op_obj_d1dx1 procedure :: d1dx2 => op_obj_d1dx2 procedure :: d1dx3 => op_obj_d1dx3 ! Convective operator: div(Ui Uj) procedure :: conv11 => op_obj_conv11 procedure :: conv21 => op_obj_conv21 procedure :: conv31 => op_obj_conv31 procedure :: conv12 => op_obj_conv12 procedure :: conv22 => op_obj_conv22 procedure :: conv32 => op_obj_conv32 procedure :: conv13 => op_obj_conv13 procedure :: conv23 => op_obj_conv23 procedure :: conv33 => op_obj_conv33 end type op_obj