# Cavity Pressure UserObject

Uses the ideal gas law to compute internal pressure and an initial moles of gas quantity.

## Description

The CavityPressureUserObject is used to compute: both the number of initial moles from a gas contained in an internal volume and the pressure exerted by a gas on the cavity boundary. This postprocessor is suitable only for ideal gases, which obey 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. To compute the initial number of moles, Eq. 1 is rearranged to solve for moles from an initial pressure.

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. The volume is provided by a single postprocessor value or a vector of postprocessor values that are summed together before being used in Eq. 1.

## Input Parameters

• volumeThe name of the postprocessor(s) that holds the value of the internal volume in the cavity

C++ Type:std::vector

Options:

Description:The name of the postprocessor(s) that holds the value of the internal volume in the cavity

• RThe universal gas constant for the units used.

C++ Type:double

Options:

Description:The universal gas constant for the units used.

• temperatureThe name of the average temperature postprocessor value.

C++ Type:PostprocessorName

Options:

Description:The name of the average temperature postprocessor value.

### Required Parameters

• initial_temperatureInitial temperature (optional)

C++ Type:double

Options:

Description:Initial temperature (optional)

• execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

Default:TIMESTEP_END

C++ Type:ExecFlagEnum

Options:NONE INITIAL LINEAR NONLINEAR TIMESTEP_END TIMESTEP_BEGIN FINAL CUSTOM

Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

• initial_pressure0The initial pressure in the cavity. If not given, a zero initial pressure will be used.

Default:0

C++ Type:double

Options:

Description:The initial pressure in the cavity. If not given, a zero initial pressure will be used.

• material_inputThe name of the postprocessor(s) that holds the amount of material injected into the cavity.

C++ Type:std::vector

Options:

Description:The name of the postprocessor(s) that holds the amount of material injected into the cavity.

• startup_time0The amount of time during which the pressure will ramp from zero to its true value.

Default:0

C++ Type:double

Options:

Description:The amount of time during which the pressure will ramp from zero to its true value.

### Optional Parameters

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

C++ Type:std::vector

Options:

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

• enableTrueSet the enabled status of the MooseObject.

Default:True

C++ Type:bool

Options:

Description:Set the enabled status of the MooseObject.

• allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

Default:False

C++ Type:bool

Options:

Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

• use_displaced_meshTrueWhether 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:True

C++ Type:bool

Options:

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.

• force_preauxFalseForces the GeneralUserObject to be executed in PREAUX

Default:False

C++ Type:bool

Options:

Description:Forces the GeneralUserObject to be executed in PREAUX