diff --git a/applications/solvers/combustion/PDRFoam/PDRFoam.C b/applications/solvers/combustion/PDRFoam/PDRFoam.C index bf70e83c5d1266a44c507c01b5c43d0dcb597aa7..49428b590907c0262826143a2e2863d5c9eb1898 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoam.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoam.C @@ -68,7 +68,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "laminarFlameSpeed.H" #include "XiModel.H" @@ -123,12 +123,12 @@ int main(int argc, char *argv[]) { #include "bEqn.H" #include "ftEqn.H" - #include "huEqn.H" - #include "hEqn.H" + #include "hauEqn.H" + #include "haEqn.H" if (!ign.ignited()) { - hu == h; + hau == ha; } #include "pEqn.H" diff --git a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C index 0c5082df0426d82e82642cc698e263b6591848c2..c051c2af45adfec04e177a343860949113456685 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C @@ -57,7 +57,7 @@ Description #include "fvCFD.H" #include "dynamicFvMesh.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "laminarFlameSpeed.H" #include "XiModel.H" diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C index da44801090ef032e20e2bd0cce1ba663c12ea468..861cbffb64ccff381154ce217702111dd4aee68c 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C @@ -43,7 +43,7 @@ namespace XiEqModels Foam::XiEqModels::basicSubGrid::basicSubGrid ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H index 44d43b4dc6a23fbfc10571a5a5e3f3dcece8d86a..7e69085d6df2d8562865eeba33790ed1e0120b8b 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H @@ -113,7 +113,7 @@ public: basicSubGrid ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C index a0aa0f9cfcaf7fcad7dc3721263bd4849226fe02..3fa4ac96411620f9b0a35a8e4a829c62d3b19bd1 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C @@ -43,7 +43,7 @@ namespace XiGModels Foam::XiGModels::basicSubGrid::basicSubGrid ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H index 09fba91e6cca788a69ced90aa700c809f19f00b0..7e336b698b6da3308d9822b1373de01a78a3a601 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H @@ -101,7 +101,7 @@ public: basicSubGrid ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H index 152995b9f0ff0f050228513f7c84d2ad174fc765..71f9777e1c6e3a383bb15b0e55401e463e35dbf4 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H @@ -37,7 +37,7 @@ SourceFiles #define PDRDragModel_H #include "IOdictionary.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "multivariateSurfaceInterpolationScheme.H" #include "runTimeSelectionTables.H" diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C index 6f7a33c947deb5865289d94658070d9fb095d4f3..4b7e3912057d80df156d230e2c178e882551a4e4 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C @@ -43,7 +43,7 @@ namespace XiEqModels Foam::XiEqModels::Gulder::Gulder ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H index 4531596a3b9d67d32926397f77d7f407b260e848..3db7b71f2e817b9f25a6b554e4ce819cf5149e07 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H @@ -89,7 +89,7 @@ public: Gulder ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C index c98f7d9cf7f46ffa6f15750056747b22d384bedc..ff6a77070b90fcb36fc081fc32e02616c6b14622 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C @@ -43,7 +43,7 @@ namespace XiEqModels Foam::XiEqModels::SCOPEBlend::SCOPEBlend ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H index 65693451d7796f97f1e94082cf1e1cadb252f834..efa23124abe34c8da410dbeac78c065b17e80f13 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H @@ -85,7 +85,7 @@ public: SCOPEBlend ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index c1f299641140e15c750fb5cbea55ddb1134bbd24..86e2ea13eb5aedd18edea13b1867feae0f61e2b2 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C @@ -43,7 +43,7 @@ namespace XiEqModels Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H index 72dcd26de155c71dd261eae0cea155016fb6fea5..de3e8c4697d7db489726a1687d36e0252b79509b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H @@ -103,7 +103,7 @@ public: SCOPEXiEq ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index 7c20dd220b2befe1f5e8aaf8b0a7a22610349bdd..4f43a40440b324f2df8a2a7365efe71de4fadb5f 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C @@ -39,7 +39,7 @@ namespace Foam Foam::XiEqModel::XiEqModel ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H index 3f4b2d0f7cbeeea1dec395e5ff34fd14ec102072..c34db5142aebd9dcd78cf4704d07b3f685a3b09a 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H @@ -42,7 +42,7 @@ SourceFiles #define XiEqModel_H #include "IOdictionary.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "runTimeSelectionTables.H" @@ -66,7 +66,7 @@ protected: dictionary XiEqModelCoeffs_; //- Thermo - const hhuCombustionThermo& thermo_; + const psiuReactionThermo& thermo_; //- Turbulence const compressible::RASModel& turbulence_; @@ -107,7 +107,7 @@ public: dictionary, ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ), @@ -126,7 +126,7 @@ public: static autoPtr<XiEqModel> New ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); @@ -138,7 +138,7 @@ public: XiEqModel ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C index 33983c1c9f3dd02f2e07cc131756e153aecb9284..f90b0ef3427bb1c9e9ee64e3216d47bd2776feec 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C @@ -30,7 +30,7 @@ License Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New ( const dictionary& propDict, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) @@ -48,7 +48,7 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New ( "XiEqModel::New" "(" - " const hhuCombustionThermo& thermo," + " const psiuReactionThermo& thermo," " const compressible::RASModel& turbulence," " const volScalarField& Su" ")" diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C index f4698d55f3cf8e93a5da71c2146cea18f4cb40b7..7e46924c8822fefa29cb986da0464b80cb5d4f3a 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C @@ -43,7 +43,7 @@ namespace XiEqModels Foam::XiEqModels::instability::instability ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H index 0c513bbc0a640f4d6379a7133331f6a89fb184ca..9f3ca5d120bbfaa383e64eb35289ea199800718f 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H @@ -84,7 +84,7 @@ public: instability ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C index fc57a0cdc74931d28c30a9b8d13acd2f991e0275..2ea37eb8ed895a566d9119641d41c944c36351a5 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C @@ -43,7 +43,7 @@ namespace XiGModels Foam::XiGModels::KTS::KTS ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H index c735c7f4e74e74ba160c6ce76f48ccaafeab1aa4..9b3479ccc7403df9646ac43225d3dcb0b2922e0b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H @@ -79,7 +79,7 @@ public: KTS ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C index 5e5280be0befc9c7369bae59a1e90adba5d14927..9c2bf6a1e59e15966ea97ef72ef7b0dd83f315dc 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C @@ -39,7 +39,7 @@ namespace Foam Foam::XiGModel::XiGModel ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H index 439bf78bec2d00a36bd53107050d699c16f09777..50a2fcc11a719810dae9a5f018066aa8108630bf 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H @@ -39,7 +39,7 @@ SourceFiles #define XiGModel_H #include "IOdictionary.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "runTimeSelectionTables.H" @@ -61,7 +61,7 @@ protected: dictionary XiGModelCoeffs_; - const hhuCombustionThermo& thermo_; + const psiuReactionThermo& thermo_; const compressible::RASModel& turbulence_; const volScalarField& Su_; @@ -92,7 +92,7 @@ public: dictionary, ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ), @@ -111,7 +111,7 @@ public: static autoPtr<XiGModel> New ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); @@ -123,7 +123,7 @@ public: XiGModel ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C index a04411250fcd637b132a9992d5509edef9c414ee..e70df83131978bf17810d07f9f9f57fc74797937 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C @@ -30,7 +30,7 @@ License Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New ( const dictionary& propDict, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) @@ -48,7 +48,7 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New ( "XiGModel::New" "(" - " const hhuCombustionThermo& thermo," + " const psiuReactionThermo& thermo," " const compressible::RASModel& turbulence," " const volScalarField& Su" ")" diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C index 06520b09587179fac45264741bc9b4f987d31fee..844cc7b72d4614182e05a93c4ddcb0f60bff0303 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C @@ -43,7 +43,7 @@ namespace XiGModels Foam::XiGModels::instabilityG::instabilityG ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H index c75b4456db897eb6a12886cec22a3420506353f4..2088e6044f76e10a548fbea0b6447494a48cdf6f 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H @@ -88,7 +88,7 @@ public: instabilityG ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C index e058f813ba89b22a3bea3db5ce15511b4b70fb03..dac2e6b01921d30d788dd25fb76a455ea8fd9df7 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C @@ -39,7 +39,7 @@ namespace Foam Foam::XiModel::XiModel ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H index 8509f05a5c697324f502c043e2c91b6b091c361b..f17e9453958656712b09b607fc5b5baeb4b12806 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H @@ -91,7 +91,7 @@ SourceFiles #define XiModel_H #include "IOdictionary.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "multivariateSurfaceInterpolationScheme.H" #include "runTimeSelectionTables.H" @@ -114,7 +114,7 @@ protected: dictionary XiModelCoeffs_; - const hhuCombustionThermo& thermo_; + const psiuReactionThermo& thermo_; const compressible::RASModel& turbulence_; const volScalarField& Su_; const volScalarField& rho_; @@ -151,7 +151,7 @@ public: dictionary, ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, @@ -176,7 +176,7 @@ public: static autoPtr<XiModel> New ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, @@ -191,7 +191,7 @@ public: XiModel ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C index 935974c0af8afca1b19843ff812a73fe9db27c79..bf2a9cd79c5d1d3984203602c0b58ec187193c11 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C @@ -30,7 +30,7 @@ License Foam::autoPtr<Foam::XiModel> Foam::XiModel::New ( const dictionary& propDict, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C index 06266f10098e543798035b84a536a8fd88ae6a0a..c3e1e6aa8594c3b7cd25a0278f8467b33460c90b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C @@ -43,7 +43,7 @@ namespace XiModels Foam::XiModels::algebraic::algebraic ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H index bbcdde4a0947d3a5c4ed399e44f4eb56eadff46f..d0eb879bfbe53e5d0ecaf900a31de28e4f545e8e 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H @@ -86,7 +86,7 @@ public: algebraic ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C index f72fbda3d1dfac3c6f028db6292eec14a01f1497..d9715dece63e8f959d03646f946351c7141bbc6b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C @@ -43,7 +43,7 @@ namespace XiModels Foam::XiModels::fixed::fixed ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H index 8c55f8e894e089399f4f79945964b4b87be41bac..5e3ff0342754ded5fd7d80ea72f53ae7b71a29a2 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H @@ -74,7 +74,7 @@ public: fixed ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C index d034978feac04a2ac5280055815fbfabda644b68..37aeb1437d61110de5ed90873084eecd8ec23429 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C @@ -43,7 +43,7 @@ namespace XiModels Foam::XiModels::transport::transport ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H index 35b480933253ce6c196077efb7f83f384370e9b5..819a0c892cf4ae3272b2e895ad484480d862061c 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H @@ -86,7 +86,7 @@ public: transport ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/bEqn.H b/applications/solvers/combustion/PDRFoam/bEqn.H index 348e4b8991ab7c6a1ec2908094fcfbf5ee474816..abec1938c32ce5a09d0ed2c6591f6026dbdd4c0d 100644 --- a/applications/solvers/combustion/PDRFoam/bEqn.H +++ b/applications/solvers/combustion/PDRFoam/bEqn.H @@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection mesh, fields, phi, - mesh.divScheme("div(phi,ft_b_h_hu)") + mesh.divScheme("div(phi,ft_b_ha_hau)") ) ); @@ -54,13 +54,13 @@ if (ign.ignited()) surfaceScalarField nf("nf", mesh.Sf() & nfVec); n /= mgb; -# include "StCorr.H" + #include "StCorr.H" // Calculate turbulent flame speed flux // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ surfaceScalarField phiSt("phiSt", fvc::interpolate(rhou*StCorr*St)*nf); -# include "StCourantNo.H" + #include "StCourantNo.H" Db = flameWrinkling->Db(); @@ -78,7 +78,7 @@ if (ign.ignited()) // Add ignition cell contribution to b-equation // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# include "ignite.H" + #include "ignite.H" // Solve for b // ~~~~~~~~~~~ diff --git a/applications/solvers/combustion/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H index 2d8451c9ae665d5a429a9187cbdbb16c94c5622a..c4be37dfc93f27d892baf8550897a99f9966cb30 100644 --- a/applications/solvers/combustion/PDRFoam/createFields.H +++ b/applications/solvers/combustion/PDRFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr<hhuCombustionThermo> pThermo + autoPtr<psiuReactionThermo> pThermo ( - hhuCombustionThermo::New(mesh) + psiuReactionThermo::New(mesh) ); - hhuCombustionThermo& thermo = pThermo(); + psiuReactionThermo& thermo = pThermo(); basicMultiComponentMixture& composition = thermo.composition(); volScalarField rho @@ -22,8 +22,8 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); - volScalarField& h = thermo.h(); - volScalarField& hu = thermo.hu(); + volScalarField& ha = thermo.he(); + volScalarField& hau = thermo.heu(); volScalarField& b = composition.Y("b"); Info<< "min(b) = " << min(b).value() << endl; @@ -186,6 +186,6 @@ } fields.add(b); - fields.add(h); - fields.add(hu); + fields.add(ha); + fields.add(hau); flameWrinkling->addXi(fields); diff --git a/applications/solvers/combustion/PDRFoam/hEqn.H b/applications/solvers/combustion/PDRFoam/haEqn.H similarity index 56% rename from applications/solvers/combustion/PDRFoam/hEqn.H rename to applications/solvers/combustion/PDRFoam/haEqn.H index 4d8bb54588ae0fe2348d28862ce1aead46f18d7c..20f605f79c443b189417c6ddfd65d24fcad08126 100644 --- a/applications/solvers/combustion/PDRFoam/hEqn.H +++ b/applications/solvers/combustion/PDRFoam/haEqn.H @@ -1,9 +1,9 @@ { solve ( - betav*fvm::ddt(rho, h) - + mvConvection->fvmDiv(phi, h) - - fvm::laplacian(Db, h) + betav*fvm::ddt(rho, ha) + + mvConvection->fvmDiv(phi, ha) + - fvm::laplacian(Db, ha) == betav*dpdt - betav*(fvc::ddt(rho, K) + fvc::div(phi, K)) diff --git a/applications/solvers/combustion/PDRFoam/hauEqn.H b/applications/solvers/combustion/PDRFoam/hauEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..1cc1a1fd35122076d3b0dc4567ba544dd05105bc --- /dev/null +++ b/applications/solvers/combustion/PDRFoam/hauEqn.H @@ -0,0 +1,18 @@ +if (ign.ignited()) +{ + solve + ( + betav*fvm::ddt(rho, hau) + + mvConvection->fvmDiv(phi, hau) + - fvm::laplacian(Db, hau) + + // These terms cannot be used in partially-premixed combustion due to + // the resultant inconsistency between ft and hau transport. + // A possible solution would be to solve for ftu as well as ft. + //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), hau) + //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hau) + + == + betav*(dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)))*rho/thermo.rhou() + ); +} diff --git a/applications/solvers/combustion/PDRFoam/huEqn.H b/applications/solvers/combustion/PDRFoam/huEqn.H deleted file mode 100644 index f0fa7be5eabadca152c27d6ed24037d5d9a400ed..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/PDRFoam/huEqn.H +++ /dev/null @@ -1,18 +0,0 @@ -if (ign.ignited()) -{ - solve - ( - betav*fvm::ddt(rho, hu) - + mvConvection->fvmDiv(phi, hu) - - fvm::laplacian(Db, hu) - - // These terms cannot be used in partially-premixed combustion due to - // the resultant inconsistency between ft and hu transport. - // A possible solution would be to solve for ftu as well as ft. - //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), hu) - //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu) - - == - betav*(dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)))*rho/thermo.rhou() - ); -} diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index 720f3da389095289d42e8973e2e0e74b4cd193e2..7d28d93c127c5a5c665cd53b1a5e83f049cf6dd0 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -64,7 +64,7 @@ Foam::laminarFlameSpeedModels::SCOPE::polynomial::polynomial Foam::laminarFlameSpeedModels::SCOPE::SCOPE ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) : laminarFlameSpeed(dict, ct), @@ -383,21 +383,21 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma() const { - if (hhuCombustionThermo_.composition().contains("ft")) + if (psiuReactionThermo_.composition().contains("ft")) { - const volScalarField& ft = hhuCombustionThermo_.composition().Y("ft"); + const volScalarField& ft = psiuReactionThermo_.composition().Y("ft"); return Ma ( dimensionedScalar ( - hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio") + psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio") )*ft/(scalar(1) - ft) ); } else { - const fvMesh& mesh = hhuCombustionThermo_.p().mesh(); + const fvMesh& mesh = psiuReactionThermo_.p().mesh(); return tmp<volScalarField> ( @@ -422,17 +422,17 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::operator()() const { - if (hhuCombustionThermo_.composition().contains("ft")) + if (psiuReactionThermo_.composition().contains("ft")) { - const volScalarField& ft = hhuCombustionThermo_.composition().Y("ft"); + const volScalarField& ft = psiuReactionThermo_.composition().Y("ft"); return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), dimensionedScalar ( - hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio") + psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio") )*ft/(scalar(1) - ft) ); } @@ -440,8 +440,8 @@ Foam::laminarFlameSpeedModels::SCOPE::operator()() const { return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), equivalenceRatio_ ); } diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H index cb3dd7f4237f462a7fbbab8d85ee843d05da2a80..32082aa910cd071430970173ed9a7fd087252918 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H @@ -186,11 +186,11 @@ public: // Constructors - //- Construct from dictionary and hhuCombustionThermo + //- Construct from dictionary and psiuReactionThermo SCOPE ( const dictionary&, - const hhuCombustionThermo& + const psiuReactionThermo& ); diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index 069e5b8caa09f77f494ad1737c443329f6c70bf1..841571f3a69803b58b658cc75e18c02e00ecd179 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -50,7 +50,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "turbulenceModel.H" #include "laminarFlameSpeed.H" #include "ignition.H" @@ -97,12 +97,12 @@ int main(int argc, char *argv[]) #include "ftEqn.H" #include "bEqn.H" - #include "huEqn.H" - #include "hEqn.H" + #include "hauEqn.H" + #include "haEqn.H" if (!ign.ignited()) { - hu == h; + hau == ha; } // --- Pressure corrector loop diff --git a/applications/solvers/combustion/XiFoam/createFields.H b/applications/solvers/combustion/XiFoam/createFields.H index 1750c693e5cb986984a29a9a750689b99c39b9c4..a09e1c8f25690dbe842e93a57998951343514c4b 100644 --- a/applications/solvers/combustion/XiFoam/createFields.H +++ b/applications/solvers/combustion/XiFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr<hhuCombustionThermo> pThermo + autoPtr<psiuReactionThermo> pThermo ( - hhuCombustionThermo::New(mesh) + psiuReactionThermo::New(mesh) ); - hhuCombustionThermo& thermo = pThermo(); + psiuReactionThermo& thermo = pThermo(); basicMultiComponentMixture& composition = thermo.composition(); volScalarField rho @@ -22,8 +22,8 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); - volScalarField& h = thermo.h(); - volScalarField& hu = thermo.hu(); + volScalarField& ha = thermo.he(); + volScalarField& hau = thermo.heu(); volScalarField& b = composition.Y("b"); Info<< "min(b) = " << min(b).value() << endl; @@ -45,7 +45,7 @@ mesh ); -# include "compressibleCreatePhi.H" + #include "compressibleCreatePhi.H" Info<< "Creating turbulence model\n" << endl; @@ -128,5 +128,5 @@ } fields.add(b); - fields.add(h); - fields.add(hu); + fields.add(ha); + fields.add(hau); diff --git a/applications/solvers/combustion/XiFoam/ftEqn.H b/applications/solvers/combustion/XiFoam/ftEqn.H index 46d7aeae8228a9d47d3cc28eac64c8b5a65cfb3e..96dbc3f06b6b6aa383d4833a79d20a3af96b5925 100644 --- a/applications/solvers/combustion/XiFoam/ftEqn.H +++ b/applications/solvers/combustion/XiFoam/ftEqn.H @@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection mesh, fields, phi, - mesh.divScheme("div(phi,ft_b_h_hu)") + mesh.divScheme("div(phi,ft_b_ha_hau)") ) ); diff --git a/applications/solvers/combustion/XiFoam/hEqn.H b/applications/solvers/combustion/XiFoam/hEqn.H deleted file mode 100644 index f562466b200fd6fc4ba2f9b3bba63b2f8686887e..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/XiFoam/hEqn.H +++ /dev/null @@ -1,16 +0,0 @@ -{ - fvScalarMatrix hEqn - ( - fvm::ddt(rho, h) - + mvConvection->fvmDiv(phi, h) - - fvm::laplacian(turbulence->alphaEff(), h) - == - dpdt - - (fvc::ddt(rho, K) + fvc::div(phi, K)) - ); - - hEqn.relax(); - hEqn.solve(); - - thermo.correct(); -} diff --git a/applications/solvers/combustion/XiFoam/haEqn.H b/applications/solvers/combustion/XiFoam/haEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..ffbac948ae3cc33ec7ce219cb0d26a9b09b083c7 --- /dev/null +++ b/applications/solvers/combustion/XiFoam/haEqn.H @@ -0,0 +1,16 @@ +{ + fvScalarMatrix haEqn + ( + fvm::ddt(rho, ha) + + mvConvection->fvmDiv(phi, ha) + - fvm::laplacian(turbulence->alphaEff(), ha) + == + dpdt + - (fvc::ddt(rho, K) + fvc::div(phi, K)) + ); + + haEqn.relax(); + haEqn.solve(); + + thermo.correct(); +} diff --git a/applications/solvers/combustion/XiFoam/hauEqn.H b/applications/solvers/combustion/XiFoam/hauEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..d9f5767643dc132b1ee32f4b4d9d5ad80d2656c3 --- /dev/null +++ b/applications/solvers/combustion/XiFoam/hauEqn.H @@ -0,0 +1,18 @@ +if (ign.ignited()) +{ + solve + ( + fvm::ddt(rho, hau) + + mvConvection->fvmDiv(phi, hau) + - fvm::laplacian(turbulence->alphaEff(), hau) + + // These terms cannot be used in partially-premixed combustion due to + // the resultant inconsistency between ft and hau transport. + // A possible solution would be to solve for ftu as well as ft. + //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), hau) + //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hau) + + == + (dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)))*rho/thermo.rhou() + ); +} diff --git a/applications/solvers/combustion/XiFoam/huEqn.H b/applications/solvers/combustion/XiFoam/huEqn.H deleted file mode 100644 index 3059b9445e60dbec71fd7381a39d48b485edeb89..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/XiFoam/huEqn.H +++ /dev/null @@ -1,18 +0,0 @@ -if (ign.ignited()) -{ - solve - ( - fvm::ddt(rho, hu) - + mvConvection->fvmDiv(phi, hu) - - fvm::laplacian(turbulence->alphaEff(), hu) - - // These terms cannot be used in partially-premixed combustion due to - // the resultant inconsistency between ft and hu transport. - // A possible solution would be to solve for ftu as well as ft. - //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), hu) - //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu) - - == - (dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)))*rho/thermo.rhou() - ); -} diff --git a/applications/solvers/combustion/chemFoam/chemFoam.C b/applications/solvers/combustion/chemFoam/chemFoam.C index b58177d6029897523cb76741dc9adb78a8cdab26..f6800cf8713fa235ae0e2e5f4e596644e4efc4c5 100644 --- a/applications/solvers/combustion/chemFoam/chemFoam.C +++ b/applications/solvers/combustion/chemFoam/chemFoam.C @@ -34,7 +34,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hCombustionThermo.H" +#include "psiReactionThermo.H" #include "turbulenceModel.H" #include "psiChemistryModel.H" #include "chemistrySolver.H" diff --git a/applications/solvers/combustion/chemFoam/createFields.H b/applications/solvers/combustion/chemFoam/createFields.H index b37a8818e311f56d8576e44188aabe7866026f3d..3beca02becab79e7b7c1e6246c16808c2ce67a70 100644 --- a/applications/solvers/combustion/chemFoam/createFields.H +++ b/applications/solvers/combustion/chemFoam/createFields.H @@ -29,7 +29,7 @@ psiChemistryModel& chemistry = pChemistry(); scalar dtChem = refCast<const psiChemistryModel>(chemistry).deltaTChem()[0]; - hsCombustionThermo& thermo = chemistry.thermo(); + psiReactionThermo& thermo = chemistry.thermo(); basicMultiComponentMixture& composition = thermo.composition(); PtrList<volScalarField>& Y = composition.Y(); @@ -47,7 +47,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); volScalarField Rspecific ( diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index 08050be81628c0e3cf4596ba684e325a23131022..73e34e510e7bdc8cfe8264df656a4a5b7cfaff2a 100644 --- a/applications/solvers/combustion/chemFoam/readInitialConditions.H +++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H @@ -90,7 +90,7 @@ hs0 += Y0[i]*specieData[i].Hs(T0); } - hs = dimensionedScalar("hs", dimEnergy/dimMass, hs0); + hs = dimensionedScalar("h", dimEnergy/dimMass, hs0); thermo.correct(); @@ -107,5 +107,3 @@ << " T = " << thermo.T()[0] << " [K] " << nl << " rho = " << rho[0] << " [kg/m3]" << nl << endl; - - diff --git a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C index 6ef3a599c17b1d1d65d89f06a6c2b98de8fc0785..1038d8d577b31e33326cd59f8eb3a9049eee6820 100644 --- a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C +++ b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "engineTime.H" #include "engineMesh.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "OFstream.H" #include "pimpleControl.H" diff --git a/applications/solvers/combustion/coldEngineFoam/createFields.H b/applications/solvers/combustion/coldEngineFoam/createFields.H index 6286b1a5553fea4b0a5cd79f20ac3e0572e90adc..04465505797db2ed840bebfdc8db684e1e30a4ee 100644 --- a/applications/solvers/combustion/coldEngineFoam/createFields.H +++ b/applications/solvers/combustion/coldEngineFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr<basicPsiThermo> pThermo + autoPtr<psiThermo> pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField rho ( @@ -21,7 +21,7 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); const volScalarField& T = thermo.T(); diff --git a/applications/solvers/combustion/engineFoam/engineFoam.C b/applications/solvers/combustion/engineFoam/engineFoam.C index 84472420c522d0f0fdd05398dd6982d488b57934..ca6f345f2e4c5aa1ceee55649bd34b25802f5aeb 100644 --- a/applications/solvers/combustion/engineFoam/engineFoam.C +++ b/applications/solvers/combustion/engineFoam/engineFoam.C @@ -51,7 +51,7 @@ Description #include "fvCFD.H" #include "engineTime.H" #include "engineMesh.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "turbulenceModel.H" #include "laminarFlameSpeed.H" #include "ignition.H" @@ -103,12 +103,12 @@ int main(int argc, char *argv[]) #include "ftEqn.H" #include "bEqn.H" - #include "huEqn.H" - #include "hEqn.H" + #include "hauEqn.H" + #include "haEqn.H" if (!ign.ignited()) { - hu == h; + hau == ha; } // --- Pressure corrector loop diff --git a/applications/solvers/combustion/fireFoam/YhsEqn.H b/applications/solvers/combustion/fireFoam/YhsEqn.H index b85396caa171cb21fc55efaad74359adb80c05a1..1319a4d5dff8a31c65a35e0c0b65144b300e0d20 100644 --- a/applications/solvers/combustion/fireFoam/YhsEqn.H +++ b/applications/solvers/combustion/fireFoam/YhsEqn.H @@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection mesh, fields, phi, - mesh.divScheme("div(phi,Yi_hs)") + mesh.divScheme("div(phi,Yi_h)") ) ); { @@ -56,7 +56,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)) + combustion->Sh() - + radiation->Shs(thermo) + + radiation->Sh(thermo) + parcels.Sh(hs) + surfaceFilm.Sh() ); diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index e0c11335e3f691c3ad1ffe2250622372725e1e1f..555e09aefbaa6636a63a5a807e045e1fbcb7088f 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -10,7 +10,7 @@ Info<< "Reading thermophysical properties\n" << endl; - hsCombustionThermo& thermo = combustion->thermo(); + psiReactionThermo& thermo = combustion->thermo(); SLGThermo slgThermo(mesh, thermo); @@ -34,7 +34,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/combustion/reactingFoam/YEqn.H b/applications/solvers/combustion/reactingFoam/YEqn.H index 87b25079ff6dc5b31f09a60fbab9345d56aa2bc5..ccc4b135a5dc1e246492cffda6cca93a0bdcacb3 100644 --- a/applications/solvers/combustion/reactingFoam/YEqn.H +++ b/applications/solvers/combustion/reactingFoam/YEqn.H @@ -10,8 +10,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection ); { - combustion->correct(); - dQ = combustion->dQ(); + reaction->correct(); + dQ = reaction->dQ(); label inertIndex = -1; volScalarField Yt(0.0*Y[0]); @@ -27,7 +27,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff(), Yi) == - combustion->R(Yi) + reaction->R(Yi) ); YiEqn.relax(); diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index 0b6e9ee2e1df3308148b832d222348f60206e531..9e02c8de2e935055b0010192f19859cdfdad6057 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -1,6 +1,6 @@ -Info<< "Creating combustion model\n" << endl; +Info<< "Creating reaction model\n" << endl; -autoPtr<combustionModels::psiChemistryCombustionModel> combustion +autoPtr<combustionModels::psiChemistryCombustionModel> reaction ( combustionModels::psiChemistryCombustionModel::New ( @@ -8,9 +8,9 @@ autoPtr<combustionModels::psiChemistryCombustionModel> combustion ) ); -psiChemistryModel& chemistry = combustion->pChemistry(); +psiChemistryModel& chemistry = reaction->pChemistry(); -hsCombustionThermo& thermo = chemistry.thermo(); +psiReactionThermo& thermo = chemistry.thermo(); basicMultiComponentMixture& composition = thermo.composition(); PtrList<volScalarField>& Y = composition.Y(); @@ -45,7 +45,7 @@ volVectorField U volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); -volScalarField& hs = thermo.hs(); +volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); #include "compressibleCreatePhi.H" @@ -62,8 +62,8 @@ autoPtr<compressible::turbulenceModel> turbulence ) ); -// Set the turbulence into the combustion model -combustion->setTurbulence(turbulence()); +// Set the turbulence into the reaction model +reaction->setTurbulence(turbulence()); Info<< "Creating field dpdt\n" << endl; diff --git a/applications/solvers/combustion/reactingFoam/hsEqn.H b/applications/solvers/combustion/reactingFoam/hsEqn.H index 642b7091bce54db6a81f5871fc2aebd5f5c2af9e..5bc7c5b16982143ed4d7e4277f70b1b9f0712fd3 100644 --- a/applications/solvers/combustion/reactingFoam/hsEqn.H +++ b/applications/solvers/combustion/reactingFoam/hsEqn.H @@ -8,7 +8,7 @@ == dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)) - + combustion->Sh() + + reaction->Sh() ); hsEqn.relax(); diff --git a/applications/solvers/combustion/rhoReactingFoam/YEqn.H b/applications/solvers/combustion/rhoReactingFoam/YEqn.H index 87b25079ff6dc5b31f09a60fbab9345d56aa2bc5..ccc4b135a5dc1e246492cffda6cca93a0bdcacb3 100644 --- a/applications/solvers/combustion/rhoReactingFoam/YEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/YEqn.H @@ -10,8 +10,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection ); { - combustion->correct(); - dQ = combustion->dQ(); + reaction->correct(); + dQ = reaction->dQ(); label inertIndex = -1; volScalarField Yt(0.0*Y[0]); @@ -27,7 +27,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff(), Yi) == - combustion->R(Yi) + reaction->R(Yi) ); YiEqn.relax(); diff --git a/applications/solvers/combustion/rhoReactingFoam/createFields.H b/applications/solvers/combustion/rhoReactingFoam/createFields.H index 690cdc4b6054bde13a5e0904c8604f894ea43f05..5d71e0f0756815c1040516feac21eb6ab6740ba6 100644 --- a/applications/solvers/combustion/rhoReactingFoam/createFields.H +++ b/applications/solvers/combustion/rhoReactingFoam/createFields.H @@ -1,6 +1,6 @@ -Info<< "Creating combustion model\n" << endl; +Info<< "Creating reaction model\n" << endl; -autoPtr<combustionModels::rhoChemistryCombustionModel> combustion +autoPtr<combustionModels::rhoChemistryCombustionModel> reaction ( combustionModels::rhoChemistryCombustionModel::New ( @@ -8,9 +8,9 @@ autoPtr<combustionModels::rhoChemistryCombustionModel> combustion ) ); -rhoChemistryModel& chemistry = combustion->pChemistry(); +rhoChemistryModel& chemistry = reaction->pChemistry(); -hsReactionThermo& thermo = chemistry.thermo(); +rhoReactionThermo& thermo = chemistry.thermo(); basicMultiComponentMixture& composition = thermo.composition(); PtrList<volScalarField>& Y = composition.Y(); @@ -45,7 +45,7 @@ volVectorField U volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); -volScalarField& hs = thermo.hs(); +volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); @@ -64,8 +64,8 @@ autoPtr<compressible::turbulenceModel> turbulence ) ); -// Set the turbulence into the combustion model -combustion->setTurbulence(turbulence()); +// Set the turbulence into the reaction model +reaction->setTurbulence(turbulence()); Info<< "Creating field dpdt\n" << endl; diff --git a/applications/solvers/combustion/rhoReactingFoam/hsEqn.H b/applications/solvers/combustion/rhoReactingFoam/hsEqn.H index ba95be845274b234f80da59e698851297724e4be..f92cfd140b0010aeaa986682b9629915f51d2716 100644 --- a/applications/solvers/combustion/rhoReactingFoam/hsEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/hsEqn.H @@ -8,7 +8,7 @@ == dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)) - + combustion->Sh() + + reaction->Sh() ); hsEqn.relax(); diff --git a/applications/solvers/compressible/rhoCentralFoam/createFields.H b/applications/solvers/compressible/rhoCentralFoam/createFields.H index 60b40db1d13e40147e14a45ebf35524ebd0774cb..c1618d6346a2b8c02dda50ec480b560ab4f043f5 100644 --- a/applications/solvers/compressible/rhoCentralFoam/createFields.H +++ b/applications/solvers/compressible/rhoCentralFoam/createFields.H @@ -1,13 +1,13 @@ Info<< "Reading thermophysical properties\n" << endl; -autoPtr<basicPsiThermo> pThermo +autoPtr<psiThermo> pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); -basicPsiThermo& thermo = pThermo(); +psiThermo& thermo = pThermo(); volScalarField& p = thermo.p(); -volScalarField& e = thermo.e(); +volScalarField& e = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); const volScalarField& mu = thermo.mu(); diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C index 363a8fd2dcfdeec4b0b1ae99082d74645ee3f796..0e793d51d3b1f2b99ac9f58b680c77ff7f827799 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "zeroGradientFvPatchFields.H" #include "fixedRhoFvPatchScalarField.H" diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index df24250066087ce3740304d8edcbb9e81f570dca..64404bd6657dd33b569b12cc333c701ea9117176 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "zeroGradientFvPatchFields.H" #include "fixedRhoFvPatchScalarField.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/createFields.H b/applications/solvers/compressible/rhoPimpleFoam/createFields.H index e2c7b950de7ba519f7eee4eec39b89667d4ef8fd..e81fea629125e0745d126ef65a4fab6370532b62 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPimpleFoam/createFields.H @@ -1,13 +1,13 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr<basicPsiThermo> pThermo + autoPtr<psiThermo> pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField& p = thermo.p(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); const volScalarField& psi = thermo.psi(); volScalarField rho diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index 28787716e0ac365dbb84a8a130e6cf23fdad0c5b..4a4a82db7c562a8e0352000d33cd9e380cdcd176 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -34,7 +34,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "bound.H" #include "pimpleControl.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C index 0b01f51c8217540f654a7d10d57817f9d69b6fc6..73a6f5bd2f4724c9646f26be8b7823406137f8f1 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C @@ -34,7 +34,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "bound.H" #include "pimpleControl.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/rhoPorousMRFLTSPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/rhoPorousMRFLTSPimpleFoam.C index e305916f2928e2dd7dcb1a66fc2a6d2ad8f27dc6..ae57bda4178c8bed59ff86bb1c5f0650453df7bf 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/rhoPorousMRFLTSPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/rhoPorousMRFLTSPimpleFoam.C @@ -35,7 +35,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "MRFZones.H" #include "porousZones.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C index e02787c35d6201c2c7c92635b4177521ce356707..a5adc280546e92084f2ea94e4822c25a01249ec3 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C @@ -34,7 +34,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "bound.H" #include "MRFZones.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H index 8a7d636f99a17060d6e3d4054cae88c3a9e88958..d8fdff55ae8432751a153864d5b8ad9e7b76dfe0 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr<basicPsiThermo> pThermo + autoPtr<psiThermo> pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField rho ( @@ -20,7 +20,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& e = thermo.e(); + volScalarField& e = thermo.he(); const volScalarField& psi = thermo.psi(); Info<< "Reading field U\n" << endl; diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C index c866aea7df043df5fd323b44b87d949d2b21ea72..9238106885dd66fc94689acc7de1b5cb82435db3 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C @@ -32,7 +32,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "RASModel.H" #include "MRFZones.H" #include "thermalPorousZones.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C index bb249f5430950548e154c8241a8c644a5f8b03c3..0eee9129b568412c8e00c76671748d479c54ca8b 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "RASModel.H" #include "simpleControl.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C index 198b5eea40cd64ceec65f2f79f165424c08736c9..561c5e2dc95685ef3b061f1dfb8c37aa817fab1d 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "RASModel.H" #include "mixedFvPatchFields.H" #include "bound.H" diff --git a/applications/solvers/compressible/sonicFoam/createFields.H b/applications/solvers/compressible/sonicFoam/createFields.H index 5d03dd2bb7ccd83fb9f8900e2e2a08f2b3774ba4..14ae0941d211bea33a5b74ca4a90be614e1eb0c7 100644 --- a/applications/solvers/compressible/sonicFoam/createFields.H +++ b/applications/solvers/compressible/sonicFoam/createFields.H @@ -1,13 +1,13 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr<basicPsiThermo> pThermo + autoPtr<psiThermo> pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField& p = thermo.p(); - volScalarField& e = thermo.e(); + volScalarField& e = thermo.he(); const volScalarField& psi = thermo.psi(); volScalarField rho diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C index d4ea27e56699e6d003b5422ab5f5343d5055cb8a..75adb3051388584f0571ab1f65bc2c1ce1f62aec 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "motionSolver.H" diff --git a/applications/solvers/compressible/sonicFoam/sonicFoam.C b/applications/solvers/compressible/sonicFoam/sonicFoam.C index 82dcaeaa907ad4a74f2e8990ff368d21e6439739..b191997788931465d5db6c739303adfd14699258 100644 --- a/applications/solvers/compressible/sonicFoam/sonicFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C index 3e6b46a4bc6c9f15a790409204012a18e6a36860..b287f6c4dc8844b32efc9d3f0a6aad73753da01d 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C @@ -34,7 +34,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicRhoThermo.H" +#include "rhoThermo.H" #include "turbulenceModel.H" #include "fixedGradientFvPatchFields.H" #include "pimpleControl.H" diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H index 1c2a2b94e49f1d1bc7f14bff9fce5d0684d6f727..67760f219d2d5ea7a149602b7ced25ae989dc95d 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr<basicRhoThermo> pThermo + autoPtr<rhoThermo> pThermo ( - basicRhoThermo::New(mesh) + rhoThermo::New(mesh) ); - basicRhoThermo& thermo = pThermo(); + rhoThermo& thermo = pThermo(); volScalarField rho ( @@ -20,7 +20,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index cebe1207d8af1842fc7fcbd7a3408cebdfabcdbe..405a9f48d5281556384ffa12bd5b1c8483dcb50e 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -30,7 +30,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "RASModel.H" #include "fixedGradientFvPatchFields.H" #include "simpleControl.H" diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index d6fa9acee96ce088fe9c4b08bba8ee8b2f7de786..d2fff48837c72ff56fcf3cc1aa08bb0a41323ad9 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr<basicPsiThermo> pThermo + autoPtr<psiThermo> pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField rho ( @@ -20,7 +20,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); const volScalarField& psi = thermo.psi(); Info<< "Reading field U\n" << endl; diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C index fc6a37ea0fe6920967d680126345c80115a1a621..29deb3033478b811ee12baf98ad886f4de120a5e 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "RASModel.H" #include "fixedGradientFvPatchFields.H" #include "radiationModel.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index ab7b6add665c58cd48ddbeafe7d48e7b8e31b8d1..f353696ee629ed2220540be423cf4b99e830b35b 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -37,7 +37,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicRhoThermo.H" +#include "rhoThermo.H" #include "turbulenceModel.H" #include "fixedGradientFvPatchFields.H" #include "regionProperties.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C index 3cfc5af784477ccdf00fcf45b2edf18bd68985e4..5817d09d33933587651c6bc9a7f1b047f05f8747 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C @@ -30,7 +30,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicRhoThermo.H" +#include "rhoThermo.H" #include "turbulenceModel.H" #include "fixedGradientFvPatchFields.H" #include "regionProperties.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H index 0ce4a25ac32dd5bd43702f581a40084326ecd075..c34b547350610a684bbf77d2de057c44782d9bd4 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H @@ -1,7 +1,6 @@ // Initialise fluid field pointer lists - PtrList<basicRhoThermo> thermoFluid(fluidRegions.size()); + PtrList<rhoThermo> thermoFluid(fluidRegions.size()); PtrList<volScalarField> rhoFluid(fluidRegions.size()); - PtrList<volScalarField> kappaFluid(fluidRegions.size()); PtrList<volVectorField> UFluid(fluidRegions.size()); PtrList<surfaceScalarField> phiFluid(fluidRegions.size()); PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size()); @@ -32,7 +31,7 @@ thermoFluid.set ( i, - basicRhoThermo::New(fluidRegions[i]).ptr() + rhoThermo::New(fluidRegions[i]).ptr() ); Info<< " Adding to rhoFluid\n" << endl; @@ -53,24 +52,6 @@ ) ); - Info<< " Adding to kappaFluid\n" << endl; - kappaFluid.set - ( - i, - new volScalarField - ( - IOobject - ( - "kappa", - runTime.timeName(), - fluidRegions[i], - IOobject::NO_READ, - IOobject::NO_WRITE - ), - thermoFluid[i].Cp()*thermoFluid[i].alpha() - ) - ); - Info<< " Adding to UFluid\n" << endl; UFluid.set ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H index d23390edeb046e0efb7c5a32898ecb5ecd395dfb..e6fc3d6f9a3b3de7559b97ec727c6d00c15c9ef0 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H @@ -69,7 +69,4 @@ Info<< "Min/max rho:" << min(rho).value() << ' ' << max(rho).value() << endl; - - // Update thermal conductivity - kappa = thermo.Cp()*turb.alphaEff(); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H index 39d3de96484f316cb063a656aa4fd31faa4612c3..d7e8d6e5c56b69982fa28940f689390676d181ec 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H @@ -1,8 +1,7 @@ const fvMesh& mesh = fluidRegions[i]; - basicRhoThermo& thermo = thermoFluid[i]; + rhoThermo& thermo = thermoFluid[i]; volScalarField& rho = rhoFluid[i]; - volScalarField& kappa = kappaFluid[i]; volVectorField& U = UFluid[i]; surfaceScalarField& phi = phiFluid[i]; @@ -10,7 +9,7 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); IObasicSourceList& sources = heatSources[i]; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/createPorousFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/createPorousFluidFields.H index fa925f4c879c65dc6469d2b5e5960ce249a06f10..00762909f3f60e2db51259074cd244908964da01 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/createPorousFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/createPorousFluidFields.H @@ -1,5 +1,5 @@ // Initialise porous field pointer lists - PtrList<basicRhoThermo> thermoPorous(porousFluidRegions.size()); + PtrList<rhoThermo> thermoPorous(porousFluidRegions.size()); PtrList<volScalarField> rhoPorous(porousFluidRegions.size()); PtrList<volScalarField> kappaPorous(porousFluidRegions.size()); PtrList<volVectorField> UPorous(porousFluidRegions.size()); @@ -32,7 +32,7 @@ thermoPorous.set ( i, - basicRhoThermo::New(porousFluidRegions[i]).ptr() + rhoThermo::New(porousFluidRegions[i]).ptr() ); Info<< " Adding to rhoPorous\n" << endl; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/setPorousFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/setPorousFluidFields.H index 914a6a7b9c1f1af4a49abaf1e24ea545d891de2c..5b3d004372aacaa62c65a0c8c2b7678385cf187b 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/setPorousFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/setPorousFluidFields.H @@ -1,7 +1,6 @@ - const fvMesh& porousMesh = porousFluidRegions[i]; - basicRhoThermo& porousThermo = thermoPorous[i]; + rhoThermo& porousThermo = thermoPorous[i]; volScalarField& porousRho = rhoPorous[i]; volVectorField& porousU = UPorous[i]; @@ -11,7 +10,7 @@ volScalarField& porousP = porousThermo.p(); const volScalarField& porousPsi = porousThermo.psi(); - volScalarField& porousH = porousThermo.h(); + volScalarField& porousH = porousThermo.he(); const dimensionedScalar initialMass ( @@ -27,5 +26,3 @@ const scalar rhoMax = rhoMaxPorous[i].value(); const scalar rhoMin = rhoMinPorous[i].value(); - - diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 27f63f991691dd2a80d11b787b6d51ae70e565ec..84ac7751d7ce7030ae0cfae9b93e05dd2584060e 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -1,7 +1,6 @@ // Initialise fluid field pointer lists - PtrList<basicRhoThermo> thermoFluid(fluidRegions.size()); + PtrList<rhoThermo> thermoFluid(fluidRegions.size()); PtrList<volScalarField> rhoFluid(fluidRegions.size()); - PtrList<volScalarField> kappaFluid(fluidRegions.size()); PtrList<volVectorField> UFluid(fluidRegions.size()); PtrList<surfaceScalarField> phiFluid(fluidRegions.size()); PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size()); @@ -29,7 +28,7 @@ thermoFluid.set ( i, - basicRhoThermo::New(fluidRegions[i]).ptr() + rhoThermo::New(fluidRegions[i]).ptr() ); Info<< " Adding to rhoFluid\n" << endl; @@ -50,24 +49,6 @@ ) ); - Info<< " Adding to kappaFluid\n" << endl; - kappaFluid.set - ( - i, - new volScalarField - ( - IOobject - ( - "kappa", - runTime.timeName(), - fluidRegions[i], - IOobject::NO_READ, - IOobject::NO_WRITE - ), - thermoFluid[i].Cp()*thermoFluid[i].alpha() - ) - ); - Info<< " Adding to UFluid\n" << endl; UFluid.set ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H index f260acc514d42924ea59abe2a246436207903bbf..3a4b1814bc30e9018c7437a625b95641367f721a 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H @@ -92,7 +92,4 @@ rho = thermo.rho(); p_rgh = p - rho*gh; } - - // Update thermal conductivity - kappa = thermoFluid[i].Cp()*turb.alphaEff(); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H index bd1f60c9b8a54e2d2dc2ab3e61d59f3bef451f62..126b8f09613247617f99241229f3fc26f4f144e1 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H @@ -1,8 +1,7 @@ fvMesh& mesh = fluidRegions[i]; - basicRhoThermo& thermo = thermoFluid[i]; + rhoThermo& thermo = thermoFluid[i]; volScalarField& rho = rhoFluid[i]; - volScalarField& kappa = kappaFluid[i]; volVectorField& U = UFluid[i]; surfaceScalarField& phi = phiFluid[i]; @@ -12,7 +11,7 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); volScalarField& p_rgh = p_rghFluid[i]; const volScalarField& gh = ghFluid[i]; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/createPorousFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/createPorousFluidFields.H index 841ce1fee78bd23d258b1e56809403070e2f5d26..7880fe21ba90be820f519a440b8d91f70f49e83b 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/createPorousFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/createPorousFluidFields.H @@ -1,5 +1,5 @@ // Initialise porous field pointer lists - PtrList<basicRhoThermo> thermoPorous(porousFluidRegions.size()); + PtrList<rhoThermo> thermoPorous(porousFluidRegions.size()); PtrList<volScalarField> rhoPorous(porousFluidRegions.size()); PtrList<volVectorField> UPorous(porousFluidRegions.size()); PtrList<surfaceScalarField> phiPorous(porousFluidRegions.size()); @@ -27,7 +27,7 @@ thermoPorous.set ( i, - basicRhoThermo::New(porousFluidRegions[i]).ptr() + rhoThermo::New(porousFluidRegions[i]).ptr() ); Info<< " Adding to rhoPorous\n" << endl; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/setPorousFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/setPorousFluidFields.H index c29a2327245fcaee8d49ae42fb47f34e733ce8b3..36b7b231ffbae7d17037a82a3ec9f700d44730e9 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/setPorousFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/setPorousFluidFields.H @@ -1,7 +1,6 @@ - fvMesh& porousMesh = porousFluidRegions[i]; - basicRhoThermo& porousThermo = thermoPorous[i]; + rhoThermo& porousThermo = thermoPorous[i]; volScalarField& porousRho = rhoPorous[i]; volVectorField& porousU = UPorous[i]; @@ -13,6 +12,6 @@ volScalarField& porousP = porousThermo.p(); const volScalarField& porousPsi = porousThermo.psi(); - volScalarField& porousH = porousThermo.h(); + volScalarField& porousH = porousThermo.he(); IObasicSourceList& porousSources = heatPorousSources[i]; diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H index 264756c8331d46b3626d84bb8085811ef36da7c6..25ceef7aa6c98861bd0b2f0910ec4d01ae261cf5 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H @@ -10,7 +10,7 @@ rhoChemistryModel& chemistry = combustion->pChemistry(); - hsReactionThermo& thermo = chemistry.thermo(); + rhoReactionThermo& thermo = chemistry.thermo(); SLGThermo slgThermo(mesh, thermo); @@ -28,7 +28,7 @@ } volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H index e8a4da764519b0eec8870a46cdc3d8f96525ba8d..15698b6afad922a77d2c18c46cc077e7f55d0a87 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H @@ -7,7 +7,7 @@ == - fvc::div(phi, 0.5*magSqr(U), "div(phi,K)") + parcels.Sh(hs) - + radiation->Shs(thermo) + + radiation->Sh(thermo) + combustion->Sh() + sources(rho, hs) ); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index 8c786ae251beeeab4fd7b50fbc96d0c14d3a44da..9a2b17f1af5d6748d9bdd24c4842ff932c50c178 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -10,7 +10,7 @@ psiChemistryModel& chemistry = combustion->pChemistry(); - hsCombustionThermo& thermo = chemistry.thermo(); + psiReactionThermo& thermo = chemistry.thermo(); SLGThermo slgThermo(mesh, thermo); @@ -28,7 +28,7 @@ } volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H index 6a28b325600595dcd42f3962cae54fe48da59ebe..37d29778c03feec79ef2bcb2929c1c0617058f8c 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H @@ -10,7 +10,7 @@ + combustion->Sh() + coalParcels.Sh(hs) + limestoneParcels.Sh(hs) - + radiation->Shs(thermo) + + radiation->Sh(thermo) + sources(rho, hs) ); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H index a656d4ea8c524c5610748271c9af2300c3e04c77..52ed1508080e364f2af140f1e315f93c91272417 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H @@ -10,7 +10,7 @@ rhoChemistryModel& chemistry = combustion->pChemistry(); - hsReactionThermo& thermo = chemistry.thermo(); + rhoReactionThermo& thermo = chemistry.thermo(); SLGThermo slgThermo(mesh, thermo); @@ -28,7 +28,7 @@ } volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H index fc88ba785e4abfd0de285de86c70f93688711e47..15c598cd59ae3dc6bfbfe76119307f26933eeaf1 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H @@ -7,7 +7,7 @@ == - (fvc::ddt(rho, K) + fvc::div(phi, K)) + parcels.Sh(hs) - + radiation->Shs(thermo) + + radiation->Sh(thermo) + combustion->Sh() + sources(rho, hs) ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H index 4fad16b57d7c16e55aff80e77583d71d72764eca..b14b7d6dae2d32e67e67d7ca2d8ad0fbc8e44533 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H @@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection mesh, fields, phi, - mesh.divScheme("div(phi,Yi_hs)") + mesh.divScheme("div(phi,Yi_h)") ) ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H index 345d795a1822fab0b35f2a3cc896c7f45943a3f5..433e3d0182312afd99904c026be5af464780528c 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -10,7 +10,7 @@ psiChemistryModel& chemistry = combustion->pChemistry(); - hsCombustionThermo& thermo = chemistry.thermo(); + psiReactionThermo& thermo = chemistry.thermo(); SLGThermo slgThermo(mesh, thermo); @@ -34,7 +34,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H index a6124813a913d88e00a137575db4e7e777db84fc..dba268581e3de1805e05c84d5856039d3bee39ae 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H @@ -9,7 +9,7 @@ - (fvc::ddt(rho, K) + fvc::div(phi, K)) + parcels.Sh(hs) + surfaceFilm.Sh() - + radiation->Shs(thermo) + + radiation->Sh(thermo) + combustion->Sh() ); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index 6e764c0d6d5af3a793aee5d2541d7db8be6aa7fc..655510006de49544e492c09d7868dc90cae082b9 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -10,7 +10,7 @@ psiChemistryModel& chemistry = combustion->pChemistry(); - hsCombustionThermo& thermo = chemistry.thermo(); + psiReactionThermo& thermo = chemistry.thermo(); SLGThermo slgThermo(mesh, thermo); @@ -28,7 +28,7 @@ } volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H index 12438380aa7e7fb97793202e6781674b61e45489..9107df21c7aa3e2ec8794c3bdccd73be0bd1b81b 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H @@ -8,7 +8,7 @@ dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)) + parcels.Sh(hs) - + radiation->Shs(thermo) + + radiation->Sh(thermo) + combustion->Sh() ); diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H index 5b5767ef3ebcad95d8ac5a49895f0788a91d3a81..ee38ffa8377a9ef7e9ff1464c0276dae122ee0e9 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr<basicPsiThermo> pThermo + autoPtr<psiThermo> pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField rho ( diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C index 33cf308258d810bb0946ff9bf98a5721e269bc7e..016dd5dbe8fa4009fe56a5c7c6b238f674ec678f 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C @@ -33,7 +33,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "basicKinematicCloud.H" diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H b/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H index d4f142d54523aa937da214a2f8dfc623fd80422c..4461a3aa558c9464f1740790ccd1886c419ad01f 100644 --- a/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H +++ b/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H @@ -3,7 +3,7 @@ autoPtr<basicThermo> thermo basicThermo::New(mesh) ); -const volScalarField& h = thermo->h(); +const volScalarField& h = thermo->he(); volScalarField rho ( diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C index 2789b52f83d7d96655ac1fb30732b4693b0ca75d..18a0dbf6d467de73bb236dc3663e74b8ae3ce1f2 100644 --- a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C +++ b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C @@ -32,7 +32,6 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hCombustionThermo.H" #include "RASModel.H" #include "wallFvPatch.H" @@ -41,7 +40,7 @@ Description int main(int argc, char *argv[]) { timeSelector::addOptions(); -# include "addRegionOption.H" + #include "addRegionOption.H" #include "setRootCase.H" #include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); diff --git a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C index aabd9c1b67b4060feb561c7f743eaaf08c4c613a..79a5374e4c341b42ddfe0097f0105d635e06be1d 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C +++ b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C @@ -37,12 +37,13 @@ Description #include "OSspecific.H" #include "specieThermo.H" +#include "absoluteEnthalpy.H" #include "janafThermo.H" #include "perfectGas.H" using namespace Foam; -typedef specieThermo<janafThermo<perfectGas> > thermo; +typedef specieThermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -178,7 +179,7 @@ int main(int argc, char *argv[]) Info<< "products " << (1/products.nMoles())*products << ';' << endl; - scalar Tad = products.TH(reactants.H(T0), 1000.0); + scalar Tad = products.THa(reactants.Ha(T0), 1000.0); Info<< "Tad = " << Tad << nl << endl; } diff --git a/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C b/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C index 0e67fa0b7ffc4f7b8d466d4755207668e543d128..b51060f10b7763638fb8cd59f273d99d914d4d5f 100644 --- a/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C +++ b/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C @@ -36,13 +36,14 @@ Description #include "IOmanip.H" #include "specieThermo.H" +#include "absoluteEnthalpy.H" #include "janafThermo.H" #include "perfectGas.H" #include "SLPtrList.H" using namespace Foam; -typedef specieThermo<janafThermo<perfectGas> > thermo; +typedef specieThermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: diff --git a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C index 429d44f54d3d803f34c30bf83d289656511d4f6d..4e30fcb85cb5e773c8fc0c232a43773743b7cbae 100644 --- a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C +++ b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C @@ -39,12 +39,13 @@ Description #include "IOmanip.H" #include "specieThermo.H" +#include "absoluteEnthalpy.H" #include "janafThermo.H" #include "perfectGas.H" using namespace Foam; -typedef specieThermo<janafThermo<perfectGas> > thermo; +typedef specieThermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -241,7 +242,7 @@ int main(int argc, char *argv[]) scalar equilibriumFlameTemperatureNew = - products.TH(reactants.H(T0), adiabaticFlameTemperature); + products.THa(reactants.Ha(T0), adiabaticFlameTemperature); if (j==0) { diff --git a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C index 52135a69429d9a58959a88fbbf238177e58d8094..391964d9bbeee85d08aedd09e0df4953fd04f34d 100644 --- a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C +++ b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C @@ -36,13 +36,14 @@ Description #include "OSspecific.H" #include "specieThermo.H" +#include "absoluteEnthalpy.H" #include "janafThermo.H" #include "perfectGas.H" #include "mixture.H" using namespace Foam; -typedef specieThermo<janafThermo<perfectGas> > thermo; +typedef specieThermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -115,7 +116,7 @@ int main(int argc, char *argv[]) } Info<< "Adiabatic flame temperature of mixture " << rMix.name() << " = " - << products.TH(reactants.H(T0), 1000.0) << " K" << endl; + << products.THa(reactants.Ha(T0), 1000.0) << " K" << endl; return 0; } diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H index 099049dfac3a31f7699336c7f8ba3a5bc91b5439..79f60208ed1ecf6469b873c9efd931eb025f2704 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H @@ -112,7 +112,7 @@ public: // Constructors - //- Construct from dictionary and hsCombustionThermo + //- Construct from dictionary and psiReactionThermo reactionRateFlameArea ( const dictionary& dict, diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C index fb6a54c58c632df9549f3d2924cebdc078d11ee8..19b957b2ea38ec9804e69a44fd991c5685f53d2c 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C @@ -48,7 +48,7 @@ Foam::autoPtr<Foam::reactionRateFlameArea> Foam::reactionRateFlameArea::New { FatalIOErrorIn ( - "reactionRateFlameArea::New(const hsCombustionThermo&)", + "reactionRateFlameArea::New(const psiReactionThermo&)", dict ) << "Unknown reactionRateFlameArea type " << reactionRateFlameAreaType << endl << endl diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H index 1984b7e0f6da937d2d7022692c8758408aa6966c..5cfe838f59ce6538c2033731698c7455bd78946f 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H @@ -81,7 +81,7 @@ public: // Constructors - //- Construct from dictionary and hsCombustionThermo + //- Construct from dictionary and psiReactionThermo relaxation ( const word modelType, diff --git a/src/combustionModels/combustionModel/combustionModelNew.C b/src/combustionModels/combustionModel/combustionModelNew.C index 90f8ebd5eb3d9f33473f12c319c1603b302d0d5b..dc50b19c9bd0e311d9c27177f0b2d1aa8ab3414a 100644 --- a/src/combustionModels/combustionModel/combustionModelNew.C +++ b/src/combustionModels/combustionModel/combustionModelNew.C @@ -29,7 +29,7 @@ License Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New ( const dictionary& combustionProperties, - hsCombustionThermo& thermo, + psiReactionThermo& thermo, const compressible::turbulenceModel& turbulence, const surfaceScalarField& phi, const volScalarField& rho diff --git a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.H b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.H index 8b561adda2056f9f65f7599893dfaa32c3c36c31..24ab4c984b0c3b49ea400547165ede7ef8c4ec1c 100644 --- a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.H +++ b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.H @@ -131,10 +131,10 @@ public: inline tmp<volScalarField> rho() const; //- Return const access to rho - inline const hsCombustionThermo& thermo() const; + inline const psiReactionThermo& thermo() const; //- Return non const access to rho - inline hsCombustionThermo& thermo(); + inline psiReactionThermo& thermo(); // I-O diff --git a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelI.H b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelI.H index 66f55c9b84fb5c35ceb224a5e50cbe120fa01abb..e41318befecbe74fe16fbc1cbc9a33d003444119 100644 --- a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelI.H +++ b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelI.H @@ -44,13 +44,13 @@ Foam::combustionModels::psiChemistryCombustionModel::rho() const return pChemistry_->thermo().rho(); } -inline const Foam::hsCombustionThermo& +inline const Foam::psiReactionThermo& Foam::combustionModels::psiChemistryCombustionModel::thermo() const { return pChemistry_->thermo(); } -inline Foam::hsCombustionThermo& +inline Foam::psiReactionThermo& Foam::combustionModels::psiChemistryCombustionModel::thermo() { return pChemistry_->thermo(); diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModel.C b/src/combustionModels/psiCombustionModel/psiCombustionModel.C index 82c3155f2c2f12d0bde7f8ab550a426629e10ec4..28eefb3111dc1046306f51ee016d725939f0aeaf 100644 --- a/src/combustionModels/psiCombustionModel/psiCombustionModel.C +++ b/src/combustionModels/psiCombustionModel/psiCombustionModel.C @@ -46,7 +46,7 @@ Foam::combustionModels::psiCombustionModel::psiCombustionModel ) : combustionModel(modelType, mesh), - thermo_(hsCombustionThermo::New(mesh)) + thermo_(psiReactionThermo::New(mesh)) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModel.H b/src/combustionModels/psiCombustionModel/psiCombustionModel.H index 025778a660f6d14549c8b8d2b6046839ede2c48e..639603a8ac8a7853caa02695f2d3b4b122ca4620 100644 --- a/src/combustionModels/psiCombustionModel/psiCombustionModel.H +++ b/src/combustionModels/psiCombustionModel/psiCombustionModel.H @@ -40,7 +40,7 @@ SourceFiles #include "combustionModel.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" -#include "hsCombustionThermo.H" +#include "psiReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -73,7 +73,7 @@ protected: //- Thermo package - autoPtr<hsCombustionThermo> thermo_; + autoPtr<psiReactionThermo> thermo_; @@ -124,10 +124,10 @@ public: // Member Functions //- Return access to the thermo package - inline hsCombustionThermo& thermo(); + inline psiReactionThermo& thermo(); //- Return const access to the thermo package - inline const hsCombustionThermo& thermo() const; + inline const psiReactionThermo& thermo() const; //- Return tmp of rho virtual tmp<volScalarField> rho() const; diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModelI.H b/src/combustionModels/psiCombustionModel/psiCombustionModelI.H index e8e26d5e7a7a2e9037cf00ac34573cc0b9b8d089..e5c41ccf75b42ff9f582123ebeaa9a635c5c4000 100644 --- a/src/combustionModels/psiCombustionModel/psiCombustionModelI.H +++ b/src/combustionModels/psiCombustionModel/psiCombustionModelI.H @@ -25,13 +25,13 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::hsCombustionThermo& +inline Foam::psiReactionThermo& Foam::combustionModels::psiCombustionModel::thermo() { return thermo_(); } -inline const Foam::hsCombustionThermo& +inline const Foam::psiReactionThermo& Foam::combustionModels::psiCombustionModel::thermo() const { return thermo_(); diff --git a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.H b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.H index 703467589754ef699ad1694efb4adab9d12bf031..b2f3616fb51f2951cfc70f0bb9535a5a43997c79 100644 --- a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.H +++ b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.H @@ -131,10 +131,10 @@ public: inline tmp<volScalarField> rho() const; //- Return const access to rho - inline const hsReactionThermo& thermo() const; + inline const rhoReactionThermo& thermo() const; //- Return non const access to rho - inline hsReactionThermo& thermo(); + inline rhoReactionThermo& thermo(); // I-O diff --git a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelI.H b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelI.H index 8b2cd8c4c4620d75db3a1b1b4c6c5d4d6e8e64f6..095537d2fbcd7359eba5f1f05f76a184a1d32e14 100644 --- a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelI.H +++ b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelI.H @@ -44,13 +44,13 @@ Foam::combustionModels::rhoChemistryCombustionModel::rho() const return pChemistry_->thermo().rho(); } -inline const Foam::hsReactionThermo& +inline const Foam::rhoReactionThermo& Foam::combustionModels::rhoChemistryCombustionModel::thermo() const { return pChemistry_->thermo(); } -inline Foam::hsReactionThermo& +inline Foam::rhoReactionThermo& Foam::combustionModels::rhoChemistryCombustionModel::thermo() { return pChemistry_->thermo(); diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModel.C b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.C index 2807710f2d492ac03e99967e2e700ef7a55b8705..2e02c0ec1916cd57a57975dd341894f78ced78c4 100644 --- a/src/combustionModels/rhoCombustionModel/rhoCombustionModel.C +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.C @@ -46,7 +46,7 @@ Foam::combustionModels::rhoCombustionModel::rhoCombustionModel ) : combustionModel(modelType, mesh), - thermo_(hsReactionThermo::New(mesh)) + thermo_(rhoReactionThermo::New(mesh)) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModel.H b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.H index 6dc9dc2c5b01d3a6c8a52ca2938cef847c9550ae..5923e3317b230d7eace6d14f723ca0ec8b704b41 100644 --- a/src/combustionModels/rhoCombustionModel/rhoCombustionModel.H +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.H @@ -40,7 +40,7 @@ SourceFiles #include "combustionModel.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" -#include "hsReactionThermo.H" +#include "rhoReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,7 +72,7 @@ protected: // Protected data //- Thermo package - autoPtr<hsReactionThermo> thermo_; + autoPtr<rhoReactionThermo> thermo_; public: @@ -127,10 +127,10 @@ public: //- Return access to the thermo package - inline hsReactionThermo& thermo(); + inline rhoReactionThermo& thermo(); //- Return const access to the thermo package - inline const hsReactionThermo& thermo() const; + inline const rhoReactionThermo& thermo() const; //- Return tmp of rho virtual tmp<volScalarField> rho() const; diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModelI.H b/src/combustionModels/rhoCombustionModel/rhoCombustionModelI.H index 002eba7ff93740c2a4abc47e2e22409972b88c5e..59618b961a10abb9dd5229e0d84120856d5f3e87 100644 --- a/src/combustionModels/rhoCombustionModel/rhoCombustionModelI.H +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModelI.H @@ -25,13 +25,13 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::hsReactionThermo& +inline Foam::rhoReactionThermo& Foam::combustionModels::rhoCombustionModel::thermo() { return thermo_(); } -inline const Foam::hsReactionThermo& +inline const Foam::rhoReactionThermo& Foam::combustionModels::rhoCombustionModel::thermo() const { return thermo_(); diff --git a/src/fieldSources/basicSource/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C b/src/fieldSources/basicSource/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C index bce2c5a66ab86241881bc8d0d97d241d6bc7da13..580b7b0c465b26357472743c805ed2e8483ed7d6 100644 --- a/src/fieldSources/basicSource/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C +++ b/src/fieldSources/basicSource/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C @@ -124,14 +124,12 @@ calculateHtc() const volScalarField Nu(a_*pow(Re, b_)*pow(Pr_, c_)); - const volScalarField K(turb.alphaEff()*secondaryThermo.Cp()); - scalarField htcMapped(htc_.internalField().size(), 0.0); secondaryToPrimaryInterpPtr_->interpolateInternalField ( htcMapped, - Nu*K/ds_, + Nu*turb.kappaEff()/ds_, meshToMesh::MAP, eqOp<scalar>() ); @@ -184,4 +182,4 @@ bool Foam::variableHeatTransfer::read(const dictionary& dict) } -// ************************************************************************* // \ No newline at end of file +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index 1844a6b21e7c8833351aa3df5fa066205366361c..9eaa87705785e31ed8ed815322f510218e659f09 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -296,8 +296,8 @@ void Foam::ThermoCloud<CloudType>::relaxSources { CloudType::relaxSources(cloudOldTime); - this->relax(hsTrans_(), cloudOldTime.hsTrans(), "hs"); - this->relax(hsCoeff_(), cloudOldTime.hsCoeff(), "hs"); + this->relax(hsTrans_(), cloudOldTime.hsTrans(), "h"); + this->relax(hsCoeff_(), cloudOldTime.hsCoeff(), "h"); } @@ -306,8 +306,8 @@ void Foam::ThermoCloud<CloudType>::scaleSources() { CloudType::scaleSources(); - this->scale(hsTrans_(), "hs"); - this->scale(hsCoeff_(), "hs"); + this->scale(hsTrans_(), "h"); + this->scale(hsCoeff_(), "h"); } diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H index e7f01f7c66199a853f6e08df89aec9872d140754..f78755a2e2497b92cb7db67bcfb97c5aa5a3c98d 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H @@ -135,7 +135,7 @@ Foam::ThermoCloud<CloudType>::Sh(volScalarField& hs) const if (this->solution().coupled()) { - if (this->solution().semiImplicit("hs")) + if (this->solution().semiImplicit("h")) { const volScalarField Cp(thermo_.thermo().Cp()); const DimensionedField<scalar, volMesh> diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C index ffd5329fbdcc42f3a5b4b3aa14fe42ebd4eaae31..f517e1162458996dc711fd8fa144310638a976f8 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C @@ -396,7 +396,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::H forAll(Y, i) { label gid = props.globalIds()[i]; - HMixture += Y[i]*thermo_.carrier().H(gid, T); + HMixture += Y[i]*thermo_.carrier().Hs(gid, T); } break; } diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C index e5948b85a7c1a4dba9be6037dd675f0f3ef10620..900b580811aae31f5124d54b60aea2338afd73ca 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C @@ -216,7 +216,7 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::dh } case (parent::etEnthalpyDifference): { - scalar hc = this->owner().composition().carrier().H(idc, T); + scalar hc = this->owner().composition().carrier().Hs(idc, T); scalar hp = liquids_.properties()[idl].h(p, T); dh = hc - hp; diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C index 643beb55e1832d83c4e674515dd4bac3a28a3dc8..6c9668cd0664bdc0bb12d79e876aef033ccf52d3 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C @@ -171,8 +171,8 @@ void Foam::LiquidEvaporationBoil<CloudType>::calculate forAll(this->owner().thermo().carrier().Y(), i) { scalar Yc = this->owner().thermo().carrier().Y()[i][cellI]; - Hc += Yc*this->owner().thermo().carrier().H(i, Tc); - Hsc += Yc*this->owner().thermo().carrier().H(i, Ts); + Hc += Yc*this->owner().thermo().carrier().Hs(i, Tc); + Hsc += Yc*this->owner().thermo().carrier().Hs(i, Ts); Cpc += Yc*this->owner().thermo().carrier().Cp(i, Ts); kappac += Yc*this->owner().thermo().carrier().kappa(i, Ts); } @@ -315,7 +315,7 @@ Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::dh } case (parent::etEnthalpyDifference): { - scalar hc = this->owner().composition().carrier().H(idc, TDash); + scalar hc = this->owner().composition().carrier().Hs(idc, TDash); scalar hp = liquids_.properties()[idl].h(p, TDash); dh = hc - hp; diff --git a/src/mesh/blockMesh/blockMesh/blockMeshMerge.C b/src/mesh/blockMesh/blockMesh/blockMeshMerge.C index b97270f6c3d00f5d06e8a3c7c0347132940374c9..5d0d7f421763bd05f4196f1988144d7cb5eeab08 100644 --- a/src/mesh/blockMesh/blockMesh/blockMeshMerge.C +++ b/src/mesh/blockMesh/blockMesh/blockMeshMerge.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -118,7 +118,7 @@ void Foam::blockMesh::calcMergeInfo() // the size of the block. boundBox bb(blockCells[blockPlabel].points(blockFaces, blockPoints)); - const scalar mergeSqrDist = SMALL*magSqr(bb.span()); + const scalar mergeSqrDist = magSqr(SMALL*bb.span()); // This is an N^2 algorithm diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index c405d98fa9fc20206f80cf1ad33f7cca8289f4f8..bfa05abf8506ca8bee1ee2dab8791cea31e2a0c4 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -383,7 +383,7 @@ thermoSingleLayer::thermoSingleLayer ( IOobject ( - "hsf", + "hf", time().timeName(), regionMesh(), IOobject::NO_READ, diff --git a/src/thermophysicalModels/basic/Make/files b/src/thermophysicalModels/basic/Make/files index 1c08f455dfd1f1231e23ddf8d4b1835b2cec8fb9..882fa2e54c929049d9eb99d263ffb3b1cdd40c02 100644 --- a/src/thermophysicalModels/basic/Make/files +++ b/src/thermophysicalModels/basic/Make/files @@ -4,24 +4,17 @@ mixtures/basicMixture/basicMixtures.C basicThermo/basicThermo.C basicThermo/basicThermoNew.C -psiThermo/basicPsiThermo/basicPsiThermo.C -psiThermo/basicPsiThermo/basicPsiThermoNew.C -psiThermo/hPsiThermo/hPsiThermos.C -psiThermo/hsPsiThermo/hsPsiThermos.C -psiThermo/ePsiThermo/ePsiThermos.C +psiThermo/psiThermo/psiThermo.C +psiThermo/psiThermo/psiThermoNew.C +psiThermo/hePsiThermo/hePsiThermos.C -rhoThermo/basicRhoThermo/basicRhoThermo.C -rhoThermo/basicRhoThermo/basicRhoThermoNew.C -rhoThermo/hRhoThermo/hRhoThermos.C -rhoThermo/hsRhoThermo/hsRhoThermos.C +rhoThermo/rhoThermo/rhoThermo.C +rhoThermo/rhoThermo/rhoThermoNew.C +rhoThermo/heRhoThermo/heRhoThermos.C -derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C -derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C -derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C - -derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.C -derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.C -derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C +derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C +derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C +derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index 59c00560407c1f35fba58930b69ded28f8261ad6..09df66bfe2197b3a890c3d8d88679d36d7942c83 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -27,12 +27,9 @@ License #include "fvMesh.H" #include "HashTable.H" #include "zeroGradientFvPatchFields.H" -#include "fixedEnthalpyFvPatchScalarField.H" -#include "gradientEnthalpyFvPatchScalarField.H" -#include "mixedEnthalpyFvPatchScalarField.H" -#include "fixedInternalEnergyFvPatchScalarField.H" -#include "gradientInternalEnergyFvPatchScalarField.H" -#include "mixedInternalEnergyFvPatchScalarField.H" +#include "fixedEnergyFvPatchScalarField.H" +#include "gradientEnergyFvPatchScalarField.H" +#include "mixedEnergyFvPatchScalarField.H" /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ @@ -44,7 +41,7 @@ namespace Foam // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -Foam::wordList Foam::basicThermo::hBoundaryTypes() +Foam::wordList Foam::basicThermo::heBoundaryTypes() { const volScalarField::GeometricBoundaryField& tbf = T_.boundaryField(); @@ -54,7 +51,7 @@ Foam::wordList Foam::basicThermo::hBoundaryTypes() { if (isA<fixedValueFvPatchScalarField>(tbf[patchi])) { - hbt[patchi] = fixedEnthalpyFvPatchScalarField::typeName; + hbt[patchi] = fixedEnergyFvPatchScalarField::typeName; } else if ( @@ -62,11 +59,11 @@ Foam::wordList Foam::basicThermo::hBoundaryTypes() || isA<fixedGradientFvPatchScalarField>(tbf[patchi]) ) { - hbt[patchi] = gradientEnthalpyFvPatchScalarField::typeName; + hbt[patchi] = gradientEnergyFvPatchScalarField::typeName; } else if (isA<mixedFvPatchScalarField>(tbf[patchi])) { - hbt[patchi] = mixedEnthalpyFvPatchScalarField::typeName; + hbt[patchi] = mixedEnergyFvPatchScalarField::typeName; } } @@ -74,75 +71,26 @@ Foam::wordList Foam::basicThermo::hBoundaryTypes() } -void Foam::basicThermo::hBoundaryCorrection(volScalarField& h) +void Foam::basicThermo::heBoundaryCorrection(volScalarField& h) { volScalarField::GeometricBoundaryField& hbf = h.boundaryField(); forAll(hbf, patchi) { - if (isA<gradientEnthalpyFvPatchScalarField>(hbf[patchi])) + if (isA<gradientEnergyFvPatchScalarField>(hbf[patchi])) { - refCast<gradientEnthalpyFvPatchScalarField>(hbf[patchi]).gradient() + refCast<gradientEnergyFvPatchScalarField>(hbf[patchi]).gradient() = hbf[patchi].fvPatchField::snGrad(); } - else if (isA<mixedEnthalpyFvPatchScalarField>(hbf[patchi])) + else if (isA<mixedEnergyFvPatchScalarField>(hbf[patchi])) { - refCast<mixedEnthalpyFvPatchScalarField>(hbf[patchi]).refGrad() + refCast<mixedEnergyFvPatchScalarField>(hbf[patchi]).refGrad() = hbf[patchi].fvPatchField::snGrad(); } } } -Foam::wordList Foam::basicThermo::eBoundaryTypes() -{ - const volScalarField::GeometricBoundaryField& tbf = T_.boundaryField(); - - wordList ebt = tbf.types(); - - forAll(tbf, patchi) - { - if (isA<fixedValueFvPatchScalarField>(tbf[patchi])) - { - ebt[patchi] = fixedInternalEnergyFvPatchScalarField::typeName; - } - else if - ( - isA<zeroGradientFvPatchScalarField>(tbf[patchi]) - || isA<fixedGradientFvPatchScalarField>(tbf[patchi]) - ) - { - ebt[patchi] = gradientInternalEnergyFvPatchScalarField::typeName; - } - else if (isA<mixedFvPatchScalarField>(tbf[patchi])) - { - ebt[patchi] = mixedInternalEnergyFvPatchScalarField::typeName; - } - } - - return ebt; -} - - -void Foam::basicThermo::eBoundaryCorrection(volScalarField& e) -{ - volScalarField::GeometricBoundaryField& ebf = e.boundaryField(); - - forAll(ebf, patchi) - { - if (isA<gradientInternalEnergyFvPatchScalarField>(ebf[patchi])) - { - refCast<gradientInternalEnergyFvPatchScalarField>(ebf[patchi]) - .gradient() = ebf[patchi].fvPatchField::snGrad(); - } - else if (isA<mixedInternalEnergyFvPatchScalarField>(ebf[patchi])) - { - refCast<mixedInternalEnergyFvPatchScalarField>(ebf[patchi]) - .refGrad() = ebf[patchi].fvPatchField::snGrad(); - } - } -} - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::basicThermo::basicThermo(const fvMesh& mesh) @@ -255,227 +203,12 @@ const Foam::volScalarField& Foam::basicThermo::psi() const } -Foam::volScalarField& Foam::basicThermo::h() -{ - notImplemented("basicThermo::h()"); - return const_cast<volScalarField&>(volScalarField::null()); -} - - -const Foam::volScalarField& Foam::basicThermo::h() const -{ - notImplemented("basicThermo::h() const"); - return volScalarField::null(); -} - - -Foam::tmp<Foam::scalarField> Foam::basicThermo::h -( - const scalarField& T, - const labelList& cells -) const -{ - notImplemented - ( - "basicThermo::h" - "(const scalarField& T, const labelList& cells) const" - ); - return tmp<scalarField>(NULL); -} - - -Foam::tmp<Foam::scalarField> Foam::basicThermo::h -( - const scalarField& T, - const label patchi -) const -{ - notImplemented - ( - "basicThermo::h" - "(const scalarField& T, const label patchi) const" - ); - return tmp<scalarField>(NULL); -} - - -Foam::volScalarField& Foam::basicThermo::hs() -{ - notImplemented("basicThermo::hs()"); - return const_cast<volScalarField&>(volScalarField::null()); -} - - -const Foam::volScalarField& Foam::basicThermo::hs() const -{ - notImplemented("basicThermo::hs() const"); - return volScalarField::null(); -} - - -Foam::tmp<Foam::scalarField> Foam::basicThermo::hs -( - const scalarField& T, - const labelList& cells -) const -{ - notImplemented - ( - "basicThermo::hs" - "(const scalarField& T, const labelList& cells) const" - ); - return tmp<scalarField>(NULL); -} - - -Foam::tmp<Foam::scalarField> Foam::basicThermo::hs -( - const scalarField& T, - const label patchi -) const -{ - notImplemented - ( - "basicThermo::hs" - "(const scalarField& T, const label patchi) const" - ); - return tmp<scalarField>(NULL); -} - - -Foam::tmp<Foam::volScalarField> Foam::basicThermo::hc() const -{ - notImplemented("basicThermo::hc()"); - return volScalarField::null(); -} - - -Foam::tmp<Foam::scalarField> Foam::basicThermo::TH -( - const scalarField& h, - const scalarField& T0, // starting temperature - const labelList& cells -) const -{ - notImplemented - ( - "basicThermo::TH" - "(const scalarField&, const scalarField&, const labelList&) const" - ); - return tmp<scalarField>(NULL); -} - - -Foam::tmp<Foam::scalarField> Foam::basicThermo::TH -( - const scalarField& h, - const scalarField& T0, // starting temperature - const label patchi -) const -{ - notImplemented - ( - "basicThermo::TH" - "(const scalarField&, const scalarField&, const label) const" - ); - return tmp<scalarField>(NULL); -} - - -Foam::volScalarField& Foam::basicThermo::e() -{ - notImplemented("basicThermo::e()"); - return const_cast<volScalarField&>(volScalarField::null()); -} - - -const Foam::volScalarField& Foam::basicThermo::e() const -{ - notImplemented("basicThermo::e()"); - return volScalarField::null(); -} - - -Foam::tmp<Foam::scalarField> Foam::basicThermo::e -( - const scalarField& T, - const labelList& cells -) const -{ - notImplemented - ( - "basicThermo::e" - "(const scalarField& T, const labelList& cells) const" - ); - return tmp<scalarField>(NULL); -} - - -Foam::tmp<Foam::scalarField> Foam::basicThermo::e -( - const scalarField& T, - const label patchi -) const -{ - notImplemented - ( - "basicThermo::e" - "(const scalarField& T, const label patchi) const" - ); - return tmp<scalarField>(NULL); -} - - const Foam::volScalarField& Foam::basicThermo::T() const { return T_; } -Foam::tmp<Foam::scalarField> Foam::basicThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - notImplemented - ( - "basicThermo::Cp" - "(const scalarField& T, const label patchi) const" - ); - return tmp<scalarField>(NULL); -} - - -Foam::tmp<Foam::volScalarField> Foam::basicThermo::Cp() const -{ - notImplemented("basicThermo::Cp() const"); - return volScalarField::null(); -} - - -Foam::tmp<Foam::scalarField> Foam::basicThermo::Cv -( - const scalarField& T, - const label patchi -) const -{ - notImplemented - ( - "basicThermo::Cv" - "(const scalarField& T, const label patchi) const" - ); - return tmp<scalarField>(NULL); -} - - -Foam::tmp<Foam::volScalarField> Foam::basicThermo::Cv() const -{ - notImplemented("basicThermo::Cv() const"); - return volScalarField::null(); -} - - const Foam::volScalarField& Foam::basicThermo::mu() const { return mu_; diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.H b/src/thermophysicalModels/basic/basicThermo/basicThermo.H index 92c4b01258475d2469efd0cef44531de1be08686..59ac5f1195554afe4816d721e3a10f0b7fdecbcf 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.H +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.H @@ -79,24 +79,14 @@ protected: // Protected Member Functions - // Enthalpy + // Enthalpy/Internal energy - //- Return the enthalpy field boundary types by interrogating the - // temperature field boundary types - wordList hBoundaryTypes(); + //- Return the enthalpy/internal energy field boundary types + // by interrogating the temperature field boundary types + wordList heBoundaryTypes(); - //- Correct the enthalpy field boundaries - void hBoundaryCorrection(volScalarField& h); - - - // Internal energy - - //- Return the internal energy field boundary types by - // interrogating the temperature field boundary types - wordList eBoundaryTypes(); - - //- Correct the internal energy field boundaries - void eBoundaryCorrection(volScalarField& e); + //- Correct the enthalpy/internal energy field boundaries + void heBoundaryCorrection(volScalarField& he); //- Construct as copy (not implemented) @@ -153,113 +143,101 @@ public: //- Compressibility [s^2/m^2] virtual const volScalarField& psi() const; - //- Total enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& h(); - - //- Total enthalpy [J/kg] - virtual const volScalarField& h() const; - - //- Total enthalpy for cell-set [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Total enthalpy for patch [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const label patchi - ) const; - - //- Sensible enthalpy [J/kg] + //- Enthalpy/Internal energy [J/kg] // Non-const access allowed for transport equations - virtual volScalarField& hs(); + virtual volScalarField& he() = 0; - //- Sensible enthalpy [J/kg] - virtual const volScalarField& hs() const; + //- Enthalpy/Internal energy [J/kg] + virtual const volScalarField& he() const = 0; - //- Sensible enthalpy for cell-set [J/kg] - virtual tmp<scalarField> hs + //- Enthalpy/Internal energy for cell-set [J/kg] + virtual tmp<scalarField> he ( const scalarField& T, const labelList& cells - ) const; + ) const = 0; - //- Sensible enthalpy for patch [J/kg] - virtual tmp<scalarField> hs + //- Enthalpy/Internal energy for patch [J/kg] + virtual tmp<scalarField> he ( const scalarField& T, const label patchi - ) const; + ) const = 0; //- Chemical enthalpy [J/kg] - virtual tmp<volScalarField> hc() const; + virtual tmp<volScalarField> hc() const = 0; - //- Temperature from enthalpy for cell-set - virtual tmp<scalarField> TH + //- Temperature from enthalpy/internal energy for cell-set + virtual tmp<scalarField> THE ( const scalarField& h, const scalarField& T0, // starting temperature const labelList& cells - ) const; + ) const = 0; - //- Temperature from enthalpy for patch - virtual tmp<scalarField> TH + //- Temperature from enthalpy/internal energy for patch + virtual tmp<scalarField> THE ( const scalarField& h, const scalarField& T0, // starting temperature const label patchi - ) const; + ) const = 0; - //- Internal energy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& e(); - //- Internal energy [J/kg] - virtual const volScalarField& e() const; + // Fields derived from thermodynamic state variables + + //- Temperature [K] + virtual const volScalarField& T() const; + + //- Heat capacity at constant pressure [J/kg/K] + virtual tmp<volScalarField> Cp() const = 0; - //- Internal energy for cell-set [J/kg] - virtual tmp<scalarField> e + //- Heat capacity at constant pressure for patch [J/kg/K] + virtual tmp<scalarField> Cp ( const scalarField& T, - const labelList& cells - ) const; + const label patchi + ) const = 0; - //- Internal energy for patch [J/kg] - virtual tmp<scalarField> e + //- Heat capacity at constant volume [J/kg/K] + virtual tmp<volScalarField> Cv() const = 0; + + //- Heat capacity at constant volume for patch [J/kg/K] + virtual tmp<scalarField> Cv ( const scalarField& T, const label patchi - ) const; + ) const = 0; + //- gamma = Cp/Cv [] + virtual tmp<volScalarField> gamma() const = 0; - // Fields derived from thermodynamic state variables + //- gamma = Cp/Cv for patch [] + virtual tmp<scalarField> gamma + ( + const scalarField& T, + const label patchi + ) const = 0; - //- Temperature [K] - virtual const volScalarField& T() const; + //- Heat capacity at constant pressure/volume [J/kg/K] + virtual tmp<volScalarField> Cpv() const = 0; - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp<scalarField> Cp + //- Heat capacity at constant pressure/volume for patch [J/kg/K] + virtual tmp<scalarField> Cpv ( const scalarField& T, const label patchi - ) const; + ) const = 0; - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp<volScalarField> Cp() const; + //- Heat capacity ratio [] + virtual tmp<volScalarField> CpByCpv() const = 0; - //- Heat capacity at constant volume for patch [J/kg/K] - virtual tmp<scalarField> Cv + //- Heat capacity ratio for patch [] + virtual tmp<scalarField> CpByCpv ( const scalarField& T, const label patchi - ) const; - - //- Heat capacity at constant volume [J/kg/K] - virtual tmp<volScalarField> Cv() const; + ) const = 0; // Access to transport state variables @@ -271,6 +249,44 @@ public: virtual const volScalarField& alpha() const; + // Fields derived from transport state variables + + //- Thermal diffusivity for temperature of mixture [J/m/s/K] + virtual tmp<volScalarField> kappa() const = 0; + + //- Thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp<scalarField> kappa + ( + const label patchi + ) const = 0; + + //- Effective thermal diffusivity of mixture [J/m/s/K] + virtual tmp<volScalarField> kappaEff + ( + const volScalarField& + ) const = 0; + + //- Effective thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp<scalarField> kappaEff + ( + const scalarField& alphat, + const label patchi + ) const = 0; + + //- Effective thermal diffusivity of mixture [J/m/s/K] + virtual tmp<volScalarField> alphaEff + ( + const volScalarField& alphat + ) const = 0; + + //- Effective thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp<scalarField> alphaEff + ( + const scalarField& alphat, + const label patchi + ) const = 0; + + //- Read thermophysicalProperties dictionary virtual bool read(); }; diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C similarity index 77% rename from src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.C rename to src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C index ab28a0b5d93ed7affa712d2d89f09c630c0348b7..78a560743545d22ae72af6bd982c0a1bda36439f 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "fixedInternalEnergyFvPatchScalarField.H" +#include "fixedEnergyFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -31,8 +31,8 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::fixedInternalEnergyFvPatchScalarField:: -fixedInternalEnergyFvPatchScalarField +Foam::fixedEnergyFvPatchScalarField:: +fixedEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF @@ -42,10 +42,10 @@ fixedInternalEnergyFvPatchScalarField {} -Foam::fixedInternalEnergyFvPatchScalarField:: -fixedInternalEnergyFvPatchScalarField +Foam::fixedEnergyFvPatchScalarField:: +fixedEnergyFvPatchScalarField ( - const fixedInternalEnergyFvPatchScalarField& ptf, + const fixedEnergyFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, const fvPatchFieldMapper& mapper @@ -55,8 +55,8 @@ fixedInternalEnergyFvPatchScalarField {} -Foam::fixedInternalEnergyFvPatchScalarField:: -fixedInternalEnergyFvPatchScalarField +Foam::fixedEnergyFvPatchScalarField:: +fixedEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, @@ -67,20 +67,20 @@ fixedInternalEnergyFvPatchScalarField {} -Foam::fixedInternalEnergyFvPatchScalarField:: -fixedInternalEnergyFvPatchScalarField +Foam::fixedEnergyFvPatchScalarField:: +fixedEnergyFvPatchScalarField ( - const fixedInternalEnergyFvPatchScalarField& tppsf + const fixedEnergyFvPatchScalarField& tppsf ) : fixedValueFvPatchScalarField(tppsf) {} -Foam::fixedInternalEnergyFvPatchScalarField:: -fixedInternalEnergyFvPatchScalarField +Foam::fixedEnergyFvPatchScalarField:: +fixedEnergyFvPatchScalarField ( - const fixedInternalEnergyFvPatchScalarField& tppsf, + const fixedEnergyFvPatchScalarField& tppsf, const DimensionedField<scalar, volMesh>& iF ) : @@ -90,7 +90,7 @@ fixedInternalEnergyFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::fixedInternalEnergyFvPatchScalarField::updateCoeffs() +void Foam::fixedEnergyFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -107,7 +107,7 @@ void Foam::fixedInternalEnergyFvPatchScalarField::updateCoeffs() fvPatchScalarField& Tw = const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi]); Tw.evaluate(); - operator==(thermo.e(Tw, patchi)); + operator==(thermo.he(Tw, patchi)); fixedValueFvPatchScalarField::updateCoeffs(); } @@ -120,7 +120,7 @@ namespace Foam makePatchTypeField ( fvPatchScalarField, - fixedInternalEnergyFvPatchScalarField + fixedEnergyFvPatchScalarField ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.H similarity index 78% rename from src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.H rename to src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.H index 196d4dfc3202ea79fd624d744c4a9e21f16a7593..7f29873fedd9c792765d2d45ad6eb67a02b45a96 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.H @@ -22,18 +22,18 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::fixedEnthalpyFvPatchScalarField + Foam::fixedEnergyFvPatchScalarField Description - A fixed boundary condition for enthalpy + A fixed boundary condition for internal energy SourceFiles - fixedEnthalpyFvPatchScalarField.C + fixedEnergyFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef fixedEnthalpyFvPatchScalarField_H -#define fixedEnthalpyFvPatchScalarField_H +#ifndef fixedEnergyFvPatchScalarField_H +#define fixedEnergyFvPatchScalarField_H #include "fixedValueFvPatchFields.H" @@ -43,10 +43,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class fixedEnthalpyFvPatchScalarField Declaration + Class fixedEnergyFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class fixedEnthalpyFvPatchScalarField +class fixedEnergyFvPatchScalarField : public fixedValueFvPatchScalarField { @@ -54,40 +54,40 @@ class fixedEnthalpyFvPatchScalarField public: //- Runtime type information - TypeName("fixedEnthalpy"); + TypeName("fixedEnergy"); // Constructors //- Construct from patch and internal field - fixedEnthalpyFvPatchScalarField + fixedEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>& ); //- Construct from patch, internal field and dictionary - fixedEnthalpyFvPatchScalarField + fixedEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>&, const dictionary& ); - //- Construct by mapping given fixedEnthalpyFvPatchScalarField + //- Construct by mapping given fixedEnergyFvPatchScalarField // onto a new patch - fixedEnthalpyFvPatchScalarField + fixedEnergyFvPatchScalarField ( - const fixedEnthalpyFvPatchScalarField&, + const fixedEnergyFvPatchScalarField&, const fvPatch&, const DimensionedField<scalar, volMesh>&, const fvPatchFieldMapper& ); //- Construct as copy - fixedEnthalpyFvPatchScalarField + fixedEnergyFvPatchScalarField ( - const fixedEnthalpyFvPatchScalarField& + const fixedEnergyFvPatchScalarField& ); //- Construct and return a clone @@ -95,14 +95,14 @@ public: { return tmp<fvPatchScalarField> ( - new fixedEnthalpyFvPatchScalarField(*this) + new fixedEnergyFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - fixedEnthalpyFvPatchScalarField + fixedEnergyFvPatchScalarField ( - const fixedEnthalpyFvPatchScalarField&, + const fixedEnergyFvPatchScalarField&, const DimensionedField<scalar, volMesh>& ); @@ -114,7 +114,7 @@ public: { return tmp<fvPatchScalarField> ( - new fixedEnthalpyFvPatchScalarField(*this, iF) + new fixedEnergyFvPatchScalarField(*this, iF) ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C deleted file mode 100644 index 267e649e85645b17b71256e4542d6745086434ba..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C +++ /dev/null @@ -1,131 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "fixedEnthalpyFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "basicThermo.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchScalarField(p, iF) -{} - - -Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField -( - const fixedEnthalpyFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper) -{} - - -Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF, dict) -{} - - -Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField -( - const fixedEnthalpyFvPatchScalarField& tppsf -) -: - fixedValueFvPatchScalarField(tppsf) -{} - - -Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField -( - const fixedEnthalpyFvPatchScalarField& tppsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchScalarField(tppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::fixedEnthalpyFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const basicThermo& thermo = db().lookupObject<basicThermo> - ( - "thermophysicalProperties" - ); - - const label patchi = patch().index(); - - fvPatchScalarField& Tw = - const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi]); - Tw.evaluate(); - - if (dimensionedInternalField().name() == "h") - { - operator==(thermo.h(Tw, patchi)); - } - else - { - operator==(thermo.hs(Tw, patchi)); - } - - fixedValueFvPatchScalarField::updateCoeffs(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePatchTypeField - ( - fvPatchScalarField, - fixedEnthalpyFvPatchScalarField - ); -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.H deleted file mode 100644 index 4e8997b61db11ae0ced77052aed15fe00e068d4f..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.H +++ /dev/null @@ -1,139 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -Class - Foam::fixedInternalEnergyFvPatchScalarField - -Description - A fixed boundary condition for internal energy - -SourceFiles - fixedInternalEnergyFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef fixedInternalEnergyFvPatchScalarField_H -#define fixedInternalEnergyFvPatchScalarField_H - -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class fixedInternalEnergyFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class fixedInternalEnergyFvPatchScalarField -: - public fixedValueFvPatchScalarField -{ - -public: - - //- Runtime type information - TypeName("fixedInternalEnergy"); - - - // Constructors - - //- Construct from patch and internal field - fixedInternalEnergyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - fixedInternalEnergyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given fixedInternalEnergyFvPatchScalarField - // onto a new patch - fixedInternalEnergyFvPatchScalarField - ( - const fixedInternalEnergyFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - fixedInternalEnergyFvPatchScalarField - ( - const fixedInternalEnergyFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new fixedInternalEnergyFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - fixedInternalEnergyFvPatchScalarField - ( - const fixedInternalEnergyFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new fixedInternalEnergyFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C similarity index 74% rename from src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.C rename to src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C index a29e43e902779130aa5f95a7d782bc598f401382..57bf5692c424c39c8983e40a18c5ce8338f0e441 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "gradientInternalEnergyFvPatchScalarField.H" +#include "gradientEnergyFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -31,8 +31,8 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::gradientInternalEnergyFvPatchScalarField:: -gradientInternalEnergyFvPatchScalarField +Foam::gradientEnergyFvPatchScalarField:: +gradientEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF @@ -42,10 +42,10 @@ gradientInternalEnergyFvPatchScalarField {} -Foam::gradientInternalEnergyFvPatchScalarField:: -gradientInternalEnergyFvPatchScalarField +Foam::gradientEnergyFvPatchScalarField:: +gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField& ptf, + const gradientEnergyFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, const fvPatchFieldMapper& mapper @@ -55,8 +55,8 @@ gradientInternalEnergyFvPatchScalarField {} -Foam::gradientInternalEnergyFvPatchScalarField:: -gradientInternalEnergyFvPatchScalarField +Foam::gradientEnergyFvPatchScalarField:: +gradientEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, @@ -67,20 +67,20 @@ gradientInternalEnergyFvPatchScalarField {} -Foam::gradientInternalEnergyFvPatchScalarField:: -gradientInternalEnergyFvPatchScalarField +Foam::gradientEnergyFvPatchScalarField:: +gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField& tppsf + const gradientEnergyFvPatchScalarField& tppsf ) : fixedGradientFvPatchScalarField(tppsf) {} -Foam::gradientInternalEnergyFvPatchScalarField:: -gradientInternalEnergyFvPatchScalarField +Foam::gradientEnergyFvPatchScalarField:: +gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField& tppsf, + const gradientEnergyFvPatchScalarField& tppsf, const DimensionedField<scalar, volMesh>& iF ) : @@ -90,7 +90,7 @@ gradientInternalEnergyFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::gradientInternalEnergyFvPatchScalarField::updateCoeffs() +void Foam::gradientEnergyFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -109,11 +109,11 @@ void Foam::gradientInternalEnergyFvPatchScalarField::updateCoeffs() Tw.evaluate(); - gradient() = thermo.Cv(Tw, patchi)*Tw.snGrad() + gradient() = thermo.Cpv(Tw, patchi)*Tw.snGrad() + patch().deltaCoeffs()* ( - thermo.e(Tw, patchi) - - thermo.e(Tw, patch().faceCells()) + thermo.he(Tw, patchi) + - thermo.he(Tw, patch().faceCells()) ); fixedGradientFvPatchScalarField::updateCoeffs(); @@ -127,7 +127,7 @@ namespace Foam makePatchTypeField ( fvPatchScalarField, - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H similarity index 77% rename from src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.H rename to src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H index 88c0722996a38033a6fffec8dbb0e345d4aff7c9..d4007517d2360f3e1dbe43fa2a186403dae4236f 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H @@ -28,12 +28,12 @@ Description Gradient boundary condition for internal energy SourceFiles - gradientInternalEnergyFvPatchScalarField.C + gradientEnergyFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef gradientInternalEnergyFvPatchScalarField_H -#define gradientInternalEnergyFvPatchScalarField_H +#ifndef gradientEnergyFvPatchScalarField_H +#define gradientEnergyFvPatchScalarField_H #include "fixedGradientFvPatchFields.H" @@ -43,10 +43,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class gradientInternalEnergyFvPatchScalarField Declaration + Class gradientEnergyFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class gradientInternalEnergyFvPatchScalarField +class gradientEnergyFvPatchScalarField : public fixedGradientFvPatchScalarField { @@ -54,40 +54,40 @@ class gradientInternalEnergyFvPatchScalarField public: //- Runtime type information - TypeName("gradientInternalEnergy"); + TypeName("gradientEnergy"); // Constructors //- Construct from patch and internal field - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>& ); //- Construct from patch, internal field and dictionary - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>&, const dictionary& ); - //- Construct by mapping given gradientInternalEnergyFvPatchScalarField + //- Construct by mapping given gradientEnergyFvPatchScalarField // onto a new patch - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField&, + const gradientEnergyFvPatchScalarField&, const fvPatch&, const DimensionedField<scalar, volMesh>&, const fvPatchFieldMapper& ); //- Construct as copy - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField& + const gradientEnergyFvPatchScalarField& ); //- Construct and return a clone @@ -95,14 +95,14 @@ public: { return tmp<fvPatchScalarField> ( - new gradientInternalEnergyFvPatchScalarField(*this) + new gradientEnergyFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField&, + const gradientEnergyFvPatchScalarField&, const DimensionedField<scalar, volMesh>& ); @@ -114,7 +114,7 @@ public: { return tmp<fvPatchScalarField> ( - new gradientInternalEnergyFvPatchScalarField(*this, iF) + new gradientEnergyFvPatchScalarField(*this, iF) ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C deleted file mode 100644 index 4712ce52de2ab88061c7486ed17715d9cce83852..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C +++ /dev/null @@ -1,142 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "gradientEnthalpyFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "basicThermo.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedGradientFvPatchScalarField(p, iF) -{} - - -Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField -( - const gradientEnthalpyFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedGradientFvPatchScalarField(ptf, p, iF, mapper) -{} - - -Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedGradientFvPatchScalarField(p, iF, dict) -{} - - -Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField -( - const gradientEnthalpyFvPatchScalarField& tppsf -) -: - fixedGradientFvPatchScalarField(tppsf) -{} - - -Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField -( - const gradientEnthalpyFvPatchScalarField& tppsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedGradientFvPatchScalarField(tppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const basicThermo& thermo = db().lookupObject<basicThermo> - ( - "thermophysicalProperties" - ); - - const label patchi = patch().index(); - - fvPatchScalarField& Tw = - const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi]); - - Tw.evaluate(); - - if (dimensionedInternalField().name() == "h") - { - gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad() - + patch().deltaCoeffs()* - ( - thermo.h(Tw, patchi) - - thermo.h(Tw, patch().faceCells()) - ); - } - else - { - gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad() - + patch().deltaCoeffs()* - ( - thermo.hs(Tw, patchi) - - thermo.hs(Tw, patch().faceCells()) - ); - } - - fixedGradientFvPatchScalarField::updateCoeffs(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePatchTypeField - ( - fvPatchScalarField, - gradientEnthalpyFvPatchScalarField - ); -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.H deleted file mode 100644 index a2ac2d744768b184485783f268141bba41166228..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.H +++ /dev/null @@ -1,139 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -Class - Foam::gradientEnthalpyFvPatchScalarField - -Description - Gradient boundary condition for enthalpy - -SourceFiles - gradientEnthalpyFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef gradientEnthalpyFvPatchScalarField_H -#define gradientEnthalpyFvPatchScalarField_H - -#include "fixedGradientFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class gradientEnthalpyFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class gradientEnthalpyFvPatchScalarField -: - public fixedGradientFvPatchScalarField -{ - -public: - - //- Runtime type information - TypeName("gradientEnthalpy"); - - - // Constructors - - //- Construct from patch and internal field - gradientEnthalpyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - gradientEnthalpyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given gradientEnthalpyFvPatchScalarField - // onto a new patch - gradientEnthalpyFvPatchScalarField - ( - const gradientEnthalpyFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - gradientEnthalpyFvPatchScalarField - ( - const gradientEnthalpyFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new gradientEnthalpyFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - gradientEnthalpyFvPatchScalarField - ( - const gradientEnthalpyFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new gradientEnthalpyFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C similarity index 75% rename from src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C rename to src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C index 6bdae90a06353d242a769bc1deac6bc3da6c2382..7f6de1d954c8b16560b8894f4ab347b036177aa4 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "mixedInternalEnergyFvPatchScalarField.H" +#include "mixedEnergyFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -32,8 +32,8 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::mixedInternalEnergyFvPatchScalarField:: -mixedInternalEnergyFvPatchScalarField +Foam::mixedEnergyFvPatchScalarField:: +mixedEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF @@ -47,10 +47,10 @@ mixedInternalEnergyFvPatchScalarField } -Foam::mixedInternalEnergyFvPatchScalarField:: -mixedInternalEnergyFvPatchScalarField +Foam::mixedEnergyFvPatchScalarField:: +mixedEnergyFvPatchScalarField ( - const mixedInternalEnergyFvPatchScalarField& ptf, + const mixedEnergyFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, const fvPatchFieldMapper& mapper @@ -60,8 +60,8 @@ mixedInternalEnergyFvPatchScalarField {} -Foam::mixedInternalEnergyFvPatchScalarField:: -mixedInternalEnergyFvPatchScalarField +Foam::mixedEnergyFvPatchScalarField:: +mixedEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, @@ -72,20 +72,20 @@ mixedInternalEnergyFvPatchScalarField {} -Foam::mixedInternalEnergyFvPatchScalarField:: -mixedInternalEnergyFvPatchScalarField +Foam::mixedEnergyFvPatchScalarField:: +mixedEnergyFvPatchScalarField ( - const mixedInternalEnergyFvPatchScalarField& tppsf + const mixedEnergyFvPatchScalarField& tppsf ) : mixedFvPatchScalarField(tppsf) {} -Foam::mixedInternalEnergyFvPatchScalarField:: -mixedInternalEnergyFvPatchScalarField +Foam::mixedEnergyFvPatchScalarField:: +mixedEnergyFvPatchScalarField ( - const mixedInternalEnergyFvPatchScalarField& tppsf, + const mixedEnergyFvPatchScalarField& tppsf, const DimensionedField<scalar, volMesh>& iF ) : @@ -95,7 +95,7 @@ mixedInternalEnergyFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::mixedInternalEnergyFvPatchScalarField::updateCoeffs() +void Foam::mixedEnergyFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -117,13 +117,13 @@ void Foam::mixedInternalEnergyFvPatchScalarField::updateCoeffs() Tw.evaluate(); valueFraction() = Tw.valueFraction(); - refValue() = thermo.e(Tw.refValue(), patchi); + refValue() = thermo.he(Tw.refValue(), patchi); refGrad() = - thermo.Cv(Tw, patchi)*Tw.refGrad() + thermo.Cpv(Tw, patchi)*Tw.refGrad() + patch().deltaCoeffs()* ( - thermo.e(Tw, patchi) - - thermo.e(Tw, patch().faceCells()) + thermo.he(Tw, patchi) + - thermo.he(Tw, patch().faceCells()) ); mixedFvPatchScalarField::updateCoeffs(); @@ -137,7 +137,7 @@ namespace Foam makePatchTypeField ( fvPatchScalarField, - mixedInternalEnergyFvPatchScalarField + mixedEnergyFvPatchScalarField ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.H similarity index 78% rename from src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.H rename to src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.H index 2a7c2cd7b245e685f4451ccc2785ee5c74678cd7..b948843aabf22453a1a79a7f5930a0fc8180cf6d 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.H @@ -22,18 +22,18 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::mixedEnthalpyFvPatchScalarField + Foam::mixedEnergyFvPatchScalarField Description - Mixed boundary conditions for enthalpy + Mixed boundary conditions for internal energy SourceFiles - mixedEnthalpyFvPatchScalarField.C + mixedEnergyFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef mixedEnthalpyFvPatchScalarField_H -#define mixedEnthalpyFvPatchScalarField_H +#ifndef mixedEnergyFvPatchScalarField_H +#define mixedEnergyFvPatchScalarField_H #include "mixedFvPatchFields.H" @@ -43,10 +43,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class mixedEnthalpyFvPatchScalarField Declaration + Class mixedEnergyFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class mixedEnthalpyFvPatchScalarField +class mixedEnergyFvPatchScalarField : public mixedFvPatchScalarField { @@ -54,40 +54,40 @@ class mixedEnthalpyFvPatchScalarField public: //- Runtime type information - TypeName("mixedEnthalpy"); + TypeName("mixedEnergy"); // Constructors //- Construct from patch and internal field - mixedEnthalpyFvPatchScalarField + mixedEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>& ); //- Construct from patch, internal field and dictionary - mixedEnthalpyFvPatchScalarField + mixedEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>&, const dictionary& ); - //- Construct by mapping given mixedEnthalpyFvPatchScalarField + //- Construct by mapping given mixedEnergyFvPatchScalarField // onto a new patch - mixedEnthalpyFvPatchScalarField + mixedEnergyFvPatchScalarField ( - const mixedEnthalpyFvPatchScalarField&, + const mixedEnergyFvPatchScalarField&, const fvPatch&, const DimensionedField<scalar, volMesh>&, const fvPatchFieldMapper& ); //- Construct as copy - mixedEnthalpyFvPatchScalarField + mixedEnergyFvPatchScalarField ( - const mixedEnthalpyFvPatchScalarField& + const mixedEnergyFvPatchScalarField& ); //- Construct and return a clone @@ -95,14 +95,14 @@ public: { return tmp<fvPatchScalarField> ( - new mixedEnthalpyFvPatchScalarField(*this) + new mixedEnergyFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - mixedEnthalpyFvPatchScalarField + mixedEnergyFvPatchScalarField ( - const mixedEnthalpyFvPatchScalarField&, + const mixedEnergyFvPatchScalarField&, const DimensionedField<scalar, volMesh>& ); @@ -114,7 +114,7 @@ public: { return tmp<fvPatchScalarField> ( - new mixedEnthalpyFvPatchScalarField(*this, iF) + new mixedEnergyFvPatchScalarField(*this, iF) ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C deleted file mode 100644 index dfff693fd694462cc32b18598c9fbc9d2b4a47ae..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C +++ /dev/null @@ -1,152 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "mixedEnthalpyFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "basicThermo.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - mixedFvPatchScalarField(p, iF) -{ - valueFraction() = 0.0; - refValue() = 0.0; - refGrad() = 0.0; -} - - -Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField -( - const mixedEnthalpyFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - mixedFvPatchScalarField(ptf, p, iF, mapper) -{} - - -Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - mixedFvPatchScalarField(p, iF, dict) -{} - - -Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField -( - const mixedEnthalpyFvPatchScalarField& tppsf -) -: - mixedFvPatchScalarField(tppsf) -{} - - -Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField -( - const mixedEnthalpyFvPatchScalarField& tppsf, - const DimensionedField<scalar, volMesh>& iF -) -: - mixedFvPatchScalarField(tppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const basicThermo& thermo = db().lookupObject<basicThermo> - ( - "thermophysicalProperties" - ); - - const label patchi = patch().index(); - - mixedFvPatchScalarField& Tw = refCast<mixedFvPatchScalarField> - ( - const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi]) - ); - - Tw.evaluate(); - - valueFraction() = Tw.valueFraction(); - - if (dimensionedInternalField().name() == "h") - { - refValue() = thermo.h(Tw.refValue(), patchi); - refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad() - + patch().deltaCoeffs()* - ( - thermo.h(Tw, patchi) - - thermo.h(Tw, patch().faceCells()) - ); - } - else - { - refValue() = thermo.hs(Tw.refValue(), patchi); - refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad() - + patch().deltaCoeffs()* - ( - thermo.hs(Tw, patchi) - - thermo.hs(Tw, patch().faceCells()) - ); - } - - mixedFvPatchScalarField::updateCoeffs(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePatchTypeField - ( - fvPatchScalarField, - mixedEnthalpyFvPatchScalarField - ); -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.H deleted file mode 100644 index 5b013a1d75b334e79a53e7b10ea4190a011bf414..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.H +++ /dev/null @@ -1,139 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -Class - Foam::mixedInternalEnergyFvPatchScalarField - -Description - Mixed boundary conditions for internal energy - -SourceFiles - mixedInternalEnergyFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef mixedInternalEnergyFvPatchScalarField_H -#define mixedInternalEnergyFvPatchScalarField_H - -#include "mixedFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class mixedInternalEnergyFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class mixedInternalEnergyFvPatchScalarField -: - public mixedFvPatchScalarField -{ - -public: - - //- Runtime type information - TypeName("mixedInternalEnergy"); - - - // Constructors - - //- Construct from patch and internal field - mixedInternalEnergyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - mixedInternalEnergyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given mixedInternalEnergyFvPatchScalarField - // onto a new patch - mixedInternalEnergyFvPatchScalarField - ( - const mixedInternalEnergyFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - mixedInternalEnergyFvPatchScalarField - ( - const mixedInternalEnergyFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new mixedInternalEnergyFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - mixedInternalEnergyFvPatchScalarField - ( - const mixedInternalEnergyFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new mixedInternalEnergyFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C new file mode 100644 index 0000000000000000000000000000000000000000..774a73e7ddf4c8e1ccd66cdedbb0c1ea7d492693 --- /dev/null +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -0,0 +1,618 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-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/>. + +\*---------------------------------------------------------------------------*/ + +#include "heThermo.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class BasicThermo, class MixtureType> +Foam::heThermo<BasicThermo, MixtureType>::heThermo(const fvMesh& mesh) +: + BasicThermo(mesh), + MixtureType(*this, mesh), + + he_ + ( + IOobject + ( + MixtureType::thermoType::heName(), + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimEnergy/dimMass, + this->heBoundaryTypes() + ) +{ + scalarField& heCells = he_.internalField(); + const scalarField& TCells = this->T_.internalField(); + + forAll(heCells, celli) + { + heCells[celli] = this->cellMixture(celli).HE(TCells[celli]); + } + + forAll(he_.boundaryField(), patchi) + { + he_.boundaryField()[patchi] == + he(this->T_.boundaryField()[patchi], patchi); + } + + this->heBoundaryCorrection(he_); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class BasicThermo, class MixtureType> +Foam::heThermo<BasicThermo, MixtureType>::~heThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he +( + const scalarField& T, + const labelList& cells +) const +{ + tmp<scalarField> the(new scalarField(T.size())); + scalarField& he = the(); + + forAll(T, celli) + { + he[celli] = this->cellMixture(cells[celli]).HE(T[celli]); + } + + return the; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he +( + const scalarField& T, + const label patchi +) const +{ + tmp<scalarField> the(new scalarField(T.size())); + scalarField& he = the(); + + forAll(T, facei) + { + he[facei] = this->patchFaceMixture(patchi, facei).HE(T[facei]); + } + + return the; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::volScalarField> +Foam::heThermo<BasicThermo, MixtureType>::hc() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp<volScalarField> thc + ( + new volScalarField + ( + IOobject + ( + "hc", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + he_.dimensions() + ) + ); + + volScalarField& hcf = thc(); + scalarField& hcCells = hcf.internalField(); + + forAll(hcCells, celli) + { + hcCells[celli] = this->cellMixture(celli).Hc(); + } + + forAll(hcf.boundaryField(), patchi) + { + scalarField& hcp = hcf.boundaryField()[patchi]; + + forAll(hcp, facei) + { + hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); + } + } + + return thc; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cp +( + const scalarField& T, + const label patchi +) const +{ + tmp<scalarField> tCp(new scalarField(T.size())); + scalarField& cp = tCp(); + + forAll(T, facei) + { + cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); + } + + return tCp; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::volScalarField> +Foam::heThermo<BasicThermo, MixtureType>::Cp() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp<volScalarField> tCp + ( + new volScalarField + ( + IOobject + ( + "Cp", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimEnergy/dimMass/dimTemperature + ) + ); + + volScalarField& cp = tCp(); + + forAll(this->T_, celli) + { + cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& pCp = cp.boundaryField()[patchi]; + + forAll(pT, facei) + { + pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); + } + } + + return tCp; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> +Foam::heThermo<BasicThermo, MixtureType>::Cv +( + const scalarField& T, + const label patchi +) const +{ + tmp<scalarField> tCv(new scalarField(T.size())); + scalarField& cv = tCv(); + + forAll(T, facei) + { + cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); + } + + return tCv; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::volScalarField> +Foam::heThermo<BasicThermo, MixtureType>::Cv() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp<volScalarField> tCv + ( + new volScalarField + ( + IOobject + ( + "Cv", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimEnergy/dimMass/dimTemperature + ) + ); + + volScalarField& cv = tCv(); + + forAll(this->T_, celli) + { + cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + cv.boundaryField()[patchi] = + Cv(this->T_.boundaryField()[patchi], patchi); + } + + return tCv; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::gamma +( + const scalarField& T, + const label patchi +) const +{ + tmp<scalarField> tgamma(new scalarField(T.size())); + scalarField& cpv = tgamma(); + + forAll(T, facei) + { + cpv[facei] = this->patchFaceMixture(patchi, facei).gamma(T[facei]); + } + + return tgamma; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::volScalarField> +Foam::heThermo<BasicThermo, MixtureType>::gamma() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp<volScalarField> tgamma + ( + new volScalarField + ( + IOobject + ( + "gamma", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimless + ) + ); + + volScalarField& cpv = tgamma(); + + forAll(this->T_, celli) + { + cpv[celli] = this->cellMixture(celli).gamma(this->T_[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& pgamma = cpv.boundaryField()[patchi]; + + forAll(pT, facei) + { + pgamma[facei] = + this->patchFaceMixture(patchi, facei).gamma(pT[facei]); + } + } + + return tgamma; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cpv +( + const scalarField& T, + const label patchi +) const +{ + tmp<scalarField> tCpv(new scalarField(T.size())); + scalarField& cpv = tCpv(); + + forAll(T, facei) + { + cpv[facei] = this->patchFaceMixture(patchi, facei).Cpv(T[facei]); + } + + return tCpv; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::volScalarField> +Foam::heThermo<BasicThermo, MixtureType>::Cpv() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp<volScalarField> tCpv + ( + new volScalarField + ( + IOobject + ( + "Cpv", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimEnergy/dimMass/dimTemperature + ) + ); + + volScalarField& cpv = tCpv(); + + forAll(this->T_, celli) + { + cpv[celli] = this->cellMixture(celli).Cpv(this->T_[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& pCpv = cpv.boundaryField()[patchi]; + + forAll(pT, facei) + { + pCpv[facei] = this->patchFaceMixture(patchi, facei).Cpv(pT[facei]); + } + } + + return tCpv; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::CpByCpv +( + const scalarField& T, + const label patchi +) const +{ + tmp<scalarField> tCpByCpv(new scalarField(T.size())); + scalarField& cpByCpv = tCpByCpv(); + + forAll(T, facei) + { + cpByCpv[facei] = + this->patchFaceMixture(patchi, facei).cpBycpv(T[facei]); + } + + return tCpByCpv; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::volScalarField> +Foam::heThermo<BasicThermo, MixtureType>::CpByCpv() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp<volScalarField> tCpByCpv + ( + new volScalarField + ( + IOobject + ( + "CpByCpv", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimless + ) + ); + + volScalarField& cpByCpv = tCpByCpv(); + + forAll(this->T_, celli) + { + cpByCpv[celli] = this->cellMixture(celli).cpBycpv(this->T_[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& pCpByCpv = cpByCpv.boundaryField()[patchi]; + + forAll(pT, facei) + { + pCpByCpv[facei] = + this->patchFaceMixture(patchi, facei).cpBycpv(pT[facei]); + } + } + + return tCpByCpv; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE +( + const scalarField& h, + const scalarField& T0, + const labelList& cells +) const +{ + tmp<scalarField> tT(new scalarField(h.size())); + scalarField& T = tT(); + + forAll(h, celli) + { + T[celli] = this->cellMixture(cells[celli]).THE(h[celli], T0[celli]); + } + + return tT; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE +( + const scalarField& h, + const scalarField& T0, + const label patchi +) const +{ + tmp<scalarField> tT(new scalarField(h.size())); + scalarField& T = tT(); + + forAll(h, facei) + { + T[facei] = this->patchFaceMixture + ( + patchi, + facei + ).THE(h[facei], T0[facei]); + } + + return tT; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::volScalarField> +Foam::heThermo<BasicThermo, MixtureType>::kappa() const +{ + tmp<Foam::volScalarField> kappa(Cp()*this->alpha_); + kappa().rename("kappa"); + return kappa; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::kappa +( + const label patchi +) const +{ + return + Cp(this->T_.boundaryField()[patchi], patchi) + *this->alpha_.boundaryField()[patchi]; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::volScalarField> +Foam::heThermo<BasicThermo, MixtureType>::kappaEff +( + const volScalarField& alphat +) const +{ + tmp<Foam::volScalarField> kappaEff(Cp()*alphaEff(alphat)); + kappaEff().rename("kappaEff"); + return kappaEff; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> +Foam::heThermo<BasicThermo, MixtureType>::kappaEff +( + const scalarField& alphat, + const label patchi +) const +{ + return + Cp(this->T_.boundaryField()[patchi], patchi) + *alphaEff(alphat, patchi); +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::volScalarField> +Foam::heThermo<BasicThermo, MixtureType>::alphaEff +( + const volScalarField& alphat +) const +{ + tmp<Foam::volScalarField> alphaEff(this->CpByCpv()*(this->alpha_ + alphat)); + alphaEff().rename("alphaEff"); + return alphaEff; +} + + +template<class BasicThermo, class MixtureType> +Foam::tmp<Foam::scalarField> +Foam::heThermo<BasicThermo, MixtureType>::alphaEff +( + const scalarField& alphat, + const label patchi +) const +{ + return + this->CpByCpv(this->T_.boundaryField()[patchi], patchi) + *( + this->alpha_.boundaryField()[patchi] + + alphat + ); +} + + +template<class BasicThermo, class MixtureType> +bool Foam::heThermo<BasicThermo, MixtureType>::read() +{ + if (BasicThermo::read()) + { + MixtureType::read(*this); + return true; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.H b/src/thermophysicalModels/basic/heThermo/heThermo.H new file mode 100644 index 0000000000000000000000000000000000000000..e46d48c7179b5d2355cc264c2a323c2d2564d2ff --- /dev/null +++ b/src/thermophysicalModels/basic/heThermo/heThermo.H @@ -0,0 +1,256 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 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/>. + +Class + Foam::heThermo + +Description + Enthalpy/Internal energy for a mixture based on compressibility + +SourceFiles + heThermo.C + +\*---------------------------------------------------------------------------*/ + +#ifndef heThermo_H +#define heThermo_H + +#include "basicMixture.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class heThermo Declaration +\*---------------------------------------------------------------------------*/ + +template<class BasicThermo, class MixtureType> +class heThermo +: + public BasicThermo, + public MixtureType +{ +protected: + + // Protected data + + //- Energy field + volScalarField he_; + + +private: + + // Private Member Functions + + //- Construct as copy (not implemented) + heThermo(const heThermo<BasicThermo, MixtureType>&); + + +public: + + // Constructors + + //- Construct from mesh + heThermo(const fvMesh&); + + + //- Destructor + virtual ~heThermo(); + + + // Member functions + + //- Return the compostion of the mixture + virtual typename MixtureType::basicMixtureType& + composition() + { + return *this; + } + + //- Return the compostion of the mixture + virtual const typename MixtureType::basicMixtureType& + composition() const + { + return *this; + } + + + // Access to thermodynamic state variables + + //- Enthalpy/Internal energy [J/kg] + // Non-const access allowed for transport equations + virtual volScalarField& he() + { + return he_; + } + + //- Enthalpy/Internal energy [J/kg] + virtual const volScalarField& he() const + { + return he_; + } + + + // Fields derived from thermodynamic state variables + + //- Enthalpy/Internal energy for cell-set [J/kg] + virtual tmp<scalarField> he + ( + const scalarField& T, + const labelList& cells + ) const; + + //- Enthalpy/Internal energy for patch [J/kg] + virtual tmp<scalarField> he + ( + const scalarField& T, + const label patchi + ) const; + + //- Chemical enthalpy [J/kg] + virtual tmp<volScalarField> hc() const; + + //- Temperature from enthalpy/internal energy for cell-set + virtual tmp<scalarField> THE + ( + const scalarField& he, + const scalarField& T0, // starting temperature + const labelList& cells + ) const; + + //- Temperature from enthalpy/internal energy for patch + virtual tmp<scalarField> THE + ( + const scalarField& he, + const scalarField& T0, // starting temperature + const label patchi + ) const; + + //- Heat capacity at constant pressure for patch [J/kg/K] + virtual tmp<scalarField> Cp + ( + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant pressure [J/kg/K] + virtual tmp<volScalarField> Cp() const; + + //- Heat capacity at constant volume for patch [J/kg/K] + virtual tmp<scalarField> Cv + ( + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant volume [J/kg/K] + virtual tmp<volScalarField> Cv() const; + + //- gamma = Cp/Cv [] + virtual tmp<volScalarField> gamma() const; + + //- gamma = Cp/Cv for patch [] + virtual tmp<scalarField> gamma + ( + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant pressure/volume for patch [J/kg/K] + virtual tmp<scalarField> Cpv + ( + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant pressure/volume [J/kg/K] + virtual tmp<volScalarField> Cpv() const; + + //- Heat capacity ratio [] + virtual tmp<volScalarField> CpByCpv() const; + + //- Heat capacity ratio for patch [] + virtual tmp<scalarField> CpByCpv + ( + const scalarField& T, + const label patchi + ) const; + + + // Fields derived from transport state variables + + //- Thermal diffusivity for temperature of mixture [J/m/s/K] + virtual tmp<volScalarField> kappa() const; + + //- Thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp<scalarField> kappa + ( + const label patchi + ) const; + + //- Effective thermal diffusivity of mixture [J/m/s/K] + virtual tmp<volScalarField> kappaEff(const volScalarField&) const; + + //- Effective thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp<scalarField> kappaEff + ( + const scalarField& alphat, + const label patchi + ) const; + + //- Effective thermal diffusivity of mixture [J/m/s/K] + virtual tmp<volScalarField> alphaEff + ( + const volScalarField& alphat + ) const; + + //- Effective thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp<scalarField> alphaEff + ( + const scalarField& alphat, + const label patchi + ) const; + + + //- Read thermophysicalProperties dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +#ifdef NoRepository +# include "heThermo.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.H b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.H index f7a00f138fd370c556d2e589bbecbcd2ecd8e351..c809ba0c3db991a335cd83845e5cab47596b573e 100644 --- a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.H +++ b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.H @@ -54,6 +54,10 @@ class basicMixture public: + //- The base class of the mixture + typedef basicMixture basicMixtureType; + + // Runtime type information TypeName("basicMixture"); diff --git a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C index 7239d8d332ca0e211c87bf416308a4e84e7898a3..bb09e15803f2f21523c91e773c63da8a4d394905 100644 --- a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C +++ b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,13 +32,15 @@ Description #include "makeBasicMixture.H" #include "perfectGas.H" -#include "pressurePerfectGas.H" #include "incompressible.H" +#include "isobaricPerfectGas.H" #include "eConstThermo.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "sensibleInternalEnergy.H" +#include "sensibleEnthalpy.H" #include "specieThermo.H" #include "constTransport.H" @@ -63,6 +65,7 @@ makeBasicMixture ( pureMixture, constTransport, + sensibleInternalEnergy, eConstThermo, perfectGas ); @@ -71,15 +74,43 @@ makeBasicMixture ( pureMixture, sutherlandTransport, + sensibleInternalEnergy, eConstThermo, perfectGas ); +makeBasicMixture +( + pureMixture, + constTransport, + sensibleInternalEnergy, + hConstThermo, + perfectGas +); + +makeBasicMixture +( + pureMixture, + sutherlandTransport, + sensibleInternalEnergy, + hConstThermo, + perfectGas +); + +makeBasicMixture +( + pureMixture, + sutherlandTransport, + sensibleInternalEnergy, + janafThermo, + perfectGas +); makeBasicMixture ( pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); @@ -88,6 +119,7 @@ makeBasicMixture ( pureMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); @@ -96,6 +128,7 @@ makeBasicMixture ( pureMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); @@ -104,6 +137,7 @@ makeBasicMixture ( pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, incompressible ); @@ -111,39 +145,46 @@ makeBasicMixture makeBasicPolyMixture ( pureMixture, - 3 + 3, + sensibleEnthalpy ); makeBasicPolyMixture ( pureMixture, - 8 + 8, + sensibleEnthalpy ); + makeBasicMixture ( pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, - pressurePerfectGas + isobaricPerfectGas ); makeBasicMixture ( pureMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, - pressurePerfectGas + isobaricPerfectGas ); makeBasicMixture ( pureMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, - pressurePerfectGas + isobaricPerfectGas ); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/thermophysicalModels/basic/mixtures/basicMixture/makeBasicMixture.H b/src/thermophysicalModels/basic/mixtures/basicMixture/makeBasicMixture.H index 3d12d6334486043d83341d4f177b44b5f6d84fb8..f21bfdea64e406ba49149bcc6ca65974e9d2b7f2 100644 --- a/src/thermophysicalModels/basic/mixtures/basicMixture/makeBasicMixture.H +++ b/src/thermophysicalModels/basic/mixtures/basicMixture/makeBasicMixture.H @@ -32,20 +32,22 @@ Description #define makeBasicMixture_H #include "basicMixture.H" +#include "sensibleEnthalpy.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeBasicMixture(Mixture,Transport,Thermo,EqnOfState) \ +#define makeBasicMixture(Mixture,Transport,Type,Thermo,EqnOfState) \ \ -typedef Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > \ - Mixture##Transport##Thermo##EqnOfState; \ +typedef \ + Mixture<Transport<specieThermo<Thermo<EqnOfState>, Type> > > \ + Mixture##Transport##Type##Thermo##EqnOfState; \ \ defineTemplateTypeNameAndDebugWithName \ - (Mixture##Transport##Thermo##EqnOfState, \ - #Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>", 0) + (Mixture##Transport##Type##Thermo##EqnOfState, \ + #Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">,"#Type">>>", 0) -#define makeBasicPolyMixture(Mixture,Order) \ +#define makeBasicPolyMixture(Mixture,Order,Type) \ \ typedef polynomialTransport \ < \ @@ -55,17 +57,18 @@ typedef polynomialTransport \ < \ icoPolynomial<Order>, \ Order \ - > \ + >, \ + Type \ >, \ Order \ -> icoPoly##Order##ThermoPhysics; \ +> icoPoly##Order##Type##ThermoPhysics; \ \ -typedef Mixture<icoPoly##Order##ThermoPhysics> \ - Mixture##icoPoly##Order##ThermoPhysics; \ +typedef Mixture<icoPoly##Order##Type##ThermoPhysics> \ + Mixture##icoPoly##Order##Type##ThermoPhysics; \ \ defineTemplateTypeNameAndDebugWithName \ - (Mixture##icoPoly##Order##ThermoPhysics, \ - #Mixture"<icoPoly"#Order"ThermoPhysics>", 0) + (Mixture##icoPoly##Order##Type##ThermoPhysics, \ + #Mixture"<icoPoly"#Order#Type"ThermoPhysics>", 0) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/makeBasicPsiThermo.H b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/makeBasicPsiThermo.H deleted file mode 100644 index d9322918d59a9f76e9050e2ce68376015f2852b4..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/makeBasicPsiThermo.H +++ /dev/null @@ -1,72 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / 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/>. - -InClass - Foam::basicPsiThermo - -Description - Macros for creating 'basic' compresibility-based thermo packages - -\*---------------------------------------------------------------------------*/ - -#ifndef makeBasicPsiThermo_H -#define makeBasicPsiThermo_H - -#include "basicPsiThermo.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeBasicPsiThermo(Cthermo,Mixture,Transport,Thermo,EqnOfState) \ - \ -typedef Cthermo<Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \ - Cthermo##Mixture##Transport##Thermo##EqnOfState; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ - #Cthermo \ - "<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicPsiThermo, \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicThermo, \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.C b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.C deleted file mode 100644 index 3bc235103305ec99bc06d1a4c063ffd856ad4b3d..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.C +++ /dev/null @@ -1,347 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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/>. - -\*---------------------------------------------------------------------------*/ - -#include "ePsiThermo.H" -#include "fvMesh.H" -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template<class MixtureType> -void Foam::ePsiThermo<MixtureType>::calculate() -{ - const scalarField& eCells = e_.internalField(); - const scalarField& pCells = this->p_.internalField(); - - scalarField& TCells = this->T_.internalField(); - scalarField& psiCells = this->psi_.internalField(); - scalarField& muCells = this->mu_.internalField(); - scalarField& alphaCells = this->alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.TE(eCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphae(TCells[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; - fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - - fvPatchScalarField& pe = e_.boundaryField()[patchi]; - - fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pe[facei] = mixture_.E(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphae(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.TE(pe[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphae(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::ePsiThermo<MixtureType>::ePsiThermo(const fvMesh& mesh) -: - basicPsiThermo(mesh), - MixtureType(*this, mesh), - - e_ - ( - IOobject - ( - "e", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->eBoundaryTypes() - ) -{ - scalarField& eCells = e_.internalField(); - const scalarField& TCells = this->T_.internalField(); - - forAll(eCells, celli) - { - eCells[celli] = this->cellMixture(celli).E(TCells[celli]); - } - - forAll(e_.boundaryField(), patchi) - { - e_.boundaryField()[patchi] == - e(this->T_.boundaryField()[patchi], patchi); - } - - this->eBoundaryCorrection(e_); - - calculate(); - - // Switch on saving old time - this->psi_.oldTime(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::ePsiThermo<MixtureType>::~ePsiThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class MixtureType> -void Foam::ePsiThermo<MixtureType>::correct() -{ - if (debug) - { - Info<< "entering ePsiThermo<MixtureType>::correct()" << endl; - } - - // force the saving of the old-time values - this->psi_.oldTime(); - - calculate(); - - if (debug) - { - Info<< "exiting ePsiThermo<MixtureType>::correct()" << endl; - } -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::ePsiThermo<MixtureType>::e -( - const scalarField& T, - const labelList& cells -) const -{ - tmp<scalarField> te(new scalarField(T.size())); - scalarField& h = te(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).E(T[celli]); - } - - return te; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::ePsiThermo<MixtureType>::e -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> te(new scalarField(T.size())); - scalarField& h = te(); - - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).E(T[facei]); - } - - return te; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::ePsiThermo<MixtureType>::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCp(new scalarField(T.size())); - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> Foam::ePsiThermo<MixtureType>::Cp() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp<volScalarField> tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - forAll(this->T_, celli) - { - cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& pCp = cp.boundaryField()[patchi]; - - forAll(pT, facei) - { - pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); - } - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::ePsiThermo<MixtureType>::Cv -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCv(new scalarField(T.size())); - scalarField& cv = tCv(); - - forAll(T, facei) - { - cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); - } - - return tCv; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> Foam::ePsiThermo<MixtureType>::Cv() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp<volScalarField> tCv - ( - new volScalarField - ( - IOobject - ( - "Cv", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cv = tCv(); - - forAll(this->T_, celli) - { - cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - cv.boundaryField()[patchi] = - Cv(this->T_.boundaryField()[patchi], patchi); - } - - return tCv; -} - - -template<class MixtureType> -bool Foam::ePsiThermo<MixtureType>::read() -{ - if (basicPsiThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.H b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.H deleted file mode 100644 index c1f85b2c6d19a7053445cfce7a5d06c4e8e49b82..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.H +++ /dev/null @@ -1,177 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -Class - Foam::ePsiThermo - -Description - Internal energy for a mixture based on compressibility - -SourceFiles - ePsiThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef ePsiThermo_H -#define ePsiThermo_H - -#include "basicPsiThermo.H" -#include "basicMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class ePsiThermo Declaration -\*---------------------------------------------------------------------------*/ - -template<class MixtureType> -class ePsiThermo -: - public basicPsiThermo, - public MixtureType -{ - // Private data - - //- Internal energy field - volScalarField e_; - - - // Private Member Functions - - //- Calculate the thermo variables - void calculate(); - - //- Construct as copy (not implemented) - ePsiThermo(const ePsiThermo<MixtureType>&); - - -public: - - //- Runtime type information - TypeName("ePsiThermo"); - - - // Constructors - - //- Construct from mese - ePsiThermo(const fvMesh&); - - - //- Destructor - virtual ~ePsiThermo(); - - - // Member functions - - //- Return the compostion of the mixture - virtual basicMixture& composition() - { - return *this; - } - - //- Return the compostion of the mixture - virtual const basicMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Access to thermodynamic state variables - - //- Internal energy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& e() - { - return e_; - } - - //- Internal energy [J/kg] - virtual const volScalarField& e() const - { - return e_; - } - - - // Fields derived from thermodynamic state variables - - //- Internal energy for cell-set [J/kg] - virtual tmp<scalarField> e - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Internal energy for patch [J/kg] - virtual tmp<scalarField> e - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp<scalarField> Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp<volScalarField> Cp() const; - - //- Heat capacity at constant volume for patch [J/kg/K] - virtual tmp<scalarField> Cv - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant volume [J/kg/K] - virtual tmp<volScalarField> Cv() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -#ifdef NoRepository -# include "ePsiThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C deleted file mode 100644 index 2b551a834eac512e3a11d7e8b57d47dd31b37ec1..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C +++ /dev/null @@ -1,99 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "makeBasicPsiThermo.H" - -#include "perfectGas.H" - -#include "eConstThermo.H" -#include "hConstThermo.H" -#include "janafThermo.H" -#include "specieThermo.H" - -#include "constTransport.H" -#include "sutherlandTransport.H" - -#include "ePsiThermo.H" -#include "pureMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ - -makeBasicPsiThermo -( - ePsiThermo, - pureMixture, - constTransport, - eConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - ePsiThermo, - pureMixture, - sutherlandTransport, - eConstThermo, - perfectGas -); - - -makeBasicPsiThermo -( - ePsiThermo, - pureMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - ePsiThermo, - pureMixture, - sutherlandTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - ePsiThermo, - pureMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C b/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C deleted file mode 100644 index 7f4d0fe1887fd55d1da3c260c10346443f93b8e8..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C +++ /dev/null @@ -1,345 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hPsiThermo.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hPsiThermo<MixtureType>::calculate() -{ - const scalarField& hCells = h_.internalField(); - const scalarField& pCells = this->p_.internalField(); - - scalarField& TCells = this->T_.internalField(); - scalarField& psiCells = this->psi_.internalField(); - scalarField& muCells = this->mu_.internalField(); - scalarField& alphaCells = this->alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.TH(hCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; - fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - - fvPatchScalarField& ph = h_.boundaryField()[patchi]; - - fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - ph[facei] = mixture_.H(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.TH(ph[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hPsiThermo<MixtureType>::hPsiThermo(const fvMesh& mesh) -: - basicPsiThermo(mesh), - MixtureType(*this, mesh), - - h_ - ( - IOobject - ( - "h", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{ - scalarField& hCells = h_.internalField(); - const scalarField& TCells = this->T_.internalField(); - - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).H(TCells[celli]); - } - - forAll(h_.boundaryField(), patchi) - { - h_.boundaryField()[patchi] == - h(this->T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(h_); - - calculate(); - - // Switch on saving old time - this->psi_.oldTime(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hPsiThermo<MixtureType>::~hPsiThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hPsiThermo<MixtureType>::correct() -{ - if (debug) - { - Info<< "entering hPsiThermo<MixtureType>::correct()" << endl; - } - - // force the saving of the old-time values - this->psi_.oldTime(); - - calculate(); - - if (debug) - { - Info<< "exiting hPsiThermo<MixtureType>::correct()" << endl; - } -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hPsiThermo<MixtureType>::h -( - const scalarField& T, - const labelList& cells -) const -{ - tmp<scalarField> th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).H(T[celli]); - } - - return th; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hPsiThermo<MixtureType>::h -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).H(T[facei]); - } - - return th; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hPsiThermo<MixtureType>::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCp(new scalarField(T.size())); - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> Foam::hPsiThermo<MixtureType>::Cp() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp<volScalarField> tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - forAll(this->T_, celli) - { - cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& pCp = cp.boundaryField()[patchi]; - - forAll(pT, facei) - { - pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); - } - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hPsiThermo<MixtureType>::Cv -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCv(new scalarField(T.size())); - scalarField& cv = tCv(); - - forAll(T, facei) - { - cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); - } - - return tCv; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> Foam::hPsiThermo<MixtureType>::Cv() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp<volScalarField> tCv - ( - new volScalarField - ( - IOobject - ( - "Cv", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cv = tCv(); - - forAll(this->T_, celli) - { - cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - cv.boundaryField()[patchi] = - Cv(this->T_.boundaryField()[patchi], patchi); - } - - return tCv; -} - - -template<class MixtureType> -bool Foam::hPsiThermo<MixtureType>::read() -{ - if (basicPsiThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.H b/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.H deleted file mode 100644 index 44cc9ca82733b3b836ec9d7f9c7016d70f31b1fe..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.H +++ /dev/null @@ -1,177 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -Class - Foam::hPsiThermo - -Description - Enthalpy for a mixture based on compressibility - -SourceFiles - hPsiThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hPsiThermo_H -#define hPsiThermo_H - -#include "basicPsiThermo.H" -#include "basicMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hPsiThermo Declaration -\*---------------------------------------------------------------------------*/ - -template<class MixtureType> -class hPsiThermo -: - public basicPsiThermo, - public MixtureType -{ - // Private data - - //- Enthalpy field - volScalarField h_; - - - // Private Member Functions - - //- Calculate the thermo variables - void calculate(); - - //- Construct as copy (not implemented) - hPsiThermo(const hPsiThermo<MixtureType>&); - - -public: - - //- Runtime type information - TypeName("hPsiThermo"); - - - // Constructors - - //- Construct from mesh - hPsiThermo(const fvMesh&); - - - //- Destructor - virtual ~hPsiThermo(); - - - // Member functions - - //- Return the compostion of the mixture - virtual basicMixture& composition() - { - return *this; - } - - //- Return the compostion of the mixture - virtual const basicMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Access to thermodynamic state variables - - //- Enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& h() - { - return h_; - } - - //- Enthalpy [J/kg] - virtual const volScalarField& h() const - { - return h_; - } - - - // Fields derived from thermodynamic state variables - - //- Enthalpy for cell-set [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Enthalpy for patch [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp<scalarField> Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp<volScalarField> Cp() const; - - //- Heat capacity at constant volume for patch [J/kg/K] - virtual tmp<scalarField> Cv - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant volume [J/kg/K] - virtual tmp<volScalarField> Cv() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -#ifdef NoRepository -# include "hPsiThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermos.C b/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermos.C deleted file mode 100644 index 0029038e6fdf00d3bd838284da8595300286d75d..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermos.C +++ /dev/null @@ -1,79 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "makeBasicPsiThermo.H" - -#include "perfectGas.H" - -#include "hConstThermo.H" -#include "janafThermo.H" -#include "specieThermo.H" - -#include "constTransport.H" -#include "sutherlandTransport.H" - -#include "hPsiThermo.H" -#include "pureMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ - -makeBasicPsiThermo -( - hPsiThermo, - pureMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - hPsiThermo, - pureMixture, - sutherlandTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - hPsiThermo, - pureMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.C b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.C new file mode 100644 index 0000000000000000000000000000000000000000..4d1ce938b01710d44d77fc3c78c5338292777b67 --- /dev/null +++ b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.C @@ -0,0 +1,139 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-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/>. + +\*---------------------------------------------------------------------------*/ + +#include "hePsiThermo.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template<class MixtureType> +void Foam::hePsiThermo<MixtureType>::calculate() +{ + const scalarField& hCells = this->he_.internalField(); + const scalarField& pCells = this->p_.internalField(); + + scalarField& TCells = this->T_.internalField(); + scalarField& psiCells = this->psi_.internalField(); + scalarField& muCells = this->mu_.internalField(); + scalarField& alphaCells = this->alpha_.internalField(); + + forAll(TCells, celli) + { + const typename MixtureType::thermoType& mixture_ = + this->cellMixture(celli); + + TCells[celli] = mixture_.THE(hCells[celli], TCells[celli]); + psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); + + muCells[celli] = mixture_.mu(TCells[celli]); + alphaCells[celli] = mixture_.alphah(TCells[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; + + fvPatchScalarField& ph = this->he_.boundaryField()[patchi]; + + fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; + fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; + + if (pT.fixesValue()) + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture_ = + this->patchFaceMixture(patchi, facei); + + ph[facei] = mixture_.HE(pT[facei]); + + ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); + pmu[facei] = mixture_.mu(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); + } + } + else + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture_ = + this->patchFaceMixture(patchi, facei); + + pT[facei] = mixture_.THE(ph[facei], pT[facei]); + + ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); + pmu[facei] = mixture_.mu(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class MixtureType> +Foam::hePsiThermo<MixtureType>::hePsiThermo(const fvMesh& mesh) +: + heThermo<psiThermo, MixtureType>(mesh) +{ + calculate(); + + // Switch on saving old time + this->psi_.oldTime(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class MixtureType> +Foam::hePsiThermo<MixtureType>::~hePsiThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class MixtureType> +void Foam::hePsiThermo<MixtureType>::correct() +{ + if (debug) + { + Info<< "entering hePsiThermo<MixtureType>::correct()" << endl; + } + + // force the saving of the old-time values + this->psi_.oldTime(); + + calculate(); + + if (debug) + { + Info<< "exiting hePsiThermo<MixtureType>::correct()" << endl; + } +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.H b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.H new file mode 100644 index 0000000000000000000000000000000000000000..827ca0164c6a4630f8d71d448f363ef34ee16e44 --- /dev/null +++ b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.H @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 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/>. + +Class + Foam::hePsiThermo + +Description + Enthalpy for a mixture based on compressibility + +SourceFiles + hePsiThermo.C + +\*---------------------------------------------------------------------------*/ + +#ifndef hePsiThermo_H +#define hePsiThermo_H + +#include "psiThermo.H" +#include "heThermo.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class hePsiThermo Declaration +\*---------------------------------------------------------------------------*/ + +template<class MixtureType> +class hePsiThermo +: + public heThermo<psiThermo, MixtureType> +{ + // Private Member Functions + + //- Calculate the thermo variables + void calculate(); + + //- Construct as copy (not implemented) + hePsiThermo(const hePsiThermo<MixtureType>&); + +public: + + //- Runtime type information + TypeName("hePsiThermo"); + + + // Constructors + + //- Construct from mesh + hePsiThermo(const fvMesh&); + + + //- Destructor + virtual ~hePsiThermo(); + + + // Member functions + + //- Update properties + virtual void correct(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +#ifdef NoRepository +# include "hePsiThermo.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermos.C b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermos.C similarity index 68% rename from src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermos.C rename to src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermos.C index 260eebe8ec2bfef649242964f1f0ec34fff10177..1d258c409f7978a96a1e238326902f5145b87c6f 100644 --- a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermos.C +++ b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermos.C @@ -23,19 +23,21 @@ License \*---------------------------------------------------------------------------*/ -#include "makeBasicRhoThermo.H" +#include "makePsiThermo.H" #include "perfectGas.H" -#include "pressurePerfectGas.H" #include "hConstThermo.H" +#include "eConstThermo.H" #include "janafThermo.H" +#include "sensibleEnthalpy.H" +#include "sensibleInternalEnergy.H" #include "specieThermo.H" #include "constTransport.H" #include "sutherlandTransport.H" -#include "hsRhoThermo.H" +#include "hePsiThermo.H" #include "pureMixture.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,62 +45,92 @@ License namespace Foam { -/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * Enthalpy-based * * * * * * * * * * * * * */ -makeBasicRhoThermo +makePsiThermo ( - hsRhoThermo, + hePsiThermo, pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeBasicRhoThermo +makePsiThermo ( - hsRhoThermo, + hePsiThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeBasicRhoThermo +makePsiThermo ( - hsRhoThermo, + hePsiThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); -makeBasicRhoThermo + +/* * * * * * * * * * * * * * Internal-energy-based * * * * * * * * * * * * * */ + +makePsiThermo +( + hePsiThermo, + pureMixture, + constTransport, + sensibleInternalEnergy, + eConstThermo, + perfectGas +); + +makePsiThermo +( + hePsiThermo, + pureMixture, + sutherlandTransport, + sensibleInternalEnergy, + eConstThermo, + perfectGas +); + +makePsiThermo ( - hsRhoThermo, + hePsiThermo, pureMixture, constTransport, + sensibleInternalEnergy, hConstThermo, - pressurePerfectGas + perfectGas ); -makeBasicRhoThermo +makePsiThermo ( - hsRhoThermo, + hePsiThermo, pureMixture, sutherlandTransport, + sensibleInternalEnergy, hConstThermo, - pressurePerfectGas + perfectGas ); -makeBasicRhoThermo +makePsiThermo ( - hsRhoThermo, + hePsiThermo, pureMixture, sutherlandTransport, + sensibleInternalEnergy, janafThermo, - pressurePerfectGas + perfectGas ); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.C b/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.C deleted file mode 100644 index a8010f8700f2721bd80c86a9843db5ed7c8ee429..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.C +++ /dev/null @@ -1,345 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hsPsiThermo.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hsPsiThermo<MixtureType>::calculate() -{ - const scalarField& hsCells = hs_.internalField(); - const scalarField& pCells = this->p_.internalField(); - - scalarField& TCells = this->T_.internalField(); - scalarField& psiCells = this->psi_.internalField(); - scalarField& muCells = this->mu_.internalField(); - scalarField& alphaCells = this->alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.THs(hsCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; - fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - - fvPatchScalarField& phs = hs_.boundaryField()[patchi]; - - fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - phs[facei] = mixture_.Hs(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.THs(phs[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hsPsiThermo<MixtureType>::hsPsiThermo(const fvMesh& mesh) -: - basicPsiThermo(mesh), - MixtureType(*this, mesh), - - hs_ - ( - IOobject - ( - "hs", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{ - scalarField& hsCells = hs_.internalField(); - const scalarField& TCells = this->T_.internalField(); - - forAll(hsCells, celli) - { - hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); - } - - forAll(hs_.boundaryField(), patchi) - { - hs_.boundaryField()[patchi] == - hs(this->T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(hs_); - - calculate(); - - // Switch on saving old time - this->psi_.oldTime(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hsPsiThermo<MixtureType>::~hsPsiThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hsPsiThermo<MixtureType>::correct() -{ - if (debug) - { - Info<< "entering hsPsiThermo<MixtureType>::correct()" << endl; - } - - // force the saving of the old-time values - this->psi_.oldTime(); - - calculate(); - - if (debug) - { - Info<< "exiting hsPsiThermo<MixtureType>::correct()" << endl; - } -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hsPsiThermo<MixtureType>::hs -( - const scalarField& T, - const labelList& cells -) const -{ - tmp<scalarField> ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, celli) - { - hs[celli] = this->cellMixture(cells[celli]).Hs(T[celli]); - } - - return ths; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hsPsiThermo<MixtureType>::hs -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, facei) - { - hs[facei] = this->patchFaceMixture(patchi, facei).Hs(T[facei]); - } - - return ths; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hsPsiThermo<MixtureType>::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCp(new scalarField(T.size())); - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> Foam::hsPsiThermo<MixtureType>::Cp() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp<volScalarField> tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - forAll(this->T_, celli) - { - cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& pCp = cp.boundaryField()[patchi]; - - forAll(pT, facei) - { - pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); - } - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hsPsiThermo<MixtureType>::Cv -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCv(new scalarField(T.size())); - scalarField& cv = tCv(); - - forAll(T, facei) - { - cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); - } - - return tCv; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> Foam::hsPsiThermo<MixtureType>::Cv() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp<volScalarField> tCv - ( - new volScalarField - ( - IOobject - ( - "Cv", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cv = tCv(); - - forAll(this->T_, celli) - { - cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - cv.boundaryField()[patchi] = - Cv(this->T_.boundaryField()[patchi], patchi); - } - - return tCv; -} - - -template<class MixtureType> -bool Foam::hsPsiThermo<MixtureType>::read() -{ - if (basicPsiThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.H b/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.H deleted file mode 100644 index a72a521d8c106090422b9bd83b8ef8ba880f8486..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.H +++ /dev/null @@ -1,177 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -Class - Foam::hsPsiThermo - -Description - Sensible enthalpy for a mixture based on compressibility - -SourceFiles - hsPsiThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsPsiThermo_H -#define hsPsiThermo_H - -#include "basicPsiThermo.H" -#include "basicMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsPsiThermo Declaration -\*---------------------------------------------------------------------------*/ - -template<class MixtureType> -class hsPsiThermo -: - public basicPsiThermo, - public MixtureType -{ - // Private data - - //- Sensible enthalpy field [J/kg] - volScalarField hs_; - - - // Private Member Functions - - //- Calculate the thermo variables - void calculate(); - - //- Construct as copy (not implemented) - hsPsiThermo(const hsPsiThermo<MixtureType>&); - - -public: - - //- Runtime type information - TypeName("hsPsiThermo"); - - - // Constructors - - //- Construct from mesh - hsPsiThermo(const fvMesh&); - - - //- Destructor - virtual ~hsPsiThermo(); - - - // Member functions - - //- Return the compostion of the mixture - virtual basicMixture& composition() - { - return *this; - } - - //- Return the compostion of the mixture - virtual const basicMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Access to thermodynamic state variables - - //- Sensible enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& hs() - { - return hs_; - } - - //- Sensible enthalpy [J/kg] - virtual const volScalarField& hs() const - { - return hs_; - } - - - // Fields derived from thermodynamic state variables - - //- Enthalpy for cell-set [J/kg] - virtual tmp<scalarField> hs - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Enthalpy for patch [J/kg] - virtual tmp<scalarField> hs - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp<scalarField> Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp<volScalarField> Cp() const; - - //- Heat capacity at constant volume for patch [J/kg/K] - virtual tmp<scalarField> Cv - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant volume [J/kg/K] - virtual tmp<volScalarField> Cv() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -#ifdef NoRepository -# include "hsPsiThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermos.C b/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermos.C deleted file mode 100644 index 3c646d32bbc4eb500c13c223fe99e108be3c76f8..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermos.C +++ /dev/null @@ -1,79 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "makeBasicPsiThermo.H" - -#include "perfectGas.H" - -#include "hConstThermo.H" -#include "janafThermo.H" -#include "specieThermo.H" - -#include "constTransport.H" -#include "sutherlandTransport.H" - -#include "hsPsiThermo.H" -#include "pureMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ - -makeBasicPsiThermo -( - hsPsiThermo, - pureMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - hsPsiThermo, - pureMixture, - sutherlandTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - hsPsiThermo, - pureMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/makeHsReactionThermo.H b/src/thermophysicalModels/basic/psiThermo/psiThermo/makePsiThermo.H similarity index 54% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/makeHsReactionThermo.H rename to src/thermophysicalModels/basic/psiThermo/psiThermo/makePsiThermo.H index 77a92a8fbb8385dc139903ae4dc3cd17d70679e6..8b65bd5fa5c097af213e469b6ee391bb6383a053 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/makeHsReactionThermo.H +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo/makePsiThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,70 +22,71 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - Foam::hReactionThermo + Foam::psiThermo + +Description + Macros for creating 'basic' compresibility-based thermo packages \*---------------------------------------------------------------------------*/ -#ifndef makeReactionThermo_H -#define makeReactionThermo_H +#ifndef makePsiThermo_H +#define makePsiThermo_H +#include "psiThermo.H" #include "addToRunTimeSelectionTable.H" -#include "basicRhoThermo.H" +#include "sensibleEnthalpy.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeHsReactionThermo(CThermo,MixtureThermo,Mixture,Transport,Thermo,EqnOfState)\ - \ -typedef MixtureThermo \ - <Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - #MixtureThermo \ - "<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicRhoThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - CThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -) - - -#define makeHsReactionMixtureThermo(CThermo,MixtureThermo,Mixture,ThermoPhys) \ +#define makePsiThermo(Cthermo,Mixture,Transport,Type,Thermo,EqnOfState) \ \ -typedef MixtureThermo<Mixture<ThermoPhys> > \ - MixtureThermo##Mixture##ThermoPhys; \ +typedef Cthermo \ +< \ + Mixture \ + < \ + Transport \ + < \ + specieThermo \ + < \ + Thermo \ + < \ + EqnOfState \ + >, \ + Type \ + > \ + > \ + > \ +> Cthermo##Mixture##Transport##Type##Thermo##EqnOfState; \ \ defineTemplateTypeNameAndDebugWithName \ ( \ - MixtureThermo##Mixture##ThermoPhys, \ - #MixtureThermo"<"#Mixture"<"#ThermoPhys">>", \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ + #Cthermo \ + "<" \ + #Mixture \ + "<" \ + #Transport \ + "<specieThermo<" \ + #Thermo \ + "<" \ + #EqnOfState \ + ">," \ + #Type \ + ">>>>", \ 0 \ ); \ \ addToRunTimeSelectionTable \ ( \ - basicRhoThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ + psiThermo, \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ); \ \ addToRunTimeSelectionTable \ ( \ - CThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ + basicThermo, \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ); diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.C b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.C similarity index 86% rename from src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.C rename to src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.C index 11c6ce46a93d794de8d795e3707e8068c444e068..51754615b5079cd439b441c49140daf81f2ef4d1 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.C +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.C @@ -23,20 +23,20 @@ License \*---------------------------------------------------------------------------*/ -#include "basicPsiThermo.H" +#include "psiThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(basicPsiThermo, 0); - defineRunTimeSelectionTable(basicPsiThermo, fvMesh); + defineTypeNameAndDebug(psiThermo, 0); + defineRunTimeSelectionTable(psiThermo, fvMesh); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::basicPsiThermo::basicPsiThermo(const fvMesh& mesh) +Foam::psiThermo::psiThermo(const fvMesh& mesh) : basicThermo(mesh) {} @@ -44,7 +44,7 @@ Foam::basicPsiThermo::basicPsiThermo(const fvMesh& mesh) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::basicPsiThermo::~basicPsiThermo() +Foam::psiThermo::~psiThermo() {} diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.H b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.H similarity index 85% rename from src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.H rename to src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.H index 24198e7de0b27d198a6191ae6ccd633950060da9..06c8bcc53c0e3a01197ddd5f54bc1b7e8ce26798 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.H +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.H @@ -22,19 +22,19 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::basicPsiThermo + Foam::psiThermo Description Basic thermodynamic properties based on compressibility SourceFiles - basicPsiThermo.C - basicPsiThermoNew.C + psiThermo.C + psiThermoNew.C \*---------------------------------------------------------------------------*/ -#ifndef basicPsiThermo_H -#define basicPsiThermo_H +#ifndef psiThermo_H +#define psiThermo_H #include "basicThermo.H" #include "runTimeSelectionTables.H" @@ -45,10 +45,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class basicPsiThermo Declaration + Class psiThermo Declaration \*---------------------------------------------------------------------------*/ -class basicPsiThermo +class psiThermo : public basicThermo { @@ -58,36 +58,38 @@ protected: // Protected Member Functions //- Construct as copy (not implemented) - basicPsiThermo(const basicPsiThermo&); + psiThermo(const psiThermo&); public: //- Runtime type information - TypeName("basicPsiThermo"); + TypeName("psiThermo"); //- Declare run-time constructor selection table declareRunTimeSelectionTable ( autoPtr, - basicPsiThermo, + psiThermo, fvMesh, (const fvMesh& mesh), (mesh) ); + // Constructors //- Construct from mesh - basicPsiThermo(const fvMesh&); + psiThermo(const fvMesh&); //- Selector - static autoPtr<basicPsiThermo> New(const fvMesh&); + static autoPtr<psiThermo> New(const fvMesh&); + //- Destructor - virtual ~basicPsiThermo(); + virtual ~psiThermo(); // Member functions diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermoNew.C similarity index 86% rename from src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C rename to src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermoNew.C index 6327d4aaf7de246827389e3569c4f46fe82d2359..a2407851a9b8b2a50ca66375aa7d2aebf48b3f99 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermoNew.C @@ -23,11 +23,11 @@ License \*---------------------------------------------------------------------------*/ -#include "basicPsiThermo.H" +#include "psiThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr<Foam::basicPsiThermo> Foam::basicPsiThermo::New +Foam::autoPtr<Foam::psiThermo> Foam::psiThermo::New ( const fvMesh& mesh ) @@ -57,14 +57,14 @@ Foam::autoPtr<Foam::basicPsiThermo> Foam::basicPsiThermo::New if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("basicPsiThermo::New(const fvMesh&)") - << "Unknown basicPsiThermo type " << modelType << nl << nl - << "Valid basicPsiThermo types are:" << nl + FatalErrorIn("psiThermo::New(const fvMesh&)") + << "Unknown psiThermo type " << modelType << nl << nl + << "Valid psiThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr<basicPsiThermo>(cstrIter()(mesh)); + return autoPtr<psiThermo>(cstrIter()(mesh)); } diff --git a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C deleted file mode 100644 index e2e7503cfc938a1681a55fdf12940d02ad7f3044..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C +++ /dev/null @@ -1,388 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hRhoThermo.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hRhoThermo<MixtureType>::calculate() -{ - const scalarField& hCells = this->h_.internalField(); - const scalarField& pCells = this->p_.internalField(); - - scalarField& TCells = this->T_.internalField(); - scalarField& psiCells = this->psi_.internalField(); - scalarField& rhoCells = this->rho_.internalField(); - scalarField& muCells = this->mu_.internalField(); - scalarField& alphaCells = this->alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.TH(hCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - rhoCells[celli] = mixture_.rho(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphah(TCells[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; - fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - fvPatchScalarField& prho = this->rho_.boundaryField()[patchi]; - - fvPatchScalarField& ph = this->h_.boundaryField()[patchi]; - - fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - ph[facei] = mixture_.H(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - prho[facei] = mixture_.rho(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.TH(ph[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - prho[facei] = mixture_.rho(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hRhoThermo<MixtureType>::hRhoThermo(const fvMesh& mesh) -: - basicRhoThermo(mesh), - MixtureType(*this, mesh), - - h_ - ( - IOobject - ( - "h", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{ - scalarField& hCells = h_.internalField(); - const scalarField& TCells = this->T_.internalField(); - - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).H(TCells[celli]); - } - - forAll(h_.boundaryField(), patchi) - { - h_.boundaryField()[patchi] == - h(this->T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(h_); - - calculate(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hRhoThermo<MixtureType>::~hRhoThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hRhoThermo<MixtureType>::correct() -{ - if (debug) - { - Info<< "entering hRhoThermo<MixtureType>::correct()" << endl; - } - - calculate(); - - if (debug) - { - Info<< "exiting hRhoThermo<MixtureType>::correct()" << endl; - } -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hRhoThermo<MixtureType>::h -( - const scalarField& T, - const labelList& cells -) const -{ - tmp<scalarField> th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).H(T[celli]); - } - - return th; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hRhoThermo<MixtureType>::h -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).H(T[facei]); - } - - return th; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hRhoThermo<MixtureType>::TH -( - const scalarField& h, - const scalarField& T0, - const labelList& cells -) const -{ - tmp<scalarField> tT(new scalarField(h.size())); - scalarField& T = tT(); - - forAll(h, celli) - { - T[celli] = this->cellMixture(cells[celli]).TH(h[celli], T0[celli]); - } - - return tT; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hRhoThermo<MixtureType>::TH -( - const scalarField& h, - const scalarField& T0, - const label patchi -) const -{ - tmp<scalarField> tT(new scalarField(h.size())); - scalarField& T = tT(); - - forAll(h, facei) - { - T[facei] = this->patchFaceMixture - ( - patchi, - facei - ).TH(h[facei], T0[facei]); - } - - return tT; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hRhoThermo<MixtureType>::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCp(new scalarField(T.size())); - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> Foam::hRhoThermo<MixtureType>::Cp() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp<volScalarField> tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - forAll(this->T_, celli) - { - cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& pCp = cp.boundaryField()[patchi]; - - forAll(pT, facei) - { - pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); - } - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hRhoThermo<MixtureType>::Cv -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCv(new scalarField(T.size())); - scalarField& cv = tCv(); - - forAll(T, facei) - { - cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); - } - - return tCv; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> Foam::hRhoThermo<MixtureType>::Cv() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp<volScalarField> tCv - ( - new volScalarField - ( - IOobject - ( - "Cv", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cv = tCv(); - - forAll(this->T_, celli) - { - cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - cv.boundaryField()[patchi] = - Cv(this->T_.boundaryField()[patchi], patchi); - } - - return tCv; -} - - -template<class MixtureType> -bool Foam::hRhoThermo<MixtureType>::read() -{ - if (basicRhoThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.H deleted file mode 100644 index 1f85793f6b550264d17e6809fb6757f0bb91e11f..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.H +++ /dev/null @@ -1,193 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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/>. - -Class - Foam::hRhoThermo - -Description - Enthalpy for a mixture based on density - -SourceFiles - hRhoThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hRhoThermo_H -#define hRhoThermo_H - -#include "basicRhoThermo.H" -#include "basicMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hRhoThermo Declaration -\*---------------------------------------------------------------------------*/ - -template<class MixtureType> -class hRhoThermo -: - public basicRhoThermo, - public MixtureType -{ - // Private data - - //- Enthalpy field - volScalarField h_; - - - // Private Member Functions - - //- Calculate the thermo variables - void calculate(); - - //- Construct as copy (not implemented) - hRhoThermo(const hRhoThermo<MixtureType>&); - - -public: - - //- Runtime type information - TypeName("hRhoThermo"); - - - // Constructors - - //- Construct from mesh - hRhoThermo(const fvMesh&); - - - //- Destructor - virtual ~hRhoThermo(); - - - // Member functions - - //- Return the compostion of the combustion mixture - virtual basicMixture& composition() - { - return *this; - } - - //- Return the compostion of the combustion mixture - virtual const basicMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Access to thermodynamic state variables - - //- Enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& h() - { - return h_; - } - - //- Enthalpy [J/kg] - virtual const volScalarField& h() const - { - return h_; - } - - - // Fields derived from thermodynamic state variables - - //- Enthalpy for cell-set [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Enthalpy for patch [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const label patchi - ) const; - - //- Temperature from enthalpy for cell-set - virtual tmp<scalarField> TH - ( - const scalarField& h, - const scalarField& T0, // starting temperature - const labelList& cells - ) const; - - //- Temperature from enthalpy for patch - virtual tmp<scalarField> TH - ( - const scalarField& h, - const scalarField& T0, // starting temperature - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp<scalarField> Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp<volScalarField> Cp() const; - - //- Heat capacity at constant volume for patch [J/kg/K] - virtual tmp<scalarField> Cv - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant volume [J/kg/K] - virtual tmp<volScalarField> Cv() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -#ifdef NoRepository -# include "hRhoThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.C new file mode 100644 index 0000000000000000000000000000000000000000..044936ebaefb8a99bd3a8afb0c4de7dea4dde4f2 --- /dev/null +++ b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.C @@ -0,0 +1,138 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-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/>. + +\*---------------------------------------------------------------------------*/ + +#include "heRhoThermo.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template<class MixtureType> +void Foam::heRhoThermo<MixtureType>::calculate() +{ + const scalarField& hCells = this->he().internalField(); + const scalarField& pCells = this->p_.internalField(); + + scalarField& TCells = this->T_.internalField(); + scalarField& psiCells = this->psi_.internalField(); + scalarField& rhoCells = this->rho_.internalField(); + scalarField& muCells = this->mu_.internalField(); + scalarField& alphaCells = this->alpha_.internalField(); + + forAll(TCells, celli) + { + const typename MixtureType::thermoType& mixture_ = + this->cellMixture(celli); + + TCells[celli] = mixture_.THE(hCells[celli], TCells[celli]); + psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); + rhoCells[celli] = mixture_.rho(pCells[celli], TCells[celli]); + + muCells[celli] = mixture_.mu(TCells[celli]); + alphaCells[celli] = mixture_.alphah(TCells[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; + fvPatchScalarField& prho = this->rho_.boundaryField()[patchi]; + + fvPatchScalarField& ph = this->he().boundaryField()[patchi]; + + fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; + fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; + + if (pT.fixesValue()) + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture_ = + this->patchFaceMixture(patchi, facei); + + ph[facei] = mixture_.HE(pT[facei]); + + ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); + prho[facei] = mixture_.rho(pp[facei], pT[facei]); + pmu[facei] = mixture_.mu(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); + } + } + else + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture_ = + this->patchFaceMixture(patchi, facei); + + pT[facei] = mixture_.THE(ph[facei], pT[facei]); + + ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); + prho[facei] = mixture_.rho(pp[facei], pT[facei]); + pmu[facei] = mixture_.mu(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class MixtureType> +Foam::heRhoThermo<MixtureType>::heRhoThermo(const fvMesh& mesh) +: + heThermo<rhoThermo, MixtureType>(mesh) +{ + calculate(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class MixtureType> +Foam::heRhoThermo<MixtureType>::~heRhoThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class MixtureType> +void Foam::heRhoThermo<MixtureType>::correct() +{ + if (debug) + { + Info<< "entering heRhoThermo<MixtureType>::correct()" << endl; + } + + calculate(); + + if (debug) + { + Info<< "exiting heRhoThermo<MixtureType>::correct()" << endl; + } +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.H b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.H similarity index 55% rename from src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.H rename to src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.H index 911ab820aa51bd68fef92254a31c3bd051e6dc65..a2d62a78a2a688d22846ed8aa5b4856d52aa9fb5 100644 --- a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.H +++ b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.H @@ -22,28 +22,21 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::speciesTransport + Foam::heRhoThermo Description - Basic species transport type based on the use of a fitting - function for nu. - - All other properties are derived from this primitive function. - - The nu function must be provided by the derived type, - e.g. SutherlandTransport. + Enthalpy for a mixture based on density SourceFiles - speciesTransportI.H - speciesTransport.C + heRhoThermo.C \*---------------------------------------------------------------------------*/ -#ifndef speciesTransport_H -#define speciesTransport_H +#ifndef heRhoThermo_H +#define heRhoThermo_H -//#include "speciesThermo.H" -#include "janafThermo.H" +#include "rhoThermo.H" +#include "heThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,52 +44,43 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class speciesTransport Declaration + Class heRhoThermo Declaration \*---------------------------------------------------------------------------*/ -class speciesTransport +template<class MixtureType> +class heRhoThermo : - public janafThermo + public heThermo<rhoThermo, MixtureType> { + // Private Member Functions -public: - - // Constructors - - //- Construct from speciesThermo - inline speciesTransport(const janafThermo& sThermo); + //- Calculate the thermo variables + void calculate(); - //- Construct from Istream - speciesTransport(Istream&); + //- Construct as copy (not implemented) + heRhoThermo(const heRhoThermo<MixtureType>&); - //- Construct from dictionary - speciesTransport(const dictionary& dict); +public: - // Member Functions - - // Dynamic viscosity [kg/ms] - //inline scalar mu(const scalar T) const + //- Runtime type information + TypeName("heRhoThermo"); - // Thermal conductivity [W/mK] - //inline scalar kappa(const scalar T) const; - // Thermal diffusivity for internal energy [kg/ms] - //inline scalar alphae(const scalar T) const; + // Constructors - // Thermal diffusivity for enthalpy [kg/ms] - //inline scalar alphah(const scalar T) const; + //- Construct from mesh + heRhoThermo(const fvMesh&); - // Species diffusivity - //inline scalar D(const scalar T) const; - //- Write to Ostream - void write(Ostream& os) const; + //- Destructor + virtual ~heRhoThermo(); - // Ostream Operator + // Member functions - friend Ostream& operator<<(Ostream&, const speciesTransport&); + //- Update properties + virtual void correct(); }; @@ -104,9 +88,11 @@ public: } // End namespace Foam -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -#include "speciesTransportI.H" +#ifdef NoRepository +# include "heRhoThermo.C" +#endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermos.C b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermos.C similarity index 74% rename from src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermos.C rename to src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermos.C index 7da039e2678e79f7e335a20060e57be7d6e66878..28b80e1d4f3984e0c746a6f1796dd8838fa08ed6 100644 --- a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermos.C +++ b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermos.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,14 +23,16 @@ License \*---------------------------------------------------------------------------*/ -#include "makeBasicRhoThermo.H" +#include "makeRhoThermo.H" #include "perfectGas.H" -#include "pressurePerfectGas.H" +#include "isobaricPerfectGas.H" #include "incompressible.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "sensibleEnthalpy.H" +#include "sensibleInternalEnergy.H" #include "specieThermo.H" #include "constTransport.H" @@ -40,7 +42,7 @@ License #include "hPolynomialThermo.H" #include "polynomialTransport.H" -#include "hRhoThermo.H" +#include "heRhoThermo.H" #include "pureMixture.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,81 +52,90 @@ namespace Foam /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, incompressible ); -makeBasicRhoPolyThermo +makeRhoPolyThermo ( - hRhoThermo, + heRhoThermo, pureMixture, - 3 + 3, + sensibleEnthalpy ); -makeBasicRhoPolyThermo +makeRhoPolyThermo ( - hRhoThermo, + heRhoThermo, pureMixture, - 8 + 8, + sensibleEnthalpy ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, - pressurePerfectGas + isobaricPerfectGas ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, - pressurePerfectGas + isobaricPerfectGas ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, - pressurePerfectGas + isobaricPerfectGas ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.C deleted file mode 100644 index f8697bf675beabbcb7d650d392dd17a33bbac7f4..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.C +++ /dev/null @@ -1,344 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hsRhoThermo.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hsRhoThermo<MixtureType>::calculate() -{ - const scalarField& hsCells = this->hs_.internalField(); - const scalarField& pCells = this->p_.internalField(); - - scalarField& TCells = this->T_.internalField(); - scalarField& psiCells = this->psi_.internalField(); - scalarField& rhoCells = this->rho_.internalField(); - scalarField& muCells = this->mu_.internalField(); - scalarField& alphaCells = this->alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.THs(hsCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - rhoCells[celli] = mixture_.rho(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphah(TCells[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; - fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - fvPatchScalarField& prho = this->rho_.boundaryField()[patchi]; - - fvPatchScalarField& phs = this->hs_.boundaryField()[patchi]; - - fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - phs[facei] = mixture_.Hs(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - prho[facei] = mixture_.rho(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.THs(phs[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - prho[facei] = mixture_.rho(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hsRhoThermo<MixtureType>::hsRhoThermo(const fvMesh& mesh) -: - basicRhoThermo(mesh), - MixtureType(*this, mesh), - - hs_ - ( - IOobject - ( - "hs", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{ - scalarField& hsCells = hs_.internalField(); - const scalarField& TCells = this->T_.internalField(); - - forAll(hsCells, celli) - { - hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); - } - - forAll(hs_.boundaryField(), patchi) - { - hs_.boundaryField()[patchi] == - hs(this->T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(hs_); - - calculate(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hsRhoThermo<MixtureType>::~hsRhoThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hsRhoThermo<MixtureType>::correct() -{ - if (debug) - { - Info<< "entering hsRhoThermo<MixtureType>::correct()" << endl; - } - - calculate(); - - if (debug) - { - Info<< "exiting hsRhoThermo<MixtureType>::correct()" << endl; - } -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hsRhoThermo<MixtureType>::hs -( - const scalarField& T, - const labelList& cells -) const -{ - tmp<scalarField> ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, celli) - { - hs[celli] = this->cellMixture(cells[celli]).Hs(T[celli]); - } - - return ths; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hsRhoThermo<MixtureType>::hs -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, facei) - { - hs[facei] = this->patchFaceMixture(patchi, facei).Hs(T[facei]); - } - - return ths; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hsRhoThermo<MixtureType>::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCp(new scalarField(T.size())); - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> Foam::hsRhoThermo<MixtureType>::Cp() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp<volScalarField> tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - forAll(this->T_, celli) - { - cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& pCp = cp.boundaryField()[patchi]; - - forAll(pT, facei) - { - pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); - } - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hsRhoThermo<MixtureType>::Cv -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCv(new scalarField(T.size())); - scalarField& cv = tCv(); - - forAll(T, facei) - { - cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); - } - - return tCv; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> Foam::hsRhoThermo<MixtureType>::Cv() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp<volScalarField> tCv - ( - new volScalarField - ( - IOobject - ( - "Cv", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cv = tCv(); - - forAll(this->T_, celli) - { - cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - cv.boundaryField()[patchi] = - Cv(this->T_.boundaryField()[patchi], patchi); - } - - return tCv; -} - - -template<class MixtureType> -bool Foam::hsRhoThermo<MixtureType>::read() -{ - if (basicRhoThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.H deleted file mode 100644 index 8ea8db706d833871e129a711df9d600d3e6264f2..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.H +++ /dev/null @@ -1,177 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -Class - Foam::hsRhoThermo - -Description - Sensible enthalpy for a mixture based on density - -SourceFiles - hsRhoThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsRhoThermo_H -#define hsRhoThermo_H - -#include "basicRhoThermo.H" -#include "basicMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsRhoThermo Declaration -\*---------------------------------------------------------------------------*/ - -template<class MixtureType> -class hsRhoThermo -: - public basicRhoThermo, - public MixtureType -{ - // Private data - - //- Sensible enthalpy field [J/kg] - volScalarField hs_; - - - // Private Member Functions - - //- Calculate the thermo variables - void calculate(); - - //- Construct as copy (not implemented) - hsRhoThermo(const hsRhoThermo<MixtureType>&); - - -public: - - //- Runtime type information - TypeName("hsRhoThermo"); - - - // Constructors - - //- Construct from mesh - hsRhoThermo(const fvMesh&); - - - //- Destructor - virtual ~hsRhoThermo(); - - - // Member functions - - //- Return the compostion of the combustion mixture - virtual basicMixture& composition() - { - return *this; - } - - //- Return the compostion of the combustion mixture - virtual const basicMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Access to thermodynamic state variables - - //- Sensible enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& hs() - { - return hs_; - } - - //- Sensible enthalpy [J/kg] - virtual const volScalarField& hs() const - { - return hs_; - } - - - // Fields derived from thermodynamic state variables - - //- Sensible enthalpy for cell-set [J/kg] - virtual tmp<scalarField> hs - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Sensible enthalpy for patch [J/kg] - virtual tmp<scalarField> hs - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp<scalarField> Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp<volScalarField> Cp() const; - - //- Heat capacity at constant volume for patch [J/kg/K] - virtual tmp<scalarField> Cv - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant volume [J/kg/K] - virtual tmp<volScalarField> Cv() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -#ifdef NoRepository -# include "hsRhoThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/makeBasicRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/makeRhoThermo.H similarity index 62% rename from src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/makeBasicRhoThermo.H rename to src/thermophysicalModels/basic/rhoThermo/rhoThermo/makeRhoThermo.H index e7a4de187e1272083c4f07eb27ce7d3e4a9fc63d..66869a4336a9cb10fc0cd83cb9d6c3e60ff6376c 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/makeBasicRhoThermo.H +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/makeRhoThermo.H @@ -22,50 +22,75 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - Foam::basicRhoThermo + Foam::rhoThermo Description Macros for creating 'basic' density-based thermo packages \*---------------------------------------------------------------------------*/ -#ifndef makeBasicRhoThermo_H -#define makeBasicRhoThermo_H +#ifndef makeRhoThermo_H +#define makeRhoThermo_H -#include "basicRhoThermo.H" +#include "rhoThermo.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeBasicRhoThermo(Cthermo,Mixture,Transport,Thermo,EqnOfState) \ +#define makeRhoThermo(Cthermo,Mixture,Transport,Type,Thermo,EqnOfState) \ \ -typedef Cthermo<Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \ - Cthermo##Mixture##Transport##Thermo##EqnOfState; \ +typedef Cthermo \ +< \ + Mixture \ + < \ + Transport \ + < \ + specieThermo \ + < \ + Thermo \ + < \ + EqnOfState \ + >, \ + Type \ + > \ + > \ + > \ +> Cthermo##Mixture##Transport##Type##Thermo##EqnOfState; \ \ defineTemplateTypeNameAndDebugWithName \ ( \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ #Cthermo \ - "<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", \ + "<" \ + #Mixture \ + "<" \ + #Transport \ + "<specieThermo<" \ + #Thermo \ + "<" \ + #EqnOfState \ + ">," \ + #Type \ + ">>>>", \ 0 \ ); \ \ addToRunTimeSelectionTable \ ( \ - basicRhoThermo, \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ + rhoThermo, \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ); \ \ addToRunTimeSelectionTable \ ( \ basicThermo, \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ); -#define makeBasicRhoPolyThermo(Cthermo,Mixture,Order) \ +#define makeRhoPolyThermo(Cthermo,Mixture,Order,Type) \ \ typedef polynomialTransport \ < \ @@ -75,32 +100,33 @@ typedef polynomialTransport \ < \ icoPolynomial<Order>, \ Order \ - > \ + >, \ + Type \ >, \ Order \ -> icoPoly##Order##ThermoPhysics; \ +> icoPoly##Order##Type##ThermoPhysics; \ \ -typedef Cthermo<Mixture<icoPoly##Order##ThermoPhysics> > \ - Cthermo##Mixture##icoPoly##Order##ThermoPhysics; \ +typedef Cthermo<Mixture<icoPoly##Order##Type##ThermoPhysics> > \ + Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics; \ \ defineTemplateTypeNameAndDebugWithName \ ( \ - Cthermo##Mixture##icoPoly##Order##ThermoPhysics, \ - #Cthermo"<"#Mixture"<icoPoly"#Order"ThermoPhysics>>", \ + Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \ + #Cthermo"<"#Mixture"<icoPoly"#Order#Type"ThermoPhysics>>", \ 0 \ ); \ \ addToRunTimeSelectionTable \ ( \ - basicRhoThermo, \ - Cthermo##Mixture##icoPoly##Order##ThermoPhysics, \ + rhoThermo, \ + Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \ fvMesh \ ); \ \ addToRunTimeSelectionTable \ ( \ basicThermo, \ - Cthermo##Mixture##icoPoly##Order##ThermoPhysics, \ + Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \ fvMesh \ ); diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.C similarity index 84% rename from src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C rename to src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.C index 4d2fff1c3579c6d25dfb3bd357adfcbc96b595b1..fc4c9f5387789838b1e7e65779f647ce7d79f8a2 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.C @@ -23,20 +23,20 @@ License \*---------------------------------------------------------------------------*/ -#include "basicRhoThermo.H" +#include "rhoThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(basicRhoThermo, 0); - defineRunTimeSelectionTable(basicRhoThermo, fvMesh); + defineTypeNameAndDebug(rhoThermo, 0); + defineRunTimeSelectionTable(rhoThermo, fvMesh); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::basicRhoThermo::basicRhoThermo(const fvMesh& mesh) +Foam::rhoThermo::rhoThermo(const fvMesh& mesh) : basicThermo(mesh), rho_ @@ -57,19 +57,19 @@ Foam::basicRhoThermo::basicRhoThermo(const fvMesh& mesh) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::basicRhoThermo::~basicRhoThermo() +Foam::rhoThermo::~rhoThermo() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::tmp<Foam::volScalarField> Foam::basicRhoThermo::rho() const +Foam::tmp<Foam::volScalarField> Foam::rhoThermo::rho() const { return rho_; } -Foam::volScalarField& Foam::basicRhoThermo::rho() +Foam::volScalarField& Foam::rhoThermo::rho() { return rho_; } diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.H similarity index 86% rename from src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H rename to src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.H index 59f20bc0854b6cb5e2c00ea2475fcf595b9ce9e3..28616df157baa04ba38f5d1f771faf02f0a932e0 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.H @@ -22,19 +22,19 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::basicRhoThermo + Foam::rhoThermo Description Basic thermodynamic properties based on density SourceFiles - basicRhoThermo.C - basicRhoThermoNew.C + rhoThermo.C + rhoThermoNew.C \*---------------------------------------------------------------------------*/ -#ifndef basicRhoThermo_H -#define basicRhoThermo_H +#ifndef rhoThermo_H +#define rhoThermo_H #include "basicThermo.H" #include "runTimeSelectionTables.H" @@ -45,10 +45,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class basicRhoThermo Declaration + Class rhoThermo Declaration \*---------------------------------------------------------------------------*/ -class basicRhoThermo +class rhoThermo : public basicThermo { @@ -65,20 +65,20 @@ protected: // Protected Member Functions //- Construct as copy (not implemented) - basicRhoThermo(const basicRhoThermo&); + rhoThermo(const rhoThermo&); public: //- Runtime type information - TypeName("basicRhoThermo"); + TypeName("rhoThermo"); //- Declare run-time constructor selection table declareRunTimeSelectionTable ( autoPtr, - basicRhoThermo, + rhoThermo, fvMesh, (const fvMesh& mesh), (mesh) @@ -88,15 +88,15 @@ public: // Constructors //- Construct from mesh - basicRhoThermo(const fvMesh&); + rhoThermo(const fvMesh&); //- Selector - static autoPtr<basicRhoThermo> New(const fvMesh&); + static autoPtr<rhoThermo> New(const fvMesh&); //- Destructor - virtual ~basicRhoThermo(); + virtual ~rhoThermo(); // Member functions diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermoNew.C similarity index 87% rename from src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C rename to src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermoNew.C index 02e6b4932ce2186e70f952a33daa6feb5afeb97d..123f7c31f4386d1d24bb00109c60b1e131a93416 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermoNew.C @@ -23,11 +23,11 @@ License \*---------------------------------------------------------------------------*/ -#include "basicRhoThermo.H" +#include "rhoThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr<Foam::basicRhoThermo> Foam::basicRhoThermo::New +Foam::autoPtr<Foam::rhoThermo> Foam::rhoThermo::New ( const fvMesh& mesh ) @@ -57,15 +57,15 @@ Foam::autoPtr<Foam::basicRhoThermo> Foam::basicRhoThermo::New if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("basicRhoThermo::New(const fvMesh&)") - << "Unknown basicRhoThermo type " + FatalErrorIn("rhoThermo::New(const fvMesh&)") + << "Unknown rhoThermo type " << modelType << nl << nl - << "Valid basicRhoThermo types are:" << nl + << "Valid rhoThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr<basicRhoThermo>(cstrIter()(mesh)); + return autoPtr<rhoThermo>(cstrIter()(mesh)); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C index f0807eb725093cd3bf1c4e3836b049642afdfc57..89e658352b9d83198f64dc8dea5c16612b64af4b 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C @@ -361,7 +361,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::derivatives scalar dT = 0.0; for (label i = 0; i < nSpecie_; i++) { - const scalar hi = specieThermo_[i].h(T); + const scalar hi = specieThermo_[i].ha(T); dT += hi*dcdt[i]; } dT /= rho*cp; @@ -782,7 +782,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve forAll(rho, celli) { const scalar rhoi = rho[celli]; - const scalar hi = this->thermo().hs()[celli] + hc[celli]; + const scalar hi = this->thermo().he()[celli] + hc[celli]; const scalar pi = this->thermo().p()[celli]; scalar Ti = this->thermo().T()[celli]; @@ -815,7 +815,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve { mixture += (c[i]/cTot)*specieThermo_[i]; } - Ti = mixture.TH(hi, Ti); + Ti = mixture.THa(hi, Ti); timeLeft -= dt; this->deltaTChem_[celli] = tauC; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.C index 81dab0cd337b638f748981dbc1f686e0ae72e306..5dd1f091cd9c052041ad2a03930e9182333c6525 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.C @@ -44,7 +44,7 @@ Foam::psiChemistryModel::psiChemistryModel ) : basicChemistryModel(mesh), - thermo_(hsCombustionThermo::NewType(mesh, thermoTypeName)) + thermo_(psiReactionThermo::NewType(mesh, thermoTypeName)) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.H index 448001153c046d39a5545479d5f5765d030c7b44..9381000ac3959bbcc7ff6020c187ddd7a0e703ab 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.H @@ -40,7 +40,7 @@ SourceFiles #include "basicChemistryModel.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" -#include "hsCombustionThermo.H" +#include "psiReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,7 +72,7 @@ protected: // Protected data //- Thermo package - autoPtr<hsCombustionThermo> thermo_; + autoPtr<psiReactionThermo> thermo_; public: @@ -113,10 +113,10 @@ public: // Member Functions //- Return access to the thermo package - inline hsCombustionThermo& thermo(); + inline psiReactionThermo& thermo(); //- Return const access to the thermo package - inline const hsCombustionThermo& thermo() const; + inline const psiReactionThermo& thermo() const; }; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelI.H index 543234e549fe7a085a789af64fcdc5c26feca993..88bfa40c6b22f9ea53017c9f99f05d896a9c6374 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelI.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelI.H @@ -25,13 +25,13 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::hsCombustionThermo& Foam::psiChemistryModel::thermo() +inline Foam::psiReactionThermo& Foam::psiChemistryModel::thermo() { return thermo_(); } -inline const Foam::hsCombustionThermo& Foam::psiChemistryModel::thermo() const +inline const Foam::psiReactionThermo& Foam::psiChemistryModel::thermo() const { return thermo_(); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.C index cb139816470b811f04e8c7d612d61e4e9aa0c69e..569923a4571457be40c593b6e38030c1565a7c9e 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.C @@ -44,7 +44,7 @@ Foam::rhoChemistryModel::rhoChemistryModel ) : basicChemistryModel(mesh), - thermo_(hsReactionThermo::NewType(mesh, thermoTypeName)) + thermo_(rhoReactionThermo::NewType(mesh, thermoTypeName)) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.H index 8da1bd7fd982d819ec65900aa8631cb62f23849f..2b3f5516304bb2031fd8b2c3cad98193f8842907 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.H @@ -40,7 +40,7 @@ SourceFiles #include "basicChemistryModel.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" -#include "hsReactionThermo.H" +#include "rhoReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,7 +72,7 @@ protected: // Protected data //- Thermo package - autoPtr<hsReactionThermo> thermo_; + autoPtr<rhoReactionThermo> thermo_; public: @@ -113,10 +113,10 @@ public: // Member Functions //- Return access to the thermo package - inline hsReactionThermo& thermo(); + inline rhoReactionThermo& thermo(); //- Return const access to the thermo package - inline const hsReactionThermo& thermo() const; + inline const rhoReactionThermo& thermo() const; }; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelI.H index 3cba5b30e596190065a36df389b9fa6b6e0c8f53..06ac33b0b49ad7a2bcdb3fe1886a49c1b0eb54f6 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelI.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelI.H @@ -25,13 +25,13 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::hsReactionThermo& Foam::rhoChemistryModel::thermo() +inline Foam::rhoReactionThermo& Foam::rhoChemistryModel::thermo() { return thermo_(); } -inline const Foam::hsReactionThermo& Foam::rhoChemistryModel::thermo() const +inline const Foam::rhoReactionThermo& Foam::rhoChemistryModel::thermo() const { return thermo_(); } diff --git a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C index e7d0fc9e65dd9f4b59fdde24963e71e4d7131d58..ca471f62257d329b6fadca066334964961af9a0a 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C +++ b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C @@ -49,7 +49,7 @@ namespace laminarFlameSpeedModels Foam::laminarFlameSpeedModels::Gulders::Gulders ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) : laminarFlameSpeed(dict, ct), @@ -206,17 +206,17 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::operator()() const { - if (hhuCombustionThermo_.composition().contains("ft")) + if (psiuReactionThermo_.composition().contains("ft")) { - const volScalarField& ft = hhuCombustionThermo_.composition().Y("ft"); + const volScalarField& ft = psiuReactionThermo_.composition().Y("ft"); return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), dimensionedScalar ( - hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio") + psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio") )*ft/((1 + SMALL) - ft) ); } @@ -224,8 +224,8 @@ Foam::laminarFlameSpeedModels::Gulders::operator()() const { return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), equivalenceRatio_ ); } diff --git a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.H b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.H index bd07c2831238502688b8a2b87d179e58488d9a9d..59522246751b0574cde39d38d2cb8ba933c058af 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.H +++ b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.H @@ -106,11 +106,11 @@ public: // Constructors - //- Construct from dictionary and hhuCombustionThermo + //- Construct from dictionary and psiuReactionThermo Gulders ( const dictionary&, - const hhuCombustionThermo& + const psiuReactionThermo& ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C index fec1359801febe4c2511a818b5475d3cef4bdc2a..86c89e01b95191f3f0c30eb6dc2d2310b02c4301 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C +++ b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C @@ -48,7 +48,7 @@ namespace laminarFlameSpeedModels Foam::laminarFlameSpeedModels::GuldersEGR::GuldersEGR ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) : laminarFlameSpeed(dict, ct), @@ -210,31 +210,31 @@ Foam::laminarFlameSpeedModels::GuldersEGR::operator()() const { if ( - hhuCombustionThermo_.composition().contains("ft") - && hhuCombustionThermo_.composition().contains("egr") + psiuReactionThermo_.composition().contains("ft") + && psiuReactionThermo_.composition().contains("egr") ) { return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), dimensionedScalar ( - hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio") + psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio") )/ ( - scalar(1)/hhuCombustionThermo_.composition().Y("ft") + scalar(1)/psiuReactionThermo_.composition().Y("ft") - scalar(1) ), - hhuCombustionThermo_.composition().Y("egr") + psiuReactionThermo_.composition().Y("egr") ); } else { return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), equivalenceRatio_ ); } diff --git a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.H b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.H index a7762cfb22e1539f871d7a2017a8e36c33856377..86dd6a2a71cde4b7eb0fd7f6ae1320cd7463119e 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.H +++ b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.H @@ -107,11 +107,11 @@ public: // Constructors - //- Construct from dictionary and hhuCombustionThermo + //- Construct from dictionary and psiuReactionThermo GuldersEGR ( const dictionary&, - const hhuCombustionThermo& + const psiuReactionThermo& ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/constant/constant.C b/src/thermophysicalModels/laminarFlameSpeed/constant/constant.C index e74d787e63b86f465e70483d1951d21ea51f6295..615cc60eb2d32c128977bf1679b33b10f71262d6 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/constant/constant.C +++ b/src/thermophysicalModels/laminarFlameSpeed/constant/constant.C @@ -49,7 +49,7 @@ namespace laminarFlameSpeedModels Foam::laminarFlameSpeedModels::constant::constant ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) : laminarFlameSpeed(dict, ct), @@ -76,12 +76,12 @@ Foam::laminarFlameSpeedModels::constant::operator()() const IOobject ( "Su0", - hhuCombustionThermo_.T().time().timeName(), - hhuCombustionThermo_.T().db(), + psiuReactionThermo_.T().time().timeName(), + psiuReactionThermo_.T().db(), IOobject::NO_READ, IOobject::NO_WRITE ), - hhuCombustionThermo_.T().mesh(), + psiuReactionThermo_.T().mesh(), Su_ ) ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/constant/constant.H b/src/thermophysicalModels/laminarFlameSpeed/constant/constant.H index 1ecf8a4de5c08eceb76092864d83ad2956aceaa6..55900849c1dc1ddc1d3ea0f3911d8e915b45d227 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/constant/constant.H +++ b/src/thermophysicalModels/laminarFlameSpeed/constant/constant.H @@ -75,11 +75,11 @@ public: // Constructors - //- Construct from dictionary and hhuCombustionThermo + //- Construct from dictionary and psiuReactionThermo constant ( const dictionary&, - const hhuCombustionThermo& + const psiuReactionThermo& ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.C b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.C index d7e9f87235a9c04d6483f78a0cdecf9c74191b09..3f6d9bf2139bbcbb785a5ad76923e4c11055491f 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.C +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.C @@ -40,14 +40,14 @@ namespace Foam Foam::laminarFlameSpeed::laminarFlameSpeed ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) : - hhuCombustionThermo_(ct), + psiuReactionThermo_(ct), fuel_(dict.lookup("fuel")), equivalenceRatio_(0) { - if (!hhuCombustionThermo_.composition().contains("ft")) + if (!psiuReactionThermo_.composition().contains("ft")) { equivalenceRatio_ = dimensionedScalar(dict.lookup("equivalenceRatio")).value(); diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H index 508195cc775afeaefe0e6ae2d21e8f941535c4e4..26e84e2768394fabcbe39b8bde5559b39ba9d09c 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H @@ -43,7 +43,7 @@ SourceFiles #ifndef laminarFlameSpeed_H #define laminarFlameSpeed_H -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" @@ -63,7 +63,7 @@ protected: // Protected data - const hhuCombustionThermo& hhuCombustionThermo_; + const psiuReactionThermo& psiuReactionThermo_; //- Fuel word fuel_; @@ -96,7 +96,7 @@ public: dictionary, ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ), (dict, ct) ); @@ -104,11 +104,11 @@ public: // Constructors - //- Construct from dictionary and hhuCombustionThermo + //- Construct from dictionary and psiuReactionThermo laminarFlameSpeed ( const dictionary&, - const hhuCombustionThermo& + const psiuReactionThermo& ); @@ -116,7 +116,7 @@ public: static autoPtr<laminarFlameSpeed> New ( - const hhuCombustionThermo& + const psiuReactionThermo& ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C index 3511f7bc6ae3a5239d8a223a169c6baa0bff3753..8d18207d0b8181237d5dc10df65918faac0b9404 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C @@ -29,7 +29,7 @@ License Foam::autoPtr<Foam::laminarFlameSpeed> Foam::laminarFlameSpeed::New ( - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) { // do not register the dictionary @@ -57,7 +57,7 @@ Foam::autoPtr<Foam::laminarFlameSpeed> Foam::laminarFlameSpeed::New { FatalIOErrorIn ( - "laminarFlameSpeed::New(const hhuCombustionThermo&)", + "laminarFlameSpeed::New(const psiuReactionThermo&)", propDict ) << "Unknown laminarFlameSpeed type " << corrType << nl << nl diff --git a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C index 7e780fe22f8e0accffda0157f34bbdbd2b9e4f9d..383dbb63497d4bddee53ada880dbf356020fa4a8 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C @@ -145,33 +145,15 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Sh basicThermo& thermo ) const { - volScalarField& h = thermo.h(); - const volScalarField Cp(thermo.Cp()); + volScalarField& he = thermo.he(); + const volScalarField Cpv(thermo.Cpv()); const volScalarField T3(pow3(T_)); return ( Ru() - - fvm::Sp(4.0*Rp()*T3/Cp, h) - - Rp()*T3*(T_ - 4.0*h/Cp) - ); -} - - -Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Shs -( - basicThermo& thermo -) const -{ - volScalarField& hs = thermo.hs(); - const volScalarField Cp(thermo.Cp()); - const volScalarField T3(pow3(T_)); - - return - ( - Ru() - - fvm::Sp(4.0*Rp()*T3/Cp, hs) - - Rp()*T3*(T_ - 4.0*hs/Cp) + - fvm::Sp(4.0*Rp()*T3/Cpv, he) + - Rp()*T3*(T_ - 4.0*he/Cpv) ); } diff --git a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H index f33f962784b37aa28f766e68afb6b7dacaac41a6..e0eddb397203a87ff8186b0d0864d776c961e6e2 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H +++ b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H @@ -176,11 +176,8 @@ public: //- Source term component (constant) virtual tmp<DimensionedField<scalar, volMesh> > Ru() const = 0; - //- Enthalpy source term + //- Energy source term virtual tmp<fvScalarMatrix> Sh(basicThermo& thermo) const; - - //- Sensible enthalpy source term - virtual tmp<fvScalarMatrix> Shs(basicThermo& thermo) const; }; diff --git a/src/thermophysicalModels/reactionThermo/Make/files b/src/thermophysicalModels/reactionThermo/Make/files index 6f56f0ef0046273707f6dd3ea0a8d8711354b4cc..d90ed39720a04730a39dc37561280a8dccdb217b 100644 --- a/src/thermophysicalModels/reactionThermo/Make/files +++ b/src/thermophysicalModels/reactionThermo/Make/files @@ -4,25 +4,17 @@ chemistryReaders/chemistryReader/makeChemistryReaders.C mixtures/basicMultiComponentMixture/basicMultiComponentMixture.C -combustionThermo/hCombustionThermo/hCombustionThermo.C -combustionThermo/hCombustionThermo/hCombustionThermoNew.C -combustionThermo/hCombustionThermo/hCombustionThermos.C +psiReactionThermo/psiReactionThermo/psiReactionThermo.C +psiReactionThermo/psiReactionThermo/psiReactionThermoNew.C +psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C -combustionThermo/hsCombustionThermo/hsCombustionThermo.C -combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C -combustionThermo/hsCombustionThermo/hsCombustionThermos.C +psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C +psiReactionThermo/psiuReactionThermo/psiuReactionThermoNew.C +psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C -combustionThermo/hhuCombustionThermo/hhuCombustionThermo.C -combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C -combustionThermo/hhuCombustionThermo/hhuCombustionThermos.C - -reactionThermo/hReactionThermo/hReactionThermo.C -reactionThermo/hReactionThermo/hReactionThermoNew.C -reactionThermo/hReactionThermo/hReactionThermos.C - -reactionThermo/hsReactionThermo/hsReactionThermo.C -reactionThermo/hsReactionThermo/hsReactionThermoNew.C -reactionThermo/hsReactionThermo/hsReactionThermos.C +rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C +rhoReactionThermo/rhoReactionThermo/rhoReactionThermoNew.C +rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C index ff2dadd0da24afc2d035a6daf7bbeb41dd9c6010..7e7fd8e07da49b7e906470e83fc2afebddd32c4b 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "makeReactionThermo.H" +#include "makeReaction.H" #include "thermoPhysicsTypes.H" #include "chemistryReader.H" diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.C deleted file mode 100644 index 3ff1c5938efb8c10e01b302bc8eb6c9fd0b5e1c6..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.C +++ /dev/null @@ -1,66 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hCombustionThermo.H" -#include "fvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(hCombustionThermo, 0); - defineRunTimeSelectionTable(hCombustionThermo, fvMesh); -} - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::hCombustionThermo::hCombustionThermo(const fvMesh& mesh) -: - basicPsiThermo(mesh), - - h_ - ( - IOobject - ( - "h", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::hCombustionThermo::~hCombustionThermo() -{} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/makeCombustionThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/makeCombustionThermo.H deleted file mode 100644 index 321140286cd5d968dc27cd2a118a782e85c9c2de..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/makeCombustionThermo.H +++ /dev/null @@ -1,105 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -InClass - Foam::hCombustionThermo - -\*---------------------------------------------------------------------------*/ - -#ifndef makeCombustionThermo_H -#define makeCombustionThermo_H - -#include "addToRunTimeSelectionTable.H" -#include "basicPsiThermo.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeCombustionThermo\ -( \ - CThermo, \ - MixtureThermo, \ - Mixture, \ - Transport, \ - Thermo, \ - EqnOfState \ -) \ - \ -typedef MixtureThermo \ - <Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - #MixtureThermo \ - "<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicPsiThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - CThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -) - - -#define makeCombustionMixtureThermo(CThermo,MixtureThermo,Mixture,ThermoPhys) \ - \ -typedef MixtureThermo<Mixture<ThermoPhys> > \ - MixtureThermo##Mixture##ThermoPhys; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - MixtureThermo##Mixture##ThermoPhys, \ - #MixtureThermo"<"#Mixture"<"#ThermoPhys">>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicPsiThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - CThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ - fvMesh \ -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.C deleted file mode 100644 index dc6a02a0ce060842d6ee2aa0c4b18a91fb695fa4..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.C +++ /dev/null @@ -1,66 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hsCombustionThermo.H" -#include "fvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(hsCombustionThermo, 0); - defineRunTimeSelectionTable(hsCombustionThermo, fvMesh); -} - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::hsCombustionThermo::hsCombustionThermo(const fvMesh& mesh) -: - basicPsiThermo(mesh), - - hs_ - ( - IOobject - ( - "hs", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::hsCombustionThermo::~hsCombustionThermo() -{} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.H deleted file mode 100644 index 3727cbfb808916c71cf7b340761ec5c30928909b..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.H +++ /dev/null @@ -1,143 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -Class - Foam::hsCombustionThermo - -Description - Sensible enthalpy variant of combustionThermo - -SourceFiles - hsCombustionThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsCombustionThermo_H -#define hsCombustionThermo_H - -#include "basicPsiThermo.H" -#include "basicMultiComponentMixture.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsCombustionThermo Declaration -\*---------------------------------------------------------------------------*/ - -class hsCombustionThermo -: - public basicPsiThermo -{ - -protected: - - // Protected data - - //- Sensible enthalpy field - volScalarField hs_; - - -public: - - //- Runtime type information - TypeName("hsCombustionThermo"); - - - //- Declare run-time constructor selection tables - declareRunTimeSelectionTable - ( - autoPtr, - hsCombustionThermo, - fvMesh, - (const fvMesh& mesh), - (mesh) - ); - - - // Constructors - - //- Construct from dictionary and mesh - hsCombustionThermo(const fvMesh&); - - - // Selectors - - //- Standard selection based on fvMesh - static autoPtr<hsCombustionThermo> New(const fvMesh&); - - //- Select and check that package contains 'thermoType' - static autoPtr<hsCombustionThermo> NewType - ( - const fvMesh&, - const word& thermoType - ); - - - //- Destructor - virtual ~hsCombustionThermo(); - - - // Member functions - - //- Return the composition of the multi-component mixture - virtual basicMultiComponentMixture& composition() = 0; - - //- Return the composition of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const = 0; - - - // Access to thermodynamic state variables - - //- Sensible enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& hs() - { - return hs_; - } - - //- Sensible enthalpy [J/kg] - virtual const volScalarField& hs() const - { - return hs_; - } - - - //- Update properties - virtual void correct() = 0; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C deleted file mode 100644 index ed9cf107a84a400fc6433c8d78e64e73cc007584..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C +++ /dev/null @@ -1,148 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hsCombustionThermo.H" -#include "fvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr<Foam::hsCombustionThermo> Foam::hsCombustionThermo::New -( - const fvMesh& mesh -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "thermophysicalProperties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("thermoType") - ); - - Info<< "Selecting thermodynamics package " << modelType << endl; - - fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(modelType); - - if (cstrIter == fvMeshConstructorTablePtr_->end()) - { - FatalErrorIn("hsCombustionThermo::New(const fvMesh&)") - << "Unknown hsCombustionThermo type " - << modelType << nl << nl - << "Valid hsCombustionThermo types:" << nl - << fvMeshConstructorTablePtr_->toc() << nl - << exit(FatalError); - } - - return autoPtr<hsCombustionThermo>(cstrIter()(mesh)); -} - - -Foam::autoPtr<Foam::hsCombustionThermo> Foam::hsCombustionThermo::NewType -( - const fvMesh& mesh, - const word& thermoType -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "thermophysicalProperties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("thermoType") - ); - - if (modelType.find(thermoType) == string::npos) - { - wordList allModels = fvMeshConstructorTablePtr_->toc(); - DynamicList<word> validModels; - forAll(allModels, i) - { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } - } - - FatalErrorIn - ( - "autoPtr<hsCombustionThermo> hsCombustionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << modelType << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); - } - - Info<< "Selecting thermodynamics package " << modelType << endl; - - fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(modelType); - - if (cstrIter == fvMeshConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "autoPtr<hsCombustionThermo> hsCombustionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Unknown hsCombustionThermo type " - << modelType << nl << nl - << "Valid hsCombustionThermo types are:" << nl - << fvMeshConstructorTablePtr_->toc() << nl - << exit(FatalError); - } - - return autoPtr<hsCombustionThermo>(cstrIter()(mesh)); -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C deleted file mode 100644 index 300e5e6245b546e7b5d16d32af747da3c5641130..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C +++ /dev/null @@ -1,179 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "makeHsCombustionThermo.H" - -#include "hsCombustionThermo.H" -#include "hsPsiMixtureThermo.H" - -#include "perfectGas.H" - -#include "hConstThermo.H" -#include "janafThermo.H" -#include "specieThermo.H" - -#include "constTransport.H" -#include "sutherlandTransport.H" - -#include "dieselMixture.H" -#include "homogeneousMixture.H" -#include "inhomogeneousMixture.H" -#include "veryInhomogeneousMixture.H" -#include "singleStepReactingMixture.H" - -#include "reactingMixture.H" -#include "multiComponentMixture.H" - -#include "thermoPhysicsTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - homogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - inhomogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - veryInhomogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - homogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - inhomogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - veryInhomogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - dieselMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -// Multi-component thermo - -makeHsCombustionMixtureThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - multiComponentMixture, - constGasThermoPhysics -); - -makeHsCombustionMixtureThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - multiComponentMixture, - gasThermoPhysics -); - - -// Multi-component reaction thermo - -makeHsCombustionMixtureThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - reactingMixture, - constGasThermoPhysics -); - -makeHsCombustionMixtureThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - reactingMixture, - gasThermoPhysics -); - - -makeHsCombustionMixtureThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - singleStepReactingMixture, - gasThermoPhysics -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/makeHsCombustionThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/makeHsCombustionThermo.H deleted file mode 100644 index 05f0e1dc20a0c10d95b36d9ea243a4d818c74e8d..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/makeHsCombustionThermo.H +++ /dev/null @@ -1,111 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -InClass - Foam::hsCombustionThermo - -\*---------------------------------------------------------------------------*/ - -#ifndef makeHsCombustionThermo_H -#define makeHsCombustionThermo_H - -#include "addToRunTimeSelectionTable.H" -#include "basicPsiThermo.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeHsCombustionThermo\ -( \ - CThermo, \ - MixtureThermo, \ - Mixture, \ - Transport, \ - Thermo, \ - EqnOfState \ -) \ - \ -typedef MixtureThermo \ - <Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - #MixtureThermo \ - "<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicPsiThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - CThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -) - - -#define makeHsCombustionMixtureThermo\ -( \ - CThermo, \ - MixtureThermo, \ - Mixture, \ - ThermoPhys \ -) \ - \ -typedef MixtureThermo<Mixture<ThermoPhys> > \ - MixtureThermo##Mixture##ThermoPhys; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - MixtureThermo##Mixture##ThermoPhys, \ - #MixtureThermo"<"#Mixture"<"#ThermoPhys">>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicPsiThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - CThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ - fvMesh \ -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C deleted file mode 100644 index 7328d329666f8aa1d63fde1d932626dfca20ce54..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C +++ /dev/null @@ -1,320 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hPsiMixtureThermo.H" -#include "fvMesh.H" -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hPsiMixtureThermo<MixtureType>::calculate() -{ - const scalarField& hCells = h_.internalField(); - const scalarField& pCells = p_.internalField(); - - scalarField& TCells = T_.internalField(); - scalarField& psiCells = psi_.internalField(); - scalarField& muCells = mu_.internalField(); - scalarField& alphaCells = alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture = - this->cellMixture(celli); - - TCells[celli] = mixture.TH(hCells[celli], TCells[celli]); - psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]); - - muCells[celli] = mixture.mu(TCells[celli]); - alphaCells[celli] = mixture.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = p_.boundaryField()[patchi]; - fvPatchScalarField& pT = T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = psi_.boundaryField()[patchi]; - - fvPatchScalarField& ph = h_.boundaryField()[patchi]; - - fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - ph[facei] = mixture.H(pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture.TH(ph[facei], pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hPsiMixtureThermo<MixtureType>::hPsiMixtureThermo(const fvMesh& mesh) -: - hCombustionThermo(mesh), - MixtureType(*this, mesh) -{ - scalarField& hCells = h_.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).H(TCells[celli]); - } - - forAll(h_.boundaryField(), patchi) - { - h_.boundaryField()[patchi] == h(T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(h_); - - calculate(); - - // Switch on saving old time - psi_.oldTime(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hPsiMixtureThermo<MixtureType>::~hPsiMixtureThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hPsiMixtureThermo<MixtureType>::correct() -{ - if (debug) - { - Info<< "entering hPsiMixtureThermo<MixtureType>::correct()" << endl; - } - - // force the saving of the old-time values - psi_.oldTime(); - - calculate(); - - if (debug) - { - Info<< "exiting hPsiMixtureThermo<MixtureType>::correct()" << endl; - } -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hPsiMixtureThermo<MixtureType>::hc() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> thc - ( - new volScalarField - ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - h_.dimensions() - ) - ); - - volScalarField& hcf = thc(); - scalarField& hcCells = hcf.internalField(); - - forAll(hcCells, celli) - { - hcCells[celli] = this->cellMixture(celli).Hc(); - } - - forAll(hcf.boundaryField(), patchi) - { - scalarField& hcp = hcf.boundaryField()[patchi]; - - forAll(hcp, facei) - { - hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); - } - } - - return thc; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hPsiMixtureThermo<MixtureType>::h -( - const scalarField& T, - const labelList& cells -) const -{ - tmp<scalarField> th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).H(T[celli]); - } - - return th; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hPsiMixtureThermo<MixtureType>::h -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).H(T[facei]); - } - - return th; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hPsiMixtureThermo<MixtureType>::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCp(new scalarField(T.size())); - - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hPsiMixtureThermo<MixtureType>::Cp() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - scalarField& cpCells = cp.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi); - } - - return tCp; -} - - -template<class MixtureType> -bool Foam::hPsiMixtureThermo<MixtureType>::read() -{ - if (hCombustionThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C deleted file mode 100644 index 76f0a3a52f0378c5cfc8957b8c1c51b8863e5ce1..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C +++ /dev/null @@ -1,317 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hsPsiMixtureThermo.H" -#include "fvMesh.H" -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hsPsiMixtureThermo<MixtureType>::hsPsiMixtureThermo(const fvMesh& mesh) -: - hsCombustionThermo(mesh), - MixtureType(*this, mesh) -{ - scalarField& hCells = hs_.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); - } - - forAll(hs_.boundaryField(), patchi) - { - hs_.boundaryField()[patchi] == hs(T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(hs_); - - calculate(); - psi_.oldTime(); // Switch on saving old time -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hsPsiMixtureThermo<MixtureType>::~hsPsiMixtureThermo() -{} - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hsPsiMixtureThermo<MixtureType>::calculate() -{ - const scalarField& hsCells = hs_.internalField(); - const scalarField& pCells = p_.internalField(); - - scalarField& TCells = T_.internalField(); - scalarField& psiCells = psi_.internalField(); - scalarField& muCells = mu_.internalField(); - scalarField& alphaCells = alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.THs(hsCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = p_.boundaryField()[patchi]; - fvPatchScalarField& pT = T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = psi_.boundaryField()[patchi]; - - fvPatchScalarField& phs = hs_.boundaryField()[patchi]; - - fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - phs[facei] = mixture_.Hs(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu_[facei] = mixture_.mu(pT[facei]); - palpha_[facei] = mixture_.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.THs(phs[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu_[facei] = mixture_.mu(pT[facei]); - palpha_[facei] = mixture_.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hsPsiMixtureThermo<MixtureType>::correct() -{ - if (debug) - { - Info<< "entering hMixtureThermo<MixtureType>::correct()" << endl; - } - - // force the saving of the old-time values - psi_.oldTime(); - - calculate(); - - if (debug) - { - Info<< "exiting hMixtureThermo<MixtureType>::correct()" << endl; - } -} - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hsPsiMixtureThermo<MixtureType>::hc() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> thc - ( - new volScalarField - ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - hs_.dimensions() - ) - ); - - volScalarField& hcf = thc(); - scalarField& hcCells = hcf.internalField(); - - forAll(hcCells, celli) - { - hcCells[celli] = this->cellMixture(celli).Hc(); - } - - forAll(hcf.boundaryField(), patchi) - { - scalarField& hcp = hcf.boundaryField()[patchi]; - - forAll(hcp, facei) - { - hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); - } - } - - return thc; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hsPsiMixtureThermo<MixtureType>::hs -( - const scalarField& T, - const labelList& cells -) const -{ - tmp<scalarField> ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, celli) - { - hs[celli] = this->cellMixture(cells[celli]).Hs(T[celli]); - } - - return ths; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hsPsiMixtureThermo<MixtureType>::hs -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, facei) - { - hs[facei] = this->patchFaceMixture(patchi, facei).Hs(T[facei]); - } - - return ths; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hsPsiMixtureThermo<MixtureType>::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCp(new scalarField(T.size())); - - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hsPsiMixtureThermo<MixtureType>::Cp() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - scalarField& cpCells = cp.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi); - } - - return tCp; -} - - -template<class MixtureType> -bool Foam::hsPsiMixtureThermo<MixtureType>::read() -{ - if (hsCombustionThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.H deleted file mode 100644 index b645de28aba6ee670b400e3fea27ddaaf4e29389..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.H +++ /dev/null @@ -1,146 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -Class - Foam::hsPsiMixtureThermo - -Description - Foam::hsPsiMixtureThermo - -SourceFiles - hsPsiMixtureThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsPsiMixtureThermo_H -#define hsPsiMixtureThermo_H - -#include "hsCombustionThermo.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsPsiMixtureThermo Declaration -\*---------------------------------------------------------------------------*/ - -template<class MixtureType> -class hsPsiMixtureThermo -: - public hsCombustionThermo, - public MixtureType -{ - // Private Member Functions - - void calculate(); - - //- Construct as copy (not implemented) - hsPsiMixtureThermo(const hsPsiMixtureThermo<MixtureType>&); - - -public: - - //- Runtime type information - TypeName("hsPsiMixtureThermo"); - - - // Constructors - - //- Construct from mesh - hsPsiMixtureThermo(const fvMesh&); - - - //- Destructor - virtual ~hsPsiMixtureThermo(); - - - // Member functions - - //- Return the compostion of the multi-component mixture - virtual basicMultiComponentMixture& composition() - { - return *this; - } - - //- Return the compostion of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Fields derived from thermodynamic state variables - - //- Chemical enthalpy [J/kg] - virtual tmp<volScalarField> hc() const; - - //- Sensible enthalpy for cell-set [J/kg] - virtual tmp<scalarField> hs - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Sensible enthalpy for patch [J/kg] - virtual tmp<scalarField> hs - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp<scalarField> Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp<volScalarField> Cp() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "hsPsiMixtureThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C index 192b32050f2a017cb45ac3b4689737254883ab30..60287252c7f7e86ec71beb8dfa7ee175bd19e8b9 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C @@ -27,7 +27,7 @@ License #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -98,7 +98,7 @@ void Foam::fixedUnburntEnthalpyFvPatchScalarField::updateCoeffs() return; } - const hhuCombustionThermo& thermo = db().lookupObject<hhuCombustionThermo> + const psiuReactionThermo& thermo = db().lookupObject<psiuReactionThermo> ( "thermophysicalProperties" ); @@ -108,7 +108,7 @@ void Foam::fixedUnburntEnthalpyFvPatchScalarField::updateCoeffs() fvPatchScalarField& Tw = const_cast<fvPatchScalarField&>(thermo.Tu().boundaryField()[patchi]); Tw.evaluate(); - operator==(thermo.hu(Tw, patchi)); + operator==(thermo.heu(Tw, patchi)); fixedValueFvPatchScalarField::updateCoeffs(); } diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C index af96c16512a1b87e46b25350a200344a8f35314e..2a5bf0f3e182b870befe55b3cb0a84f4429a7b05 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C @@ -27,7 +27,7 @@ License #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -97,7 +97,7 @@ void Foam::gradientUnburntEnthalpyFvPatchScalarField::updateCoeffs() return; } - const hhuCombustionThermo& thermo = db().lookupObject<hhuCombustionThermo> + const psiuReactionThermo& thermo = db().lookupObject<psiuReactionThermo> ( "thermophysicalProperties" ); @@ -112,8 +112,8 @@ void Foam::gradientUnburntEnthalpyFvPatchScalarField::updateCoeffs() gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad() + patch().deltaCoeffs()* ( - thermo.hu(Tw, patchi) - - thermo.hu(Tw, patch().faceCells()) + thermo.heu(Tw, patchi) + - thermo.heu(Tw, patch().faceCells()) ); fixedGradientFvPatchScalarField::updateCoeffs(); diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C index cf238bb56a1727adacef555033337b6ad41f3d40..986354d6e3ebed9f253ddf0a8b2a37877f6428ac 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C @@ -1,33 +1,33 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "mixedUnburntEnthalpyFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "hhuCombustionThermo.H" + /*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 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/>. + + \*---------------------------------------------------------------------------*/ + + #include "mixedUnburntEnthalpyFvPatchScalarField.H" + #include "addToRunTimeSelectionTable.H" + #include "fvPatchFieldMapper.H" + #include "volFields.H" + #include "psiuReactionThermo.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -101,7 +101,7 @@ void Foam::mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs() return; } - const hhuCombustionThermo& thermo = db().lookupObject<hhuCombustionThermo> + const psiuReactionThermo& thermo = db().lookupObject<psiuReactionThermo> ( "thermophysicalProperties" ); @@ -116,12 +116,12 @@ void Foam::mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs() Tw.evaluate(); valueFraction() = Tw.valueFraction(); - refValue() = thermo.hu(Tw.refValue(), patchi); + refValue() = thermo.heu(Tw.refValue(), patchi); refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad() + patch().deltaCoeffs()* ( - thermo.hu(Tw, patchi) - - thermo.hu(Tw, patch().faceCells()) + thermo.heu(Tw, patchi) + - thermo.heu(Tw, patch().faceCells()) ); mixedFvPatchScalarField::updateCoeffs(); diff --git a/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H index 5fbeccdb96ff0570566d54ee9bc2798e083b7fe7..b6f06c0f8264103ec9685b60bc00ec7a0810074d 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H @@ -65,6 +65,10 @@ protected: public: + //- The base class of the mixture + typedef basicMultiComponentMixture basicMixtureType; + + // Constructors //- Construct from dictionary and mesh @@ -136,8 +140,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const = 0; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const = 0; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const = 0; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const = 0; @@ -148,8 +152,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const = 0; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const = 0; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const = 0; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const = 0; @@ -166,13 +170,9 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const = 0; - //- Thermal diffusivity enthalpy [kg/m/s] + //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const = 0; - - //- Thermal diffusivity internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const - = 0; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C index 50ffce15d1aa59af8eb9f6b06c6e50e97b97e1d4..c1cb52de312fbe6fc013cb100a32919a879fd1d9 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C @@ -174,13 +174,13 @@ Foam::scalar Foam::dieselMixture<ThermoType>::Cv template<class ThermoType> -Foam::scalar Foam::dieselMixture<ThermoType>::H +Foam::scalar Foam::dieselMixture<ThermoType>::Ha ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).H(T); + return getLocalThermo(specieI).Ha(T); } @@ -217,13 +217,13 @@ Foam::scalar Foam::dieselMixture<ThermoType>::S template<class ThermoType> -Foam::scalar Foam::dieselMixture<ThermoType>::E +Foam::scalar Foam::dieselMixture<ThermoType>::Es ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).E(T); + return getLocalThermo(specieI).Es(T); } @@ -282,15 +282,4 @@ Foam::scalar Foam::dieselMixture<ThermoType>::alphah } -template<class ThermoType> -Foam::scalar Foam::dieselMixture<ThermoType>::alphae -( - const label specieI, - const scalar T -) const -{ - return getLocalThermo(specieI).alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H index e62670a5ae172be75011280e8db9ad684642cf7c..6a9435f75caf2943326f7b141f0373e59b5f9827 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H @@ -173,8 +173,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -185,8 +185,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -203,11 +203,8 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity for enthalpy [kg/m/s] + //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity for internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C index e1c992449b07318d085f7fcb2508ac79204fc72d..69c90d40c31e9668b6c47b2e6239e1a20997e15d 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C @@ -184,13 +184,13 @@ Foam::scalar Foam::egrMixture<ThermoType>::Cv template<class ThermoType> -Foam::scalar Foam::egrMixture<ThermoType>::H +Foam::scalar Foam::egrMixture<ThermoType>::Ha ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).H(T); + return getLocalThermo(specieI).Ha(T); } @@ -227,13 +227,13 @@ Foam::scalar Foam::egrMixture<ThermoType>::S template<class ThermoType> -Foam::scalar Foam::egrMixture<ThermoType>::E +Foam::scalar Foam::egrMixture<ThermoType>::Es ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).E(T); + return getLocalThermo(specieI).Es(T); } @@ -292,15 +292,4 @@ Foam::scalar Foam::egrMixture<ThermoType>::alphah } -template<class ThermoType> -Foam::scalar Foam::egrMixture<ThermoType>::alphae -( - const label specieI, - const scalar T -) const -{ - return getLocalThermo(specieI).alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H index 838162792d9fdc90a973445e8456a7a6bb10af33..517f038310dc5b150ece73369c3d4704d664a49e 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H @@ -189,8 +189,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -201,8 +201,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -219,11 +219,8 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity enthalpy [kg/m/s] + //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C index 297adb9a00fd93558c66589c19fb06729ca1f412..80d854f32f6580d8bb707166c0e6ece89f690b86 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C @@ -163,13 +163,13 @@ Foam::scalar Foam::homogeneousMixture<ThermoType>::Cv template<class ThermoType> -Foam::scalar Foam::homogeneousMixture<ThermoType>::H +Foam::scalar Foam::homogeneousMixture<ThermoType>::Ha ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).H(T); + return getLocalThermo(specieI).Ha(T); } @@ -206,13 +206,13 @@ Foam::scalar Foam::homogeneousMixture<ThermoType>::S template<class ThermoType> -Foam::scalar Foam::homogeneousMixture<ThermoType>::E +Foam::scalar Foam::homogeneousMixture<ThermoType>::Es ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).E(T); + return getLocalThermo(specieI).Es(T); } @@ -271,15 +271,4 @@ Foam::scalar Foam::homogeneousMixture<ThermoType>::alphah } -template<class ThermoType> -Foam::scalar Foam::homogeneousMixture<ThermoType>::alphae -( - const label specieI, - const scalar T -) const -{ - return getLocalThermo(specieI).alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H index bb4f19a17b874bf35f4febd45e9524e83fe1b0f9..b1859797c1f57114042ca24c6334a4b27bfc6b91 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H @@ -147,8 +147,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -159,8 +159,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -177,11 +177,8 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity enthalpy [kg/m/s] + //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C index 38f9284c9a8fe370c1255636b65a1f520bb342e8..5144ac264679da937bf6a72307373c0e521a4111 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C @@ -179,13 +179,13 @@ Foam::scalar Foam::inhomogeneousMixture<ThermoType>::Cv template<class ThermoType> -Foam::scalar Foam::inhomogeneousMixture<ThermoType>::H +Foam::scalar Foam::inhomogeneousMixture<ThermoType>::Ha ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).H(T); + return getLocalThermo(specieI).Ha(T); } @@ -222,13 +222,13 @@ Foam::scalar Foam::inhomogeneousMixture<ThermoType>::S template<class ThermoType> -Foam::scalar Foam::inhomogeneousMixture<ThermoType>::E +Foam::scalar Foam::inhomogeneousMixture<ThermoType>::Es ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).E(T); + return getLocalThermo(specieI).Es(T); } @@ -287,15 +287,4 @@ Foam::scalar Foam::inhomogeneousMixture<ThermoType>::alphah } -template<class ThermoType> -Foam::scalar Foam::inhomogeneousMixture<ThermoType>::alphae -( - const label specieI, - const scalar T -) const -{ - return getLocalThermo(specieI).alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H index 2a779fd38261e161795cf0515f1ddc2392dd0f32..d3277ebc5817afa90d0c20fed3f1292c9039b600 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H @@ -178,8 +178,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -190,8 +190,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -208,11 +208,8 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity for enthalpy [kg/m/s] + //- Thermal diffusivity ofu enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity for internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C index 3718fc3edf7493ac66415c181181a2e353b3eb1f..0b0cd39313ac7052c6e03def71c1718c9098670e 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C @@ -204,13 +204,13 @@ Foam::scalar Foam::multiComponentMixture<ThermoType>::Cv template<class ThermoType> -Foam::scalar Foam::multiComponentMixture<ThermoType>::H +Foam::scalar Foam::multiComponentMixture<ThermoType>::Ha ( const label specieI, const scalar T ) const { - return speciesData_[specieI].H(T); + return speciesData_[specieI].Ha(T); } @@ -247,13 +247,13 @@ Foam::scalar Foam::multiComponentMixture<ThermoType>::S template<class ThermoType> -Foam::scalar Foam::multiComponentMixture<ThermoType>::E +Foam::scalar Foam::multiComponentMixture<ThermoType>::Es ( const label specieI, const scalar T ) const { - return speciesData_[specieI].E(T); + return speciesData_[specieI].Es(T); } @@ -312,15 +312,4 @@ Foam::scalar Foam::multiComponentMixture<ThermoType>::alphah } -template<class ThermoType> -Foam::scalar Foam::multiComponentMixture<ThermoType>::alphae -( - const label specieI, - const scalar T -) const -{ - return speciesData_[specieI].alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H index 5838f517022b0d3bf526236df0b30bd7ff2c99b8..46b4a03b8a559e72e922e0c971f4d0833d0565a5 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H @@ -137,8 +137,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -149,8 +149,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -169,9 +169,6 @@ public: //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity of internal energy[kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C index 076693aab766a7e23df7aafaa22e77e50a6f40ba..c9d94a6a88de07625bd78b3ee05b13924702a150 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C @@ -180,13 +180,13 @@ Foam::scalar Foam::veryInhomogeneousMixture<ThermoType>::Cv template<class ThermoType> -Foam::scalar Foam::veryInhomogeneousMixture<ThermoType>::H +Foam::scalar Foam::veryInhomogeneousMixture<ThermoType>::Ha ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).H(T); + return getLocalThermo(specieI).Ha(T); } @@ -223,13 +223,13 @@ Foam::scalar Foam::veryInhomogeneousMixture<ThermoType>::S template<class ThermoType> -Foam::scalar Foam::veryInhomogeneousMixture<ThermoType>::E +Foam::scalar Foam::veryInhomogeneousMixture<ThermoType>::Es ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).E(T); + return getLocalThermo(specieI).Es(T); } @@ -288,15 +288,4 @@ Foam::scalar Foam::veryInhomogeneousMixture<ThermoType>::alphah } -template<class ThermoType> -Foam::scalar Foam::veryInhomogeneousMixture<ThermoType>::alphae -( - const label specieI, - const scalar T -) const -{ - return getLocalThermo(specieI).alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H index 578ace1e6cd319ce0f426fa5915b5f5835367749..0bf5108f63bf787fcabc34ae6b54554d7e8a1ce7 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H @@ -179,8 +179,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -191,8 +191,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -209,11 +209,8 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity for enthalpy [kg/m/s] + //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity for internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.C new file mode 100644 index 0000000000000000000000000000000000000000..b418b08fa69ea7be999df49b57687194973af55d --- /dev/null +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.C @@ -0,0 +1,141 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-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/>. + +\*---------------------------------------------------------------------------*/ + +#include "hePsiReactionThermo.H" +#include "fvMesh.H" +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template<class MixtureType> +void Foam::hePsiReactionThermo<MixtureType>::calculate() +{ + const scalarField& hCells = this->he_.internalField(); + const scalarField& pCells = this->p_.internalField(); + + scalarField& TCells = this->T_.internalField(); + scalarField& psiCells = this->psi_.internalField(); + scalarField& muCells = this->mu_.internalField(); + scalarField& alphaCells = this->alpha_.internalField(); + + forAll(TCells, celli) + { + const typename MixtureType::thermoType& mixture = + this->cellMixture(celli); + + TCells[celli] = mixture.THE(hCells[celli], TCells[celli]); + psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]); + + muCells[celli] = mixture.mu(TCells[celli]); + alphaCells[celli] = mixture.alphah(TCells[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; + + fvPatchScalarField& ph = this->he_.boundaryField()[patchi]; + + fvPatchScalarField& pmu_ = this->mu_.boundaryField()[patchi]; + fvPatchScalarField& palpha_ = this->alpha_.boundaryField()[patchi]; + + if (pT.fixesValue()) + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture = + this->patchFaceMixture(patchi, facei); + + ph[facei] = mixture.HE(pT[facei]); + + ppsi[facei] = mixture.psi(pp[facei], pT[facei]); + pmu_[facei] = mixture.mu(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); + } + } + else + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture = + this->patchFaceMixture(patchi, facei); + + pT[facei] = mixture.THE(ph[facei], pT[facei]); + + ppsi[facei] = mixture.psi(pp[facei], pT[facei]); + pmu_[facei] = mixture.mu(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class MixtureType> +Foam::hePsiReactionThermo<MixtureType>::hePsiReactionThermo(const fvMesh& mesh) +: + heThermo<psiReactionThermo, MixtureType>(mesh) +{ + calculate(); + + // Switch on saving old time + this->psi_.oldTime(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class MixtureType> +Foam::hePsiReactionThermo<MixtureType>::~hePsiReactionThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class MixtureType> +void Foam::hePsiReactionThermo<MixtureType>::correct() +{ + if (debug) + { + Info<< "entering hePsiReactionThermo<MixtureType>::correct()" << endl; + } + + // force the saving of the old-time values + this->psi_.oldTime(); + + calculate(); + + if (debug) + { + Info<< "exiting hePsiReactionThermo<MixtureType>::correct()" << endl; + } +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.H b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.H similarity index 54% rename from src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.H rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.H index 9aedfe7920d062fddd253a30457927f90ddd2dd2..f8adbd9ce633e8fcd5fd75be01b8ed713b9f8c90 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.H +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.H @@ -22,20 +22,21 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::hRhoMixtureThermo + Foam::hePsiReactionThermo Description - Foam::hRhoMixtureThermo + Foam::hePsiReactionThermo SourceFiles - hRhoMixtureThermo.C + hePsiReactionThermo.C \*---------------------------------------------------------------------------*/ -#ifndef hRhoMixtureThermo_H -#define hRhoMixtureThermo_H +#ifndef hePsiReactionThermo_H +#define hePsiReactionThermo_H -#include "hReactionThermo.H" +#include "heThermo.H" +#include "psiReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,89 +44,42 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hRhoMixtureThermo Declaration + Class hePsiReactionThermo Declaration \*---------------------------------------------------------------------------*/ template<class MixtureType> -class hRhoMixtureThermo +class hePsiReactionThermo : - public hReactionThermo, - public MixtureType + public heThermo<psiReactionThermo, MixtureType> { // Private Member Functions void calculate(); //- Construct as copy (not implemented) - hRhoMixtureThermo(const hRhoMixtureThermo<MixtureType>&); + hePsiReactionThermo(const hePsiReactionThermo<MixtureType>&); public: //- Runtime type information - TypeName("hRhoMixtureThermo"); + TypeName("hePsiReactionThermo"); // Constructors //- Construct from mesh - hRhoMixtureThermo(const fvMesh&); + hePsiReactionThermo(const fvMesh&); //- Destructor - virtual ~hRhoMixtureThermo(); + virtual ~hePsiReactionThermo(); // Member functions - //- Return the compostion of the multi-component mixture - virtual basicMultiComponentMixture& composition() - { - return *this; - } - - //- Return the compostion of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const - { - return *this; - } - //- Update properties virtual void correct(); - - //- Chemical enthalpy [J/kg] - virtual tmp<volScalarField> hc() const; - - - // Fields derived from thermodynamic state variables - - //- Enthalpy for cell-set [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Enthalpy for patch [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp<scalarField> Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp<volScalarField> Cp() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); }; @@ -136,7 +90,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "hRhoMixtureThermo.C" +# include "hePsiReactionThermo.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C similarity index 67% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C index c4994bbaef2276f2e551c9b8dda6730a4a088661..0e61b1fca5a9fa0975835af33725b07c291bbbec 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C @@ -23,15 +23,16 @@ License \*---------------------------------------------------------------------------*/ -#include "makeCombustionThermo.H" +#include "makeReactionThermo.H" -#include "hCombustionThermo.H" -#include "hPsiMixtureThermo.H" +#include "psiReactionThermo.H" +#include "hePsiReactionThermo.H" #include "perfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "sensibleEnthalpy.H" #include "specieThermo.H" #include "constTransport.H" @@ -56,32 +57,38 @@ namespace Foam // constTransport, hConstThermo -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, homogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, inhomogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, veryInhomogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); @@ -89,32 +96,38 @@ makeCombustionThermo // sutherlandTransport, hConstThermo -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, homogeneousMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, inhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, veryInhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); @@ -122,61 +135,71 @@ makeCombustionThermo // sutherlandTransport, janafThermo -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, homogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, inhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, veryInhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, dieselMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); // Multi-component thermo -makeCombustionMixtureThermo +makeReactionMixtureThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, multiComponentMixture, constGasThermoPhysics ); -makeCombustionMixtureThermo +makeReactionMixtureThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, multiComponentMixture, gasThermoPhysics ); @@ -184,26 +207,29 @@ makeCombustionMixtureThermo // Multi-component reaction thermo -makeCombustionMixtureThermo +makeReactionMixtureThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, reactingMixture, constGasThermoPhysics ); -makeCombustionMixtureThermo +makeReactionMixtureThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, reactingMixture, gasThermoPhysics ); -makeCombustionMixtureThermo +makeReactionMixtureThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, singleStepReactingMixture, gasThermoPhysics ); diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.C similarity index 51% rename from src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.C index b58ca996825522cd3431da42cea9806fe1b54ea5..e0598486b50c55bae4eb9759ecde4ae6629699f4 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.C @@ -23,99 +23,52 @@ License \*---------------------------------------------------------------------------*/ -#include "hhuMixtureThermo.H" +#include "heheuReactionThermo.H" #include "fvMesh.H" #include "fixedValueFvPatchFields.H" -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hhuMixtureThermo<MixtureType>::hhuMixtureThermo(const fvMesh& mesh) -: - hhuCombustionThermo(mesh), - MixtureType(*this, mesh) -{ - scalarField& hCells = h_.internalField(); - scalarField& huCells = hu_.internalField(); - const scalarField& TCells = T_.internalField(); - const scalarField& TuCells = Tu_.internalField(); - - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).H(TCells[celli]); - huCells[celli] = this->cellReactants(celli).H(TuCells[celli]); - } - - forAll(h_.boundaryField(), patchi) - { - h_.boundaryField()[patchi] == h(T_.boundaryField()[patchi], patchi); - - fvPatchScalarField& phu = hu_.boundaryField()[patchi]; - const fvPatchScalarField& pTu = Tu_.boundaryField()[patchi]; - - forAll(phu, facei) - { - phu[facei] = this->patchFaceReactants(patchi, facei).H(pTu[facei]); - } - } - - hBoundaryCorrection(h_); - huBoundaryCorrection(hu_); - - calculate(); - psi_.oldTime(); // Switch on saving old time -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hhuMixtureThermo<MixtureType>::~hhuMixtureThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template<class MixtureType> -void Foam::hhuMixtureThermo<MixtureType>::calculate() +void Foam::heheuReactionThermo<MixtureType>::calculate() { - const scalarField& hCells = h_.internalField(); - const scalarField& huCells = hu_.internalField(); - const scalarField& pCells = p_.internalField(); + const scalarField& hCells = this->he_.internalField(); + const scalarField& heuCells = this->heu_.internalField(); + const scalarField& pCells = this->p_.internalField(); - scalarField& TCells = T_.internalField(); - scalarField& TuCells = Tu_.internalField(); - scalarField& psiCells = psi_.internalField(); - scalarField& muCells = mu_.internalField(); - scalarField& alphaCells = alpha_.internalField(); + scalarField& TCells = this->T_.internalField(); + scalarField& TuCells = this->Tu_.internalField(); + scalarField& psiCells = this->psi_.internalField(); + scalarField& muCells = this->mu_.internalField(); + scalarField& alphaCells = this->alpha_.internalField(); forAll(TCells, celli) { const typename MixtureType::thermoType& mixture_ = this->cellMixture(celli); - TCells[celli] = mixture_.TH(hCells[celli], TCells[celli]); + TCells[celli] = mixture_.THE(hCells[celli], TCells[celli]); psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); muCells[celli] = mixture_.mu(TCells[celli]); alphaCells[celli] = mixture_.alphah(TCells[celli]); TuCells[celli] = - this->cellReactants(celli).TH(huCells[celli], TuCells[celli]); + this->cellReactants(celli).THE(heuCells[celli], TuCells[celli]); } - forAll(T_.boundaryField(), patchi) + forAll(this->T_.boundaryField(), patchi) { - fvPatchScalarField& pp = p_.boundaryField()[patchi]; - fvPatchScalarField& pT = T_.boundaryField()[patchi]; - fvPatchScalarField& pTu = Tu_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = psi_.boundaryField()[patchi]; + fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi]; + fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - fvPatchScalarField& ph = h_.boundaryField()[patchi]; - fvPatchScalarField& phu = hu_.boundaryField()[patchi]; + fvPatchScalarField& ph = this->he_.boundaryField()[patchi]; + fvPatchScalarField& pheu = this->heu_.boundaryField()[patchi]; - fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi]; + fvPatchScalarField& pmu_ = this->mu_.boundaryField()[patchi]; + fvPatchScalarField& palpha_ = this->alpha_.boundaryField()[patchi]; if (pT.fixesValue()) { @@ -124,7 +77,7 @@ void Foam::hhuMixtureThermo<MixtureType>::calculate() const typename MixtureType::thermoType& mixture_ = this->patchFaceMixture(patchi, facei); - ph[facei] = mixture_.H(pT[facei]); + ph[facei] = mixture_.HE(pT[facei]); ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu_[facei] = mixture_.mu(pT[facei]); @@ -138,7 +91,7 @@ void Foam::hhuMixtureThermo<MixtureType>::calculate() const typename MixtureType::thermoType& mixture_ = this->patchFaceMixture(patchi, facei); - pT[facei] = mixture_.TH(ph[facei], pT[facei]); + pT[facei] = mixture_.THE(ph[facei], pT[facei]); ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu_[facei] = mixture_.mu(pT[facei]); @@ -146,220 +99,146 @@ void Foam::hhuMixtureThermo<MixtureType>::calculate() pTu[facei] = this->patchFaceReactants(patchi, facei) - .TH(phu[facei], pTu[facei]); + .THE(pheu[facei], pTu[facei]); } } } } -template<class MixtureType> -void Foam::hhuMixtureThermo<MixtureType>::correct() -{ - if (debug) - { - Info<< "entering hhuMixtureThermo<MixtureType>::correct()" << endl; - } - - // force the saving of the old-time values - psi_.oldTime(); - - calculate(); - - if (debug) - { - Info<< "exiting hhuMixtureThermo<MixtureType>::correct()" << endl; - } -} - +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hhuMixtureThermo<MixtureType>::hc() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> thc +Foam::heheuReactionThermo<MixtureType>::heheuReactionThermo(const fvMesh& mesh) +: + heThermo<psiuReactionThermo, MixtureType>(mesh), + Tu_ ( - new volScalarField + IOobject ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Tu", + mesh.time().timeName(), mesh, - h_.dimensions() - ) - ); + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ), - volScalarField& hcf = thc(); - scalarField& hcCells = hcf.internalField(); + heu_ + ( + IOobject + ( + MixtureType::thermoType::heName() + 'u', + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionSet(0, 2, -2, 0, 0), + this->heuBoundaryTypes() + ) +{ + scalarField& heuCells = this->heu_.internalField(); + const scalarField& TuCells = this->Tu_.internalField(); - forAll(hcCells, celli) + forAll(heuCells, celli) { - hcCells[celli] = this->cellMixture(celli).Hc(); + heuCells[celli] = this->cellReactants(celli).HE(TuCells[celli]); } - forAll(hcf.boundaryField(), patchi) + forAll(this->heu_.boundaryField(), patchi) { - scalarField& hcp = hcf.boundaryField()[patchi]; + fvPatchScalarField& pheu = this->heu_.boundaryField()[patchi]; + const fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi]; - forAll(hcp, facei) + forAll(pheu, facei) { - hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); + pheu[facei] = + this->patchFaceReactants(patchi, facei).HE(pTu[facei]); } } - return thc; -} - + heuBoundaryCorrection(this->heu_); -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hhuMixtureThermo<MixtureType>::h -( - const scalarField& T, - const labelList& cells -) const -{ - tmp<scalarField> th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).H(T[celli]); - } - - return th; + calculate(); + this->psi_.oldTime(); // Switch on saving old time } -template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hhuMixtureThermo<MixtureType>::h -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> th(new scalarField(T.size())); - scalarField& h = th(); +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).H(T[facei]); - } +template<class MixtureType> +Foam::heheuReactionThermo<MixtureType>::~heheuReactionThermo() +{} - return th; -} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class MixtureType> -Foam::tmp<Foam::scalarField> Foam::hhuMixtureThermo<MixtureType>::Cp -( - const scalarField& T, - const label patchi -) const +void Foam::heheuReactionThermo<MixtureType>::correct() { - tmp<scalarField> tCp(new scalarField(T.size())); - - scalarField& cp = tCp(); - - forAll(T, facei) + if (debug) { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); + Info<< "entering heheuReactionThermo<MixtureType>::correct()" << endl; } - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hhuMixtureThermo<MixtureType>::Cp() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - scalarField& cpCells = cp.internalField(); - const scalarField& TCells = T_.internalField(); + // force the saving of the old-time values + this->psi_.oldTime(); - forAll(TCells, celli) - { - cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]); - } + calculate(); - forAll(T_.boundaryField(), patchi) + if (debug) { - cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi); + Info<< "exiting heheuReactionThermo<MixtureType>::correct()" << endl; } - - return tCp; } template<class MixtureType> Foam::tmp<Foam::scalarField> -Foam::hhuMixtureThermo<MixtureType>::hu +Foam::heheuReactionThermo<MixtureType>::heu ( const scalarField& Tu, const labelList& cells ) const { - tmp<scalarField> thu(new scalarField(Tu.size())); - scalarField& hu = thu(); + tmp<scalarField> theu(new scalarField(Tu.size())); + scalarField& heu = theu(); forAll(Tu, celli) { - hu[celli] = this->cellReactants(cells[celli]).H(Tu[celli]); + heu[celli] = this->cellReactants(cells[celli]).HE(Tu[celli]); } - return thu; + return theu; } template<class MixtureType> Foam::tmp<Foam::scalarField> -Foam::hhuMixtureThermo<MixtureType>::hu +Foam::heheuReactionThermo<MixtureType>::heu ( const scalarField& Tu, const label patchi ) const { - tmp<scalarField> thu(new scalarField(Tu.size())); - scalarField& hu = thu(); + tmp<scalarField> theu(new scalarField(Tu.size())); + scalarField& heu = theu(); forAll(Tu, facei) { - hu[facei] = this->patchFaceReactants(patchi, facei).H(Tu[facei]); + heu[facei] = this->patchFaceReactants(patchi, facei).HE(Tu[facei]); } - return thu; + return theu; } template<class MixtureType> Foam::tmp<Foam::volScalarField> -Foam::hhuMixtureThermo<MixtureType>::Tb() const +Foam::heheuReactionThermo<MixtureType>::Tb() const { tmp<volScalarField> tTb ( @@ -368,38 +247,38 @@ Foam::hhuMixtureThermo<MixtureType>::Tb() const IOobject ( "Tb", - T_.time().timeName(), - T_.db(), + this->T_.time().timeName(), + this->T_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), - T_ + this->T_ ) ); volScalarField& Tb_ = tTb(); scalarField& TbCells = Tb_.internalField(); - const scalarField& TCells = T_.internalField(); - const scalarField& hCells = h_.internalField(); + const scalarField& TCells = this->T_.internalField(); + const scalarField& hCells = this->he_.internalField(); forAll(TbCells, celli) { TbCells[celli] = - this->cellProducts(celli).TH(hCells[celli], TCells[celli]); + this->cellProducts(celli).THE(hCells[celli], TCells[celli]); } forAll(Tb_.boundaryField(), patchi) { fvPatchScalarField& pTb = Tb_.boundaryField()[patchi]; - const fvPatchScalarField& ph = h_.boundaryField()[patchi]; - const fvPatchScalarField& pT = T_.boundaryField()[patchi]; + const fvPatchScalarField& ph = this->he_.boundaryField()[patchi]; + const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; forAll(pTb, facei) { pTb[facei] = this->patchFaceProducts(patchi, facei) - .TH(ph[facei], pT[facei]); + .THE(ph[facei], pT[facei]); } } @@ -409,7 +288,7 @@ Foam::hhuMixtureThermo<MixtureType>::Tb() const template<class MixtureType> Foam::tmp<Foam::volScalarField> -Foam::hhuMixtureThermo<MixtureType>::psiu() const +Foam::heheuReactionThermo<MixtureType>::psiu() const { tmp<volScalarField> tpsiu ( @@ -418,20 +297,20 @@ Foam::hhuMixtureThermo<MixtureType>::psiu() const IOobject ( "psiu", - psi_.time().timeName(), - psi_.db(), + this->psi_.time().timeName(), + this->psi_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), - psi_.mesh(), - psi_.dimensions() + this->psi_.mesh(), + this->psi_.dimensions() ) ); volScalarField& psiu = tpsiu(); scalarField& psiuCells = psiu.internalField(); - const scalarField& TuCells = Tu_.internalField(); - const scalarField& pCells = p_.internalField(); + const scalarField& TuCells = this->Tu_.internalField(); + const scalarField& pCells = this->p_.internalField(); forAll(psiuCells, celli) { @@ -443,8 +322,8 @@ Foam::hhuMixtureThermo<MixtureType>::psiu() const { fvPatchScalarField& ppsiu = psiu.boundaryField()[patchi]; - const fvPatchScalarField& pp = p_.boundaryField()[patchi]; - const fvPatchScalarField& pTu = Tu_.boundaryField()[patchi]; + const fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + const fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi]; forAll(ppsiu, facei) { @@ -460,7 +339,7 @@ Foam::hhuMixtureThermo<MixtureType>::psiu() const template<class MixtureType> Foam::tmp<Foam::volScalarField> -Foam::hhuMixtureThermo<MixtureType>::psib() const +Foam::heheuReactionThermo<MixtureType>::psib() const { tmp<volScalarField> tpsib ( @@ -469,13 +348,13 @@ Foam::hhuMixtureThermo<MixtureType>::psib() const IOobject ( "psib", - psi_.time().timeName(), - psi_.db(), + this->psi_.time().timeName(), + this->psi_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), - psi_.mesh(), - psi_.dimensions() + this->psi_.mesh(), + this->psi_.dimensions() ) ); @@ -483,7 +362,7 @@ Foam::hhuMixtureThermo<MixtureType>::psib() const scalarField& psibCells = psib.internalField(); const volScalarField Tb_(Tb()); const scalarField& TbCells = Tb_.internalField(); - const scalarField& pCells = p_.internalField(); + const scalarField& pCells = this->p_.internalField(); forAll(psibCells, celli) { @@ -495,7 +374,7 @@ Foam::hhuMixtureThermo<MixtureType>::psib() const { fvPatchScalarField& ppsib = psib.boundaryField()[patchi]; - const fvPatchScalarField& pp = p_.boundaryField()[patchi]; + const fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; const fvPatchScalarField& pTb = Tb_.boundaryField()[patchi]; forAll(ppsib, facei) @@ -512,7 +391,7 @@ Foam::hhuMixtureThermo<MixtureType>::psib() const template<class MixtureType> Foam::tmp<Foam::volScalarField> -Foam::hhuMixtureThermo<MixtureType>::muu() const +Foam::heheuReactionThermo<MixtureType>::muu() const { tmp<volScalarField> tmuu ( @@ -521,19 +400,19 @@ Foam::hhuMixtureThermo<MixtureType>::muu() const IOobject ( "muu", - T_.time().timeName(), - T_.db(), + this->T_.time().timeName(), + this->T_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), - T_.mesh(), + this->T_.mesh(), dimensionSet(1, -1, -1, 0, 0) ) ); volScalarField& muu_ = tmuu(); scalarField& muuCells = muu_.internalField(); - const scalarField& TuCells = Tu_.internalField(); + const scalarField& TuCells = this->Tu_.internalField(); forAll(muuCells, celli) { @@ -543,7 +422,7 @@ Foam::hhuMixtureThermo<MixtureType>::muu() const forAll(muu_.boundaryField(), patchi) { fvPatchScalarField& pMuu = muu_.boundaryField()[patchi]; - const fvPatchScalarField& pTu = Tu_.boundaryField()[patchi]; + const fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi]; forAll(pMuu, facei) { @@ -558,7 +437,7 @@ Foam::hhuMixtureThermo<MixtureType>::muu() const template<class MixtureType> Foam::tmp<Foam::volScalarField> -Foam::hhuMixtureThermo<MixtureType>::mub() const +Foam::heheuReactionThermo<MixtureType>::mub() const { tmp<volScalarField> tmub ( @@ -567,12 +446,12 @@ Foam::hhuMixtureThermo<MixtureType>::mub() const IOobject ( "mub", - T_.time().timeName(), - T_.db(), + this->T_.time().timeName(), + this->T_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), - T_.mesh(), + this->T_.mesh(), dimensionSet(1, -1, -1, 0, 0) ) ); @@ -603,19 +482,4 @@ Foam::hhuMixtureThermo<MixtureType>::mub() const } -template<class MixtureType> -bool Foam::hhuMixtureThermo<MixtureType>::read() -{ - if (hhuCombustionThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.H b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.H similarity index 63% rename from src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.H rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.H index 8602e24e44a97046d60bcf7ce4ce54ca67868119..22b80cd3f5ab800d81c41d1ad3261d2833195935 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.H +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.H @@ -22,18 +22,21 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::hhuMixtureThermo + Foam::heheuReactionThermo Description - Foam::hhuMixtureThermo + Foam::heheuReactionThermo SourceFiles - hhuMixtureThermo.C + heheuReactionThermo.C \*---------------------------------------------------------------------------*/ -#ifndef hhuMixtureThermo_H -#define hhuMixtureThermo_H +#ifndef heheuReactionThermo_H +#define heheuReactionThermo_H + +#include "heThermo.H" +#include "psiuReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,95 +44,82 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hhuMixtureThermo Declaration + Class heheuReactionThermo Declaration \*---------------------------------------------------------------------------*/ template<class MixtureType> -class hhuMixtureThermo +class heheuReactionThermo : - public hhuCombustionThermo, - public MixtureType + public heThermo<psiuReactionThermo, MixtureType> { + // Private Member Functions + + volScalarField Tu_; + volScalarField heu_; + + // Private Member Functions void calculate(); //- Construct as copy (not implemented) - hhuMixtureThermo(const hhuMixtureThermo<MixtureType>&); + heheuReactionThermo(const heheuReactionThermo<MixtureType>&); public: //- Runtime type information - TypeName("hhuMixtureThermo"); + TypeName("heheuReactionThermo"); // Constructors //- Construct from mesh - hhuMixtureThermo(const fvMesh&); + heheuReactionThermo(const fvMesh&); //- Destructor - virtual ~hhuMixtureThermo(); + virtual ~heheuReactionThermo(); // Member functions - //- Return the compostion of the multi-component mixture - virtual basicMultiComponentMixture& composition() - { - return *this; - } - - //- Return the compostion of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const - { - return *this; - } - //- Update properties virtual void correct(); - //- Chemical enthalpy [J/kg] - virtual tmp<volScalarField> hc() const; - + // Access to thermodynamic state variables. - // Fields derived from thermodynamic state variables + //- Unburnt gas enthalpy [J/kg] + // Non-const access allowed for transport equations + virtual volScalarField& heu() + { + return heu_; + } - //- Enthalpy for cell-set [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const labelList& cells - ) const; + //- Unburnt gas enthalpy [J/kg] + virtual const volScalarField& heu() const + { + return heu_; + } - //- Enthalpy for patch [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const label patchi - ) const; + //- Unburnt gas temperature [K] + virtual const volScalarField& Tu() const + { + return Tu_; + } - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp<scalarField> Cp - ( - const scalarField& T, - const label patchi - ) const; - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp<volScalarField> Cp() const; + // Fields derived from thermodynamic state variables //- Unburnt gas enthalpy for cell-set [J/kg] - virtual tmp<scalarField> hu + virtual tmp<scalarField> heu ( const scalarField& T, const labelList& cells ) const; //- Unburnt gas enthalpy for patch [J/kg] - virtual tmp<scalarField> hu + virtual tmp<scalarField> heu ( const scalarField& T, const label patchi @@ -153,10 +143,6 @@ public: //- Dynamic viscosity of burnt gas [kg/ms] virtual tmp<volScalarField> mub() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); }; @@ -167,7 +153,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #ifdef NoRepository -# include "hhuMixtureThermo.C" +# include "heheuReactionThermo.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermos.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C similarity index 72% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermos.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C index 9368b04c2e03f823752a5f68cf4d70d3911be0e5..820c76c972ad04e0069cb866d0872801ed28f920 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermos.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C @@ -23,16 +23,17 @@ License \*---------------------------------------------------------------------------*/ -#include "hhuCombustionThermo.H" -#include "hhuMixtureThermo.H" +#include "psiuReactionThermo.H" +#include "heheuReactionThermo.H" -#include "makeCombustionThermo.H" +#include "makeReactionThermo.H" #include "addToRunTimeSelectionTable.H" #include "perfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "absoluteEnthalpy.H" #include "specieThermo.H" #include "constTransport.H" @@ -53,85 +54,101 @@ namespace Foam // * * * * * * * * * * * * * * * * h-hu-Thermos * * * * * * * * * * * * * * * // -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, homogeneousMixture, constTransport, + absoluteEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, inhomogeneousMixture, constTransport, + absoluteEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, veryInhomogeneousMixture, constTransport, + absoluteEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, homogeneousMixture, sutherlandTransport, + absoluteEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, inhomogeneousMixture, sutherlandTransport, + absoluteEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, veryInhomogeneousMixture, sutherlandTransport, + absoluteEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, egrMixture, constTransport, + absoluteEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, egrMixture, sutherlandTransport, + absoluteEnthalpy, janafThermo, perfectGas ); diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.C similarity index 74% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.C index 40007a427921ccea6f65afc85e4a94a1ec88a7bd..eedf653bb83414c866feceddea29b2f45c0f7b7e 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.C @@ -23,43 +23,28 @@ License \*---------------------------------------------------------------------------*/ -#include "hsReactionThermo.H" +#include "psiReactionThermo.H" #include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(hsReactionThermo, 0); - defineRunTimeSelectionTable(hsReactionThermo, fvMesh); + defineTypeNameAndDebug(psiReactionThermo, 0); + defineRunTimeSelectionTable(psiReactionThermo, fvMesh); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::hsReactionThermo::hsReactionThermo(const fvMesh& mesh) +Foam::psiReactionThermo::psiReactionThermo(const fvMesh& mesh) : - basicRhoThermo(mesh), - - hs_ - ( - IOobject - ( - "hs", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) + psiThermo(mesh) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::hsReactionThermo::~hsReactionThermo() +Foam::psiReactionThermo::~psiReactionThermo() {} diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.H b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.H similarity index 71% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.H rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.H index e8065d4df657ae7419e0d5e7af6aadd6c3a4fd42..8c106c861fdda38fb2884a815d8559b3c311d1dd 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.H +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.H @@ -22,20 +22,20 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::hReactionThermo + Foam::psiReactionThermo Description - Foam::hReactionThermo + Foam::psiReactionThermo SourceFiles - hReactionThermo.C + psiReactionThermo.C \*---------------------------------------------------------------------------*/ -#ifndef hReactionThermo_H -#define hReactionThermo_H +#ifndef psiReactionThermo_H +#define psiReactionThermo_H -#include "basicRhoThermo.H" +#include "psiThermo.H" #include "basicMultiComponentMixture.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" @@ -46,33 +46,25 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hReactionThermo Declaration + Class psiReactionThermo Declaration \*---------------------------------------------------------------------------*/ -class hReactionThermo +class psiReactionThermo : - public basicRhoThermo + public psiThermo { -protected: - - // Protected data - - //- Enthalpy field - volScalarField h_; - - public: //- Runtime type information - TypeName("hReactionThermo"); + TypeName("psiReactionThermo"); //- Declare run-time constructor selection tables declareRunTimeSelectionTable ( autoPtr, - hReactionThermo, + psiReactionThermo, fvMesh, (const fvMesh& mesh), (mesh) @@ -82,16 +74,16 @@ public: // Constructors //- Construct from dictionary and mesh - hReactionThermo(const fvMesh&); + psiReactionThermo(const fvMesh&); // Selectors //- Standard selection based on fvMesh - static autoPtr<hReactionThermo> New(const fvMesh&); + static autoPtr<psiReactionThermo> New(const fvMesh&); //- Select and check that package contains 'thermoType' - static autoPtr<hReactionThermo> NewType + static autoPtr<psiReactionThermo> NewType ( const fvMesh&, const word& thermoType @@ -99,7 +91,7 @@ public: //- Destructor - virtual ~hReactionThermo(); + virtual ~psiReactionThermo(); // Member functions @@ -109,26 +101,6 @@ public: //- Return the composition of the multi-component mixture virtual const basicMultiComponentMixture& composition() const = 0; - - - // Access to thermodynamic state variables - - //- Enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& h() - { - return h_; - } - - //- Enthalpy [J/kg] - virtual const volScalarField& h() const - { - return h_; - } - - - //- Update properties - virtual void correct() = 0; }; diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermoNew.C similarity index 85% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermoNew.C index b3934076f54025e2e6517dbb1eab3a606ca176bb..3c004630c138ca2777bc1a726554bc825fcb21c6 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermoNew.C @@ -23,12 +23,12 @@ License \*---------------------------------------------------------------------------*/ -#include "hCombustionThermo.H" +#include "psiReactionThermo.H" #include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr<Foam::hCombustionThermo> Foam::hCombustionThermo::New +Foam::autoPtr<Foam::psiReactionThermo> Foam::psiReactionThermo::New ( const fvMesh& mesh ) @@ -58,19 +58,19 @@ Foam::autoPtr<Foam::hCombustionThermo> Foam::hCombustionThermo::New if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hCombustionThermo::New(const fvMesh&)") - << "Unknown hCombustionThermo type " + FatalErrorIn("psiReactionThermo::New(const fvMesh&)") + << "Unknown psiReactionThermo type " << modelType << nl << nl - << "Valid hCombustionThermo types are:" << nl + << "Valid psiReactionThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr<hCombustionThermo>(cstrIter()(mesh)); + return autoPtr<psiReactionThermo>(cstrIter()(mesh)); } -Foam::autoPtr<Foam::hCombustionThermo> Foam::hCombustionThermo::NewType +Foam::autoPtr<Foam::psiReactionThermo> Foam::psiReactionThermo::NewType ( const fvMesh& mesh, const word& thermoType @@ -109,7 +109,7 @@ Foam::autoPtr<Foam::hCombustionThermo> Foam::hCombustionThermo::NewType FatalErrorIn ( - "autoPtr<hCombustionThermo> hCombustionThermo::NewType" + "autoPtr<psiReactionThermo> psiReactionThermo::NewType" "(" "const fvMesh&, " "const word&" @@ -130,19 +130,19 @@ Foam::autoPtr<Foam::hCombustionThermo> Foam::hCombustionThermo::NewType { FatalErrorIn ( - "autoPtr<hCombustionThermo> hCombustionThermo::NewType" + "autoPtr<psiReactionThermo> psiReactionThermo::NewType" "(" "const fvMesh&, " "const word&" ")" - ) << "Unknown hCombustionThermo type " + ) << "Unknown psiReactionThermo type " << modelType << nl << nl - << "Valid hCombustionThermo types are:" << nl + << "Valid psiReactionThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr<hCombustionThermo>(cstrIter()(mesh)); + return autoPtr<psiReactionThermo>(cstrIter()(mesh)); } diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C similarity index 76% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C index 483ff011cf2157103bcd1d7fcfea52c2f8533e94..91306824deca72bfcbb8a50a00ae37c495e0d610 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "fvMesh.H" #include "zeroGradientFvPatchFields.H" #include "fixedUnburntEnthalpyFvPatchScalarField.H" @@ -37,14 +37,15 @@ namespace Foam /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ -defineTypeNameAndDebug(hhuCombustionThermo, 0); -defineRunTimeSelectionTable(hhuCombustionThermo, fvMesh); +defineTypeNameAndDebug(psiuReactionThermo, 0); +defineRunTimeSelectionTable(psiuReactionThermo, fvMesh); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -wordList hhuCombustionThermo::huBoundaryTypes() +wordList psiuReactionThermo::heuBoundaryTypes() { - const volScalarField::GeometricBoundaryField& tbf = Tu_.boundaryField(); + const volScalarField::GeometricBoundaryField& tbf = + this->Tu().boundaryField(); wordList hbt = tbf.types(); @@ -71,9 +72,9 @@ wordList hhuCombustionThermo::huBoundaryTypes() return hbt; } -void hhuCombustionThermo::huBoundaryCorrection(volScalarField& hu) +void psiuReactionThermo::heuBoundaryCorrection(volScalarField& heu) { - volScalarField::GeometricBoundaryField& hbf = hu.boundaryField(); + volScalarField::GeometricBoundaryField& hbf = heu.boundaryField(); forAll(hbf, patchi) { @@ -99,43 +100,15 @@ void hhuCombustionThermo::huBoundaryCorrection(volScalarField& hu) // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -hhuCombustionThermo::hhuCombustionThermo(const fvMesh& mesh) +psiuReactionThermo::psiuReactionThermo(const fvMesh& mesh) : - hCombustionThermo(mesh), - - Tu_ - ( - IOobject - ( - "Tu", - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ), - - hu_ - ( - IOobject - ( - "hu", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimensionSet(0, 2, -2, 0, 0), - huBoundaryTypes() - ) + psiReactionThermo(mesh) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -hhuCombustionThermo::~hhuCombustionThermo() +psiuReactionThermo::~psiuReactionThermo() {} diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.H b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.H similarity index 77% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.H rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.H index 1ef53a6069a5174726a531a40f5c2ab420f8507b..b807b934f57844961ad6411bf79aa4f640f7f540 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.H +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.H @@ -22,21 +22,21 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::hhuCombustionThermo + Foam::psiuReactionThermo Description - Foam::hhuCombustionThermo + Foam::psiuReactionThermo SourceFiles - hhuCombustionThermo.C - hhuCombustionThermoNew.C + psiuReactionThermo.C + psiuReactionThermoNew.C \*---------------------------------------------------------------------------*/ -#ifndef hhuCombustionThermo_H -#define hhuCombustionThermo_H +#ifndef psiuReactionThermo_H +#define psiuReactionThermo_H -#include "hCombustionThermo.H" +#include "psiReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,32 +44,26 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hhuCombustionThermo Declaration + Class psiuReactionThermo Declaration \*---------------------------------------------------------------------------*/ -class hhuCombustionThermo +class psiuReactionThermo : - public hCombustionThermo + public psiReactionThermo { protected: - // Protected data - - volScalarField Tu_; - volScalarField hu_; - - // Protected Member Functions - wordList huBoundaryTypes(); - void huBoundaryCorrection(volScalarField& hu); + wordList heuBoundaryTypes(); + void heuBoundaryCorrection(volScalarField& heu); public: //- Runtime type information - TypeName("hhuCombustionThermo"); + TypeName("psiuReactionThermo"); // Declare run-time constructor selection tables @@ -77,7 +71,7 @@ public: declareRunTimeSelectionTable ( autoPtr, - hhuCombustionThermo, + psiuReactionThermo, fvMesh, (const fvMesh& mesh), (mesh) @@ -87,16 +81,16 @@ public: // Constructors //- Construct from dictionary and mesh - hhuCombustionThermo(const fvMesh&); + psiuReactionThermo(const fvMesh&); // Selectors - static autoPtr<hhuCombustionThermo> New(const fvMesh&); + static autoPtr<psiuReactionThermo> New(const fvMesh&); //- Destructor - virtual ~hhuCombustionThermo(); + virtual ~psiuReactionThermo(); // Member functions @@ -109,39 +103,30 @@ public: //- Unburnt gas enthalpy [J/kg] // Non-const access allowed for transport equations - virtual volScalarField& hu() - { - return hu_; - } + virtual volScalarField& heu() = 0; //- Unburnt gas enthalpy [J/kg] - virtual const volScalarField& hu() const - { - return hu_; - } + virtual const volScalarField& heu() const = 0; // Fields derived from thermodynamic state variables //- Unburnt gas enthalpy for cell-set [J/kg] - virtual tmp<scalarField> hu + virtual tmp<scalarField> heu ( const scalarField& T, const labelList& cells ) const = 0; //- Unburnt gas enthalpy for patch [J/kg] - virtual tmp<scalarField> hu + virtual tmp<scalarField> heu ( const scalarField& T, const label patchi ) const = 0; //- Unburnt gas temperature [K] - virtual const volScalarField& Tu() const - { - return Tu_; - } + virtual const volScalarField& Tu() const = 0; //- Burnt gas temperature [K] virtual tmp<volScalarField> Tb() const = 0; diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermoNew.C similarity index 86% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermoNew.C index 3bc2518c96e0fb0d0630f88866ff69364ce3e00b..f32e0e988c5df89c517df8d682ac7ec41365dae7 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermoNew.C @@ -23,12 +23,12 @@ License \*---------------------------------------------------------------------------*/ -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr<Foam::hhuCombustionThermo> Foam::hhuCombustionThermo::New +Foam::autoPtr<Foam::psiuReactionThermo> Foam::psiuReactionThermo::New ( const fvMesh& mesh ) @@ -58,15 +58,15 @@ Foam::autoPtr<Foam::hhuCombustionThermo> Foam::hhuCombustionThermo::New if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hhuCombustionThermo::New(const fvMesh&)") - << "Unknown hhuCombustionThermo type " + FatalErrorIn("psiuReactionThermo::New(const fvMesh&)") + << "Unknown psiuReactionThermo type " << modelType << nl << nl - << "Valid hhuCombustionThermo types are :" << endl + << "Valid psiuReactionThermo types are :" << endl << fvMeshConstructorTablePtr_->sortedToc() << exit(FatalError); } - return autoPtr<hhuCombustionThermo>(cstrIter()(mesh)); + return autoPtr<psiuReactionThermo>(cstrIter()(mesh)); } diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.H b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.H deleted file mode 100644 index 62afb6c8c98a869b03d5ffa1ee647c80f4160185..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.H +++ /dev/null @@ -1,143 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -Class - Foam::hsReactionThermo - -Description - Sensible enthalpy variant for reactionThermo - -SourceFiles - hReactionThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsReactionThermo_H -#define hsReactionThermo_H - -#include "basicRhoThermo.H" -#include "basicMultiComponentMixture.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsReactionThermo Declaration -\*---------------------------------------------------------------------------*/ - -class hsReactionThermo -: - public basicRhoThermo -{ - -protected: - - // Protected data - - //- Sensible enthalpy [J/kg] - volScalarField hs_; - - -public: - - //- Runtime type information - TypeName("hsReactionThermo"); - - - //- Declare run-time constructor selection tables - declareRunTimeSelectionTable - ( - autoPtr, - hsReactionThermo, - fvMesh, - (const fvMesh& mesh), - (mesh) - ); - - - // Constructors - - //- Construct from dictionary and mesh - hsReactionThermo(const fvMesh&); - - - // Selectors - - //- Standard selection based on fvMesh - static autoPtr<hsReactionThermo> New(const fvMesh&); - - //- Select and check that package contains 'thermoType' - static autoPtr<hsReactionThermo> NewType - ( - const fvMesh&, - const word& thermoType - ); - - - //- Destructor - virtual ~hsReactionThermo(); - - - // Member functions - - //- Return the composition of the multi-component mixture - virtual basicMultiComponentMixture& composition() = 0; - - //- Return the composition of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const = 0; - - - // Access to thermodynamic state variables - - //- Sensible enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& hs() - { - return hs_; - } - - //- Sensible enthalpy [J/kg] - virtual const volScalarField& hs() const - { - return hs_; - } - - - //- Update properties - virtual void correct() = 0; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C deleted file mode 100644 index c41b22c964d41bf90be3b6aec43f5748597308b5..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C +++ /dev/null @@ -1,142 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hsReactionThermo.H" -#include "fvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr<Foam::hsReactionThermo> Foam::hsReactionThermo::New -( - const fvMesh& mesh -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "thermophysicalProperties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("thermoType") - ); - - Info<< "Selecting thermodynamics package " << modelType << endl; - - fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(modelType); - - if (cstrIter == fvMeshConstructorTablePtr_->end()) - { - FatalErrorIn("hsReactionThermo::New(const fvMesh&)") - << "Unknown hsReactionThermo type " - << modelType << nl << nl - << "Valid hsReactionThermo types:" << nl - << fvMeshConstructorTablePtr_->sortedToc() << nl - << exit(FatalError); - } - - return autoPtr<hsReactionThermo>(cstrIter()(mesh)); -} - - -Foam::autoPtr<Foam::hsReactionThermo> Foam::hsReactionThermo::NewType -( - const fvMesh& mesh, - const word& thermoType -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "thermophysicalProperties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("thermoType") - ); - - if (modelType.find(thermoType) == string::npos) - { - wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); - DynamicList<word> validModels; - forAll(allModels, i) - { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } - } - - FatalErrorIn - ( - "autoPtr<hsReactionThermo> hsReactionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << modelType << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); - } - - Info<< "Selecting thermodynamics package " << modelType << endl; - - fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(modelType); - - if (cstrIter == fvMeshConstructorTablePtr_->end()) - { - FatalErrorIn("hsReactionThermo::New(const fvMesh&)") - << "Unknown hsReactionThermo type " - << modelType << nl << nl - << "Valid hsReactionThermo types:" << nl - << fvMeshConstructorTablePtr_->sortedToc() << nl - << exit(FatalError); - } - - return autoPtr<hsReactionThermo>(cstrIter()(mesh)); -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermos.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermos.C deleted file mode 100644 index 826babba32148fedb3d0cc70e8a1645694d29867..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermos.C +++ /dev/null @@ -1,195 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -#include "makeHsReactionThermo.H" - -#include "hsReactionThermo.H" -#include "hsRhoMixtureThermo.H" - -#include "perfectGas.H" - -#include "hConstThermo.H" -#include "janafThermo.H" -#include "specieThermo.H" - -#include "constTransport.H" -#include "sutherlandTransport.H" - -#include "homogeneousMixture.H" -#include "inhomogeneousMixture.H" -#include "veryInhomogeneousMixture.H" -#include "dieselMixture.H" -#include "multiComponentMixture.H" -#include "reactingMixture.H" -#include "singleStepReactingMixture.H" - -#include "thermoPhysicsTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - homogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - inhomogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - veryInhomogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - homogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - inhomogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - veryInhomogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - dieselMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - - -// Multi-component thermo - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - multiComponentMixture, - constGasThermoPhysics -); - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - multiComponentMixture, - icoPoly8ThermoPhysics -); - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - multiComponentMixture, - gasThermoPhysics -); - - -// Multi-component reaction thermo - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - reactingMixture, - constGasThermoPhysics -); - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - reactingMixture, - icoPoly8ThermoPhysics -); - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - reactingMixture, - gasThermoPhysics -); - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - singleStepReactingMixture, - gasThermoPhysics -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C deleted file mode 100644 index 5229bea1e7062f90cc0d8d10e4ec94e907fa1082..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C +++ /dev/null @@ -1,319 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hRhoMixtureThermo.H" -#include "fvMesh.H" -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hRhoMixtureThermo<MixtureType>::calculate() -{ - const scalarField& hCells = h_.internalField(); - const scalarField& pCells = p_.internalField(); - - scalarField& TCells = T_.internalField(); - scalarField& psiCells = psi_.internalField(); - scalarField& rhoCells = rho_.internalField(); - scalarField& muCells = mu_.internalField(); - scalarField& alphaCells = alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture = - this->cellMixture(celli); - - TCells[celli] = mixture.TH(hCells[celli], TCells[celli]); - psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]); - rhoCells[celli] = mixture.rho(pCells[celli], TCells[celli]); - - muCells[celli] = mixture.mu(TCells[celli]); - alphaCells[celli] = mixture.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = p_.boundaryField()[patchi]; - fvPatchScalarField& pT = T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = psi_.boundaryField()[patchi]; - fvPatchScalarField& prho = rho_.boundaryField()[patchi]; - - fvPatchScalarField& ph = h_.boundaryField()[patchi]; - - fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - ph[facei] = mixture.H(pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - prho[facei] = mixture.rho(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture.TH(ph[facei], pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - prho[facei] = mixture.rho(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hRhoMixtureThermo<MixtureType>::hRhoMixtureThermo(const fvMesh& mesh) -: - hReactionThermo(mesh), - MixtureType(*this, mesh) -{ - scalarField& hCells = h_.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).H(TCells[celli]); - } - - forAll(h_.boundaryField(), patchi) - { - h_.boundaryField()[patchi] == h(T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(h_); - - calculate(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hRhoMixtureThermo<MixtureType>::~hRhoMixtureThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hRhoMixtureThermo<MixtureType>::correct() -{ - if (debug) - { - Info<< "entering hRhoMixtureThermo<MixtureType>::correct()" << endl; - } - - calculate(); - - if (debug) - { - Info<< "exiting hRhoMixtureThermo<MixtureType>::correct()" << endl; - } -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hRhoMixtureThermo<MixtureType>::hc() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> thc - ( - new volScalarField - ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - h_.dimensions() - ) - ); - - volScalarField& hcf = thc(); - scalarField& hcCells = hcf.internalField(); - - forAll(hcCells, celli) - { - hcCells[celli] = this->cellMixture(celli).Hc(); - } - - forAll(hcf.boundaryField(), patchi) - { - scalarField& hcp = hcf.boundaryField()[patchi]; - - forAll(hcp, facei) - { - hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); - } - } - - return thc; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hRhoMixtureThermo<MixtureType>::h -( - const scalarField& T, - const labelList& cells -) const -{ - tmp<scalarField> th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).H(T[celli]); - } - - return th; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hRhoMixtureThermo<MixtureType>::h -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).H(T[facei]); - } - - return th; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hRhoMixtureThermo<MixtureType>::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCp(new scalarField(T.size())); - - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hRhoMixtureThermo<MixtureType>::Cp() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimensionSet(0, 2, -2, -1, 0) - ) - ); - - volScalarField& cp = tCp(); - - scalarField& cpCells = cp.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi); - } - - return tCp; -} - - -template<class MixtureType> -bool Foam::hRhoMixtureThermo<MixtureType>::read() -{ - if (hReactionThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.C b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.C deleted file mode 100644 index 6277287cbcd1e4ebe49b05dce510c2eda934bb76..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.C +++ /dev/null @@ -1,319 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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/>. - -\*---------------------------------------------------------------------------*/ - -#include "hsRhoMixtureThermo.H" -#include "fvMesh.H" -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hsRhoMixtureThermo<MixtureType>::calculate() -{ - const scalarField& hsCells = hs_.internalField(); - const scalarField& pCells = p_.internalField(); - - scalarField& TCells = T_.internalField(); - scalarField& psiCells = psi_.internalField(); - scalarField& rhoCells = rho_.internalField(); - scalarField& muCells = mu_.internalField(); - scalarField& alphaCells = alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture = - this->cellMixture(celli); - - TCells[celli] = mixture.THs(hsCells[celli], TCells[celli]); - psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]); - rhoCells[celli] = mixture.rho(pCells[celli], TCells[celli]); - - muCells[celli] = mixture.mu(TCells[celli]); - alphaCells[celli] = mixture.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = p_.boundaryField()[patchi]; - fvPatchScalarField& pT = T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = psi_.boundaryField()[patchi]; - fvPatchScalarField& prho = rho_.boundaryField()[patchi]; - - fvPatchScalarField& phs = hs_.boundaryField()[patchi]; - - fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - phs[facei] = mixture.Hs(pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - prho[facei] = mixture.rho(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture.THs(phs[facei], pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - prho[facei] = mixture.rho(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hsRhoMixtureThermo<MixtureType>::hsRhoMixtureThermo(const fvMesh& mesh) -: - hsReactionThermo(mesh), - MixtureType(*this, mesh) -{ - scalarField& hsCells = hs_.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(hsCells, celli) - { - hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); - } - - forAll(hs_.boundaryField(), patchi) - { - hs_.boundaryField()[patchi] == hs(T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(hs_); - - calculate(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class MixtureType> -Foam::hsRhoMixtureThermo<MixtureType>::~hsRhoMixtureThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class MixtureType> -void Foam::hsRhoMixtureThermo<MixtureType>::correct() -{ - if (debug) - { - Info<< "entering hsRhoMixtureThermo<MixtureType>::correct()" << endl; - } - - calculate(); - - if (debug) - { - Info<< "exiting hsRhoMixtureThermo<MixtureType>::correct()" << endl; - } -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hsRhoMixtureThermo<MixtureType>::hc() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> thc - ( - new volScalarField - ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - hs_.dimensions() - ) - ); - - volScalarField& hcf = thc(); - scalarField& hcCells = hcf.internalField(); - - forAll(hcCells, celli) - { - hcCells[celli] = this->cellMixture(celli).Hc(); - } - - forAll(hcf.boundaryField(), patchi) - { - scalarField& hcp = hcf.boundaryField()[patchi]; - - forAll(hcp, facei) - { - hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); - } - } - - return thc; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hsRhoMixtureThermo<MixtureType>::hs -( - const scalarField& T, - const labelList& cells -) const -{ - tmp<scalarField> ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, celli) - { - hs[celli] = this->cellMixture(cells[celli]).Hs(T[celli]); - } - - return ths; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hsRhoMixtureThermo<MixtureType>::hs -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, facei) - { - hs[facei] = this->patchFaceMixture(patchi, facei).Hs(T[facei]); - } - - return ths; -} - - -template<class MixtureType> -Foam::tmp<Foam::scalarField> -Foam::hsRhoMixtureThermo<MixtureType>::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp<scalarField> tCp(new scalarField(T.size())); - - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hsRhoMixtureThermo<MixtureType>::Cp() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - scalarField& cpCells = cp.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi); - } - - return tCp; -} - - -template<class MixtureType> -bool Foam::hsRhoMixtureThermo<MixtureType>::read() -{ - if (hsReactionThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.H b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.H deleted file mode 100644 index b25f199dd50bee889a85f33819116dcb5ebcae13..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.H +++ /dev/null @@ -1,147 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -Class - Foam::hsRhoMixtureThermo - -Description - Foam::hsRhoMixtureThermo - -SourceFiles - hsRhoMixtureThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsRhoMixtureThermo_H -#define hsRhoMixtureThermo_H - -#include "hsReactionThermo.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsRhoMixtureThermo Declaration -\*---------------------------------------------------------------------------*/ - -template<class MixtureType> -class hsRhoMixtureThermo -: - public hsReactionThermo, - public MixtureType -{ - // Private Member Functions - - void calculate(); - - //- Construct as copy (not implemented) - hsRhoMixtureThermo(const hsRhoMixtureThermo<MixtureType>&); - - -public: - - //- Runtime type information - TypeName("hsRhoMixtureThermo"); - - - // Constructors - - //- Construct from mesh - hsRhoMixtureThermo(const fvMesh&); - - - //- Destructor - virtual ~hsRhoMixtureThermo(); - - - // Member functions - - //- Return the compostion of the multi-component mixture - virtual basicMultiComponentMixture& composition() - { - return *this; - } - - //- Return the compostion of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Fields derived from thermodynamic state variables - - //- Chemical enthalpy [J/kg] - virtual tmp<volScalarField> hc() const; - - - //- Sensible nthalpy for cell-set [J/kg] - virtual tmp<scalarField> hs - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Sensible enthalpy for patch [J/kg] - virtual tmp<scalarField> hs - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp<scalarField> Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp<volScalarField> Cp() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "hsRhoMixtureThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.C new file mode 100644 index 0000000000000000000000000000000000000000..53cf131bc6c6c81bc769f264986efcb2bbdef8a8 --- /dev/null +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.C @@ -0,0 +1,140 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-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/>. + +\*---------------------------------------------------------------------------*/ + +#include "heRhoReactionThermo.H" +#include "fvMesh.H" +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template<class MixtureType> +void Foam::heRhoReactionThermo<MixtureType>::calculate() +{ + const scalarField& hCells = this->he_.internalField(); + const scalarField& pCells = this->p_.internalField(); + + scalarField& TCells = this->T_.internalField(); + scalarField& psiCells = this->psi_.internalField(); + scalarField& rhoCells = this->rho_.internalField(); + scalarField& muCells = this->mu_.internalField(); + scalarField& alphaCells = this->alpha_.internalField(); + + forAll(TCells, celli) + { + const typename MixtureType::thermoType& mixture = + this->cellMixture(celli); + + TCells[celli] = mixture.THE(hCells[celli], TCells[celli]); + psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]); + rhoCells[celli] = mixture.rho(pCells[celli], TCells[celli]); + + muCells[celli] = mixture.mu(TCells[celli]); + alphaCells[celli] = mixture.alphah(TCells[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; + fvPatchScalarField& prho = this->rho_.boundaryField()[patchi]; + + fvPatchScalarField& ph = this->he_.boundaryField()[patchi]; + + fvPatchScalarField& pmu_ = this->mu_.boundaryField()[patchi]; + fvPatchScalarField& palpha_ = this->alpha_.boundaryField()[patchi]; + + if (pT.fixesValue()) + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture = + this->patchFaceMixture(patchi, facei); + + ph[facei] = mixture.HE(pT[facei]); + + ppsi[facei] = mixture.psi(pp[facei], pT[facei]); + prho[facei] = mixture.rho(pp[facei], pT[facei]); + pmu_[facei] = mixture.mu(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); + } + } + else + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture = + this->patchFaceMixture(patchi, facei); + + pT[facei] = mixture.THE(ph[facei], pT[facei]); + + ppsi[facei] = mixture.psi(pp[facei], pT[facei]); + prho[facei] = mixture.rho(pp[facei], pT[facei]); + pmu_[facei] = mixture.mu(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class MixtureType> +Foam::heRhoReactionThermo<MixtureType>::heRhoReactionThermo(const fvMesh& mesh) +: + heThermo<rhoReactionThermo, MixtureType>(mesh) +{ + calculate(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class MixtureType> +Foam::heRhoReactionThermo<MixtureType>::~heRhoReactionThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class MixtureType> +void Foam::heRhoReactionThermo<MixtureType>::correct() +{ + if (debug) + { + Info<< "entering heRhoReactionThermo<MixtureType>::correct()" << endl; + } + + calculate(); + + if (debug) + { + Info<< "exiting heRhoReactionThermo<MixtureType>::correct()" << endl; + } +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.H b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.H similarity index 54% rename from src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.H rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.H index 5e94083beea8bb1dffd9d8128cb5b8bb8451eea6..e8c130214048a5053f7ba25dba5acf036547f068 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.H +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.H @@ -22,20 +22,21 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::hPsiMixtureThermo + Foam::heRhoReactionThermo Description - Foam::hPsiMixtureThermo + Foam::heRhoReactionThermo SourceFiles - hPsiMixtureThermo.C + heRhoReactionThermo.C \*---------------------------------------------------------------------------*/ -#ifndef hPsiMixtureThermo_H -#define hPsiMixtureThermo_H +#ifndef heRhoReactionThermo_H +#define heRhoReactionThermo_H -#include "hCombustionThermo.H" +#include "heThermo.H" +#include "rhoReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,89 +44,42 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hPsiMixtureThermo Declaration + Class heRhoReactionThermo Declaration \*---------------------------------------------------------------------------*/ template<class MixtureType> -class hPsiMixtureThermo +class heRhoReactionThermo : - public hCombustionThermo, - public MixtureType + public heThermo<rhoReactionThermo, MixtureType> { // Private Member Functions void calculate(); //- Construct as copy (not implemented) - hPsiMixtureThermo(const hPsiMixtureThermo<MixtureType>&); + heRhoReactionThermo(const heRhoReactionThermo<MixtureType>&); public: //- Runtime type information - TypeName("hPsiMixtureThermo"); + TypeName("heRhoReactionThermo"); // Constructors //- Construct from mesh - hPsiMixtureThermo(const fvMesh&); + heRhoReactionThermo(const fvMesh&); //- Destructor - virtual ~hPsiMixtureThermo(); + virtual ~heRhoReactionThermo(); // Member functions - //- Return the compostion of the multi-component mixture - virtual basicMultiComponentMixture& composition() - { - return *this; - } - - //- Return the compostion of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const - { - return *this; - } - //- Update properties virtual void correct(); - - - // Fields derived from thermodynamic state variables - - //- Chemical enthalpy [J/kg] - virtual tmp<volScalarField> hc() const; - - //- Enthalpy for cell-set [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Enthalpy for patch [J/kg] - virtual tmp<scalarField> h - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp<scalarField> Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp<volScalarField> Cp() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); }; @@ -136,7 +90,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "hPsiMixtureThermo.C" +# include "heRhoReactionThermo.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermos.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C similarity index 74% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermos.C rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C index 119152bcceee1522f0d7e5dc853749baa938585e..6e53d8b8061b86a0b632ae6287788faa53e0e474 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C @@ -25,13 +25,14 @@ License #include "makeReactionThermo.H" -#include "hReactionThermo.H" -#include "hRhoMixtureThermo.H" +#include "rhoReactionThermo.H" +#include "heRhoReactionThermo.H" #include "perfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "sensibleEnthalpy.H" #include "specieThermo.H" #include "constTransport.H" @@ -56,60 +57,72 @@ namespace Foam makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, homogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, inhomogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, veryInhomogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, homogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, inhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, veryInhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); @@ -117,10 +130,12 @@ makeReactionThermo makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, dieselMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); @@ -130,24 +145,27 @@ makeReactionThermo makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, multiComponentMixture, constGasThermoPhysics ); makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, multiComponentMixture, icoPoly8ThermoPhysics ); makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, multiComponentMixture, gasThermoPhysics ); @@ -157,32 +175,36 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, reactingMixture, constGasThermoPhysics ); makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, reactingMixture, icoPoly8ThermoPhysics ); makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, reactingMixture, gasThermoPhysics ); makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, singleStepReactingMixture, gasThermoPhysics ); diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/makeReactionThermo.H b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/makeReactionThermo.H similarity index 78% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/makeReactionThermo.H rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/makeReactionThermo.H index 7d7c15ace9995be9c1fc58442d953e952a90e075..c59969ddfcc6e0e907a0707ea8534aa2eeede048 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/makeReactionThermo.H +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/makeReactionThermo.H @@ -21,57 +21,55 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -InClass - Foam::hReactionThermo - \*---------------------------------------------------------------------------*/ #ifndef makeReactionThermo_H #define makeReactionThermo_H #include "addToRunTimeSelectionTable.H" -#include "basicRhoThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeReactionThermo\ -( \ - CThermo, \ - MixtureThermo, \ - Mixture, \ - Transport, \ - Thermo, \ - EqnOfState \ -) \ +#define makeReactionThermo(BaseThermo,CThermo,MixtureThermo,Mixture,Transport,Type,Thermo,EqnOfState) \ \ typedef MixtureThermo \ - <Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState; \ + <Mixture<Transport<specieThermo<Thermo<EqnOfState>,Type> > > > \ + MixtureThermo##Mixture##Transport##Type##Thermo##EqnOfState; \ \ defineTemplateTypeNameAndDebugWithName \ ( \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ + MixtureThermo##Mixture##Transport##Type##Thermo##EqnOfState, \ #MixtureThermo \ - "<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", \ + "<" \ + #Mixture \ + "<" \ + #Transport \ + "<specieThermo<" \ + #Thermo \ + "<" \ + #EqnOfState \ + ">," \ + #Type \ + ">>>>", \ 0 \ ); \ \ addToRunTimeSelectionTable \ ( \ - basicRhoThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ + BaseThermo, \ + MixtureThermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ); \ \ addToRunTimeSelectionTable \ ( \ CThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ + MixtureThermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ) -#define makeReactionMixtureThermo(CThermo,MixtureThermo,Mixture,ThermoPhys) \ +#define makeReactionMixtureThermo(BaseThermo,CThermo,MixtureThermo,Mixture,ThermoPhys) \ \ typedef MixtureThermo<Mixture<ThermoPhys> > \ MixtureThermo##Mixture##ThermoPhys; \ @@ -85,7 +83,7 @@ defineTemplateTypeNameAndDebugWithName \ \ addToRunTimeSelectionTable \ ( \ - basicRhoThermo, \ + BaseThermo, \ MixtureThermo##Mixture##ThermoPhys, \ fvMesh \ ); \ diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C similarity index 74% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.C rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C index dcfeb276419118d282b46cc28f1a16ce536554df..41843bce5671aa00846bb1d1ba85eeb637177ad9 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C @@ -23,43 +23,28 @@ License \*---------------------------------------------------------------------------*/ -#include "hReactionThermo.H" +#include "rhoReactionThermo.H" #include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(hReactionThermo, 0); - defineRunTimeSelectionTable(hReactionThermo, fvMesh); + defineTypeNameAndDebug(rhoReactionThermo, 0); + defineRunTimeSelectionTable(rhoReactionThermo, fvMesh); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::hReactionThermo::hReactionThermo(const fvMesh& mesh) +Foam::rhoReactionThermo::rhoReactionThermo(const fvMesh& mesh) : - basicRhoThermo(mesh), - - h_ - ( - IOobject - ( - "h", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimensionSet(0, 2, -2, 0, 0), - this->hBoundaryTypes() - ) + rhoThermo(mesh) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::hReactionThermo::~hReactionThermo() +Foam::rhoReactionThermo::~rhoReactionThermo() {} diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.H b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.H similarity index 71% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.H rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.H index 55922494a16d8e7552525760fabafb7a09dc6e18..a1c055c5d6c200c8252ad31006f6190897794201 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.H +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.H @@ -22,20 +22,20 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::hCombustionThermo + Foam::rhoReactionThermo Description - Foam::hCombustionThermo + Foam::rhoReactionThermo SourceFiles - hCombustionThermo.C + rhoReactionThermo.C \*---------------------------------------------------------------------------*/ -#ifndef hCombustionThermo_H -#define hCombustionThermo_H +#ifndef rhoReactionThermo_H +#define rhoReactionThermo_H -#include "basicPsiThermo.H" +#include "rhoThermo.H" #include "basicMultiComponentMixture.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" @@ -46,33 +46,25 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hCombustionThermo Declaration + Class rhoReactionThermo Declaration \*---------------------------------------------------------------------------*/ -class hCombustionThermo +class rhoReactionThermo : - public basicPsiThermo + public rhoThermo { -protected: - - // Protected data - - //- Enthalpy field - volScalarField h_; - - public: //- Runtime type information - TypeName("hCombustionThermo"); + TypeName("rhoReactionThermo"); //- Declare run-time constructor selection tables declareRunTimeSelectionTable ( autoPtr, - hCombustionThermo, + rhoReactionThermo, fvMesh, (const fvMesh& mesh), (mesh) @@ -82,16 +74,16 @@ public: // Constructors //- Construct from dictionary and mesh - hCombustionThermo(const fvMesh&); + rhoReactionThermo(const fvMesh&); // Selectors //- Standard selection based on fvMesh - static autoPtr<hCombustionThermo> New(const fvMesh&); + static autoPtr<rhoReactionThermo> New(const fvMesh&); //- Select and check that package contains 'thermoType' - static autoPtr<hCombustionThermo> NewType + static autoPtr<rhoReactionThermo> NewType ( const fvMesh&, const word& thermoType @@ -99,7 +91,7 @@ public: //- Destructor - virtual ~hCombustionThermo(); + virtual ~rhoReactionThermo(); // Member functions @@ -109,26 +101,6 @@ public: //- Return the composition of the multi-component mixture virtual const basicMultiComponentMixture& composition() const = 0; - - - // Access to thermodynamic state variables - - //- Enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& h() - { - return h_; - } - - //- Enthalpy [J/kg] - virtual const volScalarField& h() const - { - return h_; - } - - - //- Update properties - virtual void correct() = 0; }; diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermoNew.C similarity index 85% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermoNew.C index aeaca42966326653084dae7a1546e8a50d3f6da4..aaac229a0d75a16890001f040c9f224e61459e04 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermoNew.C @@ -23,12 +23,12 @@ License \*---------------------------------------------------------------------------*/ -#include "hReactionThermo.H" +#include "rhoReactionThermo.H" #include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr<Foam::hReactionThermo> Foam::hReactionThermo::New +Foam::autoPtr<Foam::rhoReactionThermo> Foam::rhoReactionThermo::New ( const fvMesh& mesh ) @@ -58,19 +58,19 @@ Foam::autoPtr<Foam::hReactionThermo> Foam::hReactionThermo::New if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hReactionThermo::New(const fvMesh&)") - << "Unknown hReactionThermo type " + FatalErrorIn("rhoReactionThermo::New(const fvMesh&)") + << "Unknown rhoReactionThermo type " << modelType << nl << nl - << "Valid hReactionThermo types:" << nl + << "Valid rhoReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr<hReactionThermo>(cstrIter()(mesh)); + return autoPtr<rhoReactionThermo>(cstrIter()(mesh)); } -Foam::autoPtr<Foam::hReactionThermo> Foam::hReactionThermo::NewType +Foam::autoPtr<Foam::rhoReactionThermo> Foam::rhoReactionThermo::NewType ( const fvMesh& mesh, const word& thermoType @@ -108,7 +108,7 @@ Foam::autoPtr<Foam::hReactionThermo> Foam::hReactionThermo::NewType FatalErrorIn ( - "autoPtr<hReactionThermo> hReactionThermo::NewType" + "autoPtr<rhoReactionThermo> rhoReactionThermo::NewType" "(" "const fvMesh&, " "const word&" @@ -129,19 +129,19 @@ Foam::autoPtr<Foam::hReactionThermo> Foam::hReactionThermo::NewType { FatalErrorIn ( - "autoPtr<hReactionThermo> hReactionThermo::NewType" + "autoPtr<rhoReactionThermo> rhoReactionThermo::NewType" "(" "const fvMesh&, " "const word&" ")" - ) << "Unknown hReactionThermo type " + ) << "Unknown rhoReactionThermo type " << modelType << nl << nl - << "Valid hReactionThermo types:" << nl + << "Valid rhoReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr<hReactionThermo>(cstrIter()(mesh)); + return autoPtr<rhoReactionThermo>(cstrIter()(mesh)); } diff --git a/src/thermophysicalModels/solid/reaction/reactions/makeSolidReactionThermo.H b/src/thermophysicalModels/solid/reaction/reactions/makeSolidReactionThermo.H index 33a5b15f03d1b37a031399c85a52597ba23896cd..40ffd2c637fca959b43d7f361f152e220a4a0867 100644 --- a/src/thermophysicalModels/solid/reaction/reactions/makeSolidReactionThermo.H +++ b/src/thermophysicalModels/solid/reaction/reactions/makeSolidReactionThermo.H @@ -29,8 +29,8 @@ Description \*---------------------------------------------------------------------------*/ -#ifndef makeReactionThermo_H -#define makeReactionThermo_H +#ifndef makeSolidReactionThermo_H +#define makeSolidReactionThermo_H #include "solidReaction.H" #include "IrreversibleSolidReaction.H" diff --git a/src/thermophysicalModels/specie/Make/files b/src/thermophysicalModels/specie/Make/files index 29d3c029ef1064f59070bcb8fd00a3811e11f9de..87d6a0380f9580dbdf6bb19cfe1f4dc853cf2041 100644 --- a/src/thermophysicalModels/specie/Make/files +++ b/src/thermophysicalModels/specie/Make/files @@ -7,7 +7,7 @@ $(atomicWeights)/atomicWeights.C $(specie)/specie.C $(equationOfState)/perfectGas/perfectGas.C $(equationOfState)/incompressible/incompressible.C -$(equationOfState)/pressurePerfectGas/pressurePerfectGas.C +$(equationOfState)/isobaricPerfectGas/isobaricPerfectGas.C $(reactions)/makeChemkinReactions.C $(reactions)/makeReactionThermoReactions.C $(reactions)/makeLangmuirHinshelwoodReactions.C diff --git a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.C b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.C similarity index 82% rename from src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.C rename to src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.C index 4a58751472d87e11a5ee2d1c55eb45eec5ad354e..314dafd86c158ea7d49acc1c35a369e071fdaaf9 100644 --- a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.C +++ b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.C @@ -23,21 +23,21 @@ License \*---------------------------------------------------------------------------*/ -#include "pressurePerfectGas.H" +#include "isobaricPerfectGas.H" #include "IOstreams.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::pressurePerfectGas::pressurePerfectGas(Istream& is) +Foam::isobaricPerfectGas::isobaricPerfectGas(Istream& is) : specie(is), pRef_(readScalar(is)) { - is.check("pressurePerfectGas::pressurePerfectGas(Istream& is)"); + is.check("isobaricPerfectGas::isobaricPerfectGas(Istream& is)"); } -Foam::pressurePerfectGas::pressurePerfectGas(const dictionary& dict) +Foam::isobaricPerfectGas::isobaricPerfectGas(const dictionary& dict) : specie(dict), pRef_(readScalar(dict.subDict("equationOfState").lookup("pRef"))) @@ -46,7 +46,7 @@ Foam::pressurePerfectGas::pressurePerfectGas(const dictionary& dict) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::pressurePerfectGas::write(Ostream& os) const +void Foam::isobaricPerfectGas::write(Ostream& os) const { specie::write(os); dictionary dict("equationOfState"); @@ -58,12 +58,12 @@ void Foam::pressurePerfectGas::write(Ostream& os) const // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // -Foam::Ostream& Foam::operator<<(Ostream& os, const pressurePerfectGas& pg) +Foam::Ostream& Foam::operator<<(Ostream& os, const isobaricPerfectGas& pg) { os << static_cast<const specie&>(pg) << token::SPACE << pg.pRef_; - os.check("Ostream& operator<<(Ostream& os, const pressurePerfectGas& st)"); + os.check("Ostream& operator<<(Ostream& os, const isobaricPerfectGas& st)"); return os; } diff --git a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.H b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.H similarity index 67% rename from src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.H rename to src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.H index 40f4938568cbb39ef55cd19b770cd48f04146243..310d72f0ab86f1d17f52b2d684dea2e39e0bce72 100644 --- a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.H +++ b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.H @@ -22,19 +22,20 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::pressurePerfectGas + Foam::isobaricPerfectGas Description - Perfect gas equation of state usign a reference pressure + Perfect gas equation of state using a reference pressure + rather than the local pressure. SourceFiles - pressurePerfectGasI.H - pressurePerfectGas.C + isobaricPerfectGasI.H + isobaricPerfectGas.C \*---------------------------------------------------------------------------*/ -#ifndef pressurePerfectGas_H -#define pressurePerfectGas_H +#ifndef isobaricPerfectGas_H +#define isobaricPerfectGas_H #include "specie.H" #include "autoPtr.H" @@ -45,10 +46,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class pressurePerfectGas Declaration + Class isobaricPerfectGas Declaration \*---------------------------------------------------------------------------*/ -class pressurePerfectGas +class isobaricPerfectGas : public specie { @@ -63,25 +64,25 @@ public: // Constructors //- Construct from components - inline pressurePerfectGas(const specie& sp); + inline isobaricPerfectGas(const specie& sp); //- Construct from Istream - pressurePerfectGas(Istream&); + isobaricPerfectGas(Istream&); //- Construct from dictionary - pressurePerfectGas(const dictionary& dict); + isobaricPerfectGas(const dictionary& dict); //- Construct as named copy - inline pressurePerfectGas(const word& name, const pressurePerfectGas&); + inline isobaricPerfectGas(const word& name, const isobaricPerfectGas&); //- Construct and return a clone - inline autoPtr<pressurePerfectGas> clone() const; + inline autoPtr<isobaricPerfectGas> clone() const; // Selector from Istream - inline static autoPtr<pressurePerfectGas> New(Istream& is); + inline static autoPtr<isobaricPerfectGas> New(Istream& is); // Selector from dictionary - inline static autoPtr<pressurePerfectGas> New(const dictionary& dict); + inline static autoPtr<isobaricPerfectGas> New(const dictionary& dict); // Member functions @@ -106,42 +107,42 @@ public: // Member operators - inline void operator+=(const pressurePerfectGas&); - inline void operator-=(const pressurePerfectGas&); + inline void operator+=(const isobaricPerfectGas&); + inline void operator-=(const isobaricPerfectGas&); inline void operator*=(const scalar); // Friend operators - inline friend pressurePerfectGas operator+ + inline friend isobaricPerfectGas operator+ ( - const pressurePerfectGas&, - const pressurePerfectGas& + const isobaricPerfectGas&, + const isobaricPerfectGas& ); - inline friend pressurePerfectGas operator- + inline friend isobaricPerfectGas operator- ( - const pressurePerfectGas&, - const pressurePerfectGas& + const isobaricPerfectGas&, + const isobaricPerfectGas& ); - inline friend pressurePerfectGas operator* + inline friend isobaricPerfectGas operator* ( const scalar s, - const pressurePerfectGas& + const isobaricPerfectGas& ); - inline friend pressurePerfectGas operator== + inline friend isobaricPerfectGas operator== ( - const pressurePerfectGas&, - const pressurePerfectGas& + const isobaricPerfectGas&, + const isobaricPerfectGas& ); // Ostream Operator - friend Ostream& operator<<(Ostream&, const pressurePerfectGas&); + friend Ostream& operator<<(Ostream&, const isobaricPerfectGas&); }; @@ -151,7 +152,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "pressurePerfectGasI.H" +#include "isobaricPerfectGasI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGasI.H b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGasI.H similarity index 61% rename from src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGasI.H rename to src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGasI.H index 99512ecaeef53ba1cba8f732fe038fe48f149a6a..915ef8ab305f2fd1851e06bdc63cdb6aa2693fee 100644 --- a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGasI.H @@ -23,11 +23,11 @@ License \*---------------------------------------------------------------------------*/ -#include "pressurePerfectGas.H" +#include "isobaricPerfectGas.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -inline Foam::pressurePerfectGas::pressurePerfectGas(const specie& sp) +inline Foam::isobaricPerfectGas::isobaricPerfectGas(const specie& sp) : specie(sp) {} @@ -35,56 +35,56 @@ inline Foam::pressurePerfectGas::pressurePerfectGas(const specie& sp) // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -inline Foam::pressurePerfectGas::pressurePerfectGas +inline Foam::isobaricPerfectGas::isobaricPerfectGas ( const word& name, - const pressurePerfectGas& pg + const isobaricPerfectGas& pg ) : specie(name, pg) {} -inline Foam::autoPtr<Foam::pressurePerfectGas> Foam::pressurePerfectGas:: +inline Foam::autoPtr<Foam::isobaricPerfectGas> Foam::isobaricPerfectGas:: clone() const { - return autoPtr<pressurePerfectGas>(new pressurePerfectGas(*this)); + return autoPtr<isobaricPerfectGas>(new isobaricPerfectGas(*this)); } -inline Foam::autoPtr<Foam::pressurePerfectGas> Foam::pressurePerfectGas::New +inline Foam::autoPtr<Foam::isobaricPerfectGas> Foam::isobaricPerfectGas::New ( Istream& is ) { - return autoPtr<pressurePerfectGas>(new pressurePerfectGas(is)); + return autoPtr<isobaricPerfectGas>(new isobaricPerfectGas(is)); } -inline Foam::autoPtr<Foam::pressurePerfectGas> Foam::pressurePerfectGas::New +inline Foam::autoPtr<Foam::isobaricPerfectGas> Foam::isobaricPerfectGas::New ( const dictionary& dict ) { - return autoPtr<pressurePerfectGas>(new pressurePerfectGas(dict)); + return autoPtr<isobaricPerfectGas>(new isobaricPerfectGas(dict)); } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::scalar Foam::pressurePerfectGas::rho(scalar p, scalar T) const +inline Foam::scalar Foam::isobaricPerfectGas::rho(scalar p, scalar T) const { return pRef_/(R()*T); } -inline Foam::scalar Foam::pressurePerfectGas::psi(scalar, scalar T) const +inline Foam::scalar Foam::isobaricPerfectGas::psi(scalar, scalar T) const { return 0.0; } -inline Foam::scalar Foam::pressurePerfectGas::Z(scalar, scalar) const +inline Foam::scalar Foam::isobaricPerfectGas::Z(scalar, scalar) const { return 0.0; } @@ -92,19 +92,19 @@ inline Foam::scalar Foam::pressurePerfectGas::Z(scalar, scalar) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void Foam::pressurePerfectGas::operator+=(const pressurePerfectGas& pg) +inline void Foam::isobaricPerfectGas::operator+=(const isobaricPerfectGas& pg) { specie::operator+=(pg); } -inline void Foam::pressurePerfectGas::operator-=(const pressurePerfectGas& pg) +inline void Foam::isobaricPerfectGas::operator-=(const isobaricPerfectGas& pg) { specie::operator-=(pg); } -inline void Foam::pressurePerfectGas::operator*=(const scalar s) +inline void Foam::isobaricPerfectGas::operator*=(const scalar s) { specie::operator*=(s); } @@ -112,13 +112,13 @@ inline void Foam::pressurePerfectGas::operator*=(const scalar s) // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // -inline Foam::pressurePerfectGas Foam::operator+ +inline Foam::isobaricPerfectGas Foam::operator+ ( - const pressurePerfectGas& pg1, - const pressurePerfectGas& pg2 + const isobaricPerfectGas& pg1, + const isobaricPerfectGas& pg2 ) { - return pressurePerfectGas + return isobaricPerfectGas ( static_cast<const specie&>(pg1) + static_cast<const specie&>(pg2) @@ -126,13 +126,13 @@ inline Foam::pressurePerfectGas Foam::operator+ } -inline Foam::pressurePerfectGas Foam::operator- +inline Foam::isobaricPerfectGas Foam::operator- ( - const pressurePerfectGas& pg1, - const pressurePerfectGas& pg2 + const isobaricPerfectGas& pg1, + const isobaricPerfectGas& pg2 ) { - return pressurePerfectGas + return isobaricPerfectGas ( static_cast<const specie&>(pg1) - static_cast<const specie&>(pg2) @@ -140,20 +140,20 @@ inline Foam::pressurePerfectGas Foam::operator- } -inline Foam::pressurePerfectGas Foam::operator* +inline Foam::isobaricPerfectGas Foam::operator* ( const scalar s, - const pressurePerfectGas& pg + const isobaricPerfectGas& pg ) { - return pressurePerfectGas(s*static_cast<const specie&>(pg)); + return isobaricPerfectGas(s*static_cast<const specie&>(pg)); } -inline Foam::pressurePerfectGas Foam::operator== +inline Foam::isobaricPerfectGas Foam::operator== ( - const pressurePerfectGas& pg1, - const pressurePerfectGas& pg2 + const isobaricPerfectGas& pg1, + const isobaricPerfectGas& pg2 ) { return pg2 - pg1; diff --git a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H index 40133fda71b8fcbbc3b344a3346c832b8ada1771..6fd8c75c820e8775f42d7554f232b69b976173ae 100644 --- a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H +++ b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H @@ -35,6 +35,7 @@ Description #include "perfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "sensibleEnthalpy.H" #include "specieThermo.H" #include "sutherlandTransport.H" #include "constTransport.H" @@ -47,13 +48,36 @@ Description namespace Foam { - typedef sutherlandTransport<specieThermo<janafThermo<perfectGas> > > + typedef + sutherlandTransport + < + specieThermo + < + janafThermo + < + perfectGas + >, + sensibleEnthalpy + > + > gasThermoPhysics; - typedef constTransport<specieThermo<hConstThermo<perfectGas> > > + typedef + constTransport + < + specieThermo + < + hConstThermo + < + perfectGas + >, + sensibleEnthalpy + > + > constGasThermoPhysics; - typedef polynomialTransport + typedef + polynomialTransport < specieThermo < @@ -61,7 +85,8 @@ namespace Foam < icoPolynomial<8>, 8 - > + >, + sensibleEnthalpy >, 8 > @@ -73,4 +98,3 @@ namespace Foam #endif // ************************************************************************* // - diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C index d9ccc0f786dd10545179a1fd2a685020e4029acf..8275d3e556cf95261d529ba151c9fcc933346f3e 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "reactionTypes.H" -#include "makeReactionThermo.H" +#include "makeReaction.H" #include "ArrheniusReactionRate.H" #include "infiniteReactionRate.H" diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C index 00b6f14f24c6de98eb3c36d50fe05621a9ea44b2..4f185bda1763f1797ee93da87a83bfa3e5c0cafc 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "makeReactionThermo.H" +#include "makeReaction.H" #include "reactionTypes.H" #include "LangmuirHinshelwoodReactionRate.H" diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermo.H b/src/thermophysicalModels/specie/reaction/reactions/makeReaction.H similarity index 99% rename from src/thermophysicalModels/specie/reaction/reactions/makeReactionThermo.H rename to src/thermophysicalModels/specie/reaction/reactions/makeReaction.H index 5f318a8b444e65d5a58c8d4a87e90e247e8a5716..de0f747f762944b1e8c31b7fc9560e3919be162c 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermo.H +++ b/src/thermophysicalModels/specie/reaction/reactions/makeReaction.H @@ -22,15 +22,15 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - Foam::makeReactionThermo + Foam::makeReaction Description Macros for instantiating reactions on given thermo packages \*---------------------------------------------------------------------------*/ -#ifndef makeReactionThermo_H -#define makeReactionThermo_H +#ifndef makeReaction_H +#define makeReaction_H #include "Reaction.H" diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C index 690f53592e55840cfabb0ea1ce647115f2381762..bd8930bad02d974fc9b854df232f8fb6adedb89e 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "reactionTypes.H" -#include "makeReactionThermo.H" +#include "makeReaction.H" #include "ArrheniusReactionRate.H" #include "infiniteReactionRate.H" diff --git a/src/thermophysicalModels/specie/thermo/absoluteEnthalpy/absoluteEnthalpy.H b/src/thermophysicalModels/specie/thermo/absoluteEnthalpy/absoluteEnthalpy.H new file mode 100644 index 0000000000000000000000000000000000000000..87da23398fd941113a1a3b477f437f9a7583e7a4 --- /dev/null +++ b/src/thermophysicalModels/specie/thermo/absoluteEnthalpy/absoluteEnthalpy.H @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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/>. + +Class + Foam::absoluteEnthalpy + +Description + Thermodynamics mapping class to expose the absolute enthalpy function + as the standard enthalpy function h(T). + +\*---------------------------------------------------------------------------*/ + +#ifndef absoluteEnthalpy_H +#define absoluteEnthalpy_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class absoluteEnthalpy Declaration +\*---------------------------------------------------------------------------*/ + +template<class Thermo> +class absoluteEnthalpy +{ + +public: + + // Constructors + + //- Construct + absoluteEnthalpy() + {} + + + // Member Functions + + // Fundamental properties + + static word name() + { + return "ha"; + } + + // Absolute enthalpy [J/kmol] + scalar he(const Thermo& thermo, const scalar T) const + { + return thermo.ha(T); + } + + // Heat capacity at constant pressure [J/(kmol K)] + scalar cpv(const Thermo& thermo, const scalar T) const + { + return thermo.cp(T); + } + + //- cp/cp [] + scalar cpBycpv(const Thermo& thermo, const scalar T) const + { + return 1; + } + + // Absolute enthalpy [J/kg] + scalar HE(const Thermo& thermo, const scalar T) const + { + return thermo.Ha(T); + } + + //- Temperature from absolute enthalpy + // given an initial temperature T0 + scalar THE(const Thermo& thermo, const scalar h, const scalar T0) + const + { + return thermo.THa(h, T0); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H index bd8bdb4573861e3ab11e200046c09830ba2ad06e..60c818c2932097d3cb3adccaab1c2f4a176c84f5 100644 --- a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H +++ b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H @@ -143,8 +143,8 @@ public: //- Heat capacity at constant pressure [J/(kmol K)] inline scalar cp(const scalar T) const; - //- Enthalpy [J/kmol] - inline scalar h(const scalar T) const; + //- Absolute Enthalpy [J/kmol] + inline scalar ha(const scalar T) const; //- Sensible Enthalpy [J/kmol] inline scalar hs(const scalar T) const; diff --git a/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H b/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H index 31bd392b5dddb039a70898c3e7f0d23035553035..f897d72c7f06e8848d05f2e1bd1ade598bdcb0a6 100644 --- a/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H +++ b/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H @@ -110,7 +110,7 @@ inline Foam::scalar Foam::eConstThermo<EquationOfState>::cp template<class EquationOfState> -inline Foam::scalar Foam::eConstThermo<EquationOfState>::h +inline Foam::scalar Foam::eConstThermo<EquationOfState>::ha ( const scalar T ) const diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H index 9a8352a064d6a9cd5e273a0dace17eac8f90c873..986a52822f3d707fa6609fbf90c753e586dc78ed 100644 --- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H +++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H @@ -141,8 +141,8 @@ public: //- Heat capacity at constant pressure [J/(kmol K)] inline scalar cp(const scalar T) const; - //- Enthalpy [J/kmol] - inline scalar h(const scalar T) const; + //- Absolute Enthalpy [J/kmol] + inline scalar ha(const scalar T) const; //- Sensible enthalpy [J/kmol] inline scalar hs(const scalar T) const; diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H b/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H index 0a4a35358cd345acc270a48b24567c0e9b390e88..6b76f93fb59e5a8e34736f1fd4dd2b817f8506a9 100644 --- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H @@ -110,7 +110,7 @@ inline Foam::scalar Foam::hConstThermo<equationOfState>::cp template<class equationOfState> -inline Foam::scalar Foam::hConstThermo<equationOfState>::h +inline Foam::scalar Foam::hConstThermo<equationOfState>::ha ( const scalar T ) const diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H index 31954a4a567604d40a35771f7476c4c8cd012b62..fec38b8a89af97584b465e1ec00a84620ec5dbae 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H @@ -159,8 +159,8 @@ public: //- Heat capacity at constant pressure [J/(kmol K)] inline scalar cp(const scalar T) const; - //- Enthalpy [J/kmol] - inline scalar h(const scalar T) const; + //- Absolute Enthalpy [J/kmol] + inline scalar ha(const scalar T) const; //- Sensible enthalpy [J/kmol] inline scalar hs(const scalar T) const; diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H index a164392c6171d374074deaad5a371ff91edf475e..c1eeff998e812ef5741d59e61f7bd10f38e1fee8 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H @@ -103,7 +103,7 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::cp template<class EquationOfState, int PolySize> -inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::h +inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::ha ( const scalar T ) const @@ -118,7 +118,7 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::hs const scalar T ) const { - return h(T) - hc(); + return ha(T) - hc(); } diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H index 784a31baa8e939e8253d2ccaf7c86ba9b5edfa72..30597fdeb77a555c14bd8ec823c6e1a2155f45bf 100644 --- a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H +++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H @@ -177,8 +177,8 @@ public: //- Heat capacity at constant pressure [J/(kmol K)] inline scalar cp(const scalar T) const; - //- Enthalpy [J/kmol] - inline scalar h(const scalar T) const; + //- Absolute Enthalpy [J/kmol] + inline scalar ha(const scalar T) const; //- Sensible enthalpy [J/kmol] inline scalar hs(const scalar T) const; diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H index 4e0a5b4ff23fdae42522c1555ffd4d7775f8e671..f8ef91fdb3556a82b5991b9a079bce634447fbe4 100644 --- a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H +++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H @@ -168,7 +168,7 @@ inline Foam::scalar Foam::janafThermo<EquationOfState>::cp template<class EquationOfState> -inline Foam::scalar Foam::janafThermo<EquationOfState>::h +inline Foam::scalar Foam::janafThermo<EquationOfState>::ha ( const scalar T ) const @@ -188,7 +188,7 @@ inline Foam::scalar Foam::janafThermo<EquationOfState>::hs const scalar T ) const { - return h(T) - hc(); + return ha(T) - hc(); } diff --git a/src/thermophysicalModels/specie/thermo/sensibleEnthalpy/sensibleEnthalpy.H b/src/thermophysicalModels/specie/thermo/sensibleEnthalpy/sensibleEnthalpy.H new file mode 100644 index 0000000000000000000000000000000000000000..88c2e486ecbd9e9e1b02f9324085ec49431c430d --- /dev/null +++ b/src/thermophysicalModels/specie/thermo/sensibleEnthalpy/sensibleEnthalpy.H @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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/>. + +Class + Foam::sensibleEnthalpy + +Description + Thermodynamics mapping class to expose the sensible enthalpy function + as the standard enthalpy function h(T). + +\*---------------------------------------------------------------------------*/ + +#ifndef sensibleEnthalpy_H +#define sensibleEnthalpy_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class sensibleEnthalpy Declaration +\*---------------------------------------------------------------------------*/ + +template<class Thermo> +class sensibleEnthalpy +{ + +public: + + // Constructors + + //- Construct + sensibleEnthalpy() + {} + + + // Member Functions + + // Fundamental properties + + static word name() + { + return "h"; + } + + // Sensible enthalpy [J/kmol] + scalar he(const Thermo& thermo, const scalar T) const + { + return thermo.hs(T); + } + + // Heat capacity at constant pressure [J/(kmol K)] + scalar cpv(const Thermo& thermo, const scalar T) const + { + return thermo.cp(T); + } + + //- cp/cp [] + scalar cpBycpv(const Thermo& thermo, const scalar T) const + { + return 1; + } + + // Sensible enthalpy [J/kg] + scalar HE(const Thermo& thermo, const scalar T) const + { + return thermo.Hs(T); + } + + //- Temperature from sensible enthalpy + // given an initial temperature T0 + scalar THE(const Thermo& thermo, const scalar h, const scalar T0) + const + { + return thermo.THs(h, T0); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/thermo/sensibleInternalEnergy/sensibleInternalEnergy.H b/src/thermophysicalModels/specie/thermo/sensibleInternalEnergy/sensibleInternalEnergy.H new file mode 100644 index 0000000000000000000000000000000000000000..2f33244b44245ed1309fbce4a79436c110e5a94f --- /dev/null +++ b/src/thermophysicalModels/specie/thermo/sensibleInternalEnergy/sensibleInternalEnergy.H @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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/>. + +Class + Foam::sensibleInternalEnergy + +Description + Thermodynamics mapping class to expose the sensible internal energy function + as the standard internal energy function e(T). + +\*---------------------------------------------------------------------------*/ + +#ifndef sensibleInternalEnergy_H +#define sensibleInternalEnergy_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class sensibleInternalEnergy Declaration +\*---------------------------------------------------------------------------*/ + +template<class Thermo> +class sensibleInternalEnergy +{ + +public: + + // Constructors + + //- Construct + sensibleInternalEnergy() + {} + + + // Member Functions + + // Fundamental properties + + static word name() + { + return "e"; + } + + //- Sensible Internal energy [J/kmol] + scalar he(const Thermo& thermo, const scalar T) const + { + return thermo.es(T); + } + + //- Heat capacity at constant volume [J/(kmol K)] + scalar cpv(const Thermo& thermo, const scalar T) const + { + return thermo.cv(T); + } + + //- cp/cv [] + scalar cpBycpv(const Thermo& thermo, const scalar T) const + { + return thermo.gamma(T); + } + + //- Sensible enthalpy [J/kg] + scalar HE(const Thermo& thermo, const scalar T) const + { + return thermo.Es(T); + } + + //- Temperature from sensible internal energy + // given an initial temperature T0 + scalar THE(const Thermo& thermo, const scalar e, const scalar T0) + const + { + return thermo.TEs(e, T0); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.C b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.C index 6b958a6ceb5f803175b2217b180230aa6e577d38..a348bc09d5219a7ca68c833fe62ffa2ea5263dd1 100644 --- a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.C +++ b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.C @@ -28,26 +28,26 @@ License /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ -template<class Thermo> -const Foam::scalar Foam::specieThermo<Thermo>::tol_ = 1.0e-4; +template<class Thermo, template<class> class Type> +const Foam::scalar Foam::specieThermo<Thermo, Type>::tol_ = 1.0e-4; -template<class Thermo> -const int Foam::specieThermo<Thermo>::maxIter_ = 100; +template<class Thermo, template<class> class Type> +const int Foam::specieThermo<Thermo, Type>::maxIter_ = 100; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class Thermo> -Foam::specieThermo<Thermo>::specieThermo(Istream& is) +template<class Thermo, template<class> class Type> +Foam::specieThermo<Thermo, Type>::specieThermo(Istream& is) : Thermo(is) { - is.check("specieThermo<Thermo>::specieThermo(Istream&)"); + is.check("specieThermo<Thermo, Type>::specieThermo(Istream&)"); } -template<class Thermo> -Foam::specieThermo<Thermo>::specieThermo(const dictionary& dict) +template<class Thermo, template<class> class Type> +Foam::specieThermo<Thermo, Type>::specieThermo(const dictionary& dict) : Thermo(dict) {} @@ -55,8 +55,8 @@ Foam::specieThermo<Thermo>::specieThermo(const dictionary& dict) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template<class Thermo> -void Foam::specieThermo<Thermo>::write(Ostream& os) const +template<class Thermo, template<class> class Type> +void Foam::specieThermo<Thermo, Type>::write(Ostream& os) const { Thermo::write(os); } @@ -64,8 +64,11 @@ void Foam::specieThermo<Thermo>::write(Ostream& os) const // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // -template<class Thermo> -Foam::Ostream& Foam::operator<<(Ostream& os, const specieThermo<Thermo>& st) +template<class Thermo, template<class> class Type> +Foam::Ostream& Foam::operator<< +( + Ostream& os, const specieThermo<Thermo, Type>& st +) { os << static_cast<const Thermo&>(st); diff --git a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H index 93268b9e6b4b314d789cf677f86d179f466f101b..5a3eb6f7474aa0aa72021bdafd12e267404681ed 100644 --- a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H +++ b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H @@ -45,41 +45,41 @@ namespace Foam // Forward declaration of friend functions and operators -template<class Thermo> class specieThermo; +template<class Thermo, template<class> class Type> class specieThermo; -template<class Thermo> -inline specieThermo<Thermo> operator+ +template<class Thermo, template<class> class Type> +inline specieThermo<Thermo, Type> operator+ ( - const specieThermo<Thermo>&, - const specieThermo<Thermo>& + const specieThermo<Thermo, Type>&, + const specieThermo<Thermo, Type>& ); -template<class Thermo> -inline specieThermo<Thermo> operator- +template<class Thermo, template<class> class Type> +inline specieThermo<Thermo, Type> operator- ( - const specieThermo<Thermo>&, - const specieThermo<Thermo>& + const specieThermo<Thermo, Type>&, + const specieThermo<Thermo, Type>& ); -template<class Thermo> -inline specieThermo<Thermo> operator* +template<class Thermo, template<class> class Type> +inline specieThermo<Thermo, Type> operator* ( const scalar, - const specieThermo<Thermo>& + const specieThermo<Thermo, Type>& ); -template<class Thermo> -inline specieThermo<Thermo> operator== +template<class Thermo, template<class> class Type> +inline specieThermo<Thermo, Type> operator== ( - const specieThermo<Thermo>&, - const specieThermo<Thermo>& + const specieThermo<Thermo, Type>&, + const specieThermo<Thermo, Type>& ); -template<class Thermo> +template<class Thermo, template<class> class Type> Ostream& operator<< ( Ostream&, - const specieThermo<Thermo>& + const specieThermo<Thermo, Type>& ); @@ -87,10 +87,11 @@ Ostream& operator<< Class specieThermo Declaration \*---------------------------------------------------------------------------*/ -template<class Thermo> +template<class Thermo, template<class> class Type> class specieThermo : - public Thermo + public Thermo, + public Type<specieThermo<Thermo, Type> > { // Private data @@ -140,8 +141,8 @@ public: // Heat capacity at constant pressure [J/(kmol K)] // scalar cp(const scalar) const; - // Enthalpy [J/kmol] - // scalar h(const scalar) const; + // Absolute Enthalpy [J/kmol] + // scalar ha(const scalar) const; // Sensible enthalpy [J/kmol] // scalar hs(const scalar) const; @@ -158,18 +159,31 @@ public: // Mole specific properties + //- Name of Enthalpy/Internal energy + static inline word heName(); + + //- Enthalpy/Internal energy [J/kmol] + inline scalar he(const scalar T) const; + //- Heat capacity at constant volume [J/(kmol K)] inline scalar cv(const scalar T) const; + //- Heat capacity at constant pressure/volume [J/(kmol K)] + inline scalar cpv(const scalar T) const; + //- gamma = cp/cv [] inline scalar gamma(const scalar T) const; - //- Internal energy [J/kmol] - inline scalar e(const scalar T) const; + //- Ratio of heat capacity at constant pressure to that at + // constant pressure/volume [] + inline scalar cpBycpv(const scalar T) const; //- Sensible internal energy [J/kmol] inline scalar es(const scalar T) const; + //- Absolute internal energy [J/kmol] + inline scalar ea(const scalar T) const; + //- Gibbs free energy [J/kmol] inline scalar g(const scalar T) const; @@ -185,6 +199,12 @@ public: //- Heat capacity at constant volume [J/(kg K)] inline scalar Cv(const scalar T) const; + //- Heat capacity at constant pressure/volume [J/(kg K)] + inline scalar Cpv(const scalar T) const; + + //- Enthalpy/Internal energy [J/kg] + inline scalar HE(const scalar T) const; + //- Enthalpy [J/kg] inline scalar H(const scalar T) const; @@ -194,12 +214,21 @@ public: //- Chemical enthalpy [J/kg] inline scalar Hc() const; + //- Absolute Enthalpy [J/kg] + inline scalar Ha(const scalar T) const; + //- Entropy [J/(kg K)] inline scalar S(const scalar T) const; //- Internal energy [J/kg] inline scalar E(const scalar T) const; + //- Sensible internal energy [J/kg] + inline scalar Es(const scalar T) const; + + //- Absolute internal energy [J/kg] + inline scalar Ea(const scalar T) const; + //- Gibbs free energy [J/kg] inline scalar G(const scalar T) const; @@ -242,14 +271,24 @@ public: // Energy->temperature inversion functions - //- Temperature from Enthalpy given an initial temperature T0 - inline scalar TH(const scalar H, const scalar T0) const; + //- Temperature from enthalpy or internal energy + // given an initial temperature T0 + inline scalar THE(const scalar H, const scalar T0) const; - //- Temperature from sensible Enthalpy given an initial T0 + //- Temperature from sensible enthalpy given an initial T0 inline scalar THs(const scalar Hs, const scalar T0) const; - //- Temperature from internal energy given an initial temperature T0 - inline scalar TE(const scalar E, const scalar T0) const; + //- Temperature from absolute enthalpy + // given an initial temperature T0 + inline scalar THa(const scalar H, const scalar T0) const; + + //- Temperature from sensible internal energy + // given an initial temperature T0 + inline scalar TEs(const scalar E, const scalar T0) const; + + //- Temperature from absolute internal energy + // given an initial temperature T0 + inline scalar TEa(const scalar E, const scalar T0) const; // I-O @@ -268,25 +307,25 @@ public: // Friend operators - friend specieThermo operator+ <Thermo> + friend specieThermo operator+ <Thermo, Type> ( const specieThermo&, const specieThermo& ); - friend specieThermo operator- <Thermo> + friend specieThermo operator- <Thermo, Type> ( const specieThermo&, const specieThermo& ); - friend specieThermo operator* <Thermo> + friend specieThermo operator* <Thermo, Type> ( const scalar s, const specieThermo& ); - friend specieThermo operator== <Thermo> + friend specieThermo operator== <Thermo, Type> ( const specieThermo&, const specieThermo& @@ -295,7 +334,7 @@ public: // Ostream Operator - friend Ostream& operator<< <Thermo> + friend Ostream& operator<< <Thermo, Type> ( Ostream&, const specieThermo& diff --git a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H index b2d2edd5c146b89a345a83754cb55e468b8f9c86..b9f95aa7b22231ec73d7ac0bb7be52e5320e60e8 100644 --- a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H +++ b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H @@ -27,8 +27,8 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -template<class Thermo> -inline Foam::specieThermo<Thermo>::specieThermo +template<class Thermo, template<class> class Type> +inline Foam::specieThermo<Thermo, Type>::specieThermo ( const Thermo& sp ) @@ -37,14 +37,14 @@ inline Foam::specieThermo<Thermo>::specieThermo {} -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::T +template<class Thermo, template<class> class Type> +inline Foam::scalar Foam::specieThermo<Thermo, Type>::T ( scalar f, scalar T0, - scalar (specieThermo<Thermo>::*F)(const scalar) const, - scalar (specieThermo<Thermo>::*dFdT)(const scalar) const, - scalar (specieThermo<Thermo>::*limit)(const scalar) const + scalar (specieThermo<Thermo, Type>::*F)(const scalar) const, + scalar (specieThermo<Thermo, Type>::*dFdT)(const scalar) const, + scalar (specieThermo<Thermo, Type>::*limit)(const scalar) const ) const { scalar Test = T0; @@ -62,9 +62,11 @@ inline Foam::scalar Foam::specieThermo<Thermo>::T { FatalErrorIn ( - "specieThermo<Thermo>::T(scalar f, scalar T0, " - "scalar (specieThermo<Thermo>::*F)(const scalar) const, " - "scalar (specieThermo<Thermo>::*dFdT)(const scalar) const" + "specieThermo<Thermo, Type>::T(scalar f, scalar T0, " + "scalar (specieThermo<Thermo, Type>::*F)" + "(const scalar) const, " + "scalar (specieThermo<Thermo, Type>::*dFdT)" + "(const scalar) const" ") const" ) << "Maximum number of iterations exceeded" << abort(FatalError); @@ -78,8 +80,8 @@ inline Foam::scalar Foam::specieThermo<Thermo>::T // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class Thermo> -inline Foam::specieThermo<Thermo>::specieThermo +template<class Thermo, template<class> class Type> +inline Foam::specieThermo<Thermo, Type>::specieThermo ( const word& name, const specieThermo& st @@ -91,114 +93,201 @@ inline Foam::specieThermo<Thermo>::specieThermo // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::cv(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::word +Foam::specieThermo<Thermo, Type>::heName() +{ + return Type<specieThermo<Thermo, Type> >::name(); +} + + +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::he(const scalar T) const +{ + return Type<specieThermo<Thermo, Type> >::he(*this, T); +} + + +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::cv(const scalar T) const { return this->cp(T) - this->RR; } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::gamma(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::cpv(const scalar T) const +{ + return Type<specieThermo<Thermo, Type> >::cpv(*this, T); +} + + +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::gamma(const scalar T) const { scalar CP = this->cp(T); return CP/(CP - this->RR); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::e(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::cpBycpv(const scalar T) const { - return this->h(T) - this->RR*(T - this->Tstd); + return Type<specieThermo<Thermo, Type> >::cpBycpv(*this, T); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::es(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::es(const scalar T) const { return this->hs(T) - this->RR*(T - this->Tstd); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::g(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::ea(const scalar T) const { - return this->h(T) - T*this->s(T); + return this->ha(T) - this->RR*(T - this->Tstd); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::a(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::g(const scalar T) const { - return this->e(T) - T*this->s(T); + return this->ha(T) - T*this->s(T); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::Cp(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::a(const scalar T) const +{ + return this->ea(T) - T*this->s(T); +} + + +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::Cpv(const scalar T) const +{ + return this->cpv(T)/this->W(); +} + + +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::Cp(const scalar T) const { return this->cp(T)/this->W(); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::Cv(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::Cv(const scalar T) const { return this->cv(T)/this->W(); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::H(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::HE(const scalar T) const +{ + return Type<specieThermo<Thermo, Type> >::HE(*this, T); +} + + +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::H(const scalar T) const { return this->h(T)/this->W(); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::Hs(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::Hs(const scalar T) const { return this->hs(T)/this->W(); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::Hc() const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::Hc() const { return this->hc()/this->W(); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::S(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::Ha(const scalar T) const +{ + return this->ha(T)/this->W(); +} + + +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::S(const scalar T) const { return this->s(T)/this->W(); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::E(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::E(const scalar T) const { return this->e(T)/this->W(); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::G(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::Es(const scalar T) const +{ + return this->es(T)/this->W(); +} + +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::Ea(const scalar T) const +{ + return this->ea(T)/this->W(); +} + + +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::G(const scalar T) const { return this->g(T)/this->W(); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::A(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::A(const scalar T) const { return this->a(T)/this->W(); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::K(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::K(const scalar T) const { scalar arg = -this->nMoles()*this->g(T)/(this->RR*T); @@ -213,15 +302,17 @@ inline Foam::scalar Foam::specieThermo<Thermo>::K(const scalar T) const } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::Kp(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::Kp(const scalar T) const { return K(T); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::Kc(const scalar T) const +template<class Thermo, template<class> class Type> +inline Foam::scalar +Foam::specieThermo<Thermo, Type>::Kc(const scalar T) const { if (equal(this->nMoles(), SMALL)) { @@ -234,8 +325,8 @@ inline Foam::scalar Foam::specieThermo<Thermo>::Kc(const scalar T) const } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::Kx +template<class Thermo, template<class> class Type> +inline Foam::scalar Foam::specieThermo<Thermo, Type>::Kx ( const scalar T, const scalar p @@ -252,8 +343,8 @@ inline Foam::scalar Foam::specieThermo<Thermo>::Kx } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::Kn +template<class Thermo, template<class> class Type> +inline Foam::scalar Foam::specieThermo<Thermo, Type>::Kn ( const scalar T, const scalar p, @@ -271,44 +362,73 @@ inline Foam::scalar Foam::specieThermo<Thermo>::Kn } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::TH +template<class Thermo, template<class> class Type> +inline Foam::scalar Foam::specieThermo<Thermo, Type>::THE +( + const scalar he, + const scalar T0 +) const +{ + return Type<specieThermo<Thermo, Type> >::THE(*this, he, T0); +} + + +template<class Thermo, template<class> class Type> +inline Foam::scalar Foam::specieThermo<Thermo, Type>::THs +( + const scalar hs, + const scalar T0 +) const +{ + return T + ( + hs, + T0, + &specieThermo<Thermo, Type>::Hs, + &specieThermo<Thermo, Type>::Cp, + &specieThermo<Thermo, Type>::limit + ); +} + + +template<class Thermo, template<class> class Type> +inline Foam::scalar Foam::specieThermo<Thermo, Type>::THa ( - const scalar h, + const scalar ht, const scalar T0 ) const { return T ( - h, + ht, T0, - &specieThermo<Thermo>::H, - &specieThermo<Thermo>::Cp, - &specieThermo<Thermo>::limit + &specieThermo<Thermo, Type>::Ha, + &specieThermo<Thermo, Type>::Cp, + &specieThermo<Thermo, Type>::limit ); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::THs +template<class Thermo, template<class> class Type> +inline Foam::scalar Foam::specieThermo<Thermo, Type>::TEs ( - const scalar hs, + const scalar es, const scalar T0 ) const { return T ( - hs, + es, T0, - &specieThermo<Thermo>::Hs, - &specieThermo<Thermo>::Cp, - &specieThermo<Thermo>::limit + &specieThermo<Thermo, Type>::Es, + &specieThermo<Thermo, Type>::Cv, + &specieThermo<Thermo, Type>::limit ); } -template<class Thermo> -inline Foam::scalar Foam::specieThermo<Thermo>::TE +template<class Thermo, template<class> class Type> +inline Foam::scalar Foam::specieThermo<Thermo, Type>::TEa ( const scalar e, const scalar T0 @@ -316,39 +436,39 @@ inline Foam::scalar Foam::specieThermo<Thermo>::TE { return T ( - e, + ea, T0, - &specieThermo<Thermo>::E, - &specieThermo<Thermo>::Cv, - &specieThermo<Thermo>::limit + &specieThermo<Thermo, Type>::Ea, + &specieThermo<Thermo, Type>::Cv, + &specieThermo<Thermo, Type>::limit ); } // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class Thermo> -inline void Foam::specieThermo<Thermo>::operator+= +template<class Thermo, template<class> class Type> +inline void Foam::specieThermo<Thermo, Type>::operator+= ( - const specieThermo<Thermo>& st + const specieThermo<Thermo, Type>& st ) { Thermo::operator+=(st); } -template<class Thermo> -inline void Foam::specieThermo<Thermo>::operator-= +template<class Thermo, template<class> class Type> +inline void Foam::specieThermo<Thermo, Type>::operator-= ( - const specieThermo<Thermo>& st + const specieThermo<Thermo, Type>& st ) { Thermo::operator-=(st); } -template<class Thermo> -inline void Foam::specieThermo<Thermo>::operator*=(const scalar s) +template<class Thermo, template<class> class Type> +inline void Foam::specieThermo<Thermo, Type>::operator*=(const scalar s) { Thermo::operator*=(s); } @@ -356,53 +476,53 @@ inline void Foam::specieThermo<Thermo>::operator*=(const scalar s) // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // -template<class Thermo> -inline Foam::specieThermo<Thermo> Foam::operator+ +template<class Thermo, template<class> class Type> +inline Foam::specieThermo<Thermo, Type> Foam::operator+ ( - const specieThermo<Thermo>& st1, - const specieThermo<Thermo>& st2 + const specieThermo<Thermo, Type>& st1, + const specieThermo<Thermo, Type>& st2 ) { - return specieThermo<Thermo> + return specieThermo<Thermo, Type> ( static_cast<const Thermo&>(st1) + static_cast<const Thermo&>(st2) ); } -template<class Thermo> -inline Foam::specieThermo<Thermo> Foam::operator- +template<class Thermo, template<class> class Type> +inline Foam::specieThermo<Thermo, Type> Foam::operator- ( - const specieThermo<Thermo>& st1, - const specieThermo<Thermo>& st2 + const specieThermo<Thermo, Type>& st1, + const specieThermo<Thermo, Type>& st2 ) { - return specieThermo<Thermo> + return specieThermo<Thermo, Type> ( static_cast<const Thermo&>(st1) - static_cast<const Thermo&>(st2) ); } -template<class Thermo> -inline Foam::specieThermo<Thermo> Foam::operator* +template<class Thermo, template<class> class Type> +inline Foam::specieThermo<Thermo, Type> Foam::operator* ( const scalar s, - const specieThermo<Thermo>& st + const specieThermo<Thermo, Type>& st ) { - return specieThermo<Thermo> + return specieThermo<Thermo, Type> ( s*static_cast<const Thermo&>(st) ); } -template<class Thermo> -inline Foam::specieThermo<Thermo> Foam::operator== +template<class Thermo, template<class> class Type> +inline Foam::specieThermo<Thermo, Type> Foam::operator== ( - const specieThermo<Thermo>& st1, - const specieThermo<Thermo>& st2 + const specieThermo<Thermo, Type>& st1, + const specieThermo<Thermo, Type>& st2 ) { return st2 - st1; diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H index 2259a833652041229e021daf972bf963e0e9d44e..aab02fb82777d20af9a5f9ec7d3dad75255e8451 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.H +++ b/src/thermophysicalModels/specie/transport/const/constTransport.H @@ -134,10 +134,7 @@ public: //- Thermal conductivity [W/mK] inline scalar kappa(const scalar T) const; - //- Thermal diffusivity for internal energy [kg/ms] - inline scalar alphae(const scalar T) const; - - //- Thermal diffusivity for enthalpy [kg/ms] + //- Thermal diffusivity of enthalpy [kg/ms] inline scalar alphah(const scalar T) const; // Species diffusivity diff --git a/src/thermophysicalModels/specie/transport/const/constTransportI.H b/src/thermophysicalModels/specie/transport/const/constTransportI.H index e6ae9bce1f3324203bd52fa7b2ae11f9c3c1d167..a08742912133b1460b357f3cd282832e49962e62 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransportI.H +++ b/src/thermophysicalModels/specie/transport/const/constTransportI.H @@ -68,13 +68,6 @@ inline Foam::scalar Foam::constTransport<Thermo>::kappa(const scalar T) const } -template<class Thermo> -inline Foam::scalar Foam::constTransport<Thermo>::alphae(const scalar T) const -{ - return this->kappa(T)/this->Cv(T); -} - - template<class Thermo> inline Foam::scalar Foam::constTransport<Thermo>::alphah(const scalar T) const { diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H index 67c71b1b93506dbe91538d2624fb0b1b15454d3e..a4ffbde2b7f5fbe706f745b71176c4f6cc846337 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H @@ -148,10 +148,7 @@ public: //- Thermal conductivity [W/mK] inline scalar kappa(const scalar T) const; - //- Thermal diffusivity for internal energy [kg/ms] - inline scalar alphae(const scalar T) const; - - //- Thermal diffusivity for enthalpy [kg/ms] + //- Thermal diffusivity of enthalpy [kg/ms] inline scalar alphah(const scalar T) const; // Species diffusivity diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H index 8d0d4f4e61ed55094bd437f551187d551e07e80e..57f546bd0d68bf73e4e9b5680e3815aa54e82329 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H @@ -121,16 +121,6 @@ inline Foam::scalar Foam::polynomialTransport<Thermo, PolySize>::kappa } -template<class Thermo, int PolySize> -inline Foam::scalar Foam::polynomialTransport<Thermo, PolySize>::alphae -( - const scalar T -) const -{ - return kappa(T)/this->Cv(T); -} - - template<class Thermo, int PolySize> inline Foam::scalar Foam::polynomialTransport<Thermo, PolySize>::alphah ( diff --git a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.C b/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.C deleted file mode 100644 index 7a5c921c94321ead7990e2f16283630d4c1f5fbf..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.C +++ /dev/null @@ -1,71 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - - function for nu. All other properties are derived from - this primitive function. - -\*---------------------------------------------------------------------------*/ - -#include "speciesTransport.H" -#include "IOstreams.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::speciesTransport::speciesTransport(Istream& is) -: - janafThermo(is) -{ - is.check("speciesTransport::speciesTransport(Istream& is)"); -} - - -Foam::speciesTransport::speciesTransport(const dictionary& dict) -: - janafThermo(dict) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::speciesTransport::write(Ostream& os) const -{ - os << this->name() << endl; - os << token::BEGIN_BLOCK << incrIndent << nl; - janafThermo::write(os); - os << decrIndent << token::END_BLOCK << nl; -} - - -// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // - -Foam::Ostream& Foam::operator<<(Ostream& os, const speciesTransport& sTranport) -{ - os << (const janafThermo&)sTranport; - - os.check("Ostream& operator<<(Ostream&, const speciesTransport)"); - - return os; -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransportI.H b/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransportI.H deleted file mode 100644 index 5b0ddf9041d718f9c5f6ee1de688267baf4a602b..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransportI.H +++ /dev/null @@ -1,34 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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/>. - -\*---------------------------------------------------------------------------*/ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -inline Foam::speciesTransport::speciesTransport(const janafThermo& sThermo) -: - janafThermo(sThermo) -{} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C index e56f61959ed7ad5db30dd8d5b795c3fa37c1a7f0..55f6b48ab1ae48026d1ade8b2ba76f36009fe910 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C @@ -53,7 +53,7 @@ Foam::sutherlandTransport<Thermo>::sutherlandTransport(const dictionary& dict) template<class Thermo> void Foam::sutherlandTransport<Thermo>::write(Ostream& os) const { - os << this->name() << endl; + os << this->specie::name() << endl; os << token::BEGIN_BLOCK << incrIndent << nl; Thermo::write(os); diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H index 99b943b82313389cbf0f26ffcf0e7ce6f6ec1f61..bb45f6bb139ff0474ed3543671c4f8a5c014834f 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H @@ -162,10 +162,7 @@ public: //- Thermal conductivity [W/mK] inline scalar kappa(const scalar T) const; - //- Thermal diffusivity for internal energy [kg/ms] - inline scalar alphae(const scalar T) const; - - //- Thermal diffusivity for enthalpy [kg/ms] + //- Thermal diffusivity of enthalpy [kg/ms] inline scalar alphah(const scalar T) const; // Species diffusivity diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H index 65e0a227bd4cad55d65b2a7ae58e3df5d35c7c42..2a718682ab122c554ba48c1665e54d78d58c921f 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H @@ -146,16 +146,6 @@ inline Foam::scalar Foam::sutherlandTransport<Thermo>::kappa } -template<class Thermo> -inline Foam::scalar Foam::sutherlandTransport<Thermo>::alphae -( - const scalar T -) const -{ - return mu(T)*(1.32 + 1.77*this->R()/this->Cv(T)); -} - - template<class Thermo> inline Foam::scalar Foam::sutherlandTransport<Thermo>::alphah ( diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C index 509c7d70cc6000c3d271dc65222099e8511ba741..b50d494a360cb7722e501f45db8aa223c1461b92 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C @@ -89,13 +89,13 @@ void Foam::porousMedia::fixedTemperature::addEnthalpySource forAll(zones, zoneI) { const labelList& cells = mesh.cellZones()[zones[zoneI]]; - tmp<scalarField> h = thermo.h(T, cells); + tmp<scalarField> he = thermo.he(T, cells); forAll(cells, i) { hDiag[cells[i]] += rate*V[cells[i]]*rho[cells[i]]; hSource[cells[i]] += - rate*V[cells[i]]*rho[cells[i]]*h()[cells[i]]; + rate*V[cells[i]]*rho[cells[i]]*he()[cells[i]]; } } } diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H index 73515d920c00aa027f14cd0730d74a3d828fbedf..152857e045f686a982a090f3a7757f9f179e1374 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H @@ -206,21 +206,30 @@ public: //- Return the SGS turbulent thermal diffusivity virtual tmp<volScalarField> alphaSgs() const = 0; + //- Return the effective turbulent temperature diffusivity + virtual tmp<volScalarField> kappaEff() const + { + return thermo().kappaEff(alphaSgs()); + } + + //- Return the effective turbulent temperature diffusivity for a patch + virtual tmp<scalarField> kappaEff(const label patchI) const + { + return + thermo().kappaEff(alphaSgs()().boundaryField()[patchI], patchI); + } + //- Return the effective thermal diffusivity virtual tmp<volScalarField> alphaEff() const { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphaSgs() + alpha()) - ); + return thermo().alphaEff(alphaSgs()); } //- Return the effective turbulence thermal diffusivity for a patch virtual tmp<scalarField> alphaEff(const label patchI) const { return - alphaSgs()().boundaryField()[patchI] - + alpha().boundaryField()[patchI]; + thermo().alphaEff(alphaSgs()().boundaryField()[patchI], patchI); } //- Return the sub-grid stress tensor. diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C index 752caac4e658502195716e73dbe9bb7d6632a246..e316ac28f0c43b1ebf75485b440f251d62eb456b 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C @@ -116,7 +116,7 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField Prt_(0.85), kappa_(0.41), E_(9.8), - hsName_("hs") + heName_("he") { checkType(); @@ -136,7 +136,7 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField Prt_(ptf.Prt_), kappa_(ptf.kappa_), E_(ptf.E_), - hsName_(ptf.hsName_) + heName_(ptf.heName_) {} @@ -153,7 +153,7 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), E_(dict.lookupOrDefault<scalar>("E", 9.8)), - hsName_(dict.lookupOrDefault<word>("hs", "hs")) + heName_(dict.lookupOrDefault<word>("he", "he")) { checkType(); } @@ -169,7 +169,7 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField Prt_(awfpsf.Prt_), kappa_(awfpsf.kappa_), E_(awfpsf.E_), - hsName_(awfpsf.hsName_) + heName_(awfpsf.heName_) { checkType(); } @@ -186,7 +186,7 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField Prt_(awfpsf.Prt_), kappa_(awfpsf.kappa_), E_(awfpsf.E_), - hsName_(awfpsf.hsName_) + heName_(awfpsf.heName_) { checkType(); } @@ -216,7 +216,7 @@ void alphaSgsJayatillekeWallFunctionFvPatchScalarField::evaluate const scalarField& rhow = lesModel.rho().boundaryField()[patchI]; const fvPatchScalarField& hw = - patch().lookupPatchField<volScalarField, scalar>(hsName_); + patch().lookupPatchField<volScalarField, scalar>(heName_); const scalarField& ry = patch().deltaCoeffs(); @@ -319,7 +319,7 @@ void alphaSgsJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl; os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - os.writeKeyword("hs") << hsName_ << token::END_STATEMENT << nl; + os.writeKeyword("he") << heName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H index 91a43d06c2e8bf5cee0b8839d08fc05316b68f7b..36ac84da60f727c6c011eb4d1a61099e3a0bf55b 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H @@ -67,7 +67,7 @@ class alphaSgsJayatillekeWallFunctionFvPatchScalarField scalar E_; //- Name of (sensible/total) enthalpy field - word hsName_; + word heName_; // Solution parameters diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H index bc3b716c62eb9739421866397a6a4e30c9232159..e1420667d88b8318aa71cc72accfb8437ef17d56 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H @@ -238,21 +238,30 @@ public: ); } + //- Return the effective turbulent temperature diffusivity + virtual tmp<volScalarField> kappaEff() const + { + return thermo().kappaEff(alphat()); + } + + //- Return the effective turbulent temperature diffusivity for a patch + virtual tmp<scalarField> kappaEff(const label patchI) const + { + return + thermo().kappaEff(alphat()().boundaryField()[patchI], patchI); + } + //- Return the effective turbulent thermal diffusivity virtual tmp<volScalarField> alphaEff() const { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphat() + alpha()) - ); + return thermo().alphaEff(alphat()); } //- Return the effective turbulent thermal diffusivity for a patch virtual tmp<scalarField> alphaEff(const label patchI) const { return - alphat()().boundaryField()[patchI] - + alpha().boundaryField()[patchI]; + thermo().alphaEff(alphat()().boundaryField()[patchI], patchI); } //- Return yPlus for the given patch diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C index 958abf0b77339178b3d467f3b04f70f3d420e515..92498e9299e6aadc2ba08d8f245d21b1cbb00c4d 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C @@ -108,7 +108,7 @@ void htcConvFvPatchScalarField::updateCoeffs() const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalarField alphaEffw = rasModel.alphaEff()().boundaryField()[patchI]; + const scalarField alphaEffw = rasModel.alphaEff(patchI); const scalarField& muw = rasModel.mu().boundaryField()[patchI]; const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; const vectorField& Uc = rasModel.U(); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C index de9ae883a698f3941d1f063abaf7bba677a7c648..4b8eea7a3ca901cc3103055a50d9706eb35649b3 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C @@ -220,11 +220,14 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() const scalarField magGradUw(mag(Uw.snGrad())); const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const fvPatchScalarField& hw = - rasModel.thermo().h().boundaryField()[patchI]; + const fvPatchScalarField& hew = + rasModel.thermo().he().boundaryField()[patchI]; // Heat flux [W/m2] - lagging alphatw - const scalarField qDot((alphaw + alphatw)*hw.snGrad()); + const scalarField qDot + ( + rasModel.thermo().alphaEff(alphatw, patchI)*hew.snGrad() + ); // Populate boundary values forAll(alphatw, faceI) diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C index 44e43d3c67ca192ba5b04969e0e9001a5ffef3d8..150d11bff4491109c5093f2d2a8788b154926845 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C @@ -99,8 +99,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa ); return - model.alphaEff()().boundaryField()[patch_.index()] - *model.thermo().Cp(Tp, patch_.index()); + model.kappaEff(patch_.index()); } break; diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C index d9e3e6d40be3f98efbc5ca326ac25bc79186c5b7..4601528d4d21230841dafce5d124fb37ce9d8990 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C @@ -222,10 +222,10 @@ void temperatureThermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs() // local properties const scalarField alphaw = model.alphaEff()().boundaryField()[patchI]; - const fvPatchScalarField& hw = - model.thermo().h().boundaryField()[patchI]; + const fvPatchScalarField& hew = + model.thermo().he().boundaryField()[patchI]; - const scalarField qDot(alphaw*hw.snGrad()); + const scalarField qDot(alphaw*hew.snGrad()); const scalarField& Tp = patch().template lookupPatchField<volScalarField, scalar>(TName_); @@ -245,7 +245,7 @@ void temperatureThermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs() mpp.map().distribute(nbrAlphaw); const fvPatchScalarField& nbrHw = - model.thermo().h().boundaryField()[nbrPatchI]; + model.thermo().he().boundaryField()[nbrPatchI]; scalarField nbrQDot ( diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C index 25f3389ed00ddac5966c229802c4a5f2360aab34..b7eeadbd4885d3151c2a1327625f125b09293506 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C @@ -139,9 +139,9 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::rmap mixedFvPatchField<scalar>::rmap(ptf, addr); } + void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs() { - if (this->updated()) { return; @@ -158,7 +158,7 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs() const fvsPatchField<scalar>& phip = patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); - const scalarField alphap = turbulence.alphaEff()().boundaryField()[patchI]; + const scalarField alphap = turbulence.alphaEff(patchI); refValue() = 1.0; refGrad() = 0.0; diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H index f7cb6bec8ff279001b1cda4ed1b449dad3d5abba..017d342241cfa26a573fad6872a4e49e0798b132 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H @@ -103,6 +103,27 @@ public: //- Return the turbulence thermal diffusivity, i.e. 0 for laminar flow virtual tmp<volScalarField> alphat() const; + //- Return the effective turbulent temperature diffusivity, + // i.e. the laminar thermal diffusivity + virtual tmp<volScalarField> kappaEff() const + { + return tmp<volScalarField> + ( + new volScalarField + ( + "kappaEff", + thermo().kappa() + ) + ); + } + + //- Return the effective turbulent temperature diffusivity for a patch, + // i.e. the laminar thermal diffusivity + virtual tmp<scalarField> kappaEff(const label patchI) const + { + return thermo().kappa(patchI); + } + //- Return the effective turbulent thermal diffusivity, // i.e. the laminar thermal diffusivity virtual tmp<volScalarField> alphaEff() const diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index afb8312ee74e0f1dfe56308631b72bbb80ecfe36..f5e2cc901902444a01e8141ff5f5b1de43015d11 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -199,6 +199,12 @@ public: //- Return the turbulence thermal diffusivity virtual tmp<volScalarField> alphat() const = 0; + //- Return the effective turbulence temperature diffusivity + virtual tmp<volScalarField> kappaEff() const = 0; + + //- Return the effective turbulence temperature diffusivity for a patch + virtual tmp<scalarField> kappaEff(const label patchI) const = 0; + //- Return the effective turbulence thermal diffusivity virtual tmp<volScalarField> alphaEff() const = 0; diff --git a/tutorials/Alltest b/tutorials/Alltest index 63a70167c681de5e7b6c601a29167eb0ccc91e8e..7a76efb4f01346d571f0b78d901316ff204a1c82 100755 --- a/tutorials/Alltest +++ b/tutorials/Alltest @@ -88,13 +88,13 @@ gradSchemes { default Gauss linear; } divSchemes { default Gauss linear; - div(phi,fu_ft_h) Gauss multivariateSelection + div(phi,fu_ft_ha) Gauss multivariateSelection { fu upwind; ft upwind; h upwind; }; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { fu upwind; ft upwind; diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/thermophysicalProperties b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/thermophysicalProperties index 95c7a2c91d3a01cb631e5e9b83fcc1d325b2d9da..54e0f6603c58561076671968ee9fbcb73b4b5c28 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/thermophysicalProperties +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo<inhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>; +thermoType heheuReactionThermo<inhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>,absoluteEnthalpy>>>>; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.5776; diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes index e56807d8a1186b926a097f8026e4517b5cfdca5d..2d46eb050dc4cd2c61df6644591aa04e17a993be 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes @@ -39,13 +39,13 @@ divSchemes div(phiXi,Xi) Gauss limitedLinear 1; div(phiSt,b) Gauss limitedLinear01 1; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { ft limitedLinear01 1; b limitedLinear01 1; Xi limitedLinear 1; - h limitedLinear 1; - hu limitedLinear 1; + ha limitedLinear 1; + hau limitedLinear 1; }; div((Su*grad(b))) Gauss linear; @@ -63,8 +63,8 @@ laplacianSchemes laplacian((rho*inv((((1)*A(U))+tDragDcu))),p) Gauss linear limited 0.333; laplacian(Db,b) Gauss linear limited 0.333; laplacian(Db,ft) Gauss linear limited 0.333; - laplacian(Db,h) Gauss linear limited 0.333; - laplacian(Db,hu) Gauss linear limited 0.333; + laplacian(Db,ha) Gauss linear limited 0.333; + laplacian(Db,hau) Gauss linear limited 0.333; } interpolationSchemes diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSolution b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSolution index 852f63cd319c14373a2ded0970253ef060cc1bb0..58314bd62649e241cc0af157b02e80784d18cf29 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSolution +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSolution @@ -47,7 +47,7 @@ solvers relTol 0; }; - "(b|Xi|ft|h|hu|k|epsilon)" + "(b|Xi|ft|ha|hau|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -55,7 +55,7 @@ solvers relTol 0.1; } - "(b|Xi|ft|h|hu|k|epsilon)Final" + "(b|Xi|ft|ha|hau|k|epsilon)Final" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs b/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs index 51a2df391191b5c93a32d054b7cc607b1d851c64..16b4384a8e4d782f4b00fe59820b5f0fd29799d1 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs @@ -33,14 +33,14 @@ boundaryField upperWall { type alphaSgsJayatillekeWallFunction; - hs h; + he ha; value uniform 0; } lowerWall { type alphaSgsJayatillekeWallFunction; - hs h; + he ha; value uniform 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties b/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties index ac0c126b4ae7d592049ee5dd1591cfac6190dbdb..7c51f8a40455b12c6b6e1e0d7d77157d16cb585c 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>; +thermoType heheuReactionThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>,absoluteEnthalpy>>>>; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes index 303b193a018ea01e4a5157446431e609277091d3..52ad2a1abdbbc39f8353e16d120feb66252bc9cb 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes +++ b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes @@ -34,12 +34,12 @@ divSchemes div(phiXi,Xi) Gauss limitedLinear01 0.1; div(phiXi,Su) Gauss limitedLinear01 0.1; div(phiSt,b) Gauss limitedLinear01 0.1; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { - ft limitedLinear01 0.1; - b limitedLinear01 0.1; - h limitedLinear 0.1; - hu limitedLinear 0.1; + ft limitedLinear01 0.1; + b limitedLinear01 0.1; + ha limitedLinear 0.1; + hau limitedLinear 0.1; }; div(U) Gauss linear; div((Su*grad(b))) Gauss linear; @@ -56,8 +56,8 @@ laplacianSchemes laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian(alphaEff,b) Gauss linear corrected; laplacian(alphaEff,ft) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; - laplacian(alphaEff,hu) Gauss linear corrected; + laplacian(alphaEff,ha) Gauss linear corrected; + laplacian(alphaEff,hau) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution index 951ae7bf9fe07f42e42f09bc065a8fc04e678dce..9496a2a249493c0b6066e9b12fdf6302ec85eb25 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution +++ b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|b|Su|Xi|h|hu|k)" + "(U|b|Su|Xi|ha|hau|k)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|b|Su|Xi|h|hu|k)Final" + "(U|b|Su|Xi|ha|hau|k)Final" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs index c84a947e44653f3417168a9ccef5bad75febb4a7..1a913f8b784e83f2d845ec0cdd61d03febd0cbc1 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs @@ -32,13 +32,13 @@ boundaryField upperWall { type alphaSgsJayatillekeWallFunction; - hs h; + he ha; value uniform 0; } lowerWall { type alphaSgsJayatillekeWallFunction; - hs h; + he ha; value uniform 0; } front diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties index ac0c126b4ae7d592049ee5dd1591cfac6190dbdb..7c51f8a40455b12c6b6e1e0d7d77157d16cb585c 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>; +thermoType heheuReactionThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>,absoluteEnthalpy>>>>; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes index 303b193a018ea01e4a5157446431e609277091d3..52ad2a1abdbbc39f8353e16d120feb66252bc9cb 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes @@ -34,12 +34,12 @@ divSchemes div(phiXi,Xi) Gauss limitedLinear01 0.1; div(phiXi,Su) Gauss limitedLinear01 0.1; div(phiSt,b) Gauss limitedLinear01 0.1; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { - ft limitedLinear01 0.1; - b limitedLinear01 0.1; - h limitedLinear 0.1; - hu limitedLinear 0.1; + ft limitedLinear01 0.1; + b limitedLinear01 0.1; + ha limitedLinear 0.1; + hau limitedLinear 0.1; }; div(U) Gauss linear; div((Su*grad(b))) Gauss linear; @@ -56,8 +56,8 @@ laplacianSchemes laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian(alphaEff,b) Gauss linear corrected; laplacian(alphaEff,ft) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; - laplacian(alphaEff,hu) Gauss linear corrected; + laplacian(alphaEff,ha) Gauss linear corrected; + laplacian(alphaEff,hau) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution index bacb583b37aec5b50f4c6218e71fb894497c40bc..a7597acd353c4e52d187b1fd29e4e0c14c551392 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|b|Su|Xi|h|hu|k)" + "(U|b|Su|Xi|ha|hau|k)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|b|Su|Xi|h|hu|k)Final" + "(U|b|Su|Xi|ha|hau|k)Final" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/thermophysicalProperties b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/thermophysicalProperties index b8f4172d71c112b0a614bcb1531c9897dfabb7d0..0d6480a485ef035576462f0cf37ddc272f4b00c6 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/thermophysicalProperties +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>; +thermoType heheuReactionThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>,absoluteEnthalpy>>>>; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675; diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes index 39ac52720671675285c768704aa12ffb4b173853..07e007d2755f959bfd312ecb009f764423c2a8b8 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes @@ -38,13 +38,13 @@ divSchemes div(phiXi,Xi) Gauss limitedLinear 1; div(phiXi,Su) Gauss limitedLinear 1; div(phiSt,b) Gauss limitedLinear01 1; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { - fu limitedLinear01 1; - ft limitedLinear01 1; - b limitedLinear01 1; - h limitedLinear 1; - hu limitedLinear 1; + fu limitedLinear01 1; + ft limitedLinear01 1; + b limitedLinear01 1; + ha limitedLinear 1; + hau limitedLinear 1; }; div(U) Gauss linear; div((Su*grad(b))) Gauss linear; @@ -62,8 +62,8 @@ laplacianSchemes laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian(alphaEff,b) Gauss linear corrected; laplacian(alphaEff,ft) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; - laplacian(alphaEff,hu) Gauss linear corrected; + laplacian(alphaEff,ha) Gauss linear corrected; + laplacian(alphaEff,hau) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution index b2af0d7b7e8f49e6caff523a129f0a67e60cbc96..706044c8b1cfd88a0aa68257d304f5a1eccd6751 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|b|Su|Xi|h|hu|k|epsilon)" + "(U|b|Su|Xi|ha|hau|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|b|Su|Xi|h|hu|k|epsilon)Final" + "(U|b|Su|Xi|ha|hau|k|epsilon)Final" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties index db2a106a8a7195f7771e2fa51c757d065e3a4802..3c5e475229c466cab0685e5f2cafbb2db6d61340 100644 --- a/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; diff --git a/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties index db2a106a8a7195f7771e2fa51c757d065e3a4802..3c5e475229c466cab0685e5f2cafbb2db6d61340 100644 --- a/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; diff --git a/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties index db2a106a8a7195f7771e2fa51c757d065e3a4802..3c5e475229c466cab0685e5f2cafbb2db6d61340 100644 --- a/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; diff --git a/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties index db2a106a8a7195f7771e2fa51c757d065e3a4802..3c5e475229c466cab0685e5f2cafbb2db6d61340 100644 --- a/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; diff --git a/tutorials/combustion/engineFoam/kivaTest/constant/thermophysicalProperties b/tutorials/combustion/engineFoam/kivaTest/constant/thermophysicalProperties index 55513dde32494a8e89b8ae2150c34b45314eec83..531e298a20917308ed0b54a95a543e4fa8755517 100644 --- a/tutorials/combustion/engineFoam/kivaTest/constant/thermophysicalProperties +++ b/tutorials/combustion/engineFoam/kivaTest/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo<inhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>; +thermoType heheuReactionThermo<inhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>,absoluteEnthalpy>>>>; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.0336; diff --git a/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes b/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes index 62b296f3ed42a7239133a9641726d128a9dea836..3c1bc03aee299b67fc4f33e9050f09b41cfd280a 100644 --- a/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes +++ b/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes @@ -38,13 +38,13 @@ divSchemes div(phiXi,Xi) Gauss upwind; div(phiXi,Su) Gauss upwind; div(phiSt,b) Gauss limitedLinear01 1; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { - fu limitedLinear01 1; - ft limitedLinear01 1; - b limitedLinear01 1; - h limitedLinear 1; - hu limitedLinear 1; + fu limitedLinear01 1; + ft limitedLinear01 1; + b limitedLinear01 1; + ha limitedLinear 1; + hau limitedLinear 1; }; div(U) Gauss linear; div((Su*grad(b))) Gauss linear; @@ -62,8 +62,8 @@ laplacianSchemes laplacian((rho*(1|A(U))),p) Gauss linear limited 0.5; laplacian(alphaEff,b) Gauss linear limited 0.5; laplacian(muEff,ft) Gauss linear limited 0.5; - laplacian(alphaEff,h) Gauss linear limited 0.5; - laplacian(alphaEff,hu) Gauss linear limited 0.5; + laplacian(alphaEff,ha) Gauss linear limited 0.5; + laplacian(alphaEff,hau) Gauss linear limited 0.5; laplacian(alphaEff,ft) Gauss linear limited 0.5; } diff --git a/tutorials/combustion/engineFoam/kivaTest/system/fvSolution b/tutorials/combustion/engineFoam/kivaTest/system/fvSolution index ac60660881dadd12d6b0248375a2567f84833b7f..f020df3d4ebe91391d049747b0f60afd99853c78 100644 --- a/tutorials/combustion/engineFoam/kivaTest/system/fvSolution +++ b/tutorials/combustion/engineFoam/kivaTest/system/fvSolution @@ -47,14 +47,14 @@ solvers relTol 0; } - "(U|Xi|hu|ft|b|h|k|epsilon)" + "(U|Xi|hau|ft|b|ha|k|epsilon)" { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0.1; } - "(U|ft|Xi|hu|b|h|k|epsilon)Final" + "(U|ft|Xi|hau|b|ha|k|epsilon)Final" { $U; tolerance 1e-05; diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/reactingCloud1Properties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/reactingCloud1Properties index dab393728a61be59dad6cc189b7660872e9845a4..fb38fc764bf242af439a1aa4e99aaebfc12654a9 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/reactingCloud1Properties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/thermophysicalProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/thermophysicalProperties index 6372ed8ac7315dbb8717cadc68309d665006d85e..633ba624918cfa81d5455766a29ffea902a96fc7 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/thermophysicalProperties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/thermophysicalProperties @@ -16,7 +16,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<singleStepReactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<singleStepReactingMixture<gasThermoPhysics>>; inertSpecie N2; diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes index 2883377ba97ece4f643fab08878e8db7bad8802c..9911bbedb397a9e40e00dbbe8fa96884a514623c 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes @@ -30,14 +30,14 @@ divSchemes default none; div(phi,U) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1; - div(phi,Yi_hs) Gauss multivariateSelection + div(phi,Yi_h) Gauss multivariateSelection { O2 linearUpwind grad(O2); N2 linearUpwind grad(N2); C3H8 linearUpwind grad(C3H8); H2O linearUpwind grad(H2O); CO2 linearUpwind grad(CO2); - hs linearUpwind grad(hs); + h linearUpwind grad(h); }; div((muEff*dev2(T(grad(U))))) Gauss linear; div(phi,K) Gauss limitedLinear 1; @@ -50,7 +50,7 @@ laplacianSchemes default Gauss linear corrected; laplacian(muEff,U) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; - laplacian(alphaEff,hs) Gauss linear corrected; + laplacian(alphaEff,h) Gauss linear corrected; laplacian((((rho*(1|A(U)))*rho)*gh)) Gauss linear corrected; laplacian(interpolate((rho*(1|A(U)))),p) Gauss linear corrected; laplacian(gammaRad,G) Gauss linear corrected; diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSolution b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSolution index 859d4a6dd9650e153963643e26606b31b1f25556..3a3bd03c733c99653bfb82a6a92388c591eb7cef 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSolution +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSolution @@ -71,7 +71,7 @@ solvers }; - "(hs|hsFinal|Yi)" + "(h|hFinal|Yi)" { solver PBiCG; preconditioner DILU; @@ -117,7 +117,7 @@ relaxationFactors equations { "(U|k).*" 1; - "(C3H8|O2|H2O|CO2|hs).*" 1; + "(C3H8|O2|H2O|CO2|h).*" 1; } } diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes index dbd1f38ac2fdb6a88549f6725b5a5ad7c80ca52c..a7f802048f6207497053d620df0e25e638c1526e 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes @@ -32,7 +32,7 @@ divSchemes laplacianSchemes { default none; - laplacian(K,T) Gauss linear uncorrected; + laplacian(kappa,T) Gauss linear uncorrected; } interpolationSchemes diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactingCloud1Properties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactingCloud1Properties index dab393728a61be59dad6cc189b7660872e9845a4..fb38fc764bf242af439a1aa4e99aaebfc12654a9 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactingCloud1Properties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties index dcb95a13d1cca3881ee2f4dc9ec4661f0513ddbb..7e40fa183563461ec91f2a06d2d057f8de0dae24 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<singleStepReactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<singleStepReactingMixture<gasThermoPhysics>>; inertSpecie N2; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes index 775f4cb396ae2457033199179cfb61fd5bbdd16b..efa1275f2b63aaa2b539fd3ef7cea7e5a5c23a7d 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes @@ -30,14 +30,14 @@ divSchemes default none; div(phi,U) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1; - div(phi,Yi_hs) Gauss multivariateSelection + div(phi,Yi_h) Gauss multivariateSelection { O2 limitedLinear01 1; CH4 limitedLinear01 1; N2 limitedLinear01 1; H2O limitedLinear01 1; CO2 limitedLinear01 1; - hs limitedLinear 1; + h limitedLinear 1; }; div((muEff*dev2(T(grad(U))))) Gauss linear; div(phi,omega) Gauss limitedLinear 1; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution index 5685f010f111c423e7e4cec6dd9925c7b3b0ba45..d7bebcf0bb6fd329e5553f4b14b9e0a02ab8087d 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution @@ -53,7 +53,7 @@ solvers }; - "(U|Yi|k|hs|omega)" + "(U|Yi|k|h|omega)" { solver PBiCG; preconditioner DILU; @@ -62,7 +62,7 @@ solvers nSweeps 1; }; - "(U|Yi|k|hs|omega)Final" + "(U|Yi|k|h|omega)Final" { $U; tolerance 1e-7; @@ -108,7 +108,7 @@ relaxationFactors equations { "(U|k).*" 1; - "(C3H8|O2|H2O|CO2|hs).*" 0.9; + "(C3H8|O2|H2O|CO2|h).*" 0.9; } } diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactingCloud1Properties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactingCloud1Properties index dab393728a61be59dad6cc189b7660872e9845a4..fb38fc764bf242af439a1aa4e99aaebfc12654a9 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactingCloud1Properties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/thermophysicalProperties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/thermophysicalProperties index dcb95a13d1cca3881ee2f4dc9ec4661f0513ddbb..7e40fa183563461ec91f2a06d2d057f8de0dae24 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/thermophysicalProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<singleStepReactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<singleStepReactingMixture<gasThermoPhysics>>; inertSpecie N2; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes index 0a76845c6f5327f30c0567fd50ebf8ea8bb4179b..97a9f76e7207e61f25a0f31040f6de780edd5b24 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes @@ -31,14 +31,14 @@ divSchemes div(phi,U) Gauss linear; div(phi,K) Gauss linear; div(phi,k) Gauss limitedLinear 0.1; - div(phi,Yi_hs) Gauss multivariateSelection + div(phi,Yi_h) Gauss multivariateSelection { O2 limitedLinear01 1; CH4 limitedLinear01 1; N2 limitedLinear01 1; H2O limitedLinear01 1; CO2 limitedLinear01 1; - hs limitedLinear 1; + h limitedLinear 1; }; div((muEff*dev2(T(grad(U))))) Gauss linear; div(Ji,Ii_h) Gauss upwind; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSolution b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSolution index 3835a468dde1e228eee55f9d6144099a20407b36..6c64887a86f47a10289f4a9f6cac1af1be49fe08 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSolution +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSolution @@ -45,7 +45,7 @@ solvers }; - "(U|Yi|k|hs)" + "(U|Yi|k|h)" { solver PBiCG; preconditioner DILU; @@ -54,7 +54,7 @@ solvers nSweeps 1; }; - "(U|Yi|k|hs)Final" + "(U|Yi|k|h)Final" { $U; tolerance 1e-8; @@ -100,7 +100,7 @@ relaxationFactors equations { "(U|k).*" 1; - "(CH4|O2|H2O|CO2|hs).*" 0.9; + "(CH4|O2|H2O|CO2|h).*" 0.9; } } diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties index 6f27fa15147f00faf6bedfecc28cb5ebff9841f4..397c9bec8d6a88f86828a13a536430f55d9defe8 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; inertSpecie N2; diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution index 2f922268d35e52eb55c8106067fe2e903aa7947e..fe09f9434a4e57c6158106d8ad1f3639fbb5b68c 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution @@ -47,7 +47,7 @@ solvers relTol 0.0; } - "(U|hs||k|epsilon)" + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -55,7 +55,7 @@ solvers relTol 0.1; } - "(U|hs||k|epsilon)Final" + "(U|h|k|epsilon)Final" { solver PBiCG; preconditioner DILU; @@ -65,7 +65,7 @@ solvers Yi { - $hsFinal; + $hFinal; } } diff --git a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties index 2ff1fabbda2edf3e9699a432e2513cbb8f716238..3d2695dfcd827474da7b5b03b5411b35d27547d3 100644 --- a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties index 1e8492f320fdbc4c7cabfa3aa45f80c9ef04e0f9..89b923d01fcce3f4b6a357528f7a0b7043a53f06 100644 --- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties index f0ecbfd8e65c8a1a04ccb11219d0c29e732f359f..c61c83d6bd0d6b6daf17daa85bface79fdb8ada2 100644 --- a/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleInternalEnergy>>>>; // Note: these are the properties for a "normalised" inviscid gas // for which the speed of sound is 1 m/s at a temperature of 1K diff --git a/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties index a4e71b70016bc8ac237254664bef7b7d527e6787..a228ce4a4f87e6bf0fcfbae6ebf3b856d26f811d 100644 --- a/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties index 661aa6c085642539a0452b360a52fdf20dc9278c..7518beeeadb1f7a7a0b5fd2d708ee05b4aac73e9 100644 --- a/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties index a4e71b70016bc8ac237254664bef7b7d527e6787..a228ce4a4f87e6bf0fcfbae6ebf3b856d26f811d 100644 --- a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties index 22ef3070733758818c3c51aa40389a660e5cdcc8..b2540e3d91af97ebb0fb280ed532d5d4ef5f4464 100644 --- a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties index d6d597d433f7d69e5e2329e6c716ed66b8a99675..fa673b9a4d6bf80bbcf7c31c7d7753f3a3a2d657 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties index 6cb4a48d62c3d74f49804bf4410fa653eb5a7a89..58aeb4d4fd350ba134849486c1837753f3e45292 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/thermophysicalProperties b/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/thermophysicalProperties index d6d597d433f7d69e5e2329e6c716ed66b8a99675..fa673b9a4d6bf80bbcf7c31c7d7753f3a3a2d657 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/constant/thermophysicalProperties b/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/constant/thermophysicalProperties index d6d597d433f7d69e5e2329e6c716ed66b8a99675..fa673b9a4d6bf80bbcf7c31c7d7753f3a3a2d657 100644 --- a/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/constant/thermophysicalProperties b/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/constant/thermophysicalProperties index f68807ca39ccbee3f4a90fafefb19fbb6c8ffced..a95c522360b9d17e178b9899a2c439cd807c1cf6 100644 --- a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/thermophysicalProperties b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/thermophysicalProperties index cbe21562972775a88448d54c26a3dba002171ac0..dd688c1b3f6fc1fa373bd43b956fb070086bb373 100644 --- a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<sutherlandTransport<specieThermo<eConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<sutherlandTransport<specieThermo<eConstThermo<perfectGas>,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/constant/thermophysicalProperties b/tutorials/compressible/rhoSimplecFoam/squareBend/constant/thermophysicalProperties index cbe21562972775a88448d54c26a3dba002171ac0..dd688c1b3f6fc1fa373bd43b956fb070086bb373 100644 --- a/tutorials/compressible/rhoSimplecFoam/squareBend/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoSimplecFoam/squareBend/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<sutherlandTransport<specieThermo<eConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<sutherlandTransport<specieThermo<eConstThermo<perfectGas>,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties b/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties index f0ecbfd8e65c8a1a04ccb11219d0c29e732f359f..c61c83d6bd0d6b6daf17daa85bface79fdb8ada2 100644 --- a/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties +++ b/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleInternalEnergy>>>>; // Note: these are the properties for a "normalised" inviscid gas // for which the speed of sound is 1 m/s at a temperature of 1K diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/constant/thermophysicalProperties b/tutorials/compressible/sonicFoam/laminar/shockTube/constant/thermophysicalProperties index 1a3dddb3d73746af3d7f45ca15e7a214215360b8..76fd63c9b786bc22e65426b91b9089be1f72c961 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/constant/thermophysicalProperties +++ b/tutorials/compressible/sonicFoam/laminar/shockTube/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/thermophysicalProperties b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/thermophysicalProperties index 75f2432290e5a7138bfd0ac474c45e052609ca8c..b302f7e0402bfcea404e1c0ea3a22e9912f9b457 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/thermophysicalProperties +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/sonicFoam/ras/prism/constant/thermophysicalProperties b/tutorials/compressible/sonicFoam/ras/prism/constant/thermophysicalProperties index 75f2432290e5a7138bfd0ac474c45e052609ca8c..b302f7e0402bfcea404e1c0ea3a22e9912f9b457 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/constant/thermophysicalProperties +++ b/tutorials/compressible/sonicFoam/ras/prism/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties index 615765276aa0cfcb2e2d2988ba6e6503d7239a47..05bbb78407326dfedc574ed0d2d52d51cc7bbb75 100644 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType heRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; pRef 100000; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties index 84be4f4c751a8f40e2e3a61246532bcff02670b7..75386e739434aacc7147df2531a5880c3e4f4d35 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties index 84be4f4c751a8f40e2e3a61246532bcff02670b7..75386e739434aacc7147df2531a5880c3e4f4d35 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties index 678ae10f1015d37c06d63abd48bfd0595464c31c..521cf3b4216fb9f3ef8e04176f1e98449d542777 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; pRef 100000; diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/thermophysicalProperties index 678ae10f1015d37c06d63abd48bfd0595464c31c..521cf3b4216fb9f3ef8e04176f1e98449d542777 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; pRef 100000; diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties index 678ae10f1015d37c06d63abd48bfd0595464c31c..521cf3b4216fb9f3ef8e04176f1e98449d542777 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; pRef 100000; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties index a5d6b47a1c7505a244a8955d35356ef79c6cef4d..75cf8a4016c338d814f02983aa01e348d32737eb 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType heRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties index 5a263cadcd84cb3eb93ca0fea3ea06b02bddffb7..18f002136af243c0ed0d90a8ed256317fad47b06 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType heRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/bottomWater/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/bottomWater/thermophysicalProperties index 8e5932c033c3f6a348a49009fc12e7769fef72c7..128f32aaf08a1edc5dc4e2bb10ff00288326670b 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/bottomWater/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/bottomWater/thermophysicalProperties @@ -14,8 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType -hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<incompressible>>>>>; +thermoType heRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<incompressible>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/topAir/thermophysicalProperties index 5a263cadcd84cb3eb93ca0fea3ea06b02bddffb7..18f002136af243c0ed0d90a8ed256317fad47b06 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/topAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType heRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties index a5d6b47a1c7505a244a8955d35356ef79c6cef4d..75cf8a4016c338d814f02983aa01e348d32737eb 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType heRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties index 5a263cadcd84cb3eb93ca0fea3ea06b02bddffb7..18f002136af243c0ed0d90a8ed256317fad47b06 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType heRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties index a5d6b47a1c7505a244a8955d35356ef79c6cef4d..75cf8a4016c338d814f02983aa01e348d32737eb 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType heRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/topAir/thermophysicalProperties index 5a263cadcd84cb3eb93ca0fea3ea06b02bddffb7..18f002136af243c0ed0d90a8ed256317fad47b06 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/topAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType heRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/thermophysicalProperties index a5d6b47a1c7505a244a8955d35356ef79c6cef4d..75cf8a4016c338d814f02983aa01e348d32737eb 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType heRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/thermophysicalProperties index 5a263cadcd84cb3eb93ca0fea3ea06b02bddffb7..18f002136af243c0ed0d90a8ed256317fad47b06 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType heRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/thermophysicalProperties b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/thermophysicalProperties index d6810952987715e6508b27460121ffebc0293dae..e7748f52bcd51b3a1947a7302d4d2513dbf6ce7a 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/thermophysicalProperties +++ b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsRhoMixtureThermo<reactingMixture<icoPoly8ThermoPhysics>>; +thermoType heRhoReactionThermo<reactingMixture<icoPoly8ThermoPhysics>>; inertSpecie N2; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSolution b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSolution index e2d4fcfdeeaf346b9552e3baba6bc5e786762657..5582aee0496b8abf1226e75f65c1c66d823f971b 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSolution +++ b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSolution @@ -59,7 +59,7 @@ solvers relTol 0; }; - "(U|Yi|hs|k|epsilon)" + "(U|Yi|h|k|epsilon)" { solver smoothSolver; smoother GaussSeidel; @@ -67,7 +67,7 @@ solvers relTol 0.1; } - "(U|Yi|hs|k|epsilon)Final" + "(U|Yi|h|k|epsilon)Final" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties index 8ee12eae98a244e10a7caa8c34c174ddd602c493..17a27436a7d799215c9f6f0ce2109ccf826bbc9d 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties @@ -35,7 +35,7 @@ solution rho semiImplicit 1; U semiImplicit 1; Yi semiImplicit 1; - hs semiImplicit 1; + h semiImplicit 1; } } diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/thermophysicalProperties b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/thermophysicalProperties index 52c55104b8ed16b366623ab91e6f9fbeecf45aab..5d715a78573e5dde934c1fc94bf0c24e9ee2caa3 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/thermophysicalProperties +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsRhoMixtureThermo<reactingMixture<icoPoly8ThermoPhysics>>; +thermoType heRhoReactionThermo<reactingMixture<icoPoly8ThermoPhysics>>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes index f0c610dcbf46eb29f0c8bc63b23f67e7587ef501..5b1a94bbec4777ba2c374dddaeaedc9c8ad89b37 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,omega) Gauss upwind; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSolution b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSolution index 82179b044e5f0078065cf042211e49eb3a01fa49..1bdc5b626083f8da43b2f9365a63785dd7ffb9ee 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSolution +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSolution @@ -52,7 +52,7 @@ solvers tolerance 1e-4; } - "(U|Yi|hs|k|omega|.*Final)" + "(U|Yi|h|k|omega|.*Final)" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties index 60fa4fb2983f2c12721118d07418b97aaf21ac66..50e652d6b1be8cb64f97d2ce51dfb74f4f9fa603 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties @@ -26,10 +26,10 @@ solution { schemes { - rho explicit 1; - U explicit 1; - Yi explicit 1; - hs explicit 1; + rho semiImplicit 1; + U semiImplicit 1; + Yi semiImplicit 1; + h semiImplicit 1; } } diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties index e35910a5404278a6202c22ec9744c0fe4057750c..0ae0ea6ada3a4f68e9644a1c6f27811d3854ab88 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties @@ -27,7 +27,7 @@ solution schemes { U explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/sourcesProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/sourcesProperties index 31175f402b1f5a8ce4ac1eb6fed4be6a0992bd47..bcbbcceba00b10a24aab9c4cf18ab083b6dc3b74 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/sourcesProperties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/sourcesProperties @@ -29,7 +29,7 @@ source1 volumeMode absolute; injectionRate { - hs 12000; + h 12000; } } } diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties index 63e7e7175b9af8f49d1fd6d8001d7316c0173a90..1c62457dd61532b09090a3316ea9b82487696f4c 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes index 99d8f6e1c3d343dd6e34fef430ee81a1a5e98c49..1dcd78d42c4c538da5027f9ea95421fcafd462c9 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; @@ -49,7 +49,7 @@ laplacianSchemes laplacian(DepsilonEff,epsilon) Gauss linear orthogonal; laplacian(DREff,R) Gauss linear orthogonal; laplacian((rho*(1|A(U))),p) Gauss linear orthogonal; - laplacian(alphaEff,hs) Gauss linear orthogonal; + laplacian(alphaEff,h) Gauss linear orthogonal; } interpolationSchemes diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution index a6992031b30c05aae53e06034d8600753b6e8610..8294bbda048a8dfeb461359383f5248cc000dab7 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution @@ -54,7 +54,7 @@ solvers relTol 0; } - "(U|hs|R|k|epsilon)" + "(U|h|R|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -62,7 +62,7 @@ solvers relTol 0.1; } - "(U|hs|R|k|epsilon)Final" + "(U|h|R|k|epsilon)Final" { $U; tolerance 1e-05; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties index 4823654b9a7c5aad1100b649419b2476a8508a3e..6c3b76d656baaeed9816e4cd76bff07cccff8b9f 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/sourcesProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/sourcesProperties index ab2601c34c833bd2a0a225f56fd88c82cc5e0f6f..7f40e5d0325447e8b0d3156e6b855d3a2bc5c4c6 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/sourcesProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/sourcesProperties @@ -79,7 +79,7 @@ energySource1 volumeMode absolute; injectionRate { - hs 10; + h 10; } } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermophysicalProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermophysicalProperties index f5879b64a43e4cfd697dc18bc399f8f8e2381b16..402f445906cd47951fec15683d5a06d8f18168a0 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermophysicalProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsRhoMixtureThermo<reactingMixture<icoPoly8ThermoPhysics>>; +thermoType heRhoReactionThermo<reactingMixture<icoPoly8ThermoPhysics>>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSchemes b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSchemes index f2abd9112f30100f1b0157e750f21aaeb4ab075b..dc13503bc633d18d9c900d4b7371c6ab0afd7d5f 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSchemes +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; @@ -49,7 +49,7 @@ laplacianSchemes laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian((rho*(1|A(U))),p) Gauss linear corrected; - laplacian(alphaEff,hs) Gauss linear corrected; + laplacian(alphaEff,h) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution index 672f614cf5e5aff9be0f46a9ff3e0a9f880b1cbe..2baec5e7c3edc7c30a232c9525c5fe4496e3f9df 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs|k|epsilon)" + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs|k|epsilon)Final" + "(U|h|k|epsilon)Final" { $U; tolerance 1e-06; @@ -70,7 +70,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties index 7356b7134d74744138337fe7b38cc07fdfc9e9af..26d5e517be3e5c53c0743758d986a915559909cf 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermophysicalProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermophysicalProperties index ed3725758ecdffb4657fa9d45aeecf6b56edf0ad..70ff6cdd504161fac91d6d49bedab170cd8ebd38 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermophysicalProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsRhoMixtureThermo<reactingMixture<icoPoly8ThermoPhysics>>; +thermoType heRhoReactionThermo<reactingMixture<icoPoly8ThermoPhysics>>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSchemes b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSchemes index f7d8cb9e593dd083d3290b0dfbd88ba14b88933c..e7d730d2f8c4270a13d6bf9f148931d9fe5ce171 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSchemes +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss upwind; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,omega) Gauss upwind; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSolution b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSolution index b4db5d15937367f3c9585de25c3ff77ae5c6dad2..979cac593cf13ddc5065e3d99e67f8afd7c5d403 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSolution +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs|k|epsilon)" + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs|k|epsilon)Final" + "(U|h|k|epsilon)Final" { $U; tolerance 1e-05; @@ -71,7 +71,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties index aea506a90d7cb7f4cfc291d746f7381bbe7a8602..a4bf2e07e735dc3d1447abbb6b333cd200770b5b 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermophysicalProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermophysicalProperties index 52c55104b8ed16b366623ab91e6f9fbeecf45aab..5d715a78573e5dde934c1fc94bf0c24e9ee2caa3 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermophysicalProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsRhoMixtureThermo<reactingMixture<icoPoly8ThermoPhysics>>; +thermoType heRhoReactionThermo<reactingMixture<icoPoly8ThermoPhysics>>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSchemes b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSchemes index 15fb830b80142e26c4420acc5ef19a3f78d3f82c..c32fa27d2799d0744228af9365b2f112095d779e 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSchemes +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss upwind; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,omega) Gauss upwind; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSolution b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSolution index 5b2f1ca871fd70531e242bb2d28f1edb2ff056c5..8e76e79670320136c8ff03f028293c8737ef79d0 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSolution +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs|k|omega)" + "(U|h|k|omega)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs|k|omega)Final" + "(U|h|k|omega)Final" { $U; tolerance 1e-06; @@ -71,7 +71,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/reactingCloud1Properties index 36786661bfdc6bf0dd852c7d34ca05c53e28b176..83033b60de89195a09067a8b4c54d41b4deb21e4 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/thermophysicalProperties index a12807251c3a9a2cfbcf147f81eff10d0888174a..5938ce87a3f02fbf34401cd5623e3ac699d484fb 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/thermophysicalProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes index 57fb0a2e123b417fe11b2e860de95b38eea1cc9d..560f65db18d983a254a1c59472efa671a5822f68 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,epsilon) Gauss upwind; div(U) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; - div(phi,Yi_hs) Gauss upwind; + div(phi,Yi_h) Gauss upwind; } laplacianSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSolution index 5cc362f928d3a8fcd8544d884fea1ce0790b4769..b05dd58db6c673a7146a0cf992f798ba5421ad4f 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs)" + "(U|h)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs)Final" + "(U|h)Final" { $U; relTol 0; @@ -69,7 +69,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes index 4c4e4e9fecee0153dd4f8fad3efa460a44c65c76..cab4ed8a5bea0cf804749e978ba73b35eecd717c 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes @@ -21,7 +21,7 @@ ddtSchemes ddt(deltaf*rhof) Euler; ddt(rhof,deltaf) Euler; ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hsf) Euler; + ddt(deltaf*rhof,hf) Euler; } divSchemes @@ -29,7 +29,7 @@ divSchemes default none; div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hsf) Gauss upwind; + div(phi,hf) Gauss upwind; div(nHat) Gauss linear; div(grad(nHat)) Gauss linear; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSolution index 1f7ef7077dc59783ed583d3e83f551e84dbdb843..381a5c4f27841eb58906d9902ce7a15261dc7eb2 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - "(Uf|hsf|deltaf\*rhof)" + "(Uf|hf|deltaf\*rhof)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties index f3167d9cc05dc32ee47cfb453301e1f7060f81b1..b6974ed32fcb2372923bc2a244e3ff2be1ce37bd 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/thermophysicalProperties index a12807251c3a9a2cfbcf147f81eff10d0888174a..5938ce87a3f02fbf34401cd5623e3ac699d484fb 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/thermophysicalProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes index 729ed886a08b2ef6ebab37497f8d32b322833d34..906c819b4535544301c2cfd5718f82e4ceec3f31 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,epsilon) Gauss upwind; div(U) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; - div(phi,Yi_hs) Gauss upwind; + div(phi,Yi_h) Gauss upwind; } laplacianSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSolution index ccf9d4a524cb87c3dbd263fa01d24bdaa2d58f55..fcce5dd225b5d63ebb2231f6d1cebc8c402be6cc 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs|k|epsilon)" + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs|k|epsilon)Final" + "(U|h|k|epsilon)Final" { $U; relTol 0; @@ -71,7 +71,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes index 313931a5e4af193c18e475b2ac18e654192b7cd7..d93ea9bbbd4c32877f7c344fdefbbc9e30eaa5b8 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes @@ -21,7 +21,7 @@ ddtSchemes ddt(deltaf*rhof) Euler; ddt(rhof,deltaf) Euler; ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hsf) Euler; + ddt(deltaf*rhof,hf) Euler; } divSchemes @@ -29,7 +29,7 @@ divSchemes default none; div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hsf) Gauss upwind; + div(phi,hf) Gauss upwind; div(nHat) Gauss linear; } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSolution index fccf5fcd99830e4b561819604d21b8ffc3b852c0..cfae8b06ceb271cf05a9ee11ec39344afa079585 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - "(Uf|hsf|deltaf\*rhof)" + "(Uf|hf|deltaf\*rhof)" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/thermophysicalProperties index a12807251c3a9a2cfbcf147f81eff10d0888174a..5938ce87a3f02fbf34401cd5623e3ac699d484fb 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/thermophysicalProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes index da2e0b525030bca7e49896c52a7def0d70e6564e..7cb2760736596de38c86627d15126e4182770f65 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,epsilon) Gauss upwind; div(U) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; - div(phi,Yi_hs) Gauss upwind; + div(phi,Yi_h) Gauss upwind; } laplacianSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSolution index 5cc362f928d3a8fcd8544d884fea1ce0790b4769..b05dd58db6c673a7146a0cf992f798ba5421ad4f 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs)" + "(U|h)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs)Final" + "(U|h)Final" { $U; relTol 0; @@ -69,7 +69,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes index 970936568e9ef696e1f027f5eafe2c9b60f1cd55..05a7bee9662affbc950047a3d602f8619633b0df 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes @@ -21,7 +21,7 @@ ddtSchemes ddt(deltaf*rhof) Euler; ddt(rhof,deltaf) Euler; ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hsf) Euler; + ddt(deltaf*rhof,hf) Euler; } divSchemes @@ -29,7 +29,7 @@ divSchemes default none; div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hsf) Gauss upwind; + div(phi,hf) Gauss upwind; } gradSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSolution index 0c910f668d08a9bde3adb045ef1f75c3c26ae39c..645d42a4563911f1bd0f6adc3531cea607b3bfda 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - "(Uf|hsf|deltaf\*rhof)" + "(Uf|hf|deltaf\*rhof)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties index 0159c5ee7e40937cac48b79a25f87206831575e0..fb970e5e16c40710eb10ddfe5105d91a7122375a 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/thermophysicalProperties index a12807251c3a9a2cfbcf147f81eff10d0888174a..5938ce87a3f02fbf34401cd5623e3ac699d484fb 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/thermophysicalProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes index 729ed886a08b2ef6ebab37497f8d32b322833d34..906c819b4535544301c2cfd5718f82e4ceec3f31 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,epsilon) Gauss upwind; div(U) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; - div(phi,Yi_hs) Gauss upwind; + div(phi,Yi_h) Gauss upwind; } laplacianSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSolution index 5cc362f928d3a8fcd8544d884fea1ce0790b4769..b05dd58db6c673a7146a0cf992f798ba5421ad4f 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs)" + "(U|h)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs)Final" + "(U|h)Final" { $U; relTol 0; @@ -69,7 +69,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes index d297eaf01fa92d21b3d262d8fee1c5dffc7bbada..5ede0210d6a79560a7a25eb5e1e584628ef1e823 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes @@ -21,7 +21,7 @@ ddtSchemes ddt(deltaf*rhof) Euler; ddt(rhof,deltaf) Euler; ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hsf) Euler; + ddt(deltaf*rhof,hf) Euler; } divSchemes @@ -29,7 +29,7 @@ divSchemes default none; div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hsf) Gauss upwind; + div(phi,hf) Gauss upwind; } gradSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSolution index 1f7ef7077dc59783ed583d3e83f551e84dbdb843..381a5c4f27841eb58906d9902ce7a15261dc7eb2 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - "(Uf|hsf|deltaf\*rhof)" + "(Uf|hf|deltaf\*rhof)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties index c5ea248073098171d2da0e7bc50752b85664b74d..23003334a5e3ab6ff5b9060e5fd0d87faf5293a0 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties index 8236d34685c1a5a821c4f488a344f971a048856d..c8234a7827fb0403f300e9d54fd0b177ca6ab4d5 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes index f2abd9112f30100f1b0157e750f21aaeb4ab075b..dc13503bc633d18d9c900d4b7371c6ab0afd7d5f 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; @@ -49,7 +49,7 @@ laplacianSchemes laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian((rho*(1|A(U))),p) Gauss linear corrected; - laplacian(alphaEff,hs) Gauss linear corrected; + laplacian(alphaEff,h) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution index da8532734c6e42d0b4b76650313b1c16f262a4bf..32bfc5346c71d544e6a38865642a29c6f5e270ed 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs)" + "(U|h)" { solver PBiCG; preconditioner DILU; @@ -55,7 +55,7 @@ solvers relTol 0; } - "(U|hs)Final" + "(U|h)Final" { $U; tolerance 1e-05; diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties index 27e6772ec8d221bf3e1402d6c9e079e7b4f57f56..22ca68f1f5ed6b380f4f23315f35aec07b73ff30 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties index 655ee3aebb78916e84a04868b39abd6cf72cc442..655c9f51d14161377e26b1438b929f7132a0bb47 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; +thermoType hePsiReactionThermo<reactingMixture<gasThermoPhysics>>; CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes index 99d8f6e1c3d343dd6e34fef430ee81a1a5e98c49..74c85361d18c75d0ab1629e62011f3a3a41b4af1 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; @@ -49,7 +49,7 @@ laplacianSchemes laplacian(DepsilonEff,epsilon) Gauss linear orthogonal; laplacian(DREff,R) Gauss linear orthogonal; laplacian((rho*(1|A(U))),p) Gauss linear orthogonal; - laplacian(alphaEff,hs) Gauss linear orthogonal; + laplacian(alphaEff,h) Gauss linear orthogonal; } interpolationSchemes diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSolution b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSolution index 1766415070018ad2149394378f93d2c608de9cf5..9cff5583eb34868eccf3adf34460e79690986044 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSolution +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs)" + "(U|h)" { solver PBiCG; preconditioner DILU; @@ -55,7 +55,7 @@ solvers relTol 0; } - "(U|hs)Final" + "(U|h)Final" { $U; tolerance 1e-05;