Constant Density Incompressible Flow Solver
| 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 |
||
| type(eulerian_obj_r), | public | :: | P |
Fluid pressure |
|||
| type(ResPart_set), | public | :: | RP |
Resolved particles |
|||
| type(eulerian_obj_r), | public | :: | V(3) |
Fluid velocity fields |
|||
| type(hypre_obj), | public | :: | VFSolver |
HYPRE Solver for the volume-fraction equation |
|||
| type(eulerian_obj_r), | public | :: | Vm(3) |
Velocities at mid points |
|||
| 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 |
|||
| class(bodyforce_obj), | public, | allocatable | :: | bodyforce |
Bodyforce |
||
| type(collision_obj), | public | :: | collisions |
Utility that handles collisions |
|||
| type(eulerian_obj_r), | public | :: | dP |
Pressure correction |
|||
| type(eulerian_obj_r), | public | :: | divu |
Divergence field |
|||
| type(eulerian_set), | public | :: | fields |
Eulerian data container |
|||
| real(kind=wp), | public | :: | gravity(3) | = | 0.0_wp |
Gravity |
|
| type(hdf5_obj), | public, | pointer | :: | hdf5 | => | null() |
Associated hdf5 object |
| type(hypre_obj), | public | :: | hypre |
HYPRE Solver for the pressure-Poisson equation |
|||
| type(eulerian_obj_r), | public | :: | ibF(3) |
Immersed boundary force |
|||
| type(eulerian_obj_r), | public | :: | ibN(3) |
IB normals field |
|||
| type(eulerian_obj_r), | public | :: | ibS |
Surface density function |
|||
| type(eulerian_obj_r), | public | :: | ibVF |
Solid volume fraction |
|||
| type(eulerian_obj_i), | public | :: | maskV(3) |
Velocity field masks |
|||
| integer, | public | :: | maxitp | = | 1 |
Collision substeps |
|
| type(monitor_set), | public | :: | monitors |
Monitors to print to stdout and files at end of each time step |
|||
| character(len=:), | public, | allocatable | :: | name |
Solver's name. |
||
| type(op_obj), | public | :: | op |
Differential Operators |
|||
| character(len=str8), | public, | allocatable | :: | output_var(:) |
Names of variables to output |
||
| 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 |
|||
| logical, | public | :: | singularVF | = | .false. |
Flag for singular volume fraction Poisson equation |
|
| type(eulerian_obj_r), | public | :: | srcV(3) |
Momentum source |
|||
| integer, | public | :: | subit | = | 2 |
Solver sub-iteration |
|
| 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 |
Advances solution from n to n+1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
Computes the solid volume fraction (ibVF) by solving a Poisson equation. This subroutine computes the IB normals fields, applies approriate boundary conditions, and takes the divergence, which forms the right-hand side of the poisson equation. It then uses a HYPRE solver to solve this equation. In case where the Poisson operator is singular and using resolved particles, this subroutine will apply a correction that sets the solid volume fraction at particle centroids.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
Finalizes solver and frees memory.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
Initializes the CDIFS solver.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS 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 |
Links HDF5 Object.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
||
| type(hdf5_obj), | intent(in), | target | :: | hdf5 |
HDF5 utility |
Analyzes data and posts to monitors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
Prepares data for run.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
Processes and outputs single-precision data for visualization.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
Writes restart data to disk.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
type, extends(solver_obj):: cdifs_obj !> Constant Density Incompressible Flow Solver type(block_obj) :: block !! Block information type(op_obj) :: op !! Differential Operators type(bc_set) :: bcs !! Boundary conditions type(hypre_obj) :: hypre !! HYPRE Solver for the pressure-Poisson equation type(hypre_obj) :: VFSolver !! HYPRE Solver for the volume-fraction equation real(wp), allocatable :: pGRAD(:,:,:,:,:) !! Gradient operator for pressure real(wp), allocatable :: DIV(:,:,:,:,:) !! Divergence operator for velocity real(wp), allocatable :: LAP(:,:,:,:,:,:) !! Viscous Laplacian for velocity type(Eulerian_set) :: fields !! Eulerian data container type(Eulerian_obj_r) :: V(3) !! Fluid velocity fields type(Eulerian_obj_r) :: P !! Fluid pressure type(Eulerian_obj_r) :: dP !! Pressure correction logical :: use_RP = .false. !! Use Resolved Particles logical :: use_IB = .false. !! Use Immersed Boundaries type(ResPart_set) :: RP !! Resolved particles type(marker_set) :: IB !! Immersed boundaries type(Eulerian_obj_r) :: ibS !! Surface density function type(Eulerian_obj_r) :: ibVF !! Solid volume fraction type(Eulerian_obj_r) :: ibF(3) !! Immersed boundary force type(Eulerian_obj_r) :: ibN(3) !! IB normals field logical :: singularVF = .false. !! Flag for singular volume fraction Poisson equation type(Eulerian_obj_r) :: Vold(3) !! Old fluid velocity (at n) type(Eulerian_obj_r) :: resV(3) !! Velocity residual type(Eulerian_obj_r) :: rhs !! Right-hand side type(Eulerian_obj_r) :: divu !! Divergence field type(Eulerian_obj_r) :: Vm(3) !! Velocities at mid points class(bodyforce_obj), allocatable :: bodyforce !! Bodyforce type(Eulerian_obj_r) :: srcV(3) !! Momentum source type(Eulerian_obj_i) :: maskV(3) !! Velocity field masks type(hdf5_obj), pointer :: hdf5 => null() !! Associated hdf5 object type(monitor_set) :: monitors !! Monitors to print to stdout and files at end of each time step type(monitor_set) :: pmonitor !! Monitor for the pressure-Poisson equation, prints at each substep character(len=str8), allocatable :: outputs(:) !! List of outputs (one output can contain multiple variables) character(len=str8), allocatable :: output_var(:) !! Names of variables to output real(wp) :: rho = 1.0_wp !! Fluid density real(wp) :: visc = 1.0_wp !! Fluid viscosity real(wp) :: gravity(3) = 0.0_wp !! Gravity integer :: subit = 2 !! Solver sub-iteration logical :: use_col = .false. !! Use collisions type(collision_obj) :: collisions !! Utility that handles collisions integer :: maxitp = 1 !! Collision substeps contains procedure :: Initialize => cdifs_obj_Init procedure :: Finalize => cdifs_obj_Final procedure :: PrepareSolver => cdifs_obj_PrepareSolver procedure :: AdvanceSolution => cdifs_obj_AdvanceSolution procedure :: Monitor => cdifs_obj_Monitor procedure :: WriteRestartData => cdifs_obj_WriteRestartData procedure :: WriteOutputData => cdifs_obj_WriteOutputData procedure :: LinkHDF5Object => cdifs_obj_LinkHDF5Object procedure :: ComputeSolidVF => cdifs_obj_ComputeSolidVF end type cdifs_obj