Merge branch 'PhasicFlow:main' into main

This commit is contained in:
Wenxuan XU 2025-04-25 23:00:10 +08:00 committed by GitHub
commit 1cd64fb2ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
142 changed files with 3668 additions and 1638 deletions

View File

@ -24,7 +24,7 @@ Licence:
#include "types.hpp"
#include "span.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
template<typename T>

View File

@ -26,20 +26,18 @@ Licence:
#include "fieldFunctions.hpp"
#include "dictionary.hpp"
namespace pFlow
{
bool pointFieldGetType(const word& TYPENAME, word& fieldType, word& fieldSpace);
}
bool pFlow::fieldsDataBase::loadPointStructureToTime()
bool pFlow::postprocessData::fieldsDataBase::loadPointStructureToTime()
{
return false;
}
bool pFlow::fieldsDataBase::checkForUpdate(const word &compoundName, bool forceUpdate)
bool pFlow::postprocessData::fieldsDataBase::checkForUpdate
(
const word &compoundName,
bool forceUpdate
)
{
auto t = currentTime();
bool shouldUpdate = false;
@ -58,7 +56,10 @@ bool pFlow::fieldsDataBase::checkForUpdate(const word &compoundName, bool forceU
return shouldUpdate;
}
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetRealField(const word &name)
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetRealField
(
const word &name
)
{
bool shouldUpdate = checkForUpdate(name);
@ -83,7 +84,10 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetRealField(const word
field.size());
}
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetVolume(bool forceUpdate)
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetVolume
(
bool forceUpdate
)
{
const word fName = "volume";
bool shouldUpdate = checkForUpdate(fName, forceUpdate);
@ -119,7 +123,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetVolume(bool forceUpda
}
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetDensity(bool forceUpdate)
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetDensity(bool forceUpdate)
{
const word fName = "density";
@ -155,7 +159,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetDensity(bool forceUpd
field.size());
}
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetOne(bool forceUpdate)
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetOne(bool forceUpdate)
{
const word fName = "one";
@ -182,7 +186,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetOne(bool forceUpdate)
field.size());
}
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetMass(bool forceUpdate)
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetMass(bool forceUpdate)
{
const word fName = "mass";
@ -218,7 +222,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetMass(bool forceUpdate
field.size());
}
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetI(bool forceUpdate)
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetI(bool forceUpdate)
{
const word fName = "I";
@ -254,7 +258,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetI(bool forceUpdate)
field.size());
}
bool pFlow::fieldsDataBase::findFunction(
bool pFlow::postprocessData::fieldsDataBase::findFunction(
const word &compoundFieldName,
word &fieldName,
fieldsDataBase::Functions &func)
@ -360,7 +364,7 @@ bool pFlow::fieldsDataBase::findFunction(
return false; // No match
}
bool pFlow::fieldsDataBase::inputOutputType
bool pFlow::postprocessData::fieldsDataBase::inputOutputType
(
fieldsDataBase::Functions func,
const word &inputType,
@ -458,7 +462,7 @@ bool pFlow::fieldsDataBase::inputOutputType
return false;
}
pFlow::fieldsDataBase::fieldsDataBase
pFlow::postprocessData::fieldsDataBase::fieldsDataBase
(
systemControl& control,
const dictionary& postDict,
@ -488,12 +492,12 @@ pFlow::fieldsDataBase::fieldsDataBase
}
}
pFlow::timeValue pFlow::fieldsDataBase::currentTime() const
pFlow::timeValue pFlow::postprocessData::fieldsDataBase::currentTime() const
{
return time_.currentTime();
}
bool pFlow::fieldsDataBase::getFieldTypeNameFunction
bool pFlow::postprocessData::fieldsDataBase::getFieldTypeNameFunction
(
const word& compoundName,
word& pointFieldName,
@ -543,7 +547,7 @@ bool pFlow::fieldsDataBase::getFieldTypeNameFunction
return true;
}
bool pFlow::fieldsDataBase::getFieldType
bool pFlow::postprocessData::fieldsDataBase::getFieldType
(
const word& compoundName,
word& originalType,
@ -559,7 +563,7 @@ bool pFlow::fieldsDataBase::getFieldType
return true;
}
bool pFlow::fieldsDataBase::getFieldType
bool pFlow::postprocessData::fieldsDataBase::getFieldType
(
const word &compoundName,
word &typeAfterFunction
@ -575,7 +579,7 @@ bool pFlow::fieldsDataBase::getFieldType
return true;
}
pFlow::span<pFlow::realx3> pFlow::fieldsDataBase::updatePoints(bool forceUpdate)
pFlow::span<pFlow::realx3> pFlow::postprocessData::fieldsDataBase::updatePoints(bool forceUpdate)
{
const word fName = "position";
bool shouldUpdate = checkForUpdate(fName, forceUpdate);
@ -604,7 +608,7 @@ pFlow::span<pFlow::realx3> pFlow::fieldsDataBase::updatePoints(bool forceUpdate)
}
pFlow::span<pFlow::realx3> pFlow::fieldsDataBase::updateFieldRealx3
pFlow::span<pFlow::realx3> pFlow::postprocessData::fieldsDataBase::updateFieldRealx3
(
const word &compoundName,
bool forceUpdate
@ -640,7 +644,7 @@ pFlow::span<pFlow::realx3> pFlow::fieldsDataBase::updateFieldRealx3
}
pFlow::span<pFlow::realx4> pFlow::fieldsDataBase::updateFieldRealx4
pFlow::span<pFlow::realx4> pFlow::postprocessData::fieldsDataBase::updateFieldRealx4
(
const word &compoundName,
bool forceUpdate
@ -676,7 +680,7 @@ pFlow::span<pFlow::realx4> pFlow::fieldsDataBase::updateFieldRealx4
}
pFlow::span<pFlow::real> pFlow::fieldsDataBase::updateFieldReal
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::updateFieldReal
(
const word &compoundName,
bool forceUpdate
@ -843,7 +847,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::updateFieldReal
return span<real>(nullptr, 0);
}
pFlow::span<pFlow::uint32> pFlow::fieldsDataBase::updateFieldUint32
pFlow::span<pFlow::uint32> pFlow::postprocessData::fieldsDataBase::updateFieldUint32
(
const word& name,
bool forceUpdate
@ -852,7 +856,7 @@ pFlow::span<pFlow::uint32> pFlow::fieldsDataBase::updateFieldUint32
return updateField<uint32>(name, forceUpdate);
}
pFlow::allPointFieldTypes pFlow::fieldsDataBase::updateFieldAll
pFlow::postprocessData::allPointFieldTypes pFlow::postprocessData::fieldsDataBase::updateFieldAll
(
const word &compoundName,
bool forceUpdate
@ -888,10 +892,24 @@ pFlow::allPointFieldTypes pFlow::fieldsDataBase::updateFieldAll
}
}
bool pFlow::postprocessData::fieldsDataBase::pointFieldGetType
(
const word& TYPENAME,
word& fieldType,
word& fieldSpace
)
{
std::regex match("pointField\\<([A-Za-z1-9_]*)\\,([A-Za-z1-9_]*)\\>");
std::smatch search;
if(!std::regex_match(TYPENAME, search, match)) return false;
if(search.size()!= 3) return false;
fieldType = search[1];
fieldSpace = search[2];
return true;
}
pFlow::uniquePtr<pFlow::fieldsDataBase>
pFlow::fieldsDataBase::create
pFlow::uniquePtr<pFlow::postprocessData::fieldsDataBase>
pFlow::postprocessData::fieldsDataBase::create
(
systemControl& control,
const dictionary& postDict,
@ -931,14 +949,5 @@ pFlow::uniquePtr<pFlow::fieldsDataBase>
return nullptr;
}
bool pFlow::pointFieldGetType(const word& TYPENAME, word& fieldType, word& fieldSpace)
{
std::regex match("pointField\\<([A-Za-z1-9_]*)\\,([A-Za-z1-9_]*)\\>");
std::smatch search;
if(!std::regex_match(TYPENAME, search, match)) return false;
if(search.size()!= 3) return false;
fieldType = search[1];
fieldSpace = search[2];
return true;
}

View File

@ -29,13 +29,15 @@ Licence:
#include "Map.hpp"
#include "shape.hpp"
namespace pFlow
{
class dictionary;
class systemControl;
class Time;
}
class dictionary;
class systemControl;
class Time;
namespace pFlow::postprocessData
{
class fieldsDataBase
@ -302,6 +304,12 @@ public:
{
return -1.0;
}
static
bool pointFieldGetType(
const word& TYPENAME,
word& fieldType,
word& fieldSpace);
static
uniquePtr<fieldsDataBase> create(
@ -311,7 +319,7 @@ public:
timeValue startTime);
};
} // namespace pFlow
} // namespace pFlow::postprocessData
#include "fieldsDataBaseTemplates.cpp"

View File

@ -9,7 +9,7 @@
#include "types.hpp"
#include "span.hpp"
namespace pFlow
namespace pFlow::postprocessData
{

View File

@ -23,9 +23,9 @@ Licence:
#include "fieldsDataBase.hpp"
template<pFlow::ValidFieldType T>
template<pFlow::postprocessData::ValidFieldType T>
inline
pFlow::span<T> pFlow::fieldsDataBase::updateField(const word& name, bool forceUpdate)
pFlow::span<T> pFlow::postprocessData::fieldsDataBase::updateField(const word& name, bool forceUpdate)
{
bool shouldUpdate = checkForUpdate(name, forceUpdate);
@ -40,8 +40,8 @@ pFlow::span<T> pFlow::fieldsDataBase::updateField(const word& name, bool forceUp
{
if( loadPointFieldToTime(name) )
{
const auto& pField = time_.lookupObject<pointField_D<T>>(name);
allFields_.emplaceBackOrReplace<FieldTypeHost<T>>(
const auto& pField = time_.template lookupObject<pointField_D<T>>(name);
allFields_.template emplaceBackOrReplace<FieldTypeHost<T>>(
name,
pField.activeValuesHost());
}
@ -63,9 +63,9 @@ pFlow::span<T> pFlow::fieldsDataBase::updateField(const word& name, bool forceUp
}
template<pFlow::ValidFieldType T>
template<pFlow::postprocessData::ValidFieldType T>
inline
pFlow::span<T> pFlow::fieldsDataBase::updateReservedField
pFlow::span<T> pFlow::postprocessData::fieldsDataBase::updateReservedField
(
const word& name,
bool forceUpdate

View File

@ -3,38 +3,38 @@
#include "dynamicPointStructure.hpp"
#include "vocabs.hpp"
namespace pFlow
{
bool pointFieldGetType(const word& TYPENAME, word& fieldType, word& fieldSpace);
}
bool pFlow::simulationFieldsDataBase::pointFieldNameExists(const word &name) const
bool pFlow::postprocessData::simulationFieldsDataBase::pointFieldNameExists(const word &name) const
{
return time().lookupObjectName(name);
}
bool pFlow::simulationFieldsDataBase::loadPointFieldToTime(const word &name)
bool pFlow::postprocessData::simulationFieldsDataBase::loadPointFieldToTime(const word &name)
{
return time().lookupObjectName(name);
}
bool pFlow::simulationFieldsDataBase::loadPointStructureToTime()
bool pFlow::postprocessData::simulationFieldsDataBase::loadPointStructureToTime()
{
// it is already in the Time object
return time().lookupObjectName(pointStructureFile__);
}
const pFlow::shape& pFlow::simulationFieldsDataBase::getShape() const
const pFlow::shape& pFlow::postprocessData::simulationFieldsDataBase::getShape() const
{
return shape_;
}
pFlow::word pFlow::simulationFieldsDataBase::getPointFieldType(const word &name) const
pFlow::word pFlow::postprocessData::simulationFieldsDataBase::getPointFieldType
(
const word &name
) const
{
word pfType = time().lookupObjectTypeName(name);
word type, space;
if(!pointFieldGetType(pfType, type, space))
if(!fieldsDataBase::pointFieldGetType(pfType, type, space))
{
fatalErrorInFunction
<<"Error in retriving the type of pointField "
@ -44,7 +44,7 @@ pFlow::word pFlow::simulationFieldsDataBase::getPointFieldType(const word &name)
return type;
}
pFlow::simulationFieldsDataBase::simulationFieldsDataBase
pFlow::postprocessData::simulationFieldsDataBase::simulationFieldsDataBase
(
systemControl &control,
const dictionary& postDict,
@ -60,7 +60,7 @@ pFlow::simulationFieldsDataBase::simulationFieldsDataBase
{
}
const pFlow::pointStructure &pFlow::simulationFieldsDataBase::pStruct() const
const pFlow::pointStructure &pFlow::postprocessData::simulationFieldsDataBase::pStruct() const
{
return
static_cast<const pointStructure&>

View File

@ -23,7 +23,7 @@ Licence:
#include "fieldsDataBase.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
class simulationFieldsDataBase

View File

@ -1,6 +1,9 @@
#include "PostprocessOperationAvMassVelocity.hpp"
pFlow::PostprocessOperationAvMassVelocity::PostprocessOperationAvMassVelocity
namespace pFlow::postprocessData
{
PostprocessOperationAvMassVelocity::PostprocessOperationAvMassVelocity
(
const dictionary &opDict,
const regionPoints &regPoints,
@ -17,4 +20,6 @@ pFlow::PostprocessOperationAvMassVelocity::PostprocessOperationAvMassVelocity
fieldsDB
)
{
}
}

View File

@ -132,7 +132,7 @@ Licence:
#include "regionField.hpp"
#include "includeMask.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
@ -168,6 +168,6 @@ public:
};
}
} // namespace pFlow::postprocessData
#endif //__PostprocessOperationAvMassVelocity_hpp__

View File

@ -3,8 +3,11 @@
#include "fieldsDataBase.hpp"
#include "operationFunctions.hpp"
namespace pFlow::postprocessData
{
/// Constructs average processor and initializes result field based on input field type
pFlow::PostprocessOperationAverage::PostprocessOperationAverage
PostprocessOperationAverage::PostprocessOperationAverage
(
const dictionary &opDict,
const regionPoints &regPoints,
@ -39,7 +42,7 @@ pFlow::PostprocessOperationAverage::PostprocessOperationAverage
}
}
pFlow::PostprocessOperationAverage::PostprocessOperationAverage
PostprocessOperationAverage::PostprocessOperationAverage
(
const dictionary &opDict,
const word &fieldName,
@ -77,8 +80,9 @@ pFlow::PostprocessOperationAverage::PostprocessOperationAverage
}
}
/// Performs weighted average of field values within each region
bool pFlow::PostprocessOperationAverage::execute
bool PostprocessOperationAverage::execute
(
const std::vector<span<real>>& weights,
const regionField<real>& volFactor
@ -109,7 +113,7 @@ bool pFlow::PostprocessOperationAverage::execute
allField)
);
if(calculateFluctuation2_)
if(calculateFluctuation2_())
{
auto& processedRegField = processedRegFieldPtr_();
fluctuation2FieldPtr_ = makeUnique<processedRegFieldType>
@ -137,4 +141,41 @@ bool pFlow::PostprocessOperationAverage::execute
return true;
}
}
bool PostprocessOperationAverage::write(const fileSystem &parDir) const
{
if(! postprocessOperation::write(parDir))
{
return false;
}
if(!calculateFluctuation2_())
{
return true;
}
auto ti = time().TimeInfo();
if(!os2Ptr_)
{
fileSystem path = parDir+(
processedFieldName()+"_prime2" + ".Start_" + ti.timeName());
os2Ptr_ = makeUnique<oFstream>(path);
regPoints().write(os2Ptr_());
}
std::visit
(
[&](auto&& arg)->bool
{
return writeField(os2Ptr_(), ti.t(), arg, threshold());
},
fluctuation2FieldPtr_()
);
return true;
}
} // namespace pFlow::postprocessData

View File

@ -132,10 +132,9 @@ Licence:
#include "regionField.hpp"
#include "includeMask.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
class PostprocessOperationAverage
:
public postprocessOperation
@ -150,6 +149,9 @@ private:
uniquePtr<processedRegFieldType> fluctuation2FieldPtr_ = nullptr;
/// Pointer to the output stream for writing fluctuation2 results
mutable uniquePtr<oFstream> os2Ptr_ = nullptr;
public:
TypeInfo("PostprocessOperation<average>");
@ -190,6 +192,10 @@ public:
return processedRegFieldPtr_();
}
/// write to os stream
bool write(const fileSystem &parDir)const override;
/// @brief Execute average operation on field values
/// @param weights Weight factors for particles
/// @return True if successful
@ -200,6 +206,6 @@ public:
};
}
} // namespace pFlow::postprocessData
#endif //__PostprocessOperationAverage_hpp__

