Neko 1.99.11
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
fluid_pnpn Module Reference

Modular version of the Classic Nek5000 Pn/Pn formulation for fluids.

Data Types

type  fluid_pnpn_t
interface  fluid_pnpn_bc_allocate
 Split a boundary condition entry of the case file into a velocity part and a pressure part. More...
type  fluid_pnpn_bc_allocator_entry
 Called in user modules to add an allocator for custom velocity boundary condition types. More...

Functions/Subroutines

subroutine fluid_pnpn_init (this, msh, lx, params, numerics_params, user, chkp, output_boundary)
 Initialize the Pn/Pn fluid scheme.
subroutine fluid_pnpn_ax_vel_factory (this)
 Allocate and configure the Helmholtz matrix-vector product for the velocity, thisAx_vel.
subroutine fluid_pnpn_restart (this, chkp)
subroutine fluid_pnpn_set_initial_condition (this, params, user, is_restart)
 Set the initial condition of the velocity and pressure, copy the initial velocity to the lagged velocity fields, and set the initial ALE mesh velocity.
subroutine fluid_pnpn_free (this)
subroutine fluid_pnpn_step (this, time, dt_controller)
 Advance fluid simulation in time.
subroutine fluid_pnpn_assemble_rhs (this, time)
 Assemble the explicit part of the right-hand side and extrapolate the velocity.
subroutine fluid_pnpn_recompute_metrics (this)
 Recompute geometry-dependent quantities after the mesh has moved.
subroutine fluid_pnpn_update_velocity_lags (this)
 Shift the velocity history by one time step. Called once per step, after the right-hand side is assembled and before the velocity is overwritten.
subroutine fluid_pnpn_solve (this, time, dt_controller, proj_prs, proj_vel)
 Solve for the pressure and velocity, given an assembled right-hand side.
subroutine fluid_pnpn_setup_bcs (this, user, params)
 Sets up the boundary conditions for the scheme.
subroutine fluid_pnpn_write_boundary_conditions (this)
 Write a field with boundary condition specifications.

Variables

type(fluid_pnpn_bc_allocator_entry), dimension(:), allocatable, private fluid_pnpn_velocity_bc_registry
 Registry of user-defined velocity boundary condition allocators.
integer, private fluid_pnpn_velocity_bc_registry_size = 0
 The size of fluid_pnpn_velocity_bc_registry.
type(fluid_pnpn_bc_allocator_entry), dimension(:), allocatable, private fluid_pnpn_pressure_bc_registry
 Registry of user-defined pressure boundary condition allocators.
integer, private fluid_pnpn_pressure_bc_registry_size = 0
 The size of fluid_pnpn_pressure_bc_registry.

Function/Subroutine Documentation

◆ fluid_pnpn_assemble_rhs()

subroutine fluid_pnpn::fluid_pnpn_assemble_rhs ( class(fluid_pnpn_t), intent(inout), target this,
type(time_state_t), intent(in) time )
private
Parameters
timeThe time state.

adds div.(u_i*wm) to RHS

Definition at line 916 of file fluid_pnpn.f90.

◆ fluid_pnpn_ax_vel_factory()

subroutine fluid_pnpn::fluid_pnpn_ax_vel_factory ( class(fluid_pnpn_t), intent(inout), target this)
private

Definition at line 586 of file fluid_pnpn.f90.

◆ fluid_pnpn_free()

subroutine fluid_pnpn::fluid_pnpn_free ( class(fluid_pnpn_t), intent(inout) this)
private

Definition at line 785 of file fluid_pnpn.f90.

◆ fluid_pnpn_init()

subroutine fluid_pnpn::fluid_pnpn_init ( class(fluid_pnpn_t), intent(inout), target this,
type(mesh_t), intent(inout), target msh,
integer, intent(in) lx,
type(json_file), intent(inout), target params,
type(json_file), intent(inout), target numerics_params,
type(user_t), intent(in), target user,
type(chkp_t), intent(inout), target chkp,
logical, intent(in) output_boundary )
private
Parameters
mshThe mesh.
lxThe number of GLL points in each direction.
paramsThe fluid parameters, i.e. case.fluid.
numerics_paramsThe numerical parameters, i.e. case.numerics.
userType with user-defined procedures.
chkpCheckpoint for restarts.
output_boundaryWhether to write the boundary condition markers to file.

Set the number of schwarz iterations to perform each time step.

Definition at line 369 of file fluid_pnpn.f90.

◆ fluid_pnpn_recompute_metrics()

subroutine fluid_pnpn::fluid_pnpn_recompute_metrics ( class(fluid_pnpn_t), intent(inout), target this)
private

Definition at line 1019 of file fluid_pnpn.f90.

◆ fluid_pnpn_restart()

subroutine fluid_pnpn::fluid_pnpn_restart ( class(fluid_pnpn_t), intent(inout), target this,
type(chkp_t), intent(inout) chkp )
private

Definition at line 626 of file fluid_pnpn.f90.

◆ fluid_pnpn_set_initial_condition()

subroutine fluid_pnpn::fluid_pnpn_set_initial_condition ( class(fluid_pnpn_t), intent(inout) this,
type(json_file), intent(inout) params,
type(user_t), intent(in) user,
logical, intent(in) is_restart )
private
Parameters
paramsThe fluid parameters, i.e. case.fluid.
userType with user-defined procedures.
is_restartWhether the case is restarting from a checkpoint.

Definition at line 764 of file fluid_pnpn.f90.

◆ fluid_pnpn_setup_bcs()

subroutine fluid_pnpn::fluid_pnpn_setup_bcs ( class(fluid_pnpn_t), intent(inout), target this,
type(user_t), intent(in), target user,
type(json_file), intent(inout) params )
private

Each entry of case.fluid.boundary_conditions is split into a velocity part and a pressure part by fluid_pnpn_bc_split. The parts are passed to velocity_bc_factory and pressure_bc_factory, and the resulting objects are appended to bcs_vel and bcs_prs and marked in the residual projectors. The facet_type array of the mesh, used by the FDM preconditioner, is set to 1 on the zones of an entry with a Dirichlet pressure condition and to 2 otherwise.

Parameters
userThe user interface.
paramsThe case file parameters.

Definition at line 1239 of file fluid_pnpn.f90.

◆ fluid_pnpn_solve()

subroutine fluid_pnpn::fluid_pnpn_solve ( class(fluid_pnpn_t), intent(inout), target this,
type(time_state_t), intent(in) time,
type(time_step_controller_t), intent(in) dt_controller,
type(projection_t), intent(inout), optional proj_prs,
type(projection_vel_t), intent(inout), optional proj_vel )
private
Parameters
timeThe time state.
dt_controllertimestep controller
proj_prsProjection space for the pressure solve.
proj_velProjection space for the velocity solve.
Note
A solve is done without projection when its projection space is not passed.

Definition at line 1052 of file fluid_pnpn.f90.

◆ fluid_pnpn_step()

subroutine fluid_pnpn::fluid_pnpn_step ( class(fluid_pnpn_t), intent(inout), target this,
type(time_state_t), intent(in) time,
type(time_step_controller_t), intent(in) dt_controller )
private
Parameters
tThe time value.
tstepThe current interation.
dtThe timestep
ext_bdfTime integration logic.
dt_controllertimestep controller

Definition at line 883 of file fluid_pnpn.f90.

◆ fluid_pnpn_update_velocity_lags()

subroutine fluid_pnpn::fluid_pnpn_update_velocity_lags ( class(fluid_pnpn_t), intent(inout) this)
private

Definition at line 1037 of file fluid_pnpn.f90.

◆ fluid_pnpn_write_boundary_conditions()

subroutine fluid_pnpn::fluid_pnpn_write_boundary_conditions ( class(fluid_pnpn_t), intent(inout), target this)
private

Definition at line 1504 of file fluid_pnpn.f90.

Variable Documentation

◆ fluid_pnpn_pressure_bc_registry

type(fluid_pnpn_bc_allocator_entry), dimension(:), allocatable, private fluid_pnpn::fluid_pnpn_pressure_bc_registry
private

Definition at line 348 of file fluid_pnpn.f90.

◆ fluid_pnpn_pressure_bc_registry_size

integer, private fluid_pnpn::fluid_pnpn_pressure_bc_registry_size = 0
private

Definition at line 352 of file fluid_pnpn.f90.

◆ fluid_pnpn_velocity_bc_registry

type(fluid_pnpn_bc_allocator_entry), dimension(:), allocatable, private fluid_pnpn::fluid_pnpn_velocity_bc_registry
private

Definition at line 341 of file fluid_pnpn.f90.

◆ fluid_pnpn_velocity_bc_registry_size

integer, private fluid_pnpn::fluid_pnpn_velocity_bc_registry_size = 0
private

Definition at line 345 of file fluid_pnpn.f90.