ENH: makeSolidReaction: modify macros to allow new models

This commit is contained in:
Kutalmis Bercin 2021-08-02 12:02:53 +01:00 committed by Andrew Heather
parent c64c312bae
commit 9c46f86048
2 changed files with 23 additions and 16 deletions

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -56,11 +57,6 @@ namespace Foam
typedef ReactionType<solidReaction, Thermo, ReactionRate> \
ReactionType##Thermo##ReactionRate; \
\
defineTemplateRunTimeSelectionTable(Reaction##Thermo, dictionary); \
\
defineTemplateTypeNameAndDebug(solidReaction##Thermo, 0); \
defineTemplateTypeNameAndDebug(Reaction##Thermo, 0); \
\
template<> \
const word ReactionType##Thermo##ReactionRate::typeName \
( \

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -26,9 +27,27 @@ License
\*---------------------------------------------------------------------------*/
#include "makeSolidReaction.H"
#include "solidArrheniusReactionRate.H"
#include "solidThermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeSolidReactions(Thermo) \
\
typedef solidReaction<Thermo> solidReaction##Thermo; \
\
typedef Reaction<Thermo> Reaction##Thermo; \
\
defineTemplateRunTimeSelectionTable(Reaction##Thermo, dictionary); \
\
defineTemplateTypeNameAndDebug(solidReaction##Thermo, 0); \
defineTemplateTypeNameAndDebug(Reaction##Thermo, 0); \
\
makeSolidIRReactions(Thermo, solidArrheniusReactionRate)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -36,19 +55,11 @@ namespace Foam
// * * * * * * * * * * * * * Make Solid reactions * * * * * * * * * * * * //
makeSolidIRReactions(hConstSolidThermoPhysics, solidArrheniusReactionRate)
makeSolidReactions(hConstSolidThermoPhysics)
makeSolidIRReactions
(
hPowerSolidThermoPhysics,
solidArrheniusReactionRate
)
makeSolidReactions(hPowerSolidThermoPhysics)
makeSolidIRReactions
(
hExpKappaConstSolidThermoPhysics,
solidArrheniusReactionRate
)
makeSolidReactions(hExpKappaConstSolidThermoPhysics)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //