PorousFlowOutflowBC

This adds the following term to the residual Various forms for may be chosen, as discussed next, so that this BC removes fluid species or heat energy through at exactly the rate specified by the multi-component, multi-phase Darcy-Richards equation, or the heat equation. Therefore, this BC can be used to represent a "free" boundary through which fluid or heat can freely flow: the boundary is "invisible" to the simulation. Alternate PorousFlow boundary conditions, such as those allowing boundary fluxes to be prescribed, are discussed here.

commentnote

Ensure your normal vector points out of the model, otherwise your fluxes will have the wrong sign

warningwarning

PorousFlowOutflowBC does not model the interface of the model with "empty space". Imagine a model of a porous-media pipe containing water. PorousFlowOutflowBC does not model the situation where the pipe has an end through which the water flows into empty space. Instead, PorousFlowOutflowBC allows only part of the pipe to be modelled: when water exits the model it continues freely into the unmodelled section of the pipe. In this sense, the model's boundary is "invisible" to the simulation. This has a further consequence: if there is a sink in the modelled section, PorousFlowOutflowBC will allow water to flow from the unmodelled section into the modelled section.

commentnote

The rate of outflow is limited by the permeability, the viscosity of the fluid, etc, in exactly the same way that the Darcy velocity is limited by these quantities. This means, for instance, if you inject a lot of fluid or heat into the model, it will take the PorousFlowOutflowBC some time to "suck" it all out.

Worked examples of this boundary condition may be found in the boundaries documentation.

This BC is fully upwinded, so can be used in conjunction with the PorousFlowAdvectiveFlux, PorousFlowHeatAdvection and PorousFlowHeatConduction Kernels.

Fluid flow

To allow a fluid species, , to flow freely out of the model, the governing equations imply that where the standard Porous Flow nomenclature has been used. Many PorousFlow simulations do not involve diffusion and dispersion, so the latter term is not included in PorousFlowOutflowBC: is simply

Input-file syntax for this type of boundary condition requires specifying:

  • flux_type = fluid (the default);

  • the mass_fraction_component ;

  • the flag include_relperm, which should only be set false in fully-saturated situations where there is no notion of relative permeability;

  • the flag multiply_by_density, which means the above expression is not premultiplied by . This allows the PorousFlowOutflowBC to be used with other objects that do not multiply by density in simulations based on fluid volume instead of fluid mass.

Heat flow

To allow heat energy to flow freely out of the model, the governing equations imply that

Input-file syntax for this type of boundary condition requires specifying:

  • flux_type = heat;

  • the flag include_relperm, which should only be set false in fully-saturated situations where there is no notion of relative permeability.

In this case, multiply_by_density is set to true irrespective of the choice set by the user, since it is an error not to multiply by density. Any mass_fraction_component specified is ignored.

Example: single-phase, single-component fluid-flow through a boundary

The most basic usage of PorousFlowOutflowBC is illustrated in the following:

[BCs]
  [outflow]
    type = PorousFlowOutflowBC
    boundary = 'left right top bottom'
    variable = pp
    save_in = nodal_outflow
  []
[]

[AuxVariables]
  [nodal_outflow]
  []
[]

[Postprocessors]
  [outflow_kg_per_s]
    type = NodalSum
    boundary = 'left right top bottom'
    variable = nodal_outflow
  []
[]
(modules/porous_flow/test/tests/sinks/s14.i)

In this input-file, all boundaries are of the "outflow" type, and the total flow rate (kg.s) is recorded into the outflow_kg_per_s using a NodalSum postprocessor.

Example: heat flow through a boundary

A PorousFlowOutflowBC with flux_type = heat will allow heat to flow through a boundary. To record the total heat-energy flowing through the boundary a NodalSum postprocessor should be used:

[BCs]
  [outflow]
    type = PorousFlowOutflowBC
    boundary = 'left right top bottom'
    flux_type = heat
    variable = T
    save_in = nodal_outflow
  []
[]

[AuxVariables]
  [nodal_outflow]
  []
[]

[Postprocessors]
  [outflow_J_per_s]
    type = NodalSum
    boundary = 'left right top bottom'
    variable = nodal_outflow
  []
[]
(modules/porous_flow/test/tests/sinks/s15.i)

A multicomponent example

A fully-saturated 2-component modelled on a 1D line segment, :

[PorousFlowFullySaturated]
  fp = simple_fluid
  porepressure = pp
  mass_fraction_vars = frac
[]
(modules/porous_flow/test/tests/sinks/s13.i)

The model initializes with the porous material fully filled with component = 1 (that is, frac = 0) and with a porepressure gradient that will move fluid from negative to positive :

[Variables]
  [pp]
  []
  [frac]
  []
[]
(modules/porous_flow/test/tests/sinks/s13.i)
[ICs]
  [pp]
    type = FunctionIC
    variable = pp
    function = 1-x
  []
[]
(modules/porous_flow/test/tests/sinks/s13.i)

For , fluid component (the frac variable) is introduced on the material's left side (), by applying the fixed boundary conditions: The right-hand side, at , has fixed porepressure while the fluid component (the frac variable) is allowed to freely exit the domain when it arrives there.

  • Porepressure is held at pp = 1 at . (Physically this adds or removes component = 1 to ensure that porepressure is fixed.)

  • Porepressure is held at pp = 0 at . (Physically this adds or removes component = 1 to ensure that porepressure is fixed.) These two BCs ensure the porepressure gradient is maintained.

  • The zeroth mass fraction is held at frac = 1 at .

  • The zeroth mass fraction is allowed to freely exit the model at .

The former 3 are implemented using DirichletBC, while the latter is the PorousFlowOutflowBC. It acts on mass_fraction_component = 0 because that is the mass-fraction associated to the frac variable by the PorousFlowFullySaturated Action:

[BCs]
  [lhs_fixed_b]
    type = DirichletBC
    boundary = left
    variable = pp
    value = 1
  []
  [rhs_fixed_b]
    type = DirichletBC
    boundary = right
    variable = pp
    value = 0
  []
  [lhs_fixed_a]
    type = DirichletBC
    boundary = left
    variable = frac
    value = 1
  []
  [outflow_a]
    type = PorousFlowOutflowBC
    boundary = right
    include_relperm = false # no need for relperm in this fully-saturated simulation
    mass_fraction_component = 0
    variable = frac
  []
[]
(modules/porous_flow/test/tests/sinks/s13.i)

The results are shown in Figure 1 where it can be seen the fluid component freely exits the right-hand boundary.

Figure 1: Advection and diffusion of a fluid component from left to right along a porepressure gradient. The fluid component is free to exit the right-hand boundary due to the PorousFlowOutflowBC there.

Further description of this result and further examples may be found in the boundaries documentation and sinks tests documentation.

Input Parameters

  • PorousFlowDictatorThe UserObject that holds the list of PorousFlow variable names

    C++ Type:UserObjectName

    Controllable:No

    Description:The UserObject that holds the list of PorousFlow variable names

  • boundaryThe list of boundary IDs from the mesh where this object applies

    C++ Type:std::vector<BoundaryName>

    Controllable:No

    Description:The list of boundary IDs from the mesh where this object applies

  • gravityGravitational acceleration vector downwards (m/s^2)

    C++ Type:libMesh::VectorValue<double>

    Controllable:No

    Description:Gravitational acceleration vector downwards (m/s^2)

  • variableThe name of the variable that this residual object operates on

    C++ Type:NonlinearVariableName

    Controllable:No

    Description:The name of the variable that this residual object operates on

Required Parameters

  • displacementsThe displacements

    C++ Type:std::vector<VariableName>

    Controllable:No

    Description:The displacements

  • flux_typefluidThe type of boundary condition to apply. 'fluid' means this boundary condition will allow a fluid component to flow freely from the boundary. 'heat' means this boundary condition will allow heat energy to flow freely from the boundary

    Default:fluid

    C++ Type:MooseEnum

    Options:fluid, heat

    Controllable:No

    Description:The type of boundary condition to apply. 'fluid' means this boundary condition will allow a fluid component to flow freely from the boundary. 'heat' means this boundary condition will allow heat energy to flow freely from the boundary

  • include_relpermTrueIf true, the Darcy flux will include the relative permeability. If false, the relative permeability will not be used, which must only be used for fully-saturated situations where there is no notion of relative permeability

    Default:True

    C++ Type:bool

    Controllable:No

    Description:If true, the Darcy flux will include the relative permeability. If false, the relative permeability will not be used, which must only be used for fully-saturated situations where there is no notion of relative permeability

  • mass_fraction_component0The index corresponding to a fluid component. If supplied, the residual contribution will be multiplied by the mass fraction, corresponding to allowing the given mass fraction to flow freely from the boundary. This is ignored if flux_type = heat

    Default:0

    C++ Type:unsigned int

    Controllable:No

    Description:The index corresponding to a fluid component. If supplied, the residual contribution will be multiplied by the mass fraction, corresponding to allowing the given mass fraction to flow freely from the boundary. This is ignored if flux_type = heat

  • multiply_by_densityTrueIf true, this BC represents mass flux. If false, it represents volume flux. User input of this flag is ignored if flux_type = heat as multiply_by_density should always be true in that case

    Default:True

    C++ Type:bool

    Controllable:No

    Description:If true, this BC represents mass flux. If false, it represents volume flux. User input of this flag is ignored if flux_type = heat as multiply_by_density should always be true in that case

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

Optional Parameters

  • absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution

  • extra_matrix_tagsThe extra tags for the matrices this Kernel should fill

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The extra tags for the matrices this Kernel should fill

  • extra_vector_tagsThe extra tags for the vectors this Kernel should fill

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The extra tags for the vectors this Kernel should fill

  • matrix_tagssystemThe tag for the matrices this Kernel should fill

    Default:system

    C++ Type:MultiMooseEnum

    Options:nontime, system

    Controllable:No

    Description:The tag for the matrices this Kernel should fill

  • vector_tagsnontimeThe tag for the vectors this Kernel should fill

    Default:nontime

    C++ Type:MultiMooseEnum

    Options:nontime, time

    Controllable:No

    Description:The tag for the vectors this Kernel should fill

Tagging Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • diag_save_inThe name of auxiliary variables to save this BC's diagonal jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

    C++ Type:std::vector<AuxVariableName>

    Controllable:No

    Description:The name of auxiliary variables to save this BC's diagonal jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • implicitTrueDetermines whether this object is calculated using an implicit or explicit form

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Determines whether this object is calculated using an implicit or explicit form

  • multiplier1Multiply the flux by this number. This is mainly used for testing purposes

    Default:1

    C++ Type:double

    Controllable:No

    Description:Multiply the flux by this number. This is mainly used for testing purposes

  • save_inThe name of auxiliary variables to save this BC's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

    C++ Type:std::vector<AuxVariableName>

    Controllable:No

    Description:The name of auxiliary variables to save this BC's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

  • seed0The seed for the master random number generator

    Default:0

    C++ Type:unsigned int

    Controllable:No

    Description:The seed for the master random number generator

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters

Input Files