populationBalance: Standardise default field handling

Population balance size-group fraction 'f<index>.<phase>' fields are now
read from an 'fDefault.<phase>' field if they are not provided
explicitly. This is the same process as is applied to species fractions
or fvDOM rays. The sum-of-fs field 'f.<phase>' is no longer required.

The value of a fraction field and its boundary conditions must now be
specified in the corresponding field file. Value entries are no longer
given in the size group dictionaries in the constant/phaseProperties
file, and an error message will be generated if a value entry is found.

The fraction fields are now numbered programatically, rather than being
named. So, the size-group dictionaries do not require a name any more.

All of the above is also true for any 'kappa<index>.<phase>' fields that
are constructed and solved for as part of a fractal shape model.

The following is an example of a specification of a population balance
with two phases in it:

    populationBalances (bubbles);

    air1
    {
        type            pureIsothermalPhaseModel;
        diameterModel   velocityGroup;
        velocityGroupCoeffs
        {
            populationBalance bubbles;
            shapeModel      spherical;
            sizeGroups
            (
                { dSph 1e-3; } // Size-group #0: Fraction field f0.air1
                { dSph 2e-3; } // ...
                { dSph 3e-3; }
                { dSph 4e-3; }
                { dSph 5e-3; }
            );
        }
        residualAlpha   1e-6;
    }

    air2
    {
        type            pureIsothermalPhaseModel;
        diameterModel   velocityGroup;
        velocityGroupCoeffs
        {
            populationBalance bubbles;
            shapeModel      spherical;
            sizeGroups
            (
                { dSph 6e-3; } // Size-group #5: Fraction field f5.air2
                { dSph 7e-3; } // ...
                { dSph 8e-3; }
                { dSph 9e-3; }
                { dSph 10e-3; }
                { dSph 11e-3; }
                { dSph 12e-3; }
            );
        }
        residualAlpha   1e-6;
    }

Previously a fraction field was constructed automatically using the
boundary condition types from the sum-of-fs field, and the value of both
the internal and boundary field was then overridden by the value setting
provided for the size-group. This procedure doesn't generalise to
boundary conditions other than basic types that store no additional
data, like zeroGradient and fixedValue. More complex boundary conditions
such as inletOutlet and uniformFixedValue are incompatible with this
approach.

This is arguably less convenient than the previous specification, where
the sizes and fractions appeared together in a table-like list in the
sizeGroups entry. In the event that a substantial proportion of the
size-groups have a non-zero initial fraction, writing out all the field
files manually is extremely tedious. To mitigate this somewhat, a
packaged function has been added to initialise the fields given a file
containing a size distribution (see the pipeBend tutorial for an example
of its usage). This function has the same limitations as the previous
code in that it requires all boundary conditions to be default
constructable.

Ultimately, the "correct" fix for the issue of how to set the boundary
conditions conveniently is to create customised inlet-outlet boundary
conditions that determine their field's position within the population
balance and evaluate a distribution to determine the appropriate inlet
value. This work is pending funding.
This commit is contained in:
Will Bainbridge
2023-08-29 18:57:58 +01:00
parent a0c391b8bd
commit a05df4abe0
112 changed files with 2496 additions and 1147 deletions

View File

@ -53,7 +53,7 @@ inline void Foam::phaseSurfaceArrheniusReactionRate::preEvaluate() const
const phaseModel& phase = const phaseModel& phase =
ob_.lookupObject<phaseModel>(IOobject::groupName("alpha", phaseName_)); ob_.lookupObject<phaseModel>(IOobject::groupName("alpha", phaseName_));
tAv_ = phase.dPtr()->Av(); tAv_ = phase.diameter().Av();
} }

View File

@ -345,7 +345,7 @@ Foam::heatTransferModels::wallBoilingHeatTransfer::K
min(pi*sqr(dDep_)*nucleationSiteDensity_*Al/4, scalar(5)) min(pi*sqr(dDep_)*nucleationSiteDensity_*Al/4, scalar(5))
); );
const volScalarField Av(solid.dPtr()->Av()); const volScalarField Av(solid.diameter().Av());
// Volumetric mass source in due to the wall boiling and bulk nucleation // Volumetric mass source in due to the wall boiling and bulk nucleation
dmdtf_ = dmdtf_ =

View File

@ -31,11 +31,10 @@ License
template<class ModelType> template<class ModelType>
Foam::diameterModels::SecondaryPropertyModel<ModelType>::SecondaryPropertyModel Foam::diameterModels::SecondaryPropertyModel<ModelType>::SecondaryPropertyModel
( (
const dictionary& dict,
const sizeGroup& group const sizeGroup& group
) )
: :
ModelType(dict, group), ModelType(group),
regIOobject regIOobject
( (
IOobject IOobject
@ -45,7 +44,7 @@ Foam::diameterModels::SecondaryPropertyModel<ModelType>::SecondaryPropertyModel
group.mesh() group.mesh()
) )
), ),
sizeGroup_(group), group_(group),
SecondaryPropertyModelTable_() SecondaryPropertyModelTable_()
{} {}
@ -60,6 +59,14 @@ Foam::diameterModels::SecondaryPropertyModel<ModelType>::
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template<class ModelType>
const Foam::diameterModels::sizeGroup&
Foam::diameterModels::SecondaryPropertyModel<ModelType>::group() const
{
return group_;
}
template<class ModelType> template<class ModelType>
const typename Foam::diameterModels::SecondaryPropertyModel<ModelType>::SpTable& const typename Foam::diameterModels::SecondaryPropertyModel<ModelType>::SpTable&
Foam::diameterModels::SecondaryPropertyModel<ModelType>:: Foam::diameterModels::SecondaryPropertyModel<ModelType>::
@ -68,7 +75,7 @@ SecondaryPropertyModelTable()
if (SecondaryPropertyModelTable_.empty()) if (SecondaryPropertyModelTable_.empty())
{ {
SecondaryPropertyModelTable_ = SecondaryPropertyModelTable_ =
sizeGroup_.mesh().template lookupClass group_.mesh().template lookupClass
< <
SecondaryPropertyModel<ModelType> SecondaryPropertyModel<ModelType>
>(); >();

View File

@ -70,10 +70,11 @@ protected:
using SpTable = HashTable<const SecondaryPropertyModel<ModelType>*>; using SpTable = HashTable<const SecondaryPropertyModel<ModelType>*>;
// Protected Data // Protected Data
//- Reference to sizeGroup //- Reference to sizeGroup
const sizeGroup& sizeGroup_; const sizeGroup& group_;
//- Table with pointers to all secondary properties of ModelType //- Table with pointers to all secondary properties of ModelType
// available in the registry // available in the registry
@ -84,12 +85,8 @@ public:
// Constructors // Constructors
//- Construct from dictionary and sizeGroup //- Construct from sizeGroup
SecondaryPropertyModel SecondaryPropertyModel(const sizeGroup& group);
(
const dictionary& dict,
const sizeGroup& group
);
//- Disallow default bitwise copy construction //- Disallow default bitwise copy construction
SecondaryPropertyModel SecondaryPropertyModel
@ -106,6 +103,9 @@ public:
// Access // Access
//- Access the sizeGroup
const sizeGroup& group() const;
//- Return table with pointers to all secondary properties of //- Return table with pointers to all secondary properties of
// ModelType available in the registry // ModelType available in the registry
const SpTable& SecondaryPropertyModelTable(); const SpTable& SecondaryPropertyModelTable();
@ -120,6 +120,7 @@ public:
//- Access to secondary property source //- Access to secondary property source
virtual volScalarField& src() = 0; virtual volScalarField& src() = 0;
// Edit // Edit
//- Add coalescence contribution to secondary property source //- Add coalescence contribution to secondary property source
@ -156,6 +157,7 @@ public:
//- Reset secondary property source //- Reset secondary property source
virtual void reset(); virtual void reset();
// Write // Write
//- Dummy write for regIOobject //- Dummy write for regIOobject

View File

@ -31,6 +31,8 @@ License
#include "fvmSup.H" #include "fvmSup.H"
#include "mixedFvPatchField.H" #include "mixedFvPatchField.H"
using Foam::constant::mathematical::pi;
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -60,7 +62,84 @@ const Foam::NamedEnum
> Foam::diameterModels::shapeModels::fractal::sgTypeNames_; > Foam::diameterModels::shapeModels::fractal::sgTypeNames_;
using Foam::constant::mathematical::pi; // * * * * * * * * * * * Private Static Member Functions * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::diameterModels::shapeModels::fractal::readKappa(const sizeGroup& group)
{
auto io = [&](const word& name, const IOobject::readOption r)
{
return
IOobject
(
IOobject::groupName
(
"kappa" + name,
group.phase().name()
),
group.mesh().time().name(),
group.mesh(),
r,
IOobject::AUTO_WRITE
);
};
const word name(Foam::name(group.i()));
typeIOobject<volScalarField> fio(io(name, IOobject::MUST_READ));
// Read the field, if it is available
if (fio.headerOk())
{
return tmp<volScalarField>(new volScalarField(fio, group.mesh()));
}
// Read the default field
tmp<volScalarField> tfDefault
(
new volScalarField
(
io("Default", IOobject::MUST_READ),
group.mesh()
)
);
// Transfer it into a result field with the correct name
return
tmp<volScalarField>
(
new volScalarField
(
io(name, IOobject::NO_READ),
tfDefault
)
);
}
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::diameterModels::shapeModels::fractal::dColl() const
{
tmp<volScalarField> tDColl
(
volScalarField::New
(
"dColl",
group().mesh(),
dimensionedScalar(dimLength, Zero)
)
);
volScalarField& dColl = tDColl.ref();
dColl =
6/kappa_
*pow(group().x()*pow3(kappa_)/(36*pi*alphaC_), 1/Df_);
return tDColl;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -68,31 +147,14 @@ using Foam::constant::mathematical::pi;
Foam::diameterModels::shapeModels::fractal::fractal Foam::diameterModels::shapeModels::fractal::fractal
( (
const dictionary& dict, const dictionary& dict,
const sizeGroup& group const sizeGroup& group,
const dictionary& groupDict
) )
: :
SecondaryPropertyModel<shapeModel>(dict, group), SecondaryPropertyModel<shapeModel>(group),
kappa_ kappa_(readKappa(group)),
( Df_("Df", dimless, groupDict),
IOobject alphaC_("alphaC", dimless, groupDict),
(
"kappa" + group.name().substr(1),
group.mesh().time().name(),
group.mesh(),
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
group.mesh(),
dimensionedScalar
(
"kappa",
inv(dimLength),
group.dict()
),
group.VelocityGroup().f().boundaryField().types()
),
Df_("Df", dimless, group.dict()),
alphaC_("alphaC", dimless, group.dict()),
dColl_ dColl_
( (
IOobject IOobject
@ -113,30 +175,22 @@ Foam::diameterModels::shapeModels::fractal::fractal
), ),
group.mesh(), group.mesh(),
dimensionedScalar(kappa_.dimensions()/dimTime, Zero) dimensionedScalar(kappa_.dimensions()/dimTime, Zero)
) ),
sinteringModel_(sinteringModel::New(dict.subDict(type() + "Coeffs"), *this))
{ {
// Adjust refValue at mixedFvPatchField boundaries // Check and filter for old syntax (remove in due course)
forAll(kappa_.boundaryField(), patchi) if (groupDict.found("kappa"))
{ {
typedef mixedFvPatchField<scalar> mixedFvPatchScalarField; FatalErrorInFunction
<< "A 'kappa' entry should not be specified for size-group #"
if << group.i() << " of population balance "
( << group.group().popBalName()
isA<const mixedFvPatchScalarField>(kappa_.boundaryField()[patchi]) << ". Instead, the value should be initialised within the field, "
) << this->name() << " (or the default field, "
{ << IOobject::groupName("kappaDefault", group.phase().name())
mixedFvPatchScalarField& kappa = << ", as appropriate)."
refCast<mixedFvPatchScalarField> << exit(FatalError);
(
kappa_.boundaryFieldRef()[patchi]
);
kappa.refValue() = sizeGroup_.dict().lookup<scalar>("kappa");
}
} }
sinteringModel_ =
sinteringModel::New(dict.subDict(type() + "Coeffs"), *this);
} }
@ -162,39 +216,16 @@ Foam::diameterModels::shapeModels::fractal::src()
} }
Foam::tmp<Foam::volScalarField>
Foam::diameterModels::shapeModels::fractal::dColl() const
{
tmp<volScalarField> tDColl
(
volScalarField::New
(
"dColl",
sizeGroup_.mesh(),
dimensionedScalar(dimLength, Zero)
)
);
volScalarField& dColl = tDColl.ref();
dColl =
6/kappa_
*pow(sizeGroup_.x()*pow3(kappa_)/(36*pi*alphaC_), 1/Df_);
return tDColl;
}
void Foam::diameterModels::shapeModels::fractal::correct() void Foam::diameterModels::shapeModels::fractal::correct()
{ {
const sizeGroup& fi = sizeGroup_; const sizeGroup& fi = group();
const phaseModel& phase = fi.phase(); const phaseModel& phase = fi.phase();
const volScalarField& alpha = phase; const volScalarField& alpha = phase;
const populationBalanceModel& popBal = const populationBalanceModel& popBal =
sizeGroup_.mesh().lookupObject<populationBalanceModel> group().mesh().lookupObject<populationBalanceModel>
( (
sizeGroup_.VelocityGroup().popBalName() group().group().popBalName()
); );
surfaceScalarField fAlphaPhi surfaceScalarField fAlphaPhi
@ -216,7 +247,7 @@ void Foam::diameterModels::shapeModels::fractal::correct()
fvm::Sp fvm::Sp
( (
max(phase.residualAlpha() - alpha*fi, scalar(0)) max(phase.residualAlpha() - alpha*fi, scalar(0))
/sizeGroup_.mesh().time().deltaT(), /group().mesh().time().deltaT(),
kappa_ kappa_
) )
) )
@ -231,7 +262,7 @@ void Foam::diameterModels::shapeModels::fractal::correct()
kappa_ = kappa_ =
min min
( (
max(kappa_, 6/sizeGroup_.dSph()), max(kappa_, 6/group().dSph()),
6/popBal.sizeGroups().first().dSph() 6/popBal.sizeGroups().first().dSph()
); );
@ -245,7 +276,7 @@ void Foam::diameterModels::shapeModels::fractal::correct()
const Foam::tmp<Foam::volScalarField> const Foam::tmp<Foam::volScalarField>
Foam::diameterModels::shapeModels::fractal::a() const Foam::diameterModels::shapeModels::fractal::a() const
{ {
return kappa_*sizeGroup_.x(); return kappa_*group().x();
} }
@ -271,7 +302,7 @@ void Foam::diameterModels::shapeModels::fractal::addDrift
{ {
case sgHardSphere: case sgHardSphere:
{ {
Su_ += sourceKappa*fu.dSph()/sizeGroup_.dSph()*Su; Su_ += sourceKappa*fu.dSph()/group().dSph()*Su;
break; break;
} }
@ -286,7 +317,7 @@ void Foam::diameterModels::shapeModels::fractal::addDrift
volScalarField dp(6/sourceKappa); volScalarField dp(6/sourceKappa);
const volScalarField a(sourceKappa*fu.x()); const volScalarField a(sourceKappa*fu.x());
const dimensionedScalar dv(sizeGroup_.x() - fu.x()); const dimensionedScalar dv(group().x() - fu.x());
const volScalarField da1 const volScalarField da1
( (
@ -299,7 +330,7 @@ void Foam::diameterModels::shapeModels::fractal::addDrift
dp += 6*(dv*a - fu.x()*da1)/sqr(a); dp += 6*(dv*a - fu.x()*da1)/sqr(a);
const volScalarField np(6*sizeGroup_.x()/pi/pow3(dp)); const volScalarField np(6*group().x()/pi/pow3(dp));
const volScalarField dc(dp*pow(np/alphaC_, 1/Df_)); const volScalarField dc(dp*pow(np/alphaC_, 1/Df_));
const volScalarField da2 const volScalarField da2
@ -307,7 +338,7 @@ void Foam::diameterModels::shapeModels::fractal::addDrift
dv*(4/dp + 2*Df_/3*(1/dc - 1/dp)) dv*(4/dp + 2*Df_/3*(1/dc - 1/dp))
); );
Su_ += (a + 0.5*da1 + 0.5*da2)/sizeGroup_.x()*Su; Su_ += (a + 0.5*da1 + 0.5*da2)/group().x()*Su;
break; break;
} }

View File

@ -125,8 +125,15 @@ private:
autoPtr<sinteringModel> sinteringModel_; autoPtr<sinteringModel> sinteringModel_;
// Private Static Member Functions
//- Read and return the kappa field. Construction helper.
static tmp<volScalarField> readKappa(const sizeGroup& group);
// Private Member Functions // Private Member Functions
//- Compute and return the collisional diameter
tmp<volScalarField> dColl() const; tmp<volScalarField> dColl() const;
@ -138,11 +145,12 @@ public:
// Constructors // Constructors
//- Construct from dictionary and sizeGroup //- Construct from dictionaries and sizeGroup
fractal fractal
( (
const dictionary& dict, const dictionary& dict,
const sizeGroup& group const sizeGroup& group,
const dictionary& groupDict
); );
//- Disallow default bitwise copy construction //- Disallow default bitwise copy construction

View File

@ -81,16 +81,16 @@ Foam::diameterModels::shapeModels::sinteringModels::KochFriedlander::tau() const
volScalarField::Internal::New volScalarField::Internal::New
( (
"tau", "tau",
fractal_.SizeGroup().mesh(), fractal_.group().mesh(),
dimensionedScalar(dimTime, Zero) dimensionedScalar(dimTime, Zero)
) )
); );
volScalarField::Internal& tau = tTau.ref(); volScalarField::Internal& tau = tTau.ref();
const sizeGroup& fi = fractal_.SizeGroup(); const sizeGroup& fi = fractal_.group();
const volScalarField& kappai = fractal_.fld(); const volScalarField& kappai = fractal_.fld();
const volScalarField& T = fractal_.SizeGroup().phase().thermo().T(); const volScalarField& T = fractal_.group().phase().thermo().T();
forAll(tau, celli) forAll(tau, celli)
{ {
@ -107,7 +107,7 @@ Foam::diameterModels::shapeModels::sinteringModels::KochFriedlander::tau() const
Foam::tmp<Foam::fvScalarMatrix> Foam::tmp<Foam::fvScalarMatrix>
Foam::diameterModels::shapeModels::sinteringModels::KochFriedlander::R() const Foam::diameterModels::shapeModels::sinteringModels::KochFriedlander::R() const
{ {
const sizeGroup& fi = fractal_.SizeGroup(); const sizeGroup& fi = fractal_.group();
const volScalarField& kappai = fractal_.fld(); const volScalarField& kappai = fractal_.fld();
const volScalarField& alpha = fi.phase(); const volScalarField& alpha = fi.phase();

View File

@ -68,7 +68,7 @@ Foam::diameterModels::shapeModels::sinteringModels::noSintering::~noSintering()
Foam::tmp<Foam::fvScalarMatrix> Foam::tmp<Foam::fvScalarMatrix>
Foam::diameterModels::shapeModels::sinteringModels::noSintering::R() const Foam::diameterModels::shapeModels::sinteringModels::noSintering::R() const
{ {
const sizeGroup& fi = fractal_.SizeGroup(); const sizeGroup& fi = fractal_.group();
volScalarField::Internal R volScalarField::Internal R
( (

View File

@ -39,13 +39,9 @@ namespace diameterModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::diameterModels::shapeModel::shapeModel Foam::diameterModels::shapeModel::shapeModel(const sizeGroup& group)
(
const dictionary& dict,
const sizeGroup& group
)
: :
sizeGroup_(group) group_(group)
{} {}
@ -55,7 +51,8 @@ Foam::autoPtr<Foam::diameterModels::shapeModel>
Foam::diameterModels::shapeModel::New Foam::diameterModels::shapeModel::New
( (
const dictionary& dict, const dictionary& dict,
const sizeGroup& group const sizeGroup& group,
const dictionary& groupDict
) )
{ {
word shapeModelType(dict.lookup("shapeModel")); word shapeModelType(dict.lookup("shapeModel"));
@ -73,7 +70,7 @@ Foam::diameterModels::shapeModel::New
<< exit(FatalError); << exit(FatalError);
} }
return cstrIter()(dict, group); return cstrIter()(dict, group, groupDict);
} }
@ -85,10 +82,10 @@ Foam::diameterModels::shapeModel::~shapeModel()
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
const Foam::diameterModels::sizeGroup& Foam::diameterModels::shapeModel:: const Foam::diameterModels::sizeGroup&
SizeGroup() const Foam::diameterModels::shapeModel::group() const
{ {
return sizeGroup_; return group_;
} }

View File

@ -66,7 +66,7 @@ protected:
// Protected Data // Protected Data
//- Reference to sizeGroup //- Reference to sizeGroup
const sizeGroup& sizeGroup_; const sizeGroup& group_;
public: public:
@ -84,20 +84,17 @@ public:
dictionary, dictionary,
( (
const dictionary& dict, const dictionary& dict,
const sizeGroup& group const sizeGroup& group,
const dictionary& groupDict
), ),
(dict, group) (dict, group, groupDict)
); );
// Constructors // Constructors
//- Construct from dictionary and sizeGroup //- Construct from sizeGroup
shapeModel shapeModel(const sizeGroup& group);
(
const dictionary& dict,
const sizeGroup& group
);
//- Disallow default bitwise copy construction //- Disallow default bitwise copy construction
shapeModel(const shapeModel&) = delete; shapeModel(const shapeModel&) = delete;
@ -108,7 +105,8 @@ public:
static autoPtr<shapeModel> New static autoPtr<shapeModel> New
( (
const dictionary& dict, const dictionary& dict,
const sizeGroup& group const sizeGroup& group,
const dictionary& groupDict
); );
@ -121,7 +119,7 @@ public:
// Access // Access
//- Return reference to size group //- Return reference to size group
const sizeGroup& SizeGroup() const; const sizeGroup& group() const;
//- Return representative surface area of the sizeGroup //- Return representative surface area of the sizeGroup
virtual const tmp<volScalarField> a() const = 0; virtual const tmp<volScalarField> a() const = 0;

View File

@ -50,14 +50,14 @@ using Foam::constant::mathematical::pi;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::diameterModels::shapeModels::spherical:: Foam::diameterModels::shapeModels::spherical::spherical
spherical
( (
const dictionary& dict, const dictionary& dict,
const sizeGroup& group const sizeGroup& group,
const dictionary& groupDict
) )
: :
shapeModel(dict, group) shapeModel(group)
{} {}
@ -77,8 +77,8 @@ Foam::diameterModels::shapeModels::spherical::a() const
volScalarField::New volScalarField::New
( (
"a", "a",
sizeGroup_.mesh(), group().mesh(),
6/sizeGroup_.dSph()*sizeGroup_.x() 6/group().dSph()*group().x()
) )
); );
} }
@ -89,7 +89,7 @@ Foam::diameterModels::shapeModels::spherical::d() const
{ {
return tmp<volScalarField> return tmp<volScalarField>
( (
volScalarField::New("d", sizeGroup_.mesh(), sizeGroup_.dSph()) volScalarField::New("d", group().mesh(), group().dSph())
); );
} }

View File

@ -62,11 +62,12 @@ public:
// Constructors // Constructors
//- Construct from dictionary and sizeGroup //- Construct from dictionaries and sizeGroup
spherical spherical
( (
const dictionary& dict, const dictionary& dict,
const sizeGroup& group const sizeGroup& group,
const dictionary& groupDict
); );

View File

@ -27,68 +27,99 @@ License
#include "mixedFvPatchField.H" #include "mixedFvPatchField.H"
#include "shapeModel.H" #include "shapeModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
using Foam::constant::mathematical::pi; using Foam::constant::mathematical::pi;
// * * * * * * * * * * * Private Static Member Functions * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::diameterModels::sizeGroup::readF
(
const label i,
const velocityGroup& group
)
{
auto io = [&](const word& name, const IOobject::readOption r)
{
return
IOobject
(
IOobject::groupName
(
"f" + name,
group.phase().name()
),
group.phase().mesh().time().name(),
group.phase().mesh(),
r,
IOobject::AUTO_WRITE
);
};
const word name(Foam::name(i));
typeIOobject<volScalarField> fio(io(name, IOobject::MUST_READ));
// Read the field, if it is available
if (fio.headerOk())
{
return
tmp<volScalarField>
(
new volScalarField(fio, group.phase().mesh())
);
}
// Read the default field
tmp<volScalarField> tfDefault
(
new volScalarField
(
io("Default", IOobject::MUST_READ),
group.phase().mesh()
)
);
// Transfer it into a result field with the correct name
return
tmp<volScalarField>
(
new volScalarField
(
io(name, IOobject::NO_READ),
tfDefault
)
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::diameterModels::sizeGroup::sizeGroup Foam::diameterModels::sizeGroup::sizeGroup
( (
const word& name, const label i,
const dictionary& dict, const dictionary& dict,
const phaseModel& phase, const velocityGroup& group
const velocityGroup& velocityGroup,
const fvMesh& mesh
) )
: :
volScalarField volScalarField(readF(i, group)),
( i_(i),
IOobject group_(group),
(
IOobject::groupName
(
name,
velocityGroup.phase().name()
),
mesh.time().name(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(name, dimless, dict.lookup<scalar>("value")),
velocityGroup.f().boundaryField().types()
),
dict_(dict),
phase_(phase),
velocityGroup_(velocityGroup),
dSph_("dSph", dimLength, dict), dSph_("dSph", dimLength, dict),
x_("x", pi/6*pow3(dSph_)), x_("x", pi/6*pow3(dSph_)),
value_(dict.lookup<scalar>("value")) shapeModel_(shapeModel::New(group_.diameterProperties(), *this, dict))
{ {
// Adjust refValue at mixedFvPatchField boundaries // Check and filter for old syntax (remove in due course)
forAll(this->boundaryField(), patchi) if (dict.found("value"))
{ {
typedef mixedFvPatchField<scalar> mixedFvPatchScalarField; FatalErrorInFunction
<< "A 'value' entry should not be specified for size-group #"
if << i << " of population balance "
( << group.popBalName()
isA<const mixedFvPatchScalarField>(this->boundaryField()[patchi]) << ". Instead, the value should be initialised within the field, "
) << this->name() << " (or the default field, "
{ << IOobject::groupName("fDefault", group.phase().name())
mixedFvPatchScalarField& f = << ", as appropriate)."
refCast<mixedFvPatchScalarField> << exit(FatalError);
(
this->boundaryFieldRef()[patchi]
);
f.refValue() = value_;
}
} }
shapeModel_ = shapeModel::New(velocityGroup_.diameterProperties(), *this);
} }
@ -103,34 +134,11 @@ Foam::diameterModels::sizeGroup::~sizeGroup()
Foam::autoPtr<Foam::diameterModels::sizeGroup> Foam::autoPtr<Foam::diameterModels::sizeGroup>
Foam::diameterModels::sizeGroup::clone() const Foam::diameterModels::sizeGroup::clone() const
{ {
notImplemented("sizeGroup::clone() const"); NotImplemented;
return autoPtr<sizeGroup>(nullptr); return autoPtr<sizeGroup>(nullptr);
} }
const Foam::label& Foam::diameterModels::sizeGroup::i() const
{
if (!i_.valid())
{
const populationBalanceModel& popBal =
this->mesh().lookupObject<populationBalanceModel>
(
velocityGroup_.popBalName()
);
forAll(popBal.sizeGroups(), j)
{
if (&popBal.sizeGroups()[j] == &*this)
{
i_.set(new label(j));
}
}
}
return i_();
}
const Foam::tmp<Foam::volScalarField> const Foam::tmp<Foam::volScalarField>
Foam::diameterModels::sizeGroup::a() const Foam::diameterModels::sizeGroup::a() const
{ {

View File

@ -87,13 +87,11 @@ private:
// Private Data // Private Data
dictionary dict_; //- Label of this sizeGroup within the corresponding populationBalance
const label i_;
//- Phase this sizeGroup belongs to
const phaseModel& phase_;
//- VelocityGroup this sizeGroup belongs to //- VelocityGroup this sizeGroup belongs to
const velocityGroup& velocityGroup_; const velocityGroup& group_;
//- Sphere equivalent diameter of the sizeGroup //- Sphere equivalent diameter of the sizeGroup
const dimensionedScalar dSph_; const dimensionedScalar dSph_;
@ -101,66 +99,83 @@ private:
//- Representative volume of the sizeGroup //- Representative volume of the sizeGroup
const dimensionedScalar x_; const dimensionedScalar x_;
//- Initial value and value at boundaries
const scalar value_;
//- Label of this sizeGroup within the corresponding populationBalance
mutable autoPtr<label> i_;
//- Model for describing the representative shape of the elements in the //- Model for describing the representative shape of the elements in the
// sizeGroup // sizeGroup
autoPtr<shapeModel> shapeModel_; autoPtr<shapeModel> shapeModel_;
// Private Static Member Functions
//- Read and return the fraction field. Construction helper.
static tmp<volScalarField> readF
(
const label i,
const velocityGroup& group
);
public: public:
// Constructors // Constructors
//- Construct from index, dictionary and velocity group
sizeGroup sizeGroup
( (
const word& name, const label i,
const dictionary& dict, const dictionary& dict,
const phaseModel& phase, const velocityGroup& group
const velocityGroup& velocityGroup,
const fvMesh& mesh
); );
//- Return clone //- Return clone
autoPtr<sizeGroup> clone() const; autoPtr<sizeGroup> clone() const;
//- Return a pointer to a new sizeGroup created on freestore //- Return a pointer to a new sizeGroup created from Istream
// from Istream
class iNew class iNew
{ {
const phaseModel& phase_; const velocityGroup& group_;
const velocityGroup& velocityGroup_;
mutable label i_;
public: public:
iNew iNew(const velocityGroup& group, const label i0)
(
const phaseModel& phase,
const velocityGroup& velocityGroup
)
: :
phase_(phase), group_(group),
velocityGroup_(velocityGroup) i_(i0)
{} {}
autoPtr<sizeGroup> operator()(Istream& is) const autoPtr<sizeGroup> operator()(Istream& is) const
{ {
dictionaryEntry ent(dictionary::null, is); token t(is);
return autoPtr<sizeGroup>
( // Check and filter for old syntax (remove in due course)
new sizeGroup if (t.isWord())
( {
ent.keyword(), const word fName = "f" + Foam::name(i_);
ent,
phase_, if (t.wordToken() != fName)
velocityGroup_, {
phase_.mesh() FatalErrorInFunction
) << "The name '" << t.wordToken() << "' should not "
); << "have been provided for the fraction field "
<< IOobject::groupName(fName, group_.phase().name())
<< " of size-group #" << i_
<< " of population balance " << group_.popBalName()
<< ". Only the coefficients are required."
<< exit(FatalError);
}
}
else
{
is.putBack(t);
}
autoPtr<sizeGroup> result(new sizeGroup(i_, is, group_));
i_ ++;
return result;
} }
}; };
@ -171,14 +186,14 @@ public:
// Member Functions // Member Functions
//- Return const-reference to the dictionary //- Return index of the size group within the population balance
inline const dictionary& dict() const; label i() const;
//- Return const-reference to the phase //- Return const-reference to the phase
inline const phaseModel& phase() const; inline const phaseModel& phase() const;
//- Return const-reference to the velocityGroup //- Return const-reference to the velocityGroup
inline const velocityGroup& VelocityGroup() const; inline const velocityGroup& group() const;
//- Return representative spherical diameter of the sizeGroup //- Return representative spherical diameter of the sizeGroup
inline const dimensionedScalar& dSph() const; inline const dimensionedScalar& dSph() const;
@ -192,9 +207,6 @@ public:
//- Return const-reference to diameterModel of the phase //- Return const-reference to diameterModel of the phase
inline const autoPtr<shapeModel>& shapeModelPtr() const; inline const autoPtr<shapeModel>& shapeModelPtr() const;
//- Return index of the size group within the population balance
const label& i() const;
//- Return representative surface area of the sizeGroup //- Return representative surface area of the sizeGroup
const tmp<volScalarField> a() const; const tmp<volScalarField> a() const;

View File

@ -23,26 +23,27 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "sizeGroup.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline const Foam::dictionary& inline Foam::label Foam::diameterModels::sizeGroup::i() const
Foam::diameterModels::sizeGroup::dict() const
{ {
return dict_; return i_;
} }
inline const Foam::phaseModel& inline const Foam::phaseModel&
Foam::diameterModels::sizeGroup::phase() const Foam::diameterModels::sizeGroup::phase() const
{ {
return phase_; return group().phase();
} }
inline const Foam::diameterModels::velocityGroup& inline const Foam::diameterModels::velocityGroup&
Foam::diameterModels::sizeGroup::VelocityGroup() const Foam::diameterModels::sizeGroup::group() const
{ {
return velocityGroup_; return group_;
} }

View File

@ -122,11 +122,11 @@ void Foam::diameterModels::velocityGroup::scale()
sizeGroups_[i].max(0); sizeGroups_[i].max(0);
}; };
f_ = fSum(); const volScalarField fSum(this->fSum());
forAll(sizeGroups_, i) forAll(sizeGroups_, i)
{ {
sizeGroups_[i] /= f_; sizeGroups_[i] /= fSum;
sizeGroups_[i].correctBoundaryConditions(); sizeGroups_[i].correctBoundaryConditions();
}; };
@ -143,29 +143,27 @@ Foam::diameterModels::velocityGroup::velocityGroup
: :
diameterModel(diameterProperties, phase), diameterModel(diameterProperties, phase),
popBalName_(diameterProperties.lookup("populationBalance")), popBalName_(diameterProperties.lookup("populationBalance")),
f_
(
IOobject
(
IOobject::groupName
(
"f",
phase.name()
),
phase.time().name(),
phase.mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
phase.mesh()
),
sizeGroups_ sizeGroups_
( (
diameterProperties.lookup("sizeGroups"), diameterProperties.lookup("sizeGroups"),
sizeGroup::iNew(phase, *this) sizeGroup::iNew
(
*this,
populationBalanceModel::groups::New
(
popBalName_,
phase.mesh()
).nSizeGroups()
)
), ),
d_(IOobject::groupName("d", phase.name()), dsm()) d_(IOobject::groupName("d", phase.name()), dsm())
{} {
populationBalanceModel::groups::New
(
popBalName_,
phase.mesh()
).insert(*this);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
@ -232,14 +230,12 @@ void Foam::diameterModels::velocityGroup::correct()
scale(); scale();
} }
f_ = fSum(); volScalarField::Internal fSum(this->fSum());
f_.correctBoundaryConditions();
Info<< phase().name() << " sizeGroups-sum volume fraction, min, max = " Info<< phase().name() << " sizeGroups-sum volume fraction, min, max = "
<< f_.weightedAverage(phase().mesh().V()).value() << fSum.weightedAverage(phase().mesh().V()).value()
<< ' ' << min(f_).value() << ' ' << min(fSum).value()
<< ' ' << max(f_).value() << ' ' << max(fSum).value()
<< endl; << endl;
d_ = dsm(); d_ = dsm();

View File

@ -90,10 +90,6 @@ class velocityGroup
//- Name of the populationBalance this velocityGroup belongs to //- Name of the populationBalance this velocityGroup belongs to
word popBalName_; word popBalName_;
//- Sum of the sizeGroup volume fractions and reference field from which
// the sizeGroup fields are derived
volScalarField f_;
//- sizeGroups belonging to this velocityGroup //- sizeGroups belonging to this velocityGroup
PtrList<sizeGroup> sizeGroups_; PtrList<sizeGroup> sizeGroups_;
@ -137,12 +133,12 @@ public:
//- Return name of populationBalance this velocityGroup belongs to //- Return name of populationBalance this velocityGroup belongs to
inline const word& popBalName() const; inline const word& popBalName() const;
//- Return reference field for sizeGroup's
inline const volScalarField& f() const;
//- Return sizeGroups belonging to this velocityGroup //- Return sizeGroups belonging to this velocityGroup
inline const PtrList<sizeGroup>& sizeGroups() const; inline const PtrList<sizeGroup>& sizeGroups() const;
//- Return sizeGroups belonging to this velocityGroup
inline PtrList<sizeGroup>& sizeGroups();
//- Get the diameter field //- Get the diameter field
virtual tmp<volScalarField> d() const; virtual tmp<volScalarField> d() const;

View File

@ -23,6 +23,8 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "velocityGroup.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline const Foam::word& inline const Foam::word&
@ -32,13 +34,6 @@ Foam::diameterModels::velocityGroup::popBalName() const
} }
inline const Foam::volScalarField&
Foam::diameterModels::velocityGroup::f() const
{
return f_;
}
inline const Foam::PtrList<Foam::diameterModels::sizeGroup>& inline const Foam::PtrList<Foam::diameterModels::sizeGroup>&
Foam::diameterModels::velocityGroup::sizeGroups() const Foam::diameterModels::velocityGroup::sizeGroups() const
{ {
@ -46,4 +41,11 @@ Foam::diameterModels::velocityGroup::sizeGroups() const
} }
inline Foam::PtrList<Foam::diameterModels::sizeGroup>&
Foam::diameterModels::velocityGroup::sizeGroups()
{
return sizeGroups_;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -148,9 +148,9 @@ Foam::tmp<Foam::volScalarField> Foam::phaseModel::d() const
} }
const Foam::autoPtr<Foam::diameterModel>& Foam::phaseModel::dPtr() const const Foam::diameterModel& Foam::phaseModel::diameter() const
{ {
return diameterModel_; return diameterModel_();
} }

View File

@ -194,8 +194,8 @@ public:
//- Return the Sauter-mean diameter //- Return the Sauter-mean diameter
tmp<volScalarField> d() const; tmp<volScalarField> d() const;
//- Return const-reference to diameterModel of the phase //- Return a reference to the diameterModel of the phase
const autoPtr<diameterModel>& dPtr() const; const diameterModel& diameter() const;
//- Correct the phase properties //- Correct the phase properties
virtual void correct(); virtual void correct();

View File

@ -97,29 +97,26 @@ void Foam::diameterModels::driftModels::phaseChange::precompute()
forAll(interfaces_, k) forAll(interfaces_, k)
{ {
forAllConstIter forAllConstIter(phaseInterface, interfaces_[k], iter)
(
HashTable<const velocityGroup*>,
popBal_.velocityGroupPtrs(),
iter
)
{ {
const velocityGroup& velGrp = *iter(); const phaseModel& phase = iter();
if (interfaces_[k].contains(velGrp.phase())) if (!isA<velocityGroup>(phase.diameter())) continue;
const velocityGroup& velGroup =
refCast<const velocityGroup>(phase.diameter());
forAll(velGroup.sizeGroups(), i)
{ {
forAll(velGrp.sizeGroups(), i) const sizeGroup& fi = velGroup.sizeGroups()[i];
{
const sizeGroup& fi = velGrp.sizeGroups()[i];
if (numberWeighted_) if (numberWeighted_)
{ {
W_[k] += fi*max(fi.phase(), small)/fi.x(); W_[k] += fi*max(fi.phase(), small)/fi.x();
} }
else else
{ {
W_[k] += fi*max(fi.phase(), small)/fi.x()*fi.a(); W_[k] += fi*max(fi.phase(), small)/fi.x()*fi.a();
}
} }
} }
} }
@ -133,7 +130,7 @@ void Foam::diameterModels::driftModels::phaseChange::addToDriftRate
const label i const label i
) )
{ {
const velocityGroup& velGrp = popBal_.sizeGroups()[i].VelocityGroup(); const velocityGroup& velGrp = popBal_.sizeGroups()[i].group();
forAll(interfaces_, k) forAll(interfaces_, k)
{ {

View File

@ -81,14 +81,7 @@ Foam::diameterModels::nucleationModel::nucleationModel
( (
refCast<const velocityGroup> refCast<const velocityGroup>
( (
popBal.mesh().lookupObject<phaseModel> popBal.fluid().phases()[dict.lookup("velocityGroup")].diameter()
(
IOobject::groupName
(
"alpha",
dict.lookup("velocityGroup")
)
).dPtr()()
) )
) )
{} {}

View File

@ -52,152 +52,12 @@ namespace diameterModels
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
void Foam::diameterModels::populationBalanceModel::registerVelocityGroups()
{
forAll(fluid_.phases(), phasei)
{
if (isA<velocityGroup>(fluid_.phases()[phasei].dPtr()()))
{
const velocityGroup& velGroup =
refCast<const velocityGroup>(fluid_.phases()[phasei].dPtr()());
if (velGroup.popBalName() == this->name())
{
velocityGroupPtrs_.insert(velGroup.phase().name(), &velGroup);
dilatationErrors_.insert
(
velGroup.phase().name(),
volScalarField
(
IOobject
(
IOobject::groupName
(
"dilatationError",
velGroup.phase().name()
),
fluid_.time().name(),
mesh_
),
mesh_,
dimensionedScalar(inv(dimTime), 0)
)
);
forAll(velGroup.sizeGroups(), i)
{
this->registerSizeGroups
(
const_cast<sizeGroup&>(velGroup.sizeGroups()[i])
);
}
}
}
}
}
void Foam::diameterModels::populationBalanceModel::registerSizeGroups
(
sizeGroup& group
)
{
if
(
sizeGroups().size() != 0
&&
group.x().value() <= sizeGroups().last().x().value()
)
{
FatalErrorInFunction
<< "Size groups must be entered according to their representative"
<< " size"
<< exit(FatalError);
}
sizeGroups_.resize(sizeGroups().size() + 1);
sizeGroups_.set(sizeGroups().size() - 1, &group);
if (sizeGroups().size() == 1)
{
v_.append
(
new dimensionedScalar
(
"v",
sizeGroups().last().x()
)
);
v_.append
(
new dimensionedScalar
(
"v",
sizeGroups().last().x()
)
);
}
else
{
v_.last() =
0.5
*(
sizeGroups()[sizeGroups().size()-2].x()
+ sizeGroups().last().x()
);
v_.append
(
new dimensionedScalar
(
"v",
sizeGroups().last().x()
)
);
}
delta_.append(new PtrList<dimensionedScalar>());
Su_.append
(
new volScalarField
(
IOobject
(
"Su",
fluid_.time().name(),
mesh_
),
mesh_,
dimensionedScalar(inv(dimTime), 0)
)
);
Sp_.append
(
new volScalarField
(
IOobject
(
"Sp",
fluid_.time().name(),
mesh_
),
mesh_,
dimensionedScalar(inv(dimTime), 0)
)
);
}
void Foam::diameterModels::populationBalanceModel::initialiseDmdtfs() void Foam::diameterModels::populationBalanceModel::initialiseDmdtfs()
{ {
forAllConstIter forAllConstIter
( (
HashTable<const diameterModels::velocityGroup*>, HashTable<const diameterModels::velocityGroup*>,
velocityGroupPtrs(), velocityGroupPtrs_,
iter1 iter1
) )
{ {
@ -206,7 +66,7 @@ void Foam::diameterModels::populationBalanceModel::initialiseDmdtfs()
forAllConstIter forAllConstIter
( (
HashTable<const diameterModels::velocityGroup*>, HashTable<const diameterModels::velocityGroup*>,
velocityGroupPtrs(), velocityGroupPtrs_,
iter2 iter2
) )
{ {
@ -857,7 +717,7 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel
U_(), U_(),
sourceUpdateCounter_(0) sourceUpdateCounter_(0)
{ {
this->registerVelocityGroups(); groups::retrieve(*this, velocityGroupPtrs_, sizeGroups_);
if (sizeGroups().size() < 3) if (sizeGroups().size() < 3)
{ {
@ -867,6 +727,89 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel
<< exit(FatalError); << exit(FatalError);
} }
// Create velocity-group dilatation errors
forAllConstIter
(
HashTable<const diameterModels::velocityGroup*>,
velocityGroupPtrs_,
iter
)
{
const velocityGroup& velGroup = *iter();
dilatationErrors_.insert
(
velGroup.phase().name(),
volScalarField
(
IOobject
(
IOobject::groupName
(
"dilatationError",
velGroup.phase().name()
),
fluid_.time().name(),
mesh_
),
mesh_,
dimensionedScalar(inv(dimTime), 0)
)
);
}
// Create size-group boundaries
v_.setSize(sizeGroups().size() + 1);
v_.set(0, new dimensionedScalar("v", sizeGroups()[0].x()));
for (label i = 1; i < sizeGroups().size(); ++ i)
{
v_.set
(
i,
new dimensionedScalar
(
"v",
(sizeGroups()[i-1].x() + sizeGroups()[i].x())/2
)
);
}
v_.set(v_.size() - 1, new dimensionedScalar("v", sizeGroups().last().x()));
// ???
delta_.setSize(sizeGroups().size());
forAll(sizeGroups(), i)
{
delta_.set(i, new PtrList<dimensionedScalar>());
}
// Create size-group source terms
Su_.setSize(sizeGroups().size());
Sp_.setSize(sizeGroups().size());
forAll(sizeGroups(), i)
{
Su_.set
(
i,
new volScalarField
(
IOobject("Su", fluid_.time().name(), mesh_),
mesh_,
dimensionedScalar(inv(dimTime), 0)
)
);
Sp_.set
(
i,
new volScalarField
(
IOobject("Sp", fluid_.time().name(), mesh_),
mesh_,
dimensionedScalar(inv(dimTime), 0)
)
);
}
this->initialiseDmdtfs(); this->initialiseDmdtfs();
if (coalescenceModels_.size() != 0) if (coalescenceModels_.size() != 0)

View File

@ -231,6 +231,147 @@ class populationBalanceModel
: :
public regIOobject public regIOobject
{ {
public:
// Public Classes
//- Class to accumulate population balance sub-class pointers
class groups
:
public regIOobject
{
// Private Data
//- Velocity group pointers
HashTable<const velocityGroup*> velocityGroupPtrs_;
//- Size group pointers
UPtrList<sizeGroup> sizeGroups_;
// Private Constructor
//- Construct with a name on a database
groups(const word& popBalName, const objectRegistry& db)
:
regIOobject
(
IOobject
(
name(popBalName),
db.time().constant(),
db
)
)
{}
// Private Member Functions
//- Return the name of the pointer cache
static word name(const word& popBalName)
{
return popBalName + ":groups";
}
public:
// Constructors
//- Lookup in the registry or construct new
static groups& New
(
const word& popBalName,
const objectRegistry& db
)
{
if (db.foundObject<groups>(name(popBalName)))
{
return db.lookupObjectRef<groups>(name(popBalName));
}
groups* ps = new groups(popBalName, db);
ps->store();
return *ps;
}
// Member Functions
//- Return the current number of size groups
label nSizeGroups()
{
return sizeGroups_.size();
}
//- Insert a velocity group into the table
void insert(velocityGroup& group)
{
velocityGroupPtrs_.insert(group.phase().name(), &group);
const label i0 = nSizeGroups();
sizeGroups_.resize(i0 + group.sizeGroups().size());
forAll(group.sizeGroups(), i)
{
sizeGroups_.set(i0 + i, &group.sizeGroups()[i]);
if
(
i0 + i != 0
&& sizeGroups_[i0 + i - 1].x().value()
>= sizeGroups_[i0 + i].x().value()
)
{
FatalErrorInFunction
<< "Size groups must be specified in order of "
<< "their representative size"
<< exit(FatalError);
}
}
}
//- Retrieve the pointers
static void retrieve
(
const populationBalanceModel& popBal,
HashTable<const velocityGroup*>& velGroupPtrs,
UPtrList<sizeGroup>& szGroupPtrs
)
{
const objectRegistry& db = popBal.fluid().mesh();
if (!db.foundObject<groups>(name(popBal.name())))
{
FatalErrorInFunction
<< "No velocity groups exist for population "
<< "balance \"" << popBal.name() << "\""
<< exit(FatalError);
}
groups& ps =
db.lookupObjectRef<groups>(name(popBal.name()));
velGroupPtrs.transfer(ps.velocityGroupPtrs_);
szGroupPtrs.transfer(ps.sizeGroups_);
ps.checkOut();
}
//- Dummy write for regIOobject
virtual bool writeData(Ostream&) const
{
return true;
}
};
private:
// Private Data // Private Data
//- Reference to the phaseSystem //- Reference to the phaseSystem
@ -328,8 +469,6 @@ class populationBalanceModel
void registerVelocityGroups(); void registerVelocityGroups();
void registerSizeGroups(sizeGroup& group);
void initialiseDmdtfs(); void initialiseDmdtfs();
void createPhasePairs(); void createPhasePairs();
@ -441,9 +580,6 @@ public:
//- Return continuous phase //- Return continuous phase
inline const phaseModel& continuousPhase() const; inline const phaseModel& continuousPhase() const;
//- Return the velocity groups belonging to this populationBalance
inline const HashTable<const velocityGroup*>& velocityGroupPtrs() const;
//- Return the size groups belonging to this populationBalance //- Return the size groups belonging to this populationBalance
inline const UPtrList<sizeGroup>& sizeGroups() const; inline const UPtrList<sizeGroup>& sizeGroups() const;

View File

@ -89,13 +89,6 @@ Foam::diameterModels::populationBalanceModel::continuousPhase() const
} }
inline const Foam::HashTable<const Foam::diameterModels::velocityGroup*>&
Foam::diameterModels::populationBalanceModel::velocityGroupPtrs() const
{
return velocityGroupPtrs_;
}
inline const Foam::UPtrList<Foam::diameterModels::sizeGroup>& inline const Foam::UPtrList<Foam::diameterModels::sizeGroup>&
Foam::diameterModels::populationBalanceModel::sizeGroups() const Foam::diameterModels::populationBalanceModel::sizeGroups() const
{ {
@ -133,7 +126,7 @@ Foam::diameterModels::populationBalanceModel::alphas() const
} }
else else
{ {
return velocityGroupPtrs_[velocityGroupPtrs_.begin().key()]->phase(); return velocityGroupPtrs_.begin()()->phase();
} }
} }
@ -147,8 +140,7 @@ Foam::diameterModels::populationBalanceModel::U() const
} }
else else
{ {
return return velocityGroupPtrs_.begin()()->phase().U();
velocityGroupPtrs_[velocityGroupPtrs_.begin().key()]->phase().U();
} }
} }

View File

@ -0,0 +1,111 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
-------------------------------------------------------------------------------
Description
Generates initial size group fractions given a distribution. Uses the
fDefault.<phase> field file as a reference from which to construct boundary
conditions. All boundary conditions in this file must be default
constructable, or this will not work.
\*---------------------------------------------------------------------------*/
type coded;
libs ("libutilityFunctionObjects.so");
phase <phaseName>; // The phase to write
// size-group fractions
// for
initialDistributionFile <initialDistributionFileName>; // The file containing
// the distribution. In
// foam format.
codeInclude
#{
#include "stringOps.H"
#include "Table.H"
#include "volFields.H"
#};
codeRead
#{
const word phaseName = dict.lookup<word>("phase");
const fileName initialDistributionFileName =
dict.lookup<fileName>("initialDistributionFile");
const List<dictionary> sizeGroupDicts
(
IOdictionary
(
IOobject
(
"phaseProperties",
mesh().time().constant(),
mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
)
)
.subDict(phaseName)
.subDict("velocityGroupCoeffs")
.lookup("sizeGroups")
);
const Function1s::Table<scalar> initialDistribution
(
"initialDistribution",
dictionary
(
"format", "foam",
"file", initialDistributionFileName
)
);
const volScalarField fDefault
(
IOobject
(
IOobject::groupName("fDefault", phaseName),
mesh().time().timeName(),
mesh(),
IOobject::MUST_READ
),
mesh()
);
forAll(sizeGroupDicts, i)
{
volScalarField
(
IOobject
(
IOobject::groupName("f" + Foam::name(i), phaseName),
mesh().time().timeName(),
mesh(),
IOobject::READ_IF_PRESENT
),
mesh(),
dimensionedScalar
(
dimless,
initialDistribution.value
(
dimensionedScalar
(
"dSph",
dimLength,
sizeGroupDicts[i]
).value()
)
),
fDefault.boundaryField().types()
).write();
}
#};
// ************************************************************************* //

View File

@ -10,13 +10,13 @@ FoamFile
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0"; location "0";
object f.air1; object f19.air1;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0; internalField uniform 1;
boundaryField {} boundaryField {}

View File

@ -10,13 +10,13 @@ FoamFile
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0"; location "0";
object f.air2; object f24.air2;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0; internalField uniform 1;
boundaryField {} boundaryField {}

View File

@ -10,13 +10,13 @@ FoamFile
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0"; location "0";
object f.air3; object f28.air3;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0; internalField uniform 1;
boundaryField {} boundaryField {}

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air3;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -23,7 +23,9 @@ populationBalances (bubbles);
air1 air1
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -32,26 +34,26 @@ air1
sizeGroups sizeGroups
( (
f0 {dSph 2.8193481473E-02; value 0.0;} { dSph 2.8193481473E-02; }
f1 {dSph 3.2273479789E-02; value 0.0;} { dSph 3.2273479789E-02; }
f2 {dSph 3.6943911970E-02; value 0.0;} { dSph 3.6943911970E-02; }
f3 {dSph 4.2290222209E-02; value 0.0;} { dSph 4.2290222209E-02; }
f4 {dSph 4.8410219684E-02; value 0.0;} { dSph 4.8410219684E-02; }
f5 {dSph 5.5415867956E-02; value 0.0;} { dSph 5.5415867956E-02; }
f6 {dSph 6.3435333314E-02; value 0.0;} { dSph 6.3435333314E-02; }
f7 {dSph 7.2615329525E-02; value 0.0;} { dSph 7.2615329525E-02; }
f8 {dSph 8.3123801935E-02; value 0.0;} { dSph 8.3123801935E-02; }
f9 {dSph 9.5152999970E-02; value 0.0;} { dSph 9.5152999970E-02; }
f10{dSph 1.0892299429E-01; value 0.0;} { dSph 1.0892299429E-01; }
f11{dSph 1.2468570290E-01; value 0.0;} { dSph 1.2468570290E-01; }
f12{dSph 1.4272949995E-01; value 0.0;} { dSph 1.4272949995E-01; }
f13{dSph 1.6338449143E-01; value 0.0;} { dSph 1.6338449143E-01; }
f14{dSph 1.8702855435E-01; value 0.0;} { dSph 1.8702855435E-01; }
f15{dSph 2.1409424994E-01; value 0.0;} { dSph 2.1409424994E-01; }
f16{dSph 2.4507673715E-01; value 0.0;} { dSph 2.4507673715E-01; }
f17{dSph 2.8054283153E-01; value 0.0;} { dSph 2.8054283153E-01; }
f18{dSph 3.2114137490E-01; value 0.0;} { dSph 3.2114137490E-01; }
f19{dSph 3.6761510572E-01; value 1.0;} { dSph 3.6761510572E-01; }
); );
} }
@ -61,7 +63,9 @@ air1
air2 air2
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -70,11 +74,11 @@ air2
sizeGroups sizeGroups
( (
f20{dSph 4.2081424730E-01; value 1.0;} { dSph 4.2081424730E-01; }
f21{dSph 4.8171206235E-01; value 0.0;} { dSph 4.8171206235E-01; }
f22{dSph 5.5142265857E-01; value 0.0;} { dSph 5.5142265857E-01; }
f23{dSph 6.3122137094E-01; value 0.0;} { dSph 6.3122137094E-01; }
f24{dSph 7.2256809352E-01; value 0.0;} { dSph 7.2256809352E-01; }
); );
} }
@ -84,7 +88,9 @@ air2
air3 air3
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -93,10 +99,10 @@ air3
sizeGroups sizeGroups
( (
f25{dSph 8.2713398787E-01; value 0.0;} { dSph 8.2713398787E-01; }
f26{dSph 9.4683205641E-01; value 0.0;} { dSph 9.4683205641E-01; }
f27{dSph 1.0838521403E+00; value 0.0;} { dSph 1.0838521403E+00; }
f28{dSph 1.2407009818E+00; value 1.0;} { dSph 1.2407009818E+00; }
); );
} }
@ -106,6 +112,7 @@ air3
water water
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel none; diameterModel none;
residualAlpha 1e-6; residualAlpha 1e-6;

View File

@ -1,23 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0;
boundaryField {}
// ************************************************************************* //

View File

@ -1,23 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f.air3;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0;
boundaryField {}
// ************************************************************************* //

View File

@ -10,13 +10,13 @@ FoamFile
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0"; location "0";
object f.air1; object f19.air1;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0; internalField uniform 1;
boundaryField {} boundaryField {}

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f24.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f28.air3;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air3;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -23,7 +23,9 @@ populationBalances (bubbles);
air1 air1
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -32,26 +34,26 @@ air1
sizeGroups sizeGroups
( (
f0 {dSph 2.8193481473E-02; value 0.0;} { dSph 2.8193481473E-02; }
f1 {dSph 3.2273479789E-02; value 0.0;} { dSph 3.2273479789E-02; }
f2 {dSph 3.6943911970E-02; value 0.0;} { dSph 3.6943911970E-02; }
f3 {dSph 4.2290222209E-02; value 0.0;} { dSph 4.2290222209E-02; }
f4 {dSph 4.8410219684E-02; value 0.0;} { dSph 4.8410219684E-02; }
f5 {dSph 5.5415867956E-02; value 0.0;} { dSph 5.5415867956E-02; }
f6 {dSph 6.3435333314E-02; value 0.0;} { dSph 6.3435333314E-02; }
f7 {dSph 7.2615329525E-02; value 0.0;} { dSph 7.2615329525E-02; }
f8 {dSph 8.3123801935E-02; value 0.0;} { dSph 8.3123801935E-02; }
f9 {dSph 9.5152999970E-02; value 0.0;} { dSph 9.5152999970E-02; }
f10{dSph 1.0892299429E-01; value 0.0;} { dSph 1.0892299429E-01; }
f11{dSph 1.2468570290E-01; value 0.0;} { dSph 1.2468570290E-01; }
f12{dSph 1.4272949995E-01; value 0.0;} { dSph 1.4272949995E-01; }
f13{dSph 1.6338449143E-01; value 0.0;} { dSph 1.6338449143E-01; }
f14{dSph 1.8702855435E-01; value 0.0;} { dSph 1.8702855435E-01; }
f15{dSph 2.1409424994E-01; value 0.0;} { dSph 2.1409424994E-01; }
f16{dSph 2.4507673715E-01; value 0.0;} { dSph 2.4507673715E-01; }
f17{dSph 2.8054283153E-01; value 0.0;} { dSph 2.8054283153E-01; }
f18{dSph 3.2114137490E-01; value 0.0;} { dSph 3.2114137490E-01; }
f19{dSph 3.6761510572E-01; value 1.0;} { dSph 3.6761510572E-01; }
); );
} }
@ -61,7 +63,9 @@ air1
air2 air2
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -70,11 +74,11 @@ air2
sizeGroups sizeGroups
( (
f20{dSph 4.2081424730E-01; value 1.0;} { dSph 4.2081424730E-01; }
f21{dSph 4.8171206235E-01; value 0.0;} { dSph 4.8171206235E-01; }
f22{dSph 5.5142265857E-01; value 0.0;} { dSph 5.5142265857E-01; }
f23{dSph 6.3122137094E-01; value 0.0;} { dSph 6.3122137094E-01; }
f24{dSph 7.2256809352E-01; value 0.0;} { dSph 7.2256809352E-01; }
); );
} }
@ -84,7 +88,9 @@ air2
air3 air3
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -93,10 +99,10 @@ air3
sizeGroups sizeGroups
( (
f25{dSph 8.2713398787E-01; value 0.0;} { dSph 8.2713398787E-01; }
f26{dSph 9.4683205641E-01; value 0.0;} { dSph 9.4683205641E-01; }
f27{dSph 1.0838521403E+00; value 0.0;} { dSph 1.0838521403E+00; }
f28{dSph 1.2407009818E+00; value 1.0;} { dSph 1.2407009818E+00; }
); );
} }
@ -106,6 +112,7 @@ air3
water water
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel none; diameterModel none;
residualAlpha 1e-6; residualAlpha 1e-6;

View File

@ -1,23 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0;
boundaryField {}
// ************************************************************************* //

View File

@ -1,23 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0;
boundaryField {}
// ************************************************************************* //

View File

@ -1,23 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f.air3;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f47.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f56.air3;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air3;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -6,6 +6,6 @@ cd "${0%/*}" || exit 1
# Source clean functions # Source clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase && rm -f numberDensity.eps cleanCase && rm -f 0/f[0-9]*.air1 numberDensity.eps
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -7,6 +7,13 @@ cd "${0%/*}" || exit 1
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication zeroDimensionalMesh runApplication zeroDimensionalMesh
runApplication foamPostProcess -func "
populationBalanceInitialDistributionFs
(
phase=air1,
initialDistributionFile=\"constant/initialDistribution.air1\"
)
"
runApplication $(getApplication) runApplication $(getApplication)
( cd validation && ./createGraphs ) ( cd validation && ./createGraphs )

View File

@ -0,0 +1,49 @@
(
(2.6472201610E-02 5.0000000000E-10)
(2.8516314790E-02 2.0000000000E-10)
(3.0718268709E-02 4.0000000000E-10)
(3.3090252012E-02 8.0000000000E-10)
(3.5645392557E-02 1.5000000000E-09)
(3.8397835576E-02 2.9000000000E-09)
(4.1362814395E-02 5.7000000000E-09)
(4.4556741007E-02 1.1000000000E-08)
(4.7997294160E-02 2.1500000000E-08)
(5.1703518614E-02 4.2000000000E-08)
(5.5695926879E-02 8.1900000000E-08)
(5.9996618320E-02 1.5950000000E-07)
(6.4629397027E-02 3.1070000000E-07)
(6.9619908288E-02 6.0460000000E-07)
(7.4995772590E-02 1.1757000000E-06)
(8.0786746904E-02 2.2836000000E-06)
(8.7024884740E-02 4.4295000000E-06)
(9.3744716047E-02 8.5770000000E-06)
(1.0098343332E-01 1.6572400000E-05)
(1.0878110624E-01 3.1934500000E-05)
(1.1718089506E-01 6.1329900000E-05)
(1.2622929258E-01 1.1728840000E-04)
(1.3597638341E-01 2.2312640000E-04)
(1.4647611820E-01 4.2168510000E-04)
(1.5778661510E-01 7.9041010000E-04)
(1.6997047865E-01 1.4663924000E-03)
(1.8309514838E-01 2.6857456000E-03)
(1.9723326857E-01 4.8406166000E-03)
(2.1246309893E-01 8.5509222000E-03)
(2.2886893516E-01 1.4730611700E-02)
(2.4654158664E-01 2.4592238100E-02)
(2.6557887273E-01 3.9476363300E-02)
(2.8608616864E-01 6.0336272800E-02)
(3.0817698237E-01 8.6735651800E-02)
(3.3197359122E-01 1.1548859450E-01)
(3.5760771049E-01 1.3972798580E-01)
(3.8522122921E-01 1.4997928090E-01)
(4.1496698934E-01 1.3860649860E-01)
(4.4700963811E-01 1.0624083860E-01)
(4.8152653620E-01 6.4453106200E-02)
(5.1870873668E-01 2.9191189700E-02)
(5.5876204826E-01 9.1744326000E-03)
(6.0190816932E-01 1.8262321000E-03)
(6.4838592116E-01 2.0539720000E-04)
(6.9845255939E-01 1.1316400000E-05)
(7.5238521196E-01 2.5550000000E-07)
(8.1048240020E-01 1.9000000000E-09)
)

