mod_fields Module

Allocation and management of primary flow variables (U, P, Fluxes).

This module acts as the central repository for all physical fields associated with the fluid flow. It handles the allocation, initialization, and deallocation of cell-centered and face-centered variables.

The fields are designed to support the Fractional-Step Projection Method: 1. u: The soluable, divergence-free velocity field at the new time level. 2. u_star: The intermediate predicted velocity (contains advection and diffusion). 3. phi: The scalar potential used to project u_star onto a divergence-free space. 4. face_flux: The volumetric flux at cell faces, used for conservative transport.


Uses

  • module~~mod_fields~~UsesGraph module~mod_fields mod_fields module~mod_bc mod_bc module~mod_fields->module~mod_bc module~mod_input mod_input module~mod_fields->module~mod_input module~mod_kinds mod_kinds module~mod_fields->module~mod_kinds module~mod_mesh_types mod_mesh_types module~mod_fields->module~mod_mesh_types module~mod_bc->module~mod_input module~mod_bc->module~mod_kinds module~mod_bc->module~mod_mesh_types module~mod_input->module~mod_kinds iso_fortran_env iso_fortran_env module~mod_kinds->iso_fortran_env module~mod_mesh_types->module~mod_kinds

Used by

  • module~~mod_fields~~UsedByGraph module~mod_fields mod_fields module~mod_energy mod_energy module~mod_energy->module~mod_fields module~mod_flow_projection mod_flow_projection module~mod_flow_projection->module~mod_fields module~mod_output mod_output module~mod_output->module~mod_fields module~mod_output->module~mod_energy module~mod_output->module~mod_flow_projection module~mod_species mod_species module~mod_output->module~mod_species module~mod_species->module~mod_fields module~mod_species->module~mod_flow_projection program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->module~mod_fields program~lowmach_react_hex->module~mod_energy program~lowmach_react_hex->module~mod_flow_projection program~lowmach_react_hex->module~mod_output program~lowmach_react_hex->module~mod_species

Derived Types

type, public ::  flow_fields_t

Container for all primary hydrodynamic fields.

Components

Type Visibility Attributes Name Initial
real(kind=rk), public, allocatable :: div(:)
real(kind=rk), public, allocatable :: face_flux(:)

Conservative face-centered volumetric flux . Oriented according to the face normal (owner neighbor).

real(kind=rk), public, allocatable :: p(:)
real(kind=rk), public, allocatable :: phi(:)
real(kind=rk), public, allocatable :: rhs_old(:,:)

Storage for the previous explicit RHS (Advection + Diffusion). Required for 2nd-order Adams-Bashforth (AB2) time marching.

logical, public :: rhs_old_valid = .false.
real(kind=rk), public, allocatable :: u(:,:)
real(kind=rk), public, allocatable :: u_old(:,:)
real(kind=rk), public, allocatable :: u_star(:,:)

Subroutines

public subroutine allocate_fields(mesh, fields)

Dynamically allocates all arrays within the flow fields container.

Read more…

Arguments

Type IntentOptional Attributes Name
type(mesh_t), intent(in) :: mesh

The mesh structure defining the domain size.

type(flow_fields_t), intent(inout) :: fields

The container to be allocated.

public subroutine finalize_fields(fields)

Deallocates all arrays and resets validity flags.

Arguments

Type IntentOptional Attributes Name
type(flow_fields_t), intent(inout) :: fields

The container to be cleared.

public subroutine initialize_fields(mesh, fields)

Initializes flow fields and sets simulation initial conditions.

Read more…

Arguments

Type IntentOptional Attributes Name
type(mesh_t), intent(in) :: mesh

The computational mesh.

type(flow_fields_t), intent(inout) :: fields

The fields container to initialize.