cdifs Module

Constant Density Incompressible Flow Solver. Available Features: + HYPRE solvers for the pressure-Poisson equation + Immersed Boundaries + Resolved Particles x Lagrangian point-particles (to-do)



Uses

  • module~~cdifs~~UsesGraph module~cdifs cdifs module~cdifs_cases cdifs_cases module~cdifs->module~cdifs_cases module~immersed_boundaries immersed_boundaries module~cdifs->module~immersed_boundaries module~leapbc leapBC module~cdifs->module~leapbc module~leapblock leapBlock module~cdifs->module~leapblock module~leapdiffop leapDiffOp module~cdifs->module~leapdiffop module~leapeulerian leapEulerian module~cdifs->module~leapeulerian module~leaphypre leapHypre module~cdifs->module~leaphypre module~leapkinds leapKinds module~cdifs->module~leapkinds module~leapmonitor leapMonitor module~cdifs->module~leapmonitor module~leapparallel leapParallel module~cdifs->module~leapparallel module~leapparser leapParser module~cdifs->module~leapparser module~leapsolver leapSolver module~cdifs->module~leapsolver module~leaptimer leapTimer module~cdifs->module~leaptimer module~particles_resolved particles_resolved module~cdifs->module~particles_resolved module~cdifs_cases->module~leapeulerian module~cdifs_cases->module~leapkinds module~leapcases leapCases module~cdifs_cases->module~leapcases module~immersed_boundaries_markers immersed_boundaries_markers module~immersed_boundaries->module~immersed_boundaries_markers module~immersed_boundaries_solids immersed_boundaries_solids module~immersed_boundaries->module~immersed_boundaries_solids 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~leapdiffop->module~leapbc module~leapdiffop->module~leapblock module~leapdiffop->module~leapeulerian module~leapdiffop->module~leapkinds module~leapdiffop->module~leapparallel module~leapeulerian->module~leapblock module~leapeulerian->module~leapkinds module~leapeulerian->module~leapparallel module~leapeulerian->module~leapparser module~leapio leapIO module~leapeulerian->module~leapio module~leapio_mpi leapIO_mpi module~leapeulerian->module~leapio_mpi module~leapeulerian->module~leaputils module~leapeulerian->mpi_f08 module~leaphypre->module~leapblock module~leaphypre->module~leapeulerian module~leaphypre->module~leapkinds module~leaphypre->module~leapparallel iso_c_binding iso_c_binding module~leaphypre->iso_c_binding module~leaphypre->mpi_f08 iso_fortran_env iso_fortran_env module~leapkinds->iso_fortran_env module~leapmonitor->module~leapkinds module~leapmonitor->module~leapparallel module~leapmonitor->module~leaputils module~leapparallel->module~leapkinds module~leapparallel->module~leapparser module~leapparallel->mpi_f08 module~leapparser->module~leapkinds module~leapcli leapCli module~leapparser->module~leapcli module~leapsolver->module~leapkinds module~leapsolver->module~leapparallel module~leapsolver->module~leapparser module~leapsolver->module~leaptimer module~leaptimer->module~leapkinds module~leaptimer->module~leapparser module~particles_resolved->module~immersed_boundaries module~particles_resolved->module~leapblock module~particles_resolved->module~leapdiffop module~particles_resolved->module~leapeulerian module~particles_resolved->module~leapkinds module~particles_resolved->module~leapmonitor module~particles_resolved->module~leapparallel module~particles_resolved->module~leapparser module~particles_resolved->module~leaptimer module~particles_resolved->module~leapio module~leaplagrangian leapLagrangian module~particles_resolved->module~leaplagrangian module~immersed_boundaries_markers->module~leapblock module~immersed_boundaries_markers->module~leapdiffop module~immersed_boundaries_markers->module~leapeulerian module~immersed_boundaries_markers->module~leaphypre module~immersed_boundaries_markers->module~leapkinds module~immersed_boundaries_markers->module~leapmonitor module~immersed_boundaries_markers->module~leapparallel module~immersed_boundaries_markers->module~leapparser module~immersed_boundaries_markers->module~leaptimer module~immersed_boundaries_markers->module~leapio module~immersed_boundaries_markers->module~leaplagrangian module~immersed_boundaries_solids->module~leapblock module~immersed_boundaries_solids->module~leapeulerian module~immersed_boundaries_solids->module~leapkinds module~immersed_boundaries_solids->module~leapparallel module~immersed_boundaries_solids->module~immersed_boundaries_markers module~immersed_boundaries_solids->module~leapio module~immersed_boundaries_solids->module~leaplagrangian module~leapcases->module~leapblock module~leapcases->module~leapkinds module~leapcases->module~leapparallel module~leapcases->module~leapparser module~leapcli->module~leapkinds 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~leaplagrangian->module~leapblock module~leaplagrangian->module~leapkinds module~leaplagrangian->module~leapparallel module~leaplagrangian->module~leapparser module~leaplagrangian->module~leapio module~leaplagrangian->module~leaputils module~leaplagrangian->mpi_f08 module~leaputils->module~leapkinds module~leaputils->mpi_f08 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


Interfaces

