diff --git a/solvers/sphereGranFlow/sphereGranFlow.cpp b/solvers/sphereGranFlow/sphereGranFlow.cpp index d854b417..b8518253 100755 --- a/solvers/sphereGranFlow/sphereGranFlow.cpp +++ b/solvers/sphereGranFlow/sphereGranFlow.cpp @@ -74,7 +74,7 @@ pFlow::initialize_pFlowProcessors(); do { - + //Ping; if(! sphInsertion.insertParticles( Control.time().currentIter(), Control.time().currentTime(), @@ -84,27 +84,31 @@ pFlow::initialize_pFlowProcessors(); "particle insertion failed in sphereDFlow solver.\n"; return 1; } - + // set force to zero surfGeometry.beforeIteration(); // set force to zero, predict, particle deletion and etc. sphParticles.beforeIteration(); - + //Ping; sphInteraction.beforeIteration(); - sphInteraction.iterate(); - + sphInteraction.iterate(); + surfGeometry.iterate(); + //Ping; sphParticles.iterate(); - + + //Ping; sphInteraction.afterIteration(); + //Ping; surfGeometry.afterIteration(); + //Ping; sphParticles.afterIteration(); - + //Ping; }while(Control++); diff --git a/src/Particles/globalDamping/globalDamping.cpp b/src/Particles/globalDamping/globalDamping.cpp index f277beec..040030cc 100644 --- a/src/Particles/globalDamping/globalDamping.cpp +++ b/src/Particles/globalDamping/globalDamping.cpp @@ -35,10 +35,14 @@ pFlow::globalDamping::globalDamping(const systemControl& control) performDamping_ = !equal(dampingFactor_, static_cast(1.0)); if( performDamping_ ) - REPORT(2)<<"Global damping "< #include "types.hpp" +#include "iOstream.hpp" namespace pFlow { @@ -34,6 +35,20 @@ using Set = std::set,std::allocator>; using wordSet = Set; +template +iOstream& operator<<(iOstream& os, const Set& s) +{ + os << beginListToken(); + for(auto elm = s.begin(); elm!=s.end(); ) + { + os<< *elm++; + if( elm!=s.end() ) + os< @@ -206,4 +206,4 @@ To perform simulations, enter the following commands one after another in the te Enter `$ particlesPhasicFlow` command to create the initial fields for particles (here the simulaiton has no particle at the beginning). Enter `$ geometryPhasicFlow` command to create the geometry. At last, enter `$ sphereGranFlow` command to start the simulation. -After finishing the simulation, you can use `$ pFlowtoVTK` to convert the results into vtk format stored in ./VTK folder. +After finishing the simulation, you can use `$ pFlowtoVTK` to convert the results into vtk format stored in ./VTK folder. \ No newline at end of file diff --git a/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/interaction b/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/interaction index da09e5e1..3defdb75 100644 --- a/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/interaction +++ b/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/interaction @@ -43,19 +43,19 @@ model Geff (0.8e6 0.8e6 // Shear modulus [Pa] 0.8e6); - nu (0.25 0.25 // Poisson's ratio [-] + nu (0.25 0.25 // Poisson's ratio [-] 0.25); - en (0.7 0.8 // coefficient of normal restitution + en (0.70 0.80 // coefficient of normal restitution 1.0); - et (1.0 1.0 // coefficient of tangential restitution + et (1.0 1.0 // coefficient of tangential restitution 1.0); - mu (0.3 0.35 // dynamic friction + mu (0.3 0.35 // dynamic friction 0.35); - mur (0.1 0.1 // rolling friction + mur (0.1 0.1 // rolling friction 0.1); } diff --git a/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/particleInsertion b/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/particleInsertion index e3b74af1..06342b39 100644 --- a/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/particleInsertion +++ b/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/particleInsertion @@ -6,7 +6,7 @@ objectName particleInsertion; objectType dicrionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -active yes; // is insertion active -> yes or no +active yes; // is insertion active -> yes or no checkForCollision No; // is checked -> yes or no diff --git a/tutorials/sphereGranFlow/binarySystemOfParticles/README.md b/tutorials/sphereGranFlow/binarySystemOfParticles/README.md index 299245d9..00aac380 100644 --- a/tutorials/sphereGranFlow/binarySystemOfParticles/README.md +++ b/tutorials/sphereGranFlow/binarySystemOfParticles/README.md @@ -28,8 +28,8 @@ in caseSetup/sphereShape file ```C++ names (smallSphere largeSphere); // names of shapes -diameters (0.003 0.005); // diameter of shapes (m) -materials (prop1 prop1); // material names for shapes +diameters (0.003 0.005); // diameter of shapes (m) +materials (prop1 prop1); // material names for shapes ``` ### Positioning and initial mixture @@ -44,18 +44,17 @@ in settings/particlesDict file // positions particles positionParticles { - method ordered; // other options: random or empty - + method ordered; // other options: random or empty orderedInfo { - diameter 0.005; // minimum space between centers of particles - numPoints 30000; // number of particles in the simulation + diameter 0.005; // minimum space between centers of particles + numPoints 30000; // number of particles in the simulation axisOrder (z x y); // axis order for filling the space with particles } regionType cylinder; // other options: box and sphere - cylinder // cylinder region for positioning particles + cylinder // cylinder region for positioning particles { p1 (0.0 0.0 0.003); // begin point of cylinder axis (m m m) p2 (0.0 0.0 0.097); // end point of cylinder axis (m m m) @@ -76,9 +75,9 @@ setFields { /* Default value for fields defined for particles - These fields should always be defined for simulations with - spherical particles. -*/ + These fields should always be defined for simulations with + spherical particles. + */ defaultValue { @@ -87,20 +86,21 @@ setFields rotVelocity realx3 (0 0 0); // rotational velocity (rad/s) shapeName word smallSphere; // name of the particle shape } - + selectors { shapeAssigne { - selector stridedRange; // other options: box, cylinder, sphere, randomPoints - + selector stridedRange; // other options: box, cylinder, sphere, randomPoints + stridedRangeInfo { - begin 0; // begin index of points + begin 0; // begin 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 { /* sets shapeName of the selected points to largeSphere @@ -139,4 +139,4 @@ Options: --setFields-only Exectue the setFields part only. Read the pointStructure from time folder and setFields and save the result in the same time folder. ``` -so, with flag `--setFields-only`, you can execute the `setFields` part of `particlesDict`. Now suppose that you have a simulation case which proceeded up to 2 seconds and for any reason you want to change some field value at time 3 s and continue the simulation from 3 s. To this end, you need to change `startTime` in settings dictionary to 3, execute `particlesPhasicFlow --setFields-only`, and start the simulation. +so, with flag `--setFields-only`, you can execute the `setFields` part of `particlesDict`. Now suppose that you have a simulation case which proceeded up to 2 seconds and for any reason you want to change some field value at time 3 s and continue the simulation from 3 s. To this end, you need to change `startTime` in settings dictionary to 3, execute `particlesPhasicFlow --setFields-only`, and start the simulation. \ No newline at end of file diff --git a/tutorials/sphereGranFlow/binarySystemOfParticles/caseSetup/interaction b/tutorials/sphereGranFlow/binarySystemOfParticles/caseSetup/interaction index 8ea45868..e3a6247b 100755 --- a/tutorials/sphereGranFlow/binarySystemOfParticles/caseSetup/interaction +++ b/tutorials/sphereGranFlow/binarySystemOfParticles/caseSetup/interaction @@ -6,9 +6,9 @@ objectName interaction; objectType dicrionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -materials (prop1); // properties of material +materials (prop1); // properties of material -densities (1000.0); // density of materials [kg/m3] +densities (1000.0); // density of materials [kg/m3] contactListType sortedContactList; @@ -38,14 +38,14 @@ model Geff (0.8e6); // Shear modulus [Pa] - nu (0.25); // Poisson's ratio [-] + nu (0.25); // Poisson's ratio [-] - en (0.7); // coefficient of normal restitution + en (0.7); // coefficient of normal restitution - et (1.0); // coefficient of tangential restitution + et (1.0); // coefficient of tangential restitution - mu (0.3); // dynamic friction + mu (0.3); // dynamic friction - mur (0.1); // rolling friction + mur (0.1); // rolling friction } diff --git a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/geometryDict b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/geometryDict index 9fa0b8a3..55562a4f 100755 --- a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/geometryDict +++ b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/geometryDict @@ -26,19 +26,19 @@ surfaces { type cylinderWall; // other options: cuboidWall and planeWall - p1 (0.0 0.0 0.0); // begin point of cylinder axis + p1 (0.0 0.0 0.0); // begin point of cylinder axis - p2 (0.0 0.0 0.1); // end point of cylinder axis + p2 (0.0 0.0 0.1); // end point of cylinder axis - radius1 0.12; // radius at p1 + radius1 0.12; // radius at p1 - radius2 0.12; // radius at p2 + radius2 0.12; // radius at p2 - resolution 24; // number of divisions + resolution 24; // number of divisions - material prop1; // material name of this wall + material prop1; // material name of this wall - motion rotAxis; // motion component name + motion rotAxis; // motion component name } /* diff --git a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/particlesDict b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/particlesDict index 24a6c7ab..b29ebbed 100755 --- a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/particlesDict +++ b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/particlesDict @@ -29,20 +29,20 @@ setFields { shapeAssigne { - selector stridedRange; // other options: box, cylinder, sphere, randomPoints + selector stridedRange; // other options: box, cylinder, sphere, randomPoints stridedRangeInfo { - begin 0; // begin index of points + begin 0; // begin index of points - end 30000; // end index of points + end 30000; // end index of points - stride 3; // stride for selector + stride 3; // stride for selector } fieldValue // fields that the selector is applied to { - shapeName word largeSphere; // sets shapeName of the selected points to largeSphere + shapeName word largeSphere; // sets shapeName of the selected points to largeSphere } } } @@ -50,13 +50,13 @@ setFields positionParticles // positions particles { - method ordered; // other options: random and empty + method ordered; // other options: random and empty orderedInfo { - diameter 0.005; // diameter of particles + diameter 0.005; // diameter of particles - numPoints 30000; // number of particles in the simulation + numPoints 30000; // number of particles in the simulation axisOrder (z x y); // axis order for filling the space with particles } @@ -69,6 +69,6 @@ positionParticles // positions particles p2 (0.0 0.0 0.097); // end point of cylinder axis - radius 0.117; // radius of cylinder + radius 0.117; // radius of cylinder } } diff --git a/tutorials/sphereGranFlow/conveyorBelt/caseSetup/interaction b/tutorials/sphereGranFlow/conveyorBelt/caseSetup/interaction index 3ea53adf..6d50f330 100755 --- a/tutorials/sphereGranFlow/conveyorBelt/caseSetup/interaction +++ b/tutorials/sphereGranFlow/conveyorBelt/caseSetup/interaction @@ -16,13 +16,13 @@ contactSearch { method NBS; // method for broad search particle-particle - updateInterval 10; + updateInterval 10; sizeRatio 1.1; - cellExtent 0.55; + cellExtent 0.55; - adjustableBox No; + adjustableBox No; } model @@ -46,25 +46,25 @@ model 0.8e6 0.8e6 0.8e6); - nu (0.25 0.25 0.25 // Poisson's ratio [-] - 0.25 0.25 - 0.25); + nu (0.25 0.25 0.25 // Poisson's ratio [-] + 0.25 0.25 + 0.25); - en (0.97 0.97 0.85 // coefficient of normal restitution - 0.97 0.85 - 1.00); + en (0.97 0.97 0.85 // coefficient of normal restitution + 0.97 0.85 + 1.00); - et (1.0 1.0 1.0 // coefficient of tangential restitution - 1.0 1.0 - 1.0); + et (1.0 1.0 1.0 // coefficient of tangential restitution + 1.0 1.0 + 1.0); - mu (0.65 0.65 0.35 // dynamic friction - 0.65 0.35 - 0.35); + mu (0.65 0.65 0.35 // dynamic friction + 0.65 0.35 + 0.35); - mur (0.1 0.1 0.1 // rolling friction - 0.1 0.1 - 0.1); + mur (0.1 0.1 0.1 // rolling friction + 0.1 0.1 + 0.1); } diff --git a/tutorials/sphereGranFlow/conveyorBelt/settings/geometryDict b/tutorials/sphereGranFlow/conveyorBelt/settings/geometryDict index 69873d0e..73f24386 100755 --- a/tutorials/sphereGranFlow/conveyorBelt/settings/geometryDict +++ b/tutorials/sphereGranFlow/conveyorBelt/settings/geometryDict @@ -6,7 +6,7 @@ objectName geometryDict; objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -motionModel conveyorBelt; // motion model can be rotatingAxis or stationary or vibrating +motionModel conveyorBelt; // motion model can be rotatingAxis or stationary or vibrating conveyorBeltInfo { @@ -54,17 +54,22 @@ surfaces belt { - type stlWall; // type of the wall - file belt.stl; // file name in stl folder - material wallMat; // material name of this wall - motion conveyorBelt1; // motion component name + type stlWall; // type of the wall + + file belt.stl; // file name in stl folder + + material wallMat; // material name of this wall + + motion conveyorBelt1; // motion component name } box { - type stlWall; // type of the wall - file box.stl; // file name in stl folder - material wallMat; // material name of this wall + type stlWall; // type of the wall + + file box.stl; // file name in stl folder + + material wallMat; // material name of this wall } } diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/README.md b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/README.md new file mode 100644 index 00000000..6aaa5d8f --- /dev/null +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/README.md @@ -0,0 +1,16 @@ +# Simulating a simple homogenization silo using periodic boundary + +## Problem +A homogenization silo is used to mix particles inside a silo using the circulation of particles. A pneumatic conveying system is used to carry particles at the exit and re-enter them from the top. Here, we use a `periodic` boundary to simulate the action of the pneumatic conveyor system for circulating particles. Particles that are exiting from the bottom are re-entered from top using this boundary (`periodic`). + +
+ +A view of homogenization silo + + + +
+ +*** + + diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/interaction b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/interaction new file mode 100755 index 00000000..f5fc4f23 --- /dev/null +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/interaction @@ -0,0 +1,67 @@ +/* -------------------------------*- C++ -*--------------------------------- *\ +| phasicFlow File | +| copyright: www.cemf.ir | +\* ------------------------------------------------------------------------- */ +objectName interaction; +objectType dicrionary; +fileFormat ASCII; +/*---------------------------------------------------------------------------*/ +materials (lightMat heavyMat wallMat); // a list of materials names + +densities (1000 1500.0 2500); // density of materials [kg/m3] + +contactListType sortedContactList; + +contactSearch +{ + method NBS; // method for broad search particle-particle + + updateInterval 10; + + sizeRatio 1.1; + + cellExtent 0.55; + + adjustableBox No; +} + +model +{ + contactForceModel nonLinearLimited; + + rollingFrictionModel normal; + + /* + + Property (lightMat-lightMat lightMat-heavyMat lightMat-wallMat + heavyMat-heavyMat heavyMat-wallMat + wallMat-wallMat ); + */ + + Yeff (1.0e6 1.0e6 1.0e6 // Young modulus [Pa] + 1.0e6 1.0e6 + 1.0e6); + + Geff (0.8e6 0.8e6 0.8e6 // Shear modulus [Pa] + 0.8e6 0.8e6 + 0.8e6); + + nu (0.25 0.25 0.25 // Poisson's ratio [-] + 0.25 0.25 + 0.25); + + en (0.97 0.97 0.85 // coefficient of normal restitution + 0.97 0.85 + 1.00); + + mu (0.65 0.65 0.35 // dynamic friction + 0.65 0.35 + 0.35); + + mur (0.1 0.1 0.1 // rolling friction + 0.1 0.1 + 0.1); +} + + + diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/particleInsertion b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/particleInsertion new file mode 100755 index 00000000..1ab71456 --- /dev/null +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/particleInsertion @@ -0,0 +1,214 @@ +/* -------------------------------*- C++ -*--------------------------------- *\ +| phasicFlow File | +| copyright: www.cemf.ir | +\* ------------------------------------------------------------------------- */ +objectName particleInsertion; +objectType dicrionary; +fileFormat ASCII; +/*---------------------------------------------------------------------------*/ + +active Yes; // is insertion active -> yes or no + +/* + one layers of particles are packed +*/ +layer0 +{ + timeControl simulationTime; + + regionType cylinder; // type of insertion region + + rate 5100; // insertion rate (particles/s) + + startTime 0; // (s) + + endTime 0.5; // (s) + + insertionInterval 0.025; // s + + cylinderInfo + { + radius 0.09; // radius of cylinder (m) + + p1 (0.0 0.0 0.1); // (m,m,m) + + p2 (0.0 0.0 0.11); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles + } + + mixture + { + parType1 1; // mixture composition of inserted particles + } +} + +layer1 +{ + timeControl simulationTime; + + regionType cylinder; // type of insertion region + + rate 5100; // insertion rate (particles/s) + + startTime 0.7; // (s) + + endTime 1.2; // (s) + + insertionInterval 0.025; // s + + + cylinderInfo + { + radius 0.09; + p1 (0.0 0.0 0.16 ); // (m,m,m) + p2 (0.0 0.0 0.17); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + parType2 1; // only parType2 + + } +} + +layer2 +{ + timeControl simulationTime; + + regionType cylinder; // type of insertion region + + rate 5100; // insertion rate (particles/s) + + startTime 1.4; // (s) + + endTime 1.9; // (s) + + insertionInterval 0.025; // s + + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.2 ); // (m,m,m) + p2 ( 0.0 0.0 0.21); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + lightSphere 1; // only lightSphere + + } +} + +layer3 +{ + timeControl simulationTime; + + regionType cylinder; // type of insertion region + + rate 5100; // insertion rate (particles/s) + + startTime 2.1; // (s) + + endTime 2.6; // (s) + + insertionInterval 0.025; // s + + + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.28 ); // (m,m,m) + p2 ( 0.0 0.0 0.29); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + heavySphere 1; + + } +} + +layer4 +{ + timeControl simulationTime; + + regionType cylinder; // type of insertion region + + rate 5100; // insertion rate (particles/s) + + startTime 2.8; // (s) + + endTime 3.3; // (s) + + insertionInterval 0.025; // s + + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.37 ); // (m,m,m) + p2 ( 0.0 0.0 0.38); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + lightSphere 1; + + } +} + +layer5 +{ + timeControl simulationTime; + + regionType cylinder; // type of insertion region + + rate 5100; // insertion rate (particles/s) + + startTime 3.4; // (s) + + endTime 3.9; // (s) + + insertionInterval 0.025; // s + + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.38 ); // (m,m,m) + p2 ( 0.0 0.0 0.39); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + heavySphere 1; + + } +} \ No newline at end of file diff --git a/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/sphereShape b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/shapes old mode 100644 new mode 100755 similarity index 71% rename from tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/sphereShape rename to tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/shapes index 354d36d8..e4215a55 --- a/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/sphereShape +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/shapes @@ -2,18 +2,14 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName particleInsertion; -objectType dicrionary; -fileFormat ASCII; -/*---------------------------------------------------------------------------*/ objectName sphereDict; objectType sphereShape; +fileFormat ASCII; +/*---------------------------------------------------------------------------*/ +names (parType1 parType2); // names of shapes -// names of shapes -names (sphere); +diameters (0.00885 0.0089); // diameter of shapes + +materials (lightMat heavyMat); // material names for shapes -// diameter of shapes -diameters (0.005); -// material names for shapes -materials (sphereMat); \ No newline at end of file diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/cleanThisCase b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/cleanThisCase new file mode 100755 index 00000000..8a0ab919 --- /dev/null +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/cleanThisCase @@ -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 + +#------------------------------------------------------------------------------ diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/homoSilo.jpeg b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/homoSilo.jpeg new file mode 100644 index 00000000..5add888b Binary files /dev/null and b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/homoSilo.jpeg differ diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/runThisCase b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/runThisCase new file mode 100755 index 00000000..e774b13c --- /dev/null +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/runThisCase @@ -0,0 +1,24 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +echo "\n<--------------------------------------------------------------------->" +echo "1) Creating particles" +echo "<--------------------------------------------------------------------->\n" +particlesPhasicFlow + +echo "\n<--------------------------------------------------------------------->" +echo "2) Creating geometry" +echo "<--------------------------------------------------------------------->\n" +geometryPhasicFlow + +echo "\n<--------------------------------------------------------------------->" +echo "3) Running the case" +echo "<--------------------------------------------------------------------->\n" +sphereGranFlow + +echo "\n<--------------------------------------------------------------------->" +echo "4) Converting to vtk" +echo "<--------------------------------------------------------------------->\n" +pFlowToVTK --fields diameter velocity id --binary + + +#------------------------------------------------------------------------------ diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/domainDict b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/domainDict new file mode 100755 index 00000000..606db9b1 --- /dev/null +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/domainDict @@ -0,0 +1,52 @@ +/* -------------------------------*- C++ -*--------------------------------- *\ +| phasicFlow File | +| copyright: www.cemf.ir | +\* ------------------------------------------------------------------------- */ +objectName domainDict; +objectType dictionary; +fileFormat ASCII; +/*---------------------------------------------------------------------------*/ + +// Simulation domain: every particles that goes outside this domain will be deleted +globalBox +{ + min (-0.11 -0.11 -0.15); + + max ( 0.11 0.11 0.4); +} + +boundaries +{ + + left + { + type exit; + } + + right + { + type exit; + } + + bottom + { + type exit; + } + + top + { + type exit; + } + + rear + { + type periodic; + } + + front + { + type periodic; + } +} + + diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/geometryDict b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/geometryDict new file mode 100755 index 00000000..b72f1c07 --- /dev/null +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/geometryDict @@ -0,0 +1,87 @@ +/* -------------------------------*- C++ -*--------------------------------- *\ +| phasicFlow File | +| copyright: www.cemf.ir | +\* ------------------------------------------------------------------------- */ +objectName geometryDict; +objectType dictionary; +fileFormat ASCII; +/*---------------------------------------------------------------------------*/ + +motionModel rotatingAxis; + +rotatingAxisInfo +{ + // for opening the gate of silo between time 4.1 and 5.1 s + gateMotion + { + p1 (-0.04 -0.04 -0.1); + p2 (-0.04 -0.04 0.0); + omega 3.14; + startTime 4.1; + endTime 5.1; + } +} + +surfaces +{ + cylinderShell + { + type cylinderWall; // other options: cuboidWall and planeWall + + p1 (0.0 0.0 0.0); // begin point of cylinder axis + + p2 (0.0 0.0 0.4); // end point of cylinder axis + + radius1 0.1; // radius at p1 + + radius2 0.1; // radius at p2 + + resolution 36; // number of divisions + + material wallMat; // material name of this wall + } + + coneShell + { + type cylinderWall; // other options: cuboidWall and planeWall + + p1 (0.0 0.0 -0.1); // begin point of cylinder axis + + p2 (0.0 0.0 0.0); // end point of cylinder axis + + radius1 0.04; // radius at p1 + + radius2 0.1; // radius at p2 + + resolution 36; // number of divisions + + material wallMat; // material name of this wall + } + + /* + This is a plane wall at the exit of silo + */ + + exitGate + { + type planeWall; // other options: cuboidWall and cylinderWall + + p1 (-0.04 -0.04 -0.1); // first point of the wall + + p2 ( 0.04 -0.04 -0.1); // second point of the wall + + p3 ( 0.04 0.04 -0.1); // third point of the wall + + p4 (-0.04 0.04 -0.1); // fourth point of the wall + + material wallMat; // material name of the wall + + motion gateMotion; + } +} + + + + + + diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/particlesDict b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/particlesDict new file mode 100755 index 00000000..a01a553e --- /dev/null +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/particlesDict @@ -0,0 +1,36 @@ +/* -------------------------------*- C++ -*--------------------------------- *\ +| phasicFlow File | +| copyright: www.cemf.ir | +\* ------------------------------------------------------------------------- */ +objectName particlesDict; +objectType dictionary; +fileFormat ASCII; +/*---------------------------------------------------------------------------*/ +setFields +{ + /* + Default value for fields defined for particles + These fields should always be defined for simulations with + spherical particles. + */ + + defaultValue + { + velocity realx3 (0 0 0); // linear velocity (m/s) + + acceleration realx3 (0 0 0); // linear acceleration (m/s2) + + rVelocity realx3 (0 0 0); // rotational velocity (rad/s) + + shapeName word parType1; // name of the particle shape + } + + selectors + {} +} + +positionParticles +{ + method empty; // empty simulation +} + diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/settingsDict b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/settingsDict new file mode 100755 index 00000000..0f119f33 --- /dev/null +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/settingsDict @@ -0,0 +1,41 @@ +/* -------------------------------*- C++ -*--------------------------------- *\ +| phasicFlow File | +| copyright: www.cemf.ir | +\* ------------------------------------------------------------------------- */ +objectName settingsDict; +objectType dictionary; +fileFormat ASCII; +/*---------------------------------------------------------------------------*/ +run homogenizationSilo; + +dt 0.00001; // time step for integration (s) + +startTime 0.0; // start time for simulation + +endTime 20; // end time for simulation + +saveInterval 0.05; // time interval for saving the simulation + +timePrecision 4; // maximum number of digits for time folder + +g (0 0 -9.8); // gravity vector (m/s2) + + +// overrides the default behavior +includeObjects (diameter); + +// exclude unnecessary data from saving on disk +excludeObjects (rVelocity.dy1 rVelocity.dy2 rVelocity.dy3 + pStructPosition.dy1 pStructPosition.dy2 pStructPosition.dy3 + pStructVelocity.dy1 pStructVelocity.dy2 pStructVelocity.dy3); + +integrationMethod AdamsBashforth4; // integration method + +writeFormat binary; // data writting format (ascii or binary) + +timersReport Yes; // report timers + +timersReportInterval 0.1; // time interval for reporting timers + + + diff --git a/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/interaction b/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/interaction index 7c2a70a6..5bf8acdb 100755 --- a/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/interaction +++ b/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/interaction @@ -16,11 +16,11 @@ contactSearch { method NBS; // method for broad search particle-particle - updateInterval 10; + updateInterval 10; sizeRatio 1.1; - cellExtent 0.55; + cellExtent 0.55; adjustableBox Yes; } @@ -46,26 +46,19 @@ model 0.8e6 0.8e6 0.8e6); - nu (0.25 0.25 0.25 // Poisson's ratio [-] - 0.25 0.25 - 0.25); - - en (0.97 0.97 0.85 // coefficient of normal restitution - 0.97 0.85 - 1.00); - - et (1.0 1.0 1.0 // coefficient of tangential restitution - 1.0 1.0 - 1.0); - - mu (0.65 0.65 0.35 // dynamic friction - 0.65 0.35 - 0.35); - - mur (0.1 0.1 0.1 // rolling friction - 0.1 0.1 - 0.1); -} + nu (0.25 0.25 0.25 // Poisson's ratio [-] + 0.25 0.25 + 0.25); + en (0.97 0.97 0.85 // coefficient of normal restitution + 0.97 0.85 + 1.00); + mu (0.65 0.65 0.35 // dynamic friction + 0.65 0.35 + 0.35); + mur (0.1 0.1 0.1 // rolling friction + 0.1 0.1 + 0.1); +} \ No newline at end of file diff --git a/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/particleInsertion b/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/particleInsertion index 195f27df..722b21e4 100755 --- a/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/particleInsertion +++ b/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/particleInsertion @@ -6,49 +6,172 @@ objectName particleInsertion; objectType dicrionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -active Yes; // is insertion active -> yes or no -checkForCollision No; // is checked -> yes or no +// is insertion active -> yes or no +active Yes; /* - one layers of particles are packed + six layers of particles are packed */ - layer0 -{ - timeControl simulationTime; +{ + timeControl simulationTime; + regionType cylinder; // type of insertion region + rate 15000; // insertion rate (particles/s) + startTime 0; // (s) + endTime 0.5; // (s) + insertionInterval 0.025; // s - regionType cylinder; // type of insertion region + cylinderInfo + { + radius 0.09; // radius of cylinder (m) + p1 (0.0 0.0 0.1); // (m,m,m) + p2 (0.0 0.0 0.11); // (m,m,m) + } - rate 15000; // insertion rate (particles/s) + setFields + { + velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles + } - startTime 0; // (s) - - endTime 0.5; // (s) - - insertionInterval 0.025; // s - - cylinderInfo - { - radius 0.09; // radius of cylinder (m) - - p1 ( 0.0 0.0 0.1 ); // (m,m,m) - - p2 ( 0.0 0.0 0.11); // (m,m,m) - } - - setFields - { - velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles - } - - mixture - { - lightSphere 1; // mixture composition of inserted particles - } + mixture + { + lightSphere 1; // mixture composition of inserted particles + } } +layer1 +{ + timeControl simulationTime; + regionType cylinder; // type of insertion region + rate 15000; // insertion rate (particles/s) + startTime 0.7; // (s) + endTime 1.2; // (s) + insertionInterval 0.025; // s + cylinderInfo + { + radius 0.09; + p1 (0.0 0.0 0.16 ); // (m,m,m) + p2 (0.0 0.0 0.17); // (m,m,m) + } + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + mixture + { + heavySphere 1; // only heavySphere + } +} + +layer2 +{ + timeControl simulationTime; + regionType cylinder; // type of insertion region + rate 15000; // insertion rate (particles/s) + startTime 1.4; // (s) + endTime 1.9; // (s) + insertionInterval 0.025; // s + + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.2 ); // (m,m,m) + p2 ( 0.0 0.0 0.21); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + lightSphere 1; // only lightSphere + } +} + +layer3 +{ + timeControl simulationTime; + regionType cylinder; // type of insertion region + rate 15000; // insertion rate (particles/s) + startTime 2.1; // (s) + endTime 2.6; // (s) + insertionInterval 0.025; // s + + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.28 ); // (m,m,m) + p2 ( 0.0 0.0 0.29); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + heavySphere 1; + } +} + +layer4 +{ + timeControl simulationTime; + regionType cylinder; // type of insertion region + rate 15000; // insertion rate (particles/s) + startTime 2.8; // (s) + endTime 3.3; // (s) + insertionInterval 0.025; // s + + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.37 ); // (m,m,m) + p2 ( 0.0 0.0 0.38); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + lightSphere 1; + } +} + +layer5 +{ + timeControl simulationTime; + regionType cylinder; // type of insertion region + rate 15000; // insertion rate (particles/s) + startTime 3.4; // (s) + endTime 3.9; // (s) + insertionInterval 0.025; // s + + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.38); // (m,m,m) + p2 ( 0.0 0.0 0.39); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + heavySphere 1; + } +} diff --git a/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/shapes b/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/shapes index 603c28cb..354e3d53 100755 --- a/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/shapes +++ b/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/shapes @@ -6,10 +6,10 @@ objectName sphereDict; objectType sphereShape; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -names (lightSphere heavySphere); // names of shapes +names (lightSphere heavySphere); // names of shapes -diameters (0.007 0.007); // diameter of shapes +diameters (0.007 0.007); // diameter of shapes -materials (lightMat heavyMat); // material names for shapes +materials (lightMat heavyMat); // material names for shapes diff --git a/tutorials/sphereGranFlow/layeredSiloFilling/settings/domainDict b/tutorials/sphereGranFlow/layeredSiloFilling/settings/domainDict index 1e711f8b..42ea097f 100755 --- a/tutorials/sphereGranFlow/layeredSiloFilling/settings/domainDict +++ b/tutorials/sphereGranFlow/layeredSiloFilling/settings/domainDict @@ -1,65 +1,50 @@ -/* -------------------------------*- C++ -*--------------------------------- *\ -| phasicFlow File | -| copyright: www.cemf.ir | -\* ------------------------------------------------------------------------- */ -objectName domainDict; -objectType dictionary; +/* -------------------------------*- C++ -*--------------------------------- *\ +| phasicFlow File | +| copyright: www.cemf.ir | +\* ------------------------------------------------------------------------- */ + +objectName domainDict; +objectType dictionary; fileFormat ASCII; + /*---------------------------------------------------------------------------*/ -globalBox // Simulation domain: every particles that goes outside this domain will be deleted + +// Simulation domain: every particle that goes outside this domain will be deleted +globalBox { - min (-0.11 -0.11 -0.11); - - max ( 0.11 0.11 0.41); + min (-0.11 -0.11 -0.11); + max ( 0.11 0.11 0.41); } boundaries { - // Determines how often (how many iterations) do you want to + left + { + type exit; // other options: periodic, reflective + } - // rebuild the list of particles in the neighbor list + right + { + type exit; // other options: periodic, reflective + } - // of all boundaries in the simulation domain + bottom + { + type exit; // other options: periodic, reflective + } - neighborListUpdateInterval 30; - - // Determines how often do you want to update the new changes in the boundary - - updateInterval 10; - - // The distance from the boundary plane within which particles are marked to be in the boundary list - - neighborLength 0.004; - - left - { - type exit; // other options: periodict, reflective - } - - right - { - type exit; // other options: periodict, reflective - } - - bottom - { - type exit; // other options: periodict, reflective - } - - top - { - type exit; // other options: periodict, reflective - } - - rear - { - type exit; // other options: periodict, reflective - } - - front - { - type exit; // other options: periodict, reflective - } -} + top + { + type exit; // other options: periodic, reflective + } + rear + { + type exit; // other options: periodic, reflective + } + front + { + type exit; // other options: periodic, reflective + } +} \ No newline at end of file diff --git a/tutorials/sphereGranFlow/layeredSiloFilling/settings/geometryDict b/tutorials/sphereGranFlow/layeredSiloFilling/settings/geometryDict index 4c7c9cc1..00aa2e14 100755 --- a/tutorials/sphereGranFlow/layeredSiloFilling/settings/geometryDict +++ b/tutorials/sphereGranFlow/layeredSiloFilling/settings/geometryDict @@ -1,76 +1,55 @@ -/* -------------------------------*- C++ -*--------------------------------- *\ -| phasicFlow File | -| copyright: www.cemf.ir | -\* ------------------------------------------------------------------------- */ -objectName geometryDict; -objectType dictionary; +/* -------------------------------*- C++ -*--------------------------------- *\ +| phasicFlow File | +| copyright: www.cemf.ir | +\* ------------------------------------------------------------------------- */ + +objectName geometryDict; +objectType dictionary; fileFormat ASCII; + /*---------------------------------------------------------------------------*/ -motionModel stationary; // motion model can be rotatingAxis or stationary or vibrating + +motionModel stationary; // motion model can be rotatingAxis, stationary, or vibrating stationaryInfo { - + // No additional information needed for stationary motion model } surfaces { - cylinderShell - { - type cylinderWall; // other options: cuboidWall and planeWall - - p1 (0.0 0.0 0.0); // begin point of cylinder axis - - p2 (0.0 0.0 0.4); // end point of cylinder axis - - radius1 0.1; // radius at p1 - - radius2 0.1; // radius at p2 - - resolution 36; // number of divisions - - material wallMat; // material name of this wall - } - - coneShell - { - type cylinderWall; // other options: cuboidWall and planeWall - - p1 (0.0 0.0 -0.1); // begin point of cylinder axis - - p2 (0.0 0.0 0.0); // end point of cylinder axis - - radius1 0.02; // radius at p1 - - radius2 0.1; // radius at p2 - - resolution 36; // number of divisions - - material wallMat; // material name of this wall - } - - /* - This is a plane wall at the exit of silo - */ - - exitGate - { - type planeWall; // other options: cuboidWall and cylinderWall - - p1 (-0.02 -0.02 -0.1); // first point of the wall - - p2 ( 0.02 -0.02 -0.1); // second point of the wall - - p3 ( 0.02 0.02 -0.1); // third point of the wall - - p4 (-0.02 0.02 -0.1); // fourth point of the wall - - material wallMat; // material name of the wall - } -} - - - - + cylinderShell + { + type cylinderWall; // other options: cuboidWall and planeWall + p1 (0.0 0.0 0.0); // begin point of cylinder axis + p2 (0.0 0.0 0.4); // end point of cylinder axis + radius1 0.1; // radius at p1 + radius2 0.1; // radius at p2 + resolution 36; // number of divisions + material wallMat; // material name of this wall + } + coneShell + { + type cylinderWall; // other options: cuboidWall and planeWall + p1 (0.0 0.0 -0.1); // begin point of cylinder axis + p2 (0.0 0.0 0.0); // end point of cylinder axis + radius1 0.02; // radius at p1 + radius2 0.1; // radius at p2 + resolution 36; // number of divisions + material wallMat; // material name of this wall + } + /* + This is a plane wall at the exit of the silo that plugs the exit. + */ + exitGate + { + type planeWall; // other options: cuboidWall and cylinderWall + p1 (-0.02 -0.02 -0.1); // first point of the wall + p2 ( 0.02 -0.02 -0.1); // second point of the wall + p3 ( 0.02 0.02 -0.1); // third point of the wall + p4 (-0.02 0.02 -0.1); // fourth point of the wall + material wallMat; // material name of the wall + } +} \ No newline at end of file diff --git a/tutorials/sphereGranFlow/layeredSiloFilling/settings/particlesDict b/tutorials/sphereGranFlow/layeredSiloFilling/settings/particlesDict index 4df47975..66bc9ec0 100755 --- a/tutorials/sphereGranFlow/layeredSiloFilling/settings/particlesDict +++ b/tutorials/sphereGranFlow/layeredSiloFilling/settings/particlesDict @@ -10,9 +10,7 @@ setFields { /* Default value for fields defined for particles - These fields should always be defined for simulations with - spherical particles. */ @@ -20,7 +18,7 @@ setFields { velocity realx3 (0 0 0); // linear velocity (m/s) - acceleration realx3 (0 0 0); // linear acceleration (m/s2) + acceleration realx3 (0 0 0); // linear acceleration (m/s^2) rVelocity realx3 (0 0 0); // rotational velocity (rad/s) @@ -31,17 +29,8 @@ setFields {} } -positionParticles // positions particles +positionParticles { - method empty; // other options: ordered and random - - regionType box; // other options: cylinder and sphere - - boxInfo // box region for positioning particles - { - min (-0.08 -0.08 0.015); // lower corner point of the box - - max ( 0.08 0.08 0.098); // upper corner point of the box - } + method empty; // empty simulation } diff --git a/tutorials/sphereGranFlow/layeredSiloFilling/settings/settingsDict b/tutorials/sphereGranFlow/layeredSiloFilling/settings/settingsDict index 532bba8d..1beb6649 100755 --- a/tutorials/sphereGranFlow/layeredSiloFilling/settings/settingsDict +++ b/tutorials/sphereGranFlow/layeredSiloFilling/settings/settingsDict @@ -1,42 +1,36 @@ -/* -------------------------------*- C++ -*--------------------------------- *\ -| phasicFlow File | -| copyright: www.cemf.ir | -\* ------------------------------------------------------------------------- */ -objectName settingsDict; -objectType dictionary; -fileFormat ASCII; +/* -------------------------------*- C++ -*--------------------------------- *\ +| phasicFlow File | +| copyright: www.cemf.ir | +\* ------------------------------------------------------------------------- */ +objectName settingsDict; +objectType dictionary; +fileFormat ASCII; /*---------------------------------------------------------------------------*/ -run layerdSiloFilling; +run layeredSiloFilling; -dt 0.00001; // time step for integration (s) +dt 0.00001; // time step for integration (s) -startTime 0.0; // start time for simulation +startTime 0.0; // start time for simulation -endTime 5.0; // end time for simulation +endTime 5.0; // end time for simulation -saveInterval 0.05; // time interval for saving the simulation +saveInterval 0.05; // time interval for saving the simulation -timePrecision 6; // maximum number of digits for time folder +timePrecision 6; // maximum number of digits for time folder -g (0 0 -9.8); // gravity vector (m/s2) +g (0 0 -9.8); // gravity vector (m/s^2) // save data objects that are not automatically saved on disk. - -// overrides the default behavior - -includeObjects (diameter); +// overrides the default behavior +includeObjects (diameter mass); // exclude unnecessary data from saving on disk +excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); -excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); - -integrationMethod AdamsBashforth2; // integration method - -writeFormat ascii; // data writting format (ascii or binary) - -timersReport Yes; // report timers - -timersReportInterval 0.01; // time interval for reporting timers +integrationMethod AdamsBashforth2; // integration method +writeFormat ascii; // data writing format (ascii or binary) +timersReport Yes; // report timers +timersReportInterval 0.05; // time interval for reporting timers diff --git a/utilities/particlesPhasicFlow/empty/empty.cpp b/utilities/particlesPhasicFlow/empty/empty.cpp index d0da9b3b..83cf2c89 100755 --- a/utilities/particlesPhasicFlow/empty/empty.cpp +++ b/utilities/particlesPhasicFlow/empty/empty.cpp @@ -30,7 +30,7 @@ pFlow::empty::empty( positionParticles(control, dict), position_ ( - "empty",maxNumberOfParticles(), 0, RESERVE() + "empty",1, 0, RESERVE() ) { } \ No newline at end of file diff --git a/utilities/particlesPhasicFlow/positionOrdered/positionOrdered.cpp b/utilities/particlesPhasicFlow/positionOrdered/positionOrdered.cpp index 1fb60b87..eb1c94d4 100755 --- a/utilities/particlesPhasicFlow/positionOrdered/positionOrdered.cpp +++ b/utilities/particlesPhasicFlow/positionOrdered/positionOrdered.cpp @@ -146,8 +146,8 @@ pFlow::positionOrdered::positionOrdered position_ ( "positionOrdered", - max(maxNumberOfParticles(), numPoints_), - numPoints_ , + numPoints_, + numPoints_, RESERVE() ) { diff --git a/utilities/particlesPhasicFlow/positionParticles/positionParticles.cpp b/utilities/particlesPhasicFlow/positionParticles/positionParticles.cpp index d99cb217..cbee876a 100755 --- a/utilities/particlesPhasicFlow/positionParticles/positionParticles.cpp +++ b/utilities/particlesPhasicFlow/positionParticles/positionParticles.cpp @@ -32,45 +32,10 @@ pFlow::realx3Vector pFlow::positionParticles::sortByMortonCode( uint64 index; }; - /*realx3 minP = min(position); - realx3 maxP = max(position); - real cellsize = maxDiameter(); - cells allCells( box(minP, maxP), cellsize); - - Vector 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."<("regionType", "domain")), - maxNumberOfParticles_(dict.getValOrSet( - "maxNumberOfParticles", - static_cast(10000))), mortonSorting_(dict.getValOrSet("mortonSorting", Logical("Yes"))) { - if( regionType_ != "domain" ) { pRegion_ = peakableRegion::create( @@ -92,7 +53,7 @@ pFlow::positionParticles::positionParticles } else { - fileDictionary domainDict + fileDictionary domainDictionary ( objectFile { @@ -103,12 +64,10 @@ pFlow::positionParticles::positionParticles }, &control.settings() ); - pRegion_ = peakableRegion::create(regionType_,domainDict.subDict("globalBox")); + pRegion_ = peakableRegion::create("box", domainDictionary.subDict("globalBox")); } - } - pFlow::realx3Vector pFlow::positionParticles::getFinalPosition() { if(mortonSorting_) @@ -130,10 +89,8 @@ pFlow::uniquePtr const dictionary & dict ) { - word method = dict.getVal("method"); - if( dictionaryvCtorSelector_.search(method) ) { return dictionaryvCtorSelector_[method] (control, dict); diff --git a/utilities/particlesPhasicFlow/positionParticles/positionParticles.hpp b/utilities/particlesPhasicFlow/positionParticles/positionParticles.hpp index 85c34e54..749ba7c3 100755 --- a/utilities/particlesPhasicFlow/positionParticles/positionParticles.hpp +++ b/utilities/particlesPhasicFlow/positionParticles/positionParticles.hpp @@ -40,12 +40,8 @@ private: word regionType_; - uint32 maxNumberOfParticles_ = 10000; - Logical mortonSorting_; - - realx3Vector sortByMortonCode(const realx3Vector& position)const; protected: @@ -83,12 +79,6 @@ public: return mortonSorting_(); } - inline - auto maxNumberOfParticles()const - { - return maxNumberOfParticles_; - } - virtual uint32 numPoints()const = 0; virtual uint32 size()const = 0; diff --git a/utilities/particlesPhasicFlow/positionRandom/positionRandom.cpp b/utilities/particlesPhasicFlow/positionRandom/positionRandom.cpp index adb387fe..d67f9df4 100755 --- a/utilities/particlesPhasicFlow/positionRandom/positionRandom.cpp +++ b/utilities/particlesPhasicFlow/positionRandom/positionRandom.cpp @@ -122,14 +122,14 @@ pFlow::positionRandom::positionRandom position_ ( "position", - maxNumberOfParticles(), + 1, 0, RESERVE() ), diameters_ ( "diameters", - maxNumberOfParticles(), + 1, 0, RESERVE() )