mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
applications/test/ThermoMixture: New test application
This commit is contained in:
4
applications/test/ThermoMixture/Make/files
Normal file
4
applications/test/ThermoMixture/Make/files
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
ThermoMixture.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/ThermoMixture
|
||||||
5
applications/test/ThermoMixture/Make/options
Normal file
5
applications/test/ThermoMixture/Make/options
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
|
-lspecie
|
||||||
62
applications/test/ThermoMixture/ThermoMixture.C
Normal file
62
applications/test/ThermoMixture/ThermoMixture.C
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
41
applications/test/ThermoMixture/thermoDict
Normal file
41
applications/test/ThermoMixture/thermoDict
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user