Numerical methods for lagrangian point particles.
A point particle, defined by the particle_obj derived type, is an object that contains information about - the size and material density of the particle - the particle centroid (position, linear, and angular velocity) - the hydrodynamic force and torque applied on the particle (given by a hydrodynamic model) - the collision force and torque applied on the particle (given by a collisin model)
The particle_BH_obj is an extension of particle_obj that adds information about the slip and acceleration histories required to calculate the Basset history force.
The particle_set derived type defines a collection of particle_obj, i.e., a cloud of particles. This derived type offers methods to - manage creation/removal of particles - integrate particle equations of motion - perform I/O.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private, | parameter | :: | BH_A(BH_E) | = | [0.23477481312586_wp, 0.28549576238194_wp, 0.28479416718255_wp, 0.26149775537574_wp, 0.32056200511938_wp, 0.35354490689146_wp, 0.39635904496921_wp, 0.42253908596514_wp, 0.48317384225265_wp, 0.63661146557001_wp] |
Non-dimensional weights in BH kernel |
| integer, | private, | parameter | :: | BH_E | = | 10 |
Number of exponential functions used to approximate tail of BH kernel |
| integer, | private, | parameter | :: | BH_N | = | 5 |
Number of entries to track in time history |
| real(kind=wp), | private, | parameter | :: | BH_T(BH_E) | = | [0.1_wp, 0.3_wp, 1.0_wp, 3.9_wp, 10.0_wp, 40.0_wp, 190.0_wp, 1000.0_wp, 6500.0_wp, 50000.0_wp] |
Non-dimensional time in BH kernel |
| integer, | private, | parameter | :: | PP_TYPE_BASSET | = | 2 |
Type used when computing Basset History force |
| integer, | private, | parameter | :: | PP_TYPE_DEFAULT | = | 1 |
Default type |
A particle type that supports the computation of Basset History force
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public | :: | Fb(3) |
Basset force |
|||
| real(kind=WP), | public | :: | Fc(3) |
Collision force applied on particle |
|||
| real(kind=WP), | public | :: | Fcold(3) |
Old collision force |
|||
| real(kind=WP), | public | :: | Fh(3) |
Hydrodynamic force applied on particle |
|||
| real(kind=WP), | public | :: | Fhold(3) |
Old hydrodynamic force |
|||
| real(kind=wp), | public | :: | Fix(BH_E) |
Exponential tails of Basset kernel (x-dir) |
|||
| real(kind=wp), | public | :: | Fiy(BH_E) |
Exponential tails of Basset kernel (y-dir) |
|||
| real(kind=wp), | public | :: | Fiz(BH_E) |
Exponential tails of Basset kernel (z-idr) |
|||
| real(kind=WP), | public | :: | Tc(3) |
Collision torque applied on particle |
|||
| real(kind=WP), | public | :: | Tcold(3) |
Old collision torque |
|||
| real(kind=WP), | public | :: | Th(3) |
Hydrodynamic torque applied on particle |
|||
| real(kind=WP), | public | :: | Thold(3) |
Old hydrodynamic torque |
|||
| integer, | public | :: | c(3) |
nearest cell |
|||
| real(kind=WP), | public | :: | d |
Diameter of the particle |
|||
| real(kind=wp), | public | :: | gx(BH_N+1) |
Time series of slip velocity derivatives (x-dir) |
|||
| real(kind=wp), | public | :: | gy(BH_N+1) |
Time series of slip velocity derivatives (y-dir) |
|||
| real(kind=wp), | public | :: | gz(BH_N+1) |
Time series of slip velocity derivatives (z-idr) |
|||
| integer(kind=leapI8), | public | :: | id |
Identifying number (inactive if <0) |
|||
| real(kind=wp), | public | :: | p(3) |
position |
|||
| real(kind=WP), | public | :: | pold(3) |
Old particle position |
|||
| real(kind=WP), | public | :: | rho |
Particle density |
|||
| integer, | public | :: | s |
A tag |
|||
| real(kind=WP), | public | :: | v(3) |
Particle velocity |
|||
| real(kind=WP), | public | :: | vold(3) |
Old particle velocity |
|||
| real(kind=wp), | public | :: | vs(3) |
Slip velocity |
|||
| real(kind=WP), | public | :: | w(3) |
Particle velocity |
|||
| real(kind=WP), | public | :: | wold(3) |
Old particle angular velocity |
| procedure, public :: Extrapolate => lagrangian_obj_Extrapolate | |
| procedure, public :: Interpolate => lagrangian_obj_Interpolate | |
| procedure, public :: Locate => lagrangian_obj_Locate | |
| procedure, public :: assign => particle_BH_obj_assign | |
| generic, public :: assignment(=) => assign |
An extended Lagrangian object that represents a Lagrangian point particle
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=WP), | public | :: | Fc(3) |
Collision force applied on particle |
|||
| real(kind=WP), | public | :: | Fcold(3) |
Old collision force |
|||
| real(kind=WP), | public | :: | Fh(3) |
Hydrodynamic force applied on particle |
|||
| real(kind=WP), | public | :: | Fhold(3) |
Old hydrodynamic force |
|||
| real(kind=WP), | public | :: | Tc(3) |
Collision torque applied on particle |
|||
| real(kind=WP), | public | :: | Tcold(3) |
Old collision torque |
|||
| real(kind=WP), | public | :: | Th(3) |
Hydrodynamic torque applied on particle |
|||
| real(kind=WP), | public | :: | Thold(3) |
Old hydrodynamic torque |
|||
| integer, | public | :: | c(3) |
nearest cell |
|||
| real(kind=WP), | public | :: | d |
Diameter of the particle |
|||
| integer(kind=leapI8), | public | :: | id |
Identifying number (inactive if <0) |
|||
| real(kind=wp), | public | :: | p(3) |
position |
|||
| real(kind=WP), | public | :: | pold(3) |
Old particle position |
|||
| real(kind=WP), | public | :: | rho |
Particle density |
|||
| integer, | public | :: | s |
A tag |
|||
| real(kind=WP), | public | :: | v(3) |
Particle velocity |
|||
| real(kind=WP), | public | :: | vold(3) |
Old particle velocity |
|||
| real(kind=WP), | public | :: | w(3) |
Particle velocity |
|||
| real(kind=WP), | public | :: | wold(3) |
Old particle angular velocity |
| procedure, public :: Extrapolate => lagrangian_obj_Extrapolate | |
| procedure, public :: Interpolate => lagrangian_obj_Interpolate | |
| procedure, public :: Locate => lagrangian_obj_Locate | |
| procedure, public :: assign => particle_obj_assign | |
| generic, public :: assignment(=) => assign |
A collection of point particles.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public | :: | CPG(3) | = | 0.0_wp |
Constant Pressure Gradient forcing |
|
| 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 |
| real(kind=wp), | public | :: | gravity(3) | = | 0.0_wp |
Gravity |
|
| 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 |
| integer, | public | :: | part_type | = | PP_TYPE_DEFAULT |
Particle type to use |
|
| character(len=str64), | public | :: | read_file |
File to read |
|||
| real(kind=wp), | public | :: | rhof | = | 1.0_wp |
Fluid density |
|
| 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 |
Assignment
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_BH_obj), | intent(inout) | :: | this |
An particle_obj object |
||
| class(lagrangian_obj), | intent(in) | :: | val |
An particle_obj object |
Assignment
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_obj), | intent(inout) | :: | this |
An particle_obj object |
||
| class(lagrangian_obj), | intent(in) | :: | val |
An particle_obj object |
Advances centers to next timestep.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Collection of Point Particles |
||
| real(kind=wp), | intent(in) | :: | dt |
Timestep |
Changes Particle Type. This deletes all existing particle data and redeclares the associated MPI type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Set of particles |
||
| character(len=*), | intent(in) | :: | type |
particle type |
Creates monitor file for Point Particles.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Collection of Point Particles |
Filters a quantity to the Eulerian grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Set of Lagrangian objects |
||
| character(len=*), | intent(in) | :: | var |
Variable to compute |
||
| type(eulerian_obj_r), | intent(inout) | :: | field |
Filtered quantity |
Prepares for use with solvers.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Set of particles |
||
| 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(monitor_set), | intent(in), | target | :: | monitors |
Monitors to print to stdout and files |
|
| logical, | intent(in), | optional | :: | update_time |
Reads particle data from file in parallel using H5HUT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Lagrangian array to dump |
||
| 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 particle data from file in parallel using HDF5.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Set of resolved particles |
||
| integer, | intent(out) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(out) | :: | time |
Time at write |
Sets up parameters used when creating the MPI derived type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Set of Lagrangian objects |
||
| 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 up parameters used when creating the MPI derived type of particles with BH type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Set of Lagrangian objects |
||
| 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 up parameters used when creating the MPI derived type of particles with default type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Set of Lagrangian objects |
||
| 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(particle_set), | intent(inout) | :: | this |
Lagrangian array to dump |
Stores values from previous timestep.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Lagrangian array to dump |
Updates monitoring data.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Collection of Point Particles |
Writes particle data to file in parallel using H5HUT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Lagrangian array to dump |
||
| integer, | intent(in) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(in) | :: | time |
Time at write |
Writes particle data to file in parallel using HDF5.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Set of resolved particles |
||
| integer, | intent(in) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(in) | :: | time |
Time at write |
Writes particle data to file in parallel using SILO.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Point particles to write |
||
| integer, | intent(in) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(in) | :: | time |
Time at write |
||
| character(len=str8), | intent(in), | optional | :: | list(:) |
Names of components to write |