diff --git a/tutorials/grainGranFlow/rotatingDrum/settings/particlesDict b/tutorials/grainGranFlow/rotatingDrum/settings/particlesDict index 2dcb6684..017aa2ef 100644 --- a/tutorials/grainGranFlow/rotatingDrum/settings/particlesDict +++ b/tutorials/grainGranFlow/rotatingDrum/settings/particlesDict @@ -44,8 +44,8 @@ positionParticles orderedInfo { - // minimum space between centers of particles - diameter 0.001; + // minimum distance between particles centers + distance 0.001; // number of particles in the simulation numPoints 50000; diff --git a/tutorials/postprocessPhasicFlow/segregation/settings/particlesDict b/tutorials/postprocessPhasicFlow/segregation/settings/particlesDict index 10a81e34..88f6aa4c 100644 --- a/tutorials/postprocessPhasicFlow/segregation/settings/particlesDict +++ b/tutorials/postprocessPhasicFlow/segregation/settings/particlesDict @@ -24,7 +24,7 @@ positionParticles positionOrderedInfo { - diameter 0.005; // minimum space between centers of particles + distance 0.005; // minimum distance between particles centers numPoints 30000; // number of particles in the simulation axisOrder (z x y); // axis order for filling the space with particles } @@ -41,7 +41,7 @@ setFields { velocity realx3 (0 0 0); // linear velocity (m/s) acceleration realx3 (0 0 0); // linear acceleration (m/s2) - r Velocity realx3 (0 0 0); // rotational velocity (rad/s) + rVelocity realx3 (0 0 0); // rotational velocity (rad/s) shapeName word smallSphere; // name of the particle shape } @@ -53,7 +53,8 @@ setFields selectRandomInfo { begin 0; // begin index of points - end 29999; // end index of points + end 29999; // end index of points + number 10000; // number of points to be selected } fieldValue // fields that the selector is applied to { diff --git a/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/shapes b/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/shapes index fa676375..0b5d97ae 100644 --- a/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/shapes +++ b/tutorials/sphereGranFlow/RotaryAirLockValve/caseSetup/shapes @@ -6,8 +6,8 @@ objectName particleInsertion; objectType dicrionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -names (sphere); // names of shapes +names (sphere); // names of shapes -diameters (0.005); // diameter of shapes +diameters (0.005); // diameter of shapes materials (sphereMat); // material names for shapes diff --git a/tutorials/sphereGranFlow/RotaryAirLockValve/cleanThisCase b/tutorials/sphereGranFlow/RotaryAirLockValve/cleanThisCase new file mode 100755 index 00000000..8a0ab919 --- /dev/null +++ b/tutorials/sphereGranFlow/RotaryAirLockValve/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/RotaryAirLockValve/runThisCase b/tutorials/sphereGranFlow/RotaryAirLockValve/runThisCase new file mode 100755 index 00000000..c48d71fe --- /dev/null +++ b/tutorials/sphereGranFlow/RotaryAirLockValve/runThisCase @@ -0,0 +1,21 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +echo "\n<--------------------------------------------------------------------->" +echo "1) Creating particles" +echo "<--------------------------------------------------------------------->\n" +particlesPhasicFlow + +echo "\n<--------------------------------------------------------------------->" +echo "2) Creating geometry" +echo "<--------------------------------------------------------------------->\n" +geometryPhasicFlow + +echo "\n<--------------------------------------------------------------------->" +echo "3) Running the case" +echo "<--------------------------------------------------------------------->\n" +sphereGranFlow + + + + +#------------------------------------------------------------------------------ diff --git a/tutorials/sphereGranFlow/RotaryAirLockValve/settings/domainDict b/tutorials/sphereGranFlow/RotaryAirLockValve/settings/domainDict index 818757f4..d2fe503a 100755 --- a/tutorials/sphereGranFlow/RotaryAirLockValve/settings/domainDict +++ b/tutorials/sphereGranFlow/RotaryAirLockValve/settings/domainDict @@ -2,46 +2,48 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName domainDict; -objectType dictionary; +objectName domainDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -globalBox // Simulation domain: every particles that goes outside this domain will be deleted + +// Simulation domain: every particles that goes outside this domain will be deleted +globalBox { - min (0.397538 0.178212 0.00); - - max (0.725537 0.600214 0.06); + min (0.397538 0.178212 0.00); + + max (0.725537 0.600214 0.06); } boundaries { - left - { - type exit; // other options: periodict, reflective - } + left + { + type exit; // other options: periodict, reflective + } - right - { - type exit; // other options: periodict, reflective - } + right + { + type exit; // other options: periodict, reflective + } - bottom - { - type exit; // other options: periodict, reflective - } + bottom + { + type exit; // other options: periodict, reflective + } - top - { - type exit; // other options: periodict, reflective - } + top + { + type exit; // other options: periodict, reflective + } - rear - { - type exit; // other options: periodict, reflective - } + rear + { + type exit; // other options: periodict, reflective + } - front - { - type exit; // other options: periodict, reflective - } + front + { + type exit; // other options: periodict, reflective + } } diff --git a/tutorials/sphereGranFlow/RotaryAirLockValve/settings/geometryDict b/tutorials/sphereGranFlow/RotaryAirLockValve/settings/geometryDict index f4b737c3..7852401a 100644 --- a/tutorials/sphereGranFlow/RotaryAirLockValve/settings/geometryDict +++ b/tutorials/sphereGranFlow/RotaryAirLockValve/settings/geometryDict @@ -2,50 +2,50 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName geometryDict; -objectType dictionary; +objectName geometryDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ motionModel rotatingAxis; // motion model: rotating object around an axis rotatingAxisInfo // information for rotatingAxisMotion motion model { - rotAxis - { - p1 (0.561547 0.372714 0.000); // first point for the axis of rotation - - p2 (0.561547 0.372714 0.010); // second point for the axis of rotation + rotAxis + { + p1 (0.561547 0.372714 0.000); // first point for the axis of rotation + + p2 (0.561547 0.372714 0.010); // second point for the axis of rotation - omega 2.1; // rotation speed (rad/s) + omega 2.1; // rotation speed (rad/s) - startTime 1.25; // Start time of Geometry Rotating (s) - - endTime 7; // End time of Geometry Rotating (s) - } + startTime 1.25; // Start time of Geometry Rotating (s) + + endTime 7; // End time of Geometry Rotating (s) + } } surfaces { - gear - { - type stlWall; // type of the wall + gear + { + type stlWall; // type of the wall - file gear.stl; // file name in stl folder + file gear.stl; // file name in stl folder - material wallMat; // material name of this wall + material wallMat; // material name of this wall - motion rotAxis; // motion component name - } + motion rotAxis; // motion component name + } surfaces - { - type stlWall; // type of the wall + { + type stlWall; // type of the wall - file surfaces.stl; // file name in stl folder + file surfaces.stl; // file name in stl folder - material wallMat; // material name of this wall + material wallMat; // material name of this wall - motion none; // motion component name - } + motion none; // motion component name + } } diff --git a/tutorials/sphereGranFlow/RotaryAirLockValve/settings/particlesDict b/tutorials/sphereGranFlow/RotaryAirLockValve/settings/particlesDict index f5d5de63..8c2e2c92 100644 --- a/tutorials/sphereGranFlow/RotaryAirLockValve/settings/particlesDict +++ b/tutorials/sphereGranFlow/RotaryAirLockValve/settings/particlesDict @@ -2,8 +2,8 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName particlesDict; -objectType dictionary; +objectName particlesDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ diff --git a/tutorials/sphereGranFlow/RotaryAirLockValve/settings/settingsDict b/tutorials/sphereGranFlow/RotaryAirLockValve/settings/settingsDict index c65cc4c8..20471dfc 100644 --- a/tutorials/sphereGranFlow/RotaryAirLockValve/settings/settingsDict +++ b/tutorials/sphereGranFlow/RotaryAirLockValve/settings/settingsDict @@ -2,8 +2,8 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName geometryDict; -objectType dictionary; +objectName geometryDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ @@ -25,10 +25,12 @@ g (0 -9.8 0); // gravity vector (m/s2) includeObjects (diameter mass); // exclude unnecessary data from saving on disk -excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); +excludeObjects (); integrationMethod AdamsBashforth2; +integrationHistory off; + writeFormat ascii; // data writting format (ascii or binary) timersReport Yes; // report timers: Yes or No diff --git a/tutorials/sphereGranFlow/binarySystemOfParticles/README.md b/tutorials/sphereGranFlow/binarySystemOfParticles/README.md index 041923d7..c1276f13 100644 --- a/tutorials/sphereGranFlow/binarySystemOfParticles/README.md +++ b/tutorials/sphereGranFlow/binarySystemOfParticles/README.md @@ -47,9 +47,9 @@ positionParticles method ordered; // other options: random or empty orderedInfo { - diameter 0.005; // minimum space between centers of particles - numPoints 30000; // number of particles in the simulation - axisOrder (z x y); // axis order for filling the space with particles + distance 0.005; // minimum space between centers of particles + numPoints 30000; // number of particles in the simulation + axisOrder (z x y); // axis order for filling the space with particles } regionType cylinder; // other options: box and sphere diff --git a/tutorials/sphereGranFlow/binarySystemOfParticles/cleanThisCase b/tutorials/sphereGranFlow/binarySystemOfParticles/cleanThisCase old mode 100644 new mode 100755 diff --git a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/domainDict b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/domainDict index 32064d51..b4ab383c 100755 --- a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/domainDict +++ b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/domainDict @@ -1,49 +1,49 @@ /* -------------------------------*- C++ -*--------------------------------- *\ -| phasicFlow File | -| copyright: www.cemf.ir | +| phasicFlow File | +| copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName domainDict; -objectType dictionary; +objectName domainDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ + // Simulation domain: every particles that goes outside this domain will be deleted - -globalBox +globalBox { - min (-0.12 -0.12 0); + min (-0.12 -0.12 0); - max (0.12 0.12 0.1); + max (0.12 0.12 0.1); } boundaries { - left - { - type exit; // other options: periodic, reflective - } + left + { + type exit; // other options: periodic, reflective + } - right - { - type exit; // other options: periodic, reflective - } + right + { + type exit; // other options: periodic, reflective + } - bottom - { - type exit; // other options: periodic, reflective - } + bottom + { + type exit; // other options: periodic, reflective + } - top - { - type exit; // other options: periodic, reflective - } + top + { + type exit; // other options: periodic, reflective + } - rear - { - type exit; // other options: periodic, reflective - } + rear + { + type exit; // other options: periodic, reflective + } - front - { - type exit; // other options: periodic, reflective - } + front + { + type exit; // other options: periodic, reflective + } } diff --git a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/geometryDict b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/geometryDict index 3ec50c1a..b4992c6e 100755 --- a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/geometryDict +++ b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/geometryDict @@ -2,84 +2,82 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName geometryDict; -objectType dictionary; +objectName geometryDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ motionModel rotatingAxis; // motion model can be rotatingAxis or stationary or vibrating rotatingAxisInfo // information for rotatingAxis motion model { - rotAxis - { - p1 (0.0 0.0 0.0); // first point for the axis of rotation + rotAxis + { + p1 (0.0 0.0 0.0); // first point for the axis of rotation - p2 (0.0 0.0 1.0); // second point for the axis of rotation - - omega 1.214; // rotation speed (rad/s) - } + p2 (0.0 0.0 1.0); // second point for the axis of rotation + + omega 1.214; // rotation speed (rad/s) + } } surfaces { - cylinder - { - type cylinderWall; // other options: cuboidWall and planeWall + cylinder + { + type cylinderWall; // other options: cuboidWall and planeWall - p1 (0.0 0.0 0.0); // begin point of cylinder axis + p1 (0.0 0.0 0.0); // begin point of cylinder axis - p2 (0.0 0.0 0.1); // end point of cylinder axis + p2 (0.0 0.0 0.1); // end point of cylinder axis - radius1 0.12; // radius at p1 + radius1 0.12; // radius at p1 - radius2 0.12; // radius at p2 + radius2 0.12; // radius at p2 - resolution 24; // number of divisions + resolution 24; // number of divisions - material prop1; // material name of this wall + material prop1; // material name of this wall - motion rotAxis; // motion component name - } + motion rotAxis; // motion component name + } - /* - This is a plane wall at the rear end of cylinder - */ + /* + This is a plane wall at the rear end of cylinder + */ + wall1 + { + type planeWall; // other options: cuboidWall and cylinderWall - wall1 - { - type planeWall; // other options: cuboidWall and cylinderWall + p1 (-0.12 -0.12 0.0); // first point of the wall - p1 (-0.12 -0.12 0.0); // first point of the wall + p2 (0.12 -0.12 0.0); // second point of the wall - p2 (0.12 -0.12 0.0); // second point of the wall + p3 (0.12 0.12 0.0); // third point of the wall - p3 (0.12 0.12 0.0); // third point of the wall + p4 (-0.12 0.12 0.0); // fourth point of the wall - p4 (-0.12 0.12 0.0); // fourth point of the wall + material prop1; // material name of the wall - material prop1; // material name of the wall + motion rotAxis; // motion component name + } - motion rotAxis; // motion component name - } + /* + This is a plane wall at the front end of cylinder + */ + wall2 + { + type planeWall; // other options: cuboidWall and cylinderWall - /* - This is a plane wall at the front end of cylinder - */ + p1 (-0.12 -0.12 0.1); // first point of the wall - wall2 - { - type planeWall; // other options: cuboidWall and cylinderWall + p2 (0.12 -0.12 0.1); // second point of the wall - p1 (-0.12 -0.12 0.1); // first point of the wall + p3 (0.12 0.12 0.1); // third point of the wall - p2 (0.12 -0.12 0.1); // second point of the wall + p4 (-0.12 0.12 0.1); // fourth point of the wall - p3 (0.12 0.12 0.1); // third point of the wall + material prop1; // material name of the wall - p4 (-0.12 0.12 0.1); // fourth point of the wall - - material prop1; // material name of the wall - - motion rotAxis; // motion component name - } + motion rotAxis; // motion component name + } } diff --git a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/particlesDict b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/particlesDict index b29ebbed..57702104 100755 --- a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/particlesDict +++ b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/particlesDict @@ -2,73 +2,74 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName particlesDict; -objectType dictionary; +objectName particlesDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ + setFields { - /* - Default value for fields defined for particles: + /* + Default value for fields defined for particles: - These fields should always be defined for simulations with spherical particles - */ + These fields should always be defined for simulations with spherical particles + */ - defaultValue - { - velocity realx3 (0 0 0); // linear velocity (m/s) + defaultValue + { + velocity realx3 (0 0 0); // linear velocity (m/s) - acceleration realx3 (0 0 0); // linear acceleration (m/s2) + acceleration realx3 (0 0 0); // linear acceleration (m/s2) - rVelocity realx3 (0 0 0); // rotational velocity (rad/s) + rVelocity realx3 (0 0 0); // rotational velocity (rad/s) - shapeName word smallSphere; // name of the particle shape - } + shapeName word smallSphere; // name of the particle shape + } - selectors - { - shapeAssigne - { - selector stridedRange; // other options: box, cylinder, sphere, randomPoints + selectors + { + shapeAssigne + { + selector stridedRange; // other options: box, cylinder, sphere, randomPoints - stridedRangeInfo - { - begin 0; // begin index of points + stridedRangeInfo + { + begin 0; // begin index of points - end 30000; // end index of points + end 30000; // end index of points - stride 3; // stride for selector - } + stride 3; // stride for selector + } - fieldValue // fields that the selector is applied to - { - shapeName word largeSphere; // sets shapeName of the selected points to largeSphere - } - } - } + fieldValue // fields that the selector is applied to + { + shapeName word largeSphere; // sets shapeName of the selected points to largeSphere + } + } + } } -positionParticles // positions particles +positionParticles // positions particles { - method ordered; // other options: random and empty + method ordered; // other options: random and empty - orderedInfo - { - diameter 0.005; // diameter of particles + orderedInfo + { + distance 0.005; // minimum distance between particles centers - numPoints 30000; // number of particles in the simulation + numPoints 30000; // number of particles in the simulation - axisOrder (z x y); // axis order for filling the space with particles - } - - regionType cylinder; // other options: box and sphere + axisOrder (z x y); // axis order for filling the space with particles + } + + regionType cylinder; // other options: box and sphere - cylinderInfo // cylinder information for positioning particles - { - p1 (0.0 0.0 0.003); // begin point of cylinder axis + cylinderInfo // cylinder information for positioning particles + { + p1 (0.0 0.0 0.003); // begin point of cylinder axis - p2 (0.0 0.0 0.097); // end point of cylinder axis + p2 (0.0 0.0 0.097); // end point of cylinder axis - radius 0.117; // radius of cylinder - } + radius 0.117; // radius of cylinder + } } diff --git a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/settingsDict b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/settingsDict index 3b341e60..34a6ce39 100755 --- a/tutorials/sphereGranFlow/binarySystemOfParticles/settings/settingsDict +++ b/tutorials/sphereGranFlow/binarySystemOfParticles/settings/settingsDict @@ -2,37 +2,37 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName settingsDict; -objectType dictionary; +objectName settingsDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ run binarySystemofParticles; -dt 0.00001; // time step for integration (seconds) +dt 0.00001; // time step for integration (seconds) -startTime 0.0; // start time for simulation +startTime 0.0; // start time for simulation -endTime 10.0; // end time for simulation +endTime 10.0; // end time for simulation -saveInterval 0.1; // time interval for saving the simulation +saveInterval 0.1; // time interval for saving the simulation -timePrecision 6; // maximum number of digits for time folder +timePrecision 6; // maximum number of digits for time folder -g (0 -9.8 0); // gravity vector (m/s2) +g (0 -9.8 0); // gravity vector (m/s2) // save necessary (i.e., required) data on disk - includeObjects (diameter); // exclude unnecessary data from saving on disk +excludeObjects (); -excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); +integrationMethod AdamsBashforth2; // integration method -integrationMethod AdamsBashforth2; // integration method +integrationHistory off; // do not keep integration history on disk (saves space) -writeFormat ascii; // data writting format (ascii or binary) +writeFormat ascii; // data writting format (ascii or binary) -timersReport Yes; // report timers +timersReport Yes; // report timers -timersReportInterval 0.1; // time interval for reporting timers +timersReportInterval 0.1; // time interval for reporting timers \ No newline at end of file diff --git a/tutorials/sphereGranFlow/conveyorBelt/caseSetup/particleInsertion b/tutorials/sphereGranFlow/conveyorBelt/caseSetup/particleInsertion index 195f27df..22e0b06b 100755 --- a/tutorials/sphereGranFlow/conveyorBelt/caseSetup/particleInsertion +++ b/tutorials/sphereGranFlow/conveyorBelt/caseSetup/particleInsertion @@ -6,46 +6,46 @@ objectName particleInsertion; objectType dicrionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -active Yes; // is insertion active -> yes or no -checkForCollision No; // is checked -> yes or no +active Yes; // is insertion active -> yes or no + +checkForCollision No; // is checked -> yes or no /* - one layers of particles are packed + one layer of particles are packed */ - layer0 { - timeControl simulationTime; + timeControl simulationTime; - regionType cylinder; // type of insertion region + regionType cylinder; // type of insertion region - rate 15000; // insertion rate (particles/s) + rate 15000; // insertion rate (particles/s) - startTime 0; // (s) + startTime 0; // (s) - endTime 0.5; // (s) + endTime 0.5; // (s) - insertionInterval 0.025; // s + insertionInterval 0.025; // s - cylinderInfo - { - radius 0.09; // radius of cylinder (m) + cylinderInfo + { + radius 0.09; // radius of cylinder (m) - p1 ( 0.0 0.0 0.1 ); // (m,m,m) + p1 ( 0.0 0.0 0.1 ); // (m,m,m) - p2 ( 0.0 0.0 0.11); // (m,m,m) - } - - setFields - { - velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles - } - - mixture - { - lightSphere 1; // mixture composition of inserted particles - } + p2 ( 0.0 0.0 0.11); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles + } + + mixture + { + lightSphere 1; // mixture composition of inserted particles + } } diff --git a/tutorials/sphereGranFlow/conveyorBelt/caseSetup/shapes b/tutorials/sphereGranFlow/conveyorBelt/caseSetup/shapes index 603c28cb..cc84242f 100755 --- a/tutorials/sphereGranFlow/conveyorBelt/caseSetup/shapes +++ b/tutorials/sphereGranFlow/conveyorBelt/caseSetup/shapes @@ -2,14 +2,15 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName sphereDict; -objectType sphereShape; +objectName sphereDict; +objectType sphereShape; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -names (lightSphere heavySphere); // names of shapes -diameters (0.007 0.007); // diameter of shapes +names (lightSphere heavySphere); // names of shapes -materials (lightMat heavyMat); // material names for shapes +diameters (0.007 0.007); // diameter of shapes + +materials (lightMat heavyMat); // material names for shapes diff --git a/tutorials/sphereGranFlow/conveyorBelt/settings/domainDict b/tutorials/sphereGranFlow/conveyorBelt/settings/domainDict index 159c33e5..1ae5faa4 100755 --- a/tutorials/sphereGranFlow/conveyorBelt/settings/domainDict +++ b/tutorials/sphereGranFlow/conveyorBelt/settings/domainDict @@ -2,64 +2,62 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName domainDict; -objectType dictionary; +objectName domainDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -globalBox // Simulation domain: every particles that goes outside this domain will be deleted + +// Simulation domain: every particles that goes outside this domain will be deleted +globalBox { - min (-0.11 -0.11 -0.41); - - max ( 0.33 0.11 0.41); + min (-0.11 -0.11 -0.41); + + max ( 0.33 0.11 0.41); } boundaries { - // Determines how often (how many iterations) do you want to + // Determines how often (how many iterations) do you want to + // rebuild the list of particles in the neighbor list + // of all boundaries in the simulation domain - // rebuild the list of particles in the neighbor list + neighborListUpdateInterval 30; + + // Determines how often do you want to update the new changes in the boundary + updateInterval 10; - // of all boundaries in the simulation domain + // The distance from the boundary plane within which particles are marked to be in the boundary list + neighborLength 0.004; - neighborListUpdateInterval 30; - - // Determines how often do you want to update the new changes in the boundary + left + { + type exit; // other options: periodict, reflective + } - updateInterval 10; + right + { + type exit; // other options: periodict, reflective + } - // The distance from the boundary plane within which particles are marked to be in the boundary list + bottom + { + type exit; // other options: periodict, reflective + } - neighborLength 0.004; + top + { + type exit; // other options: periodict, reflective + } - left - { - type exit; // other options: periodict, reflective - } + rear + { + type exit; // other options: periodict, reflective + } - right - { - type exit; // other options: periodict, reflective - } - - bottom - { - type exit; // other options: periodict, reflective - } - - top - { - type exit; // other options: periodict, reflective - } - - rear - { - type exit; // other options: periodict, reflective - } - - front - { - type exit; // other options: periodict, reflective - } + front + { + type exit; // other options: periodict, reflective + } } diff --git a/tutorials/sphereGranFlow/conveyorBelt/settings/geometryDict b/tutorials/sphereGranFlow/conveyorBelt/settings/geometryDict index 73f24386..251e94b7 100755 --- a/tutorials/sphereGranFlow/conveyorBelt/settings/geometryDict +++ b/tutorials/sphereGranFlow/conveyorBelt/settings/geometryDict @@ -2,11 +2,13 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName geometryDict; -objectType dictionary; +objectName geometryDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -motionModel conveyorBelt; // motion model can be rotatingAxis or stationary or vibrating + +// motion model can be rotatingAxis or stationary or vibrating +motionModel conveyorBelt; conveyorBeltInfo { @@ -18,63 +20,58 @@ conveyorBeltInfo surfaces { - cylinderShell - { - type cylinderWall; // other options: cuboidWall and planeWall + cylinderShell + { + type cylinderWall; // other options: cuboidWall and planeWall - p1 (0.0 0.0 0.0); // begin point of cylinder axis + p1 (0.0 0.0 0.0); // begin point of cylinder axis - p2 (0.0 0.0 0.4); // end point of cylinder axis + p2 (0.0 0.0 0.4); // end point of cylinder axis - radius1 0.1; // radius at p1 + radius1 0.1; // radius at p1 - radius2 0.1; // radius at p2 + radius2 0.1; // radius at p2 - resolution 36; // number of divisions + resolution 36; // number of divisions - material wallMat; // material name of this wall - } + material wallMat; // material name of this wall + } - coneShell - { - type cylinderWall; // other options: cuboidWall and planeWall + coneShell + { + type cylinderWall; // other options: cuboidWall and planeWall - p1 (0.0 0.0 -0.1); // begin point of cylinder axis + p1 (0.0 0.0 -0.1); // begin point of cylinder axis - p2 (0.0 0.0 0.0); // end point of cylinder axis + p2 (0.0 0.0 0.0); // end point of cylinder axis - radius1 0.02; // radius at p1 + radius1 0.02; // radius at p1 - radius2 0.1; // radius at p2 + radius2 0.1; // radius at p2 - resolution 36; // number of divisions + resolution 36; // number of divisions - material wallMat; // material name of this wall - } + material wallMat; // material name of this wall + } - belt - { - type stlWall; // type of the wall + belt + { + type stlWall; // type of the wall - file belt.stl; // file name in stl folder + file belt.stl; // file name in stl folder - material wallMat; // material name of this wall + material wallMat; // material name of this wall - motion conveyorBelt1; // motion component name - } + motion conveyorBelt1; // motion component name + } - box - { - type stlWall; // type of the wall + box + { + type stlWall; // type of the wall - file box.stl; // file name in stl folder + file box.stl; // file name in stl folder - material wallMat; // material name of this wall - } + material wallMat; // material name of this wall + } } - - - - - diff --git a/tutorials/sphereGranFlow/conveyorBelt/settings/particlesDict b/tutorials/sphereGranFlow/conveyorBelt/settings/particlesDict index 4df47975..397b29e8 100755 --- a/tutorials/sphereGranFlow/conveyorBelt/settings/particlesDict +++ b/tutorials/sphereGranFlow/conveyorBelt/settings/particlesDict @@ -6,16 +6,14 @@ objectName particlesDict; objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ + setFields { /* Default value for fields defined for particles - These fields should always be defined for simulations with - spherical particles. */ - defaultValue { velocity realx3 (0 0 0); // linear velocity (m/s) @@ -31,17 +29,8 @@ setFields {} } -positionParticles // positions particles +positionParticles { - method empty; // other options: ordered and random - - regionType box; // other options: cylinder and sphere - - boxInfo // box region for positioning particles - { - min (-0.08 -0.08 0.015); // lower corner point of the box - - max ( 0.08 0.08 0.098); // upper corner point of the box - } + method empty; // other options: file, ordered and random } diff --git a/tutorials/sphereGranFlow/conveyorBelt/settings/settingsDict b/tutorials/sphereGranFlow/conveyorBelt/settings/settingsDict index c5b6650d..3d3f5658 100755 --- a/tutorials/sphereGranFlow/conveyorBelt/settings/settingsDict +++ b/tutorials/sphereGranFlow/conveyorBelt/settings/settingsDict @@ -2,41 +2,39 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName settingsDict; -objectType dictionary; +objectName settingsDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -run layerdSiloFilling; -dt 0.00005; // time step for integration (s) +run conveyorBelt; -startTime 0.0; // start time for simulation +dt 0.00005; // time step for integration (s) -endTime 5.0; // end time for simulation +startTime 0.0; // start time for simulation -saveInterval 0.05; // time interval for saving the simulation +endTime 5.0; // end time for simulation -timePrecision 6; // maximum number of digits for time folder +saveInterval 0.05; // time interval for saving the simulation -g (0 0 -9.8); // gravity vector (m/s2) +timePrecision 6; // maximum number of digits for time folder + +g (0 0 -9.8); // gravity vector (m/s2) // save data objects that are not automatically saved on disk. - // overrides the default behavior - includeObjects (diameter); // exclude unnecessary data from saving on disk - excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); -integrationMethod AdamsBashforth2; // integration method +integrationMethod AdamsBashforth2; // integration method -writeFormat ascii; // data writting format (ascii or binary) +writeFormat ascii; // data writting format (ascii or binary) -timersReport Yes; // report timers +timersReport Yes; // report timers -timersReportInterval 0.01; // time interval for reporting timers +timersReportInterval 0.01; // time interval for reporting timers diff --git a/tutorials/sphereGranFlow/drum-PeriodicBoundary/README.md b/tutorials/sphereGranFlow/drum-PeriodicBoundary/README.md index 48296411..558ac7c8 100644 --- a/tutorials/sphereGranFlow/drum-PeriodicBoundary/README.md +++ b/tutorials/sphereGranFlow/drum-PeriodicBoundary/README.md @@ -72,7 +72,7 @@ boundaries ## Running the Case The solver for this simulation is `sphereGranFlow`. Enter the following commands in the terminal. Depending on the computational power, it may take a few minutes to a few hours to complete. -```sh +``` geometryPhasicFlow particlesPhasicFlow sphereGranFlow @@ -81,6 +81,6 @@ sphereGranFlow ## Post Processing After finishing the simulation, you can render the results in ParaView. To convert the results to VTK format, just enter the following command in the terminal. This will convert all the results (particles and geometry) to VTK format and store them in the `VTK/` folder. -```sh +``` pFlowToVTK --binary ``` diff --git a/tutorials/sphereGranFlow/drum-PeriodicBoundary/caseSetup/shapes b/tutorials/sphereGranFlow/drum-PeriodicBoundary/caseSetup/shapes index 7b563b12..2bcfddd7 100755 --- a/tutorials/sphereGranFlow/drum-PeriodicBoundary/caseSetup/shapes +++ b/tutorials/sphereGranFlow/drum-PeriodicBoundary/caseSetup/shapes @@ -2,12 +2,12 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName sphereDict; -objectType sphereShape; +objectName sphereDict; +objectType sphereShape; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -names (sphere1); // names of shapes +names (sphere1); // names of shapes -diameters (0.004); // diameter of shapes +diameters (0.004); // diameter of shapes -materials (prop1); // material names for shapes +materials (prop1); // material names for shapes diff --git a/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/geometryDict b/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/geometryDict index e87cbc6a..341d412d 100644 --- a/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/geometryDict +++ b/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/geometryDict @@ -2,8 +2,8 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName geometryDict; -objectType dictionary; +objectName geometryDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ diff --git a/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/particlesDict b/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/particlesDict index d1d24bb6..dfd0ec90 100644 --- a/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/particlesDict +++ b/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/particlesDict @@ -2,33 +2,33 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName particlesDict; -objectType dictionary; +objectName particlesDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ setFields { - /* - Default value for fields defined for particles - These fields should always be defined for simulations with - spherical particles. - */ - defaultValue - { - velocity realx3 (0 0 0); // linear velocity (m/s) + /* + Default value for fields defined for particles + These fields should always be defined for simulations with + spherical particles. + */ + defaultValue + { + velocity realx3 (0 0 0); // linear velocity (m/s) - acceleration realx3 (0 0 0); // linear acceleration (m/s2) + acceleration realx3 (0 0 0); // linear acceleration (m/s2) - rVelocity realx3 (0 0 0); // rotational velocity (rad/s) + rVelocity realx3 (0 0 0); // rotational velocity (rad/s) - shapeName word sphere1; // name of the particle shape - } + shapeName word sphere1; // name of the particle shape + } - selectors - {} + selectors + {} } positionParticles { - method empty; // no particle at the start of simulation + method empty; // no particle at the start of simulation } diff --git a/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/settingsDict b/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/settingsDict index 6dbfc53a..b7f92697 100644 --- a/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/settingsDict +++ b/tutorials/sphereGranFlow/drum-PeriodicBoundary/settings/settingsDict @@ -24,17 +24,11 @@ g (0 -9.8 0); // gravity vector (m/s2) includeObjects (diameter); // save necessary (i.e., required) data on disk // exclude unnecessary data from saving on disk -excludeObjects (rVelocity.dy1 - rVelocity.dy2 - rVelocity.dy3 - pStructPosition.dy1 - pStructPosition.dy2 - pStructPosition.dy3 - pStructVelocity.dy1 - pStructVelocity.dy2 - pStructVelocity.dy3); +excludeObjects (); -integrationMethod AdamsBashforth4; // integration method +integrationMethod AdamsBashforth4; // integration method + +integrationHistory off; // to save space on disk writeFormat ascii; // data writting format (ascii or binary) diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/README.md b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/README.md index b1e41664..3e670c4c 100644 --- a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/README.md +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/README.md @@ -3,7 +3,7 @@ ## Problem A homogenization silo is used to mix particles inside a silo using the circulation of particles. A pneumatic conveying system carries particles from the exit and re-enters them from the top. Here, we use a `periodic` boundary to simulate the action of the pneumatic conveyor system for circulating particles. Particles exiting from the bottom are re-entered from the top using this boundary (`periodic`). -The simulation case setup is essentially similar to the [`layeredSiloFilling`](https://github.com/PhasicFlow/phasicFlow/tree/main/tutorials/sphereGranFlow/layeredSiloFilling) tutorial. There is also another change with regard to `layeredSiloFilling`. The exit gate is opened after the filling phase of the silo (see `settings/geometryDict` for more details). +The simulation case setup is essentially similar to the [`layeredSiloFilling`](../layeredSiloFilling/) tutorial. There is also another change with regard to `layeredSiloFilling`. The exit gate is opened after the filling phase of the silo (see `settings/geometryDict` for more details).
diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/interaction b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/interaction index f5fc4f23..75f65ec4 100755 --- a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/interaction +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/interaction @@ -37,7 +37,6 @@ model heavyMat-heavyMat heavyMat-wallMat wallMat-wallMat ); */ - Yeff (1.0e6 1.0e6 1.0e6 // Young modulus [Pa] 1.0e6 1.0e6 1.0e6); diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/particleInsertion b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/particleInsertion index 2dc7bea7..bb44dcb6 100755 --- a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/particleInsertion +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/caseSetup/particleInsertion @@ -26,189 +26,185 @@ layer0 insertionInterval 0.025; // s - cylinderInfo - { - radius 0.09; // radius of cylinder (m) + cylinderInfo + { + radius 0.09; // radius of cylinder (m) - p1 (0.0 0.0 0.1); // (m,m,m) + p1 (0.0 0.0 0.1); // (m,m,m) - p2 (0.0 0.0 0.11); // (m,m,m) - } - - setFields - { - velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles - } - - mixture - { - parType1 1; // mixture composition of inserted particles - } + p2 (0.0 0.0 0.11); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles + } + + mixture + { + parType1 1; // mixture composition of inserted particles + } } layer1 { - timeControl simulationTime; + timeControl simulationTime; - regionType cylinder; // type of insertion region + regionType cylinder; // type of insertion region - rate 5100; // insertion rate (particles/s) + rate 5100; // insertion rate (particles/s) - startTime 0.7; // (s) + startTime 0.7; // (s) - endTime 1.2; // (s) + endTime 1.2; // (s) - insertionInterval 0.025; // s + insertionInterval 0.025; // s - - cylinderInfo - { - radius 0.09; - p1 (0.0 0.0 0.16 ); // (m,m,m) - p2 (0.0 0.0 0.17); // (m,m,m) - } - - setFields - { - velocity realx3 (0.0 0.0 -0.6); - } - - mixture - { - parType2 1; // only parType2 - - } + + cylinderInfo + { + radius 0.09; + p1 (0.0 0.0 0.16 ); // (m,m,m) + p2 (0.0 0.0 0.17); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + parType2 1; // only parType2 + + } } layer2 { - timeControl simulationTime; + timeControl simulationTime; - regionType cylinder; // type of insertion region + regionType cylinder; // type of insertion region - rate 5100; // insertion rate (particles/s) + rate 5100; // insertion rate (particles/s) - startTime 1.4; // (s) + startTime 1.4; // (s) - endTime 1.9; // (s) + endTime 1.9; // (s) - insertionInterval 0.025; // s + insertionInterval 0.025; // s - cylinderInfo - { - radius 0.09; - p1 ( 0.0 0.0 0.2 ); // (m,m,m) - p2 ( 0.0 0.0 0.21); // (m,m,m) - } - - setFields - { - velocity realx3 (0.0 0.0 -0.6); - } - - mixture - { - parType1 1; // only parType1 - - } + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.2 ); // (m,m,m) + p2 ( 0.0 0.0 0.21); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + parType1 1; // only parType1 + } } layer3 { - timeControl simulationTime; + timeControl simulationTime; - regionType cylinder; // type of insertion region + regionType cylinder; // type of insertion region - rate 5100; // insertion rate (particles/s) + rate 5100; // insertion rate (particles/s) - startTime 2.1; // (s) + startTime 2.1; // (s) - endTime 2.6; // (s) + endTime 2.6; // (s) - insertionInterval 0.025; // s - + insertionInterval 0.025; // s - cylinderInfo - { - radius 0.09; - p1 ( 0.0 0.0 0.28 ); // (m,m,m) - p2 ( 0.0 0.0 0.29); // (m,m,m) - } - - setFields - { - velocity realx3 (0.0 0.0 -0.6); - } - - mixture - { - parType2 1; - - } + + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.28 ); // (m,m,m) + p2 ( 0.0 0.0 0.29); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + parType2 1; + } } layer4 { - timeControl simulationTime; + timeControl simulationTime; - regionType cylinder; // type of insertion region + regionType cylinder; // type of insertion region - rate 5100; // insertion rate (particles/s) + rate 5100; // insertion rate (particles/s) - startTime 2.8; // (s) + startTime 2.8; // (s) - endTime 3.3; // (s) + endTime 3.3; // (s) - insertionInterval 0.025; // s + insertionInterval 0.025; // s - cylinderInfo - { - radius 0.09; - p1 ( 0.0 0.0 0.37 ); // (m,m,m) - p2 ( 0.0 0.0 0.38); // (m,m,m) - } - - setFields - { - velocity realx3 (0.0 0.0 -0.6); - } - - mixture - { - parType1 1; - - } + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.37 ); // (m,m,m) + p2 ( 0.0 0.0 0.38); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + parType1 1; + } } layer5 { - timeControl simulationTime; + timeControl simulationTime; - regionType cylinder; // type of insertion region + regionType cylinder; // type of insertion region - rate 5100; // insertion rate (particles/s) + rate 5100; // insertion rate (particles/s) - startTime 3.4; // (s) + startTime 3.4; // (s) - endTime 3.9; // (s) + endTime 3.9; // (s) - insertionInterval 0.025; // s + insertionInterval 0.025; // s - cylinderInfo - { - radius 0.09; - p1 ( 0.0 0.0 0.38 ); // (m,m,m) - p2 ( 0.0 0.0 0.39); // (m,m,m) - } - - setFields - { - velocity realx3 (0.0 0.0 -0.6); - } - - mixture - { - parType2 1; - - } + cylinderInfo + { + radius 0.09; + p1 ( 0.0 0.0 0.38 ); // (m,m,m) + p2 ( 0.0 0.0 0.39); // (m,m,m) + } + + setFields + { + velocity realx3 (0.0 0.0 -0.6); + } + + mixture + { + parType2 1; + } } \ No newline at end of file diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/domainDict b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/domainDict index 606db9b1..c0d515c0 100755 --- a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/domainDict +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/domainDict @@ -2,51 +2,51 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName domainDict; -objectType dictionary; +objectName domainDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ // Simulation domain: every particles that goes outside this domain will be deleted globalBox { - min (-0.11 -0.11 -0.15); - - max ( 0.11 0.11 0.4); + min (-0.11 -0.11 -0.15); + + max ( 0.11 0.11 0.4); } boundaries { - - left - { - type exit; - } + + left + { + type exit; + } - right - { - type exit; - } + right + { + type exit; + } - bottom - { - type exit; - } + bottom + { + type exit; + } - top - { - type exit; - } + top + { + type exit; + } - rear - { - type periodic; - } + rear // z- + { + type periodic; + } - front - { - type periodic; - } + front // z+ + { + type periodic; + } } diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/geometryDict b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/geometryDict index b72f1c07..13d93a19 100755 --- a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/geometryDict +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/geometryDict @@ -2,8 +2,8 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName geometryDict; -objectType dictionary; +objectName geometryDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ @@ -11,73 +11,72 @@ 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; - } + // 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 + cylinderShell + { + type cylinderWall; // other options: cuboidWall and planeWall - p1 (0.0 0.0 0.0); // begin point of cylinder axis + p1 (0.0 0.0 0.0); // begin point of cylinder axis - p2 (0.0 0.0 0.4); // end point of cylinder axis + p2 (0.0 0.0 0.4); // end point of cylinder axis - radius1 0.1; // radius at p1 + radius1 0.1; // radius at p1 - radius2 0.1; // radius at p2 + radius2 0.1; // radius at p2 - resolution 36; // number of divisions + resolution 36; // number of divisions - material wallMat; // material name of this wall - } + material wallMat; // material name of this wall + } - coneShell - { - type cylinderWall; // other options: cuboidWall and planeWall + coneShell + { + type cylinderWall; // other options: cuboidWall and planeWall - p1 (0.0 0.0 -0.1); // begin point of cylinder axis + p1 (0.0 0.0 -0.1); // begin point of cylinder axis - p2 (0.0 0.0 0.0); // end point of cylinder axis + p2 (0.0 0.0 0.0); // end point of cylinder axis - radius1 0.04; // radius at p1 + radius1 0.04; // radius at p1 - radius2 0.1; // radius at p2 + radius2 0.1; // radius at p2 - resolution 36; // number of divisions + resolution 36; // number of divisions - material wallMat; // material name of this wall - } + material wallMat; // material name of this wall + } - /* - This is a plane wall at the exit of silo - */ + /* + This is a plane wall at the exit of silo + */ + exitGate + { + type planeWall; // other options: cuboidWall and cylinderWall - exitGate - { - type planeWall; // other options: cuboidWall and cylinderWall + p1 (-0.04 -0.04 -0.1); // first point of the wall - p1 (-0.04 -0.04 -0.1); // first point of the wall + p2 ( 0.04 -0.04 -0.1); // second 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 - 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 - p4 (-0.04 0.04 -0.1); // fourth point of the wall - - material wallMat; // material name of the wall - - motion gateMotion; - } + motion gateMotion; + } } diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/particlesDict b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/particlesDict index a01a553e..7805806f 100755 --- a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/particlesDict +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/particlesDict @@ -2,35 +2,34 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName particlesDict; -objectType dictionary; +objectName particlesDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ setFields { - /* - Default value for fields defined for particles - These fields should always be defined for simulations with - spherical particles. - */ + /* + 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) - defaultValue - { - velocity realx3 (0 0 0); // linear velocity (m/s) + acceleration realx3 (0 0 0); // linear acceleration (m/s2) - acceleration realx3 (0 0 0); // linear acceleration (m/s2) + rVelocity realx3 (0 0 0); // rotational velocity (rad/s) - rVelocity realx3 (0 0 0); // rotational velocity (rad/s) + shapeName word parType1; // name of the particle shape + } - shapeName word parType1; // name of the particle shape - } - - selectors - {} + selectors + {} } positionParticles { - method empty; // empty simulation + method empty; // empty simulation } diff --git a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/settingsDict b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/settingsDict index 0f119f33..774e1c9c 100755 --- a/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/settingsDict +++ b/tutorials/sphereGranFlow/homogenizationSilo-PeriodicBoundary/settings/settingsDict @@ -2,40 +2,40 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName settingsDict; -objectType dictionary; +objectName settingsDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ run homogenizationSilo; -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 20; // end time for simulation +endTime 20; // end time for simulation -saveInterval 0.05; // time interval for saving the simulation +saveInterval 0.05; // time interval for saving the simulation -timePrecision 4; // maximum number of digits for time folder +timePrecision 4; // maximum number of digits for time folder -g (0 0 -9.8); // gravity vector (m/s2) +g (0 0 -9.8); // gravity vector (m/s2) // 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); +excludeObjects (); -integrationMethod AdamsBashforth4; // integration method +integrationMethod AdamsBashforth4; // integration method -writeFormat binary; // data writting format (ascii or binary) +integrationHistory off; // to save space on disk -timersReport Yes; // report timers +writeFormat binary; // data writting format (ascii or binary) -timersReportInterval 0.1; // time interval for reporting timers +timersReport Yes; // report timers + +timersReportInterval 0.1; // time interval for reporting timers diff --git a/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/shapes b/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/shapes index 354e3d53..76ed5ee5 100755 --- a/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/shapes +++ b/tutorials/sphereGranFlow/layeredSiloFilling/caseSetup/shapes @@ -2,14 +2,14 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName sphereDict; -objectType sphereShape; +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/particlesDict b/tutorials/sphereGranFlow/layeredSiloFilling/settings/particlesDict index 66bc9ec0..8db9229c 100755 --- a/tutorials/sphereGranFlow/layeredSiloFilling/settings/particlesDict +++ b/tutorials/sphereGranFlow/layeredSiloFilling/settings/particlesDict @@ -13,7 +13,6 @@ setFields These fields should always be defined for simulations with spherical particles. */ - defaultValue { velocity realx3 (0 0 0); // linear velocity (m/s) diff --git a/tutorials/sphereGranFlow/layeredSiloFilling/settings/settingsDict b/tutorials/sphereGranFlow/layeredSiloFilling/settings/settingsDict index 1beb6649..27047265 100755 --- a/tutorials/sphereGranFlow/layeredSiloFilling/settings/settingsDict +++ b/tutorials/sphereGranFlow/layeredSiloFilling/settings/settingsDict @@ -25,10 +25,12 @@ g (0 0 -9.8); // gravity vector (m/s^2) includeObjects (diameter mass); // exclude unnecessary data from saving on disk -excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); +excludeObjects (); integrationMethod AdamsBashforth2; // integration method +integrationHistory off; + writeFormat ascii; // data writing format (ascii or binary) timersReport Yes; // report timers diff --git a/tutorials/sphereGranFlow/rotatingDrumMedium/README.md b/tutorials/sphereGranFlow/rotatingDrumMedium/README.md new file mode 100644 index 00000000..42c580c3 --- /dev/null +++ b/tutorials/sphereGranFlow/rotatingDrumMedium/README.md @@ -0,0 +1,161 @@ +# Simulating a Medium-Scale Rotating Drum (v-1.0) + +## Problem Definition + +This tutorial demonstrates the simulation of a medium-sized rotating drum with a diameter of 0.24 m and a length of 0.36 m. The drum is filled with 250,000 spherical glass beads with a diameter of 3 mm. The drum rotates at a constant speed, and the simulation captures the flow behavior and mixing of the particles. + +
+ +A view of the rotating drum simulation + +
+ +*** + +## Setting up the Case + +PhasicFlow simulation case setup is based on text-based scripts provided in two folders located in the simulation case folder: `settings` and `caseSetup`. All commands should be entered in the terminal while the current working directory is the simulation case folder. + +### Creating Particles + +In the file `settings/particlesDict`, two dictionaries, `positionParticles` and `setFields`, define how particles are positioned and what field values they have initially. + +The `positionParticles` dictionary specifies the ordered positioning method to place 250,000 particles within a cylindrical region: + +```C++ +positionParticles +{ + method ordered; // other options: random and empty + + orderedInfo + { + distance 0.003; // minimum distance between particles centers + numPoints 250000; // number of particles in the simulation + axisOrder (z y x); // axis order for filling the space with particles + } + + regionType cylinder; // other options: box and sphere + + cylinderInfo + { + p1 (0.0 0.0 0.003); // begin point of cylinder axis + p2 (0.0 0.0 0.357); // end point of cylinder axis + radius 0.117; // radius of cylinder + } +} +``` + +The `setFields` dictionary defines the initial values for particle fields: + +```C++ +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 glassBead; // name of the particle shape + } +} +``` + +To create the particles based on these settings, enter the following command in the terminal: + +``` +> particlesPhasicFlow +``` + +### Creating Geometry + +In the file `settings/geometryDict`, you can find information for creating the rotating drum geometry. The simulation uses the `rotatingAxis` motion model to define rotation around a fixed axis. + +The surfaces of the drum are defined in the `surfaces` dictionary, including the cylindrical shell and end walls. + +To create the geometry based on these settings, enter the following command in the terminal: + +``` +> geometryPhasicFlow +``` + +### Defining Properties and Interactions + +In the file `caseSetup/shapes`, the particle shape, diameter, and material are defined: + +```C++ +names (glassBead); // names of shapes +diameters (0.003); // diameter of shapes +materials (glassMat); // material names for shapes +``` + +In the file `caseSetup/interaction`, the material properties and interaction models are defined: + +```C++ +materials (glassMat wallMat); // a list of materials names +densities (2500.0 2500); // density of materials [kg/m3] + +model +{ + contactForceModel nonLinearLimited; + rollingFrictionModel normal; + + /* + Property (glassMat-glassMat glassMat-wallMat + wallMat-wallMat); + */ + + Yeff (1.0e6 1.0e6 + 1.0e6); // Young modulus [Pa] + + Geff (0.8e6 0.8e6 + 0.8e6); // Shear modulus [Pa] + + nu (0.25 0.25 + 0.25); // Poisson's ratio [-] + + en (0.97 0.85 + 1.00); // coefficient of normal restitution + + mu (0.65 0.65 + 0.65); // dynamic friction + + mur (0.1 0.1 + 0.1); // rolling friction +} +``` + +The contact search settings are also defined in this file, including the method, update interval, and other parameters. + +## Running the Simulation + +To run the simulation, follow these steps in order: + +1. Create the initial particle fields: + + ``` + > particlesPhasicFlow + ``` + +2. Create the geometry: + + ``` + > geometryPhasicFlow + ``` + +3. Start the simulation: + + ``` + > sphereGranFlow + ``` + +The simulation will run according to the settings defined in `settings/settingsDict`, including the time step, start/end times, and gravity vector. + +## Post-Processing + +After the simulation is complete, you can visualize the results using ParaView. To convert the simulation results to VTK format, use the following command: + +``` +> pFlowToVTK --binary +``` + +This will create VTK files in the `VTK/` folder that can be opened in ParaView for visualization and analysis. diff --git a/tutorials/sphereGranFlow/rotatingDrumMedium/caseSetup/interaction b/tutorials/sphereGranFlow/rotatingDrumMedium/caseSetup/interaction index 3abd0790..57691172 100755 --- a/tutorials/sphereGranFlow/rotatingDrumMedium/caseSetup/interaction +++ b/tutorials/sphereGranFlow/rotatingDrumMedium/caseSetup/interaction @@ -6,6 +6,7 @@ objectName interaction; objectType dicrionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ + materials (glassMat wallMat); // a list of materials names densities (2500.0 2500); // density of materials [kg/m3] diff --git a/tutorials/sphereGranFlow/rotatingDrumMedium/caseSetup/particleInsertion b/tutorials/sphereGranFlow/rotatingDrumMedium/caseSetup/particleInsertion deleted file mode 100755 index c4fd4f25..00000000 --- a/tutorials/sphereGranFlow/rotatingDrumMedium/caseSetup/particleInsertion +++ /dev/null @@ -1,10 +0,0 @@ -/* -------------------------------*- C++ -*--------------------------------- *\ -| phasicFlow File | -| copyright: www.cemf.ir | -\* ------------------------------------------------------------------------- */ -objectName particleInsertion; -objectType dicrionary; -fileFormat ASCII; -/*---------------------------------------------------------------------------*/ -active No; // is checked -> Yes or No - diff --git a/tutorials/sphereGranFlow/rotatingDrumMedium/settings/domainDict b/tutorials/sphereGranFlow/rotatingDrumMedium/settings/domainDict index 5c0faa6f..edf8509a 100755 --- a/tutorials/sphereGranFlow/rotatingDrumMedium/settings/domainDict +++ b/tutorials/sphereGranFlow/rotatingDrumMedium/settings/domainDict @@ -6,7 +6,9 @@ objectName domainDict; objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -globalBox // Simulation domain: every particles that goes outside this domain will be deleted + +// Simulation domain: every particles that goes outside this domain will be deleted +globalBox { min (-0.12 -0.12 0); diff --git a/tutorials/sphereGranFlow/rotatingDrumMedium/settings/geometryDict b/tutorials/sphereGranFlow/rotatingDrumMedium/settings/geometryDict index b1cf7ee0..7e9605b4 100644 --- a/tutorials/sphereGranFlow/rotatingDrumMedium/settings/geometryDict +++ b/tutorials/sphereGranFlow/rotatingDrumMedium/settings/geometryDict @@ -6,6 +6,7 @@ objectName geometryDict; objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ + motionModel rotatingAxis; // motion model: rotating object around an axis diff --git a/tutorials/sphereGranFlow/rotatingDrumMedium/settings/particlesDict b/tutorials/sphereGranFlow/rotatingDrumMedium/settings/particlesDict index 61796a4f..07b12d2c 100644 --- a/tutorials/sphereGranFlow/rotatingDrumMedium/settings/particlesDict +++ b/tutorials/sphereGranFlow/rotatingDrumMedium/settings/particlesDict @@ -36,7 +36,7 @@ positionParticles // positions particles orderedInfo { - diameter 0.003; // minimum space between centers of particles + distance 0.003; // minimum distance between particles centers numPoints 250000; // number of particles in the simulation diff --git a/tutorials/sphereGranFlow/rotatingDrumMedium/settings/settingsDict b/tutorials/sphereGranFlow/rotatingDrumMedium/settings/settingsDict index b6270b50..7281076f 100644 --- a/tutorials/sphereGranFlow/rotatingDrumMedium/settings/settingsDict +++ b/tutorials/sphereGranFlow/rotatingDrumMedium/settings/settingsDict @@ -23,7 +23,7 @@ g (0 -9.8 0); // gravity vector (m/s2) includeObjects (diameter); // save necessary (i.e., required) data on disk // exclude unnecessary data from saving on disk -excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); +excludeObjects (); integrationMethod AdamsBashforth2; // integration method diff --git a/tutorials/sphereGranFlow/rotatingDrumSmall/README.md b/tutorials/sphereGranFlow/rotatingDrumSmall/README.md index d8955de3..e1d18e44 100644 --- a/tutorials/sphereGranFlow/rotatingDrumSmall/README.md +++ b/tutorials/sphereGranFlow/rotatingDrumSmall/README.md @@ -1,60 +1,62 @@ -# Simularing a rotating drum (v-1.0) -## Problem definition -The problem is to simulate a rotating drum with the diameter 0.24 m and the length 0.1 m rotating at 11.6 rpm. It is filled with 30,000 4-mm spherical particles. The timestep for integration is 0.00001 s. +# Simulating a Rotating Drum (v-1.0) + +## Problem Definition + +The problem is to simulate a rotating drum with a diameter of 0.24 m and a length of 0.1 m, rotating at 11.6 rpm. It is filled with 30,000 spherical particles, each with a diameter of 4 mm. The timestep for integration is 0.00001 s. This tutorial demonstrates the basic setup for creating a rotation-based simulation using built-in geometry in PhasicFlow. +
- -A view of rotating drum +A view of the rotating drum - - -![](https://github.com/PhasicFlow/phasicFlow/blob/media/media/rotating-drum-s.png) - -
+
+ +
+
*** -## Setting up the case -PhasicFlow simulation case setup is based on the text-based scripts that we provide in two folders located in the simulation case folder: `settings` and `caseSetup` (You can find the case setup files in the above folders. -All the commands should be entered in the terminal while the current working directory is the simulation case folder (at the top of the `caseSetup` and `settings`). +## Setting up the Case +PhasicFlow simulation case setup is based on text-based scripts provided in two folders located in the simulation case folder: `settings` and `caseSetup`. All commands should be entered in the terminal while the current working directory is the simulation case folder (at the top level of `caseSetup` and `settings`). -### Creating particles +### Creating Particles -Open the file `settings/particlesDict`. Two dictionaries, `positionParticles` and `setFields` position particles and set the field values for the particles. -In dictionary `positionParticles`, the positioning `method` is `ordered`, which position particles in order in the space defined by `box`. `box` space is defined by two corner points `min` and `max`. In dictionary `orderedInfo`, `numPoints` defines number of particles; `diameter`, the distance between two adjacent particles, and `axisOrder` defines the axis order for filling the space by particles. +In the file `settings/particlesDict`, two dictionaries, `positionParticles` and `setFields`, position particles and set the field values for the particles. + +The `positionParticles` dictionary uses the `ordered` method to position particles in a space defined by `box`. The box space is defined by two corner points: `min` and `max`. In the `orderedInfo` sub-dictionary, `numPoints` defines the number of particles (30,000), `distance` defines the spacing between adjacent particles (4 mm), and `axisOrder` defines the axis order for filling the space with particles.
in settings/particlesDict file
```C++ -positionParticles // positions particles -{ - method ordered; // other options: random and empty +positionParticles +{ + method ordered; // other options: random and empty - mortonSorting Yes; // perform initial sorting based on morton code? + mortonSorting Yes; // perform initial sorting based on morton code? orderedInfo { - diameter 0.004; // minimum space between centers of particles + distance 0.004; // minimum space between centers of particles - numPoints 30000; // number of particles in the simulation + numPoints 30000; // number of particles in the simulation - axisOrder (z y x); // axis order for filling the space with particles + axisOrder (z y x); // axis order for filling the space with particles } - regionType box; // other options: cylinder and sphere + regionType box; // other options: cylinder and sphere - boxInfo // box information for positioning particles + boxInfo // box information for positioning particles { - min (-0.08 -0.08 0.015); // lower corner point of the box + 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 + max ( 0.08 0.08 0.098); // upper corner point of the box } } ``` -In dictionary `setFields`, dictionary `defaultValue` defines the initial value for particle fields (here, `velocity`, `acceleration`, `rotVelocity`, and `shapeName`). Note that `shapeName` field should be consistent with the name of shape that you later set for shapes (here one shape with name `sphere1`). + +In the `setFields` dictionary, the `defaultValue` sub-dictionary defines the initial values for particle fields (velocity, acceleration, rotational velocity, and shape name). The shape name field should be consistent with the name defined in the shapes file (here, "sphere1").
in settings/particlesDict file @@ -76,17 +78,20 @@ setFields selectors { - + // Selectors can be used to modify properties for specific particle groups } } ``` -Enter the following command in the terminal to create the particles and store them in `0` folder. +To create the particles and store them in the `0` folder, enter the following command: -`> particlesPhasicFlow` +``` +particlesPhasicFlow +``` -### Creating geometry -In file `settings/geometryDict` , you can provide information for creating geometry. Each simulation should have a `motionModel` that defines a model for moving the surfaces in the simulation. `rotatingAxis` model defines a fixed axis which rotates around itself. The dictionary `rotAxis` defines an motion component with `p1` and `p2` as the end points of the axis and `omega` as the rotation speed in rad/s. You can define more than one motion component in a simulation. +### Creating Geometry + +In the file `settings/geometryDict`, you define the motion model and geometry for the simulation. The `rotatingAxis` motion model defines a fixed axis which rotates around itself. The `rotAxis` dictionary specifies the axis endpoints and rotation speed.
in settings/geometryDict file @@ -95,19 +100,23 @@ in settings/geometryDict file ```C++ motionModel rotatingAxis; -rotatingAxisInfo // information for rotatingAxisMotion motion model +rotatingAxisInfo { rotAxis { - p1 (0.0 0.0 0.0); // first point for the axis of rotation + p1 (0.0 0.0 0.0); // first point for the axis of rotation - p2 (0.0 0.0 1.0); // second point for the axis of rotation + p2 (0.0 0.0 1.0); // second point for the axis of rotation - omega 1.214; // rotation speed (rad/s) + omega 1.214; // rotation speed (rad/s) } } ``` -In the dictionary `surfaces` you can define all the surfaces (walls) in the simulation. Two main options are available: built-in geometries in PhasicFlow, and providing surfaces with stl file. Here we use built-in geometries. In `cylinder` dictionary, a cylindrical shell with end radii, `radius1` and `radius2`, axis end points `p1` and `p2`, `material` name `prop1`, `motion` component `rotAxis` is defined. `resolution` sets number of division for the cylinder shell. `wall1` and `wall2` define two plane walls at two ends of cylindrical shell with coplanar corner points `p1`, `p2`, `p3`, and `p4`, `material` name `prop1` and `motion` component `rotAxis`. + +The `surfaces` dictionary defines all the walls in the simulation. This tutorial uses built-in geometries provided by PhasicFlow. The geometry consists of: + +1. A `cylinder` dictionary defining a cylindrical shell with end radii (`radius1` and `radius2`), axis endpoints (`p1` and `p2`), material name (`prop1`), and motion component (`rotAxis`). +2. Two plane walls (`wall1` and `wall2`) at the ends of the cylindrical shell, each defined with four coplanar corner points, the same material name, and the same motion component.
in settings/geometryDict file @@ -119,114 +128,119 @@ surfaces /* A cylinder with begin and end radii 0.12 m and axis points at (0 0 0) and (0 0 0.1) */ - cylinder { - type cylinderWall; // type of the wall + type cylinderWall; // type of the wall - p1 (0.0 0.0 0.0); // begin point of cylinder axis + p1 (0.0 0.0 0.0); // begin point of cylinder axis - p2 (0.0 0.0 0.1); // end point of cylinder axis + p2 (0.0 0.0 0.1); // end point of cylinder axis - radius1 0.12; // radius at p1 + radius1 0.12; // radius at p1 - radius2 0.12; // radius at p2 + radius2 0.12; // radius at p2 - resolution 24; // number of divisions + resolution 24; // number of divisions - material prop1; // material name of this wall + material prop1; // material name of this wall - motion rotAxis; // motion component name + motion rotAxis; // motion component name } /* This is a plane wall at the rear end of cylinder */ - wall1 { - type planeWall; // type of the wall + type planeWall; // type of the wall - p1 (-0.12 -0.12 0.0); // first point of the wall + p1 (-0.12 -0.12 0.0); // first point of the wall - p2 ( 0.12 -0.12 0.0); // second point + p2 ( 0.12 -0.12 0.0); // second point - p3 ( 0.12 0.12 0.0); // third point + p3 ( 0.12 0.12 0.0); // third point - p4 (-0.12 0.12 0.0); // fourth point + p4 (-0.12 0.12 0.0); // fourth point - material prop1; // material name of the wall + material prop1; // material name of the wall - motion rotAxis; // motion component name + motion rotAxis; // motion component name } /* This is a plane wall at the front end of cylinder */ - wall2 { - type planeWall; // type of the wall + type planeWall; // type of the wall - p1 (-0.12 -0.12 0.1); // first point of the wall + p1 (-0.12 -0.12 0.1); // first point of the wall - p2 ( 0.12 -0.12 0.1); // second point + p2 ( 0.12 -0.12 0.1); // second point - p3 ( 0.12 0.12 0.1); // third point + p3 ( 0.12 0.12 0.1); // third point - p4 (-0.12 0.12 0.1); // fourth point + p4 (-0.12 0.12 0.1); // fourth point - material prop1; // material name of the wall + material prop1; // material name of the wall - motion rotAxis; // motion component name + motion rotAxis; // motion component name } } ``` -Enter the following command in the terminal to create the geometry and store it in `0/geometry` folder. -`> geometryPhasicFlow` +To create the geometry and store it in the `0/geometry` folder, enter: -### Defining properties and interactions -In the file `caseSetup/interaction` , you find properties of materials. `materials` defines a list of material names in the simulation and `densities` sets the corresponding density of each material name. model dictionary defines the interaction model for particle-particle and particle-wall interactions. `contactForceModel` selects the model for mechanical contacts (here nonlinear model with limited tangential displacement) and `rollingFrictionModel` selects the model for calculating rolling friction. Other required prosperities should be defined in this dictionary. +``` +geometryPhasicFlow +``` + +### Defining Properties and Interactions + +In the file `caseSetup/interaction`, you define properties of materials and their interactions. The `materials` entry lists material names, and `densities` sets the corresponding densities. The `model` dictionary defines the contact force and rolling friction models, along with other required properties.
in caseSetup/interaction file
```C++ -materials (prop1); // a list of materials names -densities (1000.0); // density of materials [kg/m3] -. -. -. +materials (prop1); // a list of materials names + +densities (1000.0); // density of materials [kg/m3] + +contactListType sortedContactList; + model { - contactForceModel nonLinearNonLimited; - rollingFrictionModel normal; + contactForceModel nonLinearNonLimited; - Yeff (1.0e6); // Young modulus [Pa] - Geff (0.8e6); // Shear modulus [Pa] - nu (0.25); // Poisson's ratio [-] - en (0.7); // coefficient of normal restitution - mu (0.3); // dynamic friction - mur (0.1); // rolling friction + rollingFrictionModel normal; + + Yeff (1.0e6); // Young modulus [Pa] + + Geff (0.8e6); // Shear modulus [Pa] + + nu (0.25); // Poisson's ratio [-] + + en (0.7); // coefficient of normal restitution + + mu (0.3); // dynamic friction + + mur (0.1); // rolling friction } ``` -Dictionary `contactSearch` sets the methods for particle-particle and particle-wall contact search. `method` specifies the algorithm for finding neighbor list for particle-particle contacts. `updateInterval` sets the number of iterations between each occurance of updating neighbor list and `sizeRatio` sets the size of enlarged cells (with respect to particle diameter) for finding neighbor list. Larger `sizeRatio` include more particles in the neighbor list and you require to update it less frequent. +The `contactSearch` dictionary specifies the algorithm and parameters for finding particle-particle contacts. The `method` determines the broad search algorithm, `updateInterval` sets how often to update the neighbor list, and `sizeRatio` controls the enlarged cell size for finding neighbors.
in caseSetup/interaction file
```C++ -contactListType sortedContactList; - contactSearch { - - method NBS; // method for broad search - + method NBS; + updateInterval 10; sizeRatio 1.1; @@ -235,57 +249,25 @@ contactSearch adjustableBox Yes; } - ``` -In the file `caseSetup/shape`, you can define a list of `names` for shapes (`shapeName` in particle field), a list of diameters for shapes and their `properties` names. +In the file `caseSetup/shapes`, you define particle shapes, including their names, diameters, and material properties:
-in caseSetup/shape file +in caseSetup/shapes file
```C++ -names (sphere1); // names of shapes -diameters (0.004); // diameter of shapes -materials (prop1); // material names for shapes +names (sphere1); // names of shapes + +diameters (0.004); // diameter of shapes + +materials (prop1); // material names for shapes ``` -Other settings for the simulation can be set in file `settings/settingsDict`. +### Simulation Domain and Boundaries -
-in settings/settingsDict file -
- -```C++ -run rotatingDrumSmall; - -dt 0.00001; // time step for integration (s) - -startTime 0; // start time for simulation - -endTime 10; // end time for simulation - -saveInterval 0.1; // time interval for saving the simulation - -timePrecision 6; // maximum number of digits for time folder - -g (0 -9.8 0); // gravity vector (m/s2) - -includeObjects (diameter); // save necessary (i.e., required) data on disk - -// exclude unnecessary data from saving on disk -excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); - -integrationMethod AdamsBashforth2; // integration method - -writeFormat ascii; // data writting format (ascii or binary) - -timersReport Yes; // report timers (Yes or No) - -timersReportInterval 0.01; // time interval for reporting timers -``` - -The dictionary `settings/domainDict` defines the a rectangular bounding box with two corner points for the simulation. Each particle that gets out of this box, will be deleted automatically. +The file `settings/domainDict` defines a rectangular bounding box with boundaries. Particles that exit this box are automatically deleted.
in settings/domainDict file @@ -295,52 +277,116 @@ in settings/domainDict file // Simulation domain: every particles that goes outside this domain will be deleted globalBox { - min (-0.12 -0.12 0.00); // lower corner point of the box + 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 + max (0.12 0.12 0.11); // upper corner point of the box } boundaries { left { - type exit; // other options: periodic, reflective + type exit; // other options: periodic, reflective } right { - type exit; // other options: periodic, reflective + type exit; // other options: periodic, reflective } bottom { - type exit; // other options: periodic, reflective + type exit; // other options: periodic, reflective } top { - type exit; // other options: periodic, reflective + type exit; // other options: periodic, reflective } rear { - type exit; // other options: periodic, reflective + type exit; // other options: periodic, reflective } front { - type exit; // other options: periodic, reflective + type exit; // other options: periodic, reflective } } ``` +### Other Settings -## Running the case -The solver for this simulation is `sphereGranFlow`. Enter the following command in the terminal. Depending on the computational power, it may take a few minutes to a few hours to complete. +Additional parameters for the simulation are set in `settings/settingsDict`, including timestep, start and end times, saving intervals, and gravity: -`> sphereGranFlow` +
+in settings/settingsDict file +
-## Post processing -After finishing the simulation, you can render the results in Paraview. To convert the results to VTK format, just enter the following command in the terminal. This will converts all the results (particles and geometry) to VTK format and store them in folder `VTK/`. +```C++ +dt 0.00001; // time step for integration (s) -`> pFlowToVTK --binary` +startTime 0; // start time for simulation + +endTime 10; // end time for simulation + +saveInterval 0.1; // time interval for saving the simulation + +timePrecision 6; // maximum number of digits for time folder + +g (0 -9.8 0); // gravity vector (m/s2) + +includeObjects (diameter); // save necessary (i.e., required) data on disk + +// exclude unnecessary data from saving on disk +excludeObjects (); + +integrationMethod AdamsBashforth2; // integration method + +integrationHistory off; // to save space on disk + +writeFormat ascii; // data writing format (ascii or binary) + +timersReport Yes; // report timers (Yes or No) +``` + +## Running the Case + +To execute the simulation, follow these steps in order: + +1. Create the geometry: + +``` +geometryPhasicFlow +``` + +2. Create the initial particle fields: + +``` +particlesPhasicFlow +``` + +3. Run the simulation: + +``` +sphereGranFlow +``` + +Depending on your computational resources, the simulation may take from a few minutes to several hours to complete. + +## Post Processing + +After the simulation completes, you can visualize the results in ParaView by converting them to VTK format: + +``` +pFlowToVTK --binary +``` + +This command converts all simulation results (particles and geometry) to VTK format and stores them in a `VTK/` folder. You can then open these files in ParaView for detailed analysis and visualization. + +For more specific field output, you can specify fields: + +``` +pFlowToVTK --binary --fields diameter velocity id +``` diff --git a/tutorials/sphereGranFlow/rotatingDrumSmall/caseSetup/interaction b/tutorials/sphereGranFlow/rotatingDrumSmall/caseSetup/interaction index 2713ed01..1adca27f 100755 --- a/tutorials/sphereGranFlow/rotatingDrumSmall/caseSetup/interaction +++ b/tutorials/sphereGranFlow/rotatingDrumSmall/caseSetup/interaction @@ -6,6 +6,7 @@ objectName interaction; objectType dicrionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ + materials (prop1); // a list of materials names densities (1000.0); // density of materials [kg/m3] @@ -15,33 +16,33 @@ contactListType sortedContactList; contactSearch { - method NBS; // method for broad search - - updateInterval 10; + method NBS; // method for broad search - sizeRatio 1.1; + updateInterval 10; - cellExtent 0.55; + sizeRatio 1.1; - adjustableBox Yes; + cellExtent 0.55; + + adjustableBox Yes; } model { - contactForceModel nonLinearNonLimited; + contactForceModel nonLinearNonLimited; - rollingFrictionModel normal; + rollingFrictionModel normal; - Yeff (1.0e6); // Young modulus [Pa] + Yeff (1.0e6); // Young modulus [Pa] - Geff (0.8e6); // Shear modulus [Pa] + 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 - 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/rotatingDrumSmall/caseSetup/particleInsertion b/tutorials/sphereGranFlow/rotatingDrumSmall/caseSetup/particleInsertion deleted file mode 100755 index cabe23da..00000000 --- a/tutorials/sphereGranFlow/rotatingDrumSmall/caseSetup/particleInsertion +++ /dev/null @@ -1,13 +0,0 @@ -/* -------------------------------*- C++ -*--------------------------------- *\ -| phasicFlow File | -| copyright: www.cemf.ir | -\* ------------------------------------------------------------------------- */ -objectName particleInsertion; -objectType dicrionary; -fileFormat ASCII; -/*---------------------------------------------------------------------------*/ -active No; // is insertion active -> Yes or No - -collisionCheck No; // is checked -> Yes or No - - diff --git a/tutorials/sphereGranFlow/rotatingDrumSmall/caseSetup/shapes b/tutorials/sphereGranFlow/rotatingDrumSmall/caseSetup/shapes index 30ddfb1c..25d23a36 100755 --- a/tutorials/sphereGranFlow/rotatingDrumSmall/caseSetup/shapes +++ b/tutorials/sphereGranFlow/rotatingDrumSmall/caseSetup/shapes @@ -2,12 +2,12 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName sphereDict; -objectType sphereShape; +objectName sphereDict; +objectType sphereShape; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -names (sphere1); // names of shapes +names (sphere1); // names of shapes -diameters (0.004); // diameter of shapes +diameters (0.004); // diameter of shapes -materials (prop1); // material names for shapes +materials (prop1); // material names for shapes diff --git a/tutorials/sphereGranFlow/rotatingDrumSmall/settings/domainDict b/tutorials/sphereGranFlow/rotatingDrumSmall/settings/domainDict index 730402bc..563cd80d 100755 --- a/tutorials/sphereGranFlow/rotatingDrumSmall/settings/domainDict +++ b/tutorials/sphereGranFlow/rotatingDrumSmall/settings/domainDict @@ -2,46 +2,48 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName domainDict; -objectType dictionary; +objectName domainDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ -globalBox // Simulation domain: every particles that goes outside this domain will be deleted -{ - 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 +// Simulation domain: every particles that goes outside this domain will be deleted +globalBox +{ + 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 } boundaries { - left - { - type exit; // other options: periodict, reflective - } + left + { + type exit; // other options: periodic, reflective + } - right - { - type exit; // other options: periodict, reflective - } + right + { + type exit; // other options: periodic, reflective + } - bottom - { - type exit; // other options: periodict, reflective - } + bottom + { + type exit; // other options: periodic, reflective + } - top - { - type exit; // other options: periodict, reflective - } + top + { + type exit; // other options: periodic, reflective + } - rear - { - type exit; // other options: periodict, reflective - } + rear + { + type exit; // other options: periodic, reflective + } - front - { - type exit; // other options: periodict, reflective - } + front + { + type exit; // other options: periodic, reflective + } } diff --git a/tutorials/sphereGranFlow/rotatingDrumSmall/settings/geometryDict b/tutorials/sphereGranFlow/rotatingDrumSmall/settings/geometryDict index d1a55c1f..763a56be 100644 --- a/tutorials/sphereGranFlow/rotatingDrumSmall/settings/geometryDict +++ b/tutorials/sphereGranFlow/rotatingDrumSmall/settings/geometryDict @@ -6,6 +6,7 @@ objectName geometryDict; objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ + motionModel rotatingAxis; rotatingAxisInfo // information for rotatingAxisMotion motion model @@ -25,7 +26,6 @@ surfaces /* A cylinder with begin and end radii 0.12 m and axis points at (0 0 0) and (0 0 0.1) */ - cylinder { type cylinderWall; // type of the wall @@ -48,7 +48,6 @@ surfaces /* This is a plane wall at the rear end of cylinder */ - wall1 { type planeWall; // type of the wall @@ -69,7 +68,6 @@ surfaces /* This is a plane wall at the front end of cylinder */ - wall2 { type planeWall; // type of the wall diff --git a/tutorials/sphereGranFlow/rotatingDrumSmall/settings/particlesDict b/tutorials/sphereGranFlow/rotatingDrumSmall/settings/particlesDict index 23d4af07..f9cb7773 100644 --- a/tutorials/sphereGranFlow/rotatingDrumSmall/settings/particlesDict +++ b/tutorials/sphereGranFlow/rotatingDrumSmall/settings/particlesDict @@ -2,58 +2,55 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName particlesDict; -objectType dictionary; +objectName particlesDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ setFields { - /* - Default value for fields defined for particles + /* + Default value for fields defined for particles + These fields should always be defined for simulations with + spherical particles. + */ + defaultValue + { + velocity realx3 (0 0 0); // linear velocity (m/s) - These fields should always be defined for simulations with + acceleration realx3 (0 0 0); // linear acceleration (m/s2) - spherical particles. - */ + rVelocity realx3 (0 0 0); // rotational velocity (rad/s) - defaultValue - { - velocity realx3 (0 0 0); // linear velocity (m/s) + shapeName word sphere1; // name of the particle shape + } - acceleration realx3 (0 0 0); // linear acceleration (m/s2) + selectors + { - rVelocity realx3 (0 0 0); // rotational velocity (rad/s) - - shapeName word sphere1; // name of the particle shape - } - - selectors - { - - } + } } positionParticles // positions particles { - method ordered; // other options: random and empty + method ordered; // other options: random and empty - mortonSorting Yes; // perform initial sorting based on morton code? + mortonSorting Yes; // perform initial sorting based on morton code? - orderedInfo - { - diameter 0.004; // minimum space between centers of particles + orderedInfo + { + distance 0.004; // minimum distance between particles centers - numPoints 30000; // number of particles in the simulation + numPoints 30000; // number of particles in the simulation - axisOrder (z y x); // axis order for filling the space with particles - } + axisOrder (z y x); // axis order for filling the space with particles + } - regionType box; // other options: cylinder and sphere + regionType box; // other options: cylinder and sphere - boxInfo // box information for positioning particles - { - min (-0.08 -0.08 0.015); // lower corner point of the box + boxInfo // box information 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 - } + max ( 0.08 0.08 0.098); // upper corner point of the box + } } diff --git a/tutorials/sphereGranFlow/rotatingDrumSmall/settings/settingsDict b/tutorials/sphereGranFlow/rotatingDrumSmall/settings/settingsDict index 796e1a1a..226a918d 100644 --- a/tutorials/sphereGranFlow/rotatingDrumSmall/settings/settingsDict +++ b/tutorials/sphereGranFlow/rotatingDrumSmall/settings/settingsDict @@ -2,33 +2,36 @@ | phasicFlow File | | copyright: www.cemf.ir | \* ------------------------------------------------------------------------- */ -objectName settingsDict; -objectType dictionary; +objectName settingsDict; +objectType dictionary; fileFormat ASCII; /*---------------------------------------------------------------------------*/ + run rotatingDrumSmall; -dt 0.00001; // time step for integration (s) +dt 0.00001; // time step for integration (s) -startTime 0; // start time for simulation +startTime 0; // start time for simulation -endTime 10; // end time for simulation +endTime 10; // end time for simulation -saveInterval 0.1; // time interval for saving the simulation +saveInterval 0.1; // time interval for saving the simulation -timePrecision 6; // maximum number of digits for time folder +timePrecision 6; // maximum number of digits for time folder -g (0 -9.8 0); // gravity vector (m/s2) +g (0 -9.8 0); // gravity vector (m/s2) includeObjects (diameter); // save necessary (i.e., required) data on disk // exclude unnecessary data from saving on disk excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); -integrationMethod AdamsBashforth2; // integration method +integrationMethod AdamsBashforth2; // integration method -writeFormat ascii; // data writting format (ascii or binary) +integrationHistory off; -timersReport Yes; // report timers (Yes or No) +writeFormat ascii; // data writting format (ascii or binary) -timersReportInterval 0.01; // time interval for reporting timers +timersReport Yes; // report timers (Yes or No) + +timersReportInterval 0.01; // time interval for reporting timers diff --git a/tutorials/sphereGranFlow/toteBlender/settings/particlesDict b/tutorials/sphereGranFlow/toteBlender/settings/particlesDict index ebb66d3d..7a80fe95 100644 --- a/tutorials/sphereGranFlow/toteBlender/settings/particlesDict +++ b/tutorials/sphereGranFlow/toteBlender/settings/particlesDict @@ -38,7 +38,7 @@ positionParticles orderedInfo { - diameter 0.005; // minimum space between centers of particles + distance 0.005; // minimum distance between particles centers numPoints 24000; // number of particles in the simulation