diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/Make/files b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/Make/files index f3a1514a4c..159e04c950 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/Make/files +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/Make/files @@ -4,14 +4,12 @@ multiphaseSystem/multiphaseSystem.C diameter = diameterModels $(diameter)/diameterModel/diameterModel.C -$(diameter)/diameterModel/diameterModelNew.C $(diameter)/constantDiameter/constantDiameter.C $(diameter)/isothermalDiameter/isothermalDiameter.C drag = interfacialModels/dragModels $(drag)/dragModel/dragModel.C -$(drag)/dragModel/dragModelNew.C $(drag)/Ergun/Ergun.C $(drag)/GidaspowErgunWenYu/GidaspowErgunWenYu.C $(drag)/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C @@ -24,7 +22,6 @@ $(drag)/interface/interface.C heatTransfer = interfacialModels/heatTransferModels $(heatTransfer)/heatTransferModel/heatTransferModel.C -$(heatTransfer)/heatTransferModel/heatTransferModelNew.C $(heatTransfer)/RanzMarshall/RanzMarshall.C diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.C b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.C index 18d622cdfe..f1136346d6 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.C +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.C @@ -59,12 +59,6 @@ Foam::diameterModels::constant::constant {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::diameterModels::constant::~constant() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp Foam::diameterModels::constant::d() const diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.H b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.H index b8ee5b91fc..27cb0482ee 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.H +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,7 +55,7 @@ class constant : public diameterModel { - // Private data + // Private Data //- The constant diameter of the phase dimensionedScalar d_; @@ -77,7 +78,7 @@ public: //- Destructor - virtual ~constant(); + virtual ~constant() = default; // Member Functions diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.C b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.C index 432e4acc63..4a8be8ea37 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.C +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,10 +50,40 @@ Foam::diameterModel::diameterModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::diameterModel::~diameterModel() -{} +Foam::autoPtr Foam::diameterModel::New +( + const dictionary& dict, + const phaseModel& phase +) +{ + const word modelType(dict.get("diameterModel")); + + Info<< "Selecting diameterModel for phase " + << phase.name() + << ": " + << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "diameterModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter() + ( + dict.optionalSubDict(modelType + "Coeffs"), + phase + ); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.H b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.H index c1c159370e..cc3c945965 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.H +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +32,6 @@ Description SourceFiles diameterModel.C - newDiameterModel.C \*---------------------------------------------------------------------------*/ @@ -55,9 +55,10 @@ class diameterModel { protected: - // Protected data + // Protected Data const dictionary& dict_; + const phaseModel& phase_; @@ -92,7 +93,7 @@ public: //- Destructor - virtual ~diameterModel(); + virtual ~diameterModel() = default; // Selectors diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/diameterModel/diameterModelNew.C b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/diameterModel/diameterModelNew.C deleted file mode 100644 index 3a0ae61d98..0000000000 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/diameterModel/diameterModelNew.C +++ /dev/null @@ -1,67 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "diameterModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::diameterModel::New -( - const dictionary& dict, - const phaseModel& phase -) -{ - const word modelType(dict.get("diameterModel")); - - Info << "Selecting diameterModel for phase " - << phase.name() - << ": " - << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "diameterModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter() - ( - dict.optionalSubDict(modelType + "Coeffs"), - phase - ); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C index 1da88d07ba..cf2c79d16b 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C @@ -60,12 +60,6 @@ Foam::diameterModels::isothermal::isothermal {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::diameterModels::isothermal::~isothermal() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp Foam::diameterModels::isothermal::d() const diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.H b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.H index 02eccd8481..b42ef69a89 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.H +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,7 +55,7 @@ class isothermal : public diameterModel { - // Private data + // Private Data //- Reference diameter for the isothermal expansion dimensionedScalar d0_; @@ -80,7 +81,7 @@ public: //- Destructor - virtual ~isothermal(); + virtual ~isothermal() = default; // Member Functions diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/blended/blended.C b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/blended/blended.C index 5e189ff5c4..2a96058f9e 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/blended/blended.C +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/blended/blended.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,12 +62,6 @@ Foam::dragModels::blended::blended {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::dragModels::blended::~blended() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp Foam::dragModels::blended::K diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/blended/blended.H b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/blended/blended.H index 1e1aad2e32..2557bab0e6 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/blended/blended.H +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/blended/blended.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -80,7 +81,7 @@ public: //- Destructor - virtual ~blended(); + virtual ~blended() = default; // Member Functions diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.C b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.C index 1a3ef29b78..98dcc4e426 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.C +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -40,23 +41,50 @@ namespace Foam Foam::dragModel::dragModel ( - const dictionary& interfaceDict, + const dictionary& dict, const phaseModel& phase1, const phaseModel& phase2 ) : - interfaceDict_(interfaceDict), + interfaceDict_(dict), phase1_(phase1), phase2_(phase2), - residualPhaseFraction_("residualPhaseFraction", dimless, interfaceDict), - residualSlip_("residualSlip", dimVelocity, interfaceDict) + residualPhaseFraction_("residualPhaseFraction", dimless, dict), + residualSlip_("residualSlip", dimVelocity, dict) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::dragModel::~dragModel() -{} +Foam::autoPtr Foam::dragModel::New +( + const dictionary& dict, + const phaseModel& phase1, + const phaseModel& phase2 +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting dragModel for phase " + << phase1.name() + << ": " + << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "dragModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, phase1, phase2); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.H b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.H index 028011dce0..a3b2365e5f 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.H +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.H @@ -30,7 +30,6 @@ Description SourceFiles dragModel.C - newDragModel.C \*---------------------------------------------------------------------------*/ @@ -54,7 +53,7 @@ class dragModel { protected: - // Protected data + // Protected Data const dictionary& interfaceDict_; const phaseModel& phase1_; @@ -88,21 +87,21 @@ public: dragModel ( - const dictionary& interfaceDict, + const dictionary& dict, const phaseModel& phase1, const phaseModel& phase2 ); //- Destructor - virtual ~dragModel(); + virtual ~dragModel() = default; // Selectors static autoPtr New ( - const dictionary& interfaceDict, + const dictionary& dict, const phaseModel& phase1, const phaseModel& phase2 ); diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModelNew.C b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModelNew.C deleted file mode 100644 index dc40708dc6..0000000000 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModelNew.C +++ /dev/null @@ -1,64 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "dragModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::dragModel::New -( - const dictionary& interfaceDict, - const phaseModel& phase1, - const phaseModel& phase2 -) -{ - const word modelType(interfaceDict.get("type")); - - Info << "Selecting dragModel for phase " - << phase1.name() - << ": " - << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - interfaceDict, - "dragModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(interfaceDict, phase1, phase2); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/interface/interface.C b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/interface/interface.C index 2717f3fab7..f26752e827 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/interface/interface.C +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/interface/interface.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -59,12 +60,6 @@ Foam::dragModels::interface::interface {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::dragModels::interface::~interface() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp Foam::dragModels::interface::K diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/interface/interface.H b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/interface/interface.H index fcb1d89473..097a81b792 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/interface/interface.H +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/dragModels/interface/interface.H @@ -73,7 +73,7 @@ public: //- Destructor - virtual ~interface(); + virtual ~interface() = default; // Member Functions diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C index e1769c0f49..eafd274b28 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2012 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -40,23 +41,54 @@ namespace Foam Foam::heatTransferModel::heatTransferModel ( - const dictionary& interfaceDict, + const dictionary& dict, const volScalarField& alpha1, const phaseModel& phase1, const phaseModel& phase2 ) : - interfaceDict_(interfaceDict), + interfaceDict_(dict), alpha1_(alpha1), phase1_(phase1), phase2_(phase2) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::heatTransferModel::~heatTransferModel() -{} +Foam::autoPtr Foam::heatTransferModel::New +( + const dictionary& dict, + const volScalarField& alpha1, + const phaseModel& phase1, + const phaseModel& phase2 +) +{ + const word modelType + ( + dict.get("heatTransferModel" + phase1.name()) + ); + + Info<< "Selecting heatTransferModel for phase " + << phase1.name() + << ": " + << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "heatTransferModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, alpha1, phase1, phase2); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H index baa5b6bf55..fc94fb69d0 100644 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H +++ b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,7 +55,7 @@ class heatTransferModel { protected: - // Protected data + // Protected Data const dictionary& interfaceDict_; const volScalarField& alpha1_; @@ -76,12 +77,12 @@ public: heatTransferModel, dictionary, ( - const dictionary& interfaceDict, + const dictionary& dict, const volScalarField& alpha1, const phaseModel& phase1, const phaseModel& phase2 ), - (interfaceDict, alpha1, phase1, phase2) + (dict, alpha1, phase1, phase2) ); @@ -89,7 +90,7 @@ public: heatTransferModel ( - const dictionary& interfaceDict, + const dictionary& dict, const volScalarField& alpha1, const phaseModel& phase1, const phaseModel& phase2 @@ -97,14 +98,14 @@ public: //- Destructor - virtual ~heatTransferModel(); + virtual ~heatTransferModel() = default; // Selectors static autoPtr New ( - const dictionary& interfaceDict, + const dictionary& dict, const volScalarField& alpha1, const phaseModel& phase1, const phaseModel& phase2 diff --git a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModelNew.C b/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModelNew.C deleted file mode 100644 index ba8fda8aa1..0000000000 --- a/src/phaseSystemModels/multiphaseEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModelNew.C +++ /dev/null @@ -1,68 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "heatTransferModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::heatTransferModel::New -( - const dictionary& interfaceDict, - const volScalarField& alpha1, - const phaseModel& phase1, - const phaseModel& phase2 -) -{ - const word modelType - ( - interfaceDict.get("heatTransferModel" + phase1.name()) - ); - - Info<< "Selecting heatTransferModel for phase " - << phase1.name() - << ": " - << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - interfaceDict, - "heatTransferModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(interfaceDict, alpha1, phase1, phase2); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/InterfaceCompositionModel/InterfaceCompositionModel.H b/src/phaseSystemModels/multiphaseInter/phasesSystem/InterfaceCompositionModel/InterfaceCompositionModel.H index 649736a5c1..8f70f06ed5 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/InterfaceCompositionModel/InterfaceCompositionModel.H +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/InterfaceCompositionModel/InterfaceCompositionModel.H @@ -45,6 +45,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phaseModel; class phasePair; template class pureMixture; diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/Make/files b/src/phaseSystemModels/multiphaseInter/phasesSystem/Make/files index 0a0155ca5c..ce9bf08878 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/Make/files +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/Make/files @@ -1,5 +1,4 @@ phaseModel/phaseModel/phaseModel.C -phaseModel/phaseModel/phaseModelNew.C phaseModel/phaseModel/phaseModels.C phasePair/phasePair.C @@ -13,19 +12,16 @@ multiphaseSystem/multiphaseSystemNew.C multiphaseSystem/multiphaseSystems.C interfaceCompositionModel/interfaceCompositionModel.C -interfaceCompositionModel/interfaceCompositionModelNew.C InterfaceCompositionModel/InterfaceCompositionModels.C porous = interfaceModels/porousModels $(porous)/porousModel/porousModel.C -$(porous)/porousModel/porousModelNew.C $(porous)/VollerPrakash/VollerPrakash.C /* Ununsed? */ /* surfaceTension = interfaceModels/surfaceTensionModels $(surfaceTension)/surfaceTensionModel/surfaceTensionModel.C -$(surfaceTension)/surfaceTensionModel/surfaceTensionModelNew.C $(surfaceTension)/constantSurfaceTensionCoefficient/constantSurfaceTensionCoefficient.C */ diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceCompositionModel/interfaceCompositionModel.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceCompositionModel/interfaceCompositionModel.C index c6404fa54a..320a0fcc88 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceCompositionModel/interfaceCompositionModel.C +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceCompositionModel/interfaceCompositionModel.C @@ -39,7 +39,7 @@ namespace Foam const Foam::Enum -Foam::interfaceCompositionModel::modelVariableNames +Foam::interfaceCompositionModel::modelVariableNames_ { { modelVariable::T, "temperature" }, { modelVariable::P, "pressure" }, @@ -58,7 +58,7 @@ Foam::interfaceCompositionModel::interfaceCompositionModel : modelVariable_ ( - modelVariableNames.getOrDefault + modelVariableNames_.getOrDefault ( "variable", dict, @@ -72,6 +72,45 @@ Foam::interfaceCompositionModel::interfaceCompositionModel {} +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::interfaceCompositionModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType + ( + dict.get("type") + + "<" + + pair.phase1().thermo().type() + + "," + + pair.phase2().thermo().type() + + ">" + ); + + Info<< "Selecting interfaceCompositionModel for " + << pair << ": " << modelType << endl; + + const auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "interfaceCompositionModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, pair); +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // const Foam::word Foam::interfaceCompositionModel::transferSpecie() const @@ -86,9 +125,9 @@ const Foam::phasePair& Foam::interfaceCompositionModel::pair() const } -const Foam::word Foam::interfaceCompositionModel::variable() const +const Foam::word& Foam::interfaceCompositionModel::variable() const { - return modelVariableNames[modelVariable_]; + return modelVariableNames_[modelVariable_]; } @@ -103,4 +142,5 @@ bool Foam::interfaceCompositionModel::includeVolChange() return includeVolChange_; } + // ************************************************************************* // diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceCompositionModel/interfaceCompositionModel.H b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceCompositionModel/interfaceCompositionModel.H index a2c82c7e94..3993d33dc0 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceCompositionModel/interfaceCompositionModel.H +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceCompositionModel/interfaceCompositionModel.H @@ -41,8 +41,8 @@ SourceFiles #include "volFields.H" #include "dictionary.H" -#include "runTimeSelectionTables.H" #include "Enum.H" +#include "runTimeSelectionTables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,7 +61,7 @@ class interfaceCompositionModel { public: - // Public type + // Public Types //- Enumeration for variable based mass transfer models enum modelVariable @@ -72,19 +72,19 @@ public: alpha /* alpha source */ }; - static const Enum modelVariableNames; +protected: - //- Enumeration for model variables + // Protected Data + + //- Selection names for the modelVariable + static const Enum modelVariableNames_; + + //- Enumeration for the model variable modelVariable modelVariable_; //- Add volume change in pEq bool includeVolChange_; - -protected: - - // Protected Data - //- Phase pair const phasePair& pair_; @@ -141,11 +141,10 @@ public: // Member Functions - //- Return the transferring species name const word transferSpecie() const; - //- Return pair + //- The phase pair const phasePair& pair() const; //- Interface mass fraction @@ -206,7 +205,7 @@ public: bool includeVolChange(); //- Returns the variable on which the model is based - const word variable() const; + const word& variable() const; }; diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceCompositionModel/interfaceCompositionModelNew.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceCompositionModel/interfaceCompositionModelNew.C deleted file mode 100644 index d0ce1de1f1..0000000000 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceCompositionModel/interfaceCompositionModelNew.C +++ /dev/null @@ -1,72 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "interfaceCompositionModel.H" -#include "phasePair.H" -#include "rhoThermo.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::interfaceCompositionModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType - ( - dict.get("type") - + "<" - + pair.phase1().thermo().type() - + "," - + pair.phase2().thermo().type() - + ">" - ); - - Info<< "Selecting interfaceCompositionModel for " - << pair << ": " << modelType << endl; - - const auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "interfaceCompositionModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/porousModels/porousModel/porousModel.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/porousModels/porousModel/porousModel.C index 2eac8ce585..dc3fe36408 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/porousModels/porousModel/porousModel.C +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/porousModels/porousModel/porousModel.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -60,6 +60,37 @@ Foam::porousModel::porousModel {} +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::porousModel::New +( + const dictionary& dict, + const fvMesh& mesh +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting porousModel for " + << ": " << modelType << endl; + + const auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "porousModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, mesh); +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::porousModel::writeData(Ostream& os) const diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/porousModels/porousModel/porousModel.H b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/porousModels/porousModel/porousModel.H index 193431edf7..3fb3aa332d 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/porousModels/porousModel/porousModel.H +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/porousModels/porousModel/porousModel.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,6 +45,7 @@ SourceFiles namespace Foam { +// Forward Declarations class fvMesh; /*---------------------------------------------------------------------------*\ @@ -57,7 +58,7 @@ class porousModel { protected: - // Protected data + // Protected Data //- Reference to mesh const fvMesh& mesh_; @@ -85,7 +86,7 @@ public: // Constructors - //- Construct from a dictionary and a phase pair + //- Construct from a dictionary and mesh porousModel ( const dictionary& dict, @@ -108,7 +109,7 @@ public: // Member Functions - //- Momemtum source + //- Momentum source virtual tmp S() const = 0; //- Dummy write for regIOobject diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/porousModels/porousModel/porousModelNew.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/porousModels/porousModel/porousModelNew.C deleted file mode 100644 index d2b06f2fb9..0000000000 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/porousModels/porousModel/porousModelNew.C +++ /dev/null @@ -1,61 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2017-2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "porousModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::porousModel::New -( - const dictionary& dict, - const fvMesh& mesh -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting porousModel for " - << ": " << modelType << endl; - - const auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "porousModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, mesh); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.C index e2d88de41a..dc293dc08a 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.C +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -62,6 +62,37 @@ Foam::surfaceTensionModel::surfaceTensionModel {} +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::surfaceTensionModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting surfaceTensionModel for " + << pair << ": " << modelType << endl; + + const auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "surfaceTensionModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, pair, true); +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::surfaceTensionModel::writeData(Ostream& os) const diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.H b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.H index d33a3e6a93..d577ad27dd 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.H +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +30,6 @@ Description SourceFiles surfaceTensionModel.C - surfaceTensionModelNew.C \*---------------------------------------------------------------------------*/ @@ -46,6 +45,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -58,7 +58,7 @@ class surfaceTensionModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -111,7 +111,7 @@ public: // Member Functions - //- Aspect ratio + //- Surface tension virtual tmp sigma() const = 0; //- Dummy write for regIOobject diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModelNew.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModelNew.C deleted file mode 100644 index 22a02814a6..0000000000 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModelNew.C +++ /dev/null @@ -1,61 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2017-2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "surfaceTensionModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::surfaceTensionModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting surfaceTensionModel for " - << pair << ": " << modelType << endl; - - const auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "surfaceTensionModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, pair, true); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseModel/phaseModel/phaseModel.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseModel/phaseModel/phaseModel.C index 54add3fac8..4e3d0ea34d 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseModel/phaseModel/phaseModel.C +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseModel/phaseModel/phaseModel.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -62,14 +62,41 @@ Foam::phaseModel::phaseModel {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -const Foam::word& Foam::phaseModel::name() const +Foam::autoPtr +Foam::phaseModel::New +( + const phaseSystem& fluid, + const word& phaseName +) { - return name_; + const dictionary& dict = fluid.subDict(phaseName); + + const word modelType(dict.get("type")); + + Info<< "Selecting phaseModel for " + << phaseName << ": " << modelType << endl; + + const auto cstrIter = phaseSystemConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "phaseModel", + modelType, + *phaseSystemConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(fluid, phaseName); } +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + const Foam::phaseSystem& Foam::phaseModel::fluid() const { return fluid_; diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseModel/phaseModel/phaseModel.H b/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseModel/phaseModel/phaseModel.H index 9ec0cad8a1..ccbf8fd3e5 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseModel/phaseModel/phaseModel.H +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseModel/phaseModel/phaseModel.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -28,10 +28,8 @@ Class Description - SourceFiles phaseModel.C - newphaseModel.C \*---------------------------------------------------------------------------*/ @@ -51,6 +49,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phaseSystem; /*---------------------------------------------------------------------------*\ @@ -110,8 +109,11 @@ public: // Member Functions - //- Return the name of this phase - const word& name() const; + //- The name of this phase + const word& name() const + { + return name_; + } //- Return the system to which this phase belongs const phaseSystem& fluid() const; diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseModel/phaseModel/phaseModelNew.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseModel/phaseModel/phaseModelNew.C deleted file mode 100644 index 45238a7ad0..0000000000 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseModel/phaseModel/phaseModelNew.C +++ /dev/null @@ -1,63 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2017-2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "phaseModel.H" -#include "phaseSystem.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::phaseModel::New -( - const phaseSystem& fluid, - const word& phaseName -) -{ - const dictionary& dict = fluid.subDict(phaseName); - - const word modelType(dict.get("type")); - - Info<< "Selecting phaseModel for " - << phaseName << ": " << modelType << endl; - - const auto cstrIter = phaseSystemConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "phaseModel", - modelType, - *phaseSystemConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(fluid, phaseName); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.C index df5ab3360e..0e78a9ee68 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,10 +46,36 @@ Foam::blendingMethod::blendingMethod {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::blendingMethod::~blendingMethod() -{} +Foam::autoPtr +Foam::blendingMethod::New +( + const word& modelName, + const dictionary& dict, + const wordList& phaseNames +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting " << modelName << " blending method: " + << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "blendingMethod", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, phaseNames); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H index 7df89ec9b2..0a47d158d9 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,7 +75,7 @@ public: // Constructors //- Construct from a dictionary - blendingMethod + explicit blendingMethod ( const dictionary& dict ); @@ -91,7 +92,7 @@ public: //- Destructor - virtual ~blendingMethod(); + virtual ~blendingMethod() = default; // Member Functions diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethodNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethodNew.C deleted file mode 100644 index d42f2adceb..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethodNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "blendingMethod.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::blendingMethod::New -( - const word& modelName, - const dictionary& dict, - const wordList& phaseNames -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting " << modelName << " blending method: " - << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "blendingMethod", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, phaseNames); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/Make/files b/src/phaseSystemModels/reactingEuler/multiphaseSystem/Make/files index 0520c4d218..063053cac4 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/Make/files +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/Make/files @@ -1,5 +1,4 @@ phaseModel/phaseModel/phaseModel.C -phaseModel/phaseModel/phaseModelNew.C phaseModel/phaseModel/phaseModels.C phasePair/phasePairKey.C @@ -16,7 +15,6 @@ reactionThermo/hRefConstThermos.C diameter = diameterModels $(diameter)/diameterModel/diameterModel.C -$(diameter)/diameterModel/diameterModelNew.C $(diameter)/constantDiameter/constantDiameter.C $(diameter)/isothermalDiameter/isothermalDiameter.C $(diameter)/linearTsubDiameter/linearTsubDiameter.C @@ -65,7 +63,6 @@ $(nucleation)/wallBoiling/wallBoiling.C blending = BlendedInterfacialModel/blendingMethods $(blending)/blendingMethod/blendingMethod.C -$(blending)/blendingMethod/blendingMethodNew.C $(blending)/noBlending/noBlending.C $(blending)/linear/linear.C $(blending)/hyperbolic/hyperbolic.C @@ -75,7 +72,6 @@ interfacialModels/wallDependentModel/wallDependentModel.C aspectRatio = interfacialModels/aspectRatioModels $(aspectRatio)/aspectRatioModel/aspectRatioModel.C -$(aspectRatio)/aspectRatioModel/aspectRatioModelNew.C $(aspectRatio)/constantAspectRatio/constantAspectRatio.C $(aspectRatio)/TomiyamaAspectRatio/TomiyamaAspectRatio.C $(aspectRatio)/VakhrushevEfremov/VakhrushevEfremov.C @@ -83,7 +79,6 @@ $(aspectRatio)/Wellek/Wellek.C drag = interfacialModels/dragModels $(drag)/dragModel/dragModel.C -$(drag)/dragModel/dragModelNew.C $(drag)/Beetstra/Beetstra.C $(drag)/segregated/segregated.C $(drag)/Ergun/Ergun.C @@ -103,7 +98,6 @@ $(drag)/AttouFerschneider/AttouFerschneider.C lift = interfacialModels/liftModels $(lift)/liftModel/liftModel.C -$(lift)/liftModel/liftModelNew.C $(lift)/noLift/noLift.C $(lift)/constantLiftCoefficient/constantLiftCoefficient.C $(lift)/Moraga/Moraga.C @@ -113,25 +107,21 @@ $(lift)/wallDampedLift/wallDampedLift.C heatTransfer = interfacialModels/heatTransferModels $(heatTransfer)/heatTransferModel/heatTransferModel.C -$(heatTransfer)/heatTransferModel/heatTransferModelNew.C $(heatTransfer)/constantNu/constantNuHeatTransfer.C $(heatTransfer)/RanzMarshall/RanzMarshall.C $(heatTransfer)/sphericalHeatTransfer/sphericalHeatTransfer.C phaseTransfer = interfacialModels/phaseTransferModels $(phaseTransfer)/phaseTransferModel/phaseTransferModel.C -$(phaseTransfer)/phaseTransferModel/phaseTransferModelNew.C $(phaseTransfer)/deposition/deposition.C swarm = interfacialModels/swarmCorrections $(swarm)/swarmCorrection/swarmCorrection.C -$(swarm)/swarmCorrection/swarmCorrectionNew.C $(swarm)/noSwarm/noSwarm.C $(swarm)/TomiyamaSwarm/TomiyamaSwarm.C dispersion = interfacialModels/turbulentDispersionModels $(dispersion)/turbulentDispersionModel/turbulentDispersionModel.C -$(dispersion)/turbulentDispersionModel/turbulentDispersionModelNew.C $(dispersion)/noTurbulentDispersion/noTurbulentDispersion.C $(dispersion)/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C $(dispersion)/Burns/Burns.C @@ -140,14 +130,12 @@ $(dispersion)/LopezDeBertodano/LopezDeBertodano.C virtualMass = interfacialModels/virtualMassModels $(virtualMass)/virtualMassModel/virtualMassModel.C -$(virtualMass)/virtualMassModel/virtualMassModelNew.C $(virtualMass)/noVirtualMass/noVirtualMass.C $(virtualMass)/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C $(virtualMass)/Lamb/Lamb.C damping = interfacialModels/wallDampingModels $(damping)/wallDampingModel/wallDampingModel.C -$(damping)/wallDampingModel/wallDampingModelNew.C $(damping)/noWallDamping/noWallDamping.C $(damping)/interpolated/interpolatedWallDamping.C $(damping)/linear/linearWallDamping.C @@ -156,7 +144,6 @@ $(damping)/sine/sineWallDamping.C lubrication = interfacialModels/wallLubricationModels $(lubrication)/wallLubricationModel/wallLubricationModel.C -$(lubrication)/wallLubricationModel/wallLubricationModelNew.C $(lubrication)/noWallLubrication/noWallLubrication.C $(lubrication)/Antal/Antal.C $(lubrication)/Frank/Frank.C @@ -164,18 +151,15 @@ $(lubrication)/TomiyamaWallLubrication/TomiyamaWallLubrication.C composition = interfacialCompositionModels/interfaceCompositionModels $(composition)/interfaceCompositionModel/interfaceCompositionModel.C -$(composition)/interfaceCompositionModel/interfaceCompositionModelNew.C $(composition)/InterfaceCompositionModel/InterfaceCompositionModels.C massTransfer = interfacialCompositionModels/massTransferModels $(massTransfer)/massTransferModel/massTransferModel.C -$(massTransfer)/massTransferModel/massTransferModelNew.C $(massTransfer)/Frossling/Frossling.C $(massTransfer)/sphericalMassTransfer/sphericalMassTransfer.C saturation = interfacialCompositionModels/saturationModels $(saturation)/saturationModel/saturationModel.C -$(saturation)/saturationModel/saturationModelNew.C $(saturation)/Antoine/Antoine.C $(saturation)/AntoineExtended/AntoineExtended.C $(saturation)/ArdenBuck/ArdenBuck.C @@ -185,7 +169,6 @@ $(saturation)/constantSaturationConditions/constantSaturationConditions.C surfaceTension = interfacialCompositionModels/surfaceTensionModels $(surfaceTension)/surfaceTensionModel/surfaceTensionModel.C -$(surfaceTension)/surfaceTensionModel/surfaceTensionModelNew.C $(surfaceTension)/constantSurfaceTensionCoefficient/constantSurfaceTensionCoefficient.C @@ -204,7 +187,6 @@ wallBoilingSubModels = derivedFvPatchFields/wallBoilingSubModels partitioning = $(wallBoilingSubModels)/partitioningModels $(partitioning)/partitioningModel/partitioningModel.C -$(partitioning)/partitioningModel/partitioningModelNew.C $(partitioning)/phaseFraction/phaseFraction.C $(partitioning)/Lavieville/Lavieville.C $(partitioning)/cosine/cosine.C @@ -212,48 +194,39 @@ $(partitioning)/linear/linear.C nucleationSite = $(wallBoilingSubModels)/nucleationSiteModels $(nucleationSite)/nucleationSiteModel/nucleationSiteModel.C -$(nucleationSite)/nucleationSiteModel/nucleationSiteModelNew.C $(nucleationSite)/LemmertChawla/LemmertChawla.C departureDiam = $(wallBoilingSubModels)/departureDiameterModels $(departureDiam)/departureDiameterModel/departureDiameterModel.C -$(departureDiam)/departureDiameterModel/departureDiameterModelNew.C $(departureDiam)/TolubinskiKostanchuk/TolubinskiKostanchuk.C $(departureDiam)/KocamustafaogullariIshii/KocamustafaogullariIshii.C departureFreq = $(wallBoilingSubModels)/departureFrequencyModels $(departureFreq)/departureFrequencyModel/departureFrequencyModel.C -$(departureFreq)/departureFrequencyModel/departureFrequencyModelNew.C $(departureFreq)/Cole/Cole.C CHFModels = $(wallBoilingSubModels)/CHFModels $(CHFModels)/CHFModel/CHFModel.C -$(CHFModels)/CHFModel/CHFModelNew.C $(CHFModels)/Zuber/Zuber.C CHFSubCoolModels = $(wallBoilingSubModels)/CHFSubCoolModels $(CHFSubCoolModels)/CHFSubCoolModel/CHFSubCoolModel.C -$(CHFSubCoolModels)/CHFSubCoolModel/CHFSubCoolModelNew.C $(CHFSubCoolModels)/HuaXu/HuaXu.C filmBoiling = $(wallBoilingSubModels)/filmBoilingModels $(filmBoiling)/filmBoilingModel/filmBoilingModel.C -$(filmBoiling)/filmBoilingModel/filmBoilingModelNew.C $(filmBoiling)/Bromley/Bromley.C Leidenfrost = $(wallBoilingSubModels)/LeidenfrostModels $(Leidenfrost)/LeidenfrostModel/LeidenfrostModel.C -$(Leidenfrost)/LeidenfrostModel/LeidenfrostModelNew.C $(Leidenfrost)/Spiegler/Spiegler.C MHFModels = $(wallBoilingSubModels)/MHFModels $(MHFModels)/MHFModel/MHFModel.C -$(MHFModels)/MHFModel/MHFModelNew.C $(MHFModels)/Jeschar/Jeschar.C TDNBModels = $(wallBoilingSubModels)/TDNBModels $(TDNBModels)/TDNBModel/TDNBModel.C -$(TDNBModels)/TDNBModel/TDNBModelNew.C $(TDNBModels)/Schroeder/Schroeder.C /* Turbulence */ diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C index 30a7010cf5..329a92ab55 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C @@ -30,7 +30,6 @@ License #include "interfaceCompositionModel.H" #include "massTransferModel.H" - // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // template @@ -58,21 +57,12 @@ Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdt { const scalar iDmdtSign = Pair::compare(pair, key); - forAllConstIter + for ( - hashedWordList, - interfaceCompositionModels_[pair]->species(), - memberIter + const word& member + : interfaceCompositionModels_[pair]->species() ) { - const word& member = *memberIter; - - const word name(IOobject::groupName(member, phase.name())); - const word otherName - ( - IOobject::groupName(member, otherPhase.name()) - ); - tIDmdt.ref() += iDmdtSign *( @@ -87,7 +77,6 @@ Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdt } - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template @@ -202,10 +191,8 @@ InterfaceCompositionPhaseChangePhaseSystem iDmdtSu_.set(pair, new HashPtrTable()); iDmdtSp_.set(pair, new HashPtrTable()); - forAllConstIter(hashedWordList, compositionModel.species(), memberIter) + for (const word& member : compositionModel.species()) { - const word& member = *memberIter; - iDmdtSu_[pair]->set ( member, @@ -284,16 +271,8 @@ Foam::InterfaceCompositionPhaseChangePhaseSystem::dmdts() const const phaseModel& phase = pair.phase1(); const phaseModel& otherPhase = pair.phase2(); - forAllConstIter(hashedWordList, compositionModel.species(), memberIter) + for (const word& member : compositionModel.species()) { - const word& member = *memberIter; - - const word name(IOobject::groupName(member, phase.name())); - const word otherName - ( - IOobject::groupName(member, otherPhase.name()) - ); - const volScalarField iDmdt ( *(*iDmdtSu_[pair])[member] @@ -344,10 +323,12 @@ massTransfer() const massTransferModels_[unorderedPair][unorderedPair.index(phase)]->K() ); - forAllConstIter(hashedWordList, compositionModel.species(), memberIter) + for + ( + const word& member + : compositionModel.species() + ) { - const word& member = *memberIter; - const word name(IOobject::groupName(member, phase.name())); const word otherName ( diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H index d7f18ca648..91d3c3af40 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H @@ -49,6 +49,7 @@ SourceFiles namespace Foam { +// Forward Declarations class interfaceCompositionModel; class massTransferModel; @@ -63,7 +64,7 @@ class InterfaceCompositionPhaseChangePhaseSystem { protected: - // Protected typedefs + // Protected Typedefs typedef HashTable < @@ -84,14 +85,17 @@ protected: HashPtrTable, phasePairKey, phasePairKey::hash - > - iDmdtSuSpTable; + > iDmdtSuSpTable; - typedef HashPtrTable - iDmdtTable; + typedef HashPtrTable + < + volScalarField, + phasePairKey, + phasePairKey::hash + > iDmdtTable; - // Protected data + // Protected Data // Sub Models @@ -111,7 +115,7 @@ protected: mutable iDmdtSuSpTable iDmdtSp_; - // Protected member functions + // Protected Member Functions //- Return the interfacial mass transfer rate for a pair for a pair virtual tmp iDmdt(const phasePairKey& key) const; @@ -122,7 +126,7 @@ public: // Constructors //- Construct from fvMesh - InterfaceCompositionPhaseChangePhaseSystem(const fvMesh&); + explicit InterfaceCompositionPhaseChangePhaseSystem(const fvMesh&); //- Destructor diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/CHFModel/CHFModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/CHFModel/CHFModel.C index a702f5de9a..186ab4e7d3 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/CHFModel/CHFModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/CHFModel/CHFModel.C @@ -39,16 +39,33 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallBoilingModels::CHFModel::CHFModel() -{} +Foam::autoPtr +Foam::wallBoilingModels::CHFModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("type")); + Info<< "Selecting CHFModel: " << modelType << endl; -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); -Foam::wallBoilingModels::CHFModel::~CHFModel() -{} + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "CHFModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/CHFModel/CHFModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/CHFModel/CHFModel.H index c6096222d6..0b721494e3 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/CHFModel/CHFModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/CHFModel/CHFModel.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd + Copyright (C) 2018-2020 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +31,6 @@ Description SourceFiles CHFModel.C - newCHFModel.C \*---------------------------------------------------------------------------*/ @@ -57,15 +56,6 @@ namespace wallBoilingModels class CHFModel { - // Private Member Functions - - //- Disallow default bitwise copy construct - CHFModel(const CHFModel&); - - //- Disallow default bitwise assignment - void operator=(const CHFModel&); - - public: //- Runtime type information @@ -85,22 +75,21 @@ public: ); - // Constructors + // Generated Methods - //- Construct null - CHFModel(); + //- Default construct + CHFModel() = default; + + //- Destructor + virtual ~CHFModel() = default; // Selectors - //- Select null constructed + //- Select default constructed static autoPtr New(const dictionary& dict); - //- Destructor - virtual ~CHFModel(); - - // Member Functions //- Calculate temperature @@ -119,6 +108,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + } // End namespace wallBoilingModels } // End namespace Foam diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/CHFModel/CHFModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/CHFModel/CHFModelNew.C deleted file mode 100644 index 1da7b9ff68..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/CHFModel/CHFModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "CHFModel.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::wallBoilingModels::CHFModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting CHFModel: " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "CHFModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModel.C index fc380fbc18..16b589d52e 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModel.C @@ -39,16 +39,33 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallBoilingModels::CHFSubCoolModel::CHFSubCoolModel() -{} +Foam::autoPtr +Foam::wallBoilingModels::CHFSubCoolModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("type")); + Info<< "Selecting CHFSubCoolModel: " << modelType << endl; -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); -Foam::wallBoilingModels::CHFSubCoolModel::~CHFSubCoolModel() -{} + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "CHFSubCoolModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModel.H index c19bbd57fd..eee8802dcf 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModel.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd + Copyright (C) 2018-2020 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +31,6 @@ Description SourceFiles CHFSubCoolModel.C - newCHFSubCoolModel.C \*---------------------------------------------------------------------------*/ @@ -57,15 +56,6 @@ namespace wallBoilingModels class CHFSubCoolModel { - // Private Member Functions - - //- Disallow default bitwise copy construct - CHFSubCoolModel(const CHFSubCoolModel&); - - //- Disallow default bitwise assignment - void operator=(const CHFSubCoolModel&); - - public: //- Runtime type information @@ -85,22 +75,21 @@ public: ); - // Constructors + // Generated Methods - //- Construct null - CHFSubCoolModel(); + //- Default construct + CHFSubCoolModel() = default; + + //- Destructor + virtual ~CHFSubCoolModel() = default; // Selectors - //- Select null constructed + //- Select default constructed static autoPtr New(const dictionary& dict); - //- Destructor - virtual ~CHFSubCoolModel(); - - // Member Functions //- Calculate temperature @@ -119,6 +108,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + } // End namespace wallBoilingModels } // End namespace Foam diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModelNew.C deleted file mode 100644 index 1f672ba902..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModelNew.C +++ /dev/null @@ -1,59 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "CHFSubCoolModel.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::wallBoilingModels::CHFSubCoolModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting CHFSubCoolModel: " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "CHFSubCoolModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModel.C index e97d1cb115..48f285671f 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModel.C @@ -39,16 +39,33 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallBoilingModels::LeidenfrostModel::LeidenfrostModel() -{} +Foam::autoPtr +Foam::wallBoilingModels::LeidenfrostModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("type")); + Info<< "Selecting LeidenfrostModel: " << modelType << endl; -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); -Foam::wallBoilingModels::LeidenfrostModel::~LeidenfrostModel() -{} + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "LeidenfrostModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModel.H index 34973fe337..4217bbb967 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModel.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd + Copyright (C) 2018-2020 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +31,6 @@ Description SourceFiles LeidenfrostModel.C - newLeidenfrostModel.C \*---------------------------------------------------------------------------*/ @@ -57,15 +56,6 @@ namespace wallBoilingModels class LeidenfrostModel { - // Private Member Functions - - //- Disallow default bitwise copy construct - LeidenfrostModel(const LeidenfrostModel&); - - //- Disallow default bitwise assignment - void operator=(const LeidenfrostModel&); - - public: //- Runtime type information @@ -85,22 +75,21 @@ public: ); - // Constructors + // Generated Methods - //- Construct null - LeidenfrostModel(); + //- Default construct + LeidenfrostModel() = default; + + //- Destructor + virtual ~LeidenfrostModel() = default; // Selectors - //- Select null constructed + //- Select default constructed static autoPtr New(const dictionary& dict); - //- Destructor - virtual ~LeidenfrostModel(); - - // Member Functions //- Calculate temperature @@ -119,6 +108,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + } // End namespace wallBoilingModels } // End namespace Foam diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModelNew.C deleted file mode 100644 index 859060019e..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModelNew.C +++ /dev/null @@ -1,59 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "LeidenfrostModel.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::wallBoilingModels::LeidenfrostModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting LeidenfrostModel: " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "LeidenfrostModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/MHFModel/MHFModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/MHFModel/MHFModel.C index 25c715f9f3..59bf0f27d3 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/MHFModel/MHFModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/MHFModel/MHFModel.C @@ -39,16 +39,33 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallBoilingModels::MHFModel::MHFModel() -{} +Foam::autoPtr +Foam::wallBoilingModels::MHFModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("type")); + Info<< "Selecting MHFModel: " << modelType << endl; -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); -Foam::wallBoilingModels::MHFModel::~MHFModel() -{} + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "MHFModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/MHFModel/MHFModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/MHFModel/MHFModel.H index 33d89bb101..29cc4f70a0 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/MHFModel/MHFModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/MHFModel/MHFModel.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd + Copyright (C) 2018-2020 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +31,6 @@ Description SourceFiles MHFModel.C - newMHFModel.C \*---------------------------------------------------------------------------*/ @@ -57,15 +56,6 @@ namespace wallBoilingModels class MHFModel { - // Private Member Functions - - //- Disallow default bitwise copy construct - MHFModel(const MHFModel&); - - //- Disallow default bitwise assignment - void operator=(const MHFModel&); - - public: //- Runtime type information @@ -85,22 +75,21 @@ public: ); - // Constructors + // Generated Methods - //- Construct null - MHFModel(); + //- Default construct + MHFModel() = default; + + //- Destructor + virtual ~MHFModel() = default; // Selectors - //- Select null constructed + //- Select default constructed static autoPtr New(const dictionary& dict); - //- Destructor - virtual ~MHFModel(); - - // Member Functions //- Calculate temperature @@ -119,6 +108,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + } // End namespace wallBoilingModels } // End namespace Foam diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/MHFModel/MHFModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/MHFModel/MHFModelNew.C deleted file mode 100644 index a60fcae0c3..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/MHFModel/MHFModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2016 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "MHFModel.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::wallBoilingModels::MHFModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting MHFModel: " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "MHFModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModel.C index 3bc4f92ccb..de8829274e 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModel.C @@ -39,16 +39,33 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallBoilingModels::TDNBModel::TDNBModel() -{} +Foam::autoPtr +Foam::wallBoilingModels::TDNBModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("type")); + Info<< "Selecting TDNBModel: " << modelType << endl; -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); -Foam::wallBoilingModels::TDNBModel::~TDNBModel() -{} + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "TDNBModelType", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModel.H index da758c94c6..b459695858 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModel.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd + Copyright (C) 2018-2020 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +31,6 @@ Description SourceFiles TDNBModel.C - newTDNBModel.C \*---------------------------------------------------------------------------*/ @@ -57,15 +56,6 @@ namespace wallBoilingModels class TDNBModel { - // Private Member Functions - - //- Disallow default bitwise copy construct - TDNBModel(const TDNBModel&); - - //- Disallow default bitwise assignment - void operator=(const TDNBModel&); - - public: //- Runtime type information @@ -85,22 +75,21 @@ public: ); - // Constructors + // Generated Methods - //- Construct null - TDNBModel(); + //- Default construct + TDNBModel() = default; + + //- Destructor + virtual ~TDNBModel() = default; // Selectors - //- Select null constructed + //- Select default constructed static autoPtr New(const dictionary& dict); - //- Destructor - virtual ~TDNBModel(); - - // Member Functions //- Calculate temperature @@ -119,6 +108,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + } // End namespace wallBoilingModels } // End namespace Foam diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModelNew.C deleted file mode 100644 index 95f3ec45fd..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2016 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "TDNBModel.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::wallBoilingModels::TDNBModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting TDNBModel: " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "TDNBModelType", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C index 6924ae780f..5e3a45c090 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2019 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,16 +40,33 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallBoilingModels::departureDiameterModel::departureDiameterModel() -{} +Foam::autoPtr +Foam::wallBoilingModels::departureDiameterModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("type")); + Info<< "Selecting departureDiameterModel: " << modelType << endl; -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); -Foam::wallBoilingModels::departureDiameterModel::~departureDiameterModel() -{} + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "departureDiameterModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.H index 449481049f..6a285992a0 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +32,6 @@ Description SourceFiles departureDiameterModel.C - newdepartureDiameterModel.C \*---------------------------------------------------------------------------*/ @@ -52,20 +52,11 @@ namespace wallBoilingModels { /*---------------------------------------------------------------------------*\ - Class departureDiameterModel Declaration + Class departureDiameterModel Declaration \*---------------------------------------------------------------------------*/ class departureDiameterModel { - // Private Member Functions - - //- Disallow default bitwise copy construct - departureDiameterModel(const departureDiameterModel&); - - //- Disallow default bitwise assignment - void operator=(const departureDiameterModel&); - - public: //- Runtime type information @@ -85,22 +76,21 @@ public: ); - // Constructors + // Generated Methods - //- Construct null - departureDiameterModel(); + //- Default construct + departureDiameterModel() = default; + + //- Destructor + virtual ~departureDiameterModel() = default; // Selectors - //- Select null constructed + //- Select default constructed static autoPtr New(const dictionary& dict); - //- Destructor - virtual ~departureDiameterModel(); - - // Member Functions //- Calculate and return the departure diameter field @@ -119,6 +109,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + } // End namespace wallBoilingModels } // End namespace Foam diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModelNew.C deleted file mode 100644 index ac189e028d..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2016-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "departureDiameterModel.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::wallBoilingModels::departureDiameterModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting departureDiameterModel: " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "departureDiameterModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C index df600b18bf..b57a67a280 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2019 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,16 +40,33 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallBoilingModels::departureFrequencyModel::departureFrequencyModel() -{} +Foam::autoPtr +Foam::wallBoilingModels::departureFrequencyModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("type")); + Info<< "Selecting departureFrequencyModel: " << modelType << endl; -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); -Foam::wallBoilingModels::departureFrequencyModel::~departureFrequencyModel() -{} + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "departureFrequencyModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.H index b89f3700c1..405a186502 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +32,6 @@ Description SourceFiles departureFrequencyModel.C - newdepartureFrequencyModel.C \*---------------------------------------------------------------------------*/ @@ -52,20 +52,11 @@ namespace wallBoilingModels { /*---------------------------------------------------------------------------*\ - Class departureFrequencyModel Declaration + Class departureFrequencyModel Declaration \*---------------------------------------------------------------------------*/ class departureFrequencyModel { - // Private Member Functions - - //- Disallow default bitwise copy construct - departureFrequencyModel(const departureFrequencyModel&); - - //- Disallow default bitwise assignment - void operator=(const departureFrequencyModel&); - - public: //- Runtime type information @@ -85,22 +76,21 @@ public: ); - // Constructors + // Generated Methods - //- Construct null - departureFrequencyModel(); + //- Default construct + departureFrequencyModel() = default; + + //- Destructor + virtual ~departureFrequencyModel() = default; // Selectors - //- Select null constructed + //- Select default constructed static autoPtr New(const dictionary& dict); - //- Destructor - virtual ~departureFrequencyModel(); - - // Member Functions //- Calculate and return the bubble departure frequency @@ -117,6 +107,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + } // End namespace wallBoilingModels } // End namespace Foam diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModelNew.C deleted file mode 100644 index 21751e31fb..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2016-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "departureFrequencyModel.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::wallBoilingModels::departureFrequencyModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting departureFrequencyModel: " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "departureFrequencyModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModel.C index 12743eacdc..a52610fcf7 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModel.C @@ -39,16 +39,33 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallBoilingModels::filmBoilingModel::filmBoilingModel() -{} +Foam::autoPtr +Foam::wallBoilingModels::filmBoilingModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("type")); + Info<< "Selecting filmBoilingModel: " << modelType << endl; -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); -Foam::wallBoilingModels::filmBoilingModel::~filmBoilingModel() -{} + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "filmBoilingModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModel.H index 1e643936ae..966496817a 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModel.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd + Copyright (C) 2018-2020 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +31,6 @@ Description SourceFiles filmBoilingModel.C - newfilmBoilingModel.C \*---------------------------------------------------------------------------*/ @@ -57,15 +56,6 @@ namespace wallBoilingModels class filmBoilingModel { - // Private Member Functions - - //- Disallow default bitwise copy construct - filmBoilingModel(const filmBoilingModel&); - - //- Disallow default bitwise assignment - void operator=(const filmBoilingModel&); - - public: //- Runtime type information @@ -85,22 +75,21 @@ public: ); - // Constructors + // Generated Methods - //- Construct null - filmBoilingModel(); + //- Default construct + filmBoilingModel() = default; + + //- Destructor + virtual ~filmBoilingModel() = default; // Selectors - //- Select null constructed + //- Select default constructed static autoPtr New(const dictionary& dict); - //- Destructor - virtual ~filmBoilingModel(); - - // Member Functions //- Calculate temperature @@ -119,6 +108,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + } // End namespace wallBoilingModels } // End namespace Foam diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModelNew.C deleted file mode 100644 index 5c4d5c6d33..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "filmBoilingModel.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::wallBoilingModels::filmBoilingModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting filmBoilingModel: " - << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "filmBoilingModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C index 9c3dbe3cc1..271add0486 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2019 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,16 +40,33 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallBoilingModels::nucleationSiteModel::nucleationSiteModel() -{} +Foam::autoPtr +Foam::wallBoilingModels::nucleationSiteModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("type")); + Info<< "Selecting nucleationSiteModel: " << modelType << endl; -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); -Foam::wallBoilingModels::nucleationSiteModel::~nucleationSiteModel() -{} + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "nucleationSiteModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.H index fee9fa3db8..baedd16eb2 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.H @@ -31,7 +31,6 @@ Description SourceFiles nucleationSiteModel.C - newnucleationSiteModel.C \*---------------------------------------------------------------------------*/ @@ -48,6 +47,7 @@ SourceFiles namespace Foam { + namespace wallBoilingModels { @@ -57,15 +57,6 @@ namespace wallBoilingModels class nucleationSiteModel { - // Private Member Functions - - //- Disallow default bitwise copy construct - nucleationSiteModel(const nucleationSiteModel&); - - //- Disallow default bitwise assignment - void operator=(const nucleationSiteModel&); - - public: //- Runtime type information @@ -87,18 +78,18 @@ public: // Constructors - //- Construct null - nucleationSiteModel(); + //- Default construct + nucleationSiteModel() = default; // Selectors - //- Select null constructed + //- Select default constructed static autoPtr New(const dictionary& dict); //- Destructor - virtual ~nucleationSiteModel(); + virtual ~nucleationSiteModel() = default; // Member Functions @@ -119,6 +110,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + } // End namespace wallBoilingModels } // End namespace Foam diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModelNew.C deleted file mode 100644 index 11deb61e3b..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2016-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "nucleationSiteModel.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::wallBoilingModels::nucleationSiteModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting nucleationSiteModel: " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "nucleationSiteModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C index 862b90f520..363c3bb9c9 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2019 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,16 +40,34 @@ namespace Foam } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallBoilingModels::partitioningModel::partitioningModel() -{} +Foam::autoPtr +Foam::wallBoilingModels::partitioningModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("type")); + Info<< "Selecting partitioningModel: " + << modelType << endl; -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); -Foam::wallBoilingModels::partitioningModel::~partitioningModel() -{} + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "partitioningModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.H index ec6c8aa9a7..d9054a5fa1 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +32,6 @@ Description SourceFiles partitioningModel.C - newpartitioningModel.C \*---------------------------------------------------------------------------*/ @@ -55,15 +55,6 @@ namespace wallBoilingModels class partitioningModel { - // Private Member Functions - - //- Disallow default bitwise copy construct - partitioningModel(const partitioningModel&); - - //- Disallow default bitwise assignment - void operator=(const partitioningModel&); - - public: //- Runtime type information @@ -85,18 +76,18 @@ public: // Constructors - //- Construct null - partitioningModel(); + //- Default construct + partitioningModel() = default; // Selectors - //- Select null constructed + //- Select default constructed static autoPtr New(const dictionary& dict); //- Destructor - virtual ~partitioningModel(); + virtual ~partitioningModel() = default; // Member Functions @@ -112,6 +103,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + } // End namespace wallBoilingModels } // End namespace Foam diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModelNew.C deleted file mode 100644 index c031c423ce..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModelNew.C +++ /dev/null @@ -1,61 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2016-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "partitioningModel.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::wallBoilingModels::partitioningModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting partitioningModel: " - << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "partitioningModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.H index c29e8f85b9..c4860aa21e 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.H @@ -54,7 +54,7 @@ class constant : public diameterModel { - // Private data + // Private Data //- The constant diameter of the phase dimensionedScalar d_; diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.C index fae1a1a668..1db424aa50 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2019 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -40,19 +41,51 @@ namespace Foam Foam::diameterModel::diameterModel ( - const dictionary& diameterProperties, + const dictionary& dict, const phaseModel& phase ) : - diameterProperties_(diameterProperties), + diameterProperties_(dict), phase_(phase) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::diameterModel::~diameterModel() -{} +Foam::autoPtr +Foam::diameterModel::New +( + const dictionary& dict, + const phaseModel& phase +) +{ + const word modelType(dict.get("diameterModel")); + + Info<< "Selecting diameterModel for phase " + << phase.name() + << ": " + << modelType << endl; + + auto cstrIter = + dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "diameterModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter() + ( + dict.optionalSubDict(modelType + "Coeffs"), + phase + ); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -61,9 +94,9 @@ void Foam::diameterModel::correct() {} -bool Foam::diameterModel::read(const dictionary& phaseProperties) +bool Foam::diameterModel::read(const dictionary& dict) { - diameterProperties_ = phaseProperties.optionalSubDict(type() + "Coeffs"); + diameterProperties_ = dict.optionalSubDict(type() + "Coeffs"); return true; } diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.H index 3dcc8ed58b..8923468bfd 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/diameterModel/diameterModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,11 +28,10 @@ Class Foam::diameterModel Description - A2stract base-class for dispersed-phase particle diameter models. + Abstract base-class for dispersed-phase particle diameter models. SourceFiles diameterModel.C - newDiameterModel.C \*---------------------------------------------------------------------------*/ @@ -53,12 +53,12 @@ namespace Foam class diameterModel { - protected: - // Protected data + // Protected Data dictionary diameterProperties_; + const phaseModel& phase_; @@ -76,10 +76,10 @@ public: diameterModel, dictionary, ( - const dictionary& diameterProperties, + const dictionary& dict, const phaseModel& phase ), - (diameterProperties, phase) + (dict, phase) ); @@ -87,13 +87,13 @@ public: diameterModel ( - const dictionary& diameterProperties, + const dictionary& dict, const phaseModel& phase ); //- Destructor - virtual ~diameterModel(); + virtual ~diameterModel() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/diameterModel/diameterModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/diameterModel/diameterModelNew.C deleted file mode 100644 index 42da07b01c..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/diameterModel/diameterModelNew.C +++ /dev/null @@ -1,68 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "diameterModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::diameterModel::New -( - const dictionary& dict, - const phaseModel& phase -) -{ - const word modelType(dict.get("diameterModel")); - - Info << "Selecting diameterModel for phase " - << phase.name() - << ": " - << modelType << endl; - - auto cstrIter = - dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "diameterModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter() - ( - dict.optionalSubDict(modelType + "Coeffs"), - phase - ); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C index 29c308f14b..69880fb9c7 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C @@ -74,12 +74,6 @@ Foam::diameterModels::isothermal::isothermal {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::diameterModels::isothermal::~isothermal() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp Foam::diameterModels::isothermal::d() const diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.H index ece4f5c26f..fd600d08c1 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.H @@ -54,7 +54,7 @@ class isothermal : public diameterModel { - // Private data + // Private Data //- Reference diameter for the isothermal expansion dimensionedScalar d0_; @@ -83,7 +83,7 @@ public: //- Destructor - virtual ~isothermal(); + virtual ~isothermal() = default; // Member Functions diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.H index 00ed3c372c..f87c7e51b0 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.H @@ -45,6 +45,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phaseModel; class phasePair; template class pureMixture; diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C index b553f08698..a13a892f4c 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C @@ -51,14 +51,47 @@ Foam::interfaceCompositionModel::interfaceCompositionModel {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -const Foam::hashedWordList& Foam::interfaceCompositionModel::species() const +Foam::autoPtr +Foam::interfaceCompositionModel::New +( + const dictionary& dict, + const phasePair& pair +) { - return speciesNames_; + const word modelType + ( + dict.get("type") + + "<" + + pair.phase1().thermo().type() + + "," + + pair.phase2().thermo().type() + + ">" + ); + + Info<< "Selecting interfaceCompositionModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "interfaceCompositionModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair); } +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + bool Foam::interfaceCompositionModel::transports(word& speciesName) const { return this->speciesNames_.found(speciesName); diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H index 90d2b32420..b0472ecc1d 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,6 +50,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phaseModel; class phasePair; @@ -60,7 +62,7 @@ class interfaceCompositionModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -118,8 +120,11 @@ public: //- Update the composition virtual void update(const volScalarField& Tf) = 0; - //- Return the transferring species names - const hashedWordList& species() const; + //- The transferring species names + const hashedWordList& species() const + { + return speciesNames_; + } //- Returns whether the species is transported by the model and //- provides the name of the diffused species diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModelNew.C deleted file mode 100644 index feca4fd0c2..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModelNew.C +++ /dev/null @@ -1,72 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "interfaceCompositionModel.H" -#include "phasePair.H" -#include "rhoThermo.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::interfaceCompositionModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType - ( - dict.get("type") - + "<" - + pair.phase1().thermo().type() - + "," - + pair.phase2().thermo().type() - + ">" - ); - - Info<< "Selecting interfaceCompositionModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "interfaceCompositionModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/massTransferModels/massTransferModel/massTransferModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/massTransferModels/massTransferModel/massTransferModel.C index a9df0e2916..175874f5f9 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/massTransferModels/massTransferModel/massTransferModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/massTransferModels/massTransferModel/massTransferModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,10 +54,35 @@ Foam::massTransferModel::massTransferModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::massTransferModel::~massTransferModel() -{} +Foam::autoPtr +Foam::massTransferModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting massTransferModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "massTransferModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/massTransferModels/massTransferModel/massTransferModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/massTransferModels/massTransferModel/massTransferModel.H index c02825c3a4..7ae44c25f7 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/massTransferModels/massTransferModel/massTransferModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/massTransferModels/massTransferModel/massTransferModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -55,7 +57,7 @@ class massTransferModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -82,7 +84,7 @@ public: ); - // Static data members + // Static Data Members //- Coefficient dimensions static const dimensionSet dimK; @@ -99,7 +101,7 @@ public: //- Destructor - virtual ~massTransferModel(); + virtual ~massTransferModel() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/massTransferModels/massTransferModel/massTransferModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/massTransferModels/massTransferModel/massTransferModelNew.C deleted file mode 100644 index bab794630b..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/massTransferModels/massTransferModel/massTransferModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "massTransferModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::massTransferModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting massTransferModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "massTransferModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/saturationModels/saturationModel/saturationModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/saturationModels/saturationModel/saturationModel.C index 08a0a1791e..4bf5636786 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/saturationModels/saturationModel/saturationModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/saturationModels/saturationModel/saturationModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,10 +53,34 @@ Foam::saturationModel::saturationModel(const objectRegistry& db) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::saturationModel::~saturationModel() -{} +Foam::autoPtr +Foam::saturationModel::New +( + const dictionary& dict, + const objectRegistry& db +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting saturationModel: " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "saturationModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, db); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/saturationModels/saturationModel/saturationModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/saturationModels/saturationModel/saturationModel.H index ea25627b3a..7944a2eb77 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/saturationModels/saturationModel/saturationModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/saturationModels/saturationModel/saturationModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles saturationModel.C - newSaturationModel.C \*---------------------------------------------------------------------------*/ @@ -57,11 +57,11 @@ class saturationModel { // Private Member Functions - //- Disallow default bitwise copy construct - saturationModel(const saturationModel&); + //- No copy construct + saturationModel(const saturationModel&) = delete; - //- Disallow default bitwise assignment - void operator=(const saturationModel&); + //- No copy assignment + void operator=(const saturationModel&) = delete; public: @@ -85,13 +85,13 @@ public: // Constructors - //- Construct null - saturationModel(const objectRegistry& db); + //- Default constructed (from registry) + explicit saturationModel(const objectRegistry& db); // Selectors - //- Select null constructed + //- Select default constructed static autoPtr New ( const dictionary& dict, @@ -100,7 +100,7 @@ public: //- Destructor - virtual ~saturationModel(); + virtual ~saturationModel() = default; // Member Functions diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/saturationModels/saturationModel/saturationModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/saturationModels/saturationModel/saturationModelNew.C deleted file mode 100644 index a234c7e592..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/saturationModels/saturationModel/saturationModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "saturationModel.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::saturationModel::New -( - const dictionary& dict, - const objectRegistry& db -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting saturationModel: " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "saturationModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, db); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.C index 6c3ffa3f17..820af3496b 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -64,10 +65,35 @@ Foam::surfaceTensionModel::surfaceTensionModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::surfaceTensionModel::~surfaceTensionModel() -{} +Foam::autoPtr +Foam::surfaceTensionModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting surfaceTensionModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "surfaceTensionModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair, true); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.H index 65ca4a4325..af8284cfcf 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles surfaceTensionModel.C - newAspectRatioModel.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -58,7 +59,7 @@ class surfaceTensionModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -85,7 +86,7 @@ public: ); - // Static data members + // Static Data Members //- Coefficient dimensions static const dimensionSet dimSigma; @@ -103,7 +104,7 @@ public: //- Destructor - virtual ~surfaceTensionModel(); + virtual ~surfaceTensionModel() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModelNew.C deleted file mode 100644 index 51d9fc2370..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModelNew.C +++ /dev/null @@ -1,63 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "surfaceTensionModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::surfaceTensionModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting surfaceTensionModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "surfaceTensionModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair, true); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.C index b084e68d63..044acc247d 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,10 +50,35 @@ Foam::aspectRatioModel::aspectRatioModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::aspectRatioModel::~aspectRatioModel() -{} +Foam::autoPtr +Foam::aspectRatioModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting aspectRatioModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "swarmCorrection", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.H index 5a4900a65b..65f55286c6 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles aspectRatioModel.C - newAspectRatioModel.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -56,7 +57,7 @@ class aspectRatioModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -93,7 +94,7 @@ public: //- Destructor - virtual ~aspectRatioModel(); + virtual ~aspectRatioModel() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModelNew.C deleted file mode 100644 index 0e8eaaf8df..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModelNew.C +++ /dev/null @@ -1,63 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "aspectRatioModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::aspectRatioModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting aspectRatioModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "swarmCorrection", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/AttouFerschneider/AttouFerschneider.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/AttouFerschneider/AttouFerschneider.C index 3e9b811cd0..35ebf46c5d 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/AttouFerschneider/AttouFerschneider.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/AttouFerschneider/AttouFerschneider.C @@ -121,12 +121,6 @@ Foam::dragModels::AttouFerschneider::AttouFerschneider {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::dragModels::AttouFerschneider::~AttouFerschneider() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/AttouFerschneider/AttouFerschneider.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/AttouFerschneider/AttouFerschneider.H index e360bc449d..627a068475 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/AttouFerschneider/AttouFerschneider.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/AttouFerschneider/AttouFerschneider.H @@ -54,6 +54,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; class phaseModel; @@ -68,7 +69,7 @@ class AttouFerschneider : public dragModel { - // Private data + // Private Data //- Name of the gaseous phase const word gasName_; @@ -86,7 +87,7 @@ class AttouFerschneider const dimensionedScalar E2_; - // Private member functions + // Private Member Functions //- Return the momentum transfer coefficient between gas and liquid virtual tmp KGasLiquid @@ -128,7 +129,7 @@ public: //- Destructor - virtual ~AttouFerschneider(); + virtual ~AttouFerschneider() = default; // Member Functions diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.C index 34f36d5fb3..27fe7cad54 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -98,6 +99,37 @@ Foam::dragModel::dragModel {} +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::dragModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting dragModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "dragModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair, true); +} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::dragModel::~dragModel() diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.H index d5a8b8f694..660662e2ef 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles dragModel.C - newDragModel.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; class swarmCorrection; @@ -59,7 +60,7 @@ class dragModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -90,7 +91,7 @@ public: ); - // Static data members + // Static Data Members //- Coefficient dimensions static const dimensionSet dimK; diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModelNew.C deleted file mode 100644 index 99f23fc7d2..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/dragModel/dragModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "dragModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::dragModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting dragModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "dragModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair, true); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C index efe7a567f4..6e883c83f5 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,11 +65,35 @@ Foam::heatTransferModel::heatTransferModel ) {} +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +Foam::autoPtr +Foam::heatTransferModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); -Foam::heatTransferModel::~heatTransferModel() -{} + Info<< "Selecting heatTransferModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "heatTransferModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H index 4280e0973c..396e715d6c 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -55,7 +57,7 @@ class heatTransferModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -85,7 +87,7 @@ public: ); - // Static data members + // Static Data Members //- Coefficient dimensions static const dimensionSet dimK; @@ -102,7 +104,7 @@ public: //- Destructor - virtual ~heatTransferModel(); + virtual ~heatTransferModel() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModelNew.C deleted file mode 100644 index 33b26d0d2e..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "heatTransferModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::heatTransferModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting heatTransferModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "heatTransferModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/liftModels/liftModel/liftModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/liftModels/liftModel/liftModel.C index 76d68c2821..ba837f3ce9 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/liftModels/liftModel/liftModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/liftModels/liftModel/liftModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,10 +57,35 @@ Foam::liftModel::liftModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // -Foam::liftModel::~liftModel() -{} +Foam::autoPtr +Foam::liftModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting liftModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "liftModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/liftModels/liftModel/liftModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/liftModels/liftModel/liftModel.H index 23f48dd9e2..a71a843f81 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/liftModels/liftModel/liftModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/liftModels/liftModel/liftModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles liftModel.C - newLiftModel.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -56,7 +57,7 @@ class liftModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -83,7 +84,7 @@ public: ); - // Static data members + // Static Data Members //- Force dimensions static const dimensionSet dimF; @@ -100,7 +101,7 @@ public: //- Destructor - virtual ~liftModel(); + virtual ~liftModel() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/liftModels/liftModel/liftModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/liftModels/liftModel/liftModelNew.C deleted file mode 100644 index 2d0febf425..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/liftModels/liftModel/liftModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "liftModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::liftModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting liftModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "liftModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C index 78cc6d5be3..8adad76832 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,10 +55,35 @@ Foam::phaseTransferModel::phaseTransferModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // -Foam::phaseTransferModel::~phaseTransferModel() -{} +Foam::autoPtr +Foam::phaseTransferModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting phaseTransferModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "phaseTransferModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H index dee0f02eec..b3ae79a3ce 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -55,7 +57,7 @@ class phaseTransferModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -82,7 +84,7 @@ public: ); - // Static data members + // Static Data Members //- Mass transfer rate dimensions static const dimensionSet dimDmdt; @@ -99,7 +101,7 @@ public: //- Destructor - virtual ~phaseTransferModel(); + virtual ~phaseTransferModel() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModelNew.C deleted file mode 100644 index aeaca1ffa6..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "phaseTransferModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::phaseTransferModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting phaseTransferModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "phaseTransferModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.C index 47d5924d8e..b27085ba02 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,10 +50,35 @@ Foam::swarmCorrection::swarmCorrection {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // -Foam::swarmCorrection::~swarmCorrection() -{} +Foam::autoPtr +Foam::swarmCorrection::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting swarmCorrection for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "swarmCorrection", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.H index 296a3b8fc9..51dfa89d54 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles swarmCorrection.C - newSwarmCorrection.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -56,7 +57,7 @@ class swarmCorrection { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -93,7 +94,7 @@ public: //- Destructor - virtual ~swarmCorrection(); + virtual ~swarmCorrection() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrectionNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrectionNew.C deleted file mode 100644 index a5289533bf..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrectionNew.C +++ /dev/null @@ -1,63 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "swarmCorrection.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::swarmCorrection::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting swarmCorrection for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "swarmCorrection", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C index 6ae3b61b17..fdbf94e100 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -58,10 +59,35 @@ Foam::turbulentDispersionModel::turbulentDispersionModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // -Foam::turbulentDispersionModel::~turbulentDispersionModel() -{} +Foam::autoPtr +Foam::turbulentDispersionModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting turbulentDispersionModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "turbulentDispersionModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H index febf0ad68e..7150b01cca 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles turbulentDispersionModel.C - newTurbulentDispersionModel.C \*---------------------------------------------------------------------------*/ @@ -47,6 +47,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -57,7 +58,7 @@ class turbulentDispersionModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -83,7 +84,7 @@ public: (dict, pair) ); - // Static data members + // Static Data Members //- Diffusivity dimensions static const dimensionSet dimD; @@ -103,7 +104,7 @@ public: //- Destructor - virtual ~turbulentDispersionModel(); + virtual ~turbulentDispersionModel() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModelNew.C deleted file mode 100644 index c5575f0248..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModelNew.C +++ /dev/null @@ -1,63 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "turbulentDispersionModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::turbulentDispersionModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting turbulentDispersionModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "turbulentDispersionModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.C index f16f75ac25..660f3811b1 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -67,10 +68,35 @@ Foam::virtualMassModel::virtualMassModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::virtualMassModel::~virtualMassModel() -{} +Foam::autoPtr +Foam::virtualMassModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting virtualMassModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "virtualMassModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair, true); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.H index 3c1eae87d4..10ad757b1c 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles virtualMassModel.C - newVirtualMassModel.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -58,7 +59,7 @@ class virtualMassModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -86,7 +87,7 @@ public: ); - // Static data members + // Static Data Members //- Coefficient dimensions static const dimensionSet dimK; @@ -104,7 +105,7 @@ public: //- Destructor - virtual ~virtualMassModel(); + virtual ~virtualMassModel() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModelNew.C deleted file mode 100644 index 06fe8da5a1..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "virtualMassModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::virtualMassModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting virtualMassModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "virtualMassModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair, true); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.C index 5508235ef7..7a5b35cfb7 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,10 +53,35 @@ Foam::wallDampingModel::wallDampingModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallDampingModel::~wallDampingModel() -{} +Foam::autoPtr +Foam::wallDampingModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting wallDampingModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "wallDampingModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.H index 7a63936b28..56a089a274 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles wallDampingModel.C - newWallDampingModel.C \*---------------------------------------------------------------------------*/ @@ -47,6 +47,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -59,7 +60,7 @@ class wallDampingModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -86,7 +87,7 @@ public: ); - // Static data members + // Static Data Members //- Coefficient dimensions static const dimensionSet dimF; @@ -103,7 +104,7 @@ public: //- Destructor - virtual ~wallDampingModel(); + virtual ~wallDampingModel() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModelNew.C deleted file mode 100644 index 4ca9e921a0..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "wallDampingModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::wallDampingModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting wallDampingModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "wallDampingModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C index b93ce4582b..4374e749d2 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -82,10 +83,35 @@ Foam::wallLubricationModel::wallLubricationModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallLubricationModel::~wallLubricationModel() -{} +Foam::autoPtr +Foam::wallLubricationModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting wallLubricationModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "wallLubricationModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(dict, pair); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H index 8ee7343dd5..2c72fd0505 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles wallLubricationModel.C - newWallLubricationModel.C \*---------------------------------------------------------------------------*/ @@ -47,6 +47,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -59,13 +60,13 @@ class wallLubricationModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; - // Protected member functions + // Protected Member Functions //- Zero-gradient wall-lubrication force at walls tmp zeroGradWalls(tmp) const; @@ -92,7 +93,7 @@ public: ); - // Static data members + // Static Data Members //- Coefficient dimensions static const dimensionSet dimF; @@ -109,7 +110,7 @@ public: //- Destructor - virtual ~wallLubricationModel(); + virtual ~wallLubricationModel() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModelNew.C deleted file mode 100644 index 5a24f1163b..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "wallLubricationModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::wallLubricationModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting wallLubricationModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "wallLubricationModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C index 2d67872d91..75554b740d 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.C @@ -87,7 +87,7 @@ void Foam::multiphaseSystem::solveAlphas() mesh_ ), mesh_, - dimensionedScalar("one", dimless, 1) + dimensionedScalar("1", dimless, 1) ); forAll(stationaryPhases(), stationaryPhasei) { @@ -223,7 +223,7 @@ void Foam::multiphaseSystem::solveAlphas() mesh_ ), mesh_, - dimensionedScalar("zero", dimless/dimTime, 0) + dimensionedScalar(dimless/dimTime, Zero) ); volScalarField::Internal Su @@ -316,7 +316,7 @@ void Foam::multiphaseSystem::solveAlphas() mesh_ ), mesh_, - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); forAll(movingPhases(), movingPhasei) { @@ -521,7 +521,7 @@ Foam::multiphaseSystem::multiphaseSystem IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ), cAlphas_(lookup("interfaceCompression")), @@ -540,12 +540,6 @@ Foam::multiphaseSystem::multiphaseSystem } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::multiphaseSystem::~multiphaseSystem() -{} - - // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // Foam::tmp Foam::multiphaseSystem::surfaceTension @@ -559,7 +553,7 @@ Foam::tmp Foam::multiphaseSystem::surfaceTension ( "surfaceTension", mesh_, - dimensionedScalar("zero", dimensionSet(1, -2, -2, 0, 0), 0) + dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), Zero) ) ); @@ -602,7 +596,7 @@ Foam::multiphaseSystem::nearInterface() const ( "nearInterface", mesh_, - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); @@ -660,7 +654,7 @@ void Foam::multiphaseSystem::solve() mesh_ ), mesh_, - dimensionedScalar("zero", dimensionSet(0, 3, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero) ) ); } diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H index e2f32da038..3652477d3c 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/multiphaseSystem/multiphaseSystem.H @@ -44,6 +44,7 @@ SourceFiles namespace Foam { +// Forward Declarations class dragModel; class virtualMassModel; @@ -55,18 +56,16 @@ class multiphaseSystem : public phaseSystem { -private: - - // Private typedefs + // Private Typedefs typedef HashTable cAlphaTable; - // Private data + // Private Data - //- The indexed phase-fraction field; e.g., 1 for water, 2 for air, 3 - // for oil, etc... + //- The indexed phase-fraction field; + // E.g., 1 for water, 2 for air, 3 for oil, etc... volScalarField alphas_; //- @@ -76,7 +75,7 @@ private: const dimensionedScalar deltaN_; - // Private member functions + // Private Member Functions void calcAlphas(); @@ -146,11 +145,11 @@ public: // Constructors //- Construct from fvMesh - multiphaseSystem(const fvMesh& mesh); + explicit multiphaseSystem(const fvMesh& mesh); //- Destructor - virtual ~multiphaseSystem(); + virtual ~multiphaseSystem() = default; // Selectors diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C index 939d217636..adc7eeb3e7 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C @@ -50,7 +50,7 @@ Foam::StationaryPhaseModel::zeroField this->mesh() ), this->mesh(), - dimensioned("zero", dims, pTraits::zero) + dimensioned(dims, Zero) ) ); } diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/phaseModel/phaseModel.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/phaseModel/phaseModel.C index 976daab7a9..8773b2cc9e 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/phaseModel/phaseModel.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/phaseModel/phaseModel.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2019 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -77,10 +77,45 @@ Foam::phaseModel::phaseModel } -Foam::autoPtr Foam::phaseModel::clone() const +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::phaseModel::clone() const { NotImplemented; - return autoPtr(nullptr); + return nullptr; +} + + +Foam::autoPtr +Foam::phaseModel::New +( + const phaseSystem& fluid, + const word& phaseName, + const label index +) +{ + const dictionary& dict = fluid.subDict(phaseName); + + const word modelType(dict.get("type")); + + Info<< "Selecting phaseModel for " + << phaseName << ": " << modelType << endl; + + auto cstrIter = phaseSystemConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "phaseModel", + modelType, + *phaseSystemConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return cstrIter()(fluid, phaseName, index); } diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/phaseModel/phaseModel.H b/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/phaseModel/phaseModel.H index 54b9d0c292..afd41e99ab 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/phaseModel/phaseModel.H +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/phaseModel/phaseModel.H @@ -48,6 +48,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phaseSystem; class diameterModel; @@ -59,7 +60,7 @@ class phaseModel : public volScalarField { - // Private data + // Private Data //- Reference to the phaseSystem to which this phase belongs const phaseSystem& fluid_; @@ -145,7 +146,7 @@ public: autoPtr operator()(Istream& is) const { - indexCounter_++; + ++indexCounter_; return autoPtr ( phaseModel::New(fluid_, word(is), indexCounter_) diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/phaseModel/phaseModelNew.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/phaseModel/phaseModelNew.C deleted file mode 100644 index 63e4f5bb6d..0000000000 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseModel/phaseModel/phaseModelNew.C +++ /dev/null @@ -1,64 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "phaseModel.H" -#include "phaseSystem.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::phaseModel::New -( - const phaseSystem& fluid, - const word& phaseName, - const label index -) -{ - const dictionary& dict = fluid.subDict(phaseName); - - const word modelType(dict.get("type")); - - Info<< "Selecting phaseModel for " - << phaseName << ": " << modelType << endl; - - auto cstrIter = phaseSystemConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "phaseModel", - modelType, - *phaseSystemConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return cstrIter()(fluid, phaseName, index); -} - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseSystem/phaseSystemTemplates.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseSystem/phaseSystemTemplates.C index 2e896f9f62..c16b2dfec0 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseSystem/phaseSystemTemplates.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/phaseSystem/phaseSystemTemplates.C @@ -331,7 +331,7 @@ void Foam::phaseSystem::fillFields this->mesh_ ), this->mesh_, - dimensioned("zero", dims, pTraits::zero) + dimensioned(dims, Zero) ) ); } @@ -367,7 +367,7 @@ void Foam::phaseSystem::fillFields this->mesh_ ), this->mesh_, - dimensioned("zero", dims, pTraits::zero) + dimensioned(dims, Zero) ) ); } diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/Make/files b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/Make/files index 8fea79143c..4a2182efe5 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/Make/files +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/Make/files @@ -6,7 +6,6 @@ kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C viscosity = kineticTheoryModels/viscosityModel $(viscosity)/viscosityModel/viscosityModel.C -$(viscosity)/viscosityModel/viscosityModelNew.C $(viscosity)/Gidaspow/GidaspowViscosity.C $(viscosity)/Syamlal/SyamlalViscosity.C $(viscosity)/HrenyaSinclair/HrenyaSinclairViscosity.C @@ -14,27 +13,23 @@ $(viscosity)/none/noneViscosity.C conductivity = kineticTheoryModels/conductivityModel $(conductivity)/conductivityModel/conductivityModel.C -$(conductivity)/conductivityModel/conductivityModelNew.C $(conductivity)/Gidaspow/GidaspowConductivity.C $(conductivity)/Syamlal/SyamlalConductivity.C $(conductivity)/HrenyaSinclair/HrenyaSinclairConductivity.C radial = kineticTheoryModels/radialModel $(radial)/radialModel/radialModel.C -$(radial)/radialModel/radialModelNew.C $(radial)/CarnahanStarling/CarnahanStarlingRadial.C $(radial)/LunSavage/LunSavageRadial.C $(radial)/SinclairJackson/SinclairJacksonRadial.C granular = kineticTheoryModels/granularPressureModel $(granular)/granularPressureModel/granularPressureModel.C -$(granular)/granularPressureModel/granularPressureModelNew.C $(granular)/Lun/LunPressure.C $(granular)/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C frictional = kineticTheoryModels/frictionalStressModel $(frictional)/frictionalStressModel/frictionalStressModel.C -$(frictional)/frictionalStressModel/frictionalStressModelNew.C $(frictional)/JohnsonJackson/JohnsonJacksonFrictionalStress.C $(frictional)/Schaeffer/SchaefferFrictionalStress.C $(frictional)/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C index 4bdb06fb1c..ed74dd2f58 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,7 +35,6 @@ namespace Foam namespace kineticTheoryModels { defineTypeNameAndDebug(conductivityModel, 0); - defineRunTimeSelectionTable(conductivityModel, dictionary); } } @@ -51,10 +51,33 @@ Foam::kineticTheoryModels::conductivityModel::conductivityModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::kineticTheoryModels::conductivityModel::~conductivityModel() -{} +Foam::autoPtr +Foam::kineticTheoryModels::conductivityModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("conductivityModel")); + + Info<< "Selecting conductivityModel " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "conductivityModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return autoPtr(cstrIter()(dict)); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H index 11c1561eff..41bb50e420 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,18 +53,9 @@ namespace kineticTheoryModels class conductivityModel { - // Private member functions - - //- Disallow default bitwise copy construct - conductivityModel(const conductivityModel&); - - //- Disallow default bitwise assignment - void operator=(const conductivityModel&); - - protected: - // Protected data + // Protected Data const dictionary& dict_; @@ -89,7 +81,7 @@ public: // Constructors //- Construct from components - conductivityModel(const dictionary& dict); + explicit conductivityModel(const dictionary& dict); // Selectors @@ -101,7 +93,7 @@ public: //- Destructor - virtual ~conductivityModel(); + virtual ~conductivityModel() = default; // Member Functions diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C deleted file mode 100644 index 803d8e8308..0000000000 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "conductivityModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::kineticTheoryModels::conductivityModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("conductivityModel")); - - Info<< "Selecting conductivityModel " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "conductivityModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return autoPtr(cstrIter()(dict)); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C index e15e6e79ed..3765dc3a38 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,7 +35,6 @@ namespace Foam namespace kineticTheoryModels { defineTypeNameAndDebug(frictionalStressModel, 0); - defineRunTimeSelectionTable(frictionalStressModel, dictionary); } } @@ -51,10 +51,33 @@ Foam::kineticTheoryModels::frictionalStressModel::frictionalStressModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::kineticTheoryModels::frictionalStressModel::~frictionalStressModel() -{} +Foam::autoPtr +Foam::kineticTheoryModels::frictionalStressModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("frictionalStressModel")); + + Info<< "Selecting frictionalStressModel " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "frictionalStressModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return autoPtr(cstrIter()(dict)); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H index fb49e2f48f..1f00793cf7 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,18 +54,9 @@ namespace kineticTheoryModels class frictionalStressModel { - // Private member functions - - //- Disallow default bitwise copy construct - frictionalStressModel(const frictionalStressModel&); - - //- Disallow default bitwise assignment - void operator=(const frictionalStressModel&); - - protected: - // Protected data + // Protected Data //- Reference to higher-level dictionary for re-read const dictionary& dict_; @@ -91,7 +83,7 @@ public: // Constructors //- Construct from components - frictionalStressModel(const dictionary& dict); + explicit frictionalStressModel(const dictionary& dict); // Selectors @@ -103,7 +95,7 @@ public: //- Destructor - virtual ~frictionalStressModel(); + virtual ~frictionalStressModel() = default; // Member Functions diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C deleted file mode 100644 index 3cce8b8d8a..0000000000 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "frictionalStressModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::kineticTheoryModels::frictionalStressModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("frictionalStressModel")); - - Info<< "Selecting frictionalStressModel " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "frictionalStressModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return autoPtr(cstrIter()(dict)); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C index 036c50bde7..982ce455be 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,10 +52,33 @@ Foam::kineticTheoryModels::granularPressureModel::granularPressureModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::kineticTheoryModels::granularPressureModel::~granularPressureModel() -{} +Foam::autoPtr +Foam::kineticTheoryModels::granularPressureModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("granularPressureModel")); + + Info<< "Selecting granularPressureModel " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "granularPressureModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return autoPtr(cstrIter()(dict)); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H index 8b04a36220..783a498ae8 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,18 +53,9 @@ namespace kineticTheoryModels class granularPressureModel { - // Private member functions - - //- Disallow default bitwise copy construct - granularPressureModel(const granularPressureModel&); - - //- Disallow default bitwise assignment - void operator=(const granularPressureModel&); - - protected: - // Protected data + // Protected Data const dictionary& dict_; @@ -89,7 +81,7 @@ public: // Constructors //- Construct from components - granularPressureModel(const dictionary& dict); + explicit granularPressureModel(const dictionary& dict); // Selectors @@ -101,7 +93,7 @@ public: //- Destructor - virtual ~granularPressureModel(); + virtual ~granularPressureModel() = default; // Member Functions diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C deleted file mode 100644 index 6dc95bfca2..0000000000 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "granularPressureModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::kineticTheoryModels::granularPressureModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("granularPressureModel")); - - Info<< "Selecting granularPressureModel " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "granularPressureModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return autoPtr(cstrIter()(dict)); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C index 0f4de37e38..829e404d98 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,7 +35,6 @@ namespace Foam namespace kineticTheoryModels { defineTypeNameAndDebug(radialModel, 0); - defineRunTimeSelectionTable(radialModel, dictionary); } } @@ -51,10 +51,33 @@ Foam::kineticTheoryModels::radialModel::radialModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::kineticTheoryModels::radialModel::~radialModel() -{} +Foam::autoPtr +Foam::kineticTheoryModels::radialModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("radialModel")); + + Info<< "Selecting radialModel " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "radialModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return autoPtr(cstrIter()(dict)); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H index c5a0805cba..f84ccca6cb 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,18 +53,9 @@ namespace kineticTheoryModels class radialModel { - // Private member functions - - //- Disallow default bitwise copy construct - radialModel(const radialModel&); - - //- Disallow default bitwise assignment - void operator=(const radialModel&); - - protected: - // Protected data + // Protected Data const dictionary& dict_; @@ -89,7 +81,7 @@ public: // Constructors //- Construct from components - radialModel(const dictionary& dict); + explicit radialModel(const dictionary& dict); // Selectors @@ -101,7 +93,7 @@ public: //- Destructor - virtual ~radialModel(); + virtual ~radialModel() = default; // Member Functions diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModelNew.C b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModelNew.C deleted file mode 100644 index 76248b6200..0000000000 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "radialModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::kineticTheoryModels::radialModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("radialModel")); - - Info<< "Selecting radialModel " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "radialModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return autoPtr(cstrIter()(dict)); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C index c1925f48a0..f210716a1f 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -50,10 +51,33 @@ Foam::kineticTheoryModels::viscosityModel::viscosityModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::kineticTheoryModels::viscosityModel::~viscosityModel() -{} +Foam::autoPtr +Foam::kineticTheoryModels::viscosityModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("viscosityModel")); + + Info<< "Selecting viscosityModel " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "viscosityModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << abort(FatalIOError); + } + + return autoPtr(cstrIter()(dict)); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H index 3c56bd3695..0ac77ec880 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H +++ b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,18 +55,9 @@ namespace kineticTheoryModels class viscosityModel { - // Private member functions - - //- Disallow default bitwise copy construct - viscosityModel(const viscosityModel&); - - //- Disallow default bitwise assignment - void operator=(const viscosityModel&); - - protected: - // Protected data + // Protected Data const dictionary& dict_; @@ -91,7 +83,7 @@ public: // Constructors //- Construct from components - viscosityModel(const dictionary& dict); + explicit viscosityModel(const dictionary& dict); // Selectors @@ -103,7 +95,7 @@ public: //- Destructor - virtual ~viscosityModel(); + virtual ~viscosityModel() = default; // Member Functions diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C b/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C deleted file mode 100644 index 3928348a4b..0000000000 --- a/src/phaseSystemModels/reactingEuler/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "viscosityModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::kineticTheoryModels::viscosityModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("viscosityModel")); - - Info<< "Selecting viscosityModel " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "viscosityModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << abort(FatalIOError); - } - - return autoPtr(cstrIter()(dict)); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/reactingEuler/twoPhaseSystem/twoPhaseSystemNew.C b/src/phaseSystemModels/reactingEuler/twoPhaseSystem/twoPhaseSystemNew.C index 6851a9bb21..776c25741c 100644 --- a/src/phaseSystemModels/reactingEuler/twoPhaseSystem/twoPhaseSystemNew.C +++ b/src/phaseSystemModels/reactingEuler/twoPhaseSystem/twoPhaseSystemNew.C @@ -30,7 +30,8 @@ License // * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::twoPhaseSystem::New +Foam::autoPtr +Foam::twoPhaseSystem::New ( const fvMesh& mesh ) diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/Make/files b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/Make/files index cd84e483ff..574004c0be 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/Make/files +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/Make/files @@ -5,7 +5,6 @@ kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C viscosity = kineticTheoryModels/viscosityModel $(viscosity)/viscosityModel/viscosityModel.C -$(viscosity)/viscosityModel/viscosityModelNew.C $(viscosity)/Gidaspow/GidaspowViscosity.C $(viscosity)/Syamlal/SyamlalViscosity.C $(viscosity)/HrenyaSinclair/HrenyaSinclairViscosity.C @@ -13,27 +12,23 @@ $(viscosity)/none/noneViscosity.C conductivity = kineticTheoryModels/conductivityModel $(conductivity)/conductivityModel/conductivityModel.C -$(conductivity)/conductivityModel/conductivityModelNew.C $(conductivity)/Gidaspow/GidaspowConductivity.C $(conductivity)/Syamlal/SyamlalConductivity.C $(conductivity)/HrenyaSinclair/HrenyaSinclairConductivity.C radial = kineticTheoryModels/radialModel $(radial)/radialModel/radialModel.C -$(radial)/radialModel/radialModelNew.C $(radial)/CarnahanStarling/CarnahanStarlingRadial.C $(radial)/LunSavage/LunSavageRadial.C $(radial)/SinclairJackson/SinclairJacksonRadial.C granular = kineticTheoryModels/granularPressureModel $(granular)/granularPressureModel/granularPressureModel.C -$(granular)/granularPressureModel/granularPressureModelNew.C $(granular)/Lun/LunPressure.C $(granular)/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C frictional = kineticTheoryModels/frictionalStressModel $(frictional)/frictionalStressModel/frictionalStressModel.C -$(frictional)/frictionalStressModel/frictionalStressModelNew.C $(frictional)/JohnsonJackson/JohnsonJacksonFrictionalStress.C $(frictional)/Schaeffer/SchaefferFrictionalStress.C $(frictional)/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C index e44a01ec7b..c3f3c0b467 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,10 +52,33 @@ Foam::kineticTheoryModels::conductivityModel::conductivityModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::kineticTheoryModels::conductivityModel::~conductivityModel() -{} +Foam::autoPtr +Foam::kineticTheoryModels::conductivityModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("conductivityModel")); + + Info<< "Selecting conductivityModel " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "conductivityModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return autoPtr(cstrIter()(dict)); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H index 90ad2e91f9..6b4fd317b8 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,18 +53,9 @@ namespace kineticTheoryModels class conductivityModel { - // Private member functions - - //- No copy construct - conductivityModel(const conductivityModel&) = delete; - - //- No copy assignment - void operator=(const conductivityModel&) = delete; - - protected: - // Protected data + // Protected Data const dictionary& dict_; @@ -89,7 +81,7 @@ public: // Constructors //- Construct from components - conductivityModel(const dictionary& dict); + explicit conductivityModel(const dictionary& dict); // Selectors @@ -101,7 +93,7 @@ public: //- Destructor - virtual ~conductivityModel(); + virtual ~conductivityModel() = default; // Member Functions diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C deleted file mode 100644 index 3f0bdc932f..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "conductivityModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::kineticTheoryModels::conductivityModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("conductivityModel")); - - Info<< "Selecting conductivityModel " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "conductivityModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return autoPtr(cstrIter()(dict)); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C index e18894a881..e443ebda14 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,10 +52,33 @@ Foam::kineticTheoryModels::frictionalStressModel::frictionalStressModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::kineticTheoryModels::frictionalStressModel::~frictionalStressModel() -{} +Foam::autoPtr +Foam::kineticTheoryModels::frictionalStressModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("frictionalStressModel")); + + Info<< "Selecting frictionalStressModel " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "frictionalStressModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return autoPtr(cstrIter()(dict)); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H index 8890869dfb..ce009b2c5f 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,18 +54,9 @@ namespace kineticTheoryModels class frictionalStressModel { - // Private member functions - - //- No copy construct - frictionalStressModel(const frictionalStressModel&) = delete; - - //- No copy assignment - void operator=(const frictionalStressModel&) = delete; - - protected: - // Protected data + // Protected Data //- Reference to higher-level dictionary for re-read const dictionary& dict_; @@ -91,7 +83,7 @@ public: // Constructors //- Construct from components - frictionalStressModel(const dictionary& dict); + explicit frictionalStressModel(const dictionary& dict); // Selectors @@ -103,7 +95,7 @@ public: //- Destructor - virtual ~frictionalStressModel(); + virtual ~frictionalStressModel() = default; // Member Functions diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C deleted file mode 100644 index 396f11da95..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "frictionalStressModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::kineticTheoryModels::frictionalStressModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("frictionalStressModel")); - - Info<< "Selecting frictionalStressModel " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "frictionalStressModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return autoPtr(cstrIter()(dict)); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C index 78c383fb8d..2ace80c165 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,10 +52,33 @@ Foam::kineticTheoryModels::granularPressureModel::granularPressureModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::kineticTheoryModels::granularPressureModel::~granularPressureModel() -{} +Foam::autoPtr +Foam::kineticTheoryModels::granularPressureModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("granularPressureModel")); + + Info<< "Selecting granularPressureModel " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "granularPressureModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return autoPtr(cstrIter()(dict)); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H index ec246028b3..3898eab3c6 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -47,23 +48,14 @@ namespace kineticTheoryModels { /*---------------------------------------------------------------------------*\ - Class granularPressureModel Declaration + Class granularPressureModel Declaration \*---------------------------------------------------------------------------*/ class granularPressureModel { - // Private member functions - - //- No copy construct - granularPressureModel(const granularPressureModel&) = delete; - - //- No copy assignment - void operator=(const granularPressureModel&) = delete; - - protected: - // Protected data + // Protected Data const dictionary& dict_; @@ -89,7 +81,7 @@ public: // Constructors //- Construct from components - granularPressureModel(const dictionary& dict); + explicit granularPressureModel(const dictionary& dict); // Selectors @@ -101,7 +93,7 @@ public: //- Destructor - virtual ~granularPressureModel(); + virtual ~granularPressureModel() = default; // Member Functions diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C deleted file mode 100644 index 7ccada74b3..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "granularPressureModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::kineticTheoryModels::granularPressureModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("granularPressureModel")); - - Info<< "Selecting granularPressureModel " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "granularPressureModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return autoPtr(cstrIter()(dict)); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C index 12c55d36b3..af48bfd909 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,10 +52,33 @@ Foam::kineticTheoryModels::radialModel::radialModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::kineticTheoryModels::radialModel::~radialModel() -{} +Foam::autoPtr +Foam::kineticTheoryModels::radialModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("radialModel")); + + Info<< "Selecting radialModel " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "radialModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return autoPtr(cstrIter()(dict)); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H index f2a3e2a423..51c4f12d89 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,18 +53,9 @@ namespace kineticTheoryModels class radialModel { - // Private member functions - - //- No copy construct - radialModel(const radialModel&) = delete; - - //- No copy assignment - void operator=(const radialModel&) = delete; - - protected: - // Protected data + // Protected Data const dictionary& dict_; @@ -89,7 +81,7 @@ public: // Constructors //- Construct from components - radialModel(const dictionary& dict); + explicit radialModel(const dictionary& dict); // Selectors @@ -101,7 +93,7 @@ public: //- Destructor - virtual ~radialModel(); + virtual ~radialModel() = default; // Member Functions diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModelNew.C b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModelNew.C deleted file mode 100644 index 6854bdafd1..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/radialModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "radialModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::kineticTheoryModels::radialModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("radialModel")); - - Info<< "Selecting radialModel " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "radialModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return autoPtr(cstrIter()(dict)); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C index 370c49d9b3..abac1de23d 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -50,10 +51,33 @@ Foam::kineticTheoryModels::viscosityModel::viscosityModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::kineticTheoryModels::viscosityModel::~viscosityModel() -{} +Foam::autoPtr +Foam::kineticTheoryModels::viscosityModel::New +( + const dictionary& dict +) +{ + const word modelType(dict.get("viscosityModel")); + + Info<< "Selecting viscosityModel " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "viscosityModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return autoPtr(cstrIter()(dict)); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H index 076dc88ceb..d8d5f6877f 100644 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,18 +55,9 @@ namespace kineticTheoryModels class viscosityModel { - // Private member functions - - //- No copy construct - viscosityModel(const viscosityModel&) = delete; - - //- No copy assignment - void operator=(const viscosityModel&) = delete; - - protected: - // Protected data + // Protected Data const dictionary& dict_; @@ -91,7 +83,7 @@ public: // Constructors //- Construct from components - viscosityModel(const dictionary& dict); + explicit viscosityModel(const dictionary& dict); // Selectors @@ -103,7 +95,7 @@ public: //- Destructor - virtual ~viscosityModel(); + virtual ~viscosityModel() = default; // Member Functions diff --git a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C b/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C deleted file mode 100644 index 0c9f714f8c..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "viscosityModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::kineticTheoryModels::viscosityModel::New -( - const dictionary& dict -) -{ - const word modelType(dict.get("viscosityModel")); - - Info<< "Selecting viscosityModel " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "viscosityModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return autoPtr(cstrIter()(dict)); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.C index 0642351e49..ebcac853ed 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.C +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,10 +46,35 @@ Foam::blendingMethod::blendingMethod {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::blendingMethod::~blendingMethod() -{} +Foam::autoPtr +Foam::blendingMethod::New +( + const dictionary& dict, + const wordList& phaseNames +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting " << dict.dictName() << " blending method: " + << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "blendingMethod", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, phaseNames); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H index 6b45f5ef71..92896a8fe3 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,7 +75,7 @@ public: // Constructors //- Construct from a dictionary - blendingMethod + explicit blendingMethod ( const dictionary& dict ); @@ -90,7 +91,7 @@ public: //- Destructor - virtual ~blendingMethod(); + virtual ~blendingMethod() = default; // Member Functions diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethodNew.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethodNew.C deleted file mode 100644 index 69fb0ff127..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethodNew.C +++ /dev/null @@ -1,61 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "blendingMethod.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::blendingMethod::New -( - const dictionary& dict, - const wordList& phaseNames -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting " << dict.dictName() << " blending method: " - << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "blendingMethod", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, phaseNames); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/Make/files b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/Make/files index 1e0420bbc1..11876c632e 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/Make/files +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/Make/files @@ -6,10 +6,8 @@ phasePair/orderedPhasePair.C twoPhaseSystem/twoPhaseSystem.C - diameter = diameterModels $(diameter)/diameterModel/diameterModel.C -$(diameter)/diameterModel/diameterModelNew.C $(diameter)/constantDiameter/constantDiameter.C $(diameter)/isothermalDiameter/isothermalDiameter.C @@ -23,7 +21,6 @@ $(IATEsources)/randomCoalescence/randomCoalescence.C blending = BlendedInterfacialModel/blendingMethods $(blending)/blendingMethod/blendingMethod.C -$(blending)/blendingMethod/blendingMethodNew.C $(blending)/noBlending/noBlending.C $(blending)/linear/linear.C $(blending)/hyperbolic/hyperbolic.C @@ -33,7 +30,6 @@ interfacialModels/wallDependentModel/wallDependentModel.C aspectRatio = interfacialModels/aspectRatioModels $(aspectRatio)/aspectRatioModel/aspectRatioModel.C -$(aspectRatio)/aspectRatioModel/aspectRatioModelNew.C $(aspectRatio)/constantAspectRatio/constantAspectRatio.C $(aspectRatio)/TomiyamaAspectRatio/TomiyamaAspectRatio.C $(aspectRatio)/VakhrushevEfremov/VakhrushevEfremov.C @@ -41,7 +37,6 @@ $(aspectRatio)/Wellek/Wellek.C drag = interfacialModels/dragModels $(drag)/dragModel/dragModel.C -$(drag)/dragModel/dragModelNew.C $(drag)/segregated/segregated.C $(drag)/Ergun/Ergun.C $(drag)/Gibilaro/Gibilaro.C @@ -57,7 +52,6 @@ $(drag)/IshiiZuber/IshiiZuber.C lift = interfacialModels/liftModels $(lift)/liftModel/liftModel.C -$(lift)/liftModel/liftModelNew.C $(lift)/noLift/noLift.C $(lift)/constantLiftCoefficient/constantLiftCoefficient.C $(lift)/Moraga/Moraga.C @@ -66,19 +60,16 @@ $(lift)/TomiyamaLift/TomiyamaLift.C heatTransfer = interfacialModels/heatTransferModels $(heatTransfer)/heatTransferModel/heatTransferModel.C -$(heatTransfer)/heatTransferModel/heatTransferModelNew.C $(heatTransfer)/RanzMarshall/RanzMarshall.C $(heatTransfer)/sphericalHeatTransfer/sphericalHeatTransfer.C swarm = interfacialModels/swarmCorrections $(swarm)/swarmCorrection/swarmCorrection.C -$(swarm)/swarmCorrection/swarmCorrectionNew.C $(swarm)/noSwarm/noSwarm.C $(swarm)/TomiyamaSwarm/TomiyamaSwarm.C dispersion = interfacialModels/turbulentDispersionModels $(dispersion)/turbulentDispersionModel/turbulentDispersionModel.C -$(dispersion)/turbulentDispersionModel/turbulentDispersionModelNew.C $(dispersion)/noTurbulentDispersion/noTurbulentDispersion.C $(dispersion)/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C $(dispersion)/Burns/Burns.C @@ -87,14 +78,12 @@ $(dispersion)/LopezDeBertodano/LopezDeBertodano.C virtualMass = interfacialModels/virtualMassModels $(virtualMass)/virtualMassModel/virtualMassModel.C -$(virtualMass)/virtualMassModel/virtualMassModelNew.C $(virtualMass)/noVirtualMass/noVirtualMass.C $(virtualMass)/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C $(virtualMass)/Lamb/Lamb.C lubrication = interfacialModels/wallLubricationModels $(lubrication)/wallLubricationModel/wallLubricationModel.C -$(lubrication)/wallLubricationModel/wallLubricationModelNew.C $(lubrication)/noWallLubrication/noWallLubrication.C $(lubrication)/Antal/Antal.C $(lubrication)/Frank/Frank.C diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/diameterModels/diameterModel/diameterModel.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/diameterModels/diameterModel/diameterModel.C index fc36dbc244..86ae26aed0 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/diameterModels/diameterModel/diameterModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/diameterModels/diameterModel/diameterModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -40,19 +41,50 @@ namespace Foam Foam::diameterModel::diameterModel ( - const dictionary& diameterProperties, + const dictionary& dict, const phaseModel& phase ) : - diameterProperties_(diameterProperties), + diameterProperties_(dict), phase_(phase) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::diameterModel::~diameterModel() -{} +Foam::autoPtr +Foam::diameterModel::New +( + const dictionary& dict, + const phaseModel& phase +) +{ + const word modelType(dict.get("diameterModel")); + + Info<< "Selecting diameterModel for phase " + << phase.name() + << ": " + << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "diameterModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter() + ( + dict.optionalSubDict(modelType + "Coeffs"), + phase + ); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -61,9 +93,9 @@ void Foam::diameterModel::correct() {} -bool Foam::diameterModel::read(const dictionary& phaseProperties) +bool Foam::diameterModel::read(const dictionary& dict) { - diameterProperties_ = phaseProperties.optionalSubDict(type() + "Coeffs"); + diameterProperties_ = dict.optionalSubDict(type() + "Coeffs"); return true; } diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/diameterModels/diameterModel/diameterModel.H b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/diameterModels/diameterModel/diameterModel.H index 2e958f1fbd..5de204431b 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/diameterModels/diameterModel/diameterModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/diameterModels/diameterModel/diameterModel.H @@ -27,11 +27,10 @@ Class Foam::diameterModel Description - A2stract base-class for dispersed-phase particle diameter models. + Abstract base-class for dispersed-phase particle diameter models. SourceFiles diameterModel.C - newDiameterModel.C \*---------------------------------------------------------------------------*/ @@ -53,12 +52,12 @@ namespace Foam class diameterModel { - protected: - // Protected data + // Protected Data dictionary diameterProperties_; + const phaseModel& phase_; @@ -76,10 +75,10 @@ public: diameterModel, dictionary, ( - const dictionary& diameterProperties, + const dictionary& dict, const phaseModel& phase ), - (diameterProperties, phase) + (dict, phase) ); @@ -87,20 +86,20 @@ public: diameterModel ( - const dictionary& diameterProperties, + const dictionary& dict, const phaseModel& phase ); //- Destructor - virtual ~diameterModel(); + virtual ~diameterModel() = default; // Selectors static autoPtr New ( - const dictionary& diameterProperties, + const dictionary& dict, const phaseModel& phase ); @@ -126,7 +125,7 @@ public: virtual void correct(); //- Read phaseProperties dictionary - virtual bool read(const dictionary& phaseProperties) = 0; + virtual bool read(const dictionary& dict) = 0; }; diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/diameterModels/diameterModel/diameterModelNew.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/diameterModels/diameterModel/diameterModelNew.C deleted file mode 100644 index 3a0ae61d98..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/diameterModels/diameterModel/diameterModelNew.C +++ /dev/null @@ -1,67 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "diameterModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::diameterModel::New -( - const dictionary& dict, - const phaseModel& phase -) -{ - const word modelType(dict.get("diameterModel")); - - Info << "Selecting diameterModel for phase " - << phase.name() - << ": " - << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "diameterModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter() - ( - dict.optionalSubDict(modelType + "Coeffs"), - phase - ); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.C index 8dd686f48b..5119a1c06c 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2015 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,10 +50,35 @@ Foam::aspectRatioModel::aspectRatioModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::aspectRatioModel::~aspectRatioModel() -{} +Foam::autoPtr +Foam::aspectRatioModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting aspectRatioModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "aspectRatioModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, pair); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.H b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.H index 1a4b11012e..3ad0dd2f8f 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles aspectRatioModel.C - newAspectRatioModel.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -56,7 +57,7 @@ class aspectRatioModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -93,7 +94,7 @@ public: //- Destructor - virtual ~aspectRatioModel(); + virtual ~aspectRatioModel() = default; // Selectors diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModelNew.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModelNew.C deleted file mode 100644 index ea81d74b4c..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModelNew.C +++ /dev/null @@ -1,63 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "aspectRatioModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::aspectRatioModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting aspectRatioModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "aspectRatioModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/dragModel/dragModel.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/dragModel/dragModel.C index 47794925c6..76c29e4388 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/dragModel/dragModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/dragModel/dragModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -96,6 +97,37 @@ Foam::dragModel::dragModel {} +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::dragModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting dragModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "dragModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, pair, true); +} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::dragModel::~dragModel() diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/dragModel/dragModel.H b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/dragModel/dragModel.H index 65f3a0b929..2663b42430 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/dragModel/dragModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/dragModel/dragModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles dragModel.C - newDragModel.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; class swarmCorrection; @@ -59,7 +60,7 @@ class dragModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/dragModel/dragModelNew.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/dragModel/dragModelNew.C deleted file mode 100644 index 70d445538f..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/dragModel/dragModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "dragModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::dragModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting dragModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "dragModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, pair, true); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C index 92347474f3..ea01a38f4d 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -58,10 +59,35 @@ Foam::heatTransferModel::heatTransferModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::heatTransferModel::~heatTransferModel() -{} +Foam::autoPtr +Foam::heatTransferModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting heatTransferModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "heatTransferModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, pair); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H index 1435e40ea0..5889864637 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -55,7 +57,7 @@ class heatTransferModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -85,7 +87,7 @@ public: ); - // Static data members + // Static Data Members //- Coefficient dimensions static const dimensionSet dimK; @@ -102,7 +104,7 @@ public: //- Destructor - virtual ~heatTransferModel(); + virtual ~heatTransferModel() = default; // Selectors diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModelNew.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModelNew.C deleted file mode 100644 index 707c9e4b5a..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "heatTransferModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::heatTransferModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting heatTransferModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "heatTransferModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/liftModels/liftModel/liftModel.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/liftModels/liftModel/liftModel.C index f4db3f8a06..348b7ce3f7 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/liftModels/liftModel/liftModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/liftModels/liftModel/liftModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2016 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,10 +55,35 @@ Foam::liftModel::liftModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::liftModel::~liftModel() -{} +Foam::autoPtr +Foam::liftModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting liftModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "liftModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, pair); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/liftModels/liftModel/liftModel.H b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/liftModels/liftModel/liftModel.H index 105a2b039d..7d4358205c 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/liftModels/liftModel/liftModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/liftModels/liftModel/liftModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles liftModel.C - newLiftModel.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -56,7 +57,7 @@ class liftModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -100,7 +101,7 @@ public: //- Destructor - virtual ~liftModel(); + virtual ~liftModel() = default; // Selectors diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/liftModels/liftModel/liftModelNew.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/liftModels/liftModel/liftModelNew.C deleted file mode 100644 index 205e5a6d1c..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/liftModels/liftModel/liftModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "liftModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::liftModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting liftModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "liftModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.C index 3791076c18..884ddbf0eb 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.C +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,10 +50,35 @@ Foam::swarmCorrection::swarmCorrection {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::swarmCorrection::~swarmCorrection() -{} +Foam::autoPtr +Foam::swarmCorrection::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting swarmCorrection for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "swarmCorrection", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, pair); +} // ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.H b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.H index c0c75d4f16..6e70533e50 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.H +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrection.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles swarmCorrection.C - newSwarmCorrection.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -56,7 +57,7 @@ class swarmCorrection { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -93,7 +94,7 @@ public: //- Destructor - virtual ~swarmCorrection(); + virtual ~swarmCorrection() = default; // Selectors diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrectionNew.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrectionNew.C deleted file mode 100644 index c4614e7a55..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/swarmCorrections/swarmCorrection/swarmCorrectionNew.C +++ /dev/null @@ -1,63 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "swarmCorrection.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::swarmCorrection::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting swarmCorrection for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "swarmCorrection", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C index 77fde9b7d5..a281363b04 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2015 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,10 +54,35 @@ Foam::turbulentDispersionModel::turbulentDispersionModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::turbulentDispersionModel::~turbulentDispersionModel() -{} +Foam::autoPtr +Foam::turbulentDispersionModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting turbulentDispersionModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "turbulentDispersionModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, pair); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H index 8593f0caf6..fe2b467d9c 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles turbulentDispersionModel.C - newTurbulentDispersionModel.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -56,7 +57,7 @@ class turbulentDispersionModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -82,7 +83,7 @@ public: (dict, pair) ); - // Static data members + // Static Data Members //- Diffusivity dimensions static const dimensionSet dimD; @@ -102,7 +103,7 @@ public: //- Destructor - virtual ~turbulentDispersionModel(); + virtual ~turbulentDispersionModel() = default; // Selectors diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModelNew.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModelNew.C deleted file mode 100644 index 1fa4b7f8fb..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModelNew.C +++ /dev/null @@ -1,63 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "turbulentDispersionModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::turbulentDispersionModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting turbulentDispersionModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "turbulentDispersionModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.C index dbb7ead373..1486d8a7d2 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,10 +66,35 @@ Foam::virtualMassModel::virtualMassModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::virtualMassModel::~virtualMassModel() -{} +Foam::autoPtr +Foam::virtualMassModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting virtualMassModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "virtualMassModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, pair, true); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.H b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.H index fe82b59d00..91b5656fe0 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles virtualMassModel.C - newVirtualMassModel.C \*---------------------------------------------------------------------------*/ @@ -46,6 +46,7 @@ SourceFiles namespace Foam { +// Forward Declaration class phasePair; /*---------------------------------------------------------------------------*\ @@ -58,7 +59,7 @@ class virtualMassModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -86,7 +87,7 @@ public: ); - // Static data members + // Static Data Members //- Coefficient dimensions static const dimensionSet dimK; @@ -104,7 +105,7 @@ public: //- Destructor - virtual ~virtualMassModel(); + virtual ~virtualMassModel() = default; // Selectors diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModelNew.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModelNew.C deleted file mode 100644 index ce97775f48..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/virtualMassModels/virtualMassModel/virtualMassModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "virtualMassModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::virtualMassModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting virtualMassModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "virtualMassModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, pair, true); -} - - -// ************************************************************************* // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C index 9470556699..9aed2d28b2 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2016 OpenFOAM Foundation + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,10 +55,35 @@ Foam::wallLubricationModel::wallLubricationModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::wallLubricationModel::~wallLubricationModel() -{} +Foam::autoPtr +Foam::wallLubricationModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + const word modelType(dict.get("type")); + + Info<< "Selecting wallLubricationModel for " + << pair << ": " << modelType << endl; + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); + + if (!cstrIter.found()) + { + FatalIOErrorInLookup + ( + dict, + "wallLubricationModel", + modelType, + *dictionaryConstructorTablePtr_ + ) << exit(FatalIOError); + } + + return cstrIter()(dict, pair); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H index de4e21bbbf..a2de506422 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,6 @@ Description SourceFiles wallLubricationModel.C - newWallLubricationModel.C \*---------------------------------------------------------------------------*/ @@ -47,6 +47,7 @@ SourceFiles namespace Foam { +// Forward Declarations class phasePair; /*---------------------------------------------------------------------------*\ @@ -59,7 +60,7 @@ class wallLubricationModel { protected: - // Protected data + // Protected Data //- Phase pair const phasePair& pair_; @@ -103,7 +104,7 @@ public: //- Destructor - virtual ~wallLubricationModel(); + virtual ~wallLubricationModel() = default; // Selectors diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModelNew.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModelNew.C deleted file mode 100644 index 52e60964a1..0000000000 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModelNew.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2014-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -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 . - -\*---------------------------------------------------------------------------*/ - -#include "wallLubricationModel.H" -#include "phasePair.H" - -// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::wallLubricationModel::New -( - const dictionary& dict, - const phasePair& pair -) -{ - const word modelType(dict.get("type")); - - Info<< "Selecting wallLubricationModel for " - << pair << ": " << modelType << endl; - - auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); - - if (!cstrIter.found()) - { - FatalIOErrorInLookup - ( - dict, - "wallLubricationModel", - modelType, - *dictionaryConstructorTablePtr_ - ) << exit(FatalIOError); - } - - return cstrIter()(dict, pair); -} - - -// ************************************************************************* //