cantera read gri and viscosity calculation
This commit is contained in:
parent
5ad6d7f404
commit
e63c31994f
2 changed files with 29 additions and 2 deletions
|
|
@ -12,4 +12,7 @@ EXE_LIBS = \
|
|||
-lchemistryModel \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lcantera
|
||||
-pthread \
|
||||
-lcantera \
|
||||
-lsundials_cvodes -lsundials_ida -lsundials_nvecserial \
|
||||
-llapack -lblas
|
||||
|
|
|
|||
|
|
@ -59,12 +59,36 @@ int main(int argc, char *argv[])
|
|||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "readInitialConditions.H"
|
||||
#include "createControls.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
Cantera::IdealGasMix gas_ ("gri30.xml", "gri30_mix");
|
||||
Cantera::Transport *tr_ = Cantera::newTransportMgr("Mix", &gas_);
|
||||
label nCanteraSp_ = gas_.nSpecies();
|
||||
|
||||
scalarField XY(nCanteraSp_, 0.0);
|
||||
|
||||
scalar Tl = 300;
|
||||
scalar Tu = 3000;
|
||||
scalarField T01(100, 0.0);
|
||||
forAll (T01, i)
|
||||
{
|
||||
T01[i] = i * (Tu - Tl) / 100. + Tl;
|
||||
}
|
||||
|
||||
forAll(thermo.composition().species(), i)
|
||||
{
|
||||
XY[i] = Y[i][0];
|
||||
}
|
||||
|
||||
forAll(T01, i)
|
||||
{
|
||||
gas_.setState_TPY(T01[i], p0, XY.data());
|
||||
Info << tr_->viscosity() << endl;
|
||||
}
|
||||
|
||||
Info << "Number of steps = " << runTime.timeIndex() << endl;
|
||||
Info << "End" << nl << endl;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue