From 82ef4f628960a347edaf1409e8134a14b8897173 Mon Sep 17 00:00:00 2001 From: ignis Date: Fri, 27 Nov 2015 14:13:31 +0900 Subject: [PATCH] class template heThermo added charge density qc_ --- .../basic/heThermo/heThermo.C | 28 +++++++++++++++++++ .../basic/heThermo/heThermo.H | 17 +++++++++++ 2 files changed, 45 insertions(+) diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C index 9bd7bccc..68fed6b9 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.C +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -108,6 +108,20 @@ Foam::heThermo::heThermo dimEnergy/dimMass, this->heBoundaryTypes(), this->heBoundaryBaseTypes() + ), + + qc_ + ( + IOobject + ( + "qc", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimCurrent*dimTime/dimMass ) { init(); @@ -142,6 +156,20 @@ Foam::heThermo::heThermo dimEnergy/dimMass, this->heBoundaryTypes(), this->heBoundaryBaseTypes() + ), + + qc_ + ( + IOobject + ( + "qc", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimCurrent*dimTime/dimMass ) { init(); diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.H b/src/thermophysicalModels/basic/heThermo/heThermo.H index a07a7ecf..68836137 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.H +++ b/src/thermophysicalModels/basic/heThermo/heThermo.H @@ -58,6 +58,7 @@ protected: //- Energy field volScalarField he_; + volScalarField qc_; // Protected Member Functions @@ -151,6 +152,22 @@ public: } + // Access to thermodynamic state variables + + //- Enthalpy/Internal energy [J/kg] + // Non-const access allowed for transport equations + virtual volScalarField& qc() + { + return qc_; + } + + //- Enthalpy/Internal energy [J/kg] + virtual const volScalarField& qc() const + { + return qc_; + } + + // Fields derived from thermodynamic state variables //- Enthalpy/Internal energy