# Cavity Pressure Action

## Description

The CavityPressure Action system is used to calculate the pressure from an ideal gas trapped within an internal volume.

The pressure in the cavity is computed based on the ideal gas law, (1) where is the internal pressure, is the moles of gas, is the ideal gas constant, is the temperature, and is the volume of the cavity.

The moles of gas, the temperature, and the cavity volume in Eq. (1) are free to change with time. The moles of gas at any time is the original amount of gas (computed based on original pressure, temperature, and volume) plus the amount in the cavity due to any gas injected during the simulation.

## Constructed MooseObjects

The Cavity Pressure Action system consists of three separate actions, listed in the Associated Actions block below, which are all created within the same block.

Table 1: Correspondence Among Action Functionality and MooseObjects for the CavityPressure Action

FunctionalityReplaced ClassesAssociated Parameters
Calculation of the initial moles quantityCavityPressureUserObjectvolume: the name of the internal volume postprocessor
R: the universal gas constant
temperature : the name of the average temperature postprocessor
Store the value of the initial molesCavityPressurePostprocessoroutput_initial_moles: the postprocessor name to used to report the initial moles of gas
Calculation of the current internal pressureCavityPressureUserObjectoutput: the name of the cavity pressure postprocessor
Store the internal pressure valueCavityPressurePostprocessoroutput: the name of the cavity pressure postprocessor
Apply the calculated internal pressure tractionPressureboundary: the list of boundary IDs to which the pressure should be applied
displacements : a string of the displacement variables to which the Pressure BC should be applied

## Example Input Syntax

[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
volume = internalVolume
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
[../]
[../]

(modules/combined/test/tests/cavity_pressure/cavity_pressure.i)

Postprocessors for both the average temperature and the internal volume are also required for the Cavity Pressure Action system. Note that the name of the postprocessors correspond to the arguments for the parameters temperature and internal_volume in the CavityPressure block.

[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]

(modules/combined/test/tests/cavity_pressure/cavity_pressure.i)
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]

(modules/combined/test/tests/cavity_pressure/cavity_pressure.i)

## Input Parameters

• boundaryThe list of boundary IDs from the mesh where the pressure will be applied

C++ Type:std::vector

Options:

Description:The list of boundary IDs from the mesh where the pressure will be applied

• displacementsThe nonlinear displacement variables

C++ Type:std::vector

Options:

Description:The nonlinear displacement variables

### Required Parameters

• active__all__ If specified only the blocks named will be visited and made active

Default:__all__

C++ Type:std::vector

Options:

Description:If specified only the blocks named will be visited and made active

• outputThe name to use for the cavity pressure value

C++ Type:std::string

Options:

Description:The name to use for the cavity pressure value

• inactiveIf specified blocks matching these identifiers will be skipped.

C++ Type:std::vector

Options:

Description:If specified blocks matching these identifiers will be skipped.

• save_inAuxiliary variables to save the displacement residuals

C++ Type:std::vector

Options:

Description:Auxiliary variables to save the displacement residuals

• use_displaced_meshTrueWhether to use displaced mesh in the boundary condition

Default:True

C++ Type:bool

Options:

Description:Whether to use displaced mesh in the boundary condition