bc_patch_t Derived Type

type, public :: bc_patch_t

Container for boundary data assigned to a specific mesh patch.

Each patch in the mesh can have different BC types for different physical fields (U, P, Y). This structure stores the numeric type IDs and the associated physical values.


Components

Type Visibility Attributes Name Initial
real(kind=rk), public :: dpdn = zero
real(kind=rk), public :: mass_flux = zero
character(len=name_len), public :: name = ""
integer, public :: patch_id = 0
real(kind=rk), public :: pressure = zero
integer, public :: pressure_type_id = bc_unknown
real(kind=rk), public :: species_Y(max_species) = zero
integer, public :: species_type_id = bc_unknown

Species boundary settings.

real(kind=rk), public :: temperature = 300.0_rk
integer, public :: temperature_type_id = bc_unknown

Temperature/enthalpy boundary settings.

integer, public :: type_id = bc_unknown
character(len=name_len), public :: type_name = ""
real(kind=rk), public :: velocity(3) = zero

positive magnitude for inlet/outlet_mass_flux.

integer, public :: velocity_type_id = bc_unknown

Field-specific overrides.


Source Code

   type, public :: bc_patch_t
      integer :: patch_id = 0                    !< Link to the geometric `mesh%patch(id)`.
      character(len=name_len) :: name = ""       !< Human-readable name (e.g., "inlet").
      character(len=name_len) :: type_name = ""  !< Input type string from namelist (e.g., "wall").
      integer :: type_id = bc_unknown            !< Master BC type ID for the patch.
      real(rk) :: velocity(3) = zero             !< Specified velocity vector \((u,v,w)\) [m/s].
      !< Normal mass flux input [kg/m^2/s]. Signed for mass_flux;
      !! positive magnitude for inlet/outlet_mass_flux.
      real(rk) :: mass_flux = zero
      real(rk) :: pressure = zero                !< Specified projection-pressure boundary value [Pa].
      real(rk) :: dpdn = zero                    !< Specified pressure gradient \(dP/dn\) [Pa/m].

      !> Species boundary settings.
      integer :: species_type_id = bc_unknown    !< BC type applied to species transport.
      real(rk) :: species_Y(max_species) = zero  !< Specified mass fractions \(Y_k\) used only for Dirichlet species boundaries.

      !> Field-specific overrides.
      integer :: velocity_type_id = bc_unknown   !< BC type for velocity (if different from master).
      integer :: pressure_type_id = bc_unknown   !< BC type for pressure (if different from master).

      !> Temperature/enthalpy boundary settings.
      integer :: temperature_type_id = bc_unknown !< BC type applied to temperature/enthalpy transport.
      real(rk) :: temperature = 300.0_rk          !< Specified boundary temperature [K] for fixed-T enthalpy states.
   end type bc_patch_t