diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H index ec52bd04e6..fdffad22e7 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,6 +82,7 @@ public: static autoPtr New ( + const word& modelName, const dictionary& dict, const wordList& phaseNames ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C index e288235568..f7b2a1e493 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,13 +29,14 @@ License Foam::autoPtr Foam::blendingMethod::New ( + const word& modelName, const dictionary& dict, const wordList& phaseNames ) { word blendingMethodType(dict.lookup("type")); - Info<< "Selecting " << dict.dictName() << " blending method: " + Info<< "Selecting " << modelName << " blending method: " << blendingMethodType << endl; dictionaryConstructorTable::iterator cstrIter = diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C index 73f53829e8..5865e9c9ca 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C @@ -352,19 +352,19 @@ correctInterfaceThermo() forAllConstIter ( - massTransferModelTable, - massTransferModels_, - massTransferModelIter + typename BasePhaseSystem::heatTransferModelTable, + this->heatTransferModels_, + heatTransferModelIter ) { const phasePair& pair = - this->phasePairs_[massTransferModelIter.key()]; + this->phasePairs_[heatTransferModelIter.key()]; const phasePairKey key12(pair.first(), pair.second(), true); const phasePairKey key21(pair.second(), pair.first(), true); - volScalarField H1(this->heatTransferModels_[pair].first()->K()); - volScalarField H2(this->heatTransferModels_[pair].second()->K()); + volScalarField H1(heatTransferModelIter().first()->K()); + volScalarField H2(heatTransferModelIter().second()->K()); dimensionedScalar HSmall("small", heatTransferModel::dimK, small); volScalarField mDotL @@ -397,7 +397,7 @@ correctInterfaceThermo() { this->interfaceCompositionModels_[key12]->addMDotL ( - massTransferModelIter().first()->K(), + massTransferModels_[pair].first()->K(), Tf, mDotL, mDotLPrime @@ -407,7 +407,7 @@ correctInterfaceThermo() { this->interfaceCompositionModels_[key21]->addMDotL ( - massTransferModelIter().second()->K(), + massTransferModels_[pair].second()->K(), Tf, mDotL, mDotLPrime diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C index 2ad76d7bbd..92e4ab3892 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C @@ -209,9 +209,10 @@ Foam::phaseSystem::phaseSystem { blendingMethods_.insert ( - iter().dict().dictName(), + iter().keyword(), blendingMethod::New ( + iter().keyword(), iter().dict(), phaseModels_.toc() ) diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C index d3cd79cb06..3516965cfa 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C @@ -100,6 +100,8 @@ void Foam::phaseSystem::generatePairsAndSubModels ( blendingMethods_.found(modelName) ? blendingMethods_[modelName] + : blendingMethods_.found(member(modelName)) + ? blendingMethods_[member(modelName)] : blendingMethods_["default"] ); diff --git a/src/OpenFOAM/db/IOobject/IOobject.C b/src/OpenFOAM/db/IOobject/IOobject.C index 50b94b4357..2cfcfd3cea 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.C +++ b/src/OpenFOAM/db/IOobject/IOobject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -173,6 +173,36 @@ bool Foam::IOobject::fileNameComponents } +Foam::word Foam::IOobject::group(const word& name) +{ + word::size_type i = name.find_last_of('.'); + + if (i == word::npos || i == 0) + { + return word::null; + } + else + { + return name.substr(i+1, word::npos); + } +} + + +Foam::word Foam::IOobject::member(const word& name) +{ + word::size_type i = name.find_last_of('.'); + + if (i == word::npos || i == 0) + { + return name; + } + else + { + return name.substr(0, i); + } +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::IOobject::IOobject @@ -348,31 +378,13 @@ const Foam::fileName& Foam::IOobject::caseName() const Foam::word Foam::IOobject::group() const { - word::size_type i = name_.find_last_of('.'); - - if (i == word::npos || i == 0) - { - return word::null; - } - else - { - return name_.substr(i+1, word::npos); - } + return group(name_); } Foam::word Foam::IOobject::member() const { - word::size_type i = name_.find_last_of('.'); - - if (i == word::npos || i == 0) - { - return name_; - } - else - { - return name_.substr(0, i); - } + return member(name_); } diff --git a/src/OpenFOAM/db/IOobject/IOobject.H b/src/OpenFOAM/db/IOobject/IOobject.H index e8f3879049..113ac50a44 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.H +++ b/src/OpenFOAM/db/IOobject/IOobject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -205,6 +205,12 @@ public: template static inline word groupName(Name name, const word& group); + //- Return group (extension part of name) + static word group(const word& name); + + //- Return member (name without the extension) + static word member(const word& name); + //- Type of file modification checking static fileCheckTypes fileModificationChecking;