diff --git a/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C b/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C index 8399c1085653798d1beff588191c127a10ba766e..e91f968a8724d421d3b1c3de981115eb54698b92 100644 --- a/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C +++ b/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,6 +42,7 @@ int main(int argc, char *argv[]) { argList::validArgs.append("CHEMKINFile"); argList::validArgs.append("CHEMKINThermodynamicsFile"); + argList::validArgs.append("CHEMKINTransport"); argList::validArgs.append("FOAMChemistryFile"); argList::validArgs.append("FOAMThermodynamicsFile"); @@ -57,16 +58,16 @@ int main(int argc, char *argv[]) speciesTable species; - chemkinReader cr(args[1], species, args[2], newFormat); + chemkinReader cr(species, args[1], args[3], args[2], newFormat); - OFstream reactionsFile(args[3]); + OFstream reactionsFile(args[4]); reactionsFile << "species" << cr.species() << token::END_STATEMENT << nl << nl; cr.reactions().write(reactionsFile); - OFstream thermoFile(args[4]); + OFstream thermoFile(args[5]); cr.speciesThermo().write(thermoFile); Info<< "End\n" << endl; diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L index a081d6fc141c8a5025014bb612c8edfd66704db5..1c8af0b1235393d544c82ef8bd19772496d41607 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L @@ -645,8 +645,7 @@ bool finishReaction = false; highCpCoeffs, lowCpCoeffs ), - 1.67212e-6, - 170.672 + transportDict_.subDict(currentSpecieName) ) ); diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C index 06e6b6ea92d86e6c0190f0c2fe28df020284b200..eef9f3a4dd9f6d57e5a69ed10e09039e3cb00540 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C @@ -774,9 +774,12 @@ void Foam::chemkinReader::addReaction void Foam::chemkinReader::read ( const fileName& CHEMKINFileName, - const fileName& thermoFileName + const fileName& thermoFileName, + const fileName& transportFileName ) { + transportDict_.read(IFstream(transportFileName)()); + if (thermoFileName != fileName::null) { std::ifstream thermoStream(thermoFileName.c_str()); @@ -824,8 +827,9 @@ void Foam::chemkinReader::read Foam::chemkinReader::chemkinReader ( - const fileName& CHEMKINFileName, speciesTable& species, + const fileName& CHEMKINFileName, + const fileName& transportFileName, const fileName& thermoFileName, const bool newFormat ) @@ -837,7 +841,7 @@ Foam::chemkinReader::chemkinReader newFormat_(newFormat), imbalanceTol_(ROOTSMALL) { - read(CHEMKINFileName, thermoFileName); + read(CHEMKINFileName, thermoFileName, transportFileName); } @@ -868,6 +872,11 @@ Foam::chemkinReader::chemkinReader thermoFile = fileName(thermoDict.lookup("CHEMKINThermoFile")).expand(); } + fileName transportFile + ( + fileName(thermoDict.lookup("CHEMKINTransportFile")).expand() + ); + // allow relative file names fileName relPath = thermoDict.name().path(); if (relPath.size()) @@ -877,13 +886,18 @@ Foam::chemkinReader::chemkinReader chemkinFile = relPath/chemkinFile; } - if (!thermoFile.isAbsolute()) + if (thermoFile != fileName::null && !thermoFile.isAbsolute()) { thermoFile = relPath/thermoFile; } + + if (!transportFile.isAbsolute()) + { + transportFile = relPath/transportFile; + } } - read(chemkinFile, thermoFile); + read(chemkinFile, thermoFile, transportFile); } diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H index ee1986f60b0a7a10b3058d323872e1c3574c82c2..74ee5512dac350ad37d17066f85b13794e38f953 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H @@ -208,6 +208,9 @@ private: //- List of the reactions ReactionList<gasHThermoPhysics> reactions_; + //- Transport properties dictionary + dictionary transportDict_; + //- Flag to indicate that file is in new format Switch newFormat_; @@ -302,10 +305,10 @@ private: void read ( const fileName& CHEMKINFileName, - const fileName& thermoFileName + const fileName& thermoFileName, + const fileName& transportFileName ); - //- Disallow default bitwise copy construct chemkinReader(const chemkinReader&); @@ -324,8 +327,9 @@ public: //- Construct from CHEMKIN III file name chemkinReader ( - const fileName& chemkinFile, speciesTable& species, + const fileName& CHEMKINFileName, + const fileName& transportFileName, const fileName& thermoFileName = fileName::null, const bool newFormat = false ); diff --git a/tutorials/combustion/chemFoam/gri/chemkin/transportProperties b/tutorials/combustion/chemFoam/gri/chemkin/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..6e932ca799beaca89ccf5f9e9f961104e2170037 --- /dev/null +++ b/tutorials/combustion/chemFoam/gri/chemkin/transportProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "chemkin"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +".*" +{ + transport + { + As 0; + Ts 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/gri/constant/chemistryProperties b/tutorials/combustion/chemFoam/gri/constant/chemistryProperties index bf097e0ba39679d2ec60ded2d59bb8ffe51fa227..ed98ad965b2188b18e4a8b63b275fab031060cc4 100644 --- a/tutorials/combustion/chemFoam/gri/constant/chemistryProperties +++ b/tutorials/combustion/chemFoam/gri/constant/chemistryProperties @@ -33,7 +33,7 @@ EulerImplicitCoeffs odeCoeffs { - solver seulex; + solver Rosenbrock34; //SIBS; //seulex; absTol 1e-12; relTol 1e-1; } diff --git a/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties index c979a11fd0716164ed0cc001c70e73f40a832f9b..90267ad29f80d4d560f2aed28d1b15d908e2f8e5 100644 --- a/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties @@ -27,8 +27,7 @@ thermoType } CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; - CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat"; - +CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties"; // ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/gri/system/controlDict b/tutorials/combustion/chemFoam/gri/system/controlDict index 4a0eb6c38ed3a9e39d7707a43c0de56a15257a5a..be3000bcf40576c3bebcbabcf14f31cc2596a9e7 100644 --- a/tutorials/combustion/chemFoam/gri/system/controlDict +++ b/tutorials/combustion/chemFoam/gri/system/controlDict @@ -47,7 +47,9 @@ timePrecision 6; runTimeModifiable yes; -suppressSolverInfo yes; - +DebugSwitches +{ + SolverPerformance 0; +} // ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/h2/chemkin/transportProperties b/tutorials/combustion/chemFoam/h2/chemkin/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..6e932ca799beaca89ccf5f9e9f961104e2170037 --- /dev/null +++ b/tutorials/combustion/chemFoam/h2/chemkin/transportProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "chemkin"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +".*" +{ + transport + { + As 0; + Ts 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties index c979a11fd0716164ed0cc001c70e73f40a832f9b..90267ad29f80d4d560f2aed28d1b15d908e2f8e5 100644 --- a/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties @@ -27,8 +27,7 @@ thermoType } CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; - CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat"; - +CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties"; // ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/h2/system/controlDict b/tutorials/combustion/chemFoam/h2/system/controlDict index caebf52265a9f2c357a28381defe95af53c95cd9..9c63da2ad9e30638b906f33cd5749bd91a2f2737 100644 --- a/tutorials/combustion/chemFoam/h2/system/controlDict +++ b/tutorials/combustion/chemFoam/h2/system/controlDict @@ -47,7 +47,9 @@ timePrecision 6; runTimeModifiable yes; -suppressSolverInfo yes; - +DebugSwitches +{ + SolverPerformance 0; +} // ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/ic8h18/chemkin/transportProperties b/tutorials/combustion/chemFoam/ic8h18/chemkin/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..6e932ca799beaca89ccf5f9e9f961104e2170037 --- /dev/null +++ b/tutorials/combustion/chemFoam/ic8h18/chemkin/transportProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "chemkin"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +".*" +{ + transport + { + As 0; + Ts 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties index c979a11fd0716164ed0cc001c70e73f40a832f9b..90267ad29f80d4d560f2aed28d1b15d908e2f8e5 100644 --- a/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties @@ -27,8 +27,7 @@ thermoType } CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; - CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat"; - +CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties"; // ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/ic8h18/system/controlDict b/tutorials/combustion/chemFoam/ic8h18/system/controlDict index 622cadcc0c19d699ae232e805d0f08cb853d63a6..7c100daec0e3a42b5adecfe711c2b202d344c0d0 100644 --- a/tutorials/combustion/chemFoam/ic8h18/system/controlDict +++ b/tutorials/combustion/chemFoam/ic8h18/system/controlDict @@ -47,7 +47,9 @@ timePrecision 6; runTimeModifiable yes; -suppressSolverInfo yes; - +DebugSwitches +{ + SolverPerformance 0; +} // ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/nc7h16/chemkin/transportProperties b/tutorials/combustion/chemFoam/nc7h16/chemkin/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..6e932ca799beaca89ccf5f9e9f961104e2170037 --- /dev/null +++ b/tutorials/combustion/chemFoam/nc7h16/chemkin/transportProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "chemkin"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +".*" +{ + transport + { + As 0; + Ts 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties index c979a11fd0716164ed0cc001c70e73f40a832f9b..90267ad29f80d4d560f2aed28d1b15d908e2f8e5 100644 --- a/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties @@ -27,8 +27,7 @@ thermoType } CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; - CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat"; - +CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties"; // ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/nc7h16/system/controlDict b/tutorials/combustion/chemFoam/nc7h16/system/controlDict index fe0feaaf9df0a23ee5fd1096b737d6f28ebfa3ef..e2a357da58ac4843bb24ec74fb69184f0cd54436 100644 --- a/tutorials/combustion/chemFoam/nc7h16/system/controlDict +++ b/tutorials/combustion/chemFoam/nc7h16/system/controlDict @@ -47,7 +47,9 @@ timePrecision 6; runTimeModifiable yes; -suppressSolverInfo yes; - +DebugSwitches +{ + SolverPerformance 0; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/chemkin/transportProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/chemkin/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..c69c457866b0f5fbeaa19ef0c5f4254b89d65290 --- /dev/null +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/chemkin/transportProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "chemkin"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +".*" +{ + transport + { + As 1.67212e-6; + Ts 170.672; + } +} + +// ************************************************************************* // diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties index ebae047d0b2c937d4449fb44388eb763070cec25..312d8c6b954d30d588f741494888d2220eedd409 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties @@ -27,8 +27,8 @@ thermoType } CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; - CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat"; +CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties"; newFormat yes;