multiphaseEulerFoam: Minor fixes to population balance function objects
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
This commit is contained in:
@ -736,7 +736,7 @@ Foam::functionObjects::moments::moments
|
||||
coordinateType_(coordinateTypeNames_.read(dict.lookup("coordinateType"))),
|
||||
weightType_
|
||||
(
|
||||
dict.found("weight")
|
||||
dict.found("weightType")
|
||||
? weightTypeNames_.read(dict.lookup("weightType"))
|
||||
: weightType::numberConcentration
|
||||
),
|
||||
|
||||
@ -232,10 +232,10 @@ public:
|
||||
return wordList::null();
|
||||
}
|
||||
|
||||
//- Calculate the force fields
|
||||
//- Calculate the moment fields
|
||||
virtual bool execute();
|
||||
|
||||
//- Write the force fields
|
||||
//- Write the moment fields
|
||||
virtual bool write();
|
||||
|
||||
|
||||
|
||||
@ -428,31 +428,18 @@ bool Foam::functionObjects::sizeDistribution::write()
|
||||
|| functionType_ == functionType::areaDensity
|
||||
)
|
||||
{
|
||||
boundaryValues.first() = coordinateValues.first();
|
||||
boundaryValues.last() = coordinateValues.last();
|
||||
|
||||
for (label i = 1; i < boundaryValues.size() - 1; i++)
|
||||
{
|
||||
boundaryValues[i] =
|
||||
0.5*(coordinateValues[i] + coordinateValues[i-1]);
|
||||
}
|
||||
|
||||
if (logTransform_)
|
||||
{
|
||||
boundaryValues.first() = Foam::log(coordinateValues.first());
|
||||
boundaryValues.last() = Foam::log(coordinateValues.last());
|
||||
|
||||
for (label i = 1; i < boundaryValues.size() - 1; i++)
|
||||
{
|
||||
boundaryValues[i] =
|
||||
0.5
|
||||
*(
|
||||
Foam::log(coordinateValues[i])
|
||||
+ Foam::log(coordinateValues[i-1])
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
boundaryValues.first() = coordinateValues.first();
|
||||
boundaryValues.last() = coordinateValues.last();
|
||||
|
||||
for (label i = 1; i < boundaryValues.size() - 1; i++)
|
||||
{
|
||||
boundaryValues[i] =
|
||||
(coordinateValues[i] + coordinateValues[i-1])/2;
|
||||
}
|
||||
boundaryValues = Foam::log(boundaryValues);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ weightType numberConcentration; // volumeConcentration,
|
||||
// areaConcentration
|
||||
// defaults to numberConcentration
|
||||
order 0; // relevant for integer moments only
|
||||
mean arithmetic; // geometric
|
||||
meanType arithmetic; // geometric
|
||||
// relevant for non-integer moments,
|
||||
// defaults to arithmetic
|
||||
|
||||
|
||||
Reference in New Issue
Block a user