# Category 7: Continuity Equation#

The continuity equation rarely requires a boundary condition as it represents an overall mass balance constraint on the velocity field for the fluid, viz. normally it is used to enforce incompressibility. Boundary conditions for pressure are most often put on the fluid-momentum equations as a part of the stress condition at an inflow or outflow plane (see for example boundary condition cards FLOW_PRESSURE, FLOW_HYDROSTATIC, etc. ). On occasion, however, we can use a pressure condition as a pressure datum, as the Dirichlet pressure condition below allows, though the user must keep in mind that it is a condition on continuity and not momentum. When using pressure stabilization, viz. PSPG techniques, then also there is an occasional need for a boundary condition on this equation.

## P#

```BC = P NS <bc_id> <float1> [float2]
```

### Description / Usage#

(DC/CONTINUITY)

This Dirichlet boundary condition specification is used to set a constant pressure on a node set. It is generally used for specifying a pressure datum on a single-node node set. The pressure datum is useful for setting the absolute value of the pressure, which, for many problems, is indeterminate to a constant. Pressure datums are especially important for closed flow problems, such as the lid driven cavity, where there is no inflow or outflow. Mass conservation problems can arise if this card is used to specify the pressure along a group of nodes, since this equation replaces the continuity equation. To specify pressure for a group of nodes, it is preferable to use the flow pressure boundary condition, which is applied in a weak sense to the momentum equation and does not cause mass conservation problems. Definitions of the input parameters are as follows:

 P One-character boundary condition name () that defines the pressure. NS Type of boundary condition (), where NS denotes side set in the EXODUS II database. The boundary flag identifier, an integer associated with that identifies the boundary location (node set in EXODUS II) in the problem domain. Value of pressure. [float2] An optional parameter (that serves as a flag to the code for a Dirichlet boundary condition). If a value is present, and is not -1.0, the condition is applied as a residual equation. Otherwise, it is a “hard set” condition and is eliminated from the matrix. The residual method must be used when this Dirichlet boundary condition is used as a parameter in automatic continuation sequences.

### Examples#

The following are sample cards for specifying a pressure Dirichlet card:

```BC = P NS 7   0.
```
```BC = P NS 7   0. 1.0
```

where the second form is an example using the “residual” method for applying the same Dirichlet condition.

### Technical Discussion#

See the technical discussion for the UVW velocity for a discussion of the two ways of applying Dirichlet boundary conditions.

## PSPG#

```BC = PSPG SS <bc_id>
```

### Description / Usage#

(WIC/CONTINUITY)

This special type of boundary condition exists for pressure-stabilized incompressible flow simulations only. This card should be used only if the value of the Pressure Stabilization card has been set to yes. In conjunction with this feature, equal-order interpolation should be used for the velocity and pressure. If PSPG is used, a boundary integral will be added to the continuity equation to represent the gradients of velocity in the momentum residual, which has been added onto the continuity equation for stabilization. This term is only needed on inflow and outflow boundaries; in the rest of the domain, it cancels out. For more details about the derivation of this term, see the paper by Droux and Hughes (1994).

This boundary condition card requires no integer or floating point constants. Definitions of the input parameters are as follows:

 PSPG Name of the boundary condition (). SS Type of boundary condition (), where SS denotes side set in the EXODUS II database. The boundary flag identifier, an integer associated with that identifies the boundary location (side set in EXODUS II) in the problem domain.

### Examples#

The following is an example of using this card on both the inflow and outflow planes of the domain.

```BC = PSPG   SS   40
```
```BC = PSPG   SS   20
```

### Technical Discussion#

Please see Rao (1996) memo for a more detailed discussion of pressure stabilization and its implementation in Goma.