|
[Sponsors] |
August 24, 2018, 07:33 |
[OF 6] Outputting enthalpies from janafThermo
|
#1 |
New Member
Daiki Sugawara
Join Date: Aug 2018
Location: Japan
Posts: 1
Rep Power: 0 |
Dear all,
Hello everyone, thank you for viewing my post. I'm a beginner of OpenFOAM and C++. I'm trying to simulate combustion by using reactingFoam in OpenFOAM 6, and I wanna get 1. Total enthalpy 2. Sensible enthalpy 3. Enthalpy of formation from "janafThermo" class. Then, I add some functions into createFiselds.H as shown below. Code:
#include "janafThermo.H" volScalarField& p = thermo.p(); scalar Ha = Foam::janafTermo<EquationOfState>::Ha(p, T); scalar Hs = Foam::janafTermo<EquationOfState>::Hs(p, T); scalar Hc = Foam::janafTermo<EquationOfState>::Hc(p, T); volScalarField Ha ( IOobject ( "Ha", runTime.timeName(), mesh ), Ha // bsm.Ha() ); volScalarField Hs ( IOobject ( "Hs", runTime.timeName(), mesh ), // bsm.Hs() Hs ); volScalarField Hc ( IOobject ( "Hc", runTime.timeName(), mesh ), // bsm.Hc() Hc ); //-------------------------------------- Code:
from reactingFoam_H.C:48: ./createFields.H: function ‘int main(int, char**)’ 内: ./createFields.H:31:13: error: ‘EquationOfState’ has not been declared scalar Ha = EquationOfState::Ha(p, T);// const; ^ ./createFields.H:32:13: error: ‘EquationOfState’ has not been declared scalar Hs = EquationOfState::Hs(p, T);// const; ^ ./createFields.H:33:13: error: ‘EquationOfState’ has not been declared scalar Hc = EquationOfState::Hc(p, T);// const; ^ ./createFields.H:39:5: error: conflicting declaration ‘Foam::volScalarField Ha’ ( ^ ./createFields.H:31:8: error: ‘Ha’ has a previous declaration as ‘Foam::scalar Ha’ scalar Ha = EquationOfState::Ha(p, T);// const; ^ ./createFields.H:51:5: error: conflicting declaration ‘Foam::volScalarField Hs’ ( ^ ./createFields.H:32:8: error: ‘Hs’ has a previous declaration as ‘Foam::scalar Hs’ scalar Hs = EquationOfState::Hs(p, T);// const; ^ ./createFields.H:63:5: error: conflicting declaration ‘Foam::volScalarField Hc’ ( ^ ./createFields.H:33:8: error: ‘Hc’ has a previous declaration as ‘Foam::scalar Hc’ scalar Hc = EquationOfState::Hc(p, T);// const; ^ . . . Best regard, Thank you. Last edited by dik0424; August 28, 2018 at 05:12. Reason: To make my problem concreate |
|
Tags |
enthalpy, openfoam 6, reactingfoam |
|
|