reactingEulerFoam: Corrected blending for two-resistance models

This commit is contained in:
Will Bainbridge
2018-04-23 14:11:21 +01:00
parent e6c2246276
commit b2b2b38a1c
7 changed files with 57 additions and 34 deletions

View File

@ -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<blendingMethod> New
(
const word& modelName,
const dictionary& dict,
const wordList& phaseNames
);

View File

@ -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> 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 =

View File

@ -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

View File

@ -209,9 +209,10 @@ Foam::phaseSystem::phaseSystem
{
blendingMethods_.insert
(
iter().dict().dictName(),
iter().keyword(),
blendingMethod::New
(
iter().keyword(),
iter().dict(),
phaseModels_.toc()
)

View File

@ -100,6 +100,8 @@ void Foam::phaseSystem::generatePairsAndSubModels
(
blendingMethods_.found(modelName)
? blendingMethods_[modelName]
: blendingMethods_.found(member(modelName))
? blendingMethods_[member(modelName)]
: blendingMethods_["default"]
);