From e27ddfb56c43769020b892bac8d30d7f15c35fd3 Mon Sep 17 00:00:00 2001 From: ignis Date: Thu, 17 Aug 2017 08:48:24 +0900 Subject: [PATCH] new thermo combination janaf-sutherland-absoluteH/E --- .gitignore | 17 ++ libs/thermos/Make/files | 3 + libs/thermos/Make/options | 29 +++ libs/thermos/thermoAdd.C | 384 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 433 insertions(+) create mode 100644 libs/thermos/Make/files create mode 100644 libs/thermos/Make/options create mode 100644 libs/thermos/thermoAdd.C diff --git a/.gitignore b/.gitignore index 92f3a65..45dc507 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,20 @@ doc/Doxygen/DTAGS # Ignore the test directory /tutorialsTest + +.*.swp +*.gz +log.* +postProcessing +*~ +processor* +[0-9]* +[0-9]*.[0-9]* +!0.org +constant/extendedFeatureEdgeMesh +*.eMesh +constant/polyMesh/* +!constant/polyMesh/blockMeshDict +constant/cellToRegion +*.OpenFOAM +*.foam diff --git a/libs/thermos/Make/files b/libs/thermos/Make/files new file mode 100644 index 0000000..fde3e13 --- /dev/null +++ b/libs/thermos/Make/files @@ -0,0 +1,3 @@ +thermoAdd.C + +LIB = $(FOAM_USER_LIBBIN)/libthermoAdd diff --git a/libs/thermos/Make/options b/libs/thermos/Make/options new file mode 100644 index 0000000..ea9f820 --- /dev/null +++ b/libs/thermos/Make/options @@ -0,0 +1,29 @@ +OFP_LIB_SRC = ../ + +EXE_INC = \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ + -I$(OFP_LIB_SRC)//chemistryModel_POSTECH/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/functions/Polynomial \ + -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +LIB_LIBS = \ + -lcompressibleTransportModels \ + -lfluidThermophysicalModels \ + -lreactionThermophysicalModels \ + -lspecie \ + -lthermophysicalFunctions \ + -lODE \ + -lfiniteVolume \ + -lcompressibleTransportModels \ + -lfluidThermophysicalModels \ + -lspecie \ + -lsolidSpecie \ + -lfiniteVolume \ + -lOpenFOAM diff --git a/libs/thermos/thermoAdd.C b/libs/thermos/thermoAdd.C new file mode 100644 index 0000000..af52b5e --- /dev/null +++ b/libs/thermos/thermoAdd.C @@ -0,0 +1,384 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2013 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 . + +Typedefs + Foam::thermoPhysicsTypes + +Description + Type definitions for thermo-physics models + +\*---------------------------------------------------------------------------*/ + +#include "specie.H" +#include "perfectGas.H" +#include "janafThermo.H" + +#include "absoluteEnthalpy.H" +#include "absoluteInternalEnergy.H" +#include "thermo.H" +#include "sutherlandTransport.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + // thermo physics types based on absoluteEnthalpy + + typedef + sutherlandTransport + < + species::thermo + < + janafThermo + < + perfectGas + >, + absoluteEnthalpy + > + > gasHaThermoPhysics; + + + // thermo physics types based on absoluteInternalEnergy + + typedef + sutherlandTransport + < + species::thermo + < + janafThermo + < + perfectGas + >, + absoluteInternalEnergy + > + > gasEaThermoPhysics; + +} // End namespace Foam + +/*---------------------------------------------------------------------------*\ +Typedefs + Foam::reactionTypes + +Description + Type definitions for reactions +\*---------------------------------------------------------------------------*/ + +#include "Reaction.H" + +namespace Foam +{ + // absolute enthalpy based reactions + typedef Reaction gasHaReaction; + + // absolute internal ennergy based reactions + typedef Reaction gasEaReaction; + +} + +// ************************************************************************* // + +#include "makeReactionThermo.H" + +#include "chemistryReader.H" +#include "foamChemistryReader.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Gas chemistry readers based on absoluteEnthalpy + +makeChemistryReader(gasHaThermoPhysics); + +makeChemistryReaderType(foamChemistryReader, gasHaThermoPhysics); + + + +// Gas chemistry readers based on absoluteInternalEnergy + +makeChemistryReader(gasEaThermoPhysics); + +makeChemistryReaderType(foamChemistryReader, gasEaThermoPhysics); + + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "makeReaction.H" + +#include "ArrheniusReactionRate.H" +#include "infiniteReactionRate.H" +#include "LandauTellerReactionRate.H" +#include "thirdBodyArrheniusReactionRate.H" + +#include "ChemicallyActivatedReactionRate.H" +#include "JanevReactionRate.H" +#include "powerSeriesReactionRate.H" + +#include "FallOffReactionRate.H" +#include "LindemannFallOffFunction.H" +#include "SRIFallOffFunction.H" +#include "TroeFallOffFunction.H" + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactions(Thermo, Reaction) \ + \ + defineTemplateTypeNameAndDebug(Reaction, 0); \ + defineTemplateRunTimeSelectionTable(Reaction, Istream); \ + defineTemplateRunTimeSelectionTable(Reaction, dictionary); \ + \ + makeIRNReactions(Thermo, ArrheniusReactionRate) \ + makeIRNReactions(Thermo, infiniteReactionRate) \ + makeIRNReactions(Thermo, LandauTellerReactionRate) \ + makeIRNReactions(Thermo, thirdBodyArrheniusReactionRate) \ + \ + makeIRReactions(Thermo, JanevReactionRate) \ + makeIRReactions(Thermo, powerSeriesReactionRate) \ + \ + makePressureDependentReactions \ + ( \ + Thermo, \ + ArrheniusReactionRate, \ + LindemannFallOffFunction \ + ) \ + \ + makePressureDependentReactions \ + ( \ + Thermo, \ + ArrheniusReactionRate, \ + TroeFallOffFunction \ + ) \ + \ + makePressureDependentReactions \ + ( \ + Thermo, \ + ArrheniusReactionRate, \ + SRIFallOffFunction \ + ) + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + // absolute enthalpy based reactions + makeReactions(gasHaThermoPhysics, gasHaReaction) + makeReactions(gasEaThermoPhysics, gasEaReaction) +} + +// ************************************************************************* // + +#include "makeReactionThermo.H" + +#include "psiReactionThermo.H" +#include "hePsiThermo.H" + +#include "specie.H" +#include "perfectGas.H" +#include "janafThermo.H" +#include "absoluteEnthalpy.H" +#include "thermo.H" +#include "sutherlandTransport.H" + +#include "homogeneousMixture.H" +#include "inhomogeneousMixture.H" +#include "veryInhomogeneousMixture.H" +#include "multiComponentMixture.H" +#include "reactingMixture.H" +#include "singleStepReactingMixture.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// sutherlandTransport, janafThermo + +makeReactionThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + homogeneousMixture, + sutherlandTransport, + absoluteEnthalpy, + janafThermo, + perfectGas, + specie +); + +makeReactionThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + inhomogeneousMixture, + sutherlandTransport, + absoluteEnthalpy, + janafThermo, + perfectGas, + specie +); + +makeReactionThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + veryInhomogeneousMixture, + sutherlandTransport, + absoluteEnthalpy, + janafThermo, + perfectGas, + specie +); + + +// Multi-component thermo for absolute enthalpy + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + multiComponentMixture, + gasHaThermoPhysics +); + + +// Multi-component thermo for internal energy + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + multiComponentMixture, + gasEaThermoPhysics +); + + +// Multi-component reaction thermo for absolute enthalpy + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + reactingMixture, + gasHaThermoPhysics +); + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + singleStepReactingMixture, + gasHaThermoPhysics +); + + +// Multi-component reaction thermo for internal energy + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + reactingMixture, + gasEaThermoPhysics +); + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + singleStepReactingMixture, + gasEaThermoPhysics +); + +} // End namespace Foam + +/*---------------------------------------------------------------------------*\ +InClass + Foam::psiChemistryModel + +Description + Creates chemistry model instances templated on the type of thermodynamics +\*---------------------------------------------------------------------------*/ + +#include "makeChemistryModel.H" + +#include "psiChemistryModel.H" +#include "chemistryModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + // Chemistry moldels based on absoluteEnthalpy + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + gasHaThermoPhysics + ); + + // Chemistry moldels based on absoluteInternalEnergy + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + gasEaThermoPhysics + ); +} + +// ************************************************************************* // + +#include "makeChemistrySolverTypes.H" + +#include "psiChemistryModel.H" +#include "rhoChemistryModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + // Chemistry solvers based on absoluteEnthalpy + makeChemistrySolverTypes(psiChemistryModel, gasHaThermoPhysics); + // makeChemistrySolverTypes(rhoChemistryModel, gasHaThermoPhysics); + + // Chemistry solvers based on absoluteInternalEnergy + makeChemistrySolverTypes(psiChemistryModel, gasEaThermoPhysics); + // makeChemistrySolverTypes(rhoChemistryModel, gasEaThermoPhysics); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +