From db62947968d42d587c11a2b5c1ed6e5a121ce4d5 Mon Sep 17 00:00:00 2001 From: Henry <Henry> Date: Wed, 12 Sep 2012 09:53:43 +0100 Subject: [PATCH] Thermodynamics: propagate incompressible and isochoric information from the EoS through to the basicThermo API --- .../basic/basicThermo/basicThermo.H | 8 ++++++++ src/thermophysicalModels/basic/heThermo/heThermo.H | 14 ++++++++++++++ .../equationOfState/icoPolynomial/icoPolynomial.H | 6 ++---- .../incompressiblePerfectGas.H | 6 ++---- .../specie/equationOfState/perfectGas/perfectGas.H | 6 ++---- .../specie/equationOfState/rhoConst/rhoConst.H | 6 ++---- 6 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.H b/src/thermophysicalModels/basic/basicThermo/basicThermo.H index d4e13e369c5..3951488b1a5 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.H +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.H @@ -112,6 +112,14 @@ public: //- Update properties virtual void correct() = 0; + //- Return true if the equation of state is incompressible + // i.e. rho != f(p) + virtual bool incompressible() const = 0; + + //- Return true if the equation of state is isochoric + // i.e. rho = const + virtual bool isochoric() const = 0; + // Access to thermodynamic state variables diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.H b/src/thermophysicalModels/basic/heThermo/heThermo.H index 218329e418f..20ee2696b9b 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.H +++ b/src/thermophysicalModels/basic/heThermo/heThermo.H @@ -115,6 +115,20 @@ public: return *this; } + //- Return true if the equation of state is incompressible + // i.e. rho != f(p) + virtual bool incompressible() const + { + return MixtureType::thermoType::incompressible; + } + + //- Return true if the equation of state is isochoric + // i.e. rho = const + virtual bool isochoric() const + { + return MixtureType::thermoType::isochoric; + } + // Access to thermodynamic state variables diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H index 8189494b1b5..3afc213e227 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H @@ -140,12 +140,10 @@ public: // Fundamental properties - //- Return true if the equation of state is incompressible - // i.e. rho != f(p) + //- Is the equation of state is incompressible i.e. rho != f(p) static const bool incompressible = true; - //- Return true if the equation of state is isochoric - // i.e. rho = const + //- Is the equation of state is isochoric i.e. rho = const static const bool isochoric = false; //- Return density [kg/m^3] diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H index b7b69df0f23..c755c2d8f21 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H @@ -97,12 +97,10 @@ public: // Fundamental properties - //- Return true if the equation of state is incompressible - // i.e. rho != f(p) + //- Is the equation of state is incompressible i.e. rho != f(p) static const bool incompressible = true; - //- Return true if the equation of state is isochoric - // i.e. rho = const + //- Is the equation of state is isochoric i.e. rho = const static const bool isochoric = false; //- Return density [kg/m^3] diff --git a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H index a4b5513df6c..74853b3f5a6 100644 --- a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H +++ b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H @@ -83,12 +83,10 @@ public: // Fundamental properties - //- Return true if the equation of state is incompressible - // i.e. rho != f(p) + //- Is the equation of state is incompressible i.e. rho != f(p) static const bool incompressible = false; - //- Return true if the equation of state is isochoric - // i.e. rho = const + //- Is the equation of state is isochoric i.e. rho = const static const bool isochoric = false; //- Return density [kg/m^3] diff --git a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H index b1c0067f2f0..ea71ed98a26 100644 --- a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H +++ b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H @@ -85,12 +85,10 @@ public: // Fundamental properties - //- Return true if the equation of state is rhoConst - // i.e. rho != f(p) + //- Is the equation of state is incompressible i.e. rho != f(p) static const bool incompressible = false; - //- Return true if the equation of state is isochoric - // i.e. rho = const + //- Is the equation of state is isochoric i.e. rho = const static const bool isochoric = true; //- Return density [kg/m^3] -- GitLab