Implementation of immersed boundaries following the Volume-Filtering Immersed Boundary (VFIB) Method. This module defines two objects: - marker_obj: this represents an element of the immersed boundary tessellation. Notably, it contains information on the surface area, normal vector, centroid position, centroid velocity, and force applied on the centroid of the tessellation element. Note that the actual shape of the element (e.g. triangular, rectangular, or other) is not stored and not needed in the VFIB method. - marker_set: this represents a collectation of tessellation elements (i.e., marker_obj) of an immersed boundary. This object offers additional methods to compute the surface density field, normal fields, IB forcing field, and I/O. There are also methods to build pre-defined basic geometries (Sphere, Plane, Cylinder) that can be used to form more complex ones.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private, | parameter | :: | READ_CHUNK_SIZE | = | 100000 |
Default chunk size for reading |
An extended Lagrangian object that represents an element from the IB tesselation.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public | :: | SA |
Sufrace area |
|||
| integer, | public | :: | c(3) |
nearest cell |
|||
| real(kind=wp), | public | :: | f(3) |
marker forcing |
|||
| integer(kind=leapI8), | public | :: | id |
Identifying number (inactive if <0) |
|||
| real(kind=wp), | public | :: | n(3) |
normal at the marker |
|||
| real(kind=wp), | public | :: | p(3) |
position |
|||
| real(kind=wp), | public | :: | pold(3) |
Old position |
|||
| integer, | public | :: | s |
A tag |
|||
| integer, | public | :: | t |
Another tag |
|||
| real(kind=wp), | public | :: | v(3) |
marker velocity |
|||
| real(kind=wp), | public | :: | vold(3) |
Old velocity |
| procedure, public :: Extrapolate => lagrangian_obj_Extrapolate | |
| procedure, public :: Interpolate => lagrangian_obj_Interpolate | |
| procedure, public :: Locate => lagrangian_obj_Locate | |
| procedure, public :: assign => marker_obj_assign | |
| generic, public :: assignment(=) => assign |
A collection of elements that form the tesseleation of an IB surface.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(bc_set), | public, | pointer | :: | bcs | => | null() |
boundary conditions object |
| type(block_obj), | public, | pointer | :: | block | => | null() |
Associated block structure |
| integer, | public | :: | count | = | 0 |
Total count across all MPI ranks |
|
| integer, | public | :: | count_ | = | 0 |
Local count for this rank |
|
| integer, | public, | allocatable | :: | count_proc(:) |
Nbr of lagrangian objects per proc |
||
| procedure(kernel_1D), | public, | pointer, nopass | :: | g1ex | => | int_g1_triangle |
1D kernel used in extrapolations |
| procedure(kernel_1D), | public, | pointer, nopass | :: | g1in | => | g1_triangle |
1D kernel used in interpolations |
| logical, | public | :: | is_initialized | = | .false. |
Flag to determine whether this has been initialized |
|
| real(kind=wp), | public | :: | l_filter |
Half filter width |
|||
| type(monitor_set), | public, | pointer | :: | monitors | => | null() |
Monitors to print to stdout and files |
| character(len=:), | public, | allocatable | :: | name |
Name of the Lagrangian set |
||
| type(op_obj), | public, | pointer | :: | op | => | null() |
operators object |
| logical, | public | :: | overwrite | = | .true. |
Switch to overwrite IO files |
|
| class(lagrangian_obj), | public, | allocatable | :: | p(:) |
Array of Lagrangian_obj or any extended type |
||
| type(parallel_obj), | public, | pointer | :: | parallel | => | null() |
Associated parallel structure |
| type(parser_obj), | public, | pointer | :: | parser | => | null() |
Parser for input file |
| character(len=str64), | public | :: | read_file |
File to read |
|||
| class(lagrangian_obj), | public, | allocatable | :: | sample |
Sample used in allocation of polymorphic data |
||
| integer, | public | :: | stib | = | 3 |
Stencil size for filtering |
|
| type(timer_obj), | public, | pointer | :: | timer | => | null() |
Timer utility |
| character(len=str64), | public | :: | write_file |
File to write |
|||
| integer, | private | :: | R_chunk_size |
Read chunk size |
Returns the cross product of two vectors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x(3) |
Input vector |
||
| real(kind=wp), | intent(in) | :: | y(3) |
Input vector |
Result
Finds the center of area.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
Position of center of area
Assignment
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_obj), | intent(inout) | :: | this |
An element from the IB tessellation |
||
| class(lagrangian_obj), | intent(in) | :: | val |
An element from the IB tessellation |
Adds an IB cylinder (with open faces).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| real(kind=wp), | intent(in) | :: | base(3) |
Base point for extrusion |
||
| real(kind=wp), | intent(in) | :: | L(3) |
Extrusion length |
||
| real(kind=wp), | intent(in) | :: | radius |
Cylinder radius |
||
| real(kind=wp), | intent(in) | :: | vel(3) |
Cylinder translational velocity |
||
| real(kind=wp), | intent(in) | :: | dl |
Element size |
||
| integer(kind=8), | intent(in), | optional | :: | tag |
Tag |
Adds an IB plane.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| real(kind=wp), | intent(in) | :: | center(3) |
Plane center |
||
| character(len=*), | intent(in) | :: | normal |
Plane normal |
||
| real(kind=wp), | intent(in) | :: | width(3) |
Plane extents |
||
| real(kind=wp), | intent(in) | :: | vel(3) |
Plane velocity |
||
| real(kind=wp), | intent(in) | :: | dl |
Element size |
||
| integer(kind=8), | intent(in), | optional | :: | tag |
Tag |
Adds an IB sphere.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| real(kind=wp), | intent(in) | :: | center(3) |
Sphere center |
||
| real(kind=wp), | intent(in) | :: | radius |
Sphere radius |
||
| real(kind=wp), | intent(in) | :: | vel(3) |
Sphere velocity |
||
| real(kind=wp), | intent(in) | :: | dl |
Element size |
||
| integer(kind=8), | intent(in), | optional | :: | tag |
Tag |
Computes the solid volume fraction on the mesh.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| type(eulerian_obj_r), | intent(inout) | :: | VF |
Volume fraction |
||
| character(len=*), | intent(in) | :: | solver |
Name of solver to be used |
||
| real(kind=wp), | intent(in) | :: | MaxTol |
Maximum relative tolerance |
||
| integer, | intent(in) | :: | MaxIt |
Maximum number of subiterations |
||
| integer, | intent(in), | optional | :: | RelaxType |
Relaxation type |
|
| real(kind=wp), | intent(out), | optional | :: | Rel |
Relative error at end of solve |
|
| integer, | intent(out), | optional | :: | It |
Number of iterations performed |
|
| real(kind=wp), | intent(out), | optional | :: | intRHS |
Magnitude of RHS |
Computes a filtered quantity on the Eulerian grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| character(len=*), | intent(in) | :: | var |
Variable to compute |
||
| type(eulerian_obj_r), | intent(inout) | :: | field |
Filtered quantity |
Finalizes the marker_set type. This subourtine replaces the inheritted lagrangian_final.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
Computes the IB forcing Interpolation are carried out by trilinear interpolations.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| type(eulerian_obj_r), | intent(in) | :: | Um |
Velocity in 1-dir |
||
| type(eulerian_obj_r), | intent(in) | :: | Vm |
Velocity in 2-dir |
||
| type(eulerian_obj_r), | intent(in) | :: | Wm |
Velocity in 3-dir |
||
| real(kind=wp), | intent(in) | :: | rhof |
Fluid density |
||
| type(eulerian_obj_r), | intent(in) | :: | SDF |
Surface density function |
||
| type(eulerian_obj_r), | intent(inout) | :: | ibF(3) |
IB forcing |
||
| real(kind=wp), | intent(in) | :: | dt |
Timestep |
Initializes the marker_set type. This subourtine replaces the inheritted lagrangian_init.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| character(len=*), | intent(in) | :: | name |
Name of this IB surface |
||
| type(block_obj), | intent(in), | target | :: | block |
A block object |
|
| type(parallel_obj), | intent(in), | target | :: | parallel |
Parallel structure to link with |
Loads markers from a binary STL. This is a serial routine.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| character(len=*), | intent(in) | :: | STL_file |
Variable to compute |
Prepares marker_set for use with solvers.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| type(timer_obj), | intent(in), | target | :: | timer |
Timer utility |
|
| type(parser_obj), | intent(in), | target | :: | parser |
Parser for input file |
|
| type(op_obj), | intent(in), | target | :: | operators |
Operators object |
|
| type(bc_set), | intent(in), | target | :: | bcs |
Boundary conditions object |
|
| type(monitor_set), | intent(in), | target | :: | monitors |
Monitors to print to stdout and files |
|
| logical, | intent(in), | optional | :: | update_time |
Update time and iteration based on read file |
Reads marker data from file in parallel using H5HUT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| integer, | intent(out) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(out) | :: | time |
Time at write |
||
| integer, | intent(in), | optional | :: | step |
User supplied step to open |
Reads marker data from file in parallel using HDF5.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| integer, | intent(out) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(out) | :: | time |
Time at write |
Sets up parameters for creating the MPI derived type. Create the MPI structure
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| type(MPI_Datatype), | intent(out), | allocatable | :: | types(:) |
Array of types |
|
| integer, | intent(out), | allocatable | :: | lengths(:) |
Array of lengths |
|
| integer(kind=MPI_ADDRESS_KIND), | intent(out), | allocatable | :: | displacement(:) |
Array of displacements |
Sets the sample type used in allocation of polymorphic variables.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
Sets the chunk size.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| integer, | intent(in) | :: | chunk_size |
Chunk size |
Updates the Normals field.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| type(eulerian_obj_r), | intent(inout) | :: | ibN(3) |
Normals field |
Updates the Surface Density Function.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| type(eulerian_obj_r), | intent(inout) | :: | SDF |
Surface Density Function |
Writes marker data to file in parallel using H5HUT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| integer, | intent(in) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(in) | :: | time |
Time at write |
Write marker data to file in parallel using HDF5.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(marker_set), | intent(inout) | :: | this |
A collection of tessellation elements |
||
| integer, | intent(in) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(in) | :: | time |
Time at write |