reactingEulerFoam: Added wall-boiling and phase change capability to populationBalance functionality

Introduced thermalPhaseChangePopulationBalanceTwo- and MultiphaseSystem as
user-selectable phaseSystems which are the first to actually use multiple mass
transfer mechanisms enabled by

commit d3a237f560.

The functionality is demonstrated using the reactingTwoPhaseEulerFoam
wallBoilingPolydisperse tutorial.

Patch contributed by VTT Technical Research Centre of Finland Ltd and Institute
of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR).
This commit is contained in:
Henry Weller
2018-01-24 14:57:14 +00:00
parent c902c7a396
commit 6e143e5ab0
99 changed files with 2254 additions and 2628 deletions

View File

@ -6,6 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
wmakeLnInclude interfacialModels
wmakeLnInclude interfacialCompositionModels
wmakeLnInclude derivedFvPatchFields
wmake $targetType phaseSystems
wmake $targetType interfacialModels
wmake $targetType interfacialCompositionModels

View File

@ -34,6 +34,11 @@ populationBalanceModel/daughterSizeDistributionModels/uniformBinaryDsd/uniformBi
populationBalanceModel/driftModels/driftModel/driftModel.C
populationBalanceModel/driftModels/constantDrift/constantDrift.C
populationBalanceModel/driftModels/densityChange/densityChange.C
populationBalanceModel/driftModels/phaseChange/phaseChange.C
populationBalanceModel/nucleationModels/nucleationModel/nucleationModel.C
populationBalanceModel/nucleationModels/constantNucleation/constantNucleation.C
populationBalanceModel/nucleationModels/wallBoiling/wallBoiling.C
BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.C
BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C

View File

@ -1,6 +1,7 @@
EXE_INC = \
-I../interfacialModels/lnInclude \
-I../interfacialCompositionModels/lnInclude \
-I../derivedFvPatchFields/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \

View File

