| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t), | intent(inout), | target | :: | backend | ||
| type(mesh_t), | intent(inout), | target | :: | mesh | ||
| type(allocator_t), | intent(inout), | target | :: | host_allocator |
solver class defines the Incompact3D algorithm at a very high level.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=dp), | public | :: | dt | ||||
| real(kind=dp), | public | :: | nu | ||||
| real(kind=dp), | public, | dimension(:), allocatable | :: | nu_species | |||
| integer, | public | :: | n_iters | ||||
| integer, | public | :: | n_output | ||||
| integer, | public | :: | current_iter | = | 0 | ||
| integer, | public | :: | ngrid | ||||
| integer, | public | :: | nvars | = | 3 | ||
| integer, | public | :: | nspecies | = | 0 | ||
| class(field_t), | public, | pointer | :: | u | |||
| class(field_t), | public, | pointer | :: | v | |||
| class(field_t), | public, | pointer | :: | w | |||
| class(field_t), | public, | pointer | :: | pressure | => | null() |
Pressure on CELL grid (DIR_Z) |
| class(field_t), | public, | pointer | :: | pressure_vert | => | null() |
Pressure on VERT grid (DIR_X) |
| logical, | public | :: | keep_pressure | = | .false. |
If true, persist pressure for output |
|
| logical, | public | :: | keep_wall_correction | = | .false. |
If true, persist the last pressure gradient for precorrect_walls |
|
| class(field_t), | public, | pointer | :: | dpdx_last | => | null() |
Last projection's velocity correction, kept when the mesh has a Dirichlet face so precorrect_walls can reuse it. Only kept when keep_wall_correction is set, as it costs three extra fields. |
| class(field_t), | public, | pointer | :: | dpdy_last | => | null() | |
| class(field_t), | public, | pointer | :: | dpdz_last | => | null() | |
| real(kind=dp), | public | :: | dp_last_dt | = | 0._dp |
Substep timestep (time_intg_t%stage_dt) the kept correction was made with, so precorrect_walls can rescale it to the current substep. |
|
| class(field_t), | public, | pointer | :: | vort | => | null() |
Vorticity magnitude on VERT grid |
| class(field_t), | public, | pointer | :: | qcrit | => | null() |
Q-criterion on VERT grid |
| type(flist_t), | public, | dimension(:), pointer | :: | species | => | null() | |
| class(base_backend_t), | public, | pointer | :: | backend | |||
| type(mesh_t), | public, | pointer | :: | mesh | |||
| type(time_intg_t), | public | :: | time_integrator | ||||
| type(allocator_t), | public, | pointer | :: | host_allocator | |||
| type(dirps_t), | public, | pointer | :: | xdirps | |||
| type(dirps_t), | public, | pointer | :: | ydirps | |||
| type(dirps_t), | public, | pointer | :: | zdirps | |||
| type(vector_calculus_t), | public | :: | vector_calculus | ||||
| type(ibm_t), | public | :: | ibm | ||||
| type(les_t), | public | :: | les | ||||
| logical, | public | :: | ibm_on | ||||
| logical, | public | :: | spatial_filter | = | .false. |
explicit low-pass filter on velocity |
|
| procedure(poisson_solver), | public, | pointer | :: | poisson | => | null() | |
| procedure(transport_equation), | public, | pointer | :: | transeq | => | null() |
| public function init (backend, mesh, host_allocator) |
| procedure, public :: transeq_species | |
| procedure, public :: apply_les | |
| procedure, public :: apply_spatial_filter | |
| procedure, public :: finalise | |
| procedure, public :: pressure_correction | |
| procedure, public :: precorrect_walls | |
| procedure, public :: divergence_v2p | |
| procedure, public :: gradient_p2v | |
| procedure, public :: curl |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t), | intent(inout), | target | :: | backend | ||
| type(mesh_t), | intent(inout), | target | :: | mesh | ||
| type(allocator_t), | intent(inout), | target | :: | host_allocator |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dirps_t), | intent(inout) | :: | dirps | |||
| class(base_backend_t), | intent(in) | :: | backend | |||
| type(mesh_t), | intent(in) | :: | mesh | |||
| character(len=*), | intent(in) | :: | der1st_scheme |
hyperviscous (iSVV) der2nd params; only required when der2nd_scheme is 'compact6-hyperviscous'. |
||
| character(len=*), | intent(in) | :: | der2nd_scheme |
hyperviscous (iSVV) der2nd params; only required when der2nd_scheme is 'compact6-hyperviscous'. |
||
| character(len=*), | intent(in) | :: | interpl_scheme |
hyperviscous (iSVV) der2nd params; only required when der2nd_scheme is 'compact6-hyperviscous'. |
||
| character(len=*), | intent(in) | :: | stagder_scheme |
hyperviscous (iSVV) der2nd params; only required when der2nd_scheme is 'compact6-hyperviscous'. |
||
| real(kind=dp), | intent(in), | optional | :: | c_nu |
When present, also build the low-pass filter operators for this direction. Absent means the case does not filter. |
|
| real(kind=dp), | intent(in), | optional | :: | nu0_nu |
When present, also build the low-pass filter operators for this direction. Absent means the case does not filter. |
|
| real(kind=dp), | intent(in), | optional | :: | filter_alpha |
Skew-symmetric form of convection-diffusion terms in the incompressible Navier-Stokes momentum equations, excluding pressure terms. Inputs from velocity grid and outputs to velocity grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver_t) | :: | self | ||||
| type(flist_t), | intent(inout) | :: | rhs(:) | |||
| type(flist_t), | intent(inout) | :: | variables(:) |
Apply the explicit low-pass filter to the velocity, as Incompact3d does for wall-modelled ABL runs (ifilter=1, C_filter).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver_t), | intent(inout) | :: | self |
Filter one velocity component in all three directions, in place.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver_t), | intent(inout) | :: | self | |||
| class(field_t), | intent(inout) | :: | f | |||
| type(dirps_t), | intent(in) | :: | xdirps | |||
| type(dirps_t), | intent(in) | :: | ydirps | |||
| type(dirps_t), | intent(in) | :: | zdirps | |||
| integer, | intent(in) | :: | component |
Filter a DIR_X field along one direction, in place.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver_t), | intent(inout) | :: | self | |||
| class(field_t), | intent(inout) | :: | f | |||
| type(dirps_t), | intent(in), | target | :: | dirps |
.true. when f is the component along dirps%dir, which is the odd one across a free-slip boundary. |
|
| logical, | intent(in) | :: | is_normal |
Release resources owned by the solver and its runtime models.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver_t), | intent(inout) | :: | self |
Wrapper for curl
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | o_i_hat |
Vector components of the output vector field Omega |
||
| class(field_t), | intent(inout) | :: | o_j_hat |
Vector components of the output vector field Omega |
||
| class(field_t), | intent(inout) | :: | o_k_hat |
Vector components of the output vector field Omega |
||
| class(field_t), | intent(in) | :: | u | |||
| class(field_t), | intent(in) | :: | v | |||
| class(field_t), | intent(in) | :: | w |
Incompact3d's pre_correc: on each Dirichlet face, add the previous projection's tangential correction to the value set by the case. The projection that follows then leaves the face at its prescribed value plus dt(grad p_old - grad p_new), instead of -dtgrad p_new. The kept correction is dt_last*grad p_old, so it is rescaled by dt_now/dt_last first, as Incompact3d does with gdt(itr). The timestep is time_intg_t%stage_dt, the time the substep has advanced from the divergence-free start of the step, which is what the projection scales its correction by. For AB this ratio is always 1; for RK it changes between stages (1/2, 3/4, 1 for RK3). Before the first projection (or after a restart, as in Incompact3d) there is no correction to add.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | u | |||
| class(field_t), | intent(inout) | :: | v | |||
| class(field_t), | intent(inout) | :: | w |