leapDiffOp Module

Module of differentional operators that apply on Eulerian objects


Uses

  • module~~leapdiffop~~UsesGraph module~leapdiffop leapDiffOp module~leapbc leapBC module~leapdiffop->module~leapbc module~leapblock leapBlock module~leapdiffop->module~leapblock module~leapeulerian leapEulerian module~leapdiffop->module~leapeulerian module~leapkinds leapKinds module~leapdiffop->module~leapkinds module~leapparallel leapParallel module~leapdiffop->module~leapparallel module~leapbc->module~leapblock module~leapbc->module~leapeulerian module~leapbc->module~leapkinds module~leapbc->module~leapparallel module~leaputils leapUtils module~leapbc->module~leaputils mpi_f08 mpi_f08 module~leapbc->mpi_f08 module~leapblock->module~leapkinds module~leapblock->module~leapparallel module~leapblock->mpi_f08 module~leapeulerian->module~leapblock module~leapeulerian->module~leapkinds module~leapeulerian->module~leapparallel module~leapio leapIO module~leapeulerian->module~leapio module~leapio_mpi leapIO_mpi module~leapeulerian->module~leapio_mpi module~leapparser leapParser module~leapeulerian->module~leapparser module~leapeulerian->module~leaputils module~leapeulerian->mpi_f08 iso_fortran_env iso_fortran_env module~leapkinds->iso_fortran_env module~leapparallel->module~leapkinds module~leapparallel->module~leapparser module~leapparallel->mpi_f08 module~leapio->module~leapio_mpi module~leapio_h5hut leapIO_h5hut module~leapio->module~leapio_h5hut module~leapio_hdf5 leapIO_hdf5 module~leapio->module~leapio_hdf5 module~leapio_silo leapIO_silo module~leapio->module~leapio_silo module~leapio_mpi->module~leapblock module~leapio_mpi->module~leapkinds module~leapio_mpi->module~leapparallel module~leapio_mpi->mpi_f08 module~leapparser->module~leapkinds module~leapcli leapCli module~leapparser->module~leapcli module~leaputils->module~leapkinds module~leaputils->mpi_f08 module~leapcli->module~leapkinds module~leapio_h5hut->module~leapkinds module~leapio_h5hut->module~leapparallel h5hut h5hut module~leapio_h5hut->h5hut module~leapio_hdf5->module~leapkinds module~leapio_hdf5->module~leapparallel module~leapio_hdf5->module~leaputils hdf5 hdf5 module~leapio_hdf5->hdf5 module~leapio_silo->module~leapblock module~leapio_silo->module~leapkinds module~leapio_silo->module~leapparallel module~leapio_silo->module~leaputils module~leapio_silo->mpi_f08

Used by

  • module~~leapdiffop~~UsedByGraph module~leapdiffop leapDiffOp module~cdifs cdifs module~cdifs->module~leapdiffop module~particles_resolved particles_resolved module~cdifs->module~particles_resolved module~immersed_boundaries immersed_boundaries module~cdifs->module~immersed_boundaries module~immersed_boundaries_markers immersed_boundaries_markers module~immersed_boundaries_markers->module~leapdiffop module~particles_resolved->module~leapdiffop module~particles_resolved->module~immersed_boundaries proc~grans_obj_preparesolver_operators grans_obj_PrepareSolver_operators proc~grans_obj_preparesolver_operators->module~leapdiffop proc~marker_set_computesolidvolfrac marker_set%marker_set_ComputeSolidVolFrac proc~marker_set_computesolidvolfrac->module~leapdiffop module~cdifs_advancesolution_smod cdifs_AdvanceSolution_smod module~cdifs_advancesolution_smod->module~cdifs module~cdifs_monitor_smod cdifs_Monitor_smod module~cdifs_monitor_smod->module~cdifs module~cdifs_preparesolver_smod cdifs_PrepareSolver_smod module~cdifs_preparesolver_smod->module~cdifs module~cdifs_writeoutputdata_smod cdifs_WriteOutputData_smod module~cdifs_writeoutputdata_smod->module~cdifs module~cdifs_writerestartdata_smod cdifs_WriteRestartData_smod module~cdifs_writerestartdata_smod->module~cdifs module~grans grans module~grans->module~particles_resolved module~grans_cases grans_cases module~grans->module~grans_cases module~grans->module~immersed_boundaries module~grans_cases->module~particles_resolved module~grans_cases->module~immersed_boundaries module~immersed_boundaries->module~immersed_boundaries_markers module~immersed_boundaries_solids immersed_boundaries_solids module~immersed_boundaries->module~immersed_boundaries_solids module~immersed_boundaries_solids->module~immersed_boundaries_markers proc~add_markers add_markers proc~add_markers->module~particles_resolved proc~add_markers->module~immersed_boundaries proc~add_markers~2 add_markers proc~add_markers~2->module~particles_resolved proc~add_markers~2->module~immersed_boundaries proc~cdifs_rebound_respart cdifs_rebound_ResPart proc~cdifs_rebound_respart->module~particles_resolved proc~cdifs_settling_sphere_respart cdifs_settling_sphere_ResPart proc~cdifs_settling_sphere_respart->module~particles_resolved program~main main program~main->module~cdifs program~main->module~grans module~grans_advancesolution_smod grans_AdvanceSolution_smod module~grans_advancesolution_smod->module~grans module~grans_module_smod grans_module_smod module~grans_module_smod->module~grans module~grans_preparesolver_smod grans_PrepareSolver_smod module~grans_preparesolver_smod->module~grans module~grans_writeoutputdata_smod grans_WriteOutputData_smod module~grans_writeoutputdata_smod->module~grans module~grans_writerestartdata_smod grans_WriteRestartData_smod module~grans_writerestartdata_smod->module~grans module~headon_collision_smod headon_collision_smod module~headon_collision_smod->module~grans_cases module~homogeneous_cooling_smod homogeneous_cooling_smod module~homogeneous_cooling_smod->module~grans_cases module~rotating_drum_smod rotating_drum_smod module~rotating_drum_smod->module~grans_cases proc~cdifs_cylinder_ib cdifs_cylinder_IB proc~cdifs_cylinder_ib->module~immersed_boundaries proc~cdifs_rebound_ib cdifs_rebound_IB proc~cdifs_rebound_ib->module~immersed_boundaries proc~cdifs_settling_sphere_ib cdifs_settling_sphere_IB proc~cdifs_settling_sphere_ib->module~immersed_boundaries