View File

@ -3,8 +3,11 @@
#include "fieldsDataBase.hpp"
#include "operationFunctions.hpp"
namespace pFlow::postprocessData
{
/// Constructs sum processor and initializes result field based on input field type
pFlow::PostprocessOperationSum::PostprocessOperationSum
PostprocessOperationSum::PostprocessOperationSum
(
const dictionary &opDict,
const regionPoints &regPoints,
@ -39,7 +42,7 @@ pFlow::PostprocessOperationSum::PostprocessOperationSum
}
/// Performs weighted sum of field values within each region
bool pFlow::PostprocessOperationSum::execute
bool PostprocessOperationSum::execute
(
const std::vector<span<real>>& weights,
const regionField<real>& volFactor
@ -72,3 +75,6 @@ bool pFlow::PostprocessOperationSum::execute
return true;
}
}

View File

@ -129,7 +129,7 @@ Licence:
#include "regionField.hpp"
#include "includeMask.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
@ -182,6 +182,6 @@ public:
};
}
} // namespace pFlow::postprocessData
#endif //__PostprocessOperationSum_hpp__

View File

@ -28,7 +28,7 @@ Licence:
#include "regionField.hpp"
#include "includeMask.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
template<typename T>
@ -190,6 +190,6 @@ regionField<T> executeFluctuation2Operation
return processedField;
}
} // namespace pFlow
} // namespace pFlow::postprocessData
#endif //__operationFunctions_hpp__

View File

@ -61,7 +61,7 @@ Licence:
#include "Time.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
template<typename T, typename Operator>
@ -270,7 +270,7 @@ public:
};
} // pFlow
} // pFlow::postprocessData
#endif //__IncludeMask_hpp__

View File

@ -20,31 +20,34 @@ Licence:
#include "IncludeMask.hpp"
namespace pFlow::postprocessData
{
// real
template class pFlow::IncludeMask<pFlow::real, pFlow::compareOne<pFlow::real, pFlow::lessThanOp> >;
template class pFlow::IncludeMask<pFlow::real, pFlow::compareOne<pFlow::real, pFlow::lessThanEqOp> >;
template class IncludeMask<real, compareOne<real, lessThanOp> >;
template class IncludeMask<real, compareOne<real, lessThanEqOp> >;
template class pFlow::IncludeMask<pFlow::real, pFlow::compareOne<pFlow::real, pFlow::greaterThanOp> >;
template class pFlow::IncludeMask<pFlow::real, pFlow::compareOne<pFlow::real, pFlow::greaterThanEqOp> >;
template class IncludeMask<real, compareOne<real, greaterThanOp> >;
template class IncludeMask<real, compareOne<real, greaterThanEqOp> >;
template class pFlow::IncludeMask<pFlow::real, pFlow::compareOne<pFlow::real, pFlow::equalOp> >;
template class IncludeMask<real, compareOne<real, equalOp> >;
template class pFlow::IncludeMask<pFlow::real, pFlow::compareTwo<pFlow::real, pFlow::betweenOp> >;
template class pFlow::IncludeMask<pFlow::real, pFlow::compareTwo<pFlow::real, pFlow::betweenEqOp> >;
template class IncludeMask<real, compareTwo<real, betweenOp> >;
template class IncludeMask<real, compareTwo<real, betweenEqOp> >;
template class pFlow::IncludeMask<pFlow::real, pFlow::allOp<pFlow::real>>;
template class IncludeMask<real, allOp<real>>;
// realx3
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareOne<pFlow::realx3, pFlow::lessThanOp> >;
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareOne<pFlow::realx3, pFlow::lessThanEqOp> >;
template class IncludeMask<realx3, compareOne<realx3, lessThanOp> >;
template class IncludeMask<realx3, compareOne<realx3, lessThanEqOp> >;
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareOne<pFlow::realx3, pFlow::greaterThanOp> >;
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareOne<pFlow::realx3, pFlow::greaterThanEqOp> >;
template class IncludeMask<realx3, compareOne<realx3, greaterThanOp> >;
template class IncludeMask<realx3, compareOne<realx3, greaterThanEqOp> >;
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareOne<pFlow::realx3, pFlow::equalOp> >;
template class IncludeMask<realx3, compareOne<realx3, equalOp> >;
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareTwo<pFlow::realx3, pFlow::betweenOp> >;
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareTwo<pFlow::realx3, pFlow::betweenEqOp> >;
template class IncludeMask<realx3, compareTwo<realx3, betweenOp> >;
template class IncludeMask<realx3, compareTwo<realx3, betweenEqOp> >;
// realx4
} // postprocessData

View File

@ -24,7 +24,10 @@ Licence:
#include "fieldsDataBase.hpp"
pFlow::includeMask::includeMask
namespace pFlow::postprocessData
{
includeMask::includeMask
(
const dictionary& dict,
fieldsDataBase& fieldDB
@ -33,7 +36,7 @@ pFlow::includeMask::includeMask
database_(fieldDB)
{}
pFlow::includeMask::includeMask
includeMask::includeMask
(
const word &type,
const dictionary &opDict,
@ -44,7 +47,7 @@ pFlow::includeMask::includeMask
{
}
pFlow::uniquePtr<pFlow::includeMask> pFlow::includeMask::create
uniquePtr<includeMask> includeMask::create
(
const dictionary& opDict,
fieldsDataBase& fieldsDB
@ -97,8 +100,7 @@ pFlow::uniquePtr<pFlow::includeMask> pFlow::includeMask::create
return nullptr;
}
pFlow::uniquePtr<pFlow::includeMask>
pFlow::includeMask::create
uniquePtr<includeMask> includeMask::create
(
const word &type,
const dictionary &opDict,
@ -150,3 +152,5 @@ pFlow::uniquePtr<pFlow::includeMask>
}
return nullptr;
}
}

View File

@ -47,11 +47,15 @@ Licence:
#include "virtualConstructor.hpp"
namespace pFlow
{
class dictionary;
}
namespace pFlow::postprocessData
{
// forward declaration
class fieldsDataBase;
class dictionary;
class includeMask
@ -188,7 +192,7 @@ public:
} // pFlow
} // pFlow::postprocessData
#endif //__IncludeMask_hpp__

View File

@ -24,7 +24,7 @@ Licence:
#include "types.hpp"
#include "dictionary.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
template<typename T>
@ -176,6 +176,6 @@ public:
}
};
}
} // namespace pFlow::postprocessData
#endif //__maskOperation_hpp__

View File

@ -23,66 +23,11 @@ Licence:
#include "regionPoints.hpp"
#include "fieldsDataBase.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
template<typename T>
inline
bool writeField
(
iOstream& os,
timeValue t,
const regionField<T> field,
uint32 threshold,
const T& defValue=T{}
)
{
const auto& regPoints = field.regPoints();
const uint32 n = field.size();
os<<t<<tab;
for(uint32 i=0; i<n; i++)
{
auto numPar = regPoints.indices(i).size();
if(numPar >= threshold)
{
if constexpr(std::is_same_v<T,realx3>)
{
os<<field[i].x()<<' '<<field[i].y()<<' '<<field[i].z()<<tab;
}
else if constexpr( std::is_same_v<T,realx4>)
{
os << field[i].x() << ' ' << field[i].y() << ' ' << field[i].z() << ' ' << field[i].w() << tab;
}
else
{
os<<field[i]<<tab;
}
}
else
{
if constexpr(std::is_same_v<T,realx3>)
{
os<<defValue.x()<<' '<<defValue.y()<<' '<<defValue.z()<<tab;
}
else if constexpr( std::is_same_v<T,realx4>)
{
os << defValue.x() << ' ' << defValue.y() << ' ' << defValue.z() << ' ' << defValue.w() << tab;
}
else
{
os<<defValue<<tab;
}
}
}
os<<endl;
return true;
}
}
pFlow::postprocessOperation::postprocessOperation
postprocessOperation::postprocessOperation
(
const dictionary &opDict,
const regionPoints& regPoints,
@ -100,7 +45,7 @@ pFlow::postprocessOperation::postprocessOperation
)
{}
pFlow::postprocessOperation::postprocessOperation
postprocessOperation::postprocessOperation
(
const dictionary &opDict,
const word &fieldName,
@ -147,12 +92,12 @@ pFlow::postprocessOperation::postprocessOperation
fatalExit;
}
}
const pFlow::Time& pFlow::postprocessOperation::time() const
const Time& postprocessOperation::time() const
{
return database_.time();
}
bool pFlow::postprocessOperation::write(const fileSystem &parDir) const
bool postprocessOperation::write(const fileSystem &parDir) const
{
auto ti = time().TimeInfo();
@ -179,11 +124,12 @@ bool pFlow::postprocessOperation::write(const fileSystem &parDir) const
return true;
}
pFlow::uniquePtr<pFlow::postprocessOperation>
pFlow::postprocessOperation::create(
uniquePtr<postprocessOperation> postprocessOperation::create
(
const dictionary &opDict,
const regionPoints &regPoints,
fieldsDataBase &fieldsDB)
fieldsDataBase &fieldsDB
)
{
word func = opDict.getVal<word>("function");
word method = angleBracketsNames("PostprocessOperation", func);
@ -209,3 +155,5 @@ pFlow::postprocessOperation::create(
return nullptr;
}
}
}

View File

@ -76,23 +76,19 @@ Licence:
#include "oFstream.hpp"
#include "regionField.hpp"
#include "includeMask.hpp"
#include "postprocessOperationFunctions.hpp"
namespace pFlow
{
class Time;
}
/// Type alias for processed region field types.
/// Only regionField<real>, regionField<realx3>, and regionField<realx4> are supported
/// in the postprocessOperation class.
using processedRegFieldType = std::variant
<
regionField<real>,
regionField<realx3>,
regionField<realx4>
>;
namespace pFlow::postprocessData
{
/// - forward declaration
class fieldsDataBase;
class Time;
class postprocessOperation
{
@ -103,7 +99,7 @@ public:
private:
/// Dictionary containing operation-specific parameters.
dictionary operationDict_;
pFlow::dictionary operationDict_;
/// This Threshold is used to exclude the regions which contain
/// fewer than this value.
@ -273,6 +269,6 @@ public:
};
}
} // namespace pFlow::postprocessData
#endif //__postprocessOperation_hpp__

View File

@ -0,0 +1,100 @@
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#ifndef __postprocessOperationFunctions_hpp__
#define __postprocessOperationFunctions_hpp__
#include <variant>
#include "types.hpp"
#include "iOstream.hpp"
#include "regionField.hpp"
namespace pFlow::postprocessData
{
/// Type alias for processed region field types.
/// Only regionField<real>, regionField<realx3>, and regionField<realx4> are supported
/// in the postprocessOperation class.
using processedRegFieldType = std::variant
<
regionField<real>,
regionField<realx3>,
regionField<realx4>
>;
template<typename T>
inline
bool writeField
(
iOstream& os,
timeValue t,
const regionField<T> field,
uint32 threshold,
const T& defValue=T{}
)
{
const auto& regPoints = field.regPoints();
const uint32 n = field.size();
os<<t<<tab;
for(uint32 i=0; i<n; i++)
{
auto numPar = regPoints.indices(i).size();
if(numPar >= threshold)
{
if constexpr(std::is_same_v<T,realx3>)
{
os<<field[i].x()<<' '<<field[i].y()<<' '<<field[i].z()<<tab;
}
else if constexpr( std::is_same_v<T,realx4>)
{
os << field[i].x() << ' ' << field[i].y() << ' ' << field[i].z() << ' ' << field[i].w() << tab;
}
else
{
os<<field[i]<<tab;
}
}
else
{
if constexpr(std::is_same_v<T,realx3>)
{
os<<defValue.x()<<' '<<defValue.y()<<' '<<defValue.z()<<tab;
}
else if constexpr( std::is_same_v<T,realx4>)
{
os << defValue.x() << ' ' << defValue.y() << ' ' << defValue.z() << ' ' << defValue.w() << tab;
}
else
{
os<<defValue<<tab;
}
}
}
os<<endl;
return true;
}
} // namespace pFlow::postprocessData
#endif //__postprocessOperationFunctions_hpp__

View File