@ -359,8 +359,6 @@ void Foam::PopulationBalancePhaseSystem<BasePhaseSystem>::solve()
{
BasePhaseSystem::solve();
BasePhaseSystem::correct();
forAll(populationBalances_, i)
{
populationBalances_[i].solve();
@ -368,4 +366,4 @@ void Foam::PopulationBalancePhaseSystem<BasePhaseSystem>::solve()
}
// ************************************************************************* //1
// ************************************************************************* //

View File

@ -74,7 +74,7 @@ Foam::diameterModels::velocityGroup::secondMoment() const
const sizeGroup& fi = sizeGroups_[i];
m2 += sqr(fi.d())*formFactor()*fi
*max(fi.phase(), fi.phase().residualAlpha())/fi.x();
*max(fi.phase(), SMALL)/fi.x();
}
return tm2;
@ -106,7 +106,7 @@ Foam::diameterModels::velocityGroup::thirdMoment() const
const sizeGroup& fi = sizeGroups_[i];
m3 += pow3(fi.d())*formFactor()*fi
*max(fi.phase(), fi.phase().residualAlpha())/fi.x();
*max(fi.phase(), SMALL)/fi.x();
}
return tm3;
@ -308,6 +308,12 @@ Foam::diameterModels::velocityGroup::velocityGroup
{
if
(
phase_.mesh().solverDict(popBalName_).lookupOrDefault<Switch>
(
"renormalizeAtRestart",
false
)
||
phase_.mesh().solverDict(popBalName_).lookupOrDefault<Switch>
(
"renormalize",
@ -330,9 +336,16 @@ Foam::diameterModels::velocityGroup::velocityGroup
FatalErrorInFunction
<< " Initial values of the sizeGroups belonging to velocityGroup "
<< this->phase().name()
<< " must add to unity. The sizeGroup fractions can be"
<< " renormalized by setting the renormalize switch"
<< " in the fvSolution subdictionary " << popBalName_ << "." << endl
<< " must add to" << nl << " unity. This condition might be"
<< " violated due to wrong entries in the" << nl
<< " velocityGroupCoeffs subdictionary or bad initial conditions in"
<< " the startTime" << nl
<< " directory. The sizeGroups can be renormalized at every"
<< " timestep or at restart" << nl
<< " only by setting the corresponding switch renormalize or"
<< " renormalizeAtRestart" << nl
<< " in the fvSolution subdictionary " << popBalName_ << "."
<< " Note that boundary conditions are not" << nl << "renormalized."
<< exit(FatalError);
}

View File

@ -79,13 +79,6 @@ Foam::diameterModels::binaryBreakupModel::binaryBreakupModel
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::diameterModels::populationBalanceModel&
Foam::diameterModels::binaryBreakupModel::popBal() const
{
return popBal_;
}
void Foam::diameterModels::binaryBreakupModel::correct()
{}

View File

@ -138,8 +138,11 @@ public:
// Member Functions
//- Return reference to populationBalance
const populationBalanceModel& popBal() const;
//- Return reference to the populationBalance
const populationBalanceModel& popBal() const
{
return popBal_;
}
//- Correct diameter independent expressions
virtual void correct();

View File

@ -82,13 +82,6 @@ Foam::diameterModels::breakupModel::breakupModel
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::diameterModels::populationBalanceModel&
Foam::diameterModels::breakupModel::popBal() const
{
return popBal_;
}
void Foam::diameterModels::breakupModel::correct()
{}

View File

@ -145,9 +145,12 @@ public:
// Member Functions
//- Return reference to the populationBalance
const populationBalanceModel& popBal() const;
const populationBalanceModel& popBal() const
{
return popBal_;
}
//- Return const reference to daughter size distribution pointer
//- Return const-reference to daughter size distribution pointer
const autoPtr<daughterSizeDistributionModel>& dsdPtr() const
{
return dsd_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,13 +80,6 @@ Foam::diameterModels::coalescenceModel::coalescenceModel
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::diameterModels::populationBalanceModel&
Foam::diameterModels::coalescenceModel::popBal() const
{
return popBal_;
}
void Foam::diameterModels::coalescenceModel::correct()
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -136,8 +136,11 @@ public:
// Member Functions
//- Return reference to populationBalance
const populationBalanceModel& popBal() const;
//- Return reference to the populationBalance
const populationBalanceModel& popBal() const
{
return popBal_;
}
//- Correct diameter independent expressions
virtual void correct();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -79,13 +79,6 @@ Foam::diameterModels::driftModel::driftModel
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::diameterModels::populationBalanceModel&
Foam::diameterModels::driftModel::popBal() const
{
return popBal_;
}
void Foam::diameterModels::driftModel::correct()
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -133,8 +133,11 @@ public:
// Member Functions
//- Return reference to populationBalanceModel
const populationBalanceModel& popBal() const;
//- Return reference to the populationBalance
const populationBalanceModel& popBal() const
{
return popBal_;
}
//- Correct diameter independent expressions
virtual void correct();

View File

@ -0,0 +1,123 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "phaseChange.H"
#include "addToRunTimeSelectionTable.H"
#include "phaseSystem.H"
#include "phasePairKey.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace diameterModels
{
namespace driftModels
{
defineTypeNameAndDebug(phaseChange, 0);
addToRunTimeSelectionTable(driftModel, phaseChange, dictionary);
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::diameterModels::driftModels::phaseChange::phaseChange
(
const populationBalanceModel& popBal,
const dictionary& dict
)
:
driftModel(popBal, dict),
pairNames_(dict.lookup("pairNames")),
iDmdt_
(
IOobject
(
"iDmdt",
popBal.time().timeName(),
popBal.mesh()
),
popBal.mesh(),
dimensionedScalar("Sui", dimDensity/dimTime, Zero)
),
N_
(
IOobject
(
"N",
popBal.mesh().time().timeName(),
popBal.mesh()
),
popBal.mesh(),
dimensionedScalar("Sui", inv(dimVolume), Zero)
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::diameterModels::driftModels::phaseChange::correct()
{
iDmdt_ *= 0.0;
forAll(pairNames_, i)
{
const word& pairName = pairNames_[i];
iDmdt_ +=
popBal_.mesh().lookupObject<volScalarField>
(
IOobject::groupName("iDmdt", pairName)
);
}
N_ *= 0.0;
forAll(popBal_.sizeGroups(), i)
{
const sizeGroup& fi = *popBal_.sizeGroups()[i];
N_ += fi*max(fi.phase(), SMALL)/fi.x();
}
}
void Foam::diameterModels::driftModels::phaseChange::driftRate
(
volScalarField& driftRate,
const label i
)
{
const sizeGroup& fi = *popBal_.sizeGroups()[i];
driftRate += iDmdt_/(N_*fi.phase().rho());
}
// ************************************************************************* //

View File

@ -0,0 +1,112 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::diameterModels::driftModels::isothermal
Description
Drift induced by interfacial phaseChange.
SourceFiles
isothermal.C
\*---------------------------------------------------------------------------*/
#ifndef phaseChange_H
#define phaseChange_H
#include "driftModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace diameterModels
{
namespace driftModels
{
/*---------------------------------------------------------------------------*\
Class phaseChange Declaration
\*---------------------------------------------------------------------------*/
class phaseChange
:
public driftModel
{
// Private data
//- Names of unorderd phasePairs between which phaseChange occurs, i.e.
// "(gasIAndLiquid gasIIAndLiquid)"
List<word> pairNames_;
//- Total mass transfer rate due to phaseChange
volScalarField iDmdt_;
//- Total number concentration
volScalarField N_;
public:
//- Runtime type information
TypeName("phaseChange");
// Constructor
phaseChange
(
const populationBalanceModel& popBal,
const dictionary& dict
);
//- Destructor
virtual ~phaseChange()
{}
// Member Functions
//- Correct diameter independent expressions
virtual void correct();
//- Add to driftRate
virtual void driftRate
(
volScalarField& driftRate,
const label i
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace driftModels
} // End namespace diameterModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,117 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "constantNucleation.H"
#include "phaseSystem.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace diameterModels
{
namespace nucleationModels
{
defineTypeNameAndDebug(constantNucleation, 0);
addToRunTimeSelectionTable
(
nucleationModel,
constantNucleation,
dictionary
);
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::diameterModels::nucleationModels::constantNucleation::
constantNucleation
(
const populationBalanceModel& popBal,
const dictionary& dict
)
:
nucleationModel(popBal, dict),
d_("departureDiameter", dimLength, dict),
velGroup_
(
refCast<const velocityGroup>
(
popBal.mesh().lookupObject<phaseModel>
(
IOobject::groupName
(
"alpha",
dict.lookup("velocityGroup")
)
).dPtr()()
)
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::diameterModels::nucleationModels::constantNucleation::correct()
{
if
(
d_.value() < velGroup_.sizeGroups().first().d().value()
|| d_.value() > velGroup_.sizeGroups().last().d().value()
)
{
WarningInFunction
<< "Departure diameter " << d_.value() << " m outside of range ["
<< velGroup_.sizeGroups().first().d().value() << ", "
<< velGroup_.sizeGroups().last().d().value() << "] m" << endl
<< " The nucleation rate is set to zero." << endl
<< " Adjust discretization over property space to suppress this"
<< " warning."
<< endl;
}
}
void Foam::diameterModels::nucleationModels::constantNucleation::
nucleationRate
(
volScalarField& nucleationRate,
const label i
)
{
const sizeGroup& fi = *popBal_.sizeGroups()[i];
phaseModel& phase = const_cast<phaseModel&>(fi.phase());
volScalarField& rho = phase.thermo().rho();
nucleationRate +=
popBal_.gamma(i, velGroup_.formFactor()*pow3(d_))
*(popBal_.fluid().fvOptions()(phase, rho)&rho)/rho/fi.x();
}
// ************************************************************************* //

View File

@ -0,0 +1,111 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::diameterModels::nucleationModels::constant
Description
Constant nucleation rate within all classes. Used for verification and
validation of the nucleation formulation implemented in the
populationBalanceModel class. Rate is calculated from fvOptions mass source.
SourceFiles
constant.C
\*---------------------------------------------------------------------------*/
#ifndef constantNucleation_H
#define constantNucleation_H
#include "nucleationModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace diameterModels
{
namespace nucleationModels
{
/*---------------------------------------------------------------------------*\
Class constantNucleation Declaration
\*---------------------------------------------------------------------------*/
class constantNucleation
:
public nucleationModel
{
// Private data
//- Departure diameter
dimensionedScalar d_;
//- Velocity group in which the nucleation occurs
const velocityGroup& velGroup_;
public:
//- Runtime type information
TypeName("constant");
// Constructor
constantNucleation
(
const populationBalanceModel& popBal,
const dictionary& dict
);
//- Destructor
virtual ~constantNucleation()
{}
// Member Functions
//- Correct diameter independent expressions
virtual void correct();
//- Add to nucleationRate
virtual void nucleationRate
(
volScalarField& nucleationRate,
const label i
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace nucleationModels
} // End namespace diameterModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,86 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "nucleationModel.H"
#include "phaseSystem.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace diameterModels
{
defineTypeNameAndDebug(nucleationModel, 0);
defineRunTimeSelectionTable(nucleationModel, dictionary);
}
}
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::diameterModels::nucleationModel>
Foam::diameterModels::nucleationModel::New
(
const word& type,
const populationBalanceModel& popBal,
const dictionary& dict
)
{
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(type);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorInFunction
<< "Unknown zeroeth order model type "
<< type << nl << nl
<< "Valid zeroeth order model types : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<nucleationModel>(cstrIter()(popBal, dict));
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::diameterModels::nucleationModel::nucleationModel
(
const populationBalanceModel& popBal,
const dictionary& dict
)
:
popBal_(popBal)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::diameterModels::nucleationModel::correct()
{}
// ************************************************************************* //

View File

@ -0,0 +1,163 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::diameterModels::nucleationModel
Description
Base class for nucleation models.
SourceFiles
nucleationModel.C
\*---------------------------------------------------------------------------*/
#ifndef nucleationModel_H
#define nucleationModel_H
#include "populationBalanceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace diameterModels
{
/*---------------------------------------------------------------------------*\
Class nucleationModel Declaration
\*---------------------------------------------------------------------------*/
class nucleationModel
{
protected:
// Protected data
//- Reference to the populationBalanceModel
const populationBalanceModel& popBal_;
public:
//- Runtime type information
TypeName("nucleationModel");
// Declare run-time constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
nucleationModel,
dictionary,
(
const populationBalanceModel& popBal,
const dictionary& dict
),
(popBal, dict)
);
//- Class used for the read-construction of
// PtrLists of nucleation models
class iNew
{
const populationBalanceModel& popBal_;
public:
iNew(const populationBalanceModel& popBal)
:
popBal_(popBal)
{}
autoPtr<nucleationModel> operator()(Istream& is) const
{
word type(is);
dictionary dict(is);
return nucleationModel::New(type, popBal_, dict);
}
};
// Constructor
nucleationModel
(
const populationBalanceModel& popBal,
const dictionary& dict
);
autoPtr<nucleationModel> clone() const
{
NotImplemented;
return autoPtr<nucleationModel>(nullptr);
}
// Selector
static autoPtr<nucleationModel> New
(
const word& type,
const populationBalanceModel& popBal,
const dictionary& dict
);
//- Destructor
virtual ~nucleationModel()
{}
// Member Functions
//- Return reference to the populationBalance
const populationBalanceModel& popBal() const
{
return popBal_;
}
//- Correct diameter independent expressions
virtual void correct();
//- Add to nucleationRate
virtual void nucleationRate
(
volScalarField& nucleationRate,
const label i
) = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace diameterModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,199 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "wallBoiling.H"
#include "alphatWallBoilingWallFunctionFvPatchScalarField.H"
#include "phaseSystem.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace diameterModels
{
namespace nucleationModels
{
defineTypeNameAndDebug(wallBoiling, 0);
addToRunTimeSelectionTable
(
nucleationModel,
wallBoiling,
dictionary
);
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::diameterModels::nucleationModels::wallBoiling::
wallBoiling
(
const populationBalanceModel& popBal,
const dictionary& dict
)
:
nucleationModel(popBal, dict),
velGroup_
(
refCast<const velocityGroup>
(
popBal.mesh().lookupObject<phaseModel>
(
IOobject::groupName
(
"alpha",
dict.lookup("velocityGroup")
)
).dPtr()()
)
),
turbulence_
(
popBal_.mesh().lookupObjectRef<phaseCompressibleTurbulenceModel>
(
IOobject::groupName
(
turbulenceModel::propertiesName,
popBal_.continuousPhase().name()
)
)
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::diameterModels::nucleationModels::wallBoiling::correct()
{
const tmp<volScalarField> talphat(turbulence_.alphat());
const volScalarField::Boundary& alphatBf = talphat().boundaryField();
typedef compressible::alphatWallBoilingWallFunctionFvPatchScalarField
alphatWallBoilingWallFunction;
forAll(alphatBf, patchi)
{
if
(
isA<alphatWallBoilingWallFunction>(alphatBf[patchi])
)
{
const alphatWallBoilingWallFunction& alphatw =
refCast<const alphatWallBoilingWallFunction>(alphatBf[patchi]);
const scalarField& dDep = alphatw.dDeparture();
if (min(dDep) < velGroup_.sizeGroups().first().d().value())
{
Warning
<< "Minimum departure diameter " << min(dDep)
<< " m outside of range ["
<< velGroup_.sizeGroups().first().d().value() << ", "
<< velGroup_.sizeGroups().last().d().value() << "] m"
<< " at patch " << alphatw.patch().name()
<< endl
<< " The nucleation rate in populationBalance "
<< popBal_.name() << " is set to zero." << endl
<< " Adjust discretization over property space to"
<< " suppress this warning."
<< endl;
}
else if (max(dDep) > velGroup_.sizeGroups().last().d().value())
{
Warning
<< "Maximum departure diameter " << max(dDep)
<< " m outside of range ["
<< velGroup_.sizeGroups().first().d().value() << ", "
<< velGroup_.sizeGroups().last().d().value() << "] m"
<< " at patch " << alphatw.patch().name()
<< endl
<< " The nucleation rate in populationBalance "
<< popBal_.name() << " is set to zero." << endl
<< " Adjust discretization over property space to"
<< " suppress this warning."
<< endl;
}
}
}
}
void Foam::diameterModels::nucleationModels::wallBoiling::
nucleationRate
(
volScalarField& nucleationRate,
const label i
)
{
const sizeGroup& fi = *popBal_.sizeGroups()[i];
phaseModel& phase = const_cast<phaseModel&>(fi.phase());
volScalarField& rho = phase.thermo().rho();
const tmp<volScalarField> talphat(turbulence_.alphat());
const volScalarField::Boundary& alphatBf = talphat().boundaryField();
typedef compressible::alphatWallBoilingWallFunctionFvPatchScalarField
alphatWallBoilingWallFunction;
forAll(alphatBf, patchi)
{
if
(
isA<alphatWallBoilingWallFunction>(alphatBf[patchi])
)
{
const alphatWallBoilingWallFunction& alphatw =
refCast<const alphatWallBoilingWallFunction>(alphatBf[patchi]);
const scalarField& dmdt = alphatw.dmdt();
const scalarField& dDep = alphatw.dDeparture();
const labelList& faceCells = alphatw.patch().faceCells();
dimensionedScalar unitLength("unitLength", dimLength, 1.0);
forAll(alphatw, facei)
{
if (dmdt[facei] > SMALL)
{
const label faceCelli = faceCells[facei];
nucleationRate[faceCelli] +=
popBal_.gamma
(
i,
velGroup_.formFactor()*pow3(dDep[facei]*unitLength)
).value()
*dmdt[facei]/rho[faceCelli]/fi.x().value();
}
}
}
}
}
// ************************************************************************* //

View File

@ -0,0 +1,115 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::diameterModels::nucleationModels::wall
Description
Wall-boiling model which requires a velocityGroup (i.e. phase) to be
specified in which the nucleation occurs. This setting must be consistent
with the specifications in the alphatWallBoilingWallFunction. If the
departure-diameter lies outside the diameter-range given by the sizeGroups
of the corresponding velocityGroup, the solver will give a warning and the
nucleation rate will be set to zero.
SourceFiles
wallBoiling.C
\*---------------------------------------------------------------------------*/
#ifndef wallBoiling_H
#define wallBoiling_H
#include "nucleationModel.H"
#include "phaseCompressibleTurbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace diameterModels
{
namespace nucleationModels
{
/*---------------------------------------------------------------------------*\
Class wallBoiling Declaration
\*---------------------------------------------------------------------------*/
class wallBoiling
:
public nucleationModel
{
// Private data
//- Velocity group in which the nucleation occurs
const velocityGroup& velGroup_;
//- Pointer to turbulence model
const phaseCompressibleTurbulenceModel& turbulence_;
public:
//- Runtime type information
TypeName("wallBoiling");
// Constructor
wallBoiling
(
const populationBalanceModel& popBal,
const dictionary& dict
);
//- Destructor
virtual ~wallBoiling()
{}
// Member Functions
//- Correct diameter independent expressions
virtual void correct();
//- Add to nucleationRate
virtual void nucleationRate
(
volScalarField& nucleationRate,
const label i
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace nucleationModels
} // End namespace diameterModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -28,6 +28,7 @@ License
#include "breakupModel.H"
#include "binaryBreakupModel.H"
#include "driftModel.H"
#include "nucleationModel.H"
#include "phaseSystem.H"
#include "fvmDdt.H"
#include "fvcDdt.H"
@ -36,7 +37,8 @@ License
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
void Foam::diameterModels::populationBalanceModel::registerVelocityGroups()
void
Foam::diameterModels::populationBalanceModel::registerVelocityAndSizeGroups()
{
forAll(fluid_.phases(), phasei)
{
@ -245,50 +247,10 @@ void Foam::diameterModels::populationBalanceModel::preSolve()
{
drift_[model].correct();
}
}
Foam::dimensionedScalar
Foam::diameterModels::populationBalanceModel::
gamma
(
const label i,
const dimensionedScalar& v
) const
forAll(nucleation_, model)
{
dimensionedScalar lowerBoundary(v);
dimensionedScalar upperBoundary(v);
const dimensionedScalar& xi = sizeGroups_[i]->x();
if (i == 0)
{
lowerBoundary = xi;
}
else
{
lowerBoundary = sizeGroups_[i-1]->x();
}
if (i == sizeGroups_.size() - 1)
{
upperBoundary = xi;
}
else
{
upperBoundary = sizeGroups_[i+1]->x();
}
if (v < lowerBoundary || v > upperBoundary)
{
return 0.0;
}
else if (v.value() <= xi.value())
{
return (v - lowerBoundary)/(xi - lowerBoundary);
}
else
{
return (upperBoundary - v)/(upperBoundary - xi);
nucleation_[model].correct();
}
}
@ -317,21 +279,19 @@ birthByCoalescence
const sizeGroup& fi = *sizeGroups_[i];
if (velocityGroups_.size() > 1)
{
// Avoid double counting of events
if (j == k)
{
Sui_() = 0.5*fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk
*alphak/fk.x()*Gamma;
Sui_ = 0.5*fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk*alphak
/fk.x()*Gamma;
}
else
{
Sui_() = fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk*alphak
/fk.x()*Gamma;
Sui_ = fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk*alphak/fk.x()
*Gamma;
}
Su_[i] += Sui_();
Su_[i] += Sui_;
dimensionedScalar ratio = fj.x()/fi.x();
@ -343,7 +303,6 @@ birthByCoalescence
fj.phase().name()
);
// Check whether fi and fj reside in different velocityGroups
if (pDmdt_.found(pairij))
{
const scalar dmdtSign
@ -351,7 +310,7 @@ birthByCoalescence
Pair<word>::compare(pDmdt_.find(pairij).key(), pairij)
);
pDmdt_[pairij]->ref() += dmdtSign*ratio*Sui_()*rho;
pDmdt_[pairij]->ref() += dmdtSign*ratio*Sui_*rho;
}
const phasePairKey pairik
@ -360,7 +319,6 @@ birthByCoalescence
fk.phase().name()
);
// Check whether fi and fk reside in different velocityGroups
if (pDmdt_.found(pairik))
{
const scalar dmdtSign
@ -368,22 +326,7 @@ birthByCoalescence
Pair<word>::compare(pDmdt_.find(pairik).key(), pairik)
);
pDmdt_[pairik]->ref() += dmdtSign*(1 - ratio)*Sui_()*rho;
}
}
else
{
// Avoid double counting of events
if (j == k)
{
Su_[i] += 0.5*fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk
*alphak/fk.x()*Gamma;
}
else
{
Su_[i] += fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk*alphak
/fk.x()*Gamma;
}
pDmdt_[pairik]->ref() += dmdtSign*(1 - ratio)*Sui_*rho;
}
}
}
@ -429,12 +372,10 @@ birthByBreakup
{
const sizeGroup& fi = *sizeGroups_[i];
if (velocityGroups_.size() > 1)
{
Sui_() = fi.x()*breakupRate_()*breakup_[model].dsdPtr()().nik(i, k)
*fk*fk.phase()/fk.x();
Sui_ = fi.x()*breakupRate_()*breakup_[model].dsdPtr()().nik(i, k)*fk
*fk.phase()/fk.x();
Su_[i] += Sui_();
Su_[i] += Sui_;
const volScalarField& rho = fi.phase().rho();
@ -444,7 +385,6 @@ birthByBreakup
fk.phase().name()
);
// Check whether fi and fk reside in different velocityGroups
if (pDmdt_.found(pair))
{
const scalar dmdtSign
@ -452,13 +392,7 @@ birthByBreakup
Pair<word>::compare(pDmdt_.find(pair).key(), pair)
);
pDmdt_[pair]->ref() += dmdtSign*Sui_()*rho;
}
}
else
{
Su_[i] += fi.x()*breakupRate_()*breakup_[model].dsdPtr()().nik(i, k)
*fk*fk.phase()/fk.x();
pDmdt_[pair]->ref() += dmdtSign*Sui_*rho;
}
}
}
@ -521,11 +455,9 @@ birthByBinaryBreakup
const volScalarField& alphaj = fj.phase();
const volScalarField& rho = fj.phase().rho();
if (velocityGroups_.size() > 1)
{
Sui_() = fi.x()*binaryBreakupRate_()*delta_[i][j]*fj*alphaj/fj.x();
Sui_ = fi.x()*binaryBreakupRate_()*delta_[i][j]*fj*alphaj/fj.x();
Su_[i] += Sui_();
Su_[i] += Sui_;
const phasePairKey pairij
(
@ -533,7 +465,6 @@ birthByBinaryBreakup
fj.phase().name()
);
// Check whether fi and fj reside in different velocityGroups
if (pDmdt_.found(pairij))
{
const scalar dmdtSign
@ -541,12 +472,7 @@ birthByBinaryBreakup
Pair<word>::compare(pDmdt_.find(pairij).key(), pairij)
);
pDmdt_[pairij]->ref() += dmdtSign*Sui_()*rho;
}
}
else
{
Su_[i] += fi.x()*binaryBreakupRate_()*delta_[i][j]*fj*alphaj/fj.x();
pDmdt_[pairij]->ref() += dmdtSign*Sui_*rho;
}
dimensionedScalar Gamma;
@ -561,12 +487,10 @@ birthByBinaryBreakup
const sizeGroup& fk = *sizeGroups_[k];
if (velocityGroups_.size() > 1)
{
volScalarField& Suk = Sui_();
volScalarField& Suk = Sui_;
Suk = sizeGroups_[k]->x()*binaryBreakupRate_()*delta_[i][j]*fj
*alphaj/fj.x()*Gamma;
Suk = sizeGroups_[k]->x()*binaryBreakupRate_()*delta_[i][j]*fj*alphaj
/fj.x()*Gamma;
Su_[k] += Suk;
@ -576,7 +500,6 @@ birthByBinaryBreakup
fj.phase().name()
);
// Check whether fk and fj reside in different velocityGroups
if (pDmdt_.found(pairkj))
{
const scalar dmdtSign
@ -591,13 +514,6 @@ birthByBinaryBreakup
pDmdt_[pairkj]->ref() += dmdtSign*Suk*rho;
}
}
else
{
Su_[k] += sizeGroups_[k]->x()*binaryBreakupRate_()*delta_[i][j]*fj
*alphaj/fj.x()*Gamma;
}
}
}
@ -616,120 +532,129 @@ deathByBinaryBreakup
void Foam::diameterModels::populationBalanceModel::drift(const label i)
{
r_() *= 0.0;
if (i == sizeGroups_.size() - 1)
{
r_() += pos(driftRate_())*sizeGroups_[i]->x()/sizeGroups_[i-1]->x();
}
else
{
r_() += pos(driftRate_())*sizeGroups_[i+1]->x()/sizeGroups_[i]->x();
}
if (i == 0)
{
r_() += neg(driftRate_())*sizeGroups_[i]->x()/sizeGroups_[i+1]->x();
}
else
{
r_() += neg(driftRate_())*sizeGroups_[i-1]->x()/sizeGroups_[i]->x();
}
const sizeGroup& fi = *sizeGroups_[i];
const volScalarField& rho = fi.phase().rho();
if (i == sizeGroups_.size() - 1)
if (i == 0)
{
SuSp_[i] += neg(driftRate_())*fi.x()*driftRate_()*fi.phase()/fi.x()
/((r_() - 1)*v_[i]);
rx_() = pos(driftRate_())*sizeGroups_[i+1]->x()/sizeGroups_[i]->x();
}
else if (i == 0)
else if (i == sizeGroups_.size() - 1)
{
SuSp_[i] += pos(driftRate_())*fi.x()*driftRate_()*fi.phase()/fi.x()
/((r_() - 1)*v_[i]);
rx_() = neg(driftRate_())*sizeGroups_[i-1]->x()/sizeGroups_[i]->x();
}
else
{
SuSp_[i] += fi.x()*driftRate_()*fi.phase()/fi.x()/((r_() - 1)*v_[i]);
rx_() = pos(driftRate_())*sizeGroups_[i+1]->x()/sizeGroups_[i]->x()
+ neg(driftRate_())*sizeGroups_[i-1]->x()/sizeGroups_[i]->x();
}
if (i != 0)
SuSp_[i] += (neg(1 - rx_()) + neg(1 - rx_()/(1 - rx_())))*driftRate_()
*fi.phase()/((rx_() - 1)*sizeGroups_[i]->x());
rx_() *= 0.0;
rdx_() *= 0.0;
if (i < sizeGroups_.size() - 2)
{
if (velocityGroups_.size() > 1)
rx_() += pos(driftRate_())*sizeGroups_[i+2]->x()/sizeGroups_[i+1]->x();
rdx_() += pos(driftRate_())
*(sizeGroups_[i+2]->x() - sizeGroups_[i+1]->x())
/(sizeGroups_[i+1]->x() - sizeGroups_[i]->x());
}
else if (i == sizeGroups_.size() - 2)
{
const sizeGroup& fh = *sizeGroups_[i-1];
rx_() += pos(driftRate_())*sizeGroups_[i+1]->x()
/sizeGroups_[i]->x();
volScalarField& Suh = Sui_();
Suh = neg(driftRate_())*fh.x()*r_()*driftRate_()*fi*fi.phase()
/fi.x()/((r_() - 1)*v_[i-1]);
const phasePairKey pair
(
fi.phase().name(),
fh.phase().name()
);
// Check whether fi and fh reside in different velocityGroups
if (pDmdt_.found(pair))
{
const scalar dmdtSign
(
Pair<word>::compare(pDmdt_.find(pair).key(), pair)
);
pDmdt_[pair]->ref() -= dmdtSign*Suh*rho;
rdx_() += pos(driftRate_())
*(sizeGroups_[i+1]->x() - sizeGroups_[i]->x())
/(sizeGroups_[i]->x() - sizeGroups_[i-1]->x());
}
Su_[i-1] += Suh;
}
else
if (i == 1)
{
Su_[i-1] += neg(driftRate_())*sizeGroups_[i-1]->x()*r_()
*driftRate_()*fi*fi.phase()/fi.x()/((r_() - 1)*v_[i-1]);
rx_() += neg(driftRate_())*sizeGroups_[i-1]->x()
/sizeGroups_[i]->x();
rdx_() += neg(driftRate_())
*(sizeGroups_[i]->x() - sizeGroups_[i-1]->x())
/(sizeGroups_[i+1]->x() - sizeGroups_[i]->x());
}
else if (i > 1)
{
rx_() += neg(driftRate_())*sizeGroups_[i-2]->x()/sizeGroups_[i-1]->x();
rdx_() += neg(driftRate_())
*(sizeGroups_[i-1]->x() - sizeGroups_[i-2]->x())
/(sizeGroups_[i]->x() - sizeGroups_[i-1]->x());
}
if (i != sizeGroups_.size() - 1)
{
if (velocityGroups_.size() > 1)
{
const sizeGroup& fj = *sizeGroups_[i+1];
volScalarField& Suj = Sui_;
volScalarField& Suj = Sui_();
Suj = pos(driftRate_())*driftRate_()*rdx_()*fi*fi.phase()/fi.x()
/(rx_() - 1);
Suj = pos(driftRate_())*fj.x()*r_()*driftRate_()*fi*fi.phase()
/fi.x()/((r_() - 1)*v_[i+1]);
Su_[i+1] += Suj;
const phasePairKey pair
const phasePairKey pairij
(
fi.phase().name(),
fj.phase().name()
);
// Check whether fi and fj reside in different velocityGroups
if (pDmdt_.found(pair))
if (pDmdt_.found(pairij))
{
const scalar dmdtSign
(
Pair<word>::compare(pDmdt_.find(pair).key(), pair)
Pair<word>::compare(pDmdt_.find(pairij).key(), pairij)
);
pDmdt_[pair]->ref() -= dmdtSign*Suj*rho;
pDmdt_[pairij]->ref() -= dmdtSign*Suj*rho;
}
}
Su_[i+1] += Suj;
}
else
if (i != 0)
{
Su_[i+1] += pos(driftRate_())*sizeGroups_[i+1]->x()*r_()
*driftRate_()*fi*fi.phase()/fi.x()/((r_() - 1)*v_[i+1]);
const sizeGroup& fh = *sizeGroups_[i-1];
volScalarField& Suh = Sui_;
Suh = neg(driftRate_())*driftRate_()*rdx_()*fi*fi.phase()/fi.x()
/(rx_() - 1);
Su_[i-1] += Suh;
const phasePairKey pairih
(
fi.phase().name(),
fh.phase().name()
);
if (pDmdt_.found(pairih))
{
const scalar dmdtSign
(
Pair<word>::compare(pDmdt_.find(pairih).key(), pairih)
);
pDmdt_[pairih]->ref() -= dmdtSign*Suh*rho;
}
}
}
void Foam::diameterModels::populationBalanceModel::nucleation(const label i)
{
dimensionedScalar volume("volume", dimVolume, 1.0);
Su_[i] += sizeGroups_[i]->x()*nucleationRate_();
}
void Foam::diameterModels::populationBalanceModel::sources()
{
forAll(sizeGroups_, i)
@ -830,6 +755,18 @@ void Foam::diameterModels::populationBalanceModel::sources()
drift(i);
}
if (nucleation_.size() != 0)
{
nucleationRate_() *= 0.0;
forAll(nucleation_, model)
{
nucleation_[model].nucleationRate(nucleationRate_(), i);
}
nucleation(i);
}
}
}
@ -872,7 +809,8 @@ void Foam::diameterModels::populationBalanceModel::calcVelocity()
forAllIter(PtrListDictionary<velocityGroup>, velocityGroups_, iter)
{
U_ += iter().phase().U()*iter().phase()
U_ += iter().phase().U()
*max(iter().phase(), iter().phase().residualAlpha())
/max(alphas_, iter().phase().residualAlpha());
}
}
@ -983,7 +921,17 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel
delta_(),
Su_(),
SuSp_(),
Sui_(),
Sui_
(
IOobject
(
"Sui",
fluid_.time().timeName(),
fluid_.mesh()
),
fluid_.mesh(),
dimensionedScalar("Sui", inv(dimTime), Zero)
),
coalescence_
(
dict_.lookup("coalescenceModels"),
@ -1008,7 +956,14 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel
driftModel::iNew(*this)
),
driftRate_(),
r_(),
rx_(),
rdx_(),
nucleation_
(
dict_.lookup("nucleationModels"),
nucleationModel::iNew(*this)
),
nucleationRate_(),
alphas_
(
IOobject
@ -1047,27 +1002,21 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel
),
d_()
{
this->registerVelocityGroups();
this->registerVelocityAndSizeGroups();
this->createPhasePairs();
if (sizeGroups_.size() < 3)
{
FatalErrorInFunction
<< "The populationBalance " << name_
<< " requires a minimum number of three sizeGroups to be"
<< " specified."
<< exit(FatalError);
}
if (velocityGroups_.size() > 1)
{
Sui_.reset
(
new volScalarField
(
IOobject
(
"Sui",
fluid_.time().timeName(),
fluid_.mesh()
),
fluid_.mesh(),
dimensionedScalar("Sui", inv(dimTime), Zero)
)
);
d_.reset
(
new volScalarField
@ -1169,7 +1118,7 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel
)
);
r_.reset
rx_.reset
(
new volScalarField
(
@ -1183,6 +1132,44 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel
dimensionedScalar("r", dimless, Zero)
)
);
rdx_.reset
(
new volScalarField
(
IOobject
(
"r",
fluid_.time().timeName(),
fluid_.mesh()
),
fluid_.mesh(),
dimensionedScalar("r", dimless, Zero)
)
);
}
if (nucleation_.size() != 0)
{
nucleationRate_.reset
(
new volScalarField
(
IOobject
(
"nucleationRate",
fluid.time().timeName(),
fluid.mesh()
),
fluid.mesh(),
dimensionedScalar
(
"nucleationRate",
inv(dimTime*dimVolume),
Zero
)
)
);
}
}
@ -1207,6 +1194,50 @@ bool Foam::diameterModels::populationBalanceModel::writeData(Ostream& os) const
}
const Foam::dimensionedScalar
Foam::diameterModels::populationBalanceModel::gamma
(
const label i,
const dimensionedScalar& v
) const
{
dimensionedScalar lowerBoundary(v);
dimensionedScalar upperBoundary(v);
const dimensionedScalar& xi = sizeGroups_[i]->x();
if (i == 0)
{
lowerBoundary = xi;
}
else
{
lowerBoundary = sizeGroups_[i-1]->x();
}
if (i == sizeGroups_.size() - 1)
{
upperBoundary = xi;
}
else
{
upperBoundary = sizeGroups_[i+1]->x();
}
if (v < lowerBoundary || v > upperBoundary)
{
return 0.0;
}
else if (v.value() <= xi.value())
{
return (v - lowerBoundary)/(xi - lowerBoundary);
}
else
{
return (upperBoundary - v)/(upperBoundary - xi);
}
}
void Foam::diameterModels::populationBalanceModel::solve()
{
const dictionary& solutionControls = mesh_.solverDict(name_);
@ -1312,6 +1343,17 @@ void Foam::diameterModels::populationBalanceModel::solve()
{
d_() = dsm();
}
volScalarField fAlpha0 =
*sizeGroups_.first()*sizeGroups_.first()->phase();
volScalarField fAlphaN =
*sizeGroups_.last()*sizeGroups_.last()->phase();
Info<< this->name() << " sizeGroup phase fraction first, last = "
<< fAlpha0.weightedAverage(this->mesh().V()).value()
<< ' ' << fAlphaN.weightedAverage(this->mesh().V()).value()
<< endl;
}
}

View File

@ -31,8 +31,8 @@ Description
a transport equation of the volume-based number density function. The
discretization is done using the fixed pivot technique of Kumar and
Ramkrishna (1996). The source terms are written in a way that particle
number and mass are preserved. Coalescence (aggregation), breakup as well
as drift (growth and surface loss) are supported.
number and mass are preserved. Coalescence (aggregation), breakup, drift
(growth and surface loss) as well as nucleation are supported.
For the discrete breakup term two recipies are available, depending on the
model choice. For models which state a total breakup rate and a separate
daughter size distribution function, the formulation of Kumar and Ramkrishna
@ -132,6 +132,9 @@ Usage
(
densityChange{}
);
nucleationModels
();
}
}
\endverbatim
@ -166,6 +169,7 @@ class coalescenceModel;
class breakupModel;
class binaryBreakupModel;
class driftModel;
class nucleationModel;
/*---------------------------------------------------------------------------*\
Class populationBalanceModel Declaration
@ -226,8 +230,8 @@ class populationBalanceModel
//- Sources treated implicitly or explicitly depending on sign
PtrList<volScalarField> SuSp_;
//- Field for caching pDmdt sources
autoPtr<volScalarField> Sui_;
//- Field for caching sources
volScalarField Sui_;
//- Coalescence models
PtrList<coalescenceModel> coalescence_;
@ -253,8 +257,17 @@ class populationBalanceModel
//- Drift rate
autoPtr<volScalarField> driftRate_;
//- Ratio between sucessive reprasentative volumes
autoPtr<volScalarField> r_;
//- Ratio between sucessive representative volumes
autoPtr<volScalarField> rx_;
//- Ratio between sucessive class widths
autoPtr<volScalarField> rdx_;
//- Zeroeth order models
PtrList<nucleationModel> nucleation_;
//- Zeroeth order rate
autoPtr<volScalarField> nucleationRate_;
//- Total void fraction of phases belonging to this populationBalance
volScalarField alphas_;
@ -268,7 +281,7 @@ class populationBalanceModel
// Private member functions
void registerVelocityGroups();
void registerVelocityAndSizeGroups();
void add(sizeGroup* group);
@ -276,12 +289,6 @@ class populationBalanceModel
void preSolve();
dimensionedScalar gamma
(
const label i,
const dimensionedScalar& v
) const;
void birthByCoalescence(const label j, const label k);
void deathByCoalescence(const label i, const label j);
@ -298,6 +305,8 @@ class populationBalanceModel
void drift(const label i);
void nucleation(const label i);
void sources();
void dmdt();
@ -401,6 +410,13 @@ public:
//- Return average velocity
inline const volVectorField& U() const;
//- Return allocation coefficient
const dimensionedScalar gamma
(
const label i,
const dimensionedScalar& v
) const;
//- Solve the population balance equation
void solve();
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -123,9 +123,26 @@ namespace Foam
populationBalanceMultiphaseSystem
);
typedef
ThermalPhaseChangePhaseSystem
<
PopulationBalancePhaseSystem
<
HeatAndMassTransferPhaseSystem
<
MomentumTransferPhaseSystem<multiphaseSystem>
>
>
>
thermalPhaseChangePopulationBalanceMultiphaseSystem;
addNamedToRunTimeSelectionTable
(
multiphaseSystem,
thermalPhaseChangePopulationBalanceMultiphaseSystem,
dictionary,
thermalPhaseChangePopulationBalanceMultiphaseSystem
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -121,6 +121,27 @@ namespace Foam
dictionary,
populationBalanceTwoPhaseSystem
);
typedef
ThermalPhaseChangePhaseSystem
<
PopulationBalancePhaseSystem
<
HeatAndMassTransferPhaseSystem
<
MomentumTransferPhaseSystem<twoPhaseSystem>
>
>
>
thermalPhaseChangePopulationBalanceTwoPhaseSystem;
addNamedToRunTimeSelectionTable
(
twoPhaseSystem,
thermalPhaseChangePopulationBalanceTwoPhaseSystem,
dictionary,
thermalPhaseChangePopulationBalanceTwoPhaseSystem
);
}

View File

@ -31,7 +31,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<class Type>
Foam::scalar Foam::dynamicIndexedOctree<Type>::perturbTol_ = 10*SMALL;
Foam::scalar Foam::dynamicIndexedOctree<Type>::perturbTol_ = 10*small;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -653,13 +653,13 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
if (mag(pt[dir]-bb.min()[dir]) < mag(perturbVec[dir]))
{
// Close to 'left' side. Push well beyond left side.
scalar perturbDist = perturbVec[dir] + ROOTVSMALL;
scalar perturbDist = perturbVec[dir] + rootVSmall;
perturbedPt[dir] = bb.min()[dir] + perturbDist;
}
else if (mag(pt[dir]-bb.max()[dir]) < mag(perturbVec[dir]))
{
// Close to 'right' side. Push well beyond right side.
scalar perturbDist = perturbVec[dir] + ROOTVSMALL;
scalar perturbDist = perturbVec[dir] + rootVSmall;
perturbedPt[dir] = bb.max()[dir] - perturbDist;
}
}
@ -670,12 +670,12 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
{
if (mag(pt[dir]-bb.min()[dir]) < mag(perturbVec[dir]))
{
scalar perturbDist = perturbVec[dir] + ROOTVSMALL;
scalar perturbDist = perturbVec[dir] + rootVSmall;
perturbedPt[dir] = bb.min()[dir] - perturbDist;
}
else if (mag(pt[dir]-bb.max()[dir]) < mag(perturbVec[dir]))
{
scalar perturbDist = perturbVec[dir] + ROOTVSMALL;
scalar perturbDist = perturbVec[dir] + rootVSmall;
perturbedPt[dir] = bb.max()[dir] + perturbDist;
}
}
@ -729,22 +729,22 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
{
if (pushInside)
{
perturbedPt[0] = bb.min()[0] + (perturbVec[0] + ROOTVSMALL);
perturbedPt[0] = bb.min()[0] + (perturbVec[0] + rootVSmall);
}
else
{
perturbedPt[0] = bb.min()[0] - (perturbVec[0] + ROOTVSMALL);
perturbedPt[0] = bb.min()[0] - (perturbVec[0] + rootVSmall);
}
}
else if (faceID & treeBoundBox::RIGHTBIT)
{
if (pushInside)
{
perturbedPt[0] = bb.max()[0] - (perturbVec[0] + ROOTVSMALL);
perturbedPt[0] = bb.max()[0] - (perturbVec[0] + rootVSmall);
}
else
{
perturbedPt[0] = bb.max()[0] + (perturbVec[0] + ROOTVSMALL);
perturbedPt[0] = bb.max()[0] + (perturbVec[0] + rootVSmall);
}
}
@ -752,22 +752,22 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
{
if (pushInside)
{
perturbedPt[1] = bb.min()[1] + (perturbVec[1] + ROOTVSMALL);
perturbedPt[1] = bb.min()[1] + (perturbVec[1] + rootVSmall);
}
else
{
perturbedPt[1] = bb.min()[1] - (perturbVec[1] + ROOTVSMALL);
perturbedPt[1] = bb.min()[1] - (perturbVec[1] + rootVSmall);
}
}
else if (faceID & treeBoundBox::TOPBIT)
{
if (pushInside)
{
perturbedPt[1] = bb.max()[1] - (perturbVec[1] + ROOTVSMALL);
perturbedPt[1] = bb.max()[1] - (perturbVec[1] + rootVSmall);
}
else
{
perturbedPt[1] = bb.max()[1] + (perturbVec[1] + ROOTVSMALL);
perturbedPt[1] = bb.max()[1] + (perturbVec[1] + rootVSmall);
}
}
@ -775,22 +775,22 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
{
if (pushInside)
{
perturbedPt[2] = bb.min()[2] + (perturbVec[2] + ROOTVSMALL);
perturbedPt[2] = bb.min()[2] + (perturbVec[2] + rootVSmall);
}
else
{
perturbedPt[2] = bb.min()[2] - (perturbVec[2] + ROOTVSMALL);
perturbedPt[2] = bb.min()[2] - (perturbVec[2] + rootVSmall);
}
}
else if (faceID & treeBoundBox::FRONTBIT)
{
if (pushInside)
{
perturbedPt[2] = bb.max()[2] - (perturbVec[2] + ROOTVSMALL);
perturbedPt[2] = bb.max()[2] - (perturbVec[2] + rootVSmall);
}
else
{
perturbedPt[2] = bb.max()[2] + (perturbVec[2] + ROOTVSMALL);
perturbedPt[2] = bb.max()[2] + (perturbVec[2] + rootVSmall);
}
}

View File

@ -1,59 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5";
object T.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 368;
boundaryField
{
inlet
{
type fixedValue;
value uniform 368;
}
outlet
{
type inletOutlet;
phi phi.liquid;
inletValue uniform 368;
value uniform 368;
}
wall1
{
type fixedMultiPhaseHeatFlux;
relax 0.5;
q uniform 0;
phase "liquid";
value uniform 368;
}
wall2
{
type fixedMultiPhaseHeatFlux;
relax 0.5;
q uniform 0;
phase "liquid";
value uniform 368;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,54 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 1 0);
boundaryField
{
inlet
{
type mapped;
field U.gas;
setAverage 1;
average (0 1 0);
interpolationScheme cell;
value uniform (0 1 0);
}
outlet
{
type pressureInletOutletVelocity;
phi phi.gas;
value uniform (0 1 0);
}
wall1
{
type slip;
}
wall2
{
type slip;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,73 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 1e-8;
boundaryField
{
inlet
{
type calculated;
value uniform 1e-8;
}
outlet
{
type calculated;
value uniform 1e-8;
}
wall1
{
type compressible::alphatWallBoilingWallFunction;
otherPhase liquid;
phaseType vapor;
Prt 0.85;
Cmu 0.09;
kappa 0.41;
E 9.8;
partitioningModel
{
type phaseFraction;
alphaCrit 0.2;
}
value uniform 0;
}
wall2
{
type compressible::alphatWallBoilingWallFunction;
otherPhase liquid;
phaseType vapor;
Prt 0.85;
Cmu 0.09;
kappa 0.41;
E 9.8;
partitioningModel
{
type phaseFraction;
alphaCrit 0.2;
}
value uniform 0;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,101 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 1e-8;
boundaryField
{
inlet
{
type calculated;
value uniform 1e-8;
}
outlet
{
type calculated;
value uniform 1e-8;
}
wall1
{
type compressible::alphatWallBoilingWallFunction;
otherPhase gas;
phaseType liquid;
Prt 0.85;
Cmu 0.09;
kappa 0.41;
E 9.8;
relax 0.01;
dmdt uniform 0;
partitioningModel
{
type phaseFraction;//Lavieville;
alphaCrit 0.2;
}
nucleationSiteModel
{
type LemmertChawla;
}
departureDiamModel
{
type TolubinskiKostanchuk;
}
departureFreqModel
{
type Cole;
}
value uniform 0.01;
}
wall2
{
type compressible::alphatWallBoilingWallFunction;
otherPhase gas;
phaseType liquid;
Prt 0.85;
Cmu 0.09;
kappa 0.41;
E 9.8;
relax 0.01;
dmdt uniform 0;
partitioningModel
{
type phaseFraction;//Lavieville;
alphaCrit 0.2;
}
nucleationSiteModel
{
type LemmertChawla;
}
departureDiamModel
{
type TolubinskiKostanchuk;
}
departureFreqModel
{
type Cole;
}
value uniform 0.01;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -6,17 +6,16 @@ cd ${0%/*} || exit 1 # Run from this directory
application=`getApplication`
\rm -rf 0
cp -r 0.org 0
runApplication blockMesh
runApplication $application
if ! isTest $@
then
foamDictionary system/controlDict -entry endTime -set 5
foamDictionary system/controlDict -entry startTime -set 2
foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 500000'
foamDictionary 2/T.liquid -entry boundaryField.wall1.q -set 'uniform 500000'
foamDictionary 2/U.liquid -entry boundaryField.inlet.type -set 'fixedValue'
runApplication -a $application
fi

View File

@ -1,55 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5";
object T.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 368;
boundaryField
{
inlet
{
type fixedValue;
value uniform 368;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 368;
value uniform 368;
}
wall1
{
type copiedFixedValue;
sourceFieldName T.liquid;
value uniform 368;
}
wall2
{
type copiedFixedValue;
sourceFieldName T.liquid;
value uniform 368;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,54 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 1 0);
boundaryField
{
inlet
{
type mapped;
field U.gas;
setAverage 1;
average (0 1 0);
interpolationScheme cell;
value uniform (0 1 0);
}
outlet
{
type pressureInletOutletVelocity;
phi phi.gas;
value uniform (0 1 0);
}
wall1
{
type slip;
}
wall2
{
type slip;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,54 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 1 0);
boundaryField
{
inlet
{
type mapped;
field U.liquid;
setAverage 1;
average (0 1 0);
interpolationScheme cell;
value uniform (0 1 0);
}
outlet
{
type pressureInletOutletVelocity;
phi phi.liquid;
value uniform (0 1 0);
}
wall1
{
type noSlip;
}
wall2
{
type noSlip;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,66 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 1e-8;
boundaryField
{
inlet
{
type calculated;
value uniform 1e-8;
}
outlet
{
type calculated;
value uniform 1e-8;
}
wall1
{
type compressible::alphatWallBoilingWallFunction;
otherPhase liquid;
phaseType vapor;
Prt 0.85;
Cmu 0.09;
kappa 0.41;
E 9.8;
partitioningModel
{
type phaseFraction;
}
value uniform 0;
}
wall2
{
type compressible::alphatPhaseChangeJayatillekeWallFunction;
Prt 0.85;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,62 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.001;
boundaryField
{
inlet
{
type mapped;
field epsilon.gas;
setAverage 0;
average 0;
interpolationScheme cell;
value uniform 0.01;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 0.001;
}
wall1
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.001;
}
wall2
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.001;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,62 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.001;
boundaryField
{
inlet
{
type mapped;
field epsilon.gas;
setAverage 0;
average 0;
interpolationScheme cell;
value uniform 0.01;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 0.001;
}
wall1
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.001;
}
wall2
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.001;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,63 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.001;
boundaryField
{
inlet
{
type mapped;
field epsilon.liquid;
setAverage 0;
average 0;
interpolationScheme cell;
value uniform 0.001;
}
outlet
{
type inletOutlet;
phi phi.liquid;
inletValue uniform 0.00015;
value uniform 0.001;
}
wall1
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.001;
}
wall2
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.001;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.01;
boundaryField
{
inlet
{
type mapped;
field k.gas;
setAverage 0;
average 0;
interpolationScheme cell;
value uniform 0.01;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 0.01;
value uniform 0.01;
}
wall1
{
type kqRWallFunction;
value uniform 0.01;
}
wall2
{
type kqRWallFunction;
value uniform 0.01;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.01;
boundaryField
{
inlet
{
type mapped;
field k.gas;
setAverage 0;
average 0;
interpolationScheme cell;
value uniform 0.01;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 0.01;
value uniform 0.01;
}
wall1
{
type kqRWallFunction;
value uniform 0.01;
}
wall2
{
type kqRWallFunction;
value uniform 0.01;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.01;
boundaryField
{
inlet
{
type mapped;
field k.liquid;
setAverage 0;
average 0;
interpolationScheme cell;
value uniform 0.01;
}
outlet
{
type inletOutlet;
phi phi.liquid;
inletValue uniform 3.75e-05;
value uniform 0.01;
}
wall1
{
type kqRWallFunction;
value uniform 0.01;
}
wall2
{
type kqRWallFunction;
value uniform 0.01;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0.0001;
boundaryField
{
inlet
{
type calculated;
value uniform 0.0001;
}
outlet
{
type calculated;
value uniform 0.0001;
}
wall1
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
wall2
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0.0001;
boundaryField
{
inlet
{
type calculated;
value uniform 0.0001;
}
outlet
{
type calculated;
value uniform 0.0001;
}
wall1
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
wall2
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0.0001;
boundaryField
{
inlet
{
type calculated;
value uniform 0.0001;
}
outlet
{
type calculated;
value uniform 0.0001;
}
wall1
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.0001;
}
wall2
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.0001;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -6,17 +6,16 @@ cd ${0%/*} || exit 1 # Run from this directory
application=`getApplication`
\rm -rf 0
cp -r 0.org 0
runApplication blockMesh
runApplication $application
if ! isTest $@
then
foamDictionary system/controlDict -entry endTime -set 5
foamDictionary system/controlDict -entry startTime -set 2
foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 500000'
foamDictionary 2/T.liquid -entry boundaryField.wall1.q -set 'uniform 500000'
foamDictionary 2/U.liquid -entry boundaryField.inlet.type -set 'fixedValue'
runApplication -a $application
fi

View File

@ -122,6 +122,9 @@ populationBalanceCoeffs
(
densityChange{}
);
nucleationModels
();
}
}

View File

@ -104,6 +104,9 @@ populationBalanceCoeffs
(
densityChange{}
);
nucleationModels
();
}
}

View File

@ -12,7 +12,9 @@ runApplication $application
if ! isTest $@
then
foamDictionary system/controlDict -entry endTime -set 5
foamDictionary system/controlDict -entry startTime -set 2
foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 1e5'
foamDictionary 2/U.liquid -entry boundaryField.inlet.type -set 'fixedValue'
runApplication -a $application
fi

View File

@ -38,7 +38,6 @@ mixture
{
rho 1;
}
thermodynamics
{
Hf 0;

View File

@ -17,7 +17,7 @@ FoamFile
application reactingTwoPhaseEulerFoam;
startFrom latestTime;
startFrom startTime;
startTime 0;

View File

@ -17,7 +17,7 @@ FoamFile
application reactingTwoPhaseEulerFoam;
startFrom latestTime;
startFrom startTime;
startTime 0;

View File

@ -1,55 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5";
object T.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 368;
boundaryField
{
inlet
{
type fixedValue;
value uniform 368;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 368;
value uniform 368;
}
wall1
{
type copiedFixedValue;
sourceFieldName T.liquid;
value uniform 368;
}
wall2
{
type copiedFixedValue;
sourceFieldName T.liquid;
value uniform 368;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,59 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5";
object T.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 368;
boundaryField
{
inlet
{
type fixedValue;
value uniform 368;
}
outlet
{
type inletOutlet;
phi phi.liquid;
inletValue uniform 368;
value uniform 368;
}
wall1
{
type fixedMultiPhaseHeatFlux;
relax 0.5;
q uniform 0;
phase "liquid";
value uniform 368;
}
wall2
{
type fixedMultiPhaseHeatFlux;
relax 0.5;
q uniform 0;
phase "liquid";
value uniform 368;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,54 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 1 0);
boundaryField
{
inlet
{
type mapped;
field U.gas;
setAverage 1;
average (0 1 0);
interpolationScheme cell;
value uniform (0 1 0);
}
outlet
{
type pressureInletOutletVelocity;
phi phi.gas;
value uniform (0 1 0);
}
wall1
{
type slip;
}
wall2
{
type slip;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,54 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 1 0);
boundaryField
{
inlet
{
type mapped;
field U.gas;
setAverage 1;
average (0 1 0);
interpolationScheme cell;
value uniform (0 1 0);
}
outlet
{
type pressureInletOutletVelocity;
phi phi.gas;
value uniform (0 1 0);
}
wall1
{
type slip;
}
wall2
{
type slip;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,54 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 1 0);
boundaryField
{
inlet
{
type mapped;
field U.liquid;
setAverage 1;
average (0 1 0);
interpolationScheme cell;
value uniform (0 1 0);
}
outlet
{
type pressureInletOutletVelocity;
phi phi.liquid;
value uniform (0 1 0);
}
wall1
{
type noSlip;
}
wall2
{
type noSlip;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,51 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 0;
value uniform 0;
}
wall1
{
type zeroGradient;
}
wall2
{
type zeroGradient;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,51 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField
{
inlet
{
type calculated;
value uniform 1;
}
outlet
{
type calculated;
value uniform 1;
}
wall1
{
type calculated;
value uniform 1;
}
wall2
{
type calculated;
value uniform 1;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,73 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 1e-8;
boundaryField
{
inlet
{
type calculated;
value uniform 1e-8;
}
outlet
{
type calculated;
value uniform 1e-8;
}
wall1
{
type compressible::alphatWallBoilingWallFunction;
otherPhase liquid;
phaseType vapor;
Prt 0.85;
Cmu 0.09;
kappa 0.41;
E 9.8;
partitioningModel
{
type phaseFraction;
alphaCrit 0.2;
}
value uniform 0;
}
wall2
{
type compressible::alphatWallBoilingWallFunction;
otherPhase liquid;
phaseType vapor;
Prt 0.85;
Cmu 0.09;
kappa 0.41;
E 9.8;
partitioningModel
{
type phaseFraction;
alphaCrit 0.2;
}
value uniform 0;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,101 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 1e-8;
boundaryField
{
inlet
{
type calculated;
value uniform 1e-8;
}
outlet
{
type calculated;
value uniform 1e-8;
}
wall1
{
type compressible::alphatWallBoilingWallFunction;
otherPhase gas;
phaseType liquid;
Prt 0.85;
Cmu 0.09;
kappa 0.41;
E 9.8;
relax 0.01;
dmdt uniform 0;
partitioningModel
{
type phaseFraction;//Lavieville;
alphaCrit 0.2;
}
nucleationSiteModel
{
type LemmertChawla;
}
departureDiamModel
{
type TolubinskiKostanchuk;
}
departureFreqModel
{
type Cole;
}
value uniform 0.01;
}
wall2
{
type compressible::alphatWallBoilingWallFunction;
otherPhase gas;
phaseType liquid;
Prt 0.85;
Cmu 0.09;
kappa 0.41;
E 9.8;
relax 0.01;
dmdt uniform 0;
partitioningModel
{
type phaseFraction;//Lavieville;
alphaCrit 0.2;
}
nucleationSiteModel
{
type LemmertChawla;
}
departureDiamModel
{
type TolubinskiKostanchuk;
}
departureFreqModel
{
type Cole;
}
value uniform 0.01;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,62 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.001;
boundaryField
{
inlet
{
type mapped;
field epsilon.gas;
setAverage 0;
average 0;
interpolationScheme cell;
value uniform 0.01;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 0.001;
}
wall1
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.001;
}
wall2
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.001;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,63 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.001;
boundaryField
{
inlet
{
type mapped;
field epsilon.liquid;
setAverage 0;
average 0;
interpolationScheme cell;
value uniform 0.001;
}
outlet
{
type inletOutlet;
phi phi.liquid;
inletValue uniform 0.00015;
value uniform 0.001;
}
wall1
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.001;
}
wall2
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.001;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.01;
boundaryField
{
inlet
{
type mapped;
field k.gas;
setAverage 0;
average 0;
interpolationScheme cell;
value uniform 0.01;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 0.01;
value uniform 0.01;
}
wall1
{
type kqRWallFunction;
value uniform 0.01;
}
wall2
{
type kqRWallFunction;
value uniform 0.01;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.01;
boundaryField
{
inlet
{
type mapped;
field k.liquid;
setAverage 0;
average 0;
interpolationScheme cell;
value uniform 0.01;
}
outlet
{
type inletOutlet;
phi phi.liquid;
inletValue uniform 3.75e-05;
value uniform 0.01;
}
wall1
{
type kqRWallFunction;
value uniform 0.01;
}
wall2
{
type kqRWallFunction;
value uniform 0.01;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0.0001;
boundaryField
{
inlet
{
type calculated;
value uniform 0.0001;
}
outlet
{
type calculated;
value uniform 0.0001;
}
wall1
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
wall2
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0.0001;
boundaryField
{
inlet
{
type calculated;
value uniform 0.0001;
}
outlet
{
type calculated;
value uniform 0.0001;
}
wall1
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.0001;
}
wall2
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.0001;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,51 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 100000;
boundaryField
{
inlet
{
type calculated;
value uniform 100000;
}
outlet
{
type calculated;
value uniform 100000;
}
wall1
{
type calculated;
value uniform 100000;
}
wall2
{
type calculated;
value uniform 100000;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -6,17 +6,16 @@ cd ${0%/*} || exit 1 # Run from this directory
application=`getApplication`
\rm -rf 0
cp -r 0.org 0
runApplication blockMesh
runApplication $application
if ! isTest $@
then
foamDictionary system/controlDict -entry endTime -set 5
foamDictionary system/controlDict -entry startTime -set 2
foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 500000'
foamDictionary 2/T.liquid -entry boundaryField.wall1.q -set 'uniform 500000'
foamDictionary 2/U.liquid -entry boundaryField.inlet.type -set 'fixedValue'
runApplication -a $application
fi

View File

@ -35,9 +35,7 @@ boundaryField
}
wall1
{
type copiedFixedValue;
sourceFieldName T.liquid;
value uniform 368;
type zeroGradient;
}
wall2
{

View File

@ -35,11 +35,7 @@ boundaryField
}
wall1
{
type fixedMultiPhaseHeatFlux;
relax 0.5;
q uniform 0;
phase "liquid";
value uniform 368;
type zeroGradient;
}
wall2
{

View File

@ -33,32 +33,13 @@ boundaryField
}
wall1
{
type compressible::alphatWallBoilingWallFunction;
otherPhase gas2;
phaseType liquid;
type compressible::alphatPhaseChangeJayatillekeWallFunction;
Prt 0.85;
Cmu 0.09;
kappa 0.41;
E 9.8;
relax 0.01;
dmdt uniform 0;
partitioningModel
{
type phaseFraction;
}
nucleationSiteModel
{
type LemmertChawla;
}
departureDiamModel
{
type TolubinskiKostanchuk;
}
departureFreqModel
{
type Cole;
}
value uniform 0.01;
value uniform 1e-8;
}
wall2
{

View File

@ -11,27 +11,24 @@ FoamFile
format ascii;
class volScalarField;
location "0";
object alpha.gas;
object f.gas.bubbles;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
internalField uniform 1.0;
boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
value uniform 1.0;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 0;
value uniform 0;
type zeroGradient;
}
wall1
{
@ -41,11 +38,6 @@ boundaryField
{
type zeroGradient;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
cp ./system/controlDict.org ./system/controlDict
#------------------------------------------------------------------------------

View File

@ -0,0 +1,21 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
application=`getApplication`
runApplication blockMesh
runApplication $application
if ! isTest $@
then
foamDictionary system/controlDict -entry endTime -set 5
foamDictionary system/controlDict -entry startTime -set 2
foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 1e5'
foamDictionary 2/U.liquid -entry boundaryField.inlet.type -set 'fixedValue'
runApplication -a $application
fi
#------------------------------------------------------------------------------

View File

@ -0,0 +1,66 @@
p,Tsat
99083.3,372.499
100667,372.942
102250,373.379
103833,373.811
105417,374.237
107000,374.658
108583,375.074
110167,375.485
111750,375.891
113333,376.293
114917,376.689
116500,377.082
118083,377.47
119667,377.853
121250,378.233
122833,378.608
124417,378.98
126000,379.347
127583,379.711
129167,380.071
130750,380.427
132333,380.78
133917,381.13
135500,381.476
137083,381.819
138667,382.158
140250,382.494
141833,382.828
143417,383.158
145000,383.485
146583,383.809
148167,384.131
149750,384.449
151333,384.765
152917,385.078
154500,385.389
156083,385.697
157667,386.002
159250,386.305
160833,386.605
162417,386.903
164000,387.199
165583,387.492
167167,387.783
168750,388.072
170333,388.358
171917,388.642
173500,388.925
175083,389.205
176667,389.483
178250,389.759
179833,390.033
181417,390.305
183000,390.575
184583,390.843
186167,391.109
187750,391.374
189333,391.636
190917,391.897
192500,392.156
194083,392.413
195667,392.669
197250,392.923
198833,393.175
200417,393.426
1 p Tsat
2 99083.3 372.499
3 100667 372.942
4 102250 373.379
5 103833 373.811
6 105417 374.237
7 107000 374.658
8 108583 375.074
9 110167 375.485
10 111750 375.891
11 113333 376.293
12 114917 376.689
13 116500 377.082
14 118083 377.47
15 119667 377.853
16 121250 378.233
17 122833 378.608
18 124417 378.98
19 126000 379.347
20 127583 379.711
21 129167 380.071
22 130750 380.427
23 132333 380.78
24 133917 381.13
25 135500 381.476
26 137083 381.819
27 138667 382.158
28 140250 382.494
29 141833 382.828
30 143417 383.158
31 145000 383.485
32 146583 383.809
33 148167 384.131
34 149750 384.449
35 151333 384.765
36 152917 385.078
37 154500 385.389
38 156083 385.697
39 157667 386.002
40 159250 386.305
41 160833 386.605
42 162417 386.903
43 164000 387.199
44 165583 387.492
45 167167 387.783
46 168750 388.072
47 170333 388.358
48 171917 388.642
49 173500 388.925
50 175083 389.205
51 176667 389.483
52 178250 389.759
53 179833 390.033
54 181417 390.305
55 183000 390.575
56 184583 390.843
57 186167 391.109
58 187750 391.374
59 189333 391.636
60 190917 391.897
61 192500 392.156
62 194083 392.413
63 195667 392.669
64 197250 392.923
65 198833 393.175
66 200417 393.426

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 -9.81 0 );
// ************************************************************************* //

View File

@ -0,0 +1,218 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object phaseProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type thermalPhaseChangePopulationBalanceTwoPhaseSystem;
phases (gas liquid);
massTransfer on;
populationBalances (bubbles);
gas
{
type purePhaseModel;
diameterModel velocityGroup;
velocityGroupCoeffs
{
populationBalance bubbles;
formFactor 0.5235987756;
sizeGroups
(
f0 {d 1.0e-4; value 0 ;}
f1 {d 2.0e-4; value 0 ;}
f2 {d 3.0e-4; value 0 ;}
f3 {d 4.0e-4; value 0 ;}
f4 {d 5.0e-4; value 0 ;}
f5 {d 6.0e-4; value 0 ;}
f6 {d 7.0e-4; value 0 ;}
f7 {d 8.0e-4; value 1.0 ;}
f8 {d 9.0e-4; value 0 ;}
f9 {d 1.0e-3; value 0 ;}
f10 {d 1.1e-3; value 0 ;}
f11 {d 1.2e-3; value 0 ;}
f12 {d 1.3e-3; value 0 ;}
f13 {d 1.4e-3; value 0 ;}
);
}
residualAlpha 1e-4;
}
liquid
{
type purePhaseModel;
diameterModel constant;
constantCoeffs
{
d 0.00045;
}
Sc 0.7;
residualAlpha 1e-4;
}
populationBalanceCoeffs
{
bubbles
{
continuousPhase liquid;
coalescenceModels
(
hydrodynamic
{
C 0.25;
}
);
binaryBreakupModels
();
breakupModels
(
exponential
{
C 0.5;
exponent 0.01;
daughterSizeDistributionModel uniformBinary;
}
);
driftModels
(
phaseChange
{
pairNames (gasAndLiquid);
}
densityChange{}
);
nucleationModels
(
wallBoiling
{
velocityGroup gas;
}
);
}
}
blending
{
default
{
type none;
continuousPhase liquid;
}
}
surfaceTension
();
saturationModel
{
type function1;
function csvFile;
functionCoeffs
{
nHeaderLine 1;
refColumn 0;
componentColumns (1);
separator ",";
mergeSeparators no;
file "Tsat_water_1_2bar.csv";
outOfBounds clamp;
interpolationScheme linear;
};
};
aspectRatio
();
drag
(
(gas in liquid)
{
type SchillerNaumann;
residualRe 1e-3;
swarmCorrection
{
type none;
}
}
);
virtualMass
(
(gas in liquid)
{
type constantCoefficient;
Cvm 0.5;
}
);
heatTransfer.gas
(
(gas in liquid)
{
type spherical;
residualAlpha 1e-3;
}
);
heatTransfer.liquid
(
(gas in liquid)
{
type RanzMarshall;
residualAlpha 1e-3;
}
);
massTransfer.gas
();
massTransfer.liquid
();
lift
();
wallLubrication
();
turbulentDispersion
(
(gas in liquid)
{
type Burns;
sigma 0.7;
Ctd 1.0;
residualAlpha 1e-3;
}
);
// Minimum allowable pressure
pMin 10000;
// ************************************************************************* //

View File

@ -9,43 +9,47 @@ FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
class dictionary;
location "constant";
object thermophysicalProperties.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 100000;
boundaryField
thermoType
{
inlet
{
type calculated;
value uniform 100000;
}
outlet
{
type calculated;
value uniform 100000;
}
wall1
{
type calculated;
value uniform 100000;
}
wall2
{
type calculated;
value uniform 100000;
}
defaultFaces
{
type empty;
}
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hRefConst;
equationOfState perfectGas;
specie specie;
energy sensibleEnthalpy;
}
dpdt no;
mixture
{
specie
{
molWeight 18.0153;
}
equationOfState
{
rho 1;
}
thermodynamics
{
Hf 0;
Cp 12078.4;
Tref 373.55;
Href 2675500;
}
transport
{
mu 1.2256e-5;
Pr 2.289;
}
}
// ************************************************************************* //

View File

@ -9,46 +9,51 @@ FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.gas;
class dictionary;
location "constant";
object thermophysicalProperties.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hRefConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
internalField uniform (0 1 0);
dpdt no;
boundaryField
mixture
{
inlet
specie
{
type mapped;
field U.gas;
setAverage 1;
average (0 1 0);
interpolationScheme cell;
value uniform (0 1 0);
molWeight 18.0153;
}
outlet
equationOfState
{
type pressureInletOutletVelocity;
phi phi.gas;
value uniform (0 1 0);
R 3000;
rho0 959;
rho 959;
}
wall1
thermodynamics
{
type slip;
Hf 0;
Cp 4195;
Tref 373.55;
Href 417500;
}
wall2
transport
{
type slip;
}
defaultFaces
{
type empty;
mu 2.8291e-4;
Pr 2.289;
}
}
// ************************************************************************* //

View File

@ -9,41 +9,20 @@ FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5";
object p_rgh;
class dictionary;
location "constant";
object turbulenceProperties.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
simulationType laminar;//RAS;
internalField uniform 100000;
RAS
{
RASModel continuousGasKEpsilon;
boundaryField
{
inlet
{
type fixedFluxPressure;
turbulence on;
printCoeffs on;
}
outlet
{
type prghPressure;
p uniform 100000;
value uniform 100000;
}
wall1
{
type fixedFluxPressure;
}
wall2
{
type fixedFluxPressure;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -9,41 +9,20 @@ FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5";
object p_rgh;
class dictionary;
location "constant";
object turbulenceProperties.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
simulationType RAS;
internalField uniform 100000;
RAS
{
RASModel kEpsilon;
boundaryField
{
inlet
{
type fixedFluxPressure;
turbulence on;
printCoeffs on;
}
outlet
{
type prghPressure;
p uniform 100000;
value uniform 100000;
}
wall1
{
type fixedFluxPressure;
}
wall2
{
type fixedFluxPressure;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -9,47 +9,72 @@ FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5";
object T.gas;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
convertToMeters 1;
internalField uniform 368;
vertices
(
(0 0 0)
(0.05 0 0)
(0.05 2 0)
(0 2 0)
(0 0 0.1)
(0.05 0 0.1)
(0.05 2 0.1)
(0 2 0.1)
);
boundaryField
{
blocks
(
hex (0 1 2 3 4 5 6 7) (25 75 1) simpleGrading (1 1 1)
);
boundary
(
inlet
{
type fixedValue;
value uniform 368;
type mappedPatch;
offset (0 0.1 0);
sampleRegion region0;
sampleMode nearestCell;
samplePatch none;
faces
(
(1 5 4 0)
);
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 368;
value uniform 368;
type patch;
faces
(
(3 7 6 2)
);
}
wall1
{
type copiedFixedValue;
sourceFieldName T.liquid;
value uniform 368;
type wall;
faces
(
(0 4 7 3)
);
}
wall2
{
type copiedFixedValue;
sourceFieldName T.liquid;
value uniform 368;
type wall;
faces
(
(2 6 5 1)
);
}
defaultFaces
{
type empty;
}
}
);
// ************************************************************************* //

View File

@ -9,43 +9,46 @@ FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.liquid;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
application reactingTwoPhaseEulerFoam;
internalField uniform 1;
startFrom startTime;
boundaryField
{
inlet
{
type calculated;
value uniform 1;
}
outlet
{
type calculated;
value uniform 1;
}
wall1
{
type calculated;
value uniform 1;
}
wall2
{
type calculated;
value uniform 1;
}
defaultFaces
{
type empty;
}
}
startTime 0;
stopAt endTime;
endTime 2;
deltaT 1e-4;
writeControl adjustableRunTime;
writeInterval 0.5;
purgeWrite 0;
writeFormat ascii;
writePrecision 9;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.05;
maxDeltaT 0.001;
// ************************************************************************* //

View File

@ -9,43 +9,46 @@ FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.gas;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
application reactingTwoPhaseEulerFoam;
internalField uniform 0;
startFrom startTime;
boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 0;
value uniform 0;
}
wall1
{
type zeroGradient;
}
wall2
{
type zeroGradient;
}
defaultFaces
{
type empty;
}
}
startTime 0;
stopAt endTime;
endTime 2;
deltaT 1e-4;
writeControl adjustableRunTime;
writeInterval 0.5;
purgeWrite 0;
writeFormat ascii;
writePrecision 9;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.05;
maxDeltaT 0.001;
// ************************************************************************* //

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
"div\(phi,alpha.*\)" Gauss vanLeer;
"div\(phir,alpha.*\)" Gauss vanLeer;
"div\(alphaRhoPhi.*,U.*\)" Gauss limitedLinearV 1;
"div\(phi.*,U.*\)" Gauss limitedLinearV 1;
"div\(alphaRhoPhi.*,Yi\)" Gauss limitedLinear 1;
"div\(alphaRhoPhi.*,(h|e|f).*\)" Gauss limitedLinear 1;
"div\(alphaRhoPhi.*,K.*\)" Gauss limitedLinear 1;
"div\(alphaPhi.*,p\)" Gauss limitedLinear 1;
"div\(alphaRhoPhi.*,(k|epsilon).*\)" Gauss upwind;
"div\(phim,(k|epsilon)m\)" Gauss upwind;
"div\(\(\(\(alpha.*\*thermo:rho.*\)\*nuEff.*\)\*dev2\(T\(grad\(U.*\)\)\)\)\)" Gauss linear;
}
laplacianSchemes
{
default Gauss linear uncorrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default uncorrected;
}
fluxRequired
{
default no;
}
wallDist
{
method meshWave;
nRequired yes;
}
// ************************************************************************* //

View File

@ -0,0 +1,122 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"alpha.*"
{
nAlphaCorr 1;
nAlphaSubCycles 3;
}
bubbles
{
nCorr 1;
tolerance 1e-4;
renormalizeOnRestart true;
renormalize false;
solveOnFinalIterOnly true;
}
p_rgh
{
solver GAMG;
smoother DIC;
tolerance 1e-8;
relTol 0.01;
maxIter 100;
minIter 1;
}
p_rghFinal
{
$p_rgh;
relTol 0;
}
"U.*"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0;
minIter 1;
}
"(e|h).*"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-12;
relTol 0.001;
minIter 1;
maxIter 20;
}
"(k|epsilon|Theta).*"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-8;
relTol 0;
minIter 1;
}
Yi
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0;
minIter 1;
residualAlpha 1e-8;
}
"f.*"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-6;
relTol 0;
}
}
PIMPLE
{
nOuterCorrectors 6;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
nEnergyCorrectors 2;
faceMomentum yes;
}
relaxationFactors
{
fields
{
iDmdt 0.1;
}
equations
{
".*" 1;
"h.*" 0.3;
}
}
// ************************************************************************* //