Derived Types

type, public ::  op_obj

Utitlity with differential operators

Components

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 Boundary conditions

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

type(eulerian_obj_i), public :: mask
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
integer, private :: scheme_order = 2

Type-Bound Procedures

procedure, public :: ApplyLaplacianDC => op_obj_ApplyLaplacianDC
procedure, public :: BuildLaplacian => op_obj_BuildLaplacian
procedure, public :: Finalize => op_obj_Final
procedure, public :: Initialize => op_obj_Init
procedure, public :: StrainRate => op_obj_StrainRate
procedure, public :: conv11 => op_obj_conv11
procedure, public :: conv12 => op_obj_conv12
procedure, public :: conv13 => op_obj_conv13
procedure, public :: conv21 => op_obj_conv21
procedure, public :: conv22 => op_obj_conv22
procedure, public :: conv23 => op_obj_conv23
procedure, public :: conv31 => op_obj_conv31
procedure, public :: conv32 => op_obj_conv32
procedure, public :: conv33 => op_obj_conv33
procedure, public :: d1dx1 => op_obj_d1dx1
procedure, public :: d1dx2 => op_obj_d1dx2
procedure, public :: d1dx3 => op_obj_d1dx3
procedure, public :: div => op_obj_div
procedure, public :: grad_x => op_obj_grad_x
procedure, public :: grad_y => op_obj_grad_y
procedure, public :: grad_z => op_obj_grad_z
procedure, public :: gradx => op_obj_gradx
procedure, public :: grady => op_obj_grady
procedure, public :: gradz => op_obj_gradz
procedure, public :: intrp1 => op_obj_intrp1
procedure, public :: intrp2 => op_obj_intrp2
procedure, public :: intrp3 => op_obj_intrp3
procedure, public :: p_div => op_obj_p_div

Functions

private function op_obj_StrainRate(this, U, V, W) result(S)

Compute 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) )

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: 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

Return Value type(eulerian_obj_r), (6)

Result

private function op_obj_conv11(this, in1, in2) result(out)

Compute d(U1 U1)/dx1

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in1

Convecting velocity: Ui

type(eulerian_obj_r), intent(in) :: in2

Velocity Uj

Return Value type(eulerian_obj_r)

Result

private function op_obj_conv12(this, in1, in2) result(out)

Compute d(U1 U2)/dx1

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in1

Convecting velocity: Ui

type(eulerian_obj_r), intent(in) :: in2

Velocity Uj

Return Value type(eulerian_obj_r)

Result

private function op_obj_conv13(this, in1, in2) result(out)

Compute d(U1 U1)/dx1

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in1

Convecting velocity: Ui

type(eulerian_obj_r), intent(in) :: in2

Velocity Uj

Return Value type(eulerian_obj_r)

Result

private function op_obj_conv21(this, in1, in2) result(out)

Compute d(U2 U1)/dx2

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in1

Convecting velocity: Ui

type(eulerian_obj_r), intent(in) :: in2

Velocity Uj

Return Value type(eulerian_obj_r)

Result

private function op_obj_conv22(this, in1, in2) result(out)

Compute d(U2 U2)/dx2

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in1

Convecting velocity: Ui

