From a9888b411fcad2219422a16be84023c778fde744 Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 18 Nov 2012 22:44:42 +0000 Subject: [PATCH] applications/test/ThermoMixture: New test application --- applications/test/ThermoMixture/Make/files | 4 ++ applications/test/ThermoMixture/Make/options | 5 ++ .../test/ThermoMixture/ThermoMixture.C | 62 +++++++++++++++++++ applications/test/ThermoMixture/thermoDict | 41 ++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 applications/test/ThermoMixture/Make/files create mode 100644 applications/test/ThermoMixture/Make/options create mode 100644 applications/test/ThermoMixture/ThermoMixture.C create mode 100644 applications/test/ThermoMixture/thermoDict diff --git a/applications/test/ThermoMixture/Make/files b/applications/test/ThermoMixture/Make/files new file mode 100644 index 0000000000..8a122d0e0b --- /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 0000000000..98bf79aaa4 --- /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 0000000000..14c71e9b01 --- /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 . + +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 > > 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 0000000000..9b439490df --- /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; + } +}