@ -20,7 +20,7 @@ Licence:
-----------------------------------------------------------------------------*/
template<typename RegionType, typename ProcessMethodType>
pFlow::PostprocessComponent<RegionType,ProcessMethodType>::PostprocessComponent
pFlow::postprocessData::PostprocessComponent<RegionType,ProcessMethodType>::PostprocessComponent
(
const dictionary& dict,
fieldsDataBase& fieldsDB,
@ -61,7 +61,7 @@ pFlow::PostprocessComponent<RegionType,ProcessMethodType>::PostprocessComponent
template <typename RegionType, typename ProcessMethodType>
bool pFlow::PostprocessComponent<RegionType, ProcessMethodType>::execute
bool pFlow::postprocessData::PostprocessComponent<RegionType, ProcessMethodType>::execute
(
const timeInfo &ti,
bool forceUpdate
@ -129,7 +129,7 @@ bool pFlow::PostprocessComponent<RegionType, ProcessMethodType>::execute
template <typename RegionType, typename ProcessMethodType>
inline
bool pFlow::PostprocessComponent<RegionType, ProcessMethodType>::write
bool pFlow::postprocessData::PostprocessComponent<RegionType, ProcessMethodType>::write
(
const fileSystem &parDir
) const

View File

@ -32,7 +32,7 @@ Licence:
#include "regionPoints.hpp"
#include "regionField.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
template<typename RegionType, typename ProcessMethodType>

View File

@ -24,7 +24,7 @@ Licence:
#include "PostprocessComponent.hpp"
#include "arithmetic.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
template<typename RegionType>

View File

@ -25,7 +25,7 @@ Licence:
#include "GaussianDistribution.hpp"
#include "numericConstants.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
template<typename RegionType>

View File

@ -24,7 +24,7 @@ Licence:
#include "PostprocessComponent.hpp"
#include "uniformDistribution.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
template<typename RegionType>

View File

@ -27,16 +27,18 @@ Licence:
#include "lineRegionPoints.hpp"
#include "multipleSpheresRegionPoints.hpp"
namespace pFlow::postprocessData
{
template class PostprocessComponentGaussian<sphereRegionPoints>;
template class PostprocessComponentUniform<sphereRegionPoints>;
template class PostprocessComponentArithmetic<sphereRegionPoints>;
template class pFlow::PostprocessComponentGaussian<pFlow::sphereRegionPoints>;
template class pFlow::PostprocessComponentUniform<pFlow::sphereRegionPoints>;
template class pFlow::PostprocessComponentArithmetic<pFlow::sphereRegionPoints>;
template class PostprocessComponentGaussian<multipleSpheresRegionPoints>;
template class PostprocessComponentUniform<multipleSpheresRegionPoints>;
template class PostprocessComponentArithmetic<multipleSpheresRegionPoints>;
template class pFlow::PostprocessComponentGaussian<pFlow::multipleSpheresRegionPoints>;
template class pFlow::PostprocessComponentUniform<pFlow::multipleSpheresRegionPoints>;
template class pFlow::PostprocessComponentArithmetic<pFlow::multipleSpheresRegionPoints>;
template class pFlow::PostprocessComponentGaussian<pFlow::lineRegionPoints>;
template class pFlow::PostprocessComponentUniform<pFlow::lineRegionPoints>;
template class pFlow::PostprocessComponentArithmetic<pFlow::lineRegionPoints>;
template class PostprocessComponentGaussian<lineRegionPoints>;
template class PostprocessComponentUniform<lineRegionPoints>;
template class PostprocessComponentArithmetic<lineRegionPoints>;
}

View File

@ -1,7 +1,27 @@
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#include "particleProbePostprocessComponent.hpp"
#include "Time.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
template<typename T>
@ -62,7 +82,7 @@ inline bool writeField
}
pFlow::particleProbePostprocessComponent::particleProbePostprocessComponent
pFlow::postprocessData::particleProbePostprocessComponent::particleProbePostprocessComponent
(
const dictionary &dict,
fieldsDataBase &fieldsDB,
@ -81,7 +101,7 @@ pFlow::particleProbePostprocessComponent::particleProbePostprocessComponent
name_(dict.name())
{}
bool pFlow::particleProbePostprocessComponent::execute
bool pFlow::postprocessData::particleProbePostprocessComponent::execute
(
const timeInfo &ti,
bool forceExecute
@ -126,7 +146,7 @@ bool pFlow::particleProbePostprocessComponent::execute
}
bool pFlow::particleProbePostprocessComponent::write(const fileSystem& parDir)const
bool pFlow::postprocessData::particleProbePostprocessComponent::write(const fileSystem& parDir)const
{
if(! executed_ ) return true;

View File

@ -27,7 +27,7 @@ Licence:
#include "regionField.hpp"
#include "oFstream.hpp"
namespace pFlow
namespace pFlow::postprocessData
{

View File

@ -1,9 +1,29 @@
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#include "postprocessComponent.hpp"
#include "fieldsDataBase.hpp"
#include "Time.hpp"
pFlow::postprocessComponent::postprocessComponent
pFlow::postprocessData::postprocessComponent::postprocessComponent
(
const dictionary &dict,
fieldsDataBase &fieldsDB,
@ -23,7 +43,7 @@ pFlow::postprocessComponent::postprocessComponent
}
pFlow::uniquePtr<pFlow::postprocessComponent> pFlow::postprocessComponent::create
pFlow::uniquePtr<pFlow::postprocessData::postprocessComponent> pFlow::postprocessData::postprocessComponent::create
(
const dictionary& dict,
fieldsDataBase& fieldsDB,

View File

@ -25,12 +25,17 @@ Licence:
#include "dictionary.hpp"
#include "virtualConstructor.hpp"
namespace pFlow
namespace
{
class dictionary;
}
namespace pFlow::postprocessData
{
class fieldsDataBase;
class regionPoints;
class dictionary;
class fieldsDataBase;
class postprocessComponent
{
@ -112,6 +117,6 @@ public:
};
} // namespace pFlow
} // namespace pFlow::postprocessData
#endif // __postprocessComponent_hpp__

View File

@ -1,4 +1,3 @@
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
@ -25,7 +24,7 @@ Licence:
#include "postprocessGlobals.hpp"
#include "postprocessComponent.hpp"
pFlow::postprocessData::postprocessData
pFlow::postprocessData::postprocessData::postprocessData
(
const systemControl &control,
timeValue startTime
@ -45,7 +44,7 @@ pFlow::postprocessData::postprocessData
)
)
{
postProcessGlobals::defaultDir__ = CWD()/pFlow::postProcessGlobals::defaultRelDir__;
defaultDir__ = CWD()/defaultRelDir__;
// if dictionary is not provided, no extra action is required.
if( !dict_.fileExist() || !dict_.headerOk() )
@ -98,8 +97,10 @@ pFlow::postprocessData::postprocessData
}
bool pFlow::postprocessData::execute()
bool pFlow::postprocessData::postprocessData::execute()
{
if( inSimulation_ && !activeInSimulation_() ) return true;
const auto& ti = time_.TimeInfo();
for(auto& component:postprocesses_)
@ -116,8 +117,10 @@ bool pFlow::postprocessData::execute()
return true;
}
bool pFlow::postprocessData::write() const
bool pFlow::postprocessData::postprocessData::write() const
{
if( inSimulation_ && !activeInSimulation_() ) return true;
for(auto& component:postprocesses_)
{
if(!component->executed())
@ -125,7 +128,7 @@ bool pFlow::postprocessData::write() const
continue;
}
if(!component->write(postProcessGlobals::defaultDir__/component->name()))
if(!component->write(defaultDir__/component->name()))
{
fatalErrorInFunction
<<"Error occured in writing postprocess component: "
@ -136,7 +139,7 @@ bool pFlow::postprocessData::write() const
return true;
}
void pFlow::postprocessData::setOutputDirectory(const fileSystem &path) const
void pFlow::postprocessData::postprocessData::setOutputDirectory(const fileSystem &path) const
{
postProcessGlobals::defaultDir__ = path;
defaultDir__ = path;
}

View File

@ -28,14 +28,18 @@ Licence:
#include "fieldsDataBase.hpp"
#include "postprocessComponent.hpp"
namespace pFlow
namespace pFlow
{
class systemControl;
class Time;
class timeInfo;
}
namespace pFlow::postprocessData
{
/**
* @class postprocessData
@ -109,6 +113,6 @@ public:
void setOutputDirectory(const fileSystem& path)const;
};
} // namespace pFlow
} // namespace pFlow::postprocessData
#endif // __postprocessData_hpp__

View File

@ -23,7 +23,7 @@ Licence:
#include "fileSystem.hpp"
namespace pFlow::postProcessGlobals
namespace pFlow::postprocessData
{
static fileSystem defaultDir__;

View File

@ -22,9 +22,11 @@ Licence:
#define __postprocessTimeControl_hpp__
#include "baseTimeControl.hpp"
#include "dictionary.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
class postprocessTimeControl
:
public baseTimeControl
@ -60,6 +62,6 @@ postprocessTimeControl(
// Additional methods and members can be added here
};
} // namespace pFlow
} // namespace pFlow::postprocessData
#endif // __postprocessTimeControl_hpp__

View File

@ -28,7 +28,7 @@ Licence:
#include "span.hpp"
#include "numericConstants.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
class GaussianDistribution

View File

@ -32,6 +32,9 @@ namespace pFlow
class dictionary;
namespace postprocessData
{
class arithmetic
{
private:
@ -86,6 +89,8 @@ public:
};
}
} // namespace postprocessData
} // namespace pFlow
#endif //__arithmetic_hpp__

View File

@ -32,6 +32,9 @@ namespace pFlow
class dictionary;
namespace postprocessData
{
class uniformDistribution
{
private:
@ -86,6 +89,8 @@ public:
};
}
} // namespace postprocessData
} // namespace pFlow
#endif //__uniformDistribution_hpp__

View File

@ -0,0 +1,569 @@
# PostprocessData Module in phasicFlow
The `PostprocessData` module in phasicFlow provides powerful tools for analyzing particle-based simulations both during runtime (in-simulation) and after simulation completion (post-simulation). This document explains how to configure and use the postprocessing features through the dictionary-based input system.
- in-simulation: this is postprocessing that is active during simulation. When running a solver, it allows for real-time data analysis and adjustments based on the simulation's current state. See below to see how you can activate in-simulation postprocessing.
- post-simulation: this is postprocessing that is done after the simulation is completed. It allows for detailed analysis of the simulation results, including data extraction and visualization based on the results that are stored in time-folders. If you want to use post-simulation, you need to run utility `postprocessPhasicFlow` in terminal (in the simulation case setup folder) to run the postprocessing. This utility reads the `postprocessDataDict` file and performs the specified operations on the simulation data.
## 1. Overview
Postprocessing in phasicFlow allows you to:
- Extract information about particles in specific regions of the domain
- Calculate statistical properties such as averages and sums of particle attributes
- Track specific particles throughout the simulation
- Apply different weighing methods when calculating statistics
- Perform postprocessing at specific time intervals
## Table of Contents
- [1. Overview](#1-overview)
- [2. Setting Up Postprocessing](#2-setting-up-postprocessing)
- [2.1. Basic Configuration](#21-basic-configuration)
- [3. Time Control Options](#3-time-control-options)
- [4. Processing Methods](#4-processing-methods)
- [5. Region Types](#5-region-types)
- [6. Processing Operations](#6-processing-operations)
- [6.1. Available Functions in average](#61-available-functions-in-average)
- [6.2. About fluctuation2 in average function](#62-about-fluctuation2-in-average-function)
- [6.3. Derived Functions](#63-derived-functions)
- [6.4. Available Fields](#64-available-fields)
- [6.5. Optional Parameters](#65-optional-parameters)
- [7. Examples](#7-examples)
- [7.1. Example 1: Probing Individual Particles](#71-example-1-probing-individual-particles)
- [7.2. Example 2: Processing in a Spherical Region](#72-example-2-processing-in-a-spherical-region)
- [7.3. Example 3: Processing Along a Line](#73-example-3-processing-along-a-line)
- [8. Advanced Features](#8-advanced-features)
- [8.1. Special functions applied on fields](#81-special-functions-applied-on-fields)
- [8.2. Particle Filtering with includeMask](#82-particle-filtering-with-includemask)
- [8.3. Implementation Notes](#83-implementation-notes)
- [9. Mathematical Formulations](#9-mathematical-formulations)
- [10. A complete dictionary file (postprocessDataDict)](#10-a-complete-dictionary-file-postprocessdatadict)
## 2. Setting Up Postprocessing
Postprocessing is configured through a dictionary file named `postprocessDataDict` which should be placed in the `settings` directory. Below is a detailed explanation of the configuration options.
### 2.1. Basic Configuration
The input dictionary, **settings/postprocessDataDict**, may look like this:
```cpp
// PostprocessData dictionary
// Enable/disable postprocessing during simulation
runTimeActive yes; // Options: yes, no
// Shape type - only needed when doing post-simulation processing
shapeType sphere; // Options depend on the simulation type: sphere, grain, etc.
// Default time control for postprocessing components
defaultTimeControl
{
timeControl timeStep; // Options: timeStep, simulationTime, settings
startTime 0; // Start time for postprocessing
endTime 1000; // End time for postprocessing
executionInterval 150; // How frequently to run postprocessing
}
// List of postprocessing components
components
(
// Component definitions here...
);
```
If you want to activate in-simulation postprocessing, you need to add these lines to the `settings/settingsDict` file:
```cpp
libs ("libPostprocessData.so");
auxFunctions postprocessData;
```
This will link the postprocessing library to your simulation, allowing you to use its features. Note that, anytime you want to deactivate the in-simulation postprocessing, you can simply change the `runTimeActive` option to `no` in `postprocessDataDict` file.
## 3. Time Control Options
Each postprocessing component can either use the default time control settings or define its own. There are three main options for time control:
| Option | Description | Required Parameters |
|--------|-------------|---------------------|
| `timeStep` | Controls execution based on simulation time steps | `startTime`, `endTime`, `executionInterval` |
| `simulationTime` | Controls execution based on simulation time | `startTime`, `endTime`, `executionInterval` |
| `settings` | Uses parameters from settingsDict file | None (defined elsewhere) |
| `default` | Uses the default time control settings (uses `defaultTimeControl` settings)| None (uses default) |
If no time control is specified, the `default` option is used automatically.
## 4. Processing Methods
The postprocessing module provides several methods for processing particle data. They are categorized into two main groups: bulk and individual methods.
- **Bulk Methods**: Operate on all particles that are located in a specified locations/regions (cells, spheres, etc.).
- **Individual Methods**: Operate on specific particles, allowing for targeted particle property extraction.
| Method | Property type | Description | Formula |
|--------|------------------|-------------|---------|
| `arithmetic` | bulk | Simple arithmetic mean/sum with equal weights | Each particle contributes equally |
| `uniformDistribution` | bulk | Each particle contributes inversely proportional to the total number of particles | $w_i = 1/n$ where $n$ is the number of particles |
| `GaussianDistribution` | bulk | Weight contribution based on distance from center with Gaussian falloff | $w_i = \exp(-\|x_i - c\|^2/(2\sigma^2))/\sqrt{2\pi\sigma^2}$ |
| `particleProbe` | individual | Extracts values from specific particles | Direct access to particle properties |
## 5. Region Types
Regions define where in the domain the postprocessing operations are applied:
| Region Type | Description | Required Parameters | Compatible with |
|-------------|-------------|---------------------|-----------------|
| `sphere` | A spherical region | `radius`, `center` | bulk |
| `multipleSpheres` | Multiple spherical regions | `centers`, `radii` | bulk |
| `line` | Spheres along a line with specified radius | `p1`, `p2`, `nSpheres`, `radius` | bulk |
| `centerPoints` | Specific particles selected by ID | `ids` | individual |
## 6. Processing Operations
Within each processing region of type `bulk`, you can define multiple operations to be performed:
### 6.1. Available Functions in average
| Function | Property type | Description | Formula | Required Parameters |
|----------|---------------|-------------|---------|---------------------|
| `average` | bulk | Weighted average of particle field values | see Equation 1 | `field`, `phi` (optional), `threshold` (optional), `includeMask` (optional), `divideByVolume` (optional), `fluctuation2` (optional) |
| `sum` | bulk | Weighted sum of particle field values | see Equation 2 | `field`, `phi` (optional),`threshold` (optional), `includeMask` (optional), `divideByVolume` (optional) |
Equation 1:
$$\text{mean} = \frac{\sum_j w_j \cdot \phi_j \cdot \text{field}_j}{\sum_i w_i \cdot \phi_i}$$
Equation 2:
$$\text{sum} = \sum_j w_j \cdot \phi_j \cdot \text{field}_j$$
where:
- $j$ is the index of the particle in the region that also satisfies the `includeMask`
- $i$ is the index of the particle in the region
- $w_j$ is the weight of particle $j$ based on the selected processing method
- $\phi_j$ is the value of the `phi` field for particle $j$ (default is 1)
- $field_j$ is the value of the specified field for particle $j$
### 6.2. About fluctuation2 in average function
Fluctuation2 is an optional parameter that can be used to account for fluctuations in the particle field values with respect to mean value of the field.
It is used in the `average` function to calculate the fluctuation of the field values around the mean. The formula for fluctuation2 is:
$$\text{fluctuation}^2 = \frac{\sum_j w_j \cdot \phi_j \cdot (\text{field}_j - \text{mean})^2}{\sum_i w_i \cdot \phi_i}$$
where:
- `mean`: is the average value of the field in the region.
- `field`: The field to be processed (e.g., `velocity`, `mass`, etc.)
- `fluctuation2`: Optional parameter to account for fluctuations in the particle field values.
### 6.3. Derived Functions
In addition to the above basic functions, some derived functions are available for specific calculations:
| Function | Property type | Description | Formula | Required Parameters |
|----------|---------------|-------------|---------|---------------------|
|`avMassVelocity` | bulk | Average velocity weighted by mass | $\frac{\sum_{i \in \text{region}} w_i \cdot m_i \cdot v_i}{\sum_{i \in \text{region}} w_i \cdot m_i}$ | - |
### 6.4. Available Fields
All the pointFields in the simulation database (for in-simulation processing), or the ones stored in the time folders (for post-simulation processing) can be referenced in the operations. In addition to them, some extra fields are available for use in the operations. The following fields are available for use in the operations:
1. Extra fileds to be used in post-processing operations:
| Field | Field Type | Description | Default Value |
|-------|------------|-------------|---------------|
| `position` | `realx3` | Particle positions | - |
| `one` | `real` | Value 1 for each particle | 1 |
| `mass` | `real` | Particle mass | - |
| `density` | `real` | Particle density | - |
| `volume` | `real` | Particle volume | - |
| `diameter` | `real` | Particle diameter | - |
| `I` | `real` | Moment of inertia | - |
2. Common fields which are available in the simulation database/time folders:
| Field | Field Type | Description |
|-------|------------|-------------|
| `velocity` | `realx3` | Particle velocity |
| `rVelocity` | `realx3` | Particle rotational velocity |
| `acceleration` | `realx3` | Particle acceleration |
| `rAcceleration` | `realx3` | Particle rotational acceleration |
| `contactForce` | `realx3` | Particle contact force |
| `contactTorque` | `realx3` | Particle contact torque |
| `id` | `integer` | Particle ID |
| `shapeIndex` | `integer` | Particle shape index |
The above fields may vary from one type of simulation to other. Pleas note that this is only a tentative list.
### 6.5. Optional Parameters
| Parameter | Description | Default | Options |
|-----------|-------------|---------|---------|
| `divideByVolume` | Divide result by region volume | `no` | `yes` or `no` |
| `threshold` | Exclude regions with fewer particles | 1 | Integer value |
| `includeMask` | Filter particles based on a field value | `all` | `all`, `lessThan`, `greaterThan`, `between`, `lessThanOrEq`, `greaterThanOrEq`, `betweenEq` |
|`fluctuation2` (in average only)| Calculate fluctuation of field values | `no` | `yes` or `no` |
| `phi` | Field to be used for weighted averaging | `one` | Any valid field name |
## 7. Examples
### 7.1. Example 1: Probing Individual Particles
```cpp
velocityProb
{
processMethod particleProbe;
processRegion centerPoints;
selector id;
field component(position,y);
ids (0 10 100);
timeControl default;
}
```
This example extracts the y-component of the position for particles with IDs 0, 10, and 100.
### 7.2. Example 2: Processing in a Spherical Region
```cpp
on_single_sphere
{
processMethod arithmetic;
processRegion sphere;
sphereInfo
{
radius 0.01;
center (-0.08 -0.08 0.015);
}
timeControl default;
operations
(
averageVel
{
function average;
field mag(velocity);
divideByVolume no;
fluctuation2 yes;
threshold 3;
includeMask all;
}
par1Fraction
{
function average;
field one;
phi one;
divideByVolume no;
includeMask lessThan;
lessThanInfo
{
field diameter;
value 0.0031;
}
}
numberDensity
{
function sum;
field one;
phi one;
divideByVolume yes;
}
);
}
```
This example defines a sphere region and performs three operations:
1. Calculate the average of velocity magnitude of particles
2. Calculate the fraction of particles with diameter less than 0.0031
3. Calculate the number density by summing and dividing by volume
### 7.3. Example 3: Processing Along a Line
In this example, a line region is defined. The `lineInfo` section specifies the start and end points of the line, the number of spheres to create along the line, and the radius of each point. Bulk properties are calculated in each sphere, based on the properties of particles contained in each sphere.
```cpp
along_a_line
{
processMethod arithmetic;
processRegion line;
timeControl simulationTime;
startTime 1.0;
endTime 3.0;
executionInterval 0.1;
lineInfo
{
p1 (0 0 0);
p2 (0 0.15 0.15);
nSpheres 10;
radius 0.01;
}
operations
(
bulkDensity
{
function sum;
field mass;
phi one;
divideByVolume yes;
}
volumeDensity
{
function sum;
field volume;
divideByVolume yes;
}
);
}
```
This example creates 10 spherical regions along a line from (0,0,0) to (0,0.15,0.15) and calculates the bulk density and volume density in each region.
## 8. Advanced Features
### 8.1. Special functions applied on fields
You can access specific components of vector fields (`realx3`) using the `component` function:
```cpp
field component(position,y); // Access the y-component of position
```
Here is a complete list of these special functions:
| Function Name | Valid field Type | Example |
|-----------------|------------|---------|
| `component` | `realx3` | `component(velocity,x)` |
| `abs` | `real` | `abs(s)` |
| `square` | `real` | `square(I)` |
| `cube` | `real` | `cube(diameter)` |
| `squre root` | `real` | `sqrt(mass)` |
| `magnitude` | `realx3` | `mag(contactForce)` |
| `magnitude square` | `realx3` | `magSquare(velocity)` |
| `magnitude cube` | `realx3` | `magCube(velocity)` |
| `magnitude square root` | `realx3` | `magSqrt(acceleration)` |
### 8.2. Particle Filtering with includeMask
The `includeMask` parameter allows you to filter particles based on field values:
```cpp
includeMask lessThan;
lessThanInfo
{
field diameter;
value 0.0031;
}
```
Supported masks:
- `all`: Include all particles (default)
- `lessThan`: Include particles where field < value
- `greaterThan`: Include particles where field > value
- `between`: Include particles where value1 < field < value2
- `lessThanOrEq`: Include particles where field ≤ value
- `greaterThanOrEq`: Include particles where field ≥ value
- `betweenEq`: Include particles where value1 ≤ field ≤ value2
### 8.3. Implementation Notes
- The postprocessing system can work both during simulation (`runTimeActive yes`) or after simulation completion.
- When using post-simulation mode, you must specify the correct `shapeType` to properly initialize the shape objects.
- Results are written to output files in the case directory with timestamps.
- The `threshold` parameter helps eliminate statistical noise in regions with few particles.
- Setting `divideByVolume` to `yes` normalizes results by the volume of the region, useful for calculating densities.
## 9. Mathematical Formulations
For weighted `bulk` properties calculation, we have these two general formulations:
- For weighted averaging:
$$ \text{average} = \frac{\sum_j w_j \cdot \phi_j \cdot \text{field}_j}{\sum_i w_i \cdot \phi_i} $$
- For weighted summing:
$$ \text{sum} = \sum_j w_j \cdot \phi_j \cdot \text{field}_j $$
If `divideByVolume` is set to `yes`, the result is divided by the volume of the region:
$$ \text{volumetric result} = \frac{\text{result}}{V_{\text{region}}} $$
## 10. A complete dictionary file (postprocessDataDict)
```C++
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName postprocessDataDict;
objectType dictionary;;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
// Yes: postprocessing is active during the simulation
// No: postprocessing is not active during the simulation
// and it can be done after simulation
runTimeActive yes;
// shapeType: defines the type of the shape that is used in the simulation
// (for example: sphere, grain, etc).
// shapeType is only used when postprocessing is done after simulation
// to initialize the shape object for post processing operatoins
shapeType sphere;
// default time control to be used in the postprocessing components
defaultTimeControl
{
timeControl timeStep; // timeStep, simulationTime are the options here
startTime 0;
endTime 1000;
executionInterval 150;
}
// list of postprocessing components
components
(
// probing particles for their state variables, like velocity, position, etc
velocityProb
{
processMethod particleProbe;
processRegion centerPoints;
selector id;
field component(position,y);
ids (0 10 100);
timeControl default; // other options are settings, timeStep, simulationTime
// settings: uses parameters from settingsDict file
// timeStep: uses the time step of the simulation controlling the execution of postprocessing
// simulationTime: uses the simulation time of the simulation controlling the execution of postprocessing
// default: uses the default time control (defined in defaultTimeControl).
// default behavior: if you do not specify it, parameters in defaultTimeControl is used.
}
on_single_sphere
{
// method of performing the sum (arithmetic, uniformDistribution, GaussianDistribution)
processMethod arithmetic;
// Postprocessing is done on particles whose centers are inside this spehre
processRegion sphere;
sphereInfo
{
radius 0.01; // radius of sphere
center (-0.08 -0.08 0.015); // center of sphere
}
timeControl default;
/// all the postprocess operations to be done on sphere region
operations
(
// computes the arithmetic mean of particle velocity
averageVel
{
function average;
field velocity;
fluctuation2 yes;
divideByVolume no; // default is no
threshold 3; // default is 1
includeMask all; // default is all
}
// - function: average, sum, and other derived ones from sum and average
// - field: names of the fields in the simulation. Some special fields
// are: mass, density, volume, position, one, I.
// - divideByVolume: whether the result is divided by the volume of the region
// - threshold: exclude regions that contains particles less than threshold
// - includeMask: all, lessThan, greaterThan, between, lessThanOrEq, greaterThanEq, betweenEq
// computes the fraction of par1 in the region
par1Fraction
{
function average;
field one; // default
phi one; // default
divideByVolume no;
includeMask lessThan;
// diameter of par1 is 0.003, so these settings
// will select only particles of type par1
lessThanInfo
{
field diameter;
value 0.0031;
}
}
numberDensity
{
function sum;
field one;
phi one;
divideByVolume yes;
}
);
}
along_a_line
{
processMethod arithmetic;
processRegion line;
// the time interval for executing the post-processing
// other options: timeStep, default, and settings
timeControl simulationTime;
startTime 1.0;
endTime 3.0;
executionInterval 0.1;
// 10 spheres with radius 0.01 along the straight line defined by p1 and p2
lineInfo
{
p1 (0 0 0);
p2 (0 0.15 0.15);
nSpheres 10;
radius 0.01;
}
operations
(
// computes the arithmetic mean of particle velocity
numberDensity
{
function sum;
field one;
divideByVolume yes; //default is no
}
volumeDensity
{
function sum;
field volume; //
divideByVolume yes; //default is no
}
);
}
);
```

View File

@ -25,7 +25,7 @@ Licence:
#include "regionPoints.hpp"
#include "Field.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
template<typename T>
@ -119,7 +119,7 @@ public:
};
} // namespace pFlow
} // namespace pFlow::postprocessData
#include "regionFieldTemplate.cpp"

View File

@ -1,10 +1,14 @@
namespace pFlow::postprocessData
{
template<typename T>
pFlow::regionField<T>::regionField(
regionField<T>::regionField(
const word& name,
const regionPoints& rPoints,
const T defaultVal)
:
field_(name, "regionFieldValue", rPoints.size(), rPoints.size(), defaultVal),
regionPoints_(rPoints)
{}
{}
} // End namespace pFlow::postprocessData

View File

@ -3,7 +3,10 @@
#include "Set.hpp"
#include "pStructSelector.hpp"
bool pFlow::centerPointsRegionPoints::selectIds()
namespace pFlow::postprocessData
{
bool centerPointsRegionPoints::selectIds()
{
if(!firstTimeUpdate_) return true;
firstTimeUpdate_ = false;
@ -42,7 +45,7 @@ bool pFlow::centerPointsRegionPoints::selectIds()
return true;
}
pFlow::centerPointsRegionPoints::centerPointsRegionPoints(
centerPointsRegionPoints::centerPointsRegionPoints(
const dictionary &dict,
fieldsDataBase &fieldsDataBase)
: regionPoints(dict, fieldsDataBase),
@ -50,7 +53,7 @@ pFlow::centerPointsRegionPoints::centerPointsRegionPoints(
probDict_(dict)
{}
bool pFlow::centerPointsRegionPoints::update()
bool centerPointsRegionPoints::update()
{
if(!selectIds()) return false;
@ -74,7 +77,7 @@ bool pFlow::centerPointsRegionPoints::update()
return true;
}
bool pFlow::centerPointsRegionPoints::write(iOstream &os) const
bool centerPointsRegionPoints::write(iOstream &os) const
{
if(firstTimeUpdate_)
{
@ -95,3 +98,5 @@ bool pFlow::centerPointsRegionPoints::write(iOstream &os) const
return true;
}
} // End namespace pFlow::postprocessData

View File

@ -23,7 +23,7 @@ Licence:
#include "regionPoints.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
/**
@ -163,7 +163,7 @@ public:
}; // class centerPointsRegionPoints
} // namespace pFlow
} // namespace pFlow::postprocessData

View File

@ -1,7 +1,10 @@
#include "lineRegionPoints.hpp"
#include "fieldsDataBase.hpp"
pFlow::lineRegionPoints::lineRegionPoints
namespace pFlow::postprocessData
{
lineRegionPoints::lineRegionPoints
(
const dictionary &dict,
fieldsDataBase &fieldsDataBase
@ -14,7 +17,7 @@ pFlow::lineRegionPoints::lineRegionPoints
selectedPoints_("selectedPoints")
{
const auto& lDict = dict.subDict("lineInfo");
uint32 nPoints = lDict.getValMax<uint32>("numPoints",2);
uint32 nSpheres = lDict.getValMax<uint32>("nSpheres",2);
realList raddi;
if( lDict.containsDataEntry("radii"))
@ -24,24 +27,24 @@ pFlow::lineRegionPoints::lineRegionPoints
else
{
auto r = lDict.getVal<real>("radius");
raddi = realList(nPoints, r);
raddi = realList(nSpheres, r);
}
if(raddi.size() != nPoints)
if(raddi.size() != nSpheres)
{
fatalErrorInFunction
<< "The number elements in of radii list should be equal to the "
<< "number of points"<<endl;
<< "The number of elements in the radii list should be equal to the "
<< "nSpheres"<<endl;
fatalExit;
}
sphereRegions_.resize(nPoints, sphere(realx3(0,0,0),1));
centerPoints_.resize(nPoints);
volumes_.resize(nPoints);
diameters_.resize(nPoints);
selectedPoints_.resize(nPoints);
real dt = 1.0/(nPoints-1);
for(uint32 i = 0; i < nPoints; ++i)
sphereRegions_.resize(nSpheres, sphere(realx3(0,0,0),1));
centerPoints_.resize(nSpheres);
volumes_.resize(nSpheres);
diameters_.resize(nSpheres);
selectedPoints_.resize(nSpheres);
real dt = 1.0/(nSpheres-1);
for(uint32 i = 0; i < nSpheres; ++i)
{
centerPoints_[i] = line_.point(i*dt);
sphereRegions_[i] = pFlow::sphere(centerPoints_[i], raddi[i]);
@ -50,7 +53,7 @@ pFlow::lineRegionPoints::lineRegionPoints
}
}
pFlow::span<const pFlow::uint32> pFlow::lineRegionPoints::indices(uint32 elem) const
pFlow::span<const pFlow::uint32> lineRegionPoints::indices(uint32 elem) const
{
if(elem >= size())
{
@ -65,7 +68,7 @@ pFlow::span<const pFlow::uint32> pFlow::lineRegionPoints::indices(uint32 elem) c
selectedPoints_[elem].size());
}
pFlow::span<pFlow::uint32> pFlow::lineRegionPoints::indices(uint32 elem)
pFlow::span<pFlow::uint32> lineRegionPoints::indices(uint32 elem)
{
if(elem >= size())
{
@ -80,7 +83,7 @@ pFlow::span<pFlow::uint32> pFlow::lineRegionPoints::indices(uint32 elem)
selectedPoints_[elem].size());
}
bool pFlow::lineRegionPoints::update()
bool lineRegionPoints::update()
{
const auto points = database().updatePoints();
for(auto& elem : selectedPoints_)
@ -101,7 +104,7 @@ bool pFlow::lineRegionPoints::update()
return true;
}
bool pFlow::lineRegionPoints::write(iOstream &os) const
bool lineRegionPoints::write(iOstream &os) const
{
os << "# Spheres along a straight line \n";
os << "# No." << tab << "centerPoint" << tab << "diameter" << endl;
@ -118,3 +121,5 @@ bool pFlow::lineRegionPoints::write(iOstream &os) const
os << endl;
return true;
}
} // End namespace pFlow::postprocessData

View File

@ -54,7 +54,7 @@ Licence:
#include "Vectors.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
class lineRegionPoints

View File

@ -1,7 +1,10 @@
#include "multipleSpheresRegionPoints.hpp"
#include "fieldsDataBase.hpp"
pFlow::multipleSpheresRegionPoints::multipleSpheresRegionPoints
namespace pFlow::postprocessData
{
multipleSpheresRegionPoints::multipleSpheresRegionPoints
(
const dictionary &dict,
fieldsDataBase &fieldsDataBase
@ -46,7 +49,7 @@ pFlow::multipleSpheresRegionPoints::multipleSpheresRegionPoints
}
}
pFlow::span<const pFlow::uint32> pFlow::multipleSpheresRegionPoints::indices(uint32 elem) const
pFlow::span<const pFlow::uint32> multipleSpheresRegionPoints::indices(uint32 elem) const
{
if (elem >= size())
{
@ -59,7 +62,7 @@ pFlow::span<const pFlow::uint32> pFlow::multipleSpheresRegionPoints::indices(uin
return span<const uint32>(selectedPoints_[elem].data(), selectedPoints_[elem].size());
}
pFlow::span<pFlow::uint32> pFlow::multipleSpheresRegionPoints::indices(uint32 elem)
pFlow::span<pFlow::uint32> multipleSpheresRegionPoints::indices(uint32 elem)
{
if (elem >= size())
{
@ -73,7 +76,7 @@ pFlow::span<pFlow::uint32> pFlow::multipleSpheresRegionPoints::indices(uint32 el
}
bool pFlow::multipleSpheresRegionPoints::update()
bool multipleSpheresRegionPoints::update()
{
const auto points = database().updatePoints();
for (auto& elem : selectedPoints_)
@ -94,7 +97,7 @@ bool pFlow::multipleSpheresRegionPoints::update()
return true;
}
bool pFlow::multipleSpheresRegionPoints::write(iOstream &os) const
bool multipleSpheresRegionPoints::write(iOstream &os) const
{
os << "# Multiple spheres region points\n";
os << "# No." << tab << "centerPoint" << tab << "diameter" << endl;
@ -110,3 +113,5 @@ bool pFlow::multipleSpheresRegionPoints::write(iOstream &os) const
os << endl;
return true;
}
} // End namespace pFlow::postprocessData

View File

@ -51,7 +51,7 @@ Licence:
#include "sphere.hpp"
#include "Vectors.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
class multipleSpheresRegionPoints

View File

@ -2,7 +2,10 @@
#include "fieldsDataBase.hpp"
#include "Time.hpp"
pFlow::regionPoints::regionPoints
namespace pFlow::postprocessData
{
regionPoints::regionPoints
(
const dictionary &dict,
fieldsDataBase &fieldsDataBase
@ -11,18 +14,20 @@ pFlow::regionPoints::regionPoints
fieldsDataBase_(fieldsDataBase)
{}
const pFlow::Time& pFlow::regionPoints::time() const
const Time& regionPoints::time() const
{
return fieldsDataBase_.time();
}
const pFlow::fieldsDataBase & pFlow::regionPoints::database() const
const fieldsDataBase & regionPoints::database() const
{
return fieldsDataBase_;
}
pFlow::fieldsDataBase& pFlow::regionPoints::database()
fieldsDataBase& regionPoints::database()
{
return fieldsDataBase_;
}
} // namespace pFlow::postprocessData

View File

@ -25,12 +25,16 @@ Licence:
#include "dictionary.hpp"
#include "pointStructure.hpp"
namespace pFlow
{
class Time;
}
namespace pFlow::postprocessData
{
class fieldsDataBase;
class Time;
/**
* @class regionPoints

View File

@ -1,7 +1,10 @@
#include "sphereRegionPoints.hpp"
#include "fieldsDataBase.hpp"
pFlow::sphereRegionPoints::sphereRegionPoints
namespace pFlow::postprocessData
{
sphereRegionPoints::sphereRegionPoints
(
const dictionary &dict,
fieldsDataBase &fieldsDataBase
@ -15,7 +18,7 @@ pFlow::sphereRegionPoints::sphereRegionPoints
{
}
bool pFlow::sphereRegionPoints::update()
bool sphereRegionPoints::update()
{
const auto points = database().updatePoints();
selectedPoints_.clear();
@ -30,7 +33,7 @@ bool pFlow::sphereRegionPoints::update()
return true;
}
bool pFlow::sphereRegionPoints::write(iOstream &os) const
bool sphereRegionPoints::write(iOstream &os) const
{
os <<"# Single sphere\n";
os <<"# center point: "<<sphereRegion_.center()<<endl;
@ -39,3 +42,5 @@ bool pFlow::sphereRegionPoints::write(iOstream &os) const
return true;
}
} // End namespace pFlow::postprocessData

View File

@ -38,7 +38,7 @@ Licence:
#include "sphere.hpp"
#include "Vectors.hpp"
namespace pFlow
namespace pFlow::postprocessData
{
class sphereRegionPoints

View File

@ -7,123 +7,151 @@ objectType dictionary;;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
// Yes: postprocessing is active during the simulation
// No: postprocessing is not active during the simulation
// and it can be done after simulation
runTimeActive yes;
// shapeType: defines the type of the shape that is used in the simulation
// (for example: sphere, grain, etc).
// shapeType is only used when postprocessing is done after simulation
// to initialize the shape object for post processing operatoins
shapeType sphere;
// default time control to be used in the postprocessing components
defaultTimeControl
{
timeControl timeStep;
timeControl timeStep; // timeStep, simulationTime are the options here
startTime 0;
endTime 1000;
executionInterval 150;
}
// list of postprocessing components
components
(
velocityProb
{
processMethod particleProbe;
processRegion centerPoints;
selector id;
field component(position,y);
ids (0 10 100);
}
onSingleSphere
{
// method of performing the sum (arithmetic, uniformDistribution, GaussianDistribution)
processMethod arithmetic;
processRegion sphere; // type of region on which processing is performed
sphereInfo
{
radius 0.01;
center (-0.08 -0.08 0.015);
}
timeControl default; // settings, timeStep, simulationTime
/// all the post process operations to be done
operations
(
// computes the arithmetic mean of particle velocity
averageVel
{
function average;
field velocity;
divideByVolume no; //default
threshold 3; //default is 1;
includeMask all;
}
// computes the fraction of par1 in the region
par1Fraction
{
function average;
field one;
phi one; // default
divideByVolume no;
includeMask lessThan;
// diameter of par1 is 0.003, so these settings
// will select only particles of type par1
lessThanInfo
{
field diameter;
value 0.0031;
}
}
numberDensity
{
function sum;
field one;
phi one; // default
divideByVolume yes;
}
);
}
alongALine
// probing particles for their state variables, like velocity, position, etc
velocityProb
{
processMethod arithmetic;
processRegion line;
// the time interval for executing the post-processing
// other options: timeStep, default, and settings
timeControl simulationTime;
startTime 1.0;
endTime 3.0;
executionInterval 0.1;
// 10 spheres with radius 0.01 along the straight line defined by p1 and p2
lineInfo
{
p1 (0 0 0);
p2 (0 0.15 0.15);
numPoints 10;
radius 0.01;
}
operations
(
// computes the arithmetic mean of particle velocity
numberDensity
{
function sum;
field one;
divideByVolume yes; //default is no
}
volumeDensity
{
function sum;
field cube(diameter); // d^3, although it differs by pi/6
divideByVolume yes; //default is no
}
);
processMethod particleProbe;
processRegion centerPoints;
selector id;
field component(position,y);
ids (0 10 100);
timeControl default; // other options are settings, timeStep, simulationTime
// settings: uses parameters from settingsDict file
// timeStep: uses the time step of the simulation controlling the execution of postprocessing
// simulationTime: uses the simulation time of the simulation controlling the execution of postprocessing
// default: uses the default time control (defined in defaultTimeControl).
// default behavior: if you do not specify it, parameters in defaultTimeControl is used.
}
);
on_single_sphere
{
// method of performing the sum (arithmetic, uniformDistribution, GaussianDistribution)
processMethod arithmetic;
// Postprocessing is done on particles whose centers are inside this spehre
processRegion sphere;
sphereInfo
{
radius 0.01; // radius of sphere
center (-0.08 -0.08 0.015); // center of sphere
}
timeControl default;
/// all the postprocess operations to be done on sphere region
operations
(
// computes the arithmetic mean of particle velocity
averageVel
{
function average;
field velocity;
fluctuation2 yes;
divideByVolume no; // default is no
threshold 3; // default is 1
includeMask all; // default is all
}
// - function: average, sum, and other derived ones from sum and average
// - field: names of the fields in the simulation. Some special fields
// are: mass, density, volume, position, one, I.
// - divideByVolume: whether the result is divided by the volume of the region
// - threshold: exclude regions that contains particles less than threshold
// - includeMask: all, lessThan, greaterThan, between, lessThanOrEq, greaterThanEq, betweenEq
// computes the fraction of par1 in the region
par1Fraction
{
function average;
field one; // default
phi one; // default
divideByVolume no;
includeMask lessThan;
// diameter of par1 is 0.003, so these settings
// will select only particles of type par1
lessThanInfo
{
field diameter;
value 0.0031;
}
}
numberDensity
{
function sum;
field one;
phi one;
divideByVolume yes;
}
);
}
along_a_line
{
processMethod arithmetic;
processRegion line;
// the time interval for executing the post-processing
// other options: timeStep, default, and settings
timeControl simulationTime;
startTime 1.0;
endTime 3.0;
executionInterval 0.1;
// 10 spheres with radius 0.01 along the straight line defined by p1 and p2
lineInfo
{
p1 (0 0 0);
p2 (0 0.15 0.15);
nSpheres 10;
radius 0.01;
}
operations
(
// computes the arithmetic mean of particle velocity
numberDensity
{
function sum;
field one;
divideByVolume yes; //default is no
}
volumeDensity
{
function sum;
field volume; //
divideByVolume yes; //default is no
}
);
}
);

40
tutorials/README.md Normal file
View File

@ -0,0 +1,40 @@
# phasicFlow Tutorials
This directory contains various tutorial examples to help you learn how to use phasicFlow for different particle simulation scenarios. Each tutorial provides a complete working example with configuration files and instructions.
## 1. Sphere DEM Simulations (`sphereGranFlow`)
The most comprehensive collection of tutorials using spherical particles for DEM simulations:
- [Rotating Drum (Small)](./sphereGranFlow/rotatingDrumSmall/) - Simple rotating drum simulation with 30,000 spherical particles (4 mm diameter)
- [Rotating Drum (Medium)](./sphereGranFlow/rotatingDrumMedium/) - Medium-sized rotating drum simulation
- [Rotating Drum with Baffles](./sphereGranFlow/RotatingDrumWithBaffles/) - Rotating drum with internal baffles and binary particle mixture
- [Rotating Drum with Periodic Boundaries](./sphereGranFlow/drum-PeriodicBoundary/) - Simulates an "infinite length" drum using periodic boundaries
- [V-blender](./sphereGranFlow/V-blender/) - V-shaped blender simulation for particle mixing
- [Tote Blender](./sphereGranFlow/toteBlender/) - Double pedestal tote blender simulation with 24,000 particles
- [Binary System of Particles](./sphereGranFlow/binarySystemOfParticles/) - Demonstrates particle segregation in a rotating drum with two particle sizes
- [Screw Conveyor](./sphereGranFlow/screwConveyor/) - Simulates particle transport using a screw conveyor
- [Conveyor Belt](./sphereGranFlow/conveyorBelt/) - Simulates particles on a moving conveyor belt
- [Rotary Air Lock Valve](./sphereGranFlow/RotaryAirLockValve/) - Simulates a rotary air lock valve with particle insertion
- [Layered Silo Filling](./sphereGranFlow/layeredSiloFilling/) - Demonstrates filling a silo with layers of particles
- [Homogenization Silo (Periodic Boundaries)](./sphereGranFlow/homogenizationSilo-PeriodicBoundary/) - Simulates homogenization in a silo with periodic boundaries
## 2. Course-grained (Grain) DEM Simulations (`grainGranFlow`)
Tutorials for simulations with non-spherical (grain-shaped) particles:
- [Rotating Drum](./grainGranFlow/rotatingDrum/) - Demonstrates non-spherical grain particles in a rotating drum
## 3. Geometry Iteration (`iterateGeometry`)
Tutorials focused on geometry handling and visualization:
- [Inclined Screw Conveyor](./iterateGeometry/inclinedScrewConveyor/) - Visualizes the geometry of an inclined screw conveyor without particles
## 4. Post-processing (`postprocessPhasicFlow`)
Tutorials focused on post-processing and analysis:
- [Segregation Analysis](./postprocessPhasicFlow/segregation/) - Demonstrates how to analyze particle segregation in simulation results

View File

@ -44,8 +44,8 @@ positionParticles
orderedInfo
{
// minimum space between centers of particles
diameter 0.001;
// minimum distance between particles centers
distance 0.001;
// number of particles in the simulation
numPoints 50000;

View File

@ -24,7 +24,7 @@ positionParticles
positionOrderedInfo
{
diameter 0.005; // minimum space between centers of particles
distance 0.005; // minimum distance between particles centers
numPoints 30000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
@ -41,7 +41,7 @@ setFields
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
r Velocity realx3 (0 0 0); // rotational velocity (rad/s)
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word smallSphere; // name of the particle shape
}
@ -53,7 +53,8 @@ setFields
selectRandomInfo
{
begin 0; // begin index of points
end 29999; // end index of points
end 29999; // end index of points
number 10000; // number of points to be selected
}
fieldValue // fields that the selector is applied to
{

View File

@ -6,8 +6,8 @@ objectName particleInsertion;
objectType dicrionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (sphere); // names of shapes
names (sphere); // names of shapes
diameters (0.005); // diameter of shapes
diameters (0.005); // diameter of shapes
materials (sphereMat); // material names for shapes

View File

@ -0,0 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
rm -rf VTK
#------------------------------------------------------------------------------

View File

@ -0,0 +1,21 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
echo "\n<--------------------------------------------------------------------->"
echo "1) Creating particles"
echo "<--------------------------------------------------------------------->\n"
particlesPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "2) Creating geometry"
echo "<--------------------------------------------------------------------->\n"
geometryPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "3) Running the case"
echo "<--------------------------------------------------------------------->\n"
sphereGranFlow
#------------------------------------------------------------------------------

View File

@ -2,46 +2,48 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
// Simulation domain: every particles that goes outside this domain will be deleted
globalBox
{
min (0.397538 0.178212 0.00);
max (0.725537 0.600214 0.06);
min (0.397538 0.178212 0.00);
max (0.725537 0.600214 0.06);
}
boundaries
{
left
{
type exit; // other options: periodict, reflective
}
left
{
type exit; // other options: periodict, reflective
}
right
{
type exit; // other options: periodict, reflective
}
right
{
type exit; // other options: periodict, reflective
}
bottom
{
type exit; // other options: periodict, reflective
}
bottom
{
type exit; // other options: periodict, reflective
}
top
{
type exit; // other options: periodict, reflective
}
top
{
type exit; // other options: periodict, reflective
}
rear
{
type exit; // other options: periodict, reflective
}
rear
{
type exit; // other options: periodict, reflective
}
front
{
type exit; // other options: periodict, reflective
}
front
{
type exit; // other options: periodict, reflective
}
}

View File

@ -2,50 +2,50 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.561547 0.372714 0.000); // first point for the axis of rotation
p2 (0.561547 0.372714 0.010); // second point for the axis of rotation
rotAxis
{
p1 (0.561547 0.372714 0.000); // first point for the axis of rotation
p2 (0.561547 0.372714 0.010); // second point for the axis of rotation
omega 2.1; // rotation speed (rad/s)
omega 2.1; // rotation speed (rad/s)
startTime 1.25; // Start time of Geometry Rotating (s)
endTime 7; // End time of Geometry Rotating (s)
}
startTime 1.25; // Start time of Geometry Rotating (s)
endTime 7; // End time of Geometry Rotating (s)
}
}
surfaces
{
gear
{
type stlWall; // type of the wall
gear
{
type stlWall; // type of the wall
file gear.stl; // file name in stl folder
file gear.stl; // file name in stl folder
material wallMat; // material name of this wall
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
motion rotAxis; // motion component name
}
surfaces
{
type stlWall; // type of the wall
{
type stlWall; // type of the wall
file surfaces.stl; // file name in stl folder
file surfaces.stl; // file name in stl folder
material wallMat; // material name of this wall
material wallMat; // material name of this wall
motion none; // motion component name
}
motion none; // motion component name
}
}

View File

@ -2,8 +2,8 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/

View File

@ -2,8 +2,8 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
@ -25,10 +25,12 @@ g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter mass);
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
excludeObjects ();
integrationMethod AdamsBashforth2;
integrationHistory off;
writeFormat ascii; // data writting format (ascii or binary)
timersReport Yes; // report timers: Yes or No

View File

@ -1,4 +1,5 @@
# Problem Definition (v-1.0)
The problem is to simulate a rotating drum with a diameter of 0.24 m, a length of 0.1 m and 6 baffles rotating at 15 rpm. This drum is filled with 20000 particles, the integration time step is 0.00001 s. There are 2 types of particles in this drum, each of which is inserted during the simulation to fill the drum.
* **12500** Particles with **4 mm** diameter, at the rate of 12500 particles/s for 1 sec.
* **7500** Particles with **5mm** diameter, at the rate of 7500 particles/s for 1 sec.
@ -15,10 +16,13 @@ The problem is to simulate a rotating drum with a diameter of 0.24 m, a length o
</html>
# Setting up the Case
As it has been explained in the previous cases, the simulation case setup is based on text-based scripts. Here, the simulation case setup are sorted in three folders: `caseSetup`, `setting` and `stl`.
As it has been explained in the previous cases, the simulation case setup is based on text-based scripts. Here, the simulation case setup are sorted in three folders: `caseSetup`, `setting` and `stl`.
## Defining small and large particles
Then in the `caseSetup/shapes` the diameter and the material name of the particles are defined. Two sizes are defined: 4 and 5 mm.
Then in the `caseSetup/shapes` the diameter and the material name of the particles are defined. Two sizes are defined: 4 and 5 mm.
```C++
// names of shapes
names (smallSphere largeSphere);
@ -28,8 +32,8 @@ diameters (0.004 0.005);
materials (lightMat heavyMat);
```
## Particle Insertion
In this case we have two regions for inserting the particles. In both regions we define the insertion rate, the start and end time of the insertion, information about the volume of space through which the particles are inserted. The insertion phase in the simulation is performed between times 0 and 1 second.
For example, for the insertion region for inserting light particles is shown below.
@ -39,31 +43,44 @@ in <b>caseSetup/particleInsertion</b> file
```C++
// Right Layer Region
layerrightregion
// Right Region
right_region
{
// type of insertion region
timeControl simulationTime;
regionType cylinder;
// insertion rate (particles/s)
// type of insertion region
regionType cylinder;
// insertion rate (particles/s)
rate 12500;
// Start time of LightParticles insertion (s)
timeControl simulationTime;
// Start time of insertion (s)
startTime 0;
// End time of LightParticles insertion (s)
// End time of insertion (s)
endTime 1;
// Time Interval of LightParticles insertion (s)
// Time Interval of insertion (s)
insertionInterval 0.025;
cylinderInfo
{
// Coordinates of cylinderRegion (m,m,m)
p2 (-0.15 0.25 0.05);
p1 (-0.15 0.24 0.05);
// radius of cylinder (m)
radius 0.035;
// Coordinates of cylinderRegion (m,m,m)
p2 (-0.15 0.25 0.05);
p1 (-0.15 0.24 0.05);
// radius of cylinder (m)
radius 0.035;
}
setFields
{
velocity realx3 (0.0 -0.6 0.0); // initial velocity of inserted particles
}
mixture
{
smallSphere 1; // mixture composition of inserted particles
}
}
```
## Interaction between particles and walls
The `caseSetup/interaction` file defines the material names and properties as well as the interaction parameters: the interaction between the particles and the shell of the rotating drum. Since we define 3 materials for simulation, the interaction matrix is 3x3, while we only need to enter upper triangle elements (interactions are symmetric).
@ -73,36 +90,37 @@ materials (lightMat heavyMat wallMat);
// density of materials [kg/m3]
densities (1000 1500 2500);
/*
/*
Property (lightMat-lightMat lightMat-heavyMat lightMat-wallMat
heavyMat-heavyMat heavyMat-wallMat
wallMat-wallMat );
*/
// Young modulus [Pa]
*/
// Young modulus [Pa]
Yeff (1.0e6 1.0e6 1.0e6
1.0e6 1.0e6
1.0e6);
// Shear modulus [Pa]
// Shear modulus [Pa]
Geff (0.8e6 0.8e6 0.8e6
0.8e6 0.8e6
0.8e6);
// Poisson's ratio [-]
// Poisson's ratio [-]
nu (0.25 0.25 0.25
0.25 0.25
0.25);
// coefficient of normal restitution
// coefficient of normal restitution
en (0.97 0.97 0.85
0.97 0.85
1.00);
// dynamic friction
// dynamic friction
mu (0.65 0.65 0.35
0.65 0.35
0.35);
// rolling friction
// rolling friction
mur (0.1 0.1 0.1
0.1 0.1
0.1);
```
## Settings
### Geometry
In the `settings/geometryDict` file, the geometry and axis of rotation is defined for the drum. The geometry is composed of a body, front and rear ends.
@ -163,28 +181,32 @@ surfaces
In this part of `geometryDict` the information of rotating axis and speed of rotation are defined. The start of rotation is at 2 s. The first 2 seconds of simulation is for allowing particles to settle donw in the drum.
```C++
motionModel rotatingAxis;
motionModel rotatingAxis;
rotatingAxisInfo
{
rotAxis
{
// first point for the axis of rotation
p1 (-0.1974 0.2269 0);
// second point for the axis of rotation
p2 (-0.1974 0.2269 0.1);
// rotation speed (rad/s) => 15 rpm
omega 2.38733;
// Start time of Geometry Rotating
startTime 2;
// End time of Geometry Rotating
endTime 9.5;
p1 (-0.1974 0.2269 0);
// second point for the axis of rotation
p2 (-0.1974 0.2269 0.1);
// rotation speed (rad/s) => 15 rpm
omega 2.38733;
// Start time of Geometry Rotating
startTime 2;
// End time of Geometry Rotating
endTime 9.5;
}
}
```
## Performing Simulation
To run simulations, type the following commands in the terminal one at a time.
Enter `particlesPhasicFlow` command to create the initial fields for particles.
Enter `geometryPhasicFlow` command to create the Geometry.
At last, enter `sphereGranFlow` command to start the simulation.
After finishing the simulation, you can use `pFlowtoVTK` to convert the results into vtk format stored in ./VTK folder.
After finishing the simulation, you can use `pFlowtoVTK` to convert the results into vtk format stored in ./VTK folder.

View File

@ -6,6 +6,7 @@ objectName interaction;
objectType dicrionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (lightMat heavyMat wallMat); // a list of materials names
densities (1000 1500 2500); // density of materials [kg/m3]
@ -14,7 +15,7 @@ contactListType sortedContactList;
contactSearch
{
method NBS; // method for broad search
method NBS;
updateInterval 10;

View File

@ -6,78 +6,78 @@ objectName particleInsertion;
objectType dicrionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
active Yes; // is insertion active -> Yes or No
active Yes; // is insertion active -> Yes or No
/*
Two layers of particles are packed one-by-one using 1 insertion steps
*/
layerrightregion // Right Layer Region
right_region
{
timeControl simulationTime;
regionType cylinder; // type of insertion region
regionType cylinder; // type of insertion region
rate 12500; // Right Region Particles Insertion Rate (particles/s)
rate 12500; // Right Region Particles Insertion Rate (particles/s)
startTime 0; // Start time of LightParticles insertion (s)
startTime 0; // Start time of insertion (s)
endTime 1; // End time of LightParticles insertion (s)
endTime 1; // End time of insertion (s)
insertionInterval 0.025; // Time Interval of LightParticles insertion (s)
insertionInterval 0.025; // Time Interval of particles insertion (s)
cylinderInfo
{
p2 (-0.15 0.25 0.05); // Top of cylinderRegion (m,m,m)
p2 (-0.15 0.25 0.05); // Top of cylinderRegion (m,m,m)
p1 (-0.15 0.24 0.05); // Bottom of cylinderRegion (m,m,m)
p1 (-0.15 0.24 0.05); // Bottom of cylinderRegion (m,m,m)
radius 0.035; // radius of cylinder (m)
radius 0.035; // radius of cylinder (m)
}
setFields
{
velocity realx3 (0.0 -0.6 0.0); // initial velocity of inserted particles
velocity realx3 (0.0 -0.6 0.0); // initial velocity of inserted particles
}
mixture
{
smallSphere 1; // mixture composition of inserted particles
smallSphere 1; // mixture composition of inserted particles
}
}
layerleftregion // Left Layer Region
left_region
{
timeControl simulationTime;
regionType cylinder; // type of insertion region
regionType cylinder; // type of insertion region
rate 7500; // Left Region Particles Insertion Rate (particles/s)
rate 7500; // Left Region Particles Insertion Rate (particles/s)
startTime 0; // Start time of LightParticles insertion (s)
startTime 0; // Start time of insertion (s)
endTime 1; // End time of LightParticles insertion (s)
endTime 1; // End time of insertion (s)
insertionInterval 0.025; // Time Interval of LightParticles insertion (s)
insertionInterval 0.025; // Time Interval of insertion (s)
cylinderInfo
{
p2 (-0.23 0.25 0.05); // Top of cylinderRegion (m,m,m)
p2 (-0.23 0.25 0.05); // Top of cylinderRegion (m,m,m)
p1 (-0.23 0.24 0.05); // Bottom of cylinderRegion (m,m,m)
p1 (-0.23 0.24 0.05); // Bottom of cylinderRegion (m,m,m)
radius 0.035; // radius of cylinder (m)
radius 0.035; // radius of cylinder (m)
}
setFields
{
velocity realx3 (0.0 -0.6 0.0); // initial velocity of inserted particles
velocity realx3 (0.0 -0.6 0.0); // initial velocity of inserted particles
}
mixture
{
largeSphere 1; // only heavySphere
largeSphere 1; // only heavySphere
}
}

View File

@ -2,12 +2,13 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName sphereDict;
objectType sphereShape;
objectName sphereDict;
objectType sphereShape;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (smallSphere largeSphere); // names of shapes
diameters (0.004 0.005); // diameter of shapes (m)
materials (lightMat heavyMat); // material names for shapes
names (smallSphere largeSphere); // names of shapes
diameters (0.004 0.005); // diameter of shapes (m)
materials (lightMat heavyMat); // material names for shapes

View File

@ -6,42 +6,44 @@ objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.328 0.095 -0.025); // lower corner point of the box
max (-0.068 0.355 0.125); // upper corner point of the box
// Simulation domain: every particles that goes outside this domain will be deleted
globalBox
{
min (-0.328 0.095 -0.025); // lower corner point of the box
max (-0.068 0.355 0.125); // upper corner point of the box
}
boundaries
{
left
{
type exit; // other options: periodic, reflective
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
}

View File

@ -2,80 +2,81 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
motionModel rotatingAxis;
rotatingAxisInfo
{
rotAxis
{
p1 (-0.1974 0.2269 0); // first point for the axis of rotation
p2 (-0.1974 0.2269 0.1); // second point for the axis of rotation
omega 2.38733; // rotation speed (rad/s) => 15 rpm
startTime 2; // Start time of Geometry Rotating
endTime 9.5; // End time of Geometry Rotating
}
{
p1 (-0.1974 0.2269 0); // first point for the axis of rotation
p2 (-0.1974 0.2269 0.1); // second point for the axis of rotation
omega 2.38733; // rotation speed (rad/s) => 15 rpm
startTime 2; // Start time of Geometry Rotating
endTime 9.5; // End time of Geometry Rotating
}
}
surfaces
{
body
{
type stlWall; // type of the wall
file Body.stl; // file name in stl folder
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
body
{
type stlWall; // type of the wall
file Body.stl; // file name in stl folder
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a Cylinder Wall at the rear of cylinder
*/
/*
This is a Cylinder Wall at the rear of cylinder
*/
rearEnd
{
type cylinderWall; // type of the wall
p1 (-0.1974 0.2269 -0.001); // first point for the axis of rotation
p2 (-0.1974 0.2269 0.0); // second point for the axis of rotation
radius1 0.0001; // Radius of p1
radius2 0.12; // Radius of p2
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
rearEnd
{
type cylinderWall; // type of the wall
p1 (-0.1974 0.2269 -0.001); // first point for the axis of rotation
p2 (-0.1974 0.2269 0.0); // second point for the axis of rotation
radius1 0.0001; // Radius of p1
radius2 0.12; // Radius of p2
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This a cylinder Wall at the front of Cylinder
*/
/*
This a cylinder Wall at the front of Cylinder
*/
frontEnd
{
type cylinderWall; // type of the wall
p1 (-0.1974 0.2269 0.0989); // first point for the axis of rotation
p2 (-0.1974 0.2269 0.0990); // second point for the axis of rotation
radius1 0.0001; // Radius of p1
radius2 0.12; // Radius of p2
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
frontEnd
{
type cylinderWall; // type of the wall
p1 (-0.1974 0.2269 0.0989); // first point for the axis of rotation
p2 (-0.1974 0.2269 0.0990); // second point for the axis of rotation
radius1 0.0001; // Radius of p1
radius2 0.12; // Radius of p2
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -10,9 +10,7 @@ setFields
{
/*
Default value for fields defined for particles
These fields should always be defined for simulations with
spherical particles.
*/
@ -29,30 +27,13 @@ setFields
selectors
{
shapeAssigne
{
selector stridedRange; // other options: box, cylinder, sphere, randomPoints
stridedRangeInfo
{
begin 0; // begin index of points
end 20000; // end index of points
stride 3; // stride for selector
}
fieldValue // fields that the selector is applied to
{
shapeName word sphere1; // sets shapeName of the selected points to largeSphere
}
}
}
}
positionParticles // positions particles
positionParticles
{
method empty; // other options: random and ordered
method empty; // other options: random, file and ordered
}

View File

@ -2,34 +2,36 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run RotatingDrumwithBaffles;
run RotatingDrumwithBaffles;
dt 0.00001; // time step for integration (s)
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
startTime 0; // start time for simulation
endTime 10; // end time for simulation
endTime 10; // end time for simulation
saveInterval 0.05; // time interval for saving the simulation
saveInterval 0.05; // time interval for saving the simulation
timePrecision 6; // maximum number of digits for time folder
timePrecision 6; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
g (0 -9.8 0); // gravity vector (m/s2)
// save necessary (i.e., required) data on disk
// save necessary data on disk
includeObjects (diameter);
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
excludeObjects ();
integrationMethod AdamsBashforth2; // integration method
integrationMethod AdamsBashforth2; // integration method
writeFormat ascii; // data writting format (ascii or binary)
integrationHistory off; // to sace space on disk
timersReport Yes; // report timers (Yes or No)
writeFormat ascii; // data writting format (ascii or binary)
timersReportInterval 0.1; // time interval for reporting timers
timersReport Yes; // report timers (Yes or No)
timersReportInterval 0.1; // time interval for reporting timers

View File

@ -0,0 +1,251 @@
# V-blender Simulation (phasicFlow v-1.0)
This tutorial demonstrates the simulation of a V-blender, a common mixing device used in pharmaceutical and powder processing industries. The V-blender consists of a V-shaped vessel that rotates around a horizontal axis, allowing for efficient mixing of particulate materials.
<div align ="center">
<img src="./v-blender.png" style="width: 400px;">
</div>
<div align ="center">
<b>
V-blender simulation with two layers of particles
</b>
</div>
## Problem Definition
The simulation represents a V-blender with the following characteristics:
- The blender is initially empty and is filled with two different particle types in sequence
- First layer: Small particles (10 mm diameter) are inserted from the right side
- Second layer: Slightly larger particles (10.1 mm diameter) are inserted from the left side
- The blender begins rotation at t = 3.0 s and continues until t = 10.0 s
- The rotation speed is set to 3.14 rad/s (approximately 0.5 Hz or 30 RPM)
- The simulation runs for a total of 10 seconds
## Case Setup
The simulation case setup files are organized in the `settings/` and `caseSetup/` folders.
### Particles Definition
Two particle types are defined in the `caseSetup/shapes` file:
```C++
names (smallSphere largeSphere); // names of particles
diameters (0.01 0.0101); // diameter of particles (m)
materials (lightMat lightMat); // material names for particles
```
Both particle types share the same material properties but differ slightly in size to allow for visual distinction during mixing.
### Particle Insertion
Particles are inserted in two sequential phases, as defined in `caseSetup/particleInsertion`:
```C++
active Yes; // is insertion active -> Yes or No
rightregion
{
timeControl simulationTime; // Controls insertion based on simulation time
regionType cylinder; // Defines a cylindrical insertion region
rate 10000; // Inserts 10,000 particles per second
startTime 0.0; // Starts inserting at t = 0s (beginning of simulation)
endTime 1.0; // Stops inserting at t = 1s
insertionInterval 0.025; // Inserts particles every 0.025s
// (40 insertion events during the 1s period)
cylinderInfo {
// Defines cylinder endpoints and radius
p1 (0.0950615 0.12 0.5011585); // First endpoint coordinates (x,y,z) in meters
p2 (0.1150615 0.12 0.4811585); // Second endpoint coordinates (x,y,z) in meters
radius 0.1; // Cylinder radius in meters
}
setFields {
// Initial properties for inserted particles
velocity realx3 (1.2 0.0 -1.2); // Initial velocity vector (x,y,z) in m/s
// Particles move to the right and downward
}
mixture {
// Particle type distribution
smallSphere 1; // 100% of inserted particles are "smallSphere" type
}
}
leftregion
{
timeControl simulationTime; // Controls insertion based on simulation time
regionType cylinder; // Defines a cylindrical insertion region
rate 10000; // Inserts 10,000 particles per second
startTime 1.5; // Starts inserting at t = 1.5s
// (after the first insertion phase)
endTime 2.5; // Stops inserting at t = 2.5s
insertionInterval 0.025; // Inserts particles every 0.025s
// (40 insertion events during the 1s period)
cylinderInfo {
// Defines cylinder endpoints and radius
p1 (0.7562545 0.12 0.50079); // First endpoint coordinates (x,y,z) in meters
p2 (0.7362545 0.12 0.48079); // Second endpoint coordinates (x,y,z) in meters
radius 0.1; // Cylinder radius in meters
}
setFields {
// Initial properties for inserted particles
velocity realx3 (-1.2 0.0 -1.2); // Initial velocity vector (x,y,z) in m/s
// Particles move to the left and downward
}
mixture {
// Particle type distribution
largeSphere 1; // 100% of inserted particles are "largeSphere" type
}
}
```
#### Detailed Explanation of Insertion Parameters
1. **`rightregion` Dictionary**:
- Creates a cylindrical insertion region on the right side of the V-blender
- Active during t=0s to t=1s at the beginning of the simulation
- Particles are inserted from randomly generated positions within the cylinder
- Inserts "smallSphere" particles with 10mm diameter
- Initial velocity (1.2, 0.0, -1.2) m/s directs particles toward the center and bottom of the blender
- 40 insertion events occur (every 0.025s), each adding approximately 250 particles
2. **`leftregion` Dictionary**:
- Creates a symmetrical cylindrical insertion region on the left side of the V-blender
- Active during t=1.5s to t=2.5s, after the first batch of particles has settled
- Inserts "largeSphere" particles with 10.1mm diameter
- Initial velocity (-1.2, 0.0, -1.2) m/s directs particles toward the center and bottom of the blender
- Mirror image of the first insertion but with slightly larger particles
3. **Insertion Region Selection**:
- Cylindrical insertion regions are positioned above each arm of the V-blender
- This arrangement ensures particles fall naturally into the V-blender without initial overlap
4. **Timing Strategy**:
- Sequential insertion with a 0.5s gap between phases allows the first batch to settle
- All particles settle for 0.5s after the second insertion (t=2.5s to t=3.0s)
- Blender rotation begins after all particles have settled (t=3.0s)
### Geometry and Motion
The V-blender geometry is defined in `settings/geometryDict` using an STL file:
```C++
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxis motion model
{
rotAxis
{
p1 (0.128228 0.116446 0.297901); // first point for the axis of rotation
p2 (0.722596 0.116459 0.297901); // second point for the axis of rotation
omega 3.14; // rotation speed (rad/s)
startTime 3; // start time of rotation
endTime 10; // end time of rotation
}
}
```
The blender starts rotating at t = 3.0 s, after both particle types have been inserted and allowed to settle.
### Simulation Domain and Boundaries
The simulation domain is defined in `settings/domainDict`:
```C++
globalBox
{
min (-0.1 -0.4 0); // lower corner point of the box
max (0.86 0.6 0.6); // upper corner point of the box
}
```
All boundaries are set to "exit" type, meaning particles that go outside the domain will be deleted.
### Particle Interaction Properties
Material properties and interaction parameters are defined in `caseSetup/interaction`:
```C++
materials (wallMat lightMat); // a list of materials names
densities (1000 1000); // density of materials [kg/m3]
// Contact force models
model
{
contactForceModel nonLinearNonLimited;
rollingFrictionModel normal;
// Material properties
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
0.97); // coefficient of normal restitution
mu (0.65 0.35
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}
```
## Running the Simulation
To run this simulation, execute the following commands in sequence:
1. First, create the geometry:
```
geometryPhasicFlow
```
2. Next, initialize the particle system (note: starts with zero particles):
```
particlesPhasicFlow
```
3. Finally, run the simulation:
```
sphereGranFlow
```
The simulation will automatically insert particles according to the defined schedule and begin rotating the V-blender at the specified time.
## Visualizing Results
After the simulation completes, you can convert the results to VTK format for visualization:
```
pFlowToVTK --binary
```
The VTK files will be stored in a new directory called `./VTK` and can be visualized using tools like ParaView or VisIt.
## Expected Behavior
During the simulation, you should observe:
1. Initial filling with small particles from the right side (0-1s)
2. A brief settling period (1-1.5s)
3. Filling with large particles from the left side (1.5-2.5s)
4. Another settling period (2.5-3s)
5. Rotation of the V-blender causing mixing of the two particle types (3-10s)

View File

@ -6,15 +6,16 @@ objectName interaction;
objectType dicrionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (wallMat lightMat); // a list of materials names
densities (1000 1000); // density of materials [kg/m3]
materials (wallMat lightMat); // a list of materials names
densities (1000 1000); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS; // method for broad search
method NBS;
updateInterval 10;
@ -33,22 +34,22 @@ model
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
0.25); // Poisson's ratio [-]
en (0.97 0.85
0.97); // coefficient of normal restitution
0.97); // coefficient of normal restitution
mu (0.65 0.35
0.65); // dynamic friction
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
0.1); // rolling friction
}

View File

@ -6,9 +6,10 @@ objectName particleInsertion;
objectType dicrionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
active Yes; // is insertion active -> Yes or No
checkForCollision Yes; // is checked -> Yes or No
active Yes; // is insertion active -> Yes or No
/*
Two layers of particles are packed one-by-one using tho insertion steps
@ -18,15 +19,15 @@ rightregion
{
timeControl simulationTime;
regionType cylinder; // type of insertion region
regionType cylinder; // type of insertion region
rate 10000; // Particles Insertion Rate (particles/s)
rate 10000; // Particles Insertion Rate (particles/s)
startTime 0.0; // start time of small particles insertion (s)
startTime 0.0; // start time of small particles insertion (s)
endTime 1; // end time of small particles insertion (s)
endTime 1; // end time of small particles insertion (s)
insertionInterval 0.025; // time interval of small particles insertion (s)
insertionInterval 0.025; // time interval of small particles insertion (s)
cylinderInfo
{
@ -37,17 +38,17 @@ rightregion
p2 (0.1150615 0.12 0.4811585);
radius 0.1; // radius of cylinder (m)
radius 0.1; // radius of cylinder (m)
}
setFields
{
velocity realx3 (1.2 0.0 -1.2); // initial velocity of inserted particles
velocity realx3 (1.2 0.0 -1.2); // initial velocity of inserted particles
}
mixture
{
smallSphere 1; // first layer of inserted particles
smallSphere 1; // first layer of inserted particles
}
}
@ -55,35 +56,34 @@ leftregion
{
timeControl simulationTime;
regionType cylinder; // type of insertion region
regionType cylinder; // type of insertion region
rate 10000; // Particles Insertion Rate (particles/s)
rate 10000; // Particles Insertion Rate (particles/s)
startTime 1.5; // start time of large particles insertion (s)
startTime 1.5; // start time of large particles insertion (s)
endTime 2.5; // end time of large particles insertion (s)
endTime 2.5; // end time of large particles insertion (s)
insertionInterval 0.025; // time interval of large particles insertion (s)
insertionInterval 0.025; // time interval of large particles insertion (s)
cylinderInfo
{
/* coordinates of center of both ends of the insertion
cylinder on the left side of the V-blender (m,m,m) */
p1 ( 0.7562545 0.12 0.50079);
p2 ( 0.7362545 0.12 0.48079);
radius 0.1; // radius of cylinder (m)
radius 0.1;
}
setFields
{
velocity realx3 (-1.2 0.0 -1.2); // initial velocity of inserted particles
velocity realx3 (-1.2 0.0 -1.2); // initial velocity of inserted particles
}
mixture
{
largeSphere 1; // second layer of inserted particles
largeSphere 1; // second layer of inserted particles
}
}

View File

@ -7,8 +7,8 @@ objectType sphereShape;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (smallSphere largeSphere); // names of particles
names (smallSphere largeSphere); // names of particles
diameters (0.01 0.0101); // diameter of particles
diameters (0.01 0.0101); // diameter of particles
materials (lightMat lightMat); // material names for particles
materials (lightMat lightMat); // material names for particles

View File

@ -10,9 +10,9 @@ fileFormat ASCII;
// Simulation domain: every particles that goes outside this domain will be deleted
globalBox
{
min (-0.1 -0.4 0); // lower corner point of the box
min (-0.1 -0.4 0); // lower corner point of the box
max (0.86 0.6 0.6); // upper corner point of the box
max (0.86 0.6 0.6); // upper corner point of the box
}
boundaries
@ -20,31 +20,31 @@ boundaries
left
{
type exit; // other options: periodic, reflective
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
}

View File

@ -6,6 +6,7 @@ objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxis motion model

View File

@ -2,38 +2,38 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
setFields
{
/*
Default value for fields defined for particles
These fields should always be defined for simulations with
spherical particles.
Default value for fields defined for particles
These fields should always be defined for simulations with
spherical particles.
*/
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word smallSphere; // name of the particle shape
shapeName word smallSphere; // name of the particle shape
}
selectors
{}
{}
}
positionParticles
{
method empty; // no particle at the start of simulation
method empty; // no particle at the start of simulation
mortonSorting Yes; // perform initial sorting based on morton code?
mortonSorting Yes; // perform initial sorting based on morton code?
}

View File

@ -2,23 +2,23 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingVblender;
run rotatingVblender;
dt 0.00001; // time step for integration (s)
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
startTime 0; // start time for simulation
endTime 10; // end time for simulation
endTime 10; // end time for simulation
saveInterval 0.05; // time interval for saving the simulation
saveInterval 0.05; // time interval for saving the simulation
timePrecision 6; // maximum number of digits for time folder
timePrecision 6; // maximum number of digits for time folder
g (0 0 -9.8); // gravity vector (m/s2)
g (0 0 -9.8); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
@ -28,12 +28,12 @@ excludeObjects ();
// include the objects to be saved in the time folders
includeObject ();
integrationMethod AdamsBashforth2; // integration method
integrationMethod AdamsBashforth2; // integration method
integrationHistory off; // Do not save integration history on the disk
integrationHistory off; // Do not save integration history on the disk
writeFormat ascii; // data writting format (ascii or binary)
writeFormat ascii; // data writting format (ascii or binary)
timersReport Yes; // report timers (Yes or No)
timersReport Yes; // report timers (Yes or No)
timersReportInterval 0.05; // time interval for reporting timers
timersReportInterval 0.05; // time interval for reporting timers

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

View File

@ -47,9 +47,9 @@ positionParticles
method ordered; // other options: random or empty
orderedInfo
{
diameter 0.005; // minimum space between centers of particles
numPoints 30000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
distance 0.005; // minimum space between centers of particles
numPoints 30000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere

View File

View File

@ -1,49 +1,49 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
// Simulation domain: every particles that goes outside this domain will be deleted
globalBox
globalBox
{
min (-0.12 -0.12 0);
min (-0.12 -0.12 0);
max (0.12 0.12 0.1);
max (0.12 0.12 0.1);
}
boundaries
{
left
{
type exit; // other options: periodic, reflective
}
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -2,84 +2,82 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
motionModel rotatingAxis; // motion model can be rotatingAxis or stationary or vibrating
rotatingAxisInfo // information for rotatingAxis motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.214; // rotation speed (rad/s)
}
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.214; // rotation speed (rad/s)
}
}
surfaces
{
cylinder
{
type cylinderWall; // other options: cuboidWall and planeWall
cylinder
{
type cylinderWall; // other options: cuboidWall and planeWall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.1); // end point of cylinder axis
p2 (0.0 0.0 0.1); // end point of cylinder axis
radius1 0.12; // radius at p1
radius1 0.12; // radius at p1
radius2 0.12; // radius at p2
radius2 0.12; // radius at p2
resolution 24; // number of divisions
resolution 24; // number of divisions
material prop1; // material name of this wall
material prop1; // material name of this wall
motion rotAxis; // motion component name
}
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // other options: cuboidWall and cylinderWall
wall1
{
type planeWall; // other options: cuboidWall and cylinderWall
p1 (-0.12 -0.12 0.0); // first point of the wall
p1 (-0.12 -0.12 0.0); // first point of the wall
p2 (0.12 -0.12 0.0); // second point of the wall
p2 (0.12 -0.12 0.0); // second point of the wall
p3 (0.12 0.12 0.0); // third point of the wall
p3 (0.12 0.12 0.0); // third point of the wall
p4 (-0.12 0.12 0.0); // fourth point of the wall
p4 (-0.12 0.12 0.0); // fourth point of the wall
material prop1; // material name of the wall
material prop1; // material name of the wall
motion rotAxis; // motion component name
}
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // other options: cuboidWall and cylinderWall
/*
This is a plane wall at the front end of cylinder
*/
p1 (-0.12 -0.12 0.1); // first point of the wall
wall2
{
type planeWall; // other options: cuboidWall and cylinderWall
p2 (0.12 -0.12 0.1); // second point of the wall
p1 (-0.12 -0.12 0.1); // first point of the wall
p3 (0.12 0.12 0.1); // third point of the wall
p2 (0.12 -0.12 0.1); // second point of the wall
p4 (-0.12 0.12 0.1); // fourth point of the wall
p3 (0.12 0.12 0.1); // third point of the wall
material prop1; // material name of the wall
p4 (-0.12 0.12 0.1); // fourth point of the wall
material prop1; // material name of the wall
motion rotAxis; // motion component name
}
motion rotAxis; // motion component name
}
}

View File

@ -2,73 +2,74 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
setFields
{
/*
Default value for fields defined for particles:
/*
Default value for fields defined for particles:
These fields should always be defined for simulations with spherical particles
*/
These fields should always be defined for simulations with spherical particles
*/
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word smallSphere; // name of the particle shape
}
shapeName word smallSphere; // name of the particle shape
}
selectors
{
shapeAssigne
{
selector stridedRange; // other options: box, cylinder, sphere, randomPoints
selectors
{
shapeAssigne
{
selector stridedRange; // other options: box, cylinder, sphere, randomPoints
stridedRangeInfo
{
begin 0; // begin index of points
stridedRangeInfo
{
begin 0; // begin index of points
end 30000; // end index of points
end 30000; // end index of points
stride 3; // stride for selector
}
stride 3; // stride for selector
}
fieldValue // fields that the selector is applied to
{
shapeName word largeSphere; // sets shapeName of the selected points to largeSphere
}
}
}
fieldValue // fields that the selector is applied to
{
shapeName word largeSphere; // sets shapeName of the selected points to largeSphere
}
}
}
}
positionParticles // positions particles
positionParticles // positions particles
{
method ordered; // other options: random and empty
method ordered; // other options: random and empty
orderedInfo
{
diameter 0.005; // diameter of particles
orderedInfo
{
distance 0.005; // minimum distance between particles centers
numPoints 30000; // number of particles in the simulation
numPoints 30000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder information for positioning particles
{
p1 (0.0 0.0 0.003); // begin point of cylinder axis
cylinderInfo // cylinder information for positioning particles
{
p1 (0.0 0.0 0.003); // begin point of cylinder axis
p2 (0.0 0.0 0.097); // end point of cylinder axis
p2 (0.0 0.0 0.097); // end point of cylinder axis
radius 0.117; // radius of cylinder
}
radius 0.117; // radius of cylinder
}
}

View File

@ -2,37 +2,37 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run binarySystemofParticles;
dt 0.00001; // time step for integration (seconds)
dt 0.00001; // time step for integration (seconds)
startTime 0.0; // start time for simulation
startTime 0.0; // start time for simulation
endTime 10.0; // end time for simulation
endTime 10.0; // end time for simulation
saveInterval 0.1; // time interval for saving the simulation
saveInterval 0.1; // time interval for saving the simulation
timePrecision 6; // maximum number of digits for time folder
timePrecision 6; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
g (0 -9.8 0); // gravity vector (m/s2)
// save necessary (i.e., required) data on disk
includeObjects (diameter);
// exclude unnecessary data from saving on disk
excludeObjects ();
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
integrationMethod AdamsBashforth2; // integration method
integrationHistory off; // do not keep integration history on disk (saves space)
writeFormat ascii; // data writting format (ascii or binary)
writeFormat ascii; // data writting format (ascii or binary)
timersReport Yes; // report timers
timersReport Yes; // report timers
timersReportInterval 0.1; // time interval for reporting timers
timersReportInterval 0.1; // time interval for reporting timers

View File

@ -6,46 +6,46 @@ objectName particleInsertion;
objectType dicrionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
active Yes; // is insertion active -> yes or no
checkForCollision No; // is checked -> yes or no
active Yes; // is insertion active -> yes or no
checkForCollision No; // is checked -> yes or no
/*
one layers of particles are packed
one layer of particles are packed
*/
layer0
{
timeControl simulationTime;
timeControl simulationTime;
regionType cylinder; // type of insertion region
regionType cylinder; // type of insertion region
rate 15000; // insertion rate (particles/s)
rate 15000; // insertion rate (particles/s)
startTime 0; // (s)
startTime 0; // (s)
endTime 0.5; // (s)
endTime 0.5; // (s)
insertionInterval 0.025; // s
insertionInterval 0.025; // s
cylinderInfo
{
radius 0.09; // radius of cylinder (m)
cylinderInfo
{
radius 0.09; // radius of cylinder (m)
p1 ( 0.0 0.0 0.1 ); // (m,m,m)
p1 ( 0.0 0.0 0.1 ); // (m,m,m)
p2 ( 0.0 0.0 0.11); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles
}
mixture
{
lightSphere 1; // mixture composition of inserted particles
}
p2 ( 0.0 0.0 0.11); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles
}
mixture
{
lightSphere 1; // mixture composition of inserted particles
}
}

View File

@ -2,14 +2,15 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName sphereDict;
objectType sphereShape;
objectName sphereDict;
objectType sphereShape;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (lightSphere heavySphere); // names of shapes
diameters (0.007 0.007); // diameter of shapes
names (lightSphere heavySphere); // names of shapes
materials (lightMat heavyMat); // material names for shapes
diameters (0.007 0.007); // diameter of shapes
materials (lightMat heavyMat); // material names for shapes

View File

@ -2,64 +2,62 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
// Simulation domain: every particles that goes outside this domain will be deleted
globalBox
{
min (-0.11 -0.11 -0.41);
max ( 0.33 0.11 0.41);
min (-0.11 -0.11 -0.41);
max ( 0.33 0.11 0.41);
}
boundaries
{
// Determines how often (how many iterations) do you want to
// Determines how often (how many iterations) do you want to
// rebuild the list of particles in the neighbor list
// of all boundaries in the simulation domain
// rebuild the list of particles in the neighbor list
neighborListUpdateInterval 30;
// Determines how often do you want to update the new changes in the boundary
updateInterval 10;
// of all boundaries in the simulation domain
// The distance from the boundary plane within which particles are marked to be in the boundary list
neighborLength 0.004;
neighborListUpdateInterval 30;
// Determines how often do you want to update the new changes in the boundary
left
{
type exit; // other options: periodict, reflective
}
updateInterval 10;
right
{
type exit; // other options: periodict, reflective
}
// The distance from the boundary plane within which particles are marked to be in the boundary list
bottom
{
type exit; // other options: periodict, reflective
}
neighborLength 0.004;
top
{
type exit; // other options: periodict, reflective
}
left
{
type exit; // other options: periodict, reflective
}
rear
{
type exit; // other options: periodict, reflective
}
right
{
type exit; // other options: periodict, reflective
}
bottom
{
type exit; // other options: periodict, reflective
}
top
{
type exit; // other options: periodict, reflective
}
rear
{
type exit; // other options: periodict, reflective
}
front
{
type exit; // other options: periodict, reflective
}
front
{
type exit; // other options: periodict, reflective
}
}

View File

@ -2,11 +2,13 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
motionModel conveyorBelt; // motion model can be rotatingAxis or stationary or vibrating
// motion model can be rotatingAxis or stationary or vibrating
motionModel conveyorBelt;
conveyorBeltInfo
{
@ -18,63 +20,58 @@ conveyorBeltInfo
surfaces
{
cylinderShell
{
type cylinderWall; // other options: cuboidWall and planeWall
cylinderShell
{
type cylinderWall; // other options: cuboidWall and planeWall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.4); // end point of cylinder axis
p2 (0.0 0.0 0.4); // end point of cylinder axis
radius1 0.1; // radius at p1
radius1 0.1; // radius at p1
radius2 0.1; // radius at p2
radius2 0.1; // radius at p2
resolution 36; // number of divisions
resolution 36; // number of divisions
material wallMat; // material name of this wall
}
material wallMat; // material name of this wall
}
coneShell
{
type cylinderWall; // other options: cuboidWall and planeWall
coneShell
{
type cylinderWall; // other options: cuboidWall and planeWall
p1 (0.0 0.0 -0.1); // begin point of cylinder axis
p1 (0.0 0.0 -0.1); // begin point of cylinder axis
p2 (0.0 0.0 0.0); // end point of cylinder axis
p2 (0.0 0.0 0.0); // end point of cylinder axis
radius1 0.02; // radius at p1
radius1 0.02; // radius at p1
radius2 0.1; // radius at p2
radius2 0.1; // radius at p2
resolution 36; // number of divisions
resolution 36; // number of divisions
material wallMat; // material name of this wall
}
material wallMat; // material name of this wall
}
belt
{
type stlWall; // type of the wall
belt
{
type stlWall; // type of the wall
file belt.stl; // file name in stl folder
file belt.stl; // file name in stl folder
material wallMat; // material name of this wall
material wallMat; // material name of this wall
motion conveyorBelt1; // motion component name
}
motion conveyorBelt1; // motion component name
}
box
{
type stlWall; // type of the wall
box
{
type stlWall; // type of the wall
file box.stl; // file name in stl folder
file box.stl; // file name in stl folder
material wallMat; // material name of this wall
}
material wallMat; // material name of this wall
}
}

View File

@ -6,16 +6,14 @@ objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
setFields
{
/*
Default value for fields defined for particles
These fields should always be defined for simulations with
spherical particles.
*/
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
@ -31,17 +29,8 @@ setFields
{}
}
positionParticles // positions particles
positionParticles
{
method empty; // other options: ordered and random
regionType box; // other options: cylinder and sphere
boxInfo // box region for positioning particles
{
min (-0.08 -0.08 0.015); // lower corner point of the box
max ( 0.08 0.08 0.098); // upper corner point of the box
}
method empty; // other options: file, ordered and random
}

View File

@ -2,41 +2,39 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run layerdSiloFilling;
dt 0.00005; // time step for integration (s)
run conveyorBelt;
startTime 0.0; // start time for simulation
dt 0.00005; // time step for integration (s)
endTime 5.0; // end time for simulation
startTime 0.0; // start time for simulation
saveInterval 0.05; // time interval for saving the simulation
endTime 5.0; // end time for simulation
timePrecision 6; // maximum number of digits for time folder
saveInterval 0.05; // time interval for saving the simulation
g (0 0 -9.8); // gravity vector (m/s2)
timePrecision 6; // maximum number of digits for time folder
g (0 0 -9.8); // gravity vector (m/s2)
// save data objects that are not automatically saved on disk.
// overrides the default behavior
includeObjects (diameter);
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
integrationMethod AdamsBashforth2; // integration method
writeFormat ascii; // data writting format (ascii or binary)
writeFormat ascii; // data writting format (ascii or binary)
timersReport Yes; // report timers
timersReport Yes; // report timers
timersReportInterval 0.01; // time interval for reporting timers
timersReportInterval 0.01; // time interval for reporting timers

View File

@ -72,7 +72,7 @@ boundaries
## Running the Case
The solver for this simulation is `sphereGranFlow`. Enter the following commands in the terminal. Depending on the computational power, it may take a few minutes to a few hours to complete.
```sh
```
geometryPhasicFlow
particlesPhasicFlow
sphereGranFlow
@ -81,6 +81,6 @@ sphereGranFlow
## Post Processing
After finishing the simulation, you can render the results in ParaView. To convert the results to VTK format, just enter the following command in the terminal. This will convert all the results (particles and geometry) to VTK format and store them in the `VTK/` folder.
```sh
```
pFlowToVTK --binary
```

View File

@ -2,12 +2,12 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName sphereDict;
objectType sphereShape;
objectName sphereDict;
objectType sphereShape;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (sphere1); // names of shapes
names (sphere1); // names of shapes
diameters (0.004); // diameter of shapes
diameters (0.004); // diameter of shapes
materials (prop1); // material names for shapes
materials (prop1); // material names for shapes

View File

@ -2,8 +2,8 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/

View File

@ -2,33 +2,33 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
setFields
{
/*
Default value for fields defined for particles
These fields should always be defined for simulations with
spherical particles.
*/
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
/*
Default value for fields defined for particles
These fields should always be defined for simulations with
spherical particles.
*/
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word sphere1; // name of the particle shape
}
shapeName word sphere1; // name of the particle shape
}
selectors
{}
selectors
{}
}
positionParticles
{
method empty; // no particle at the start of simulation
method empty; // no particle at the start of simulation
}

View File

@ -24,17 +24,11 @@ g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1
rVelocity.dy2
rVelocity.dy3
pStructPosition.dy1
pStructPosition.dy2
pStructPosition.dy3
pStructVelocity.dy1
pStructVelocity.dy2
pStructVelocity.dy3);
excludeObjects ();
integrationMethod AdamsBashforth4; // integration method
integrationMethod AdamsBashforth4; // integration method
integrationHistory off; // to save space on disk
writeFormat ascii; // data writting format (ascii or binary)

View File

@ -3,7 +3,7 @@
## Problem
A homogenization silo is used to mix particles inside a silo using the circulation of particles. A pneumatic conveying system carries particles from the exit and re-enters them from the top. Here, we use a `periodic` boundary to simulate the action of the pneumatic conveyor system for circulating particles. Particles exiting from the bottom are re-entered from the top using this boundary (`periodic`).
The simulation case setup is essentially similar to the [`layeredSiloFilling`](https://github.com/PhasicFlow/phasicFlow/tree/main/tutorials/sphereGranFlow/layeredSiloFilling) tutorial. There is also another change with regard to `layeredSiloFilling`. The exit gate is opened after the filling phase of the silo (see `settings/geometryDict` for more details).
The simulation case setup is essentially similar to the [`layeredSiloFilling`](../layeredSiloFilling/) tutorial. There is also another change with regard to `layeredSiloFilling`. The exit gate is opened after the filling phase of the silo (see `settings/geometryDict` for more details).
<div align ="center">
<img src="./homoSilo.jpeg" style="width: 400px;">

View File

@ -37,7 +37,6 @@ model
heavyMat-heavyMat heavyMat-wallMat
wallMat-wallMat );
*/
Yeff (1.0e6 1.0e6 1.0e6 // Young modulus [Pa]
1.0e6 1.0e6
1.0e6);

View File

@ -26,189 +26,185 @@ layer0
insertionInterval 0.025; // s
cylinderInfo
{
radius 0.09; // radius of cylinder (m)
cylinderInfo
{
radius 0.09; // radius of cylinder (m)
p1 (0.0 0.0 0.1); // (m,m,m)
p1 (0.0 0.0 0.1); // (m,m,m)
p2 (0.0 0.0 0.11); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles
}
mixture
{
parType1 1; // mixture composition of inserted particles
}
p2 (0.0 0.0 0.11); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles
}
mixture
{
parType1 1; // mixture composition of inserted particles
}
}
layer1
{
timeControl simulationTime;
timeControl simulationTime;
regionType cylinder; // type of insertion region
regionType cylinder; // type of insertion region
rate 5100; // insertion rate (particles/s)
rate 5100; // insertion rate (particles/s)
startTime 0.7; // (s)
startTime 0.7; // (s)
endTime 1.2; // (s)
endTime 1.2; // (s)
insertionInterval 0.025; // s
insertionInterval 0.025; // s
cylinderInfo
{
radius 0.09;
p1 (0.0 0.0 0.16 ); // (m,m,m)
p2 (0.0 0.0 0.17); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6);
}
mixture
{
parType2 1; // only parType2
}
cylinderInfo
{
radius 0.09;
p1 (0.0 0.0 0.16 ); // (m,m,m)
p2 (0.0 0.0 0.17); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6);
}
mixture
{
parType2 1; // only parType2
}
}
layer2
{
timeControl simulationTime;
timeControl simulationTime;
regionType cylinder; // type of insertion region
regionType cylinder; // type of insertion region
rate 5100; // insertion rate (particles/s)
rate 5100; // insertion rate (particles/s)
startTime 1.4; // (s)
startTime 1.4; // (s)
endTime 1.9; // (s)
endTime 1.9; // (s)
insertionInterval 0.025; // s
insertionInterval 0.025; // s
cylinderInfo
{
radius 0.09;
p1 ( 0.0 0.0 0.2 ); // (m,m,m)
p2 ( 0.0 0.0 0.21); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6);
}
mixture
{
parType1 1; // only parType1
}
cylinderInfo
{
radius 0.09;
p1 ( 0.0 0.0 0.2 ); // (m,m,m)
p2 ( 0.0 0.0 0.21); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6);
}
mixture
{
parType1 1; // only parType1
}
}
layer3
{
timeControl simulationTime;
timeControl simulationTime;
regionType cylinder; // type of insertion region
regionType cylinder; // type of insertion region
rate 5100; // insertion rate (particles/s)
rate 5100; // insertion rate (particles/s)
startTime 2.1; // (s)
startTime 2.1; // (s)
endTime 2.6; // (s)
endTime 2.6; // (s)
insertionInterval 0.025; // s
insertionInterval 0.025; // s
cylinderInfo
{
radius 0.09;
p1 ( 0.0 0.0 0.28 ); // (m,m,m)
p2 ( 0.0 0.0 0.29); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6);
}
mixture
{
parType2 1;
}
cylinderInfo
{
radius 0.09;
p1 ( 0.0 0.0 0.28 ); // (m,m,m)
p2 ( 0.0 0.0 0.29); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6);
}
mixture
{
parType2 1;
}
}
layer4
{
timeControl simulationTime;
timeControl simulationTime;
regionType cylinder; // type of insertion region
regionType cylinder; // type of insertion region
rate 5100; // insertion rate (particles/s)
rate 5100; // insertion rate (particles/s)
startTime 2.8; // (s)
startTime 2.8; // (s)
endTime 3.3; // (s)
endTime 3.3; // (s)
insertionInterval 0.025; // s
insertionInterval 0.025; // s
cylinderInfo
{
radius 0.09;
p1 ( 0.0 0.0 0.37 ); // (m,m,m)
p2 ( 0.0 0.0 0.38); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6);
}
mixture
{
parType1 1;
}
cylinderInfo
{
radius 0.09;
p1 ( 0.0 0.0 0.37 ); // (m,m,m)
p2 ( 0.0 0.0 0.38); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6);
}
mixture
{
parType1 1;
}
}
layer5
{
timeControl simulationTime;
timeControl simulationTime;
regionType cylinder; // type of insertion region
regionType cylinder; // type of insertion region
rate 5100; // insertion rate (particles/s)
rate 5100; // insertion rate (particles/s)
startTime 3.4; // (s)
startTime 3.4; // (s)
endTime 3.9; // (s)
endTime 3.9; // (s)
insertionInterval 0.025; // s
insertionInterval 0.025; // s
cylinderInfo
{
radius 0.09;
p1 ( 0.0 0.0 0.38 ); // (m,m,m)
p2 ( 0.0 0.0 0.39); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6);
}
mixture
{
parType2 1;
}
cylinderInfo
{
radius 0.09;
p1 ( 0.0 0.0 0.38 ); // (m,m,m)
p2 ( 0.0 0.0 0.39); // (m,m,m)
}
setFields
{
velocity realx3 (0.0 0.0 -0.6);
}
mixture
{
parType2 1;
}
}

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