View File

@ -23,7 +23,9 @@ populationBalances (bubbles);
air1 air1
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -32,54 +34,53 @@ air1
sizeGroups sizeGroups
( (
f0 {dSph 2.6472201610E-02; value 5.0000000000E-10;} { dSph 2.6472201610E-02; }
f1 {dSph 2.8516314790E-02; value 2.0000000000E-10;} { dSph 2.8516314790E-02; }
f2 {dSph 3.0718268709E-02; value 4.0000000000E-10;} { dSph 3.0718268709E-02; }
f3 {dSph 3.3090252012E-02; value 8.0000000000E-10;} { dSph 3.3090252012E-02; }
f4 {dSph 3.5645392557E-02; value 1.5000000000E-09;} { dSph 3.5645392557E-02; }
f5 {dSph 3.8397835576E-02; value 2.9000000000E-09;} { dSph 3.8397835576E-02; }
f6 {dSph 4.1362814395E-02; value 5.7000000000E-09;} { dSph 4.1362814395E-02; }
f7 {dSph 4.4556741007E-02; value 1.1000000000E-08;} { dSph 4.4556741007E-02; }
f8 {dSph 4.7997294160E-02; value 2.1500000000E-08;} { dSph 4.7997294160E-02; }
f9 {dSph 5.1703518614E-02; value 4.2000000000E-08;} { dSph 5.1703518614E-02; }
f10{dSph 5.5695926879E-02; value 8.1900000000E-08;} { dSph 5.5695926879E-02; }
f11{dSph 5.9996618320E-02; value 1.5950000000E-07;} { dSph 5.9996618320E-02; }
f12{dSph 6.4629397027E-02; value 3.1070000000E-07;} { dSph 6.4629397027E-02; }
f13{dSph 6.9619908288E-02; value 6.0460000000E-07;} { dSph 6.9619908288E-02; }
f14{dSph 7.4995772590E-02; value 1.1757000000E-06;} { dSph 7.4995772590E-02; }
f15{dSph 8.0786746904E-02; value 2.2836000000E-06;} { dSph 8.0786746904E-02; }
f16{dSph 8.7024884740E-02; value 4.4295000000E-06;} { dSph 8.7024884740E-02; }
f17{dSph 9.3744716047E-02; value 8.5770000000E-06;} { dSph 9.3744716047E-02; }
f18{dSph 1.0098343332E-01; value 1.6572400000E-05;} { dSph 1.0098343332E-01; }
f19{dSph 1.0878110624E-01; value 3.1934500000E-05;} { dSph 1.0878110624E-01; }
f20{dSph 1.1718089506E-01; value 6.1329900000E-05;} { dSph 1.1718089506E-01; }
f21{dSph 1.2622929258E-01; value 1.1728840000E-04;} { dSph 1.2622929258E-01; }
f22{dSph 1.3597638341E-01; value 2.2312640000E-04;} { dSph 1.3597638341E-01; }
f23{dSph 1.4647611820E-01; value 4.2168510000E-04;} { dSph 1.4647611820E-01; }
f24{dSph 1.5778661510E-01; value 7.9041010000E-04;} { dSph 1.5778661510E-01; }
f25{dSph 1.6997047865E-01; value 1.4663924000E-03;} { dSph 1.6997047865E-01; }
f26{dSph 1.8309514838E-01; value 2.6857456000E-03;} { dSph 1.8309514838E-01; }
f27{dSph 1.9723326857E-01; value 4.8406166000E-03;} { dSph 1.9723326857E-01; }
f28{dSph 2.1246309893E-01; value 8.5509222000E-03;} { dSph 2.1246309893E-01; }
f29{dSph 2.2886893516E-01; value 1.4730611700E-02;} { dSph 2.2886893516E-01; }
f30{dSph 2.4654158664E-01; value 2.4592238100E-02;} { dSph 2.4654158664E-01; }
f31{dSph 2.6557887273E-01; value 3.9476363300E-02;} { dSph 2.6557887273E-01; }
f32{dSph 2.8608616864E-01; value 6.0336272800E-02;} { dSph 2.8608616864E-01; }
f33{dSph 3.0817698237E-01; value 8.6735651800E-02;} { dSph 3.0817698237E-01; }
f34{dSph 3.3197359122E-01; value 1.1548859450E-01;} { dSph 3.3197359122E-01; }
f35{dSph 3.5760771049E-01; value 1.3972798580E-01;} { dSph 3.5760771049E-01; }
f36{dSph 3.8522122921E-01; value 1.4997928090E-01;} { dSph 3.8522122921E-01; }
f37{dSph 4.1496698934E-01; value 1.3860649860E-01;} { dSph 4.1496698934E-01; }
f38{dSph 4.4700963811E-01; value 1.0624083860E-01;} { dSph 4.4700963811E-01; }
f39{dSph 4.8152653620E-01; value 6.4453106200E-02;} { dSph 4.8152653620E-01; }
f40{dSph 5.1870873668E-01; value 2.9191189700E-02;} { dSph 5.1870873668E-01; }
f41{dSph 5.5876204826E-01; value 9.1744326000E-03;} { dSph 5.5876204826E-01; }
f42{dSph 6.0190816932E-01; value 1.8262321000E-03;} { dSph 6.0190816932E-01; }
f43{dSph 6.4838592116E-01; value 2.0539720000E-04;} { dSph 6.4838592116E-01; }
f44{dSph 6.9845255939E-01; value 1.1316400000E-05;} { dSph 6.9845255939E-01; }
f45{dSph 7.5238521196E-01; value 2.5550000000E-07;} { dSph 7.5238521196E-01; }
f46{dSph 8.1048240020E-01; value 1.9000000000E-09;} { dSph 8.1048240020E-01; }
); );
} }
@ -89,7 +90,9 @@ air1
air2 air2
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -98,15 +101,15 @@ air2
sizeGroups sizeGroups
( (
f47{dSph 8.7306570017E-01; value 1.0000000000E+00;} { dSph 8.7306570017E-01; }
f48{dSph 9.4048151557E-01; value 0.0000000000E+00;} { dSph 9.4048151557E-01; }
f49{dSph 1.0131030009E+00; value 0.0000000000E+00;} { dSph 1.0131030009E+00; }
f50{dSph 1.0913321246E+00; value 0.0000000000E+00;} { dSph 1.0913321246E+00; }
f51{dSph 1.1756018938E+00; value 0.0000000000E+00;} { dSph 1.1756018938E+00; }
f52{dSph 1.2663787514E+00; value 0.0000000000E+00;} { dSph 1.2663787514E+00; }
f53{dSph 1.3641651564E+00; value 0.0000000000E+00;} { dSph 1.3641651564E+00; }
f54{dSph 1.4695023670E+00; value 0.0000000000E+00;} { dSph 1.4695023670E+00; }
f55{dSph 1.5829734383E+00; value 0.0000000000E+00;} { dSph 1.5829734383E+00; }
); );
} }
@ -116,7 +119,9 @@ air2
air3 air3
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -125,21 +130,21 @@ air3
sizeGroups sizeGroups
( (
f56{dSph 1.7052064454E+00; value 1.0000000000E+00;} { dSph 1.7052064454E+00; }
f57{dSph 1.8368779600E+00; value 0.0000000000E+00;} { dSph 1.8368779600E+00; }
f58{dSph 1.9787167982E+00; value 0.0000000000E+00;} { dSph 1.9787167982E+00; }
f59{dSph 2.1315080559E+00; value 0.0000000000E+00;} { dSph 2.1315080559E+00; }
f60{dSph 2.2960974494E+00; value 0.0000000000E+00;} { dSph 2.2960974494E+00; }
f61{dSph 2.4733959981E+00; value 0.0000000000E+00;} { dSph 2.4733959981E+00; }
f62{dSph 2.6643850705E+00; value 0.0000000000E+00;} { dSph 2.6643850705E+00; }
f63{dSph 2.8701218120E+00; value 0.0000000000E+00;} { dSph 2.8701218120E+00; }
f64{dSph 3.0917449976E+00; value 0.0000000000E+00;} { dSph 3.0917449976E+00; }
f65{dSph 3.3304813381E+00; value 0.0000000000E+00;} { dSph 3.3304813381E+00; }
f66{dSph 3.5876522644E+00; value 0.0000000000E+00;} { dSph 3.5876522644E+00; }
f67{dSph 3.8646812476E+00; value 0.0000000000E+00;} { dSph 3.8646812476E+00; }
f68{dSph 4.1631016726E+00; value 0.0000000000E+00;} { dSph 4.1631016726E+00; }
f69{dSph 4.4845653305E+00; value 0.0000000000E+00;} { dSph 4.4845653305E+00; }
f70{dSph 4.8308515589E+00; value 0.0000000000E+00;} { dSph 4.8308515589E+00; }
); );
} }

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f10.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.1429;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f11.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.1758;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f12.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.2146;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f13.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.2599;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f8.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.0918;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f9.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.1151;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -25,7 +25,9 @@ populationBalances (bubbles);
air air
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -34,35 +36,35 @@ air
sizeGroups sizeGroups
( (
f0 {dSph 1.000; value 0.0000;} { dSph 1.000; }
f1 {dSph 1.074; value 0.0000;} { dSph 1.074; }
f2 {dSph 1.147; value 0.0000;} { dSph 1.147; }
f3 {dSph 1.221; value 0.0000;} { dSph 1.221; }
f4 {dSph 1.294; value 0.0000;} { dSph 1.294; }
f5 {dSph 1.368; value 0.0000;} { dSph 1.368; }
f6 {dSph 1.441; value 0.0000;} { dSph 1.441; }
f7 {dSph 1.515; value 0.0000;} { dSph 1.515; }
f8 {dSph 1.588; value 0.0918;} { dSph 1.588; }
f9 {dSph 1.662; value 0.1151;} { dSph 1.662; }
f10{dSph 1.735; value 0.1429;} { dSph 1.735; }
f11{dSph 1.809; value 0.1758;} { dSph 1.809; }
f12{dSph 1.882; value 0.2146;} { dSph 1.882; }
f13{dSph 1.956; value 0.2599;} { dSph 1.956; }
f14{dSph 2.029; value 0.0000;} { dSph 2.029; }
f15{dSph 2.103; value 0.0000;} { dSph 2.103; }
f16{dSph 2.176; value 0.0000;} { dSph 2.176; }
f17{dSph 2.250; value 0.0000;} { dSph 2.250; }
f18{dSph 2.323; value 0.0000;} { dSph 2.323; }
f19{dSph 2.397; value 0.0000;} { dSph 2.397; }
f20{dSph 2.470; value 0.0000;} { dSph 2.470; }
f21{dSph 2.544; value 0.0000;} { dSph 2.544; }
f22{dSph 2.617; value 0.0000;} { dSph 2.617; }
f23{dSph 2.691; value 0.0000;} { dSph 2.691; }
f24{dSph 2.764; value 0.0000;} { dSph 2.764; }
f25{dSph 2.838; value 0.0000;} { dSph 2.838; }
f26{dSph 2.911; value 0.0000;} { dSph 2.911; }
f27{dSph 2.985; value 0.0000;} { dSph 2.985; }
f28{dSph 3.058; value 0.0000;} { dSph 3.058; }
); );
} }
@ -72,6 +74,7 @@ air
water water
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel none; diameterModel none;
residualAlpha 1e-6; residualAlpha 1e-6;