type(eulerian_obj_r), intent(in) :: in2

Velocity Uj

Return Value type(eulerian_obj_r)

Result

private function op_obj_conv23(this, in1, in2) result(out)

Compute d(U2 U1)/dx2

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in1

Convecting velocity: Ui

type(eulerian_obj_r), intent(in) :: in2

Velocity Uj

Return Value type(eulerian_obj_r)

Result

private function op_obj_conv31(this, in1, in2) result(out)

Compute d(U3 U1)/dx1

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in1

Convecting velocity: Ui

type(eulerian_obj_r), intent(in) :: in2

Velocity Uj

Return Value type(eulerian_obj_r)

Result

private function op_obj_conv32(this, in1, in2) result(out)

Compute d(U3 U1)/dx1

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in1

Convecting velocity: Ui

type(eulerian_obj_r), intent(in) :: in2

Velocity Uj

Return Value type(eulerian_obj_r)

Result

private function op_obj_conv33(this, in1, in2) result(out)

Compute d(U3 U1)/dx1

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in1

Convecting velocity: Ui

type(eulerian_obj_r), intent(in) :: in2

Velocity Uj

Return Value type(eulerian_obj_r)

Result

private function op_obj_d1dx1(this, in) result(out)

Compute 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).

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in

Field to differentiate

Return Value type(eulerian_obj_r)

Result

private function op_obj_d1dx2(this, in) result(out)

Compute 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).

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in

Field to differentiate

Return Value type(eulerian_obj_r)

Result

private function op_obj_d1dx3(this, in) result(out)

Compute 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).

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in

Field to differentiate

Return Value type(eulerian_obj_r)

Result

private function op_obj_div(this, name, in1, in2, in3) result(out)

Compute 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)

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: 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

Return Value type(eulerian_obj_r)

Result

private function op_obj_grad_x(this, in) result(out)

Compute the derivative in the x-direction (dir=1)

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in

Field to differentiate

Return Value type(eulerian_obj_r)

Result

private function op_obj_grad_y(this, in) result(out)

Compute the derivative in the y-direction (dir=2)

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in

Field to differentiate

Return Value type(eulerian_obj_r)

Result

private function op_obj_grad_z(this, in) result(out)

Compute the derivative in the z-direction (dir=3)

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in

Field to differentiate

Return Value type(eulerian_obj_r)

Result

private function op_obj_gradx(this, name, in) result(out)

Compute the derivative in the x-direction (dir=1)

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

character(len=*), intent(in) :: name

Name to give this variable

type(eulerian_obj_r), intent(in) :: in

Field to differentiate

Return Value type(eulerian_obj_r)

Result

private function op_obj_grady(this, name, in) result(out)

Compute the derivative in the z-direction (dir=2)

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

character(len=*), intent(in) :: name

Name to give this variable

type(eulerian_obj_r), intent(in) :: in

Field to differentiate

Return Value type(eulerian_obj_r)

Result

private function op_obj_gradz(this, name, in) result(out)

Compute the derivative in the z-direction (dir=3)

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

character(len=*), intent(in) :: name

Name to give this variable

type(eulerian_obj_r), intent(in) :: in

Field to differentiate

Return Value type(eulerian_obj_r)

Result

private function op_obj_intrp1(this, in) result(out)

Interpolate 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).

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in

Field to interpolate

Return Value type(eulerian_obj_r)

Result

private function op_obj_intrp2(this, in) result(out)

Interpolate 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).

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in

Field to interpolate

Return Value type(eulerian_obj_r)

Result

private function op_obj_intrp3(this, in) result(out)

Interpolate 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).

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(in) :: in

Field to interpolate

Return Value type(eulerian_obj_r)

Result

private function op_obj_p_div(this, in1, in2, in3) result(out)

Compute the divergence of a vector (in1,in2,in3) This function takes in1,in2,in3 face-centered (stag=1/2/3) and returns the divergence on cell centers (stag=0)

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

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

Return Value type(eulerian_obj_r)

Result


Subroutines

private subroutine op_obj_ApplyLaplacianDC(this, rhs, bcs, varname)

Apply Dirichlet boundary conditions to the RHS of a Laplacian equation

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

type(eulerian_obj_r), intent(inout) :: rhs
type(bc_set), intent(inout) :: bcs
character(len=*), intent(in) :: varname

private subroutine op_obj_BuildLaplacian(this, mat, stm)

Build Laplacian operator using Morinishi's schemes

Arguments

Type IntentOptional 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

private subroutine op_obj_Final(this)

Clear data

Arguments

Type IntentOptional Attributes Name
class(op_obj), intent(inout) :: this

Differential operators utility

private subroutine op_obj_Init(this, block, parallel, Order)

Arguments

Type IntentOptional 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 from main program

integer, intent(in), optional :: Order

Order of interpolation/differentiation schemes