mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-08-17 03:47:04 +00:00
Compare commits
40 Commits
local-MPI
...
fc1f97ae80
Author | SHA1 | Date | |
---|---|---|---|
fc1f97ae80 | |||
53e6d6a02f | |||
ee8c545bef | |||
42315d2221 | |||
c340040b40 | |||
e62ba11a8d | |||
1b949e9eda | |||
9257823b7e | |||
35b32db30e | |||
67559d5c6e | |||
3cc3792e08 | |||
b1ec396a1b | |||
a74e38bbec | |||
26bbdd3dce | |||
73ea794687 | |||
1b557c8514 | |||
b2cfb57c82 | |||
a3c3ca1b84 | |||
94f892f06f | |||
e900128ee7 | |||
75a0f311eb | |||
890dee4021 | |||
4ba301f9d0 | |||
d0c76e2fc4 | |||
c90f775156 | |||
b7f051e099 | |||
ae8ca0d41b | |||
9f17a79fbc | |||
be086ffb67 | |||
a18936c8ec | |||
21a7d0ab4d | |||
c89a297e6f | |||
832d1fb16b | |||
e8ee35791f | |||
a570432f84 | |||
0e4a041ffb | |||
51c6f925d8 | |||
9fb8abb166 | |||
90a8fff673 | |||
a05225ce53 |
@ -66,12 +66,13 @@ pFlow::uniquePtr<pFlow::DEMSystem>
|
|||||||
word demSystemName,
|
word demSystemName,
|
||||||
const std::vector<box>& domains,
|
const std::vector<box>& domains,
|
||||||
int argc,
|
int argc,
|
||||||
char* argv[]
|
char* argv[],
|
||||||
|
bool requireRVel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if( wordvCtorSelector_.search(demSystemName) )
|
if( wordvCtorSelector_.search(demSystemName) )
|
||||||
{
|
{
|
||||||
return wordvCtorSelector_[demSystemName] (demSystemName, domains, argc, argv);
|
return wordvCtorSelector_[demSystemName] (demSystemName, domains, argc, argv, requireRVel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -71,13 +71,15 @@ public:
|
|||||||
word demSystemName,
|
word demSystemName,
|
||||||
const std::vector<box>& domains,
|
const std::vector<box>& domains,
|
||||||
int argc,
|
int argc,
|
||||||
char* argv[]
|
char* argv[],
|
||||||
|
bool requireRVel
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
demSystemName,
|
demSystemName,
|
||||||
domains,
|
domains,
|
||||||
argc,
|
argc,
|
||||||
argv
|
argv,
|
||||||
|
requireRVel
|
||||||
));
|
));
|
||||||
|
|
||||||
realx3 g()const
|
realx3 g()const
|
||||||
@ -119,7 +121,10 @@ public:
|
|||||||
span<const int32> parIndexInDomain(int32 domIndx)const = 0;
|
span<const int32> parIndexInDomain(int32 domIndx)const = 0;
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
span<real> diameter() = 0;
|
span<real> diameter() = 0;
|
||||||
|
|
||||||
|
virtual
|
||||||
|
span<uint32> particleId() = 0;
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
span<real> courseGrainFactor() = 0;
|
span<real> courseGrainFactor() = 0;
|
||||||
@ -176,7 +181,8 @@ public:
|
|||||||
word demSystemName,
|
word demSystemName,
|
||||||
const std::vector<box>& domains,
|
const std::vector<box>& domains,
|
||||||
int argc,
|
int argc,
|
||||||
char* argv[]);
|
char* argv[],
|
||||||
|
bool requireRVel=false);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -163,6 +163,12 @@ pFlow::grainDEMSystem::parIndexInDomain(int32 di)const
|
|||||||
return particleDistribution_->particlesInDomain(di);
|
return particleDistribution_->particlesInDomain(di);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pFlow::span<pFlow::uint32> pFlow::grainDEMSystem::particleId()
|
||||||
|
{
|
||||||
|
return span<uint32>(particleIdHost_.data(), particleIdHost_.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
pFlow::span<pFlow::real> pFlow::grainDEMSystem::diameter()
|
pFlow::span<pFlow::real> pFlow::grainDEMSystem::diameter()
|
||||||
{
|
{
|
||||||
return span<real>(diameterHost_.data(), diameterHost_.size());
|
return span<real>(diameterHost_.data(), diameterHost_.size());
|
||||||
@ -233,6 +239,7 @@ bool pFlow::grainDEMSystem::beforeIteration()
|
|||||||
velocityHost_ = std::as_const(particles_()).velocity().hostView();
|
velocityHost_ = std::as_const(particles_()).velocity().hostView();
|
||||||
positionHost_ = std::as_const(particles_()).pointPosition().hostView();
|
positionHost_ = std::as_const(particles_()).pointPosition().hostView();
|
||||||
diameterHost_ = particles_->diameter().hostView();
|
diameterHost_ = particles_->diameter().hostView();
|
||||||
|
particleIdHost_ = particles_->particleId().hostView();
|
||||||
|
|
||||||
if(requireRVel_)
|
if(requireRVel_)
|
||||||
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
|
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
|
||||||
|
@ -63,6 +63,8 @@ protected:
|
|||||||
|
|
||||||
ViewType1D<real, HostSpace> diameterHost_;
|
ViewType1D<real, HostSpace> diameterHost_;
|
||||||
|
|
||||||
|
ViewType1D<uint32, HostSpace> particleIdHost_;
|
||||||
|
|
||||||
bool requireRVel_ = false;
|
bool requireRVel_ = false;
|
||||||
|
|
||||||
ViewType1D<realx3, HostSpace> rVelocityHost_;
|
ViewType1D<realx3, HostSpace> rVelocityHost_;
|
||||||
@ -122,6 +124,8 @@ public:
|
|||||||
|
|
||||||
span<const int32> parIndexInDomain(int32 di)const override;
|
span<const int32> parIndexInDomain(int32 di)const override;
|
||||||
|
|
||||||
|
span<uint32> particleId() override;
|
||||||
|
|
||||||
span<real> diameter() override;
|
span<real> diameter() override;
|
||||||
|
|
||||||
span<real> courseGrainFactor() override;
|
span<real> courseGrainFactor() override;
|
||||||
|
@ -165,6 +165,11 @@ pFlow::sphereDEMSystem::parIndexInDomain(int32 di)const
|
|||||||
return particleDistribution_->particlesInDomain(di);
|
return particleDistribution_->particlesInDomain(di);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pFlow::span<pFlow::uint32> pFlow::sphereDEMSystem::particleId()
|
||||||
|
{
|
||||||
|
return span<uint32>();
|
||||||
|
}
|
||||||
|
|
||||||
pFlow::span<pFlow::real> pFlow::sphereDEMSystem::diameter()
|
pFlow::span<pFlow::real> pFlow::sphereDEMSystem::diameter()
|
||||||
{
|
{
|
||||||
return span<real>(diameterHost_.data(), diameterHost_.size());
|
return span<real>(diameterHost_.data(), diameterHost_.size());
|
||||||
@ -235,6 +240,7 @@ bool pFlow::sphereDEMSystem::beforeIteration()
|
|||||||
velocityHost_ = std::as_const(particles_()).velocity().hostView();
|
velocityHost_ = std::as_const(particles_()).velocity().hostView();
|
||||||
positionHost_ = std::as_const(particles_()).pointPosition().hostView();
|
positionHost_ = std::as_const(particles_()).pointPosition().hostView();
|
||||||
diameterHost_ = particles_->diameter().hostView();
|
diameterHost_ = particles_->diameter().hostView();
|
||||||
|
particleIdHost_ = particles_->particleId().hostView();
|
||||||
|
|
||||||
if(requireRVel_)
|
if(requireRVel_)
|
||||||
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
|
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
|
||||||
|
@ -63,6 +63,8 @@ protected:
|
|||||||
|
|
||||||
ViewType1D<real, HostSpace> diameterHost_;
|
ViewType1D<real, HostSpace> diameterHost_;
|
||||||
|
|
||||||
|
ViewType1D<uint32, HostSpace> particleIdHost_;
|
||||||
|
|
||||||
bool requireRVel_ = false;
|
bool requireRVel_ = false;
|
||||||
|
|
||||||
ViewType1D<realx3, HostSpace> rVelocityHost_;
|
ViewType1D<realx3, HostSpace> rVelocityHost_;
|
||||||
@ -122,6 +124,8 @@ public:
|
|||||||
|
|
||||||
span<const int32> parIndexInDomain(int32 di)const override;
|
span<const int32> parIndexInDomain(int32 di)const override;
|
||||||
|
|
||||||
|
span<uint32> particleId() override;
|
||||||
|
|
||||||
span<real> diameter() override;
|
span<real> diameter() override;
|
||||||
|
|
||||||
span<real> courseGrainFactor() override;
|
span<real> courseGrainFactor() override;
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
|
||||||
| phasicFlow File |
|
|
||||||
| copyright: www.cemf.ir |
|
|
||||||
\* ------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
objectName particleInsertion;
|
|
||||||
objectType dicrionary;
|
|
||||||
|
|
||||||
|
|
||||||
active yes; // is insertion active?
|
|
||||||
|
|
||||||
collisionCheck No; // not implemented for yes
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
particleInlet1
|
|
||||||
{
|
|
||||||
type boxRegion; // type of insertion region
|
|
||||||
rate 1000000; // insertion rate (particles/s)
|
|
||||||
startTime 0; // (s)
|
|
||||||
endTime 2.0; // (s)
|
|
||||||
interval 0.05; //s
|
|
||||||
|
|
||||||
boxRegionInfo
|
|
||||||
{
|
|
||||||
min ( -0.17 0.23 0.46); // (m,m,m)
|
|
||||||
max ( 0.17 0.24 0.88); // (m,m,m)
|
|
||||||
}
|
|
||||||
|
|
||||||
setFields
|
|
||||||
{
|
|
||||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
|
||||||
}
|
|
||||||
|
|
||||||
mixture
|
|
||||||
{
|
|
||||||
smallParticle 1; // mixture composition of inserted particles
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
particleInlet2
|
|
||||||
{
|
|
||||||
type boxRegion; // type of insertion region
|
|
||||||
rate 1000000; // insertion rate (particles/s)
|
|
||||||
startTime 0; // (s)
|
|
||||||
endTime 2.0; // (s)
|
|
||||||
interval 0.05; //s
|
|
||||||
|
|
||||||
boxRegionInfo
|
|
||||||
{
|
|
||||||
min ( -0.17 0.23 0.02); // (m,m,m)
|
|
||||||
max ( 0.17 0.24 0.44); // (m,m,m)
|
|
||||||
}
|
|
||||||
|
|
||||||
setFields
|
|
||||||
{
|
|
||||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
|
||||||
}
|
|
||||||
|
|
||||||
mixture
|
|
||||||
{
|
|
||||||
largeParticle 1; // mixture composition of inserted particles
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
|
||||||
| phasicFlow File |
|
|
||||||
| copyright: www.cemf.ir |
|
|
||||||
\* ------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
objectName sphereDict;
|
|
||||||
objectType sphereShape;
|
|
||||||
|
|
||||||
names (smallParticle largeParticle); // names of shapes
|
|
||||||
diameters (0.002 0.00201); // diameter of shapes
|
|
||||||
materials (glassMat glassMat); // material names for shapes
|
|
@ -2,18 +2,21 @@
|
|||||||
| phasicFlow File |
|
| phasicFlow File |
|
||||||
| copyright: www.cemf.ir |
|
| copyright: www.cemf.ir |
|
||||||
\* ------------------------------------------------------------------------- */
|
\* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
objectName interaction;
|
objectName interaction;
|
||||||
objectType dicrionary;
|
objectType dicrionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
materials (glassMat wallMat); // a list of materials names
|
materials (glassMat wallMat); // a list of materials names
|
||||||
|
|
||||||
densities (2500.0 2500); // density of materials [kg/m3]
|
densities (2500.0 2500); // density of materials [kg/m3]
|
||||||
|
|
||||||
contactListType sortedContactList;
|
contactListType sortedContactList;
|
||||||
|
|
||||||
model
|
model
|
||||||
{
|
{
|
||||||
contactForceModel nonLinearLimited;
|
contactForceModel nonLinearLimited;
|
||||||
|
|
||||||
rollingFrictionModel normal;
|
rollingFrictionModel normal;
|
||||||
|
|
||||||
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
|
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
|
||||||
@ -28,9 +31,6 @@ model
|
|||||||
en (0.97 0.85 // coefficient of normal restitution
|
en (0.97 0.85 // coefficient of normal restitution
|
||||||
1.00);
|
1.00);
|
||||||
|
|
||||||
et (1.0 1.0 // coefficient of tangential restitution
|
|
||||||
1.0);
|
|
||||||
|
|
||||||
mu (0.65 0.65 // dynamic friction
|
mu (0.65 0.65 // dynamic friction
|
||||||
0.65);
|
0.65);
|
||||||
|
|
||||||
@ -41,19 +41,13 @@ model
|
|||||||
|
|
||||||
contactSearch
|
contactSearch
|
||||||
{
|
{
|
||||||
method NBS;
|
method NBS;
|
||||||
wallMapping cellMapping;
|
|
||||||
|
|
||||||
NBSInfo
|
updateInterval 10;
|
||||||
{
|
|
||||||
updateFrequency 10; // each 20 timesteps, update neighbor list
|
|
||||||
sizeRatio 1.1; // bounding box size to particle diameter (max)
|
|
||||||
}
|
|
||||||
|
|
||||||
cellMappingInfo
|
sizeRatio 1.1;
|
||||||
{
|
|
||||||
updateFrequency 10; // each 20 timesteps, update neighbor list
|
|
||||||
cellExtent 0.6; // bounding box for particle-wall search (> 0.5)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
cellExtent 0.55;
|
||||||
|
|
||||||
|
adjustableBox Yes;
|
||||||
}
|
}
|
72
benchmarks/helicalMixer/helicalMixer_1m/caseSetup/particleInsertion
Executable file
72
benchmarks/helicalMixer/helicalMixer_1m/caseSetup/particleInsertion
Executable file
@ -0,0 +1,72 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particleInsertion;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
active yes; // is insertion active?
|
||||||
|
|
||||||
|
particleInlet1
|
||||||
|
{
|
||||||
|
regionType box; // type of insertion region
|
||||||
|
|
||||||
|
rate 250000; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
startTime 0; // (s)
|
||||||
|
|
||||||
|
endTime 2.0; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.05; //s
|
||||||
|
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min (-0.17 0.23 0.46); // (m,m,m)
|
||||||
|
max ( 0.17 0.24 0.88); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
smallParticle 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
particleInlet2
|
||||||
|
{
|
||||||
|
regionType box; // type of insertion region
|
||||||
|
|
||||||
|
rate 250000; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
startTime 0; // (s)
|
||||||
|
|
||||||
|
endTime 2.0; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.05; //s
|
||||||
|
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min ( -0.17 0.23 0.02); // (m,m,m)
|
||||||
|
max ( 0.17 0.24 0.44); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
largeParticle 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
|
}
|
@ -2,13 +2,11 @@
|
|||||||
| phasicFlow File |
|
| phasicFlow File |
|
||||||
| copyright: www.cemf.ir |
|
| copyright: www.cemf.ir |
|
||||||
\* ------------------------------------------------------------------------- */
|
\* ------------------------------------------------------------------------- */
|
||||||
objectName particleInsertion;
|
objectName shapes;
|
||||||
objectType dicrionary;
|
objectType dictionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
active no; // is insertion active?
|
names (smallParticle largeParticle); // names of shapes
|
||||||
|
diameters (0.004 0.00401); // diameter of shapes
|
||||||
collisionCheck No; // not implemented for yes
|
materials (glassMat glassMat); // material names for shapes
|
||||||
|
|
||||||
|
|
@ -3,5 +3,5 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
|
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
|
||||||
rm -rf VTK
|
rm -rf VTK
|
||||||
|
rm -rf stl
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
32
benchmarks/helicalMixer/helicalMixer_1m/runThisCase
Executable file
32
benchmarks/helicalMixer/helicalMixer_1m/runThisCase
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "0) Copying stl files"
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
mkdir -p stl
|
||||||
|
cp -rfv $pFlow_PROJECT_DIR/resources/stls/helicalMixer/* ./stl/
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "4) Converting to VtK"
|
||||||
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
|
pFlowToVTK -f diameter id velocity --binary
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
49
benchmarks/helicalMixer/helicalMixer_1m/settings/domainDict
Executable file
49
benchmarks/helicalMixer/helicalMixer_1m/settings/domainDict
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName domainDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// Simulation domain
|
||||||
|
globalBox
|
||||||
|
{
|
||||||
|
min (-0.19 -0.19 -0.02);
|
||||||
|
max ( 0.19 0.26 0.92);
|
||||||
|
}
|
||||||
|
|
||||||
|
boundaries
|
||||||
|
{
|
||||||
|
|
||||||
|
left
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
right
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
top
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
rear
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName geometryDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// motion model: rotating object around an axis
|
||||||
|
motionModel rotatingAxis;
|
||||||
|
|
||||||
|
rotatingAxisInfo
|
||||||
|
{
|
||||||
|
rotAxis
|
||||||
|
{
|
||||||
|
// end points of axis
|
||||||
|
p1 (0 0 0);
|
||||||
|
p2 (0 0 1);
|
||||||
|
|
||||||
|
// rotation speed (rad/s) => 30 rpm
|
||||||
|
omega 3.1428;
|
||||||
|
|
||||||
|
// interval for rotation of axis
|
||||||
|
startTime 2.5;
|
||||||
|
endTime 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
surfaces
|
||||||
|
{
|
||||||
|
|
||||||
|
helix
|
||||||
|
{
|
||||||
|
type stlWall; // type of the wall
|
||||||
|
file helix2.stl; // file name in stl folder
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
motion rotAxis; // motion component name
|
||||||
|
}
|
||||||
|
|
||||||
|
shell
|
||||||
|
{
|
||||||
|
type stlWall; // type of the wall
|
||||||
|
file shell2.stl; // file name in stl folder
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
motion none; // motion component name
|
||||||
|
}
|
||||||
|
|
||||||
|
plug
|
||||||
|
{
|
||||||
|
type planeWall;
|
||||||
|
p1 (-0.075 -0.185 0.375);
|
||||||
|
p2 ( 0.075 -0.185 0.375);
|
||||||
|
p3 ( 0.075 -0.185 0.525);
|
||||||
|
p4 (-0.075 -0.185 0.525);
|
||||||
|
material wallMat;
|
||||||
|
motion none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particlesDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
defaultValue
|
||||||
|
{
|
||||||
|
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||||
|
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||||
|
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||||
|
shapeName word smallParticle; // name of the particle shape
|
||||||
|
}
|
||||||
|
|
||||||
|
selectors
|
||||||
|
{}
|
||||||
|
}
|
||||||
|
|
||||||
|
positionParticles
|
||||||
|
{
|
||||||
|
method empty; // creates the required fields with zero particles (empty).
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName settingsDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
run helicalMixer;
|
||||||
|
|
||||||
|
dt 0.00001; // time step for integration (s)
|
||||||
|
|
||||||
|
startTime 0; // start time for simulation
|
||||||
|
|
||||||
|
endTime 7.5; // end time for simulation
|
||||||
|
|
||||||
|
saveInterval 0.05; // time interval for saving the simulation
|
||||||
|
|
||||||
|
timePrecision 4; // maximum number of digits for time folder
|
||||||
|
|
||||||
|
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 ();
|
||||||
|
|
||||||
|
integrationMethod AdamsBashforth2; // integration method
|
||||||
|
|
||||||
|
integrationHistory off; // Do not save integration history on the disk
|
||||||
|
|
||||||
|
writeFormat binary; // data writting format (ascii or binary)
|
||||||
|
|
||||||
|
timersReport Yes; // report timers (Yes or No)
|
||||||
|
|
||||||
|
timersReportInterval 0.05; // time interval for reporting timers
|
53
benchmarks/helicalMixer/helicalMixer_250K/caseSetup/interaction
Executable file
53
benchmarks/helicalMixer/helicalMixer_250K/caseSetup/interaction
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName interaction;
|
||||||
|
objectType dicrionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
materials (glassMat wallMat); // a list of materials names
|
||||||
|
|
||||||
|
densities (2500.0 2500); // density of materials [kg/m3]
|
||||||
|
|
||||||
|
contactListType sortedContactList;
|
||||||
|
|
||||||
|
model
|
||||||
|
{
|
||||||
|
contactForceModel nonLinearLimited;
|
||||||
|
|
||||||
|
rollingFrictionModel normal;
|
||||||
|
|
||||||
|
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
|
||||||
|
1.0e6);
|
||||||
|
|
||||||
|
Geff (0.8e6 0.8e6 // Shear modulus [Pa]
|
||||||
|
0.8e6);
|
||||||
|
|
||||||
|
nu (0.25 0.25 // Poisson's ratio [-]
|
||||||
|
0.25);
|
||||||
|
|
||||||
|
en (0.97 0.85 // coefficient of normal restitution
|
||||||
|
1.00);
|
||||||
|
|
||||||
|
mu (0.65 0.65 // dynamic friction
|
||||||
|
0.65);
|
||||||
|
|
||||||
|
mur (0.1 0.1 // rolling friction
|
||||||
|
0.1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
contactSearch
|
||||||
|
{
|
||||||
|
method NBS;
|
||||||
|
|
||||||
|
updateInterval 10;
|
||||||
|
|
||||||
|
sizeRatio 1.1;
|
||||||
|
|
||||||
|
cellExtent 0.55;
|
||||||
|
|
||||||
|
adjustableBox Yes;
|
||||||
|
}
|
72
benchmarks/helicalMixer/helicalMixer_250K/caseSetup/particleInsertion
Executable file
72
benchmarks/helicalMixer/helicalMixer_250K/caseSetup/particleInsertion
Executable file
@ -0,0 +1,72 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particleInsertion;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
active yes; // is insertion active?
|
||||||
|
|
||||||
|
particleInlet1
|
||||||
|
{
|
||||||
|
regionType box; // type of insertion region
|
||||||
|
|
||||||
|
rate 62500; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
startTime 0; // (s)
|
||||||
|
|
||||||
|
endTime 2.0; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.05; //s
|
||||||
|
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min (-0.17 0.23 0.46); // (m,m,m)
|
||||||
|
max ( 0.17 0.24 0.88); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
smallParticle 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
particleInlet2
|
||||||
|
{
|
||||||
|
regionType box; // type of insertion region
|
||||||
|
|
||||||
|
rate 62500; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
startTime 0; // (s)
|
||||||
|
|
||||||
|
endTime 2.0; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.05; //s
|
||||||
|
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min ( -0.17 0.23 0.02); // (m,m,m)
|
||||||
|
max ( 0.17 0.24 0.44); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
largeParticle 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
|
}
|
12
benchmarks/helicalMixer/helicalMixer_250K/caseSetup/shapes
Executable file
12
benchmarks/helicalMixer/helicalMixer_250K/caseSetup/shapes
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName shapes;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
names (smallParticle largeParticle); // names of shapes
|
||||||
|
diameters (0.006 0.00601); // diameter of shapes
|
||||||
|
materials (glassMat glassMat); // material names for shapes
|
8
benchmarks/helicalMixer/helicalMixer_250K/cleanThisCase
Executable file
8
benchmarks/helicalMixer/helicalMixer_250K/cleanThisCase
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/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
|
||||||
|
rm -rf stl
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
@ -1,5 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "0) Copying stl files"
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
mkdir -p stl
|
||||||
|
cp -rfv $pFlow_PROJECT_DIR/resources/stls/helicalMixer/* ./stl/
|
||||||
echo "\n<--------------------------------------------------------------------->"
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
echo "1) Creating particles"
|
echo "1) Creating particles"
|
||||||
echo "<--------------------------------------------------------------------->\n"
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
@ -18,6 +25,6 @@ sphereGranFlow
|
|||||||
echo "\n<--------------------------------------------------------------------->"
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
echo "4) Converting to VtK"
|
echo "4) Converting to VtK"
|
||||||
echo "<--------------------------------------------------------------------->\n"
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
pFlowToVTK -f diameter id velocity
|
pFlowToVTK -f diameter id velocity --binary
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
49
benchmarks/helicalMixer/helicalMixer_250K/settings/domainDict
Executable file
49
benchmarks/helicalMixer/helicalMixer_250K/settings/domainDict
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName domainDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// Simulation domain
|
||||||
|
globalBox
|
||||||
|
{
|
||||||
|
min (-0.19 -0.19 -0.02);
|
||||||
|
max ( 0.19 0.26 0.92);
|
||||||
|
}
|
||||||
|
|
||||||
|
boundaries
|
||||||
|
{
|
||||||
|
|
||||||
|
left
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
right
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
top
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
rear
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName geometryDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// motion model: rotating object around an axis
|
||||||
|
motionModel rotatingAxis;
|
||||||
|
|
||||||
|
rotatingAxisInfo
|
||||||
|
{
|
||||||
|
rotAxis
|
||||||
|
{
|
||||||
|
// end points of axis
|
||||||
|
p1 (0 0 0);
|
||||||
|
p2 (0 0 1);
|
||||||
|
|
||||||
|
// rotation speed (rad/s) => 30 rpm
|
||||||
|
omega 3.1428;
|
||||||
|
|
||||||
|
// interval for rotation of axis
|
||||||
|
startTime 2.5;
|
||||||
|
endTime 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
surfaces
|
||||||
|
{
|
||||||
|
|
||||||
|
helix
|
||||||
|
{
|
||||||
|
type stlWall; // type of the wall
|
||||||
|
file helix2.stl; // file name in stl folder
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
motion rotAxis; // motion component name
|
||||||
|
}
|
||||||
|
|
||||||
|
shell
|
||||||
|
{
|
||||||
|
type stlWall; // type of the wall
|
||||||
|
file shell2.stl; // file name in stl folder
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
motion none; // motion component name
|
||||||
|
}
|
||||||
|
|
||||||
|
plug
|
||||||
|
{
|
||||||
|
type planeWall;
|
||||||
|
p1 (-0.075 -0.185 0.375);
|
||||||
|
p2 ( 0.075 -0.185 0.375);
|
||||||
|
p3 ( 0.075 -0.185 0.525);
|
||||||
|
p4 (-0.075 -0.185 0.525);
|
||||||
|
material wallMat;
|
||||||
|
motion none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particlesDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
defaultValue
|
||||||
|
{
|
||||||
|
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||||
|
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||||
|
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||||
|
shapeName word smallParticle; // name of the particle shape
|
||||||
|
}
|
||||||
|
|
||||||
|
selectors
|
||||||
|
{}
|
||||||
|
}
|
||||||
|
|
||||||
|
positionParticles
|
||||||
|
{
|
||||||
|
method empty; // creates the required fields with zero particles (empty).
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName settingsDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
run helicalMixer;
|
||||||
|
|
||||||
|
dt 0.00001; // time step for integration (s)
|
||||||
|
|
||||||
|
startTime 0; // start time for simulation
|
||||||
|
|
||||||
|
endTime 7.5; // end time for simulation
|
||||||
|
|
||||||
|
saveInterval 0.05; // time interval for saving the simulation
|
||||||
|
|
||||||
|
timePrecision 4; // maximum number of digits for time folder
|
||||||
|
|
||||||
|
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 ();
|
||||||
|
|
||||||
|
integrationMethod AdamsBashforth2; // integration method
|
||||||
|
|
||||||
|
integrationHistory off; // Do not save integration history on the disk
|
||||||
|
|
||||||
|
writeFormat binary; // data writting format (ascii or binary)
|
||||||
|
|
||||||
|
timersReport Yes; // report timers (Yes or No)
|
||||||
|
|
||||||
|
timersReportInterval 0.05; // time interval for reporting timers
|
53
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/interaction
Executable file
53
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/interaction
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName interaction;
|
||||||
|
objectType dicrionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
materials (glassMat wallMat); // a list of materials names
|
||||||
|
|
||||||
|
densities (2500.0 2500); // density of materials [kg/m3]
|
||||||
|
|
||||||
|
contactListType sortedContactList;
|
||||||
|
|
||||||
|
model
|
||||||
|
{
|
||||||
|
contactForceModel nonLinearLimited;
|
||||||
|
|
||||||
|
rollingFrictionModel normal;
|
||||||
|
|
||||||
|
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
|
||||||
|
1.0e6);
|
||||||
|
|
||||||
|
Geff (0.8e6 0.8e6 // Shear modulus [Pa]
|
||||||
|
0.8e6);
|
||||||
|
|
||||||
|
nu (0.25 0.25 // Poisson's ratio [-]
|
||||||
|
0.25);
|
||||||
|
|
||||||
|
en (0.97 0.85 // coefficient of normal restitution
|
||||||
|
1.00);
|
||||||
|
|
||||||
|
mu (0.65 0.65 // dynamic friction
|
||||||
|
0.65);
|
||||||
|
|
||||||
|
mur (0.1 0.1 // rolling friction
|
||||||
|
0.1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
contactSearch
|
||||||
|
{
|
||||||
|
method NBS;
|
||||||
|
|
||||||
|
updateInterval 10;
|
||||||
|
|
||||||
|
sizeRatio 1.1;
|
||||||
|
|
||||||
|
cellExtent 0.55;
|
||||||
|
|
||||||
|
adjustableBox Yes;
|
||||||
|
}
|
72
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/particleInsertion
Executable file
72
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/particleInsertion
Executable file
@ -0,0 +1,72 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particleInsertion;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
active yes; // is insertion active?
|
||||||
|
|
||||||
|
particleInlet1
|
||||||
|
{
|
||||||
|
regionType box; // type of insertion region
|
||||||
|
|
||||||
|
rate 500000; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
startTime 0; // (s)
|
||||||
|
|
||||||
|
endTime 2.0; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.05; //s
|
||||||
|
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min (-0.17 0.23 0.46); // (m,m,m)
|
||||||
|
max ( 0.17 0.24 0.88); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
smallParticle 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
particleInlet2
|
||||||
|
{
|
||||||
|
regionType box; // type of insertion region
|
||||||
|
|
||||||
|
rate 500000; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
startTime 0; // (s)
|
||||||
|
|
||||||
|
endTime 2.0; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.05; //s
|
||||||
|
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min ( -0.17 0.23 0.02); // (m,m,m)
|
||||||
|
max ( 0.17 0.24 0.44); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
largeParticle 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
|
}
|
12
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/shapes
Executable file
12
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/shapes
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName shapes;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
names (smallParticle largeParticle); // names of shapes
|
||||||
|
diameters (0.003 0.00301); // diameter of shapes
|
||||||
|
materials (glassMat glassMat); // material names for shapes
|
7
benchmarks/helicalMixer/helicalMixer_2m/cleanThisCase
Executable file
7
benchmarks/helicalMixer/helicalMixer_2m/cleanThisCase
Executable 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
|
||||||
|
rm -rf stl
|
||||||
|
#------------------------------------------------------------------------------
|
32
benchmarks/helicalMixer/helicalMixer_2m/runThisCase
Executable file
32
benchmarks/helicalMixer/helicalMixer_2m/runThisCase
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "0) Copying stl files"
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
mkdir -p stl
|
||||||
|
cp -rfv $pFlow_PROJECT_DIR/resources/stls/helicalMixer/* ./stl/
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "4) Converting to VtK"
|
||||||
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
|
pFlowToVTK -f diameter id velocity --binary
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
49
benchmarks/helicalMixer/helicalMixer_2m/settings/domainDict
Executable file
49
benchmarks/helicalMixer/helicalMixer_2m/settings/domainDict
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName domainDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// Simulation domain
|
||||||
|
globalBox
|
||||||
|
{
|
||||||
|
min (-0.19 -0.19 -0.02);
|
||||||
|
max ( 0.19 0.26 0.92);
|
||||||
|
}
|
||||||
|
|
||||||
|
boundaries
|
||||||
|
{
|
||||||
|
|
||||||
|
left
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
right
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
top
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
rear
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName geometryDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// motion model: rotating object around an axis
|
||||||
|
motionModel rotatingAxis;
|
||||||
|
|
||||||
|
rotatingAxisInfo
|
||||||
|
{
|
||||||
|
rotAxis
|
||||||
|
{
|
||||||
|
// end points of axis
|
||||||
|
p1 (0 0 0);
|
||||||
|
p2 (0 0 1);
|
||||||
|
|
||||||
|
// rotation speed (rad/s) => 30 rpm
|
||||||
|
omega 3.1428;
|
||||||
|
|
||||||
|
// interval for rotation of axis
|
||||||
|
startTime 2.5;
|
||||||
|
endTime 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
surfaces
|
||||||
|
{
|
||||||
|
|
||||||
|
helix
|
||||||
|
{
|
||||||
|
type stlWall; // type of the wall
|
||||||
|
file helix2.stl; // file name in stl folder
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
motion rotAxis; // motion component name
|
||||||
|
}
|
||||||
|
|
||||||
|
shell
|
||||||
|
{
|
||||||
|
type stlWall; // type of the wall
|
||||||
|
file shell2.stl; // file name in stl folder
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
motion none; // motion component name
|
||||||
|
}
|
||||||
|
|
||||||
|
plug
|
||||||
|
{
|
||||||
|
type planeWall;
|
||||||
|
p1 (-0.075 -0.185 0.375);
|
||||||
|
p2 ( 0.075 -0.185 0.375);
|
||||||
|
p3 ( 0.075 -0.185 0.525);
|
||||||
|
p4 (-0.075 -0.185 0.525);
|
||||||
|
material wallMat;
|
||||||
|
motion none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particlesDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
defaultValue
|
||||||
|
{
|
||||||
|
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||||
|
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||||
|
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||||
|
shapeName word smallParticle; // name of the particle shape
|
||||||
|
}
|
||||||
|
|
||||||
|
selectors
|
||||||
|
{}
|
||||||
|
}
|
||||||
|
|
||||||
|
positionParticles
|
||||||
|
{
|
||||||
|
method empty; // creates the required fields with zero particles (empty).
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName settingsDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
run helicalMixer;
|
||||||
|
|
||||||
|
dt 0.00001; // time step for integration (s)
|
||||||
|
|
||||||
|
startTime 0; // start time for simulation
|
||||||
|
|
||||||
|
endTime 7.5; // end time for simulation
|
||||||
|
|
||||||
|
saveInterval 0.05; // time interval for saving the simulation
|
||||||
|
|
||||||
|
timePrecision 4; // maximum number of digits for time folder
|
||||||
|
|
||||||
|
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 ();
|
||||||
|
|
||||||
|
integrationMethod AdamsBashforth2; // integration method
|
||||||
|
|
||||||
|
integrationHistory off; // Do not save integration history on the disk
|
||||||
|
|
||||||
|
writeFormat binary; // data writting format (ascii or binary)
|
||||||
|
|
||||||
|
timersReport Yes; // report timers (Yes or No)
|
||||||
|
|
||||||
|
timersReportInterval 0.05; // time interval for reporting timers
|
53
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/interaction
Executable file
53
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/interaction
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName interaction;
|
||||||
|
objectType dicrionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
materials (glassMat wallMat); // a list of materials names
|
||||||
|
|
||||||
|
densities (2500.0 2500); // density of materials [kg/m3]
|
||||||
|
|
||||||
|
contactListType sortedContactList;
|
||||||
|
|
||||||
|
model
|
||||||
|
{
|
||||||
|
contactForceModel nonLinearLimited;
|
||||||
|
|
||||||
|
rollingFrictionModel normal;
|
||||||
|
|
||||||
|
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
|
||||||
|
1.0e6);
|
||||||
|
|
||||||
|
Geff (0.8e6 0.8e6 // Shear modulus [Pa]
|
||||||
|
0.8e6);
|
||||||
|
|
||||||
|
nu (0.25 0.25 // Poisson's ratio [-]
|
||||||
|
0.25);
|
||||||
|
|
||||||
|
en (0.97 0.85 // coefficient of normal restitution
|
||||||
|
1.00);
|
||||||
|
|
||||||
|
mu (0.65 0.65 // dynamic friction
|
||||||
|
0.65);
|
||||||
|
|
||||||
|
mur (0.1 0.1 // rolling friction
|
||||||
|
0.1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
contactSearch
|
||||||
|
{
|
||||||
|
method NBS;
|
||||||
|
|
||||||
|
updateInterval 10;
|
||||||
|
|
||||||
|
sizeRatio 1.1;
|
||||||
|
|
||||||
|
cellExtent 0.55;
|
||||||
|
|
||||||
|
adjustableBox Yes;
|
||||||
|
}
|
72
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/particleInsertion
Executable file
72
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/particleInsertion
Executable file
@ -0,0 +1,72 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particleInsertion;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
active yes; // is insertion active?
|
||||||
|
|
||||||
|
particleInlet1
|
||||||
|
{
|
||||||
|
regionType box; // type of insertion region
|
||||||
|
|
||||||
|
rate 1000000; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
startTime 0; // (s)
|
||||||
|
|
||||||
|
endTime 2.0; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.05; //s
|
||||||
|
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min (-0.17 0.23 0.46); // (m,m,m)
|
||||||
|
max ( 0.17 0.24 0.88); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
smallParticle 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
particleInlet2
|
||||||
|
{
|
||||||
|
regionType box; // type of insertion region
|
||||||
|
|
||||||
|
rate 1000000; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
startTime 0; // (s)
|
||||||
|
|
||||||
|
endTime 2.0; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.05; //s
|
||||||
|
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min ( -0.17 0.23 0.02); // (m,m,m)
|
||||||
|
max ( 0.17 0.24 0.44); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
largeParticle 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
|
}
|
12
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/shapes
Executable file
12
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/shapes
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName shapes;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
names (smallParticle largeParticle); // names of shapes
|
||||||
|
diameters (0.002 0.00201); // diameter of shapes
|
||||||
|
materials (glassMat glassMat); // material names for shapes
|
7
benchmarks/helicalMixer/helicalMixer_4m/cleanThisCase
Executable file
7
benchmarks/helicalMixer/helicalMixer_4m/cleanThisCase
Executable 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
|
||||||
|
rm -rf stl
|
||||||
|
#------------------------------------------------------------------------------
|
32
benchmarks/helicalMixer/helicalMixer_4m/runThisCase
Executable file
32
benchmarks/helicalMixer/helicalMixer_4m/runThisCase
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "0) Copying stl files"
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
mkdir -p stl
|
||||||
|
cp -rfv $pFlow_PROJECT_DIR/resources/stls/helicalMixer/* ./stl/
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "4) Converting to VtK"
|
||||||
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
|
pFlowToVTK -f diameter id velocity --binary
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
49
benchmarks/helicalMixer/helicalMixer_4m/settings/domainDict
Executable file
49
benchmarks/helicalMixer/helicalMixer_4m/settings/domainDict
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName domainDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// Simulation domain
|
||||||
|
globalBox
|
||||||
|
{
|
||||||
|
min (-0.19 -0.19 -0.02);
|
||||||
|
max ( 0.19 0.26 0.92);
|
||||||
|
}
|
||||||
|
|
||||||
|
boundaries
|
||||||
|
{
|
||||||
|
|
||||||
|
left
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
right
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
top
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
rear
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName geometryDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// motion model: rotating object around an axis
|
||||||
|
motionModel rotatingAxis;
|
||||||
|
|
||||||
|
rotatingAxisInfo
|
||||||
|
{
|
||||||
|
rotAxis
|
||||||
|
{
|
||||||
|
// end points of axis
|
||||||
|
p1 (0 0 0);
|
||||||
|
p2 (0 0 1);
|
||||||
|
|
||||||
|
// rotation speed (rad/s) => 30 rpm
|
||||||
|
omega 3.1428;
|
||||||
|
|
||||||
|
// interval for rotation of axis
|
||||||
|
startTime 2.5;
|
||||||
|
endTime 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
surfaces
|
||||||
|
{
|
||||||
|
|
||||||
|
helix
|
||||||
|
{
|
||||||
|
type stlWall; // type of the wall
|
||||||
|
file helix2.stl; // file name in stl folder
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
motion rotAxis; // motion component name
|
||||||
|
}
|
||||||
|
|
||||||
|
shell
|
||||||
|
{
|
||||||
|
type stlWall; // type of the wall
|
||||||
|
file shell2.stl; // file name in stl folder
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
motion none; // motion component name
|
||||||
|
}
|
||||||
|
|
||||||
|
plug
|
||||||
|
{
|
||||||
|
type planeWall;
|
||||||
|
p1 (-0.075 -0.185 0.375);
|
||||||
|
p2 ( 0.075 -0.185 0.375);
|
||||||
|
p3 ( 0.075 -0.185 0.525);
|
||||||
|
p4 (-0.075 -0.185 0.525);
|
||||||
|
material wallMat;
|
||||||
|
motion none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particlesDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
defaultValue
|
||||||
|
{
|
||||||
|
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||||
|
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||||
|
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||||
|
shapeName word smallParticle; // name of the particle shape
|
||||||
|
}
|
||||||
|
|
||||||
|
selectors
|
||||||
|
{}
|
||||||
|
}
|
||||||
|
|
||||||
|
positionParticles
|
||||||
|
{
|
||||||
|
method empty; // creates the required fields with zero particles (empty).
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName settingsDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
run helicalMixer;
|
||||||
|
|
||||||
|
dt 0.00001; // time step for integration (s)
|
||||||
|
|
||||||
|
startTime 0; // start time for simulation
|
||||||
|
|
||||||
|
endTime 7.5; // end time for simulation
|
||||||
|
|
||||||
|
saveInterval 0.05; // time interval for saving the simulation
|
||||||
|
|
||||||
|
timePrecision 4; // maximum number of digits for time folder
|
||||||
|
|
||||||
|
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 ();
|
||||||
|
|
||||||
|
integrationMethod AdamsBashforth2; // integration method
|
||||||
|
|
||||||
|
integrationHistory off; // Do not save integration history on the disk
|
||||||
|
|
||||||
|
writeFormat binary; // data writting format (ascii or binary)
|
||||||
|
|
||||||
|
timersReport Yes; // report timers (Yes or No)
|
||||||
|
|
||||||
|
timersReportInterval 0.05; // time interval for reporting timers
|
53
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/interaction
Executable file
53
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/interaction
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName interaction;
|
||||||
|
objectType dicrionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
materials (glassMat wallMat); // a list of materials names
|
||||||
|
|
||||||
|
densities (2500.0 2500); // density of materials [kg/m3]
|
||||||
|
|
||||||
|
contactListType sortedContactList;
|
||||||
|
|
||||||
|
model
|
||||||
|
{
|
||||||
|
contactForceModel nonLinearLimited;
|
||||||
|
|
||||||
|
rollingFrictionModel normal;
|
||||||
|
|
||||||
|
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
|
||||||
|
1.0e6);
|
||||||
|
|
||||||
|
Geff (0.8e6 0.8e6 // Shear modulus [Pa]
|
||||||
|
0.8e6);
|
||||||
|
|
||||||
|
nu (0.25 0.25 // Poisson's ratio [-]
|
||||||
|
0.25);
|
||||||
|
|
||||||
|
en (0.97 0.85 // coefficient of normal restitution
|
||||||
|
1.00);
|
||||||
|
|
||||||
|
mu (0.65 0.65 // dynamic friction
|
||||||
|
0.65);
|
||||||
|
|
||||||
|
mur (0.1 0.1 // rolling friction
|
||||||
|
0.1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
contactSearch
|
||||||
|
{
|
||||||
|
method NBS;
|
||||||
|
|
||||||
|
updateInterval 10;
|
||||||
|
|
||||||
|
sizeRatio 1.1;
|
||||||
|
|
||||||
|
cellExtent 0.55;
|
||||||
|
|
||||||
|
adjustableBox Yes;
|
||||||
|
}
|
72
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/particleInsertion
Executable file
72
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/particleInsertion
Executable file
@ -0,0 +1,72 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particleInsertion;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
active yes; // is insertion active?
|
||||||
|
|
||||||
|
particleInlet1
|
||||||
|
{
|
||||||
|
regionType box; // type of insertion region
|
||||||
|
|
||||||
|
rate 125000; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
startTime 0; // (s)
|
||||||
|
|
||||||
|
endTime 2.0; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.05; //s
|
||||||
|
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min (-0.17 0.23 0.46); // (m,m,m)
|
||||||
|
max ( 0.17 0.24 0.88); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
smallParticle 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
particleInlet2
|
||||||
|
{
|
||||||
|
regionType box; // type of insertion region
|
||||||
|
|
||||||
|
rate 125000; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
startTime 0; // (s)
|
||||||
|
|
||||||
|
endTime 2.0; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.05; //s
|
||||||
|
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min ( -0.17 0.23 0.02); // (m,m,m)
|
||||||
|
max ( 0.17 0.24 0.44); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
largeParticle 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
|
}
|
12
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/shapes
Executable file
12
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/shapes
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName shapes;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
names (smallParticle largeParticle); // names of shapes
|
||||||
|
diameters (0.005 0.00501); // diameter of shapes
|
||||||
|
materials (glassMat glassMat); // material names for shapes
|
7
benchmarks/helicalMixer/helicalMixer_500k/cleanThisCase
Executable file
7
benchmarks/helicalMixer/helicalMixer_500k/cleanThisCase
Executable 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
|
||||||
|
rm -rf stl
|
||||||
|
#------------------------------------------------------------------------------
|
32
benchmarks/helicalMixer/helicalMixer_500k/runThisCase
Executable file
32
benchmarks/helicalMixer/helicalMixer_500k/runThisCase
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "0) Copying stl files"
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
mkdir -p stl
|
||||||
|
cp -rfv $pFlow_PROJECT_DIR/resources/stls/helicalMixer/* ./stl/
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "4) Converting to VtK"
|
||||||
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
|
pFlowToVTK -f diameter id velocity --binary
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
49
benchmarks/helicalMixer/helicalMixer_500k/settings/domainDict
Executable file
49
benchmarks/helicalMixer/helicalMixer_500k/settings/domainDict
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName domainDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// Simulation domain
|
||||||
|
globalBox
|
||||||
|
{
|
||||||
|
min (-0.19 -0.19 -0.02);
|
||||||
|
max ( 0.19 0.26 0.92);
|
||||||
|
}
|
||||||
|
|
||||||
|
boundaries
|
||||||
|
{
|
||||||
|
|
||||||
|
left
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
right
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
top
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
rear
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName geometryDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// motion model: rotating object around an axis
|
||||||
|
motionModel rotatingAxis;
|
||||||
|
|
||||||
|
rotatingAxisInfo
|
||||||
|
{
|
||||||
|
rotAxis
|
||||||
|
{
|
||||||
|
// end points of axis
|
||||||
|
p1 (0 0 0);
|
||||||
|
p2 (0 0 1);
|
||||||
|
|
||||||
|
// rotation speed (rad/s) => 30 rpm
|
||||||
|
omega 3.1428;
|
||||||
|
|
||||||
|
// interval for rotation of axis
|
||||||
|
startTime 2.5;
|
||||||
|
endTime 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
surfaces
|
||||||
|
{
|
||||||
|
|
||||||
|
helix
|
||||||
|
{
|
||||||
|
type stlWall; // type of the wall
|
||||||
|
file helix2.stl; // file name in stl folder
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
motion rotAxis; // motion component name
|
||||||
|
}
|
||||||
|
|
||||||
|
shell
|
||||||
|
{
|
||||||
|
type stlWall; // type of the wall
|
||||||
|
file shell2.stl; // file name in stl folder
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
motion none; // motion component name
|
||||||
|
}
|
||||||
|
|
||||||
|
plug
|
||||||
|
{
|
||||||
|
type planeWall;
|
||||||
|
p1 (-0.075 -0.185 0.375);
|
||||||
|
p2 ( 0.075 -0.185 0.375);
|
||||||
|
p3 ( 0.075 -0.185 0.525);
|
||||||
|
p4 (-0.075 -0.185 0.525);
|
||||||
|
material wallMat;
|
||||||
|
motion none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particlesDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
defaultValue
|
||||||
|
{
|
||||||
|
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||||
|
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||||
|
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||||
|
shapeName word smallParticle; // name of the particle shape
|
||||||
|
}
|
||||||
|
|
||||||
|
selectors
|
||||||
|
{}
|
||||||
|
}
|
||||||
|
|
||||||
|
positionParticles
|
||||||
|
{
|
||||||
|
method empty; // creates the required fields with zero particles (empty).
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName settingsDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
run helicalMixer;
|
||||||
|
|
||||||
|
dt 0.00001; // time step for integration (s)
|
||||||
|
|
||||||
|
startTime 0; // start time for simulation
|
||||||
|
|
||||||
|
endTime 7.5; // end time for simulation
|
||||||
|
|
||||||
|
saveInterval 0.05; // time interval for saving the simulation
|
||||||
|
|
||||||
|
timePrecision 4; // maximum number of digits for time folder
|
||||||
|
|
||||||
|
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 ();
|
||||||
|
|
||||||
|
integrationMethod AdamsBashforth2; // integration method
|
||||||
|
|
||||||
|
integrationHistory off; // Do not save integration history on the disk
|
||||||
|
|
||||||
|
writeFormat binary; // data writting format (ascii or binary)
|
||||||
|
|
||||||
|
timersReport Yes; // report timers (Yes or No)
|
||||||
|
|
||||||
|
timersReportInterval 0.05; // time interval for reporting timers
|
BIN
benchmarks/helicalMixer/images/commericalDEMsnapshot.png
Normal file
BIN
benchmarks/helicalMixer/images/commericalDEMsnapshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 185 KiB |
BIN
benchmarks/helicalMixer/images/performance.png
Normal file
BIN
benchmarks/helicalMixer/images/performance.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
BIN
benchmarks/helicalMixer/images/phasicFlow_snapshot.png
Normal file
BIN
benchmarks/helicalMixer/images/phasicFlow_snapshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 206 KiB |
@ -1 +1,101 @@
|
|||||||
# Helical Mixer Benchmark (phasicFlow v-1.0)
|
# Helical Mixer Benchmark (phasicFlow v-1.0)
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This benchmark compares the performance of phasicFlow with a well-stablished commercial DEM software for simulating a helical mixer with varying particle counts (250k to 4M particles). The benchmark measures both computational efficiency and memory usage across different hardware configurations.
|
||||||
|
|
||||||
|
**Summary of Results:**
|
||||||
|
|
||||||
|
- phasicFlow achieves similar performance to the commercial DEM software on the same hardware.
|
||||||
|
- phasicFlow shows a 30% performance improvement when using the NVIDIA RTX A4000 compared to the RTX 4050Ti.
|
||||||
|
- Memory usage is approximately 50% lower in phasicFlow compared to the commercial software, with phasicFlow using about 0.7 GB of memory per million particles, while the commercial software uses about 1.5 GB per million particles.
|
||||||
|
|
||||||
|
## Simulation Setup
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<img src="./images/commericalDEMsnapshot.png"/>
|
||||||
|
<div align="center">
|
||||||
|
<p>Figure 1. Commercial DEM simulation snapshot</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<img src="./images/phasicFlow_snapshot.png"/>
|
||||||
|
<div align="center">
|
||||||
|
<p>Figure 2. phasicFlow simulation snapshot and visualized using Paraview</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
### Hardware Specifications
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
Table 1. Hardware specifications used for benchmarking.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
| System | CPU | GPU | Operating System |
|
||||||
|
| :---------: | :----------------------: | :--------------------------: | :--------------: |
|
||||||
|
| Laptop | Intel i9-13900HX 2.2 GHz | NVIDIA GeForce RTX 4050Ti 6G | Windows 11 24H2 |
|
||||||
|
| Workstation | Intel Xeon 4210 2.2 GHz | NVIDIA RTX A4000 16G | Ubuntu 22.04 |
|
||||||
|
|
||||||
|
### Simulation Parameters
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
Table 2. Parameters for helical mixer simulations.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
| Case | Particle Diameter | Particle Count |
|
||||||
|
| :-------: | :---------------: | :--------------: |
|
||||||
|
| 250k | 6 mm | 250,000 |
|
||||||
|
| 500k | 5 mm | 500,000 |
|
||||||
|
| 1M | 4 mm | 1,000,000 |
|
||||||
|
| 2M | 3 mm | 2,000,000 |
|
||||||
|
| 4M | 2 mm | 4,000,000 |
|
||||||
|
|
||||||
|
The time step for all simulations was set to 1.0e-5 seconds and the simulation ran for 7.5 seconds.
|
||||||
|
|
||||||
|
## Performance Comparison
|
||||||
|
|
||||||
|
### Execution Time
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
Table 3. Total calculation time (minutes) for different configurations.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
| Software | 250k | 500k | 1M | 2M | 4M |
|
||||||
|
| :---------------: | :----: | :-----: | :-----: | :-----: | :-----: |
|
||||||
|
| phasicFlow-4050Ti | 110 min | 215 min | 413 min | - | - |
|
||||||
|
| Commercial DEM-4050Ti | 111 min | 210 min | 415 min | - | - |
|
||||||
|
| phasicFlow-A4000 | 82 min | 150 min | 300 min | 613 min | 1236 min |
|
||||||
|
|
||||||
|
The execution time scales linearly with particle count. phasicFlow demonstrates approximately:
|
||||||
|
|
||||||
|
- the computing speed is basically the same as well-established commercial DEM software on the same hardware
|
||||||
|
- 30% performance improvement when using the NVIDIA RTX A4000 compared to the RTX 4050Ti
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<img src="./images/performance.png"/>
|
||||||
|
<p>Figure 3. Calculation time comparison between phasicFlow and the well-established commercial DEM software.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
### Memory Usage
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
Table 4. Memory consumption for different configurations.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
| Software | 250k | 500k | 1M | 2M | 4M |
|
||||||
|
| :---------------: | :-----: | :-----: | :-----: | :-----: | :-----: |
|
||||||
|
| phasicFlow-4050Ti | 260 MB | 404 MB | 710 MB | - | - |
|
||||||
|
| Commercial DEM-4050Ti | 460 MB | 920 MB | 1574 MB | - | - |
|
||||||
|
| phasicFlow-A4000 | 352 MB | 496 MB | 802 MB | 1376 MB | 2310 MB |
|
||||||
|
|
||||||
|
Memory efficiency comparison:
|
||||||
|
|
||||||
|
- phasicFlow uses approximately 0.7 GB of memory per million particles
|
||||||
|
- Commercial DEM software uses approximately 1.5 GB of memory per million particles
|
||||||
|
- phasicFlow shows ~50% lower memory consumption compared to the commercial alternative
|
||||||
|
- The memory usage scales linearly with particle count in both software packages. But due to memory limitations on GPUs, it is possible to run larger simulation on GPUs with phasicFlow.
|
||||||
|
|
||||||
|
## Run Your Own Benchmarks
|
||||||
|
|
||||||
|
The simulation case setup files are available in this folder for users interested in performing similar benchmarks on their own hardware. These files can be used to reproduce the tests and compare performance across different systems.
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
|
||||||
| phasicFlow File |
|
|
||||||
| copyright: www.cemf.ir |
|
|
||||||
\* ------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
objectName geometryDict;
|
|
||||||
objectType dictionary;
|
|
||||||
|
|
||||||
// motion model: rotating object around an axis
|
|
||||||
motionModel rotatingAxisMotion;
|
|
||||||
|
|
||||||
surfaces
|
|
||||||
{
|
|
||||||
|
|
||||||
helix
|
|
||||||
{
|
|
||||||
type stlWall; // type of the wall
|
|
||||||
file helix2.stl; // file name in stl folder
|
|
||||||
material wallMat; // material name of this wall
|
|
||||||
motion rotAxis; // motion component name
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
shell
|
|
||||||
{
|
|
||||||
type stlWall; // type of the wall
|
|
||||||
file shell2.stl; // file name in stl folder
|
|
||||||
material wallMat; // material name of this wall
|
|
||||||
motion none; // motion component name
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
plug
|
|
||||||
{
|
|
||||||
type planeWall;
|
|
||||||
p1 (-0.075 -0.185 0.375);
|
|
||||||
p2 ( 0.075 -0.185 0.375);
|
|
||||||
p3 ( 0.075 -0.185 0.525);
|
|
||||||
p4 (-0.075 -0.185 0.525);
|
|
||||||
material wallMat; // material name of this wall
|
|
||||||
motion none; // motion component name
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// information for rotatingAxisMotion motion model
|
|
||||||
rotatingAxisMotionInfo
|
|
||||||
{
|
|
||||||
rotAxis
|
|
||||||
{
|
|
||||||
p1 ( 0 0 0);
|
|
||||||
p2 ( 0 0 1);
|
|
||||||
omega 0; //3.1428; // rotation speed (rad/s) => 30 rpm
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
|
||||||
| phasicFlow File |
|
|
||||||
| copyright: www.cemf.ir |
|
|
||||||
\* ------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
objectName particlesDict;
|
|
||||||
objectType dictionary;
|
|
||||||
|
|
||||||
setFields
|
|
||||||
{
|
|
||||||
defaultValue
|
|
||||||
{
|
|
||||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
|
||||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
|
||||||
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
|
||||||
shapeName word smallParticle; // name of the particle shape
|
|
||||||
}
|
|
||||||
|
|
||||||
selectors
|
|
||||||
{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// positions particles
|
|
||||||
positionParticles
|
|
||||||
{
|
|
||||||
method empty; // creates the required fields with zero particles (empty).
|
|
||||||
|
|
||||||
maxNumberOfParticles 4100000; // maximum number of particles in the simulation
|
|
||||||
mortonSorting Yes; // perform initial sorting based on morton code?
|
|
||||||
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
|
||||||
| phasicFlow File |
|
|
||||||
| copyright: www.cemf.ir |
|
|
||||||
\* ------------------------------------------------------------------------- */
|
|
||||||
objectName settingsDict;
|
|
||||||
objectType dictionary;;
|
|
||||||
|
|
||||||
run inclinedScrewConveyor;
|
|
||||||
|
|
||||||
dt 0.00001; // time step for integration (s)
|
|
||||||
|
|
||||||
startTime 2.9; // start time for simulation
|
|
||||||
|
|
||||||
endTime 7; // end time for simulation
|
|
||||||
|
|
||||||
saveInterval 0.05; // time interval for saving the simulation
|
|
||||||
|
|
||||||
timePrecision 3; // maximum number of digits for time folder
|
|
||||||
|
|
||||||
g (0 -9.8 0); // gravity vector (m/s2)
|
|
||||||
|
|
||||||
/*
|
|
||||||
Simulation domain
|
|
||||||
every particles that goes outside this domain is deleted.
|
|
||||||
*/
|
|
||||||
domain
|
|
||||||
{
|
|
||||||
min (-0.19 -0.19 -0.02);
|
|
||||||
max ( 0.19 0.26 0.92);
|
|
||||||
}
|
|
||||||
|
|
||||||
integrationMethod AdamsBashforth2; // integration method
|
|
||||||
|
|
||||||
timersReport Yes; // report timers?
|
|
||||||
|
|
||||||
timersReportInterval 0.01; // time interval for reporting timers
|
|
@ -1,7 +1,9 @@
|
|||||||
|
|
||||||
# Benchmarks
|
# Benchmarks
|
||||||
|
|
||||||
Benchmakrs has been done on two different simulations: a simulation with simple geometry (rotating drum) and a simulation with complex geometry (helical mixer).
|
Benchmakrs has been done on two different simulations: simulation with simple geometry (rotating drum) and a simulation with complex geometry (helical mixer). These benchmarks are used to show how PhasicFlow performs in different scenarios.
|
||||||
|
|
||||||
- [rotating drum](./rotatingDrum/readme.md)
|
- [rotating drum](./rotatingDrum/)
|
||||||
- [helical mixer](./helicalMixer/readme.md)
|
- [helical mixer](./helicalMixer/)
|
||||||
|
|
||||||
|
**Note:** If you have performed benchmarks with PhasicFlow using other hardware or software other than PhasicFlow, we would be happy to include them in this section. Please open an issue for more arrangements or send a pull request with the benchmarks results.
|
||||||
|
@ -4,6 +4,12 @@
|
|||||||
|
|
||||||
This benchmark compares the performance of phasicFlow with a well-stablished commercial DEM software for simulating a rotating drum with varying particle counts (250k to 8M particles). The benchmark measures both computational efficiency and memory usage across different hardware configurations.
|
This benchmark compares the performance of phasicFlow with a well-stablished commercial DEM software for simulating a rotating drum with varying particle counts (250k to 8M particles). The benchmark measures both computational efficiency and memory usage across different hardware configurations.
|
||||||
|
|
||||||
|
**Summary of Results:**
|
||||||
|
|
||||||
|
- phasicFlow achieves approximately 20% faster calculation than the commercial DEM software on the same hardware.
|
||||||
|
- phasicFlow shows a 30% performance improvement when using the NVIDIA RTX A4000 compared to the RTX 4050Ti.
|
||||||
|
- Memory usage is approximately 42% lower in phasicFlow compared to the commercial software, with phasicFlow using about 0.7 GB of memory per million particles, while the commercial software uses about 1.2 GB per million particles
|
||||||
|
|
||||||
## Simulation Setup
|
## Simulation Setup
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
echo "\n<--------------------------------------------------------------------->"
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
echo "1) Creating particles"
|
echo "1) Creating particles"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
echo "\n<--------------------------------------------------------------------->"
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
echo "1) Creating particles"
|
echo "1) Creating particles"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
echo "\n<--------------------------------------------------------------------->"
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
echo "1) Creating particles"
|
echo "1) Creating particles"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
echo "\n<--------------------------------------------------------------------->"
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
echo "1) Creating particles"
|
echo "1) Creating particles"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
echo "\n<--------------------------------------------------------------------->"
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
echo "1) Creating particles"
|
echo "1) Creating particles"
|
||||||
|
40196
resources/stls/helicalMixer/helix2.stl
Normal file
40196
resources/stls/helicalMixer/helix2.stl
Normal file
File diff suppressed because it is too large
Load Diff
1206
resources/stls/helicalMixer/shell2.stl
Normal file
1206
resources/stls/helicalMixer/shell2.stl
Normal file
File diff suppressed because it is too large
Load Diff
@ -250,7 +250,9 @@ struct pwInteractionFunctor
|
|||||||
real cGFj = coarseGrainFactor_[i];
|
real cGFj = coarseGrainFactor_[i];
|
||||||
realx3 xi = pos_[i];
|
realx3 xi = pos_[i];
|
||||||
|
|
||||||
realx3x3 tri = triangles_(tj);
|
realx3x3 tri = triangles_(tj);
|
||||||
|
const realx3& normW = triangles_.normal(tj);
|
||||||
|
|
||||||
real ovrlp;
|
real ovrlp;
|
||||||
realx3 Nij, cp;
|
realx3 Nij, cp;
|
||||||
|
|
||||||
@ -262,7 +264,7 @@ struct pwInteractionFunctor
|
|||||||
|
|
||||||
int32 mInd = wTriMotionIndex_[tj];
|
int32 mInd = wTriMotionIndex_[tj];
|
||||||
|
|
||||||
auto Vw = motionModel_(mInd, cp);
|
auto Vw = motionModel_(mInd, cp, normW);
|
||||||
|
|
||||||
//output<< "par-wall index "<< i<<" - "<< tj<<endl;
|
//output<< "par-wall index "<< i<<" - "<< tj<<endl;
|
||||||
|
|
||||||
|
@ -238,7 +238,9 @@ struct pwInteractionFunctor
|
|||||||
real Rj = 10000.0;
|
real Rj = 10000.0;
|
||||||
realx3 xi = pos_[i];
|
realx3 xi = pos_[i];
|
||||||
|
|
||||||
realx3x3 tri = triangles_(tj);
|
const realx3x3 tri = triangles_(tj);
|
||||||
|
const realx3& normW = triangles_.normal(tj);
|
||||||
|
|
||||||
real ovrlp;
|
real ovrlp;
|
||||||
realx3 Nij, cp;
|
realx3 Nij, cp;
|
||||||
|
|
||||||
@ -250,7 +252,7 @@ struct pwInteractionFunctor
|
|||||||
|
|
||||||
int32 mInd = wTriMotionIndex_[tj];
|
int32 mInd = wTriMotionIndex_[tj];
|
||||||
|
|
||||||
auto Vw = motionModel_(mInd, cp);
|
auto Vw = motionModel_(mInd, cp, normW);
|
||||||
|
|
||||||
//output<< "par-wall index "<< i<<" - "<< tj<<endl;
|
//output<< "par-wall index "<< i<<" - "<< tj<<endl;
|
||||||
|
|
||||||
|
@ -85,15 +85,15 @@ public:
|
|||||||
~ModelInterface()=default;
|
~ModelInterface()=default;
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
realx3 pointVelocity(uint32 n, const realx3& p)const
|
realx3 pointVelocity(uint32 n, const realx3& p, const realx3& wallNormal)const
|
||||||
{
|
{
|
||||||
return components_[n].linVelocityPoint(p);
|
return components_[n].linVelocityPoint(p, wallNormal);
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
realx3 operator()(uint32 n, const realx3& p)const
|
realx3 operator()(uint32 n, const realx3& p, const realx3& wallNormal)const
|
||||||
{
|
{
|
||||||
return pointVelocity(n,p);
|
return pointVelocity(n, p, wallNormal);
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
|
@ -28,7 +28,7 @@ pFlow::conveyorBelt::conveyorBelt(const dictionary& dict)
|
|||||||
if(!read(dict))
|
if(!read(dict))
|
||||||
{
|
{
|
||||||
fatalErrorInFunction<<
|
fatalErrorInFunction<<
|
||||||
" error in reading conveyorBelt from dictionary "<< dict.globalName()<<endl;
|
" error in reading from dictionary "<< dict.globalName()<<endl;
|
||||||
fatalExit;
|
fatalExit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -37,7 +37,21 @@ FUNCTION_H
|
|||||||
bool pFlow::conveyorBelt::read(const dictionary& dict)
|
bool pFlow::conveyorBelt::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
|
|
||||||
tangentVelocity_ = dict.getVal<realx3>("tangentVelocity");
|
linearVelocity_ = dict.getVal<real>("linearVelocity");
|
||||||
|
normal_ = dict.getVal<realx3>("normal");
|
||||||
|
|
||||||
|
if(normal_.length() > verySmallValue)
|
||||||
|
{
|
||||||
|
normal_.normalize();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fatalErrorInFunction<<
|
||||||
|
" normal vector in "<<
|
||||||
|
dict.globalName() <<
|
||||||
|
" cannot be zero vector "<<endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -45,12 +59,19 @@ bool pFlow::conveyorBelt::read(const dictionary& dict)
|
|||||||
FUNCTION_H
|
FUNCTION_H
|
||||||
bool pFlow::conveyorBelt::write(dictionary& dict) const
|
bool pFlow::conveyorBelt::write(dictionary& dict) const
|
||||||
{
|
{
|
||||||
if( !dict.add("tangentVelocity", tangentVelocity_) )
|
if( !dict.add("linearVelocity", linearVelocity_) )
|
||||||
{
|
{
|
||||||
fatalErrorInFunction<<
|
fatalErrorInFunction<<
|
||||||
" error in writing tangentVelocity to dictionary "<< dict.globalName()<<endl;
|
" error in writing tangentVelocity to dictionary "<< dict.globalName()<<endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!dict.add("normal", normal_))
|
||||||
|
{
|
||||||
|
fatalErrorInFunction<<
|
||||||
|
" error in writing normal to dictionary "<< dict.globalName()<<endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,6 +86,7 @@ bool pFlow::conveyorBelt::read(iIstream& is)
|
|||||||
FUNCTION_H
|
FUNCTION_H
|
||||||
bool pFlow::conveyorBelt::write(iOstream& os)const
|
bool pFlow::conveyorBelt::write(iOstream& os)const
|
||||||
{
|
{
|
||||||
os.writeWordEntry("tangentVelocity", tangentVelocity_);
|
os.writeWordEntry("linearVelocity", linearVelocity_);
|
||||||
return true;
|
os.writeWordEntry("normal", normal_);
|
||||||
|
return true;
|
||||||
}
|
}
|
@ -41,65 +41,76 @@ class conveyorBelt
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
realx3 tangentVelocity_{0, 0, 0};
|
/// @brief linear velocity of the conveyor belt
|
||||||
|
real linearVelocity_{0};
|
||||||
|
|
||||||
|
/// normal vector of the velocity plane.
|
||||||
|
/// The velocity vector is tangent to this plane (velocity plane).
|
||||||
|
realx3 normal_{1,0,0};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TypeInfoNV("conveyorBelt");
|
TypeInfoNV("conveyorBelt");
|
||||||
|
|
||||||
FUNCTION_HD
|
FUNCTION_HD
|
||||||
conveyorBelt()=default;
|
conveyorBelt()=default;
|
||||||
|
|
||||||
FUNCTION_H
|
FUNCTION_H
|
||||||
explicit conveyorBelt(const dictionary& dict);
|
explicit conveyorBelt(const dictionary& dict);
|
||||||
|
|
||||||
|
|
||||||
FUNCTION_HD
|
FUNCTION_HD
|
||||||
conveyorBelt(const conveyorBelt&) = default;
|
conveyorBelt(const conveyorBelt&) = default;
|
||||||
|
|
||||||
conveyorBelt& operator=(const conveyorBelt&) = default;
|
conveyorBelt& operator=(const conveyorBelt&) = default;
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
void setTime(real t)
|
void setTime(real t)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
/*INLINE_FUNCTION_HD
|
||||||
realx3 linVelocityPoint(const realx3 &)const
|
realx3 linVelocityPoint(const realx3 &)const
|
||||||
{
|
{
|
||||||
return tangentVelocity_;
|
return tangentVelocity_;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
realx3 transferPoint(const realx3& p, real)const
|
realx3 linVelocityPoint(const realx3 &, const realx3& wallNormal)const
|
||||||
{
|
{
|
||||||
return p;
|
return linearVelocity_ * cross(wallNormal, normal_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - IO operation
|
INLINE_FUNCTION_HD
|
||||||
FUNCTION_H
|
realx3 transferPoint(const realx3& p, real)const
|
||||||
bool read(const dictionary& dict);
|
{
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
FUNCTION_H
|
// - IO operation
|
||||||
bool write(dictionary& dict) const;
|
FUNCTION_H
|
||||||
|
bool read(const dictionary& dict);
|
||||||
|
|
||||||
FUNCTION_H
|
FUNCTION_H
|
||||||
bool read(iIstream& is);
|
bool write(dictionary& dict) const;
|
||||||
|
|
||||||
FUNCTION_H
|
FUNCTION_H
|
||||||
bool write(iOstream& os)const;
|
bool read(iIstream& is);
|
||||||
|
|
||||||
|
FUNCTION_H
|
||||||
|
bool write(iOstream& os)const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline iOstream& operator <<(iOstream& os, const conveyorBelt& obj)
|
inline iOstream& operator <<(iOstream& os, const conveyorBelt& obj)
|
||||||
{
|
{
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline iIstream& operator >>(iIstream& is, conveyorBelt& obj)
|
inline iIstream& operator >>(iIstream& is, conveyorBelt& obj)
|
||||||
{
|
{
|
||||||
|
|
||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ public:
|
|||||||
|
|
||||||
/// Tangential velocity at point p
|
/// Tangential velocity at point p
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
realx3 pointTangentialVel(const realx3& p)const
|
realx3 pointTangentialVel(const realx3& p, const realx3& wallNormal)const
|
||||||
{
|
{
|
||||||
realx3 parentVel(0);
|
realx3 parentVel(0);
|
||||||
auto parIndex = parentAxisIndex();
|
auto parIndex = parentAxisIndex();
|
||||||
@ -128,11 +128,11 @@ public:
|
|||||||
while(parIndex != -1)
|
while(parIndex != -1)
|
||||||
{
|
{
|
||||||
auto& ax = axisList_[parIndex];
|
auto& ax = axisList_[parIndex];
|
||||||
parentVel += ax.linVelocityPoint(p);
|
parentVel += ax.linVelocityPoint(p, wallNormal);
|
||||||
parIndex = ax.parentAxisIndex();
|
parIndex = ax.parentAxisIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
return parentVel + rotatingAxis::linVelocityPoint(p);
|
return parentVel + rotatingAxis::linVelocityPoint(p, wallNormal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Translate point p for dt seconds based on the axis information
|
/// Translate point p for dt seconds based on the axis information
|
||||||
|
@ -126,7 +126,7 @@ public:
|
|||||||
|
|
||||||
/// Linear tangential velocity at point p
|
/// Linear tangential velocity at point p
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
realx3 linVelocityPoint(const realx3 &p)const;
|
realx3 linVelocityPoint(const realx3 &p, const realx3& wallNormal)const;
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
realx3 transferPoint(const realx3 p, real dt)const;
|
realx3 transferPoint(const realx3 p, real dt)const;
|
||||||
|
@ -20,7 +20,7 @@ Licence:
|
|||||||
-----------------------------------------------------------------------------*/
|
-----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
pFlow::realx3 pFlow::rotatingAxis::linVelocityPoint(const realx3 &p)const
|
pFlow::realx3 pFlow::rotatingAxis::linVelocityPoint(const realx3 &p, const realx3&)const
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!inTimeRange()) return {0,0,0};
|
if(!inTimeRange()) return {0,0,0};
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
realx3 linVelocityPoint(const realx3 &)const
|
realx3 linVelocityPoint(const realx3 &, const realx3&)const
|
||||||
{
|
{
|
||||||
return realx3(0);
|
return realx3(0);
|
||||||
}
|
}
|
||||||
|
@ -39,17 +39,17 @@ class dictionary;
|
|||||||
* Creates a sinoidal virating model for a wall. The viration is defined by
|
* Creates a sinoidal virating model for a wall. The viration is defined by
|
||||||
* frequency, amplitude and phase angle.
|
* frequency, amplitude and phase angle.
|
||||||
* \f[
|
* \f[
|
||||||
\vec{v}(t) = \vec{A} sin(\vec{\omega}(t-startTime)+\vec{\phi})
|
\vec{v}(t) = \vec{A} sin(\vec{\omega}(t-startTime)+\vec{\phi})
|
||||||
\f]
|
\f]
|
||||||
\verbatim
|
\verbatim
|
||||||
// This creates sinoidal vibration on the wall in x-direction. The viration
|
// This creates sinoidal vibration on the wall in x-direction. The viration
|
||||||
// starts at t = 0 s and ends at t = 10 s.
|
// starts at t = 0 s and ends at t = 10 s.
|
||||||
{
|
{
|
||||||
angularFreq (10 0 0);
|
angularFreq (10 0 0);
|
||||||
amplitude ( 1 0 0);
|
amplitude ( 1 0 0);
|
||||||
phaseAngle ( 0 0 0);
|
phaseAngle ( 0 0 0);
|
||||||
startTime 0;
|
startTime 0;
|
||||||
endTime 10;
|
endTime 10;
|
||||||
} \endverbatim
|
} \endverbatim
|
||||||
*
|
*
|
||||||
* *
|
* *
|
||||||
@ -64,102 +64,102 @@ class dictionary;
|
|||||||
*/
|
*/
|
||||||
class vibrating
|
class vibrating
|
||||||
:
|
:
|
||||||
public timeInterval
|
public timeInterval
|
||||||
{
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// rotation speed
|
// rotation speed
|
||||||
realx3 angularFreq_{0,0,0};
|
realx3 angularFreq_{0,0,0};
|
||||||
|
|
||||||
realx3 phaseAngle_{0,0,0};
|
realx3 phaseAngle_{0,0,0};
|
||||||
|
|
||||||
realx3 amplitude_{0,0,0};
|
realx3 amplitude_{0,0,0};
|
||||||
|
|
||||||
realx3 velocity_{0,0,0};
|
realx3 velocity_{0,0,0};
|
||||||
|
|
||||||
realx3 velocity0_{0,0,0};
|
realx3 velocity0_{0,0,0};
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
void calculateVelocity()
|
void calculateVelocity()
|
||||||
{
|
{
|
||||||
if(inTimeRange())
|
if(inTimeRange())
|
||||||
{
|
{
|
||||||
velocity_ = amplitude_ * sin( angularFreq_*(time()-startTime() ) + phaseAngle_ );
|
velocity_ = amplitude_ * sin( angularFreq_*(time()-startTime() ) + phaseAngle_ );
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
velocity_ = {0,0,0};
|
velocity_ = {0,0,0};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TypeInfoNV("vibrating");
|
TypeInfoNV("vibrating");
|
||||||
|
|
||||||
FUNCTION_HD
|
FUNCTION_HD
|
||||||
vibrating()=default;
|
vibrating()=default;
|
||||||
|
|
||||||
FUNCTION_H
|
FUNCTION_H
|
||||||
explicit vibrating(const dictionary& dict);
|
explicit vibrating(const dictionary& dict);
|
||||||
|
|
||||||
|
|
||||||
FUNCTION_HD
|
FUNCTION_HD
|
||||||
vibrating(const vibrating&) = default;
|
vibrating(const vibrating&) = default;
|
||||||
|
|
||||||
vibrating& operator=(const vibrating&) = default;
|
vibrating& operator=(const vibrating&) = default;
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
void setTime(real t)
|
void setTime(real t)
|
||||||
{
|
{
|
||||||
if( !equal(t, time()) ) velocity0_ = velocity_;
|
if( !equal(t, time()) ) velocity0_ = velocity_;
|
||||||
timeInterval::setTime(t);
|
timeInterval::setTime(t);
|
||||||
calculateVelocity();
|
calculateVelocity();
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
realx3 linVelocityPoint(const realx3 &)const
|
realx3 linVelocityPoint(const realx3 &, const realx3&)const
|
||||||
{
|
{
|
||||||
return velocity_;
|
return velocity_;
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
realx3 transferPoint(const realx3& p, real dt)const
|
realx3 transferPoint(const realx3& p, real dt)const
|
||||||
{
|
{
|
||||||
if(!inTimeRange()) return p;
|
if(!inTimeRange()) return p;
|
||||||
return p + static_cast<real>(0.5*dt)*(velocity0_+velocity_);
|
return p + static_cast<real>(0.5*dt)*(velocity0_+velocity_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - IO operation
|
// - IO operation
|
||||||
FUNCTION_H
|
FUNCTION_H
|
||||||
bool read(const dictionary& dict);
|
bool read(const dictionary& dict);
|
||||||
|
|
||||||
FUNCTION_H
|
FUNCTION_H
|
||||||
bool write(dictionary& dict) const;
|
bool write(dictionary& dict) const;
|
||||||
|
|
||||||
FUNCTION_H
|
FUNCTION_H
|
||||||
bool read(iIstream& is);
|
bool read(iIstream& is);
|
||||||
|
|
||||||
FUNCTION_H
|
FUNCTION_H
|
||||||
bool write(iOstream& os)const;
|
bool write(iOstream& os)const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline iOstream& operator <<(iOstream& os, const vibrating& obj)
|
inline iOstream& operator <<(iOstream& os, const vibrating& obj)
|
||||||
{
|
{
|
||||||
if(!obj.write(os))
|
if(!obj.write(os))
|
||||||
{
|
{
|
||||||
fatalExit;
|
fatalExit;
|
||||||
}
|
}
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline iIstream& operator >>(iIstream& is, vibrating& obj)
|
inline iIstream& operator >>(iIstream& is, vibrating& obj)
|
||||||
{
|
{
|
||||||
if( !obj.read(is) )
|
if( !obj.read(is) )
|
||||||
{
|
{
|
||||||
fatalExit;
|
fatalExit;
|
||||||
}
|
}
|
||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ bool pFlow::processorBoundarySphereParticles::acceleration(const timeInfo &ti, c
|
|||||||
auto I = Particles().I().BoundaryField(thisIndex).neighborProcField().deviceView();
|
auto I = Particles().I().BoundaryField(thisIndex).neighborProcField().deviceView();
|
||||||
auto cf = Particles().contactForce().BoundaryField(thisIndex).neighborProcField().deviceView();
|
auto cf = Particles().contactForce().BoundaryField(thisIndex).neighborProcField().deviceView();
|
||||||
auto ct = Particles().contactTorque().BoundaryField(thisIndex).neighborProcField().deviceView();
|
auto ct = Particles().contactTorque().BoundaryField(thisIndex).neighborProcField().deviceView();
|
||||||
auto acc = Particles().accelertion().BoundaryField(thisIndex).neighborProcField().deviceView();
|
auto acc = Particles().acceleration().BoundaryField(thisIndex).neighborProcField().deviceView();
|
||||||
auto rAcc = Particles().rAcceleration().BoundaryField(thisIndex).neighborProcField().deviceView();
|
auto rAcc = Particles().rAcceleration().BoundaryField(thisIndex).neighborProcField().deviceView();
|
||||||
|
|
||||||
Kokkos::parallel_for(
|
Kokkos::parallel_for(
|
||||||
|
@ -185,6 +185,18 @@ public:
|
|||||||
return contactTorque_;
|
return contactTorque_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint32PointField_D& particleId()
|
||||||
|
{
|
||||||
|
return idHandler_();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
const uint32PointField_D& particleId() const
|
||||||
|
{
|
||||||
|
return idHandler_();
|
||||||
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
uint32 maxId()const
|
uint32 maxId()const
|
||||||
{
|
{
|
||||||
|
@ -9,9 +9,11 @@ set(SourceFiles
|
|||||||
# Regions
|
# Regions
|
||||||
region/regionPoints/regionPoints/regionPoints.cpp
|
region/regionPoints/regionPoints/regionPoints.cpp
|
||||||
region/regionPoints/sphereRegionPoints/sphereRegionPoints.cpp
|
region/regionPoints/sphereRegionPoints/sphereRegionPoints.cpp
|
||||||
|
region/regionPoints/boxRegionPoints/boxRegionPoints.cpp
|
||||||
region/regionPoints/lineRegionPoints/lineRegionPoints.cpp
|
region/regionPoints/lineRegionPoints/lineRegionPoints.cpp
|
||||||
region/regionPoints/centerPointsRegionPoints/centerPointsRegionPoints.cpp
|
region/regionPoints/centerPointsRegionPoints/centerPointsRegionPoints.cpp
|
||||||
region/regionPoints/multipleSpheresRegionPoints/multipleSpheresRegionPoints.cpp
|
region/regionPoints/multipleSpheresRegionPoints/multipleSpheresRegionPoints.cpp
|
||||||
|
region/regionPoints/rectMeshRegionPoints/rectMeshRegionPoints.cpp
|
||||||
|
|
||||||
# Postprocess components
|
# Postprocess components
|
||||||
postprocessComponent/postprocessComponent/postprocessComponent.cpp
|
postprocessComponent/postprocessComponent/postprocessComponent.cpp
|
||||||
@ -23,7 +25,9 @@ set(SourceFiles
|
|||||||
operation/PostprocessOperation/PostprocessOperationSum.cpp
|
operation/PostprocessOperation/PostprocessOperationSum.cpp
|
||||||
operation/PostprocessOperation/PostprocessOperationAverage.cpp
|
operation/PostprocessOperation/PostprocessOperationAverage.cpp
|
||||||
operation/PostprocessOperation/PostprocessOperationAvMassVelocity.cpp
|
operation/PostprocessOperation/PostprocessOperationAvMassVelocity.cpp
|
||||||
|
operation/PostprocessOperation/PostprocessOperationSolidVolFraction.cpp
|
||||||
|
operation/PostprocessOperation/PostprocessOperationBulkDensity.cpp
|
||||||
|
|
||||||
operation/includeMask/includeMask.cpp
|
operation/includeMask/includeMask.cpp
|
||||||
operation/includeMask/IncludeMasks.cpp
|
operation/includeMask/IncludeMasks.cpp
|
||||||
|
|
||||||
|
@ -23,106 +23,10 @@ Licence:
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @class PostprocessOperationAvMassVelocity
|
* @class PostprocessOperationAvMassVelocity
|
||||||
* @brief A class for averaging field values within specified regions during post-processing.
|
* @brief Calculates mass-weighted average velocity of particles in the regions
|
||||||
*
|
*
|
||||||
* @details
|
|
||||||
* The PostprocessOperationAvMassVelocity class is a specialized post-processing operation that
|
|
||||||
* calculates the average of field values within specified regions. It inherits from the
|
|
||||||
* postprocessOperation base class and implements a weighted averaging operation that
|
|
||||||
* can be applied to scalar (real), vector (realx3), and tensor (realx4) fields.
|
|
||||||
*
|
|
||||||
* The average operation follows the mathematical formula:
|
|
||||||
* \f[
|
|
||||||
* \text{result} = \frac{\sum_{j \in \text{includeMask}} w_j \cdot \phi_j \cdot \text{field}_j}
|
|
||||||
* {\sum_{i \in \text{processRegion}} w_i \cdot \phi_i}
|
|
||||||
* \f]
|
|
||||||
*
|
|
||||||
* Where:
|
|
||||||
* - \f$ i \f$ represents all particles within the specified processing region
|
|
||||||
* - \f$ j \f$ belongs to a subset of \f$ i \f$ based on an includeMask
|
|
||||||
* - \f$ w_i \f$ is the weight factor for particle \f$ i \f$
|
|
||||||
* - \f$ \phi_i \f$ is the value from the phi field for particle \f$ i \f$
|
|
||||||
* - \f$ \text{field}_j \f$ is the value from the target field for particle \f$ j \f$
|
|
||||||
*
|
|
||||||
* The calculation can optionally be divided by the region volume (when divideByVolume is set to yes),
|
|
||||||
* which allows calculating normalized averages:
|
|
||||||
* \f[
|
|
||||||
* \text{result} = \frac{1}{V_{\text{region}}} \frac{\sum_{j \in \text{includeMask}} w_j \cdot \phi_j \cdot \text{field}_j}
|
|
||||||
* {\sum_{i \in \text{processRegion}} w_i \cdot \phi_i}
|
|
||||||
* \f]
|
|
||||||
*
|
|
||||||
* The averaging can be further filtered using an includeMask to selectively include only
|
|
||||||
* specific particles that satisfy certain criteria.
|
|
||||||
*
|
|
||||||
* This class supports the following field types:
|
|
||||||
* - real (scalar values)
|
|
||||||
* - realx3 (vector values)
|
|
||||||
* - realx4 (tensor values)
|
|
||||||
*
|
|
||||||
* @section usage Usage Example
|
|
||||||
* Below is a sample dictionary showing how to configure and use this class:
|
|
||||||
*
|
*
|
||||||
* ```
|
* @see PostprocessOperationAverage
|
||||||
* processMethod arithmetic; // method of performing the sum (arithmetic, uniformDistribution, GaussianDistribution)
|
|
||||||
* processRegion sphere; // type of region on which processing is performed
|
|
||||||
*
|
|
||||||
* sphereInfo
|
|
||||||
* {
|
|
||||||
* radius 0.01;
|
|
||||||
* center (-0.08 -0.08 0.015);
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* timeControl default;
|
|
||||||
*
|
|
||||||
* /// all the post process operations to be done
|
|
||||||
* operations
|
|
||||||
* (
|
|
||||||
* // computes the arithmetic mean of particle velocity
|
|
||||||
* averageVel
|
|
||||||
* {
|
|
||||||
* function average;
|
|
||||||
* field velocity;
|
|
||||||
* dividedByVolume no; // default is no
|
|
||||||
* threshold 3; // default is 1
|
|
||||||
* includeMask all; // include all particles in the calculation
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* // computes the fraction of par1 in the region
|
|
||||||
* par1Fraction
|
|
||||||
* {
|
|
||||||
* function average;
|
|
||||||
* field one; // the "one" field is special - all members have value 1.0
|
|
||||||
* phi one; // default is "one"
|
|
||||||
* dividedByVolume 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;
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* );
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @section defaults Default Behavior
|
|
||||||
* - By default, `phi` is set to the field named "one" which contains value 1.0 for all entries
|
|
||||||
* - `dividedByVolume` is set to "no" by default
|
|
||||||
* - `threshold` is set to 1 by default
|
|
||||||
* - `includeMask` can be set to various filters, with "all" being the default to include all particles
|
|
||||||
*
|
|
||||||
* @section special Special Fields
|
|
||||||
* The field named "one" is a special field where all members have the value 1.0. This makes it
|
|
||||||
* particularly useful for calculating:
|
|
||||||
*
|
|
||||||
* 1. Volume or number fractions (as shown in the par1Fraction example)
|
|
||||||
* 2. Simple counts when used with an appropriate mask
|
|
||||||
* 3. Normalizing values by particle count
|
|
||||||
*
|
|
||||||
* @see postprocessOperation
|
|
||||||
* @see executeAverageOperation
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <variant>
|
#include <variant>
|
||||||
|
@ -161,7 +161,15 @@ bool PostprocessOperationAverage::write(const fileSystem &parDir) const
|
|||||||
fileSystem path = parDir+(
|
fileSystem path = parDir+(
|
||||||
processedFieldName()+"_prime2" + ".Start_" + ti.timeName());
|
processedFieldName()+"_prime2" + ".Start_" + ti.timeName());
|
||||||
os2Ptr_ = makeUnique<oFstream>(path);
|
os2Ptr_ = makeUnique<oFstream>(path);
|
||||||
|
|
||||||
|
if(regPoints().scientific())
|
||||||
|
{
|
||||||
|
// set output format to scientific notation
|
||||||
|
os2Ptr_().stdStream()<<std::scientific;
|
||||||
|
}
|
||||||
|
|
||||||
|
os2Ptr_().precision(regPoints().precision());
|
||||||
|
|
||||||
regPoints().write(os2Ptr_());
|
regPoints().write(os2Ptr_());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,4 +186,26 @@ bool PostprocessOperationAverage::write(const fileSystem &parDir) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PostprocessOperationAverage::write(iOstream &os) const
|
||||||
|
{
|
||||||
|
if(! postprocessOperation::write(os))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!calculateFluctuation2_())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
std::visit
|
||||||
|
(
|
||||||
|
[&](auto&& arg)->bool
|
||||||
|
{
|
||||||
|
return arg.writeFieldToVtk(os);
|
||||||
|
},
|
||||||
|
fluctuation2FieldPtr_()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace pFlow::postprocessData
|
} // namespace pFlow::postprocessData
|
@ -195,6 +195,8 @@ public:
|
|||||||
/// write to os stream
|
/// write to os stream
|
||||||
bool write(const fileSystem &parDir)const override;
|
bool write(const fileSystem &parDir)const override;
|
||||||
|
|
||||||
|
bool write(iOstream& os)const override;
|
||||||
|
|
||||||
|
|
||||||
/// @brief Execute average operation on field values
|
/// @brief Execute average operation on field values
|
||||||
/// @param weights Weight factors for particles
|
/// @param weights Weight factors for particles
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
#include "PostprocessOperationBulkDensity.hpp"
|
||||||
|
|
||||||
|
namespace pFlow::postprocessData
|
||||||
|
{
|
||||||
|
|
||||||
|
PostprocessOperationBulkDensity::PostprocessOperationBulkDensity
|
||||||
|
(
|
||||||
|
const dictionary &opDict,
|
||||||
|
const regionPoints ®Points,
|
||||||
|
fieldsDataBase &fieldsDB
|
||||||
|
)
|
||||||
|
:
|
||||||
|
PostprocessOperationSum
|
||||||
|
(
|
||||||
|
opDict,
|
||||||
|
"mass",
|
||||||
|
"one",
|
||||||
|
"all",
|
||||||
|
regPoints,
|
||||||
|
fieldsDB
|
||||||
|
)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
/*------------------------------- 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 __PostprocessOperationBulkDensity_hpp__
|
||||||
|
#define __PostprocessOperationBulkDensity_hpp__
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @class PostprocessOperationBulkDensity
|
||||||
|
* @brief Calculates bulk density in the regions
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @see PostprocessOperationSum
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "PostprocessOperationSum.hpp"
|
||||||
|
|
||||||
|
namespace pFlow::postprocessData
|
||||||
|
{
|
||||||
|
|
||||||
|
class PostprocessOperationBulkDensity
|
||||||
|
:
|
||||||
|
public PostprocessOperationSum
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
TypeInfo("PostprocessOperation<bulkDensity>");
|
||||||
|
|
||||||
|
/// @brief Constructs average operation processor
|
||||||
|
/// @param opDict Operation parameters dictionary
|
||||||
|
/// @param regPoints Region points data
|
||||||
|
/// @param fieldsDB Fields database
|
||||||
|
PostprocessOperationBulkDensity(
|
||||||
|
const dictionary& opDict,
|
||||||
|
const regionPoints& regPoints,
|
||||||
|
fieldsDataBase& fieldsDB);
|
||||||
|
|
||||||
|
/// destructor
|
||||||
|
~PostprocessOperationBulkDensity() override = default;
|
||||||
|
|
||||||
|
/// add this virtual constructor to the base class
|
||||||
|
add_vCtor
|
||||||
|
(
|
||||||
|
postprocessOperation,
|
||||||
|
PostprocessOperationBulkDensity,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
|
||||||
|
bool divideByVolume()const override
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //__PostprocessOperationSolidVolFraction_hpp__
|
||||||
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
#include "PostprocessOperationSolidVolFraction.hpp"
|
||||||
|
|
||||||
|
namespace pFlow::postprocessData
|
||||||
|
{
|
||||||
|
|
||||||
|
PostprocessOperationSolidVolFraction::PostprocessOperationSolidVolFraction
|
||||||
|
(
|
||||||
|
const dictionary &opDict,
|
||||||
|
const regionPoints ®Points,
|
||||||
|
fieldsDataBase &fieldsDB
|
||||||
|
)
|
||||||
|
:
|
||||||
|
PostprocessOperationSum
|
||||||
|
(
|
||||||
|
opDict,
|
||||||
|
"volume",
|
||||||
|
"one",
|
||||||
|
"all",
|
||||||
|
regPoints,
|
||||||
|
fieldsDB
|
||||||
|
)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
/*------------------------------- 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 __PostprocessOperationSolidVolFraction_hpp__
|
||||||
|
#define __PostprocessOperationSolidVolFraction_hpp__
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @class PostprocessOperationSolidVolFraction
|
||||||
|
* @brief Calculates solid volume fraction in the regions
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @see PostprocessOperationSum
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "PostprocessOperationSum.hpp"
|
||||||
|
|
||||||
|
namespace pFlow::postprocessData
|
||||||
|
{
|
||||||
|
|
||||||
|
class PostprocessOperationSolidVolFraction
|
||||||
|
:
|
||||||
|
public PostprocessOperationSum
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
TypeInfo("PostprocessOperation<solidVolFraction>");
|
||||||
|
|
||||||
|
/// @brief Constructs average operation processor
|
||||||
|
/// @param opDict Operation parameters dictionary
|
||||||
|
/// @param regPoints Region points data
|
||||||
|
/// @param fieldsDB Fields database
|
||||||
|
PostprocessOperationSolidVolFraction(
|
||||||
|
const dictionary& opDict,
|
||||||
|
const regionPoints& regPoints,
|
||||||
|
fieldsDataBase& fieldsDB);
|
||||||
|
|
||||||
|
/// destructor
|
||||||
|
~PostprocessOperationSolidVolFraction() override = default;
|
||||||
|
|
||||||
|
/// add this virtual constructor to the base class
|
||||||
|
add_vCtor
|
||||||
|
(
|
||||||
|
postprocessOperation,
|
||||||
|
PostprocessOperationSolidVolFraction,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
|
||||||
|
bool divideByVolume()const override
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //__PostprocessOperationSolidVolFraction_hpp__
|
||||||
|
|
||||||
|
|
@ -41,6 +41,49 @@ PostprocessOperationSum::PostprocessOperationSum
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PostprocessOperationSum::PostprocessOperationSum
|
||||||
|
(
|
||||||
|
const dictionary &opDict,
|
||||||
|
const word &fieldName,
|
||||||
|
const word &phiName,
|
||||||
|
const word &includeName,
|
||||||
|
const regionPoints ®Points,
|
||||||
|
fieldsDataBase &fieldsDB
|
||||||
|
)
|
||||||
|
:
|
||||||
|
postprocessOperation(
|
||||||
|
opDict,
|
||||||
|
fieldName,
|
||||||
|
phiName,
|
||||||
|
includeName,
|
||||||
|
regPoints,
|
||||||
|
fieldsDB)
|
||||||
|
{
|
||||||
|
if( fieldType() == getTypeName<real>() )
|
||||||
|
{
|
||||||
|
processedRegField_ = makeUnique<processedRegFieldType>(
|
||||||
|
regionField(processedFieldName(), regPoints, real(0)));
|
||||||
|
}
|
||||||
|
else if( fieldType() == getTypeName<realx3>() )
|
||||||
|
{
|
||||||
|
processedRegField_ = makeUnique<processedRegFieldType>(
|
||||||
|
regionField(processedFieldName(), regPoints, realx3(0)));
|
||||||
|
}
|
||||||
|
else if( fieldType() == getTypeName<realx4>() )
|
||||||
|
{
|
||||||
|
processedRegField_ = makeUnique<processedRegFieldType>(
|
||||||
|
regionField(processedFieldName(), regPoints, realx4(0)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fatalErrorInFunction<<" in dictionary "<< opDict.globalName()
|
||||||
|
<< " field type is not supported for sum operation"
|
||||||
|
<< " field type is "<< fieldType()
|
||||||
|
<< endl;
|
||||||
|
fatalExit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Performs weighted sum of field values within each region
|
/// Performs weighted sum of field values within each region
|
||||||
bool PostprocessOperationSum::execute
|
bool PostprocessOperationSum::execute
|
||||||
(
|
(
|
||||||
|
@ -154,6 +154,14 @@ public:
|
|||||||
const regionPoints& regPoints,
|
const regionPoints& regPoints,
|
||||||
fieldsDataBase& fieldsDB);
|
fieldsDataBase& fieldsDB);
|
||||||
|
|
||||||
|
PostprocessOperationSum(
|
||||||
|
const dictionary& opDict,
|
||||||
|
const word& fieldName,
|
||||||
|
const word& phiName,
|
||||||
|
const word& includeName,
|
||||||
|
const regionPoints& regPoints,
|
||||||
|
fieldsDataBase& fieldsDB);
|
||||||
|
|
||||||
/// destructor
|
/// destructor
|
||||||
~PostprocessOperationSum() override = default;
|
~PostprocessOperationSum() override = default;
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ regionField<T> executeFluctuation2Operation
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
const auto& regPoints = fieldAvg.regPoints();
|
const auto& regPoints = fieldAvg.regPoints();
|
||||||
regionField<T> processedField(regFieldName, regPoints, T{});
|
regionField<T> processedField(regFieldName+"_fluctuation2", regPoints, T{});
|
||||||
auto vols = regPoints.volumes();
|
auto vols = regPoints.volumes();
|
||||||
|
|
||||||
for(uint32 reg =0; reg<regPoints.size(); reg++)
|
for(uint32 reg =0; reg<regPoints.size(); reg++)
|
||||||
|
@ -107,6 +107,14 @@ bool postprocessOperation::write(const fileSystem &parDir) const
|
|||||||
processedFieldName() + ".Start_" + ti.timeName());
|
processedFieldName() + ".Start_" + ti.timeName());
|
||||||
osPtr_ = makeUnique<oFstream>(path);
|
osPtr_ = makeUnique<oFstream>(path);
|
||||||
|
|
||||||
|
if(regPoints().scientific())
|
||||||
|
{
|
||||||
|
// set output format to scientific notation
|
||||||
|
osPtr_().stdStream()<<std::scientific;
|
||||||
|
}
|
||||||
|
|
||||||
|
osPtr_().precision(regPoints().precision());
|
||||||
|
|
||||||
regPoints().write(osPtr_());
|
regPoints().write(osPtr_());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,6 +132,25 @@ bool postprocessOperation::write(const fileSystem &parDir) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool postprocessOperation::write(iOstream& os)const
|
||||||
|
{
|
||||||
|
if(!regPoints().writeToSameTimeFile())
|
||||||
|
{
|
||||||
|
const auto& field = processedField();
|
||||||
|
|
||||||
|
return
|
||||||
|
std::visit
|
||||||
|
(
|
||||||
|
[&](auto&& arg)->bool
|
||||||
|
{
|
||||||
|
return arg.writeFieldToVtk(os);
|
||||||
|
},
|
||||||
|
field
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
uniquePtr<postprocessOperation> postprocessOperation::create
|
uniquePtr<postprocessOperation> postprocessOperation::create
|
||||||
(
|
(
|
||||||
const dictionary &opDict,
|
const dictionary &opDict,
|
||||||
|
@ -99,7 +99,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
/// Dictionary containing operation-specific parameters.
|
/// Dictionary containing operation-specific parameters.
|
||||||
pFlow::dictionary operationDict_;
|
pFlow::dictionary operationDict_;
|
||||||
|
|
||||||
/// This Threshold is used to exclude the regions which contain
|
/// This Threshold is used to exclude the regions which contain
|
||||||
/// fewer than this value.
|
/// fewer than this value.
|
||||||
@ -224,7 +224,8 @@ public:
|
|||||||
return threshold_;
|
return threshold_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// whether the result is divided by volume of the region
|
/// whether the result is divided by volume of the region
|
||||||
|
virtual
|
||||||
bool divideByVolume()const
|
bool divideByVolume()const
|
||||||
{
|
{
|
||||||
return divideByVolume_();
|
return divideByVolume_();
|
||||||
@ -255,7 +256,7 @@ public:
|
|||||||
/// write the result to output stream (possibly a file)
|
/// write the result to output stream (possibly a file)
|
||||||
/// @param os Output stream to write the result.
|
/// @param os Output stream to write the result.
|
||||||
virtual
|
virtual
|
||||||
bool write(iOstream& os)const {return true;}
|
bool write(iOstream& os)const;
|
||||||
|
|
||||||
/// Create the polymorphic object using the virtual constructor.
|
/// Create the polymorphic object using the virtual constructor.
|
||||||
/// @param opDict Dictionary containing operation-specific parameters.
|
/// @param opDict Dictionary containing operation-specific parameters.
|
||||||
|
@ -152,11 +152,33 @@ bool pFlow::postprocessData::PostprocessComponent<RegionType, ProcessMethodType>
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
notImplementedFunction;
|
word chNum = real2FixedStripZeros(database().time().currentTime() *1000000, 0);
|
||||||
return false;
|
fileSystem file = parDir + (name() +"-"+chNum+".vtk");
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
auto osPtr = makeUnique<oFstream>(file);
|
||||||
|
|
||||||
|
// set output format to scientific notation
|
||||||
|
if(regPoints().scientific())
|
||||||
|
{
|
||||||
|
osPtr->stdStream() << std::scientific;
|
||||||
|
}
|
||||||
|
|
||||||
|
osPtr().precision(regPoints().precision());
|
||||||
|
|
||||||
|
regPoints().write(osPtr());
|
||||||
|
|
||||||
|
for(auto& operation:operatios_)
|
||||||
|
{
|
||||||
|
if(!operation->write(osPtr()))
|
||||||
|
{
|
||||||
|
fatalErrorInFunction
|
||||||
|
<<"Error occurred in writing operation defined in dict "
|
||||||
|
<< operation->operationDict()
|
||||||
|
<<endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
@ -53,7 +53,7 @@ private:
|
|||||||
|
|
||||||
regionField<real> volumeFactor_;
|
regionField<real> volumeFactor_;
|
||||||
|
|
||||||
bool executed_{false};
|
bool executed_{false};
|
||||||
|
|
||||||
dictionaryList operationDicts_;
|
dictionaryList operationDicts_;
|
||||||
|
|
||||||
@ -122,8 +122,6 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "PostprocessComponent.cpp"
|
#include "PostprocessComponent.cpp"
|
||||||
|
@ -47,8 +47,8 @@ public:
|
|||||||
:
|
:
|
||||||
PostprocessComponent<RegionType,GaussianDistribution>(dict, fieldsDB, defaultTimeControl)
|
PostprocessComponent<RegionType,GaussianDistribution>(dict, fieldsDB, defaultTimeControl)
|
||||||
{
|
{
|
||||||
/// initializes the Gaussian distribution for all elements of region
|
|
||||||
//const uint32 n = this->regPoints().size();
|
this->regPoints().applyRegionExtension();
|
||||||
auto d = this->regPoints().eqDiameters();
|
auto d = this->regPoints().eqDiameters();
|
||||||
auto c = this->regPoints().centers();
|
auto c = this->regPoints().centers();
|
||||||
auto& regs = this->regionProecessMethod();
|
auto& regs = this->regionProecessMethod();
|
||||||
|
@ -26,6 +26,7 @@ Licence:
|
|||||||
#include "sphereRegionPoints.hpp"
|
#include "sphereRegionPoints.hpp"
|
||||||
#include "lineRegionPoints.hpp"
|
#include "lineRegionPoints.hpp"
|
||||||
#include "multipleSpheresRegionPoints.hpp"
|
#include "multipleSpheresRegionPoints.hpp"
|
||||||
|
#include "rectMeshRegionPoints.hpp"
|
||||||
|
|
||||||
namespace pFlow::postprocessData
|
namespace pFlow::postprocessData
|
||||||
{
|
{
|
||||||
@ -37,6 +38,10 @@ template class PostprocessComponentGaussian<multipleSpheresRegionPoints>;
|
|||||||
template class PostprocessComponentUniform<multipleSpheresRegionPoints>;
|
template class PostprocessComponentUniform<multipleSpheresRegionPoints>;
|
||||||
template class PostprocessComponentArithmetic<multipleSpheresRegionPoints>;
|
template class PostprocessComponentArithmetic<multipleSpheresRegionPoints>;
|
||||||
|
|
||||||
|
template class PostprocessComponentGaussian<rectMeshRegionPoints>;
|
||||||
|
template class PostprocessComponentUniform<rectMeshRegionPoints>;
|
||||||
|
template class PostprocessComponentArithmetic<rectMeshRegionPoints>;
|
||||||
|
|
||||||
template class PostprocessComponentGaussian<lineRegionPoints>;
|
template class PostprocessComponentGaussian<lineRegionPoints>;
|
||||||
template class PostprocessComponentUniform<lineRegionPoints>;
|
template class PostprocessComponentUniform<lineRegionPoints>;
|
||||||
template class PostprocessComponentArithmetic<lineRegionPoints>;
|
template class PostprocessComponentArithmetic<lineRegionPoints>;
|
||||||
|
@ -157,6 +157,12 @@ bool pFlow::postprocessData::particleProbePostprocessComponent::write(const file
|
|||||||
// file is not open yet
|
// file is not open yet
|
||||||
fileSystem path = parDir + (name_+".Start_"+ti.timeName());
|
fileSystem path = parDir + (name_+".Start_"+ti.timeName());
|
||||||
osPtr_ = makeUnique<oFstream>(path);
|
osPtr_ = makeUnique<oFstream>(path);
|
||||||
|
|
||||||
|
if(regionPointsPtr_().scientific())
|
||||||
|
{
|
||||||
|
osPtr_().stdStream() << std::scientific;
|
||||||
|
}
|
||||||
|
osPtr_().precision(regionPointsPtr_().precision());
|
||||||
regionPointsPtr_().write(osPtr_());
|
regionPointsPtr_().write(osPtr_());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,18 +2,16 @@
|
|||||||
|
|
||||||
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.
|
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.
|
- **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 learn 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.
|
- **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 stored in time folders. If you want to use post-simulation, you need to run the utility `postprocessPhasicFlow` in the terminal (in the simulation case setup folder) to execute the postprocessing. This utility reads the `postprocessDataDict` file and performs the specified operations on the simulation data.
|
||||||
|
|
||||||
## 1. Overview
|
### Important Notes
|
||||||
|
|
||||||
Postprocessing in phasicFlow allows you to:
|
* **NOTE 1:**
|
||||||
|
Postprocessing for in-simulation is not implemented for MPI execution. So, do not use it when using MPI execution. For post-simulation postprocessing, you can use the `postprocessPhasicFlow` utility without MPI, even though the actual simulation has been done using MPI.
|
||||||
|
|
||||||
- Extract information about particles in specific regions of the domain
|
* **NOTE 2:**
|
||||||
- Calculate statistical properties such as averages and sums of particle attributes
|
In post-simulation mode, all `timeControl` settings are ignored. The postprocessing will be done for all the time folders that are available in the case directory, or if you specify the time range in the command line, the postprocessing will be done for the time folders within the specified range.
|
||||||
- Track specific particles throughout the simulation
|
|
||||||
- Apply different weighing methods when calculating statistics
|
|
||||||
- Perform postprocessing at specific time intervals
|
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
@ -33,16 +31,28 @@ Postprocessing in phasicFlow allows you to:
|
|||||||
- [7.1. Example 1: Probing Individual Particles](#71-example-1-probing-individual-particles)
|
- [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.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)
|
- [7.3. Example 3: Processing Along a Line](#73-example-3-processing-along-a-line)
|
||||||
|
- [7.4. Example 4: Processing in a Rectangular Mesh](#74-example-4-processing-in-a-rectangular-mesh)
|
||||||
|
- [7.5. Example 5: Tracking particles](#75-example-5-tracking-particles)
|
||||||
- [8. Advanced Features](#8-advanced-features)
|
- [8. Advanced Features](#8-advanced-features)
|
||||||
- [8.1. Special functions applied on fields](#81-special-functions-applied-on-fields)
|
- [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.2. Particle Filtering with IncludeMask](#82-particle-filtering-with-includemask)
|
||||||
- [8.3. Implementation Notes](#83-implementation-notes)
|
- [8.3. Implementation Notes](#83-implementation-notes)
|
||||||
- [9. Mathematical Formulations](#9-mathematical-formulations)
|
- [9. Mathematical Formulations](#9-mathematical-formulations)
|
||||||
- [10. A complete dictionary file (postprocessDataDict)](#10-a-complete-dictionary-file-postprocessdatadict)
|
- [10. A Complete Dictionary File (postprocessDataDict)](#10-a-complete-dictionary-file-postprocessdatadict)
|
||||||
|
|
||||||
|
## 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 weighting methods when calculating statistics
|
||||||
|
- Perform postprocessing at specific time intervals
|
||||||
|
|
||||||
## 2. Setting Up Postprocessing
|
## 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.
|
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
|
### 2.1. Basic Configuration
|
||||||
|
|
||||||
@ -51,7 +61,6 @@ The input dictionary, **settings/postprocessDataDict**, may look like this:
|
|||||||
```cpp
|
```cpp
|
||||||
// PostprocessData dictionary
|
// PostprocessData dictionary
|
||||||
|
|
||||||
|
|
||||||
// Enable/disable postprocessing during simulation
|
// Enable/disable postprocessing during simulation
|
||||||
runTimeActive yes; // Options: yes, no
|
runTimeActive yes; // Options: yes, no
|
||||||
|
|
||||||
@ -61,7 +70,7 @@ shapeType sphere; // Options depend on the simulation type: sphere, grain, etc
|
|||||||
// Default time control for postprocessing components
|
// Default time control for postprocessing components
|
||||||
defaultTimeControl
|
defaultTimeControl
|
||||||
{
|
{
|
||||||
timeControl timeStep; // Options: timeStep, simulationTime, settings
|
timeControl timeStep; // Options: timeStep, simulationTime, settingsDict
|
||||||
startTime 0; // Start time for postprocessing
|
startTime 0; // Start time for postprocessing
|
||||||
endTime 1000; // End time for postprocessing
|
endTime 1000; // End time for postprocessing
|
||||||
executionInterval 150; // How frequently to run postprocessing
|
executionInterval 150; // How frequently to run postprocessing
|
||||||
@ -74,7 +83,6 @@ components
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
If you want to activate in-simulation postprocessing, you need to add these lines to the `settings/settingsDict` file:
|
If you want to activate in-simulation postprocessing, you need to add these lines to the `settings/settingsDict` file:
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
@ -83,7 +91,7 @@ libs ("libPostprocessData.so");
|
|||||||
auxFunctions postprocessData;
|
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.
|
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 the `postprocessDataDict` file.
|
||||||
|
|
||||||
## 3. Time Control Options
|
## 3. Time Control Options
|
||||||
|
|
||||||
@ -93,8 +101,8 @@ Each postprocessing component can either use the default time control settings o
|
|||||||
|--------|-------------|---------------------|
|
|--------|-------------|---------------------|
|
||||||
| `timeStep` | Controls execution based on simulation time steps | `startTime`, `endTime`, `executionInterval` |
|
| `timeStep` | Controls execution based on simulation time steps | `startTime`, `endTime`, `executionInterval` |
|
||||||
| `simulationTime` | Controls execution based on simulation time | `startTime`, `endTime`, `executionInterval` |
|
| `simulationTime` | Controls execution based on simulation time | `startTime`, `endTime`, `executionInterval` |
|
||||||
| `settings` | Uses parameters from settingsDict file | None (defined elsewhere) |
|
| `settingsDict` | Uses parameters from settingsDict file | None (defined elsewhere) |
|
||||||
| `default` | Uses the default time control settings (uses `defaultTimeControl` settings)| None (uses default) |
|
| `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.
|
If no time control is specified, the `default` option is used automatically.
|
||||||
|
|
||||||
@ -102,14 +110,14 @@ If no time control is specified, the `default` option is used automatically.
|
|||||||
|
|
||||||
The postprocessing module provides several methods for processing particle data. They are categorized into two main groups: bulk and individual 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.).
|
- **Bulk Methods**: Operate on all particles that are located in specified locations/regions (cells, spheres, etc.).
|
||||||
- **Individual Methods**: Operate on specific particles, allowing for targeted particle property extraction.
|
- **Individual Methods**: Operate on specific particles, allowing for targeted particle property extraction.
|
||||||
|
|
||||||
| Method | Property type | Description | Formula |
|
| Method | Property Type | Description | Formula |
|
||||||
|--------|------------------|-------------|---------|
|
|--------|---------------|-------------|---------|
|
||||||
| `arithmetic` | bulk | Simple arithmetic mean/sum with equal weights | Each particle contributes equally |
|
| `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 |
|
| `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}$ |
|
| `GaussianDistribution` | bulk | Weight contribution based on distance from the 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 |
|
| `particleProbe` | individual | Extracts values from specific particles | Direct access to particle properties |
|
||||||
|
|
||||||
## 5. Region Types
|
## 5. Region Types
|
||||||
@ -118,12 +126,54 @@ Regions define where in the domain the postprocessing operations are applied:
|
|||||||
|
|
||||||
| Region Type | Description | Required Parameters | Compatible with |
|
| Region Type | Description | Required Parameters | Compatible with |
|
||||||
|-------------|-------------|---------------------|-----------------|
|
|-------------|-------------|---------------------|-----------------|
|
||||||
| `sphere` | A spherical region | `radius`, `center` | bulk |
|
| `sphere` | A spherical region | `radius`, `center` defined in `sphereInfo` dict| bulk |
|
||||||
| `multipleSpheres` | Multiple spherical regions | `centers`, `radii` | bulk |
|
| `multipleSpheres` | Multiple spherical regions | `centers`, `radii` defined in `multiplSpheresInfo` dict | bulk |
|
||||||
| `line` | Spheres along a line with specified radius | `p1`, `p2`, `nSpheres`, `radius` | bulk |
|
| `line` | Spheres along a line with specified radius | `p1`, `p2`, `nSpheres`, `radius` defined in `lineInfo` dict| bulk |
|
||||||
| `centerPoints` | Specific particles selected by ID | `ids` | individual |
|
| `box`| A cuboid region | `min`, `max` defined in `boxInfo` dict | bulk |
|
||||||
|
| `rectMesh`** | creates a rectangular mesh and each direction is divided into equal spaces| corner points of mesh, and `nx`, `ny`, `nz`: number of divisions in each direction | bulk |
|
||||||
|
| `centerPoints`* | if `selector` is set to `id`, particles selected by ID list | `ids`: a list of particle ids | individual |
|
||||||
|
| `centerPoints`* | if `selector` is set to `box`, particles are selected by center points located in a box | corner points of the box are given in `boxInfo` sub-dict | individual |
|
||||||
|
| `centerPoints`* | if `selector` is set to `sphere`, particles are selected by center points located in a sphere | center and radius of a sphere given in `sphereInfo` sub-dict | individual |
|
||||||
|
| `centerPoints`* | if `selector` is set to `cylinder`, particles are selected by center points located in a cylinder | axis info and radius of cylinder at end points that are given in `cylinderInfo` sub-dict | individual |
|
||||||
|
| <td colspan="3">\* Particles selection is done when simulation reaches the time that is specified by `startTime` of the post-process component and this selection remains intact up to the end of simulation. This is very good for particle tracking purposes or when you want to analyze specific particles behavior over time.</td> |
|
||||||
|
| <td colspan="3">\** This region creates a rectangular mesh and particles are located into cells according to their center points. When using `GaussianDistribution` as `processMethod`, a larger neighbor radius is considered for each cell and particles inside this neighbor radius are included in the calculations.</td> |
|
||||||
|
|
||||||
## 6. Processing Operations
|
### output format
|
||||||
|
|
||||||
|
The output format of the postprocessing results can be controlled by the `precision` and `scientific` parameters:
|
||||||
|
|
||||||
|
- `precision`: Number of decimal places for the output (defualt is 6).
|
||||||
|
- `scientific`: Whether to use scientific notation for large numbers (options: `yes`, `no`, default is `yes`).
|
||||||
|
|
||||||
|
for example, if you want to use 5 decimal places and no scientific notation, you can set:
|
||||||
|
|
||||||
|
```C++
|
||||||
|
on_single_sphere
|
||||||
|
{
|
||||||
|
processMethod arithmetic;
|
||||||
|
|
||||||
|
processRegion sphere;
|
||||||
|
|
||||||
|
sphereInfo
|
||||||
|
{
|
||||||
|
radius 0.01;
|
||||||
|
center (-0.08 -0.08 0.015);
|
||||||
|
}
|
||||||
|
|
||||||
|
timeControl default;
|
||||||
|
|
||||||
|
precision 5; // default is 6
|
||||||
|
|
||||||
|
scientific no; // default is yes
|
||||||
|
|
||||||
|
operations
|
||||||
|
(
|
||||||
|
// a list of operations should be defined here
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 6. Processing Operations for Bulk Properties
|
||||||
|
|
||||||
Within each processing region of type `bulk`, you can define multiple operations to be performed:
|
Within each processing region of type `bulk`, you can define multiple operations to be performed:
|
||||||
|
|
||||||
@ -152,7 +202,7 @@ where:
|
|||||||
|
|
||||||
### 6.2. About fluctuation2 in average function
|
### 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.
|
`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:
|
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}$$
|
$$\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}$$
|
||||||
@ -170,6 +220,8 @@ In addition to the above basic functions, some derived functions are available f
|
|||||||
| Function | Property type | Description | Formula | Required Parameters |
|
| 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}$ | - |
|
|`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}$ | - |
|
||||||
|
|`solidVolFraction`| bulk| Volume fraction of solid| $\phi = \frac{\sum_{i \in \text{region}} w_i \cdot V_i}{V_{\text{region}}}$ | - |
|
||||||
|
|`bulkDensity`| bulk| Bulk density of particles in the region | $\rho_{bulk} = \frac{\sum_{i \in \text{region}} w_i \cdot m_i}{V_{\text{region}}}$ | - |
|
||||||
|
|
||||||
### 6.4. Available Fields
|
### 6.4. Available Fields
|
||||||
|
|
||||||
@ -335,6 +387,90 @@ along_a_line
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
### 7.4 Example 4: Processing in a Rectangular Mesh
|
||||||
|
|
||||||
|
In this example, a rectangular mesh is defined. The `rectMeshInfo` section specifies the minimum and maximum corner points of the box, the number of divisions in each direction, and an optional cell extension factor which is effective for GaussianDistribution only. In the `operations` section, two operations are defined: one for calculating the average velocity and another for calculating the solid volume fraction.
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
on_a_rectMesh
|
||||||
|
{
|
||||||
|
processMethod GaussianDistribution;
|
||||||
|
processRegion rectMesh;
|
||||||
|
|
||||||
|
timeControl settingsDict; // uses settings from settingsDict file
|
||||||
|
|
||||||
|
rectMeshInfo
|
||||||
|
{
|
||||||
|
min (-0.12 -0.12 0.00); // lower corner point of the box
|
||||||
|
max (0.12 0.12 0.11); // upper corner point of the box
|
||||||
|
|
||||||
|
nx 30; // number of divisions in x direction
|
||||||
|
ny 30; // number of divisions in y direction
|
||||||
|
nz 15; // number of divisions in z direction
|
||||||
|
|
||||||
|
// optional (default is 2.0)
|
||||||
|
// for each cell, a neighbor radius is considered. This neighbor radius is equal to
|
||||||
|
// cellExtension * equivalent diameter of the cell.
|
||||||
|
// cell extension is only effective when using GaussianDistribution as processMethod.
|
||||||
|
cellExtension 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
operations
|
||||||
|
(
|
||||||
|
avVelocity
|
||||||
|
{
|
||||||
|
function average;
|
||||||
|
field velocity;
|
||||||
|
fluctuation2 yes;
|
||||||
|
threshold 4;
|
||||||
|
phi mass;
|
||||||
|
}
|
||||||
|
|
||||||
|
solidVolumeFraction
|
||||||
|
{
|
||||||
|
function sum;
|
||||||
|
field volume;
|
||||||
|
divideByVolume yes;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 7.5 Example 5: Tracking particles
|
||||||
|
|
||||||
|
Suppose we want to mark and track the position of particles that are located inside a box region at t = 1 s. All particles that are inside the box at t = 1 s will be marked/selected and then the position of them are recorded along the simulation time. The following example shows how to do this. Note that marking/selecting of particles is done at the instance that is defined by `startTime`.
|
||||||
|
|
||||||
|
```C++
|
||||||
|
particlesTrack
|
||||||
|
{
|
||||||
|
processMethod particleProbe;
|
||||||
|
|
||||||
|
processRegion centerPoints;
|
||||||
|
|
||||||
|
// all particles whose ceters are located inside this box
|
||||||
|
// are selected. Selection occurs at startTime: particles
|
||||||
|
// that are inside the box at t = startTime.
|
||||||
|
selector box;
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min (0 0 0);
|
||||||
|
max (0.1 0.05 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
// center position of selected particles are processed
|
||||||
|
field position;
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
// execution starts at 1.0 s
|
||||||
|
startTime 1.0;
|
||||||
|
// execution ends at 100 s
|
||||||
|
endTime 100;
|
||||||
|
// execution interval of this compoenent
|
||||||
|
executionInterval 0.02;
|
||||||
|
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## 8. Advanced Features
|
## 8. Advanced Features
|
||||||
|
|
||||||
### 8.1. Special functions applied on fields
|
### 8.1. Special functions applied on fields
|
||||||
@ -447,15 +583,104 @@ components
|
|||||||
processMethod particleProbe;
|
processMethod particleProbe;
|
||||||
processRegion centerPoints;
|
processRegion centerPoints;
|
||||||
selector id;
|
selector id;
|
||||||
field component(position,y);
|
field component(velocity,y);
|
||||||
ids (0 10 100);
|
ids (0 10 100);
|
||||||
timeControl default; // other options are settings, timeStep, simulationTime
|
timeControl default; // other options are settings, timeStep, simulationTime
|
||||||
// settings: uses parameters from settingsDict file
|
// settingsDict: uses parameters from settingsDict file
|
||||||
// timeStep: uses the time step of the simulation controlling the execution of postprocessing
|
// 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
|
// simulationTime: uses the simulation time of the simulation controlling the execution of postprocessing
|
||||||
// default: uses the default time control (defined in defaultTimeControl).
|
// default: uses the default time control (defined in defaultTimeControl).
|
||||||
// default behavior: if you do not specify it, parameters in defaultTimeControl is used.
|
// default behavior: if you do not specify it, parameters in defaultTimeControl is used.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
particlesTrack
|
||||||
|
{
|
||||||
|
processMethod particleProbe;
|
||||||
|
|
||||||
|
processRegion centerPoints;
|
||||||
|
|
||||||
|
// all particles whose ceters are located inside this box
|
||||||
|
// are selected. Selection occurs at startTime: particles
|
||||||
|
// that are inside the box at t = startTime.
|
||||||
|
selector box;
|
||||||
|
|
||||||
|
boxInfo
|
||||||
|
{
|
||||||
|
min (0 0 0);
|
||||||
|
max (0.1 0.05 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
// center position of selected particles are processed
|
||||||
|
field position;
|
||||||
|
|
||||||
|
// precision for output to file (optional: default is 6)
|
||||||
|
precision 8;
|
||||||
|
|
||||||
|
// if the output format of numbers in scientific format
|
||||||
|
// is required, set scientific to yes, otherwise no
|
||||||
|
// (optional: default is yes)
|
||||||
|
scientific no;
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
// execution starts at 1.0 s
|
||||||
|
startTime 1.0;
|
||||||
|
// execution ends at 10 s
|
||||||
|
endTime 10;
|
||||||
|
// execution interval of this compoenent
|
||||||
|
executionInterval 0.02;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
on_a_rectMesh
|
||||||
|
{
|
||||||
|
processMethod GaussianDistribution;
|
||||||
|
processRegion rectMesh;
|
||||||
|
|
||||||
|
timeControl settingsDict; // uses settings from settingsDict file
|
||||||
|
|
||||||
|
rectMeshInfo
|
||||||
|
{
|
||||||
|
min (-0.12 -0.12 0.00); // lower corner point of the box
|
||||||
|
max (0.12 0.12 0.11); // upper corner point of the box
|
||||||
|
|
||||||
|
nx 30; // number of divisions in x direction
|
||||||
|
ny 30; // number of divisions in y direction
|
||||||
|
nz 15; // number of divisions in z direction
|
||||||
|
|
||||||
|
// optional (default is 2.0)
|
||||||
|
// for each cell, a neighbor radius is considered. This neighbor radius is equal to
|
||||||
|
// cellExtension * equivalent diameter of the cell.
|
||||||
|
// cell extension is only effective when using GaussianDistribution as processMethod.
|
||||||
|
cellExtension 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// precision for output to file (optional: default is 6)
|
||||||
|
precision 5;
|
||||||
|
|
||||||
|
// if the output format of numbers in scientific format
|
||||||
|
// is required, set scientific to yes, otherwise no
|
||||||
|
// (optional: default is yes)
|
||||||
|
scientific no;
|
||||||
|
|
||||||
|
operations
|
||||||
|
(
|
||||||
|
avVelocity
|
||||||
|
{
|
||||||
|
function average;
|
||||||
|
field velocity;
|
||||||
|
fluctuation2 yes;
|
||||||
|
threshold 4;
|
||||||
|
phi mass;
|
||||||
|
}
|
||||||
|
|
||||||
|
solidVolumeFraction
|
||||||
|
{
|
||||||
|
function sum;
|
||||||
|
field volume;
|
||||||
|
divideByVolume yes;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
on_single_sphere
|
on_single_sphere
|
||||||
{
|
{
|
||||||
@ -565,5 +790,4 @@ components
|
|||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user