16 Commits

Author SHA1 Message Date
HRN
774afd5f37 bug correction for the time when empty is used 2025-02-14 22:50:28 +03:30
191801b344 Merge pull request #165 from ramin1728/main
binarySystemOfParticles is Updated.
2025-02-14 20:42:14 +03:30
545de300ae Merge pull request #166 from PhasicFlow/develop
edits
2025-02-14 20:40:44 +03:30
HRN
9b3c4f83b9 edits 2025-02-14 20:39:37 +03:30
b315d12357 conveyorBelt is Updated. 2025-02-11 23:35:58 +03:30
7e7184f1c5 binarySystemOfParticles is Updated. 2025-02-11 23:18:29 +03:30
9f489d07cc Merge pull request #163 from PhasicFlow/develop
global damping is activated for velocity and rVelocity in both sphere…
2025-02-10 01:11:30 +03:30
3f1fa4ae90 Merge pull request #162 from wanqing0421/main
bug fix during the build process of cuda mode
2025-02-08 22:39:06 +03:30
f0f185983c bug fix during the build process of cuda mode 2025-02-08 23:47:21 +08:00
cb6d567dab Merge pull request #161 from PhasicFlow/develop
AB5 is added and bug is resolved when particles are being inserted
2025-02-08 18:07:39 +03:30
3aff0f1fc6 Merge pull request #160 from PhasicFlow/develop
bug resolve, chekcForCollision is set to true for always, adjustable …
2025-02-07 23:16:48 +03:30
59fbaa91ab Merge pull request #159 from PhasicFlow/develop
All messages are revisited for internal points and boundaries
2025-02-06 11:06:35 +03:30
f84484881c Merge pull request #158 from PhasicFlow/develop
pFlowToVTK now manages when Ctrl+C is used by user
2025-02-06 11:05:21 +03:30
1540321a31 Merge pull request #157 from PhasicFlow/develop
the need to provide neighborLength in domain dictionary is lifted. No…
2025-02-03 23:51:31 +03:30
f4f5f29e3c Merge pull request #156 from PhasicFlow/develop
Develop
2025-02-03 19:17:08 +03:30
d909301f32 Merge pull request #155 from PhasicFlow/develop
Develop
2025-02-01 22:18:23 +03:30
14 changed files with 98 additions and 137 deletions

View File

@ -74,7 +74,7 @@ pFlow::initialize_pFlowProcessors();
do do
{ {
//Ping;
if(! sphInsertion.insertParticles( if(! sphInsertion.insertParticles(
Control.time().currentIter(), Control.time().currentIter(),
Control.time().currentTime(), Control.time().currentTime(),
@ -90,21 +90,25 @@ pFlow::initialize_pFlowProcessors();
// set force to zero, predict, particle deletion and etc. // set force to zero, predict, particle deletion and etc.
sphParticles.beforeIteration(); sphParticles.beforeIteration();
//Ping;
sphInteraction.beforeIteration(); sphInteraction.beforeIteration();
sphInteraction.iterate(); sphInteraction.iterate();
surfGeometry.iterate(); surfGeometry.iterate();
//Ping;
sphParticles.iterate(); sphParticles.iterate();
//Ping;
sphInteraction.afterIteration(); sphInteraction.afterIteration();
//Ping;
surfGeometry.afterIteration(); surfGeometry.afterIteration();
//Ping;
sphParticles.afterIteration(); sphParticles.afterIteration();
//Ping;
}while(Control++); }while(Control++);

View File

@ -35,10 +35,14 @@ pFlow::globalDamping::globalDamping(const systemControl& control)
performDamping_ = !equal(dampingFactor_, static_cast<real>(1.0)); performDamping_ = !equal(dampingFactor_, static_cast<real>(1.0));
if( performDamping_ ) if( performDamping_ )
{
REPORT(2)<<"Global damping "<<Yellow_Text("is active")<< REPORT(2)<<"Global damping "<<Yellow_Text("is active")<<
" and damping factor is "<<dampingFactor_<<END_REPORT; " and damping factor is "<<dampingFactor_<<END_REPORT;
}
else else
{
REPORT(2)<<"Global damping "<<Yellow_Text("is not active")<<"."<<END_REPORT; REPORT(2)<<"Global damping "<<Yellow_Text("is not active")<<"."<<END_REPORT;
}
} }

View File

@ -27,6 +27,7 @@ Licence:
#include "pFlowMacros.hpp" #include "pFlowMacros.hpp"
#include "error.hpp" #include "error.hpp"
#include "iOstream.hpp"
// just for preventing the use of std namespace and adding some minor functionalities // just for preventing the use of std namespace and adding some minor functionalities

View File

@ -45,7 +45,6 @@ in <b>settings/particlesDict</b> file
positionParticles positionParticles
{ {
method ordered; // other options: random or empty method ordered; // other options: random or empty
orderedInfo orderedInfo
{ {
diameter 0.005; // minimum space between centers of particles diameter 0.005; // minimum space between centers of particles
@ -78,7 +77,7 @@ setFields
Default value for fields defined for particles Default value for fields defined for particles
These fields should always be defined for simulations with These fields should always be defined for simulations with
spherical particles. spherical particles.
*/ */
defaultValue defaultValue
{ {
@ -100,6 +99,7 @@ setFields
end 30000; // end index of points end 30000; // end index of points
stride 3; // stride for selector stride 3; // stride for selector
} }
fieldValue // fields that the selector is applied to fieldValue // fields that the selector is applied to
{ {
/* /*

View File

@ -55,15 +55,20 @@ surfaces
belt belt
{ {
type stlWall; // type of the wall type stlWall; // type of the wall
file belt.stl; // file name in stl folder file belt.stl; // file name in stl folder
material wallMat; // material name of this wall material wallMat; // material name of this wall
motion conveyorBelt1; // motion component name motion conveyorBelt1; // motion component name
} }
box box
{ {
type stlWall; // type of the wall type stlWall; // type of the wall
file box.stl; // file name in stl folder file box.stl; // file name in stl folder
material wallMat; // material name of this wall material wallMat; // material name of this wall
} }
} }

View File

@ -30,7 +30,7 @@ pFlow::empty::empty(
positionParticles(control, dict), positionParticles(control, dict),
position_ position_
( (
"empty",maxNumberOfParticles(), 0, RESERVE() "empty",1, 0, RESERVE()
) )
{ {
} }

View File

@ -146,8 +146,8 @@ pFlow::positionOrdered::positionOrdered
position_ position_
( (
"positionOrdered", "positionOrdered",
max(maxNumberOfParticles(), numPoints_), numPoints_,
numPoints_ , numPoints_,
RESERVE() RESERVE()
) )
{ {

View File

@ -32,45 +32,10 @@ pFlow::realx3Vector pFlow::positionParticles::sortByMortonCode(
uint64 index; uint64 index;
}; };
/*realx3 minP = min(position);
realx3 maxP = max(position);
real cellsize = maxDiameter();
cells<uint64> allCells( box(minP, maxP), cellsize);
Vector<indexMorton> indMor(position.size(),RESERVE());
indMor.clear();
uint64 ind=0;
for(const auto& p:position)
{
auto cellInd = allCells.pointIndex(p);
indMor.push_back(
{ xyzToMortonCode64(cellInd.x(), cellInd.y(), cellInd.z()),
ind++});
}
INFORMATION<<"Performing morton sorting."<<END_INFO;
std::sort(
indMor.begin(),
indMor.end(),
[]( const indexMorton &lhs, const indexMorton &rhs){
return lhs.morton < rhs.morton; } );
realx3Vector sortedPos(position.capacity(), RESERVE());
sortedPos.clear();
for(auto& ind:indMor)
{
sortedPos.push_back( position[ind.index] );
}*/
WARNING<<"Morton sorting is inactive!"<<END_WARNING; WARNING<<"Morton sorting is inactive!"<<END_WARNING;
return position; return position;
} }
pFlow::positionParticles::positionParticles pFlow::positionParticles::positionParticles
( (
systemControl& control, systemControl& control,
@ -78,12 +43,8 @@ pFlow::positionParticles::positionParticles
) )
: :
regionType_(dict.getValOrSet<word>("regionType", "domain")), regionType_(dict.getValOrSet<word>("regionType", "domain")),
maxNumberOfParticles_(dict.getValOrSet(
"maxNumberOfParticles",
static_cast<uint32>(10000))),
mortonSorting_(dict.getValOrSet("mortonSorting", Logical("Yes"))) mortonSorting_(dict.getValOrSet("mortonSorting", Logical("Yes")))
{ {
if( regionType_ != "domain" ) if( regionType_ != "domain" )
{ {
pRegion_ = peakableRegion::create( pRegion_ = peakableRegion::create(
@ -92,7 +53,7 @@ pFlow::positionParticles::positionParticles
} }
else else
{ {
fileDictionary domainDict fileDictionary domainDictionary
( (
objectFile objectFile
{ {
@ -103,12 +64,10 @@ pFlow::positionParticles::positionParticles
}, },
&control.settings() &control.settings()
); );
pRegion_ = peakableRegion::create(regionType_,domainDict.subDict("globalBox")); pRegion_ = peakableRegion::create("box", domainDictionary.subDict("globalBox"));
} }
} }
pFlow::realx3Vector pFlow::positionParticles::getFinalPosition() pFlow::realx3Vector pFlow::positionParticles::getFinalPosition()
{ {
if(mortonSorting_) if(mortonSorting_)
@ -130,10 +89,8 @@ pFlow::uniquePtr<pFlow::positionParticles>
const dictionary & dict const dictionary & dict
) )
{ {
word method = dict.getVal<word>("method"); word method = dict.getVal<word>("method");
if( dictionaryvCtorSelector_.search(method) ) if( dictionaryvCtorSelector_.search(method) )
{ {
return dictionaryvCtorSelector_[method] (control, dict); return dictionaryvCtorSelector_[method] (control, dict);

View File

@ -40,12 +40,8 @@ private:
word regionType_; word regionType_;
uint32 maxNumberOfParticles_ = 10000;
Logical mortonSorting_; Logical mortonSorting_;
realx3Vector sortByMortonCode(const realx3Vector& position)const; realx3Vector sortByMortonCode(const realx3Vector& position)const;
protected: protected:
@ -83,12 +79,6 @@ public:
return mortonSorting_(); return mortonSorting_();
} }
inline
auto maxNumberOfParticles()const
{
return maxNumberOfParticles_;
}
virtual uint32 numPoints()const = 0; virtual uint32 numPoints()const = 0;
virtual uint32 size()const = 0; virtual uint32 size()const = 0;

View File

@ -122,14 +122,14 @@ pFlow::positionRandom::positionRandom
position_ position_
( (
"position", "position",
maxNumberOfParticles(), 1,
0, 0,
RESERVE() RESERVE()
), ),
diameters_ diameters_
( (
"diameters", "diameters",
maxNumberOfParticles(), 1,
0, 0,
RESERVE() RESERVE()
) )