interface

  • private module subroutine cdifs_obj_AdvanceSolution(this)

    Advances solution from n to n+1

    Arguments

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

    The solver

interface

  • private module subroutine cdifs_obj_Monitor(this)

    Analyze data and post to monitors

    Arguments

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

    The solver

interface

  • private module subroutine cdifs_obj_PrepareSolver(this)

    Prepare data before run

    Arguments

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

    The solver

interface

  • private module subroutine cdifs_obj_WriteOutputData(this)

    Process single-precision data for visualization

    Arguments

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

    The solver

interface

  • private module subroutine cdifs_obj_WriteRestartData(this)

    Write restart data to disk

    Arguments

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

    The solver


Derived Types

type, public, extends(solver_obj) ::  cdifs_obj

Constant Density Incompressible Flow Solver Simulation case

Components

Type Visibility Attributes Name Initial
real(kind=wp), public, allocatable :: DIV(:,:,:,:,:)

Divergence operator for velocity

type(marker_set), public :: IB

Immersed boundaries

real(kind=wp), public, allocatable :: LAP(:,:,:,:,:,:)

Viscous Laplacian for velocity Core fields

type(eulerian_obj_r), public :: P

Fluid pressure

type(ResPart_set), public :: RP

Resolved particles

type(eulerian_obj_r), public :: SA

Surface density function

type(eulerian_obj_r), public :: V(3)

Fluid velocity fields

type(eulerian_obj_r), public :: Vm(3)

Velocities at mid points Masks

type(eulerian_obj_r), public :: Vold(3)

Old fluid velocity (at n)

type(bc_set), public :: bcs

Boundary conditions

type(block_obj), public :: block

Block information Mathematical tools

type(cdifs_case_obj), public :: case

Case to run Geometry

type(eulerian_obj_r), public :: dP

Pressure correction Optional components

type(eulerian_obj_r), public :: divu

Divergence field

real(kind=wp), public :: edry

Dry restitution coefficient

type(eulerian_set), public :: fields

Eulerian data container

real(kind=wp), public :: gravity(3) = 0.0_wp

Gravity Solver parameters

type(hypre_obj), public :: hypre

HYPRE Solvers

type(eulerian_obj_r), public :: ibF(3)

Immersed boundary force

type(eulerian_obj_r), public :: ibN(3)

IB normals field Additional fields

type(eulerian_obj_r), public :: ibVF

Solid volume fraction

type(eulerian_obj_i), public :: maskV(3)

Output parmeters

integer, public :: maxitp = 1

Collision substeps

type(monitor_set), public :: monitors

Monitors to print to stdout and files at end of each time step

real(kind=wp), public :: muc

Coulomb friction coefficient

character(len=:), public, allocatable :: name

Name of this solver

type(op_obj), public :: op

Differential Operators

character(len=str8), public, allocatable :: output_var(:)

Names of variables to output Flow parameters

character(len=str8), public, allocatable :: outputs(:)

List of outputs (one output can contain multiple variables)

real(kind=wp), public, allocatable :: pGRAD(:,:,:,:,:)

Gradient operator for pressure

type(parallel_obj), public, pointer :: parallel => null()

Associated parallel structure

type(parser_obj), public, pointer :: parser => null()

Associated parser

type(monitor_set), public :: pmonitor

Monitor for the pressure-Poisson equation, prints at each substep

type(eulerian_obj_r), public :: resV(3)

Velocity residual

real(kind=wp), public :: rho = 1.0_wp

Fluid density

type(eulerian_obj_r), public :: rhs

Right-hand side

integer, public :: subit = 2

Solver sub-iteration Collision parameters

real(kind=wp), public :: tcol

Collision time

type(timer_obj), public, pointer :: timer => null()

Associated timer

logical, public :: use_IB = .false.

Use Immersed Boundaries

logical, public :: use_RP = .false.

Use Resolved Particles

logical, public :: use_col = .false.

Use collisions

real(kind=wp), public :: visc = 1.0_wp

Fluid viscosity

Type-Bound Procedures

procedure, public :: AdvanceSolution => cdifs_obj_AdvanceSolution
procedure, public :: Finalize => cdifs_obj_Final
procedure, public :: Initialize => cdifs_obj_Init
procedure, public :: Monitor => cdifs_obj_Monitor
procedure, public :: PrepareSolver => cdifs_obj_PrepareSolver
procedure, public :: SetInitialConditions => cdifs_obj_SetInitialConditions
procedure, public :: WriteOutputData => cdifs_obj_WriteOutputData
procedure, public :: WriteRestartData => cdifs_obj_WriteRestartData

Subroutines

private subroutine cdifs_obj_Final(this)

Arguments

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

The solver

private subroutine cdifs_obj_Init(this, timer, parallel, parser)

Initialize the solver

Arguments

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

The solver

type(timer_obj), intent(in), target :: timer

Timer utility

type(parallel_obj), intent(in), target :: parallel

Parallel machinery

type(parser_obj), intent(in), target :: parser

Parser for input file

private subroutine cdifs_obj_SetInitialConditions(this)

Set initial conditions at n=0

Arguments

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

The solver