View File

@ -10,13 +10,13 @@ FoamFile
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0"; location "0";
object f.air1; object f0.air1;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0; internalField uniform 1;
boundaryField boundaryField
{ {
@ -25,7 +25,7 @@ boundaryField
inlet inlet
{ {
type fixedValue; type fixedValue;
value uniform 1.0; value $internalField;
} }
outlet outlet

View File

@ -10,13 +10,13 @@ FoamFile
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0"; location "0";
object f.air3; object f11.air3;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0; internalField uniform 1;
boundaryField boundaryField
{ {
@ -25,7 +25,7 @@ boundaryField
inlet inlet
{ {
type fixedValue; type fixedValue;
value uniform 1.0; value $internalField;
} }
outlet outlet

View File

@ -10,13 +10,13 @@ FoamFile
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0"; location "0";
object f.air2; object f6.air2;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0; internalField uniform 1;
boundaryField boundaryField
{ {
@ -25,7 +25,7 @@ boundaryField
inlet inlet
{ {
type fixedValue; type fixedValue;
value uniform 1.0; value $internalField;
} }
outlet outlet

View File

@ -0,0 +1,37 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,37 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,37 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air3;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -24,7 +24,9 @@ populationBalances (bubbles);
air1 air1
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -33,12 +35,12 @@ air1
sizeGroups sizeGroups
( (
f0 {dSph 3.00e-03; value 1;} { dSph 3.00e-03; }
f1 {dSph 3.01e-03; value 0;} { dSph 3.01e-03; }
f2 {dSph 3.02e-03; value 0;} { dSph 3.02e-03; }
f3 {dSph 3.03e-03; value 0;} { dSph 3.03e-03; }
f4 {dSph 3.04e-03; value 0;} { dSph 3.04e-03; }
f5 {dSph 3.05e-03; value 0;} { dSph 3.05e-03; }
); );
} }
@ -48,7 +50,9 @@ air1
air2 air2
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -57,11 +61,11 @@ air2
sizeGroups sizeGroups
( (
f6 {dSph 3.06e-03; value 1;} { dSph 3.06e-03; }
f7 {dSph 3.07e-03; value 0;} { dSph 3.07e-03; }
f8 {dSph 3.08e-03; value 0;} { dSph 3.08e-03; }
f9 {dSph 3.09e-03; value 0;} { dSph 3.09e-03; }
f10{dSph 3.10e-03; value 0;} { dSph 3.10e-03; }
); );
} }
@ -71,7 +75,9 @@ air2
air3 air3
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -80,11 +86,11 @@ air3
sizeGroups sizeGroups
( (
f11{dSph 3.11e-03; value 1;} { dSph 3.11e-03; }
f12{dSph 3.12e-03; value 0;} { dSph 3.12e-03; }
f13{dSph 3.13e-03; value 0;} { dSph 3.13e-03; }
f14{dSph 3.14e-03; value 0;} { dSph 3.14e-03; }
f15{dSph 3.15e-03; value 0;} { dSph 3.15e-03; }
); );
} }
@ -94,6 +100,7 @@ air3
water water
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel none; diameterModel none;
residualAlpha 1e-6; residualAlpha 1e-6;

View File

@ -1,23 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f20.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.1989;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f21.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.2304;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f22.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.2656;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f23.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.3051;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -34,35 +34,35 @@ air
sizeGroups sizeGroups
( (
f0 {dSph 1.000; value 0.0000;} { dSph 1.000; }
f1 {dSph 1.074; value 0.0000;} { dSph 1.074; }
f2 {dSph 1.147; value 0.0000;} { dSph 1.147; }
f3 {dSph 1.221; value 0.0000;} { dSph 1.221; }
f4 {dSph 1.294; value 0.0000;} { dSph 1.294; }
f5 {dSph 1.368; value 0.0000;} { dSph 1.368; }
f6 {dSph 1.441; value 0.0000;} { dSph 1.441; }
f7 {dSph 1.515; value 0.0000;} { dSph 1.515; }
f8 {dSph 1.588; value 0.0000;} { dSph 1.588; }
f9 {dSph 1.662; value 0.0000;} { dSph 1.662; }
f10{dSph 1.735; value 0.0000;} { dSph 1.735; }
f11{dSph 1.809; value 0.0000;} { dSph 1.809; }
f12{dSph 1.882; value 0.0000;} { dSph 1.882; }
f13{dSph 1.956; value 0.0000;} { dSph 1.956; }
f14{dSph 2.029; value 0.0000;} { dSph 2.029; }
f15{dSph 2.103; value 0.0000;} { dSph 2.103; }
f16{dSph 2.176; value 0.0000;} { dSph 2.176; }
f17{dSph 2.250; value 0.0000;} { dSph 2.250; }
f18{dSph 2.323; value 0.0000;} { dSph 2.323; }
f19{dSph 2.397; value 0.0000;} { dSph 2.397; }
f20{dSph 2.470; value 0.1989;} { dSph 2.470; }
f21{dSph 2.544; value 0.2304;} { dSph 2.544; }
f22{dSph 2.617; value 0.2656;} { dSph 2.617; }
f23{dSph 2.691; value 0.3051;} { dSph 2.691; }
f24{dSph 2.764; value 0.0000;} { dSph 2.764; }
f25{dSph 2.838; value 0.0000;} { dSph 2.838; }
f26{dSph 2.911; value 0.0000;} { dSph 2.911; }
f27{dSph 2.985; value 0.0000;} { dSph 2.985; }
f28{dSph 3.058; value 0.0000;} { dSph 3.058; }
); );
} }

View File

@ -1,23 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0;
boundaryField {}
// ************************************************************************* //

View File

@ -1,23 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0;
boundaryField {}
// ************************************************************************* //

View File

@ -1,23 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f.air3;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0;
boundaryField {}
// ************************************************************************* //

View File

@ -10,13 +10,13 @@ FoamFile
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0"; location "0";
object f.air; object f0.air1;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0; internalField uniform 1;
boundaryField {} boundaryField {}

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f13.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object f23.air3;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object fDefault.air3;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField {}
// ************************************************************************* //

View File

@ -23,7 +23,9 @@ populationBalances (bubbles);
air1 air1
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -32,19 +34,19 @@ air1
sizeGroups sizeGroups
( (
f0 {dSph 1.2407009818E+00; value 1.0;} { dSph 1.2407009818E+00; }
f1 {dSph 1.3400311786E+00; value 0.0;} { dSph 1.3400311786E+00; }
f2 {dSph 1.4473137252E+00; value 0.0;} { dSph 1.4473137252E+00; }
f3 {dSph 1.5631852837E+00; value 0.0;} { dSph 1.5631852837E+00; }
f4 {dSph 1.6883334890E+00; value 0.0;} { dSph 1.6883334890E+00; }
f5 {dSph 1.8235010272E+00; value 0.0;} { dSph 1.8235010272E+00; }
f6 {dSph 1.9694900437E+00; value 0.0;} { dSph 1.9694900437E+00; }
f7 {dSph 2.1271669027E+00; value 0.0;} { dSph 2.1271669027E+00; }
f8 {dSph 2.2974673296E+00; value 0.0;} { dSph 2.2974673296E+00; }
f9 {dSph 2.4814019636E+00; value 0.0;} { dSph 2.4814019636E+00; }
f10{dSph 2.6800623572E+00; value 0.0;} { dSph 2.6800623572E+00; }
f11{dSph 2.8946274492E+00; value 0.0;} { dSph 2.8946274492E+00; }
f12{dSph 3.1263705674E+00; value 0.0;} { dSph 3.1263705674E+00; }
); );
} }
@ -54,7 +56,9 @@ air1
air2 air2
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -63,16 +67,16 @@ air2
sizeGroups sizeGroups
( (
f13{dSph 3.3766669780E+00; value 1.0;} { dSph 3.3766669780E+00; }
f14{dSph 3.6470020557E+00; value 0.0;} { dSph 3.6470020557E+00; }
f15{dSph 3.9389800874E+00; value 0.0;} { dSph 3.9389800874E+00; }
f16{dSph 4.2543338042E+00; value 0.0;} { dSph 4.2543338042E+00; }
f17{dSph 4.5949346580E+00; value 0.0;} { dSph 4.5949346580E+00; }
f18{dSph 4.9628039272E+00; value 0.0;} { dSph 4.9628039272E+00; }
f19{dSph 5.3601247143E+00; value 0.0;} { dSph 5.3601247143E+00; }
f20{dSph 5.7892548984E+00; value 0.0;} { dSph 5.7892548984E+00; }
f21{dSph 6.2527411349E+00; value 0.0;} { dSph 6.2527411349E+00; }
f22{dSph 6.7533339573E+00; value 0.0;} { dSph 6.7533339573E+00; }
); );
} }
@ -82,7 +86,9 @@ air2
air3 air3
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel velocityGroup; diameterModel velocityGroup;
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
@ -91,14 +97,14 @@ air3
sizeGroups sizeGroups
( (
f23{dSph 7.2940041101E+00; value 1.0;} { dSph 7.2940041101E+00; }
f24{dSph 7.8779601749E+00; value 0.0;} { dSph 7.8779601749E+00; }
f25{dSph 8.5086676096E+00; value 0.0;} { dSph 8.5086676096E+00; }
f26{dSph 9.1898693161E+00; value 0.0;} { dSph 9.1898693161E+00; }
f27{dSph 9.9256078544E+00; value 0.0;} { dSph 9.9256078544E+00; }
f28{dSph 1.0720249427E+01; value 0.0;} { dSph 1.0720249427E+01; }
f29{dSph 1.1578509798E+01; value 0.0;} { dSph 1.1578509798E+01; }
f30{dSph 1.2505482270E+01; value 0.0;} { dSph 1.2505482270E+01; }
); );
} }
@ -108,6 +114,7 @@ air3
water water
{ {
type pureIsothermalPhaseModel; type pureIsothermalPhaseModel;
diameterModel none; diameterModel none;
residualAlpha 1e-6; residualAlpha 1e-6;

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object f0.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [];
internalField uniform 1;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type uniformFixedValue;
uniformValue 1;
}
outlet
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object f5.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [];
internalField uniform 1;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type uniformFixedValue;
uniformValue 1;
}
outlet
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object fDefault.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type uniformFixedValue;
uniformValue 0;
}
outlet
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object fDefault.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type uniformFixedValue;
uniformValue 0;
}
outlet
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -27,12 +27,12 @@ massSource
fieldValues fieldValues
{ {
f1.air1 0; f0.air1 0;
f2.air1 0; f1.air1 0;
f3.air1 1; f2.air1 1;
f4.air1 0; f3.air1 0;
f5.air1 0; f4.air1 0;
U.air1 (0 0 0); U.air1 (0 0 0);
} }
} }

View File

@ -27,17 +27,17 @@ air1
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
shapeModel spherical; shapeModel spherical;
sizeGroups sizeGroups
( (
f1 {dSph 1e-3; value 1.0;} { dSph 1e-3; }
f2 {dSph 2e-3; value 0.0;} { dSph 2e-3; }
f3 {dSph 3e-3; value 0.0;} { dSph 3e-3; }
f4 {dSph 4e-3; value 0.0;} { dSph 4e-3; }
f5 {dSph 5e-3; value 0.0;} { dSph 5e-3; }
); );
} }
@ -52,19 +52,19 @@ air2
velocityGroupCoeffs velocityGroupCoeffs
{ {
populationBalance bubbles; populationBalance bubbles;
shapeModel spherical; shapeModel spherical;
sizeGroups sizeGroups
( (
f6 {dSph 6e-3; value 1.0;} { dSph 6e-3; }
f7 {dSph 7e-3; value 0.0;} { dSph 7e-3; }
f8 {dSph 8e-3; value 0.0;} { dSph 8e-3; }
f9 {dSph 9e-3; value 0.0;} { dSph 9e-3; }
f10{dSph 10e-3; value 0.0;} { dSph 10e-3; }
f11{dSph 11e-3; value 0.0;} { dSph 11e-3; }
f12{dSph 12e-3; value 0.0;} { dSph 12e-3; }
); );
} }
@ -88,12 +88,14 @@ populationBalanceCoeffs
coalescenceModels coalescenceModels
( (
LehrMilliesMewes{} LehrMilliesMewes
{}
); );
binaryBreakupModels binaryBreakupModels
( (
LehrMilliesMewes{} LehrMilliesMewes
{}
); );
breakupModels breakupModels
@ -101,7 +103,8 @@ populationBalanceCoeffs
driftModels driftModels
( (
densityChange{} densityChange
{}
); );
nucleationModels nucleationModels

View File

@ -15,7 +15,7 @@ FoamFile
dimensions []; dimensions [];
internalField uniform 1.0; internalField uniform 0;
boundaryField boundaryField
{ {

View File

@ -10,6 +10,13 @@ runApplication topoSet
# Run # Run
runApplication decomposePar runApplication decomposePar
runParallel -s populationBalanceInitialDistributionFs foamPostProcess -func "
populationBalanceInitialDistributionFs
(
phase=particles,
initialDistributionFile=\"constant/initialDistribution.particles\"
)
"
runParallel $(getApplication) runParallel $(getApplication)
runApplication reconstructPar -latestTime runApplication reconstructPar -latestTime

View File

@ -0,0 +1,32 @@
(
(1e-6 0)
(1.21e-6 0)
(1.463e-6 0.0001)
(1.77e-6 0.0002)
(2.142e-6 0.0004)
(2.591e-6 0.0008)
(3.134e-6 0.0015)
(3.792e-6 0.0025)
(4.587e-6 0.004)
(5.549e-6 0.0062)
(6.71e-6 0.0093)
(8.12e-6 0.0137)
(9.82e-6 0.0198)
(11.88e-6 0.0279)
(14.38e-6 0.0383)
(17.39e-6 0.0512)
(21.04e-6 0.0663)
(25.45e-6 0.0829)
(30.79e-6 0.0991)
(37.24e-6 0.1121)
(45.06e-6 0.1183)
(54.51e-6 0.1141)
(65.94e-6 0.0977)
(79.77e-6 0.0712)
(96.49e-6 0.0412)
(116.7e-6 0.0170)
(141.2e-6 0.004)
(170.8e-6 0.0002)
(206.7e-6 0)
(250e-6 0)
);

View File

@ -33,40 +33,41 @@ particles
sizeGroups sizeGroups
( (
f1 {dSph 1e-6; value 0;} { dSph 1e-6; }
f2 {dSph 1.21e-6; value 0.000;} { dSph 1.21e-6; }
f3 {dSph 1.463e-6; value 0.0001;} { dSph 1.463e-6; }
f4 {dSph 1.77e-6; value 0.0002;} { dSph 1.77e-6; }
f5 {dSph 2.142e-6; value 0.0004;} { dSph 2.142e-6; }
f6 {dSph 2.591e-6; value 0.0008;} { dSph 2.591e-6; }
f7 {dSph 3.134e-6; value 0.0015;} { dSph 3.134e-6; }
f8 {dSph 3.792e-6; value 0.0025;} { dSph 3.792e-6; }
f9 {dSph 4.587e-6; value 0.004;} { dSph 4.587e-6; }
f10 {dSph 5.549e-6; value 0.0062;} { dSph 5.549e-6; }
f11 {dSph 6.71e-6; value 0.0093;} { dSph 6.71e-6; }
f12 {dSph 8.12e-6; value 0.0137;} { dSph 8.12e-6; }
f13 {dSph 9.82e-6; value 0.0198;} { dSph 9.82e-6; }
f14 {dSph 11.88e-6; value 0.0279;} { dSph 11.88e-6; }
f15 {dSph 14.38e-6; value 0.0383;} { dSph 14.38e-6; }
f16 {dSph 17.39e-6; value 0.0512;} { dSph 17.39e-6; }
f17 {dSph 21.04e-6; value 0.0663;} { dSph 21.04e-6; }
f18 {dSph 25.45e-6; value 0.0829;} { dSph 25.45e-6; }
f19 {dSph 30.79e-6; value 0.0991;} { dSph 30.79e-6; }
f20 {dSph 37.24e-6; value 0.1121;} { dSph 37.24e-6; }
f21 {dSph 45.06e-6; value 0.1183;} { dSph 45.06e-6; }
f22 {dSph 54.51e-6; value 0.1141;} { dSph 54.51e-6; }
f23 {dSph 65.94e-6; value 0.0977;} { dSph 65.94e-6; }
f24 {dSph 79.77e-6; value 0.0712;} { dSph 79.77e-6; }
f25 {dSph 96.49e-6; value 0.0412;} { dSph 96.49e-6; }
f26 {dSph 116.7e-6; value 0.0170;} { dSph 116.7e-6; }
f27 {dSph 141.2e-6; value 0.004;} { dSph 141.2e-6; }
f28 {dSph 170.8e-6; value 0.0002;} { dSph 170.8e-6; }
f29 {dSph 206.7e-6; value 0;} { dSph 206.7e-6; }
f30 {dSph 250e-6; value 0;} { dSph 250e-6; }
); );
} }
alphaMax 0.62; alphaMax 0.62;
residualAlpha 1e-8; residualAlpha 1e-8;
} }
@ -87,7 +88,8 @@ populationBalanceCoeffs
coalescenceModels coalescenceModels
( (
AdachiStuartFokkink{} AdachiStuartFokkink
{}
); );
binaryBreakupModels binaryBreakupModels

View File

@ -9,13 +9,13 @@ FoamFile
{ {
format ascii; format ascii;
class volScalarField; class volScalarField;
object f.particles; object f0.particles;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions []; dimensions [];
internalField uniform 1.0; internalField uniform 1;
boundaryField boundaryField
{ {
@ -24,7 +24,7 @@ boundaryField
inlet inlet
{ {
type fixedValue; type fixedValue;
value uniform 1.0; value uniform 1;
} }
outlet outlet

View File

@ -9,13 +9,13 @@ FoamFile
{ {
format ascii; format ascii;
class volScalarField; class volScalarField;
object f.air2; object fDefault.particles;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions []; dimensions [];
internalField uniform 1.0; internalField uniform 0;
boundaryField boundaryField
{ {
@ -24,7 +24,7 @@ boundaryField
inlet inlet
{ {
type fixedValue; type fixedValue;
value $internalField; value uniform 0;
} }
outlet outlet
@ -32,10 +32,11 @@ boundaryField
type zeroGradient; type zeroGradient;
} }
walls wall
{ {
type zeroGradient; type zeroGradient;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -0,0 +1,42 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object kappaDefault.particles;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 -1 0 0 0 0 0];
internalField uniform 1.5e10;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value uniform 1.5e10;
}
outlet
{
type zeroGradient;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -47,35 +47,35 @@ particles
sizeGroups sizeGroups
( (
f01{dSph 4.000E-10; value 1.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 4.000E-10; Df 1.8; alphaC 1; }
f02{dSph 5.769E-10; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 5.769E-10; Df 1.8; alphaC 1; }
f03{dSph 8.320E-10; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 8.320E-10; Df 1.8; alphaC 1; }
f04{dSph 1.200E-09; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 1.200E-09; Df 1.8; alphaC 1; }
f05{dSph 1.731E-09; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 1.731E-09; Df 1.8; alphaC 1; }
f06{dSph 2.496E-09; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 2.496E-09; Df 1.8; alphaC 1; }
f07{dSph 3.600E-09; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 3.600E-09; Df 1.8; alphaC 1; }
f08{dSph 5.192E-09; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 5.192E-09; Df 1.8; alphaC 1; }
f09{dSph 7.488E-09; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 7.488E-09; Df 1.8; alphaC 1; }
f10{dSph 1.080E-08; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 1.080E-08; Df 1.8; alphaC 1; }
f11{dSph 1.558E-08; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 1.558E-08; Df 1.8; alphaC 1; }
f12{dSph 2.246E-08; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 2.246E-08; Df 1.8; alphaC 1; }
f13{dSph 3.240E-08; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 3.240E-08; Df 1.8; alphaC 1; }
f14{dSph 4.673E-08; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 4.673E-08; Df 1.8; alphaC 1; }
f15{dSph 6.739E-08; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 6.739E-08; Df 1.8; alphaC 1; }
f16{dSph 9.720E-08; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 9.720E-08; Df 1.8; alphaC 1; }
f17{dSph 1.402E-07; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 1.402E-07; Df 1.8; alphaC 1; }
f18{dSph 2.022E-07; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 2.022E-07; Df 1.8; alphaC 1; }
f19{dSph 2.916E-07; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 2.916E-07; Df 1.8; alphaC 1; }
f20{dSph 4.206E-07; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 4.206E-07; Df 1.8; alphaC 1; }
f21{dSph 6.066E-07; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 6.066E-07; Df 1.8; alphaC 1; }
f22{dSph 8.748E-07; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 8.748E-07; Df 1.8; alphaC 1; }
f23{dSph 1.262E-06; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 1.262E-06; Df 1.8; alphaC 1; }
f24{dSph 1.820E-06; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 1.820E-06; Df 1.8; alphaC 1; }
f25{dSph 2.624E-06; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 2.624E-06; Df 1.8; alphaC 1; }
f26{dSph 3.785E-06; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 3.785E-06; Df 1.8; alphaC 1; }
f27{dSph 5.459E-06; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 5.459E-06; Df 1.8; alphaC 1; }
f28{dSph 7.873E-06; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 7.873E-06; Df 1.8; alphaC 1; }
f29{dSph 1.136E-05; value 0.0; kappa 1.5E+10; Df 1.8; alphaC 1;} { dSph 1.136E-05; Df 1.8; alphaC 1; }
); );
} }

Some files were not shown because too many files have changed in this diff Show More