diff --git a/applications/test/ThermoMixture/Make/files b/applications/test/ThermoMixture/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..8a122d0e0b878ecbaf1833d9943df9cbf172cb20 --- /dev/null +++ b/applications/test/ThermoMixture/Make/files @@ -0,0 +1,4 @@ + +ThermoMixture.C + +EXE = $(FOAM_APPBIN)/ThermoMixture diff --git a/applications/test/ThermoMixture/Make/options b/applications/test/ThermoMixture/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..98bf79aaa43cfb1f965a7c6477a54d0db7c645a4 --- /dev/null +++ b/applications/test/ThermoMixture/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude + +EXE_LIBS = \ + -lspecie diff --git a/applications/test/ThermoMixture/ThermoMixture.C b/applications/test/ThermoMixture/ThermoMixture.C new file mode 100644 index 0000000000000000000000000000000000000000..14c71e9b014c080e76552290dc0182c7ae4191e1 --- /dev/null +++ b/applications/test/ThermoMixture/ThermoMixture.C @@ -0,0 +1,62 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Application + ThermoMixture + +Description + +\*---------------------------------------------------------------------------*/ + +#include "dictionary.H" +#include "IFstream.H" +#include "constTransport.H" +#include "specieThermo.H" +#include "hConstThermo.H" +#include "perfectGas.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Main program: + +int main(int argc, char *argv[]) +{ + typedef constTransport<specieThermo<hConstThermo<perfectGas> > > ThermoType; + + IFstream f("thermoDict"); + dictionary dict(f); + + ThermoType t1(dict.subDict("specie1")); + ThermoType t2(dict.subDict("specie2")); + + Info << "W= " << t1.W() << " " << t2.W() << " " << (t1+t2).W() << endl; + Info << "Cp= " << t1.cp(1) << " " << t2.cp(1) << " " << (t1+t2).cp(1) << endl; + + Info<< "\nEnd\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/test/ThermoMixture/thermoDict b/applications/test/ThermoMixture/thermoDict new file mode 100644 index 0000000000000000000000000000000000000000..9b439490df8488f333ee56086277ec56341f852d --- /dev/null +++ b/applications/test/ThermoMixture/thermoDict @@ -0,0 +1,41 @@ +specie1 +{ + specie + { + nMoles 1; + molWeight 1; + } + + thermodynamics + { + Cp 1; + Hf 0; + } + + transport + { + mu 1; + Pr 1; + } +} + +specie2 +{ + specie + { + nMoles 1; + molWeight 0.5; + } + + thermodynamics + { + Cp 2; + Hf 0; + } + + transport + { + mu 1; + Pr 1; + } +}