-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13031 from joshuahansel/hansje/fp-interrogator
Added fluid properties interrogator
- Loading branch information
Showing
27 changed files
with
1,911 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...d_properties/doc/content/source/actions/AddFluidPropertiesInterrogatorAction.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# AddFluidPropertiesInterrogatorAction | ||
|
||
!syntax description /FluidPropertiesInterrogator/AddFluidPropertiesInterrogatorAction | ||
|
||
This action performs a number of tasks needed to use [FluidPropertiesInterrogator](/FluidPropertiesInterrogator.md) | ||
in a minimal setting; it creates a dummy mesh, executioner, and problem, and it | ||
creates a console output for the printing performed by the interrogator. | ||
|
||
!syntax parameters /FluidPropertiesInterrogator/AddFluidPropertiesInterrogatorAction | ||
|
||
!bibtex bibliography |
115 changes: 115 additions & 0 deletions
115
.../fluid_properties/doc/content/source/userobjects/FluidPropertiesInterrogator.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# FluidPropertiesInterrogator | ||
|
||
!syntax description /UserObjects/FluidPropertiesInterrogator | ||
|
||
## Introduction | ||
|
||
The `FluidPropertiesInterrogator` user object is used to query fluid properties | ||
objects that derive from the following types: | ||
|
||
- `SinglePhaseFluidProperties` | ||
- `VaporMixtureFluidProperties` | ||
- `TwoPhaseFluidProperties` (note that `TwoPhaseNCGFluidProperties` derives from this) | ||
|
||
The user specifies a thermodynamic state at which to evaluate a number of fluid | ||
properties. This can be useful for a number of different tasks, such as the | ||
following: | ||
|
||
- Determining values for initial conditions or problem setup | ||
- Verifying out-of-bounds inputs to fluid properties interfaces | ||
- Getting values to be used in tests | ||
|
||
## Usage | ||
|
||
The interrogator is used with a syntax for | ||
[AddFluidPropertiesInterrogatorAction](/AddFluidPropertiesInterrogatorAction.md). | ||
In an input file, the user will only need a block for the `FluidPropertiesInterrogator` | ||
and a block for creating the fluid properties object that will be interrogated. | ||
For convenience, an input file to use the interrogator is provided in the module: | ||
|
||
!listing fluid_properties/fp_interrogator/fp_interrogator.i | ||
|
||
## Valid Input Combinations | ||
|
||
Notation is summarized in the following table: | ||
|
||
| Symbol | Description | | ||
| - | - | | ||
| $p$ | Pressure | | ||
| $p_{sat}$ | Saturation pressure | | ||
| $p_{crit}$ | Critical pressure | | ||
| $T$ | Temperature | | ||
| $T_{sat}$ | Saturation temperature | | ||
| $\rho$ | Density | | ||
| $v$ | Specific volume | | ||
| $e$ | Specific internal energy | | ||
| $E$ | Specific total energy | | ||
| $h$ | Specific enthalpy | | ||
| $\Delta h_{\ell\rightarrow v}$ | Latent heat of vaporization | | ||
| $s$ | Specific entropy | | ||
| $c$ | Sound speed | | ||
| $u$ | Fluid speed | | ||
| $\mu$ | Dynamic viscosity | | ||
| $c_p$ | Specific heat at constant pressure | | ||
| $c_v$ | Specific heat at constant volume | | ||
| $k$ | Thermal conductivity | | ||
| $\beta$ | Volumetric expansion coefficient | | ||
| $x_{NCG}$ | Mass fraction of non-condensable gas | | ||
|
||
Let the set of single-phase fluid properties be defined as | ||
\begin{equation} | ||
\mathcal{P} \equiv \{p, T, \rho, v, e, h, s, c, \mu, c_p, c_v, k, \beta\} \,. | ||
\end{equation} | ||
The set of the same quantities for the *stagnation* state, rather than the | ||
static state, is denoted as $\mathcal{P}_0$. | ||
|
||
Let the set of valid inputs for single-phase *static* fluid properties be | ||
\begin{equation} | ||
\mathcal{A} \equiv \{ \{p, T\}, \{p, \rho\}, \{\rho, e\} \} \,, | ||
\end{equation} | ||
and the set of valid inputs for single-phase *stagnation* fluid properties be | ||
\begin{equation} | ||
\mathcal{A}_0 \equiv \{ \{p, T, u\}, \{p, \rho, u\}, \{\rho, e, u\}, \{\rho, \rho u, \rho E\} \} \,. | ||
\end{equation} | ||
For single-phase vapor mixture fluid properties, the valid input sets are as follows: | ||
\begin{equation} | ||
\mathcal{A}_{mix} \equiv \{ \{p, T, x_{NCG}\}, \{\rho, e, x_{NCG}\} \} \,, | ||
\end{equation} | ||
\begin{equation} | ||
\mathcal{A}_{0,mix} \equiv \{ \{p, T, x_{NCG}, u\}, \{\rho, e, x_{NCG}, u\}, \{\rho, \rho u, \rho E, x_{NCG}\} \} \,, | ||
\end{equation} | ||
|
||
|
||
The following table summarizes the valid input combinations for single-phase | ||
fluid properties objects. | ||
Note that | ||
`TwoPhaseNCGFluidProperties` inherits from `TwoPhaseFluidProperties`, so the | ||
column `TwoPhaseFluidProperties` is used to describe fluid properties classes | ||
that derive from `TwoPhaseFluidProperties` but not `TwoPhaseNCGFluidProperties`. | ||
|
||
| Base Class | Valid Input Combinations | Outputs | | ||
| - | - | - | | ||
| `SinglePhaseFluidProperties` | $\mathcal{I}\in\mathcal{A}$ | $\mathcal{P}$ | | ||
| | $\mathcal{I}\in\mathcal{A}_0$ | $\mathcal{P}$, $\mathcal{P}_0$ | | ||
| `VaporMixtureFluidProperties` | $\mathcal{I}\in\mathcal{A}_{mix}$ | $\mathcal{P}$ | | ||
| | $\mathcal{I}\in\mathcal{A}_{0,mix}$ | $\mathcal{P}$, $\mathcal{P}_0$ | | ||
| `TwoPhaseFluidProperties` | $\mathcal{I} = \{\}$ | $p_{crit}$ | | ||
| | $\mathcal{I}\in\{p\}$ | $p_{crit}$, $T_{sat}$, $\Delta h_{\ell\rightarrow v}$ | | ||
| | $\mathcal{I}\in\{T\}$ | $p_{crit}$, $p_{sat}$, $\Delta h_{\ell\rightarrow v}$ | | ||
| | $\mathcal{I}\in\{p, T\}$ | $p_{crit}$, $\Delta h_{\ell\rightarrow v}$ | | ||
| | $\mathcal{I}\in\mathcal{A}, \mathcal{I}\ne\{p, T\}$ | $p_{crit}$, $\mathcal{P}_\ell$, $\mathcal{P}_v$ | | ||
| | $\mathcal{I}\in\mathcal{A}_0$ | $p_{crit}$, $\mathcal{P}_\ell$, $\mathcal{P}_v$, $\mathcal{P}_{0,\ell}$, $\mathcal{P}_{0,v}$ | | ||
| `TwoPhaseNCGFluidProperties` | $\mathcal{I} = \{\}$ | $p_{crit}$ | | ||
| | $\mathcal{I}\in\{p\}$ | $p_{crit}$, $T_{sat}$, $\Delta h_{\ell\rightarrow v}$ | | ||
| | $\mathcal{I}\in\{T\}$ | $p_{crit}$, $p_{sat}$, $\Delta h_{\ell\rightarrow v}$ | | ||
| | $\mathcal{I}\in\{p, T\}$ | $p_{crit}$, $\Delta h_{\ell\rightarrow v}$ | | ||
| | $\mathcal{I}\in\mathcal{A}, \quad \mathcal{I}\ne\{p, T\}$ | $p_{crit}$, $\mathcal{P}_\ell$ | | ||
| | $\mathcal{I}\in\mathcal{A}_0$ | $p_{crit}$, $\mathcal{P}_\ell$, $\mathcal{P}_{0,\ell}$ | | ||
| | $\mathcal{I}\in\mathcal{A}_{mix}$ | $p_{crit}$, $\mathcal{P}_\ell$, $\mathcal{P}_v$ | | ||
| | $\mathcal{I}\in\mathcal{A}_{0,mix}$ | $p_{crit}$, $\mathcal{P}_\ell$, $\mathcal{P}_v$, $\mathcal{P}_{0,\ell}$, $\mathcal{P}_{0,v}$ | | ||
|
||
!syntax parameters /UserObjects/FluidPropertiesInterrogator | ||
|
||
!syntax inputs /UserObjects/FluidPropertiesInterrogator | ||
|
||
!syntax children /UserObjects/FluidPropertiesInterrogator |
10 changes: 10 additions & 0 deletions
10
modules/fluid_properties/doc/content/syntax/FluidPropertiesInterrogator/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# FluidPropertiesInterrogator System | ||
|
||
The `FluidPropertiesInterrogator` syntax is used with | ||
[AddFluidPropertiesInterrogatorAction](/AddFluidPropertiesInterrogatorAction.md). | ||
|
||
!syntax list /FluidPropertiesInterrogator objects=True actions=False subsystems=False | ||
|
||
!syntax list /FluidPropertiesInterrogator objects=False actions=False subsystems=True | ||
|
||
!syntax list /FluidPropertiesInterrogator objects=False actions=True subsystems=False |
17 changes: 17 additions & 0 deletions
17
modules/fluid_properties/fp_interrogator/fp_interrogator.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# The parameters in this block are used to specify the thermodynamic state | ||
# at which to query the fluid properties package | ||
[FluidPropertiesInterrogator] | ||
fp = fp | ||
p = 1e5 | ||
T = 300 | ||
vel = 10 | ||
[] | ||
|
||
# The fluid properties (equation of state) to query is defined here | ||
[Modules] | ||
[./FluidProperties] | ||
[./fp] | ||
type = IdealGasFluidProperties | ||
[../] | ||
[../] | ||
[] |
37 changes: 37 additions & 0 deletions
37
modules/fluid_properties/include/actions/AddFluidPropertiesInterrogatorAction.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//* This file is part of the MOOSE framework | ||
//* https://www.mooseframework.org | ||
//* | ||
//* All rights reserved, see COPYRIGHT for full restrictions | ||
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT | ||
//* | ||
//* Licensed under LGPL 2.1, please see LICENSE for details | ||
//* https://www.gnu.org/licenses/lgpl-2.1.html | ||
|
||
#ifndef ADDFLUIDPROPERTIESINTERROGATORACTION_H | ||
#define ADDFLUIDPROPERTIESINTERROGATORACTION_H | ||
|
||
#include "Action.h" | ||
|
||
class AddFluidPropertiesInterrogatorAction; | ||
|
||
template <> | ||
InputParameters validParams<AddFluidPropertiesInterrogatorAction>(); | ||
|
||
/** | ||
* Action that sets up the fluid properties interrogator | ||
*/ | ||
class AddFluidPropertiesInterrogatorAction : public Action | ||
{ | ||
public: | ||
AddFluidPropertiesInterrogatorAction(InputParameters parameters); | ||
|
||
virtual void act() override; | ||
|
||
protected: | ||
/** | ||
* Adds the FluidPropertiesInterrogator user object | ||
*/ | ||
void addFluidPropertiesInterrogatorObject() const; | ||
}; | ||
|
||
#endif /* ADDFLUIDPROPERTIESINTERROGATORACTION_H */ |
Oops, something went wrong.