Compare commits
23 Commits
9f489d07cc
...
fd45625ce6
Author | SHA1 | Date |
---|---|---|
|
fd45625ce6 | |
|
3e0161a20f | |
|
98c8116fd3 | |
|
fa1211acf8 | |
|
12059faefc | |
|
3954fcf4ab | |
|
354daab7c5 | |
|
ed4fe6f2f5 | |
|
2a8146c43f | |
|
fd6b3ebc60 | |
|
8e13c377eb | |
|
5e272cfa1b | |
|
252725863f | |
|
bd4e566dc2 | |
|
0532c441a8 | |
|
3c1d4d57ad | |
|
ff2f1d41e8 | |
|
774afd5f37 | |
|
191801b344 | |
|
545de300ae | |
|
9b3c4f83b9 | |
|
b315d12357 | |
|
7e7184f1c5 |
|
@ -3,30 +3,17 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
||||||
# set the project name and version
|
# set the project name and version
|
||||||
project(phasicFlow VERSION 1.0 )
|
project(phasicFlow VERSION 1.0 )
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE)
|
set(CMAKE_CXX_STANDARD 20 CACHE STRING "" FORCE)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
set(CMAKE_INSTALL_PREFIX ${phasicFlow_SOURCE_DIR} CACHE PATH "Install path of phasicFlow" FORCE)
|
set(CMAKE_INSTALL_PREFIX ${phasicFlow_SOURCE_DIR} CACHE PATH "Install path of phasicFlow" FORCE)
|
||||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "build type" FORCE)
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "build type")
|
||||||
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build using shared libraries" FORCE)
|
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build using shared libraries" FORCE)
|
||||||
mark_as_advanced(FORCE var BUILD_SHARED_LIBS)
|
mark_as_advanced(FORCE var BUILD_SHARED_LIBS)
|
||||||
|
|
||||||
message(STATUS ${CMAKE_INSTALL_PREFIX})
|
message(STATUS "Install prefix is:" ${CMAKE_INSTALL_PREFIX})
|
||||||
|
|
||||||
include(cmake/globals.cmake)
|
include(cmake/globals.cmake)
|
||||||
|
|
||||||
#Kokkos directory to be included
|
|
||||||
set(Kokkos_Source_DIR)
|
|
||||||
|
|
||||||
if(DEFINED ENV{Kokkos_DIR})
|
|
||||||
set(Kokkos_Source_DIR $ENV{Kokkos_DIR})
|
|
||||||
else()
|
|
||||||
set(Kokkos_Source_DIR $ENV{HOME}/Kokkos/kokkos)
|
|
||||||
endif()
|
|
||||||
message(STATUS "Kokkos source directory is ${Kokkos_Source_DIR}")
|
|
||||||
add_subdirectory(${Kokkos_Source_DIR} ./kokkos)
|
|
||||||
Kokkos_cmake_settings()
|
|
||||||
|
|
||||||
|
|
||||||
option(pFlow_STD_Parallel_Alg "Use TTB std parallel algorithms" ON)
|
option(pFlow_STD_Parallel_Alg "Use TTB std parallel algorithms" ON)
|
||||||
option(pFlow_Build_Serial "Build phasicFlow and backends for serial execution" OFF)
|
option(pFlow_Build_Serial "Build phasicFlow and backends for serial execution" OFF)
|
||||||
option(pFlow_Build_OpenMP "Build phasicFlow and backends for OpenMP execution" OFF)
|
option(pFlow_Build_OpenMP "Build phasicFlow and backends for OpenMP execution" OFF)
|
||||||
|
@ -34,6 +21,8 @@ option(pFlow_Build_Cuda "Build phasicFlow and backends for Cuda execution" OFF
|
||||||
option(pFlow_Build_Double "Build phasicFlow with double precision floating-oint variables" ON)
|
option(pFlow_Build_Double "Build phasicFlow with double precision floating-oint variables" ON)
|
||||||
option(pFlow_Build_MPI "Build for MPI parallelization. This will enable multi-gpu run, CPU run on clusters (distributed memory machine). Use this combination Cuda+MPI, OpenMP + MPI or Serial+MPI " OFF)
|
option(pFlow_Build_MPI "Build for MPI parallelization. This will enable multi-gpu run, CPU run on clusters (distributed memory machine). Use this combination Cuda+MPI, OpenMP + MPI or Serial+MPI " OFF)
|
||||||
|
|
||||||
|
#for installing the required packages
|
||||||
|
include(cmake/preReq.cmake)
|
||||||
|
|
||||||
if(pFlow_Build_Serial)
|
if(pFlow_Build_Serial)
|
||||||
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE)
|
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE)
|
||||||
|
@ -46,7 +35,8 @@ elseif(pFlow_Build_OpenMP )
|
||||||
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "OpenMP execution" FORCE)
|
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "OpenMP execution" FORCE)
|
||||||
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "Cuda execution" FORCE)
|
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "Cuda execution" FORCE)
|
||||||
set(Kokkos_ENABLE_CUDA_LAMBDA OFF CACHE BOOL "Cuda execution" FORCE)
|
set(Kokkos_ENABLE_CUDA_LAMBDA OFF CACHE BOOL "Cuda execution" FORCE)
|
||||||
set(Kokkos_DEFAULT_HOST_PARALLEL_EXECUTION_SPACE SERIAL CACHE STRING "" FORCE)
|
set(Kokkos_DEFAULT_HOST_PARALLEL_EXECUTION_SPACE Serial CACHE STRING "" FORCE)
|
||||||
|
set(Kokkos_DEFAULT_DEVICE_PARALLEL_EXECUTION_SPACE OpenMP CACHE STRING "" FORCE)
|
||||||
set(Kokkos_ENABLE_CUDA_CONSTEXPR OFF CACHE BOOL "Enable constexpr on cuda code" FORCE)
|
set(Kokkos_ENABLE_CUDA_CONSTEXPR OFF CACHE BOOL "Enable constexpr on cuda code" FORCE)
|
||||||
elseif(pFlow_Build_Cuda)
|
elseif(pFlow_Build_Cuda)
|
||||||
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE)
|
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE)
|
||||||
|
@ -65,6 +55,7 @@ include(cmake/makeExecutableGlobals.cmake)
|
||||||
|
|
||||||
configure_file(phasicFlowConfig.H.in phasicFlowConfig.H)
|
configure_file(phasicFlowConfig.H.in phasicFlowConfig.H)
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
#add a global include directory
|
#add a global include directory
|
||||||
include_directories(src/setHelpers src/demComponent "${PROJECT_BINARY_DIR}")
|
include_directories(src/setHelpers src/demComponent "${PROJECT_BINARY_DIR}")
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
if(pFlow_STD_Parallel_Alg)
|
||||||
|
# Check if libtbb-dev is installed
|
||||||
|
execute_process(
|
||||||
|
COMMAND dpkg -s libtbb-dev
|
||||||
|
RESULT_VARIABLE TBB_IS_INSTALLED
|
||||||
|
OUTPUT_QUIET
|
||||||
|
ERROR_QUIET)
|
||||||
|
|
||||||
|
if(NOT TBB_IS_INSTALLED EQUAL 0)
|
||||||
|
message(STATUS "libtbb-dev not found. Installing libtbb-dev...")
|
||||||
|
execute_process(
|
||||||
|
COMMAND sudo apt-get update
|
||||||
|
COMMAND sudo apt-get install -y libtbb-dev
|
||||||
|
RESULT_VARIABLE TBB_INSTALL_RESULT)
|
||||||
|
|
||||||
|
if(NOT TBB_INSTALL_RESULT EQUAL 0)
|
||||||
|
message(FATAL_ERROR "Failed to install libtbb-dev")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(STATUS "libtbb-dev is already installed.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# Kokkos folder creation
|
||||||
|
set(Kokkos_Source_DIR $ENV{HOME}/Kokkos/kokkos)
|
||||||
|
|
||||||
|
if(NOT EXISTS "${Kokkos_Source_DIR}/CMakeLists.txt")
|
||||||
|
|
||||||
|
# Check CMake version and set policy CMP0169 if CMake version is 3.30 or higher
|
||||||
|
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.30")
|
||||||
|
cmake_policy(SET CMP0169 OLD)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
kokkos
|
||||||
|
GIT_REPOSITORY https://github.com/kokkos/kokkos.git
|
||||||
|
GIT_TAG 4.3.01
|
||||||
|
)
|
||||||
|
|
||||||
|
FetchContent_GetProperties(kokkos)
|
||||||
|
if(NOT kokkos_POPULATED)
|
||||||
|
message(STATUS "Kokkos source directory not found. Downloading Kokkos version 4.3.01 ...")
|
||||||
|
FetchContent_Populate(kokkos)
|
||||||
|
set(Kokkos_Source_DIR ${kokkos_SOURCE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "Kokkos source directory is ${Kokkos_Source_DIR}")
|
||||||
|
add_subdirectory(${Kokkos_Source_DIR} ./kokkos)
|
||||||
|
#Kokkos_cmake_settings()
|
||||||
|
|
|
@ -74,7 +74,7 @@ pFlow::initialize_pFlowProcessors();
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
//Ping;
|
||||||
if(! sphInsertion.insertParticles(
|
if(! sphInsertion.insertParticles(
|
||||||
Control.time().currentIter(),
|
Control.time().currentIter(),
|
||||||
Control.time().currentTime(),
|
Control.time().currentTime(),
|
||||||
|
@ -84,27 +84,31 @@ pFlow::initialize_pFlowProcessors();
|
||||||
"particle insertion failed in sphereDFlow solver.\n";
|
"particle insertion failed in sphereDFlow solver.\n";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set force to zero
|
// set force to zero
|
||||||
surfGeometry.beforeIteration();
|
surfGeometry.beforeIteration();
|
||||||
|
|
||||||
// set force to zero, predict, particle deletion and etc.
|
// set force to zero, predict, particle deletion and etc.
|
||||||
sphParticles.beforeIteration();
|
sphParticles.beforeIteration();
|
||||||
|
//Ping;
|
||||||
sphInteraction.beforeIteration();
|
sphInteraction.beforeIteration();
|
||||||
|
|
||||||
sphInteraction.iterate();
|
sphInteraction.iterate();
|
||||||
|
|
||||||
surfGeometry.iterate();
|
surfGeometry.iterate();
|
||||||
|
|
||||||
|
//Ping;
|
||||||
sphParticles.iterate();
|
sphParticles.iterate();
|
||||||
|
|
||||||
|
//Ping;
|
||||||
sphInteraction.afterIteration();
|
sphInteraction.afterIteration();
|
||||||
|
|
||||||
|
//Ping;
|
||||||
surfGeometry.afterIteration();
|
surfGeometry.afterIteration();
|
||||||
|
|
||||||
|
//Ping;
|
||||||
sphParticles.afterIteration();
|
sphParticles.afterIteration();
|
||||||
|
//Ping;
|
||||||
|
|
||||||
}while(Control++);
|
}while(Control++);
|
||||||
|
|
||||||
|
|
|
@ -35,10 +35,14 @@ pFlow::globalDamping::globalDamping(const systemControl& control)
|
||||||
performDamping_ = !equal(dampingFactor_, static_cast<real>(1.0));
|
performDamping_ = !equal(dampingFactor_, static_cast<real>(1.0));
|
||||||
|
|
||||||
if( performDamping_ )
|
if( performDamping_ )
|
||||||
REPORT(2)<<"Global damping "<<Yellow_Text("is active")<<
|
{
|
||||||
" and damping factor is "<<dampingFactor_<<END_REPORT;
|
REPORT(2)<<"Global damping "<<Yellow_Text("is active")<<
|
||||||
else
|
" and damping factor is "<<dampingFactor_<<END_REPORT;
|
||||||
REPORT(2)<<"Global damping "<<Yellow_Text("is not active")<<"."<<END_REPORT;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
REPORT(2)<<"Global damping "<<Yellow_Text("is not active")<<"."<<END_REPORT;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ Licence:
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#include "types.hpp"
|
#include "types.hpp"
|
||||||
|
#include "iOstream.hpp"
|
||||||
|
|
||||||
namespace pFlow
|
namespace pFlow
|
||||||
{
|
{
|
||||||
|
@ -34,6 +35,20 @@ using Set = std::set<Key,std::less<Key>,std::allocator<Key>>;
|
||||||
|
|
||||||
using wordSet = Set<word>;
|
using wordSet = Set<word>;
|
||||||
|
|
||||||
|
template<typename key>
|
||||||
|
iOstream& operator<<(iOstream& os, const Set<key>& s)
|
||||||
|
{
|
||||||
|
os << beginListToken();
|
||||||
|
for(auto elm = s.begin(); elm!=s.end(); )
|
||||||
|
{
|
||||||
|
os<< *elm++;
|
||||||
|
if( elm!=s.end() )
|
||||||
|
os<<spaceToken();
|
||||||
|
}
|
||||||
|
os<< endListToken();
|
||||||
|
os.check(FUNCTION_NAME);
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,8 @@ bool pFlow::systemControl::readIncludeExclue(const dictionary& dict)
|
||||||
includeList_.insert(nm);
|
includeList_.insert(nm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
REPORT(1)<<"IncludeObject list is: "<<Green_Text(includeList_)<<END_REPORT;
|
||||||
|
|
||||||
if (dict.containsDataEntry("excludeObjects"))
|
if (dict.containsDataEntry("excludeObjects"))
|
||||||
{
|
{
|
||||||
|
@ -44,6 +46,8 @@ bool pFlow::systemControl::readIncludeExclue(const dictionary& dict)
|
||||||
excludeList_.insert(nm);
|
excludeList_.insert(nm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
REPORT(1)<<"excludeObject list is: "<<Green_Text(excludeList_)<<END_REPORT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Problem Definition
|
# Problem Definition
|
||||||
The problem is to simulate a Rotary Air-Lock Valve. The external diameter of rotor is about 21 cm. There is one type of particle in this simulation. Particles are inserted into the inlet of the valve from t=**0** s.
|
The problem is to simulate a Rotary Air-Lock Valve. The external diameter of rotor is about 21 cm. There is one type of particle in this simulation. Particles are inserted into the inlet of the valve from t=**0** s.
|
||||||
* **28000** particles with **5 mm** diameter are inserted into the valve with the rate of **4000 particles/s**.
|
* **28000** particles with **5 mm** diameter are inserted into the valve with the rate of **4000 particles/s**.
|
||||||
* The rotor starts its ortation at t = 1.25 s at the rate of 2.1 rad/s.
|
* The rotor starts its rotation at t = 1.25 s at the rate of 2.1 rad/s.
|
||||||
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
@ -206,4 +206,4 @@ To perform simulations, enter the following commands one after another in the te
|
||||||
Enter `$ particlesPhasicFlow` command to create the initial fields for particles (here the simulaiton has no particle at the beginning).
|
Enter `$ particlesPhasicFlow` command to create the initial fields for particles (here the simulaiton has no particle at the beginning).
|
||||||
Enter `$ geometryPhasicFlow` command to create the geometry.
|
Enter `$ geometryPhasicFlow` command to create the geometry.
|
||||||
At last, enter `$ sphereGranFlow` command to start the simulation.
|
At last, enter `$ sphereGranFlow` command to start the simulation.
|
||||||
After finishing the simulation, you can use `$ pFlowtoVTK` to convert the results into vtk format stored in ./VTK folder.
|
After finishing the simulation, you can use `$ pFlowtoVTK` to convert the results into vtk format stored in ./VTK folder.
|
|
@ -43,19 +43,19 @@ model
|
||||||
Geff (0.8e6 0.8e6 // Shear modulus [Pa]
|
Geff (0.8e6 0.8e6 // Shear modulus [Pa]
|
||||||
0.8e6);
|
0.8e6);
|
||||||
|
|
||||||
nu (0.25 0.25 // Poisson's ratio [-]
|
nu (0.25 0.25 // Poisson's ratio [-]
|
||||||
0.25);
|
0.25);
|
||||||
|
|
||||||
en (0.7 0.8 // coefficient of normal restitution
|
en (0.70 0.80 // coefficient of normal restitution
|
||||||
1.0);
|
1.0);
|
||||||
|
|
||||||
et (1.0 1.0 // coefficient of tangential restitution
|
et (1.0 1.0 // coefficient of tangential restitution
|
||||||
1.0);
|
1.0);
|
||||||
|
|
||||||
mu (0.3 0.35 // dynamic friction
|
mu (0.3 0.35 // dynamic friction
|
||||||
0.35);
|
0.35);
|
||||||
|
|
||||||
mur (0.1 0.1 // rolling friction
|
mur (0.1 0.1 // rolling friction
|
||||||
0.1);
|
0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ objectName particleInsertion;
|
||||||
objectType dicrionary;
|
objectType dicrionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
active yes; // is insertion active -> yes or no
|
active yes; // is insertion active -> yes or no
|
||||||
|
|
||||||
checkForCollision No; // is checked -> yes or no
|
checkForCollision No; // is checked -> yes or no
|
||||||
|
|
||||||
|
|
|
@ -6,34 +6,31 @@ objectName geometryDict;
|
||||||
objectType dictionary;
|
objectType dictionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
run rotatingValve;
|
run rotatingAirLockValve;
|
||||||
|
|
||||||
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 7; // end time for simulation
|
endTime 7; // end time for simulation
|
||||||
|
|
||||||
saveInterval 0.05; // time interval for saving the simulation
|
saveInterval 0.05; // time interval for saving the simulation
|
||||||
|
|
||||||
timePrecision 6; // maximum number of digits for time folder
|
timePrecision 5; // 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
|
||||||
Simulation domain every particles that goes outside this domain is deleted
|
includeObjects (diameter mass);
|
||||||
*/
|
|
||||||
|
|
||||||
includeObjects (diameter); // save necessary (i.e., required) data on disk
|
|
||||||
|
|
||||||
// exclude unnecessary data from saving on disk
|
// exclude unnecessary data from saving on disk
|
||||||
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
|
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
|
||||||
|
|
||||||
integrationMethod AdamsBashforth2; // integration method
|
integrationMethod AdamsBashforth2;
|
||||||
|
|
||||||
writeFormat ascii; // data writting format (ascii or binary)
|
writeFormat ascii; // data writting format (ascii or binary)
|
||||||
|
|
||||||
timersReport Yes; // report timers: Yes or No
|
timersReport Yes; // report timers: Yes or No
|
||||||
|
|
||||||
timersReportInterval 0.01; // time interval for reporting timers
|
timersReportInterval 0.1; // time interval for reporting timers
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ in <b>caseSetup/sphereShape</b> file
|
||||||
|
|
||||||
```C++
|
```C++
|
||||||
names (smallSphere largeSphere); // names of shapes
|
names (smallSphere largeSphere); // names of shapes
|
||||||
diameters (0.003 0.005); // diameter of shapes (m)
|
diameters (0.003 0.005); // diameter of shapes (m)
|
||||||
materials (prop1 prop1); // material names for shapes
|
materials (prop1 prop1); // material names for shapes
|
||||||
```
|
```
|
||||||
### Positioning and initial mixture
|
### Positioning and initial mixture
|
||||||
|
|
||||||
|
@ -44,18 +44,17 @@ in <b>settings/particlesDict</b> file
|
||||||
// positions particles
|
// positions particles
|
||||||
positionParticles
|
positionParticles
|
||||||
{
|
{
|
||||||
method ordered; // other options: random or empty
|
method ordered; // other options: random or empty
|
||||||
|
|
||||||
orderedInfo
|
orderedInfo
|
||||||
{
|
{
|
||||||
diameter 0.005; // minimum space between centers of particles
|
diameter 0.005; // minimum space between centers of particles
|
||||||
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
|
axisOrder (z x y); // axis order for filling the space with particles
|
||||||
}
|
}
|
||||||
|
|
||||||
regionType cylinder; // other options: box and sphere
|
regionType cylinder; // other options: box and sphere
|
||||||
|
|
||||||
cylinder // cylinder region for positioning particles
|
cylinder // cylinder region for positioning particles
|
||||||
{
|
{
|
||||||
p1 (0.0 0.0 0.003); // begin point of cylinder axis (m m m)
|
p1 (0.0 0.0 0.003); // begin point of cylinder axis (m m m)
|
||||||
p2 (0.0 0.0 0.097); // end point of cylinder axis (m m m)
|
p2 (0.0 0.0 0.097); // end point of cylinder axis (m m m)
|
||||||
|
@ -76,9 +75,9 @@ setFields
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Default value for fields defined for particles
|
Default value for fields defined for particles
|
||||||
These fields should always be defined for simulations with
|
These fields should always be defined for simulations with
|
||||||
spherical particles.
|
spherical particles.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
defaultValue
|
defaultValue
|
||||||
{
|
{
|
||||||
|
@ -87,20 +86,21 @@ setFields
|
||||||
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
rotVelocity 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
|
selectors
|
||||||
{
|
{
|
||||||
shapeAssigne
|
shapeAssigne
|
||||||
{
|
{
|
||||||
selector stridedRange; // other options: box, cylinder, sphere, randomPoints
|
selector stridedRange; // other options: box, cylinder, sphere, randomPoints
|
||||||
|
|
||||||
stridedRangeInfo
|
stridedRangeInfo
|
||||||
{
|
{
|
||||||
begin 0; // begin index of points
|
begin 0; // begin index of points
|
||||||
end 30000; // end index of points
|
end 30000; // end index of points
|
||||||
stride 3; // stride for selector
|
stride 3; // stride for selector
|
||||||
}
|
}
|
||||||
fieldValue // fields that the selector is applied to
|
|
||||||
|
fieldValue // fields that the selector is applied to
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
sets shapeName of the selected points to largeSphere
|
sets shapeName of the selected points to largeSphere
|
||||||
|
@ -139,4 +139,4 @@ Options:
|
||||||
--setFields-only Exectue the setFields part only. Read the pointStructure from time folder and setFields and save the result in the same time folder.
|
--setFields-only Exectue the setFields part only. Read the pointStructure from time folder and setFields and save the result in the same time folder.
|
||||||
```
|
```
|
||||||
|
|
||||||
so, with flag `--setFields-only`, you can execute the `setFields` part of `particlesDict`. Now suppose that you have a simulation case which proceeded up to 2 seconds and for any reason you want to change some field value at time 3 s and continue the simulation from 3 s. To this end, you need to change `startTime` in settings dictionary to 3, execute `particlesPhasicFlow --setFields-only`, and start the simulation.
|
so, with flag `--setFields-only`, you can execute the `setFields` part of `particlesDict`. Now suppose that you have a simulation case which proceeded up to 2 seconds and for any reason you want to change some field value at time 3 s and continue the simulation from 3 s. To this end, you need to change `startTime` in settings dictionary to 3, execute `particlesPhasicFlow --setFields-only`, and start the simulation.
|
|
@ -6,9 +6,9 @@ objectName interaction;
|
||||||
objectType dicrionary;
|
objectType dicrionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
materials (prop1); // properties of material
|
materials (prop1); // properties of material
|
||||||
|
|
||||||
densities (1000.0); // density of materials [kg/m3]
|
densities (1000.0); // density of materials [kg/m3]
|
||||||
|
|
||||||
contactListType sortedContactList;
|
contactListType sortedContactList;
|
||||||
|
|
||||||
|
@ -38,14 +38,14 @@ model
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
et (1.0); // coefficient of tangential restitution
|
et (1.0); // coefficient of tangential restitution
|
||||||
|
|
||||||
mu (0.3); // dynamic friction
|
mu (0.3); // dynamic friction
|
||||||
|
|
||||||
mur (0.1); // rolling friction
|
mur (0.1); // rolling friction
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,19 +26,19 @@ surfaces
|
||||||
{
|
{
|
||||||
type cylinderWall; // other options: cuboidWall and planeWall
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -29,20 +29,20 @@ setFields
|
||||||
{
|
{
|
||||||
shapeAssigne
|
shapeAssigne
|
||||||
{
|
{
|
||||||
selector stridedRange; // other options: box, cylinder, sphere, randomPoints
|
selector stridedRange; // other options: box, cylinder, sphere, randomPoints
|
||||||
|
|
||||||
stridedRangeInfo
|
stridedRangeInfo
|
||||||
{
|
{
|
||||||
begin 0; // begin index of points
|
begin 0; // begin index of points
|
||||||
|
|
||||||
end 30000; // end index of points
|
end 30000; // end index of points
|
||||||
|
|
||||||
stride 3; // stride for selector
|
stride 3; // stride for selector
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldValue // fields that the selector is applied to
|
fieldValue // fields that the selector is applied to
|
||||||
{
|
{
|
||||||
shapeName word largeSphere; // sets shapeName of the selected points to largeSphere
|
shapeName word largeSphere; // sets shapeName of the selected points to largeSphere
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,13 +50,13 @@ setFields
|
||||||
|
|
||||||
positionParticles // positions particles
|
positionParticles // positions particles
|
||||||
{
|
{
|
||||||
method ordered; // other options: random and empty
|
method ordered; // other options: random and empty
|
||||||
|
|
||||||
orderedInfo
|
orderedInfo
|
||||||
{
|
{
|
||||||
diameter 0.005; // diameter of particles
|
diameter 0.005; // diameter of particles
|
||||||
|
|
||||||
numPoints 30000; // number of particles in the simulation
|
numPoints 30000; // number of particles in the simulation
|
||||||
|
|
||||||
axisOrder (z x y); // axis order for filling the space with particles
|
axisOrder (z x y); // axis order for filling the space with particles
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,6 @@ positionParticles // positions particles
|
||||||
|
|
||||||
p2 (0.0 0.0 0.097); // end point of cylinder axis
|
p2 (0.0 0.0 0.097); // end point of cylinder axis
|
||||||
|
|
||||||
radius 0.117; // radius of cylinder
|
radius 0.117; // radius of cylinder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,13 +16,13 @@ contactSearch
|
||||||
{
|
{
|
||||||
method NBS; // method for broad search particle-particle
|
method NBS; // method for broad search particle-particle
|
||||||
|
|
||||||
updateInterval 10;
|
updateInterval 10;
|
||||||
|
|
||||||
sizeRatio 1.1;
|
sizeRatio 1.1;
|
||||||
|
|
||||||
cellExtent 0.55;
|
cellExtent 0.55;
|
||||||
|
|
||||||
adjustableBox No;
|
adjustableBox No;
|
||||||
}
|
}
|
||||||
|
|
||||||
model
|
model
|
||||||
|
@ -46,25 +46,25 @@ model
|
||||||
0.8e6 0.8e6
|
0.8e6 0.8e6
|
||||||
0.8e6);
|
0.8e6);
|
||||||
|
|
||||||
nu (0.25 0.25 0.25 // Poisson's ratio [-]
|
nu (0.25 0.25 0.25 // Poisson's ratio [-]
|
||||||
0.25 0.25
|
0.25 0.25
|
||||||
0.25);
|
0.25);
|
||||||
|
|
||||||
en (0.97 0.97 0.85 // coefficient of normal restitution
|
en (0.97 0.97 0.85 // coefficient of normal restitution
|
||||||
0.97 0.85
|
0.97 0.85
|
||||||
1.00);
|
1.00);
|
||||||
|
|
||||||
et (1.0 1.0 1.0 // coefficient of tangential restitution
|
et (1.0 1.0 1.0 // coefficient of tangential restitution
|
||||||
1.0 1.0
|
1.0 1.0
|
||||||
1.0);
|
1.0);
|
||||||
|
|
||||||
mu (0.65 0.65 0.35 // dynamic friction
|
mu (0.65 0.65 0.35 // dynamic friction
|
||||||
0.65 0.35
|
0.65 0.35
|
||||||
0.35);
|
0.35);
|
||||||
|
|
||||||
mur (0.1 0.1 0.1 // rolling friction
|
mur (0.1 0.1 0.1 // rolling friction
|
||||||
0.1 0.1
|
0.1 0.1
|
||||||
0.1);
|
0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ objectName geometryDict;
|
||||||
objectType dictionary;
|
objectType dictionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
motionModel conveyorBelt; // motion model can be rotatingAxis or stationary or vibrating
|
motionModel conveyorBelt; // motion model can be rotatingAxis or stationary or vibrating
|
||||||
|
|
||||||
conveyorBeltInfo
|
conveyorBeltInfo
|
||||||
{
|
{
|
||||||
|
@ -54,17 +54,22 @@ surfaces
|
||||||
|
|
||||||
belt
|
belt
|
||||||
{
|
{
|
||||||
type stlWall; // type of the wall
|
type stlWall; // type of the wall
|
||||||
file belt.stl; // file name in stl folder
|
|
||||||
material wallMat; // material name of this wall
|
file belt.stl; // file name in stl folder
|
||||||
motion conveyorBelt1; // motion component name
|
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
|
||||||
|
motion conveyorBelt1; // motion component name
|
||||||
}
|
}
|
||||||
|
|
||||||
box
|
box
|
||||||
{
|
{
|
||||||
type stlWall; // type of the wall
|
type stlWall; // type of the wall
|
||||||
file box.stl; // file name in stl folder
|
|
||||||
material wallMat; // material name of this wall
|
file box.stl; // file name in stl folder
|
||||||
|
|
||||||
|
material wallMat; // material name of this wall
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Simulating a Simple Homogenization Silo Using Periodic Boundary
|
||||||
|
|
||||||
|
## Problem
|
||||||
|
A homogenization silo is used to mix particles inside a silo using the circulation of particles. A pneumatic conveying system 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).
|
||||||
|
|
||||||
|
<div align ="center">
|
||||||
|
<img src="./homoSilo.jpeg" style="width: 400px;">
|
||||||
|
|
||||||
|
<b>
|
||||||
|
|
||||||
|
A view of the homogenization silo
|
||||||
|
</b>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName interaction;
|
||||||
|
objectType dicrionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
materials (lightMat heavyMat wallMat); // a list of materials names
|
||||||
|
|
||||||
|
densities (1000 1500.0 2500); // density of materials [kg/m3]
|
||||||
|
|
||||||
|
contactListType sortedContactList;
|
||||||
|
|
||||||
|
contactSearch
|
||||||
|
{
|
||||||
|
method NBS; // method for broad search particle-particle
|
||||||
|
|
||||||
|
updateInterval 10;
|
||||||
|
|
||||||
|
sizeRatio 1.1;
|
||||||
|
|
||||||
|
cellExtent 0.55;
|
||||||
|
|
||||||
|
adjustableBox No;
|
||||||
|
}
|
||||||
|
|
||||||
|
model
|
||||||
|
{
|
||||||
|
contactForceModel nonLinearLimited;
|
||||||
|
|
||||||
|
rollingFrictionModel normal;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
Property (lightMat-lightMat lightMat-heavyMat lightMat-wallMat
|
||||||
|
heavyMat-heavyMat heavyMat-wallMat
|
||||||
|
wallMat-wallMat );
|
||||||
|
*/
|
||||||
|
|
||||||
|
Yeff (1.0e6 1.0e6 1.0e6 // Young modulus [Pa]
|
||||||
|
1.0e6 1.0e6
|
||||||
|
1.0e6);
|
||||||
|
|
||||||
|
Geff (0.8e6 0.8e6 0.8e6 // Shear modulus [Pa]
|
||||||
|
0.8e6 0.8e6
|
||||||
|
0.8e6);
|
||||||
|
|
||||||
|
nu (0.25 0.25 0.25 // Poisson's ratio [-]
|
||||||
|
0.25 0.25
|
||||||
|
0.25);
|
||||||
|
|
||||||
|
en (0.97 0.97 0.85 // coefficient of normal restitution
|
||||||
|
0.97 0.85
|
||||||
|
1.00);
|
||||||
|
|
||||||
|
mu (0.65 0.65 0.35 // dynamic friction
|
||||||
|
0.65 0.35
|
||||||
|
0.35);
|
||||||
|
|
||||||
|
mur (0.1 0.1 0.1 // rolling friction
|
||||||
|
0.1 0.1
|
||||||
|
0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,214 @@
|
||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particleInsertion;
|
||||||
|
objectType dicrionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
active Yes; // is insertion active -> yes or no
|
||||||
|
|
||||||
|
/*
|
||||||
|
six layers of particles are packed
|
||||||
|
*/
|
||||||
|
layer0
|
||||||
|
{
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
|
||||||
|
rate 5100; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
startTime 0; // (s)
|
||||||
|
|
||||||
|
endTime 0.5; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09; // radius of cylinder (m)
|
||||||
|
|
||||||
|
p1 (0.0 0.0 0.1); // (m,m,m)
|
||||||
|
|
||||||
|
p2 (0.0 0.0 0.11); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
parType1 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layer1
|
||||||
|
{
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
|
||||||
|
rate 5100; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
startTime 0.7; // (s)
|
||||||
|
|
||||||
|
endTime 1.2; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
|
|
||||||
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09;
|
||||||
|
p1 (0.0 0.0 0.16 ); // (m,m,m)
|
||||||
|
p2 (0.0 0.0 0.17); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
parType2 1; // only parType2
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layer2
|
||||||
|
{
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
|
||||||
|
rate 5100; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
startTime 1.4; // (s)
|
||||||
|
|
||||||
|
endTime 1.9; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09;
|
||||||
|
p1 ( 0.0 0.0 0.2 ); // (m,m,m)
|
||||||
|
p2 ( 0.0 0.0 0.21); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
parType1 1; // only parType1
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layer3
|
||||||
|
{
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
|
||||||
|
rate 5100; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
startTime 2.1; // (s)
|
||||||
|
|
||||||
|
endTime 2.6; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
|
|
||||||
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09;
|
||||||
|
p1 ( 0.0 0.0 0.28 ); // (m,m,m)
|
||||||
|
p2 ( 0.0 0.0 0.29); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
parType2 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layer4
|
||||||
|
{
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
|
||||||
|
rate 5100; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
startTime 2.8; // (s)
|
||||||
|
|
||||||
|
endTime 3.3; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09;
|
||||||
|
p1 ( 0.0 0.0 0.37 ); // (m,m,m)
|
||||||
|
p2 ( 0.0 0.0 0.38); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
parType1 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layer5
|
||||||
|
{
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
|
||||||
|
rate 5100; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
startTime 3.4; // (s)
|
||||||
|
|
||||||
|
endTime 3.9; // (s)
|
||||||
|
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09;
|
||||||
|
p1 ( 0.0 0.0 0.38 ); // (m,m,m)
|
||||||
|
p2 ( 0.0 0.0 0.39); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
parType2 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,18 +2,14 @@
|
||||||
| phasicFlow File |
|
| phasicFlow File |
|
||||||
| copyright: www.cemf.ir |
|
| copyright: www.cemf.ir |
|
||||||
\* ------------------------------------------------------------------------- */
|
\* ------------------------------------------------------------------------- */
|
||||||
objectName particleInsertion;
|
|
||||||
objectType dicrionary;
|
|
||||||
fileFormat ASCII;
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
objectName sphereDict;
|
objectName sphereDict;
|
||||||
objectType sphereShape;
|
objectType sphereShape;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
names (parType1 parType2); // names of shapes
|
||||||
|
|
||||||
// names of shapes
|
diameters (0.00885 0.0089); // diameter of shapes
|
||||||
names (sphere);
|
|
||||||
|
materials (lightMat heavyMat); // material names for shapes
|
||||||
|
|
||||||
// diameter of shapes
|
|
||||||
diameters (0.005);
|
|
||||||
|
|
||||||
// material names for shapes
|
|
||||||
materials (sphereMat);
|
|
|
@ -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
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
Binary file not shown.
After Width: | Height: | Size: 194 KiB |
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "1) Creating particles"
|
||||||
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
|
particlesPhasicFlow
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "2) Creating geometry"
|
||||||
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
|
geometryPhasicFlow
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "3) Running the case"
|
||||||
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
|
sphereGranFlow
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "4) Converting to vtk"
|
||||||
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
|
pFlowToVTK --fields diameter velocity id --binary
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
|
@ -0,0 +1,52 @@
|
||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName domainDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// Simulation domain: every particles that goes outside this domain will be deleted
|
||||||
|
globalBox
|
||||||
|
{
|
||||||
|
min (-0.11 -0.11 -0.15);
|
||||||
|
|
||||||
|
max ( 0.11 0.11 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
boundaries
|
||||||
|
{
|
||||||
|
|
||||||
|
left
|
||||||
|
{
|
||||||
|
type exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
right
|
||||||
|
{
|
||||||
|
type exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
top
|
||||||
|
{
|
||||||
|
type exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
rear
|
||||||
|
{
|
||||||
|
type periodic;
|
||||||
|
}
|
||||||
|
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type periodic;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,87 @@
|
||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName geometryDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
motionModel rotatingAxis;
|
||||||
|
|
||||||
|
rotatingAxisInfo
|
||||||
|
{
|
||||||
|
// for opening the gate of silo between time 4.1 and 5.1 s
|
||||||
|
gateMotion
|
||||||
|
{
|
||||||
|
p1 (-0.04 -0.04 -0.1);
|
||||||
|
p2 (-0.04 -0.04 0.0);
|
||||||
|
omega 3.14;
|
||||||
|
startTime 4.1;
|
||||||
|
endTime 5.1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
surfaces
|
||||||
|
{
|
||||||
|
cylinderShell
|
||||||
|
{
|
||||||
|
type cylinderWall; // other options: cuboidWall and planeWall
|
||||||
|
|
||||||
|
p1 (0.0 0.0 0.0); // begin point of cylinder axis
|
||||||
|
|
||||||
|
p2 (0.0 0.0 0.4); // end point of cylinder axis
|
||||||
|
|
||||||
|
radius1 0.1; // radius at p1
|
||||||
|
|
||||||
|
radius2 0.1; // radius at p2
|
||||||
|
|
||||||
|
resolution 36; // number of divisions
|
||||||
|
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
}
|
||||||
|
|
||||||
|
coneShell
|
||||||
|
{
|
||||||
|
type cylinderWall; // other options: cuboidWall and planeWall
|
||||||
|
|
||||||
|
p1 (0.0 0.0 -0.1); // begin point of cylinder axis
|
||||||
|
|
||||||
|
p2 (0.0 0.0 0.0); // end point of cylinder axis
|
||||||
|
|
||||||
|
radius1 0.04; // radius at p1
|
||||||
|
|
||||||
|
radius2 0.1; // radius at p2
|
||||||
|
|
||||||
|
resolution 36; // number of divisions
|
||||||
|
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
This is a plane wall at the exit of silo
|
||||||
|
*/
|
||||||
|
|
||||||
|
exitGate
|
||||||
|
{
|
||||||
|
type planeWall; // other options: cuboidWall and cylinderWall
|
||||||
|
|
||||||
|
p1 (-0.04 -0.04 -0.1); // first point of the wall
|
||||||
|
|
||||||
|
p2 ( 0.04 -0.04 -0.1); // second point of the wall
|
||||||
|
|
||||||
|
p3 ( 0.04 0.04 -0.1); // third point of the wall
|
||||||
|
|
||||||
|
p4 (-0.04 0.04 -0.1); // fourth point of the wall
|
||||||
|
|
||||||
|
material wallMat; // material name of the wall
|
||||||
|
|
||||||
|
motion gateMotion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName particlesDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Default value for fields defined for particles
|
||||||
|
These fields should always be defined for simulations with
|
||||||
|
spherical particles.
|
||||||
|
*/
|
||||||
|
|
||||||
|
defaultValue
|
||||||
|
{
|
||||||
|
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||||
|
|
||||||
|
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||||
|
|
||||||
|
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||||
|
|
||||||
|
shapeName word parType1; // name of the particle shape
|
||||||
|
}
|
||||||
|
|
||||||
|
selectors
|
||||||
|
{}
|
||||||
|
}
|
||||||
|
|
||||||
|
positionParticles
|
||||||
|
{
|
||||||
|
method empty; // empty simulation
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
|
| phasicFlow File |
|
||||||
|
| copyright: www.cemf.ir |
|
||||||
|
\* ------------------------------------------------------------------------- */
|
||||||
|
objectName settingsDict;
|
||||||
|
objectType dictionary;
|
||||||
|
fileFormat ASCII;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
run homogenizationSilo;
|
||||||
|
|
||||||
|
dt 0.00001; // time step for integration (s)
|
||||||
|
|
||||||
|
startTime 0.0; // start time for simulation
|
||||||
|
|
||||||
|
endTime 20; // end time for simulation
|
||||||
|
|
||||||
|
saveInterval 0.05; // time interval for saving the simulation
|
||||||
|
|
||||||
|
timePrecision 4; // maximum number of digits for time folder
|
||||||
|
|
||||||
|
g (0 0 -9.8); // gravity vector (m/s2)
|
||||||
|
|
||||||
|
|
||||||
|
// overrides the default behavior
|
||||||
|
includeObjects (diameter);
|
||||||
|
|
||||||
|
// exclude unnecessary data from saving on disk
|
||||||
|
excludeObjects (rVelocity.dy1 rVelocity.dy2 rVelocity.dy3
|
||||||
|
pStructPosition.dy1 pStructPosition.dy2 pStructPosition.dy3
|
||||||
|
pStructVelocity.dy1 pStructVelocity.dy2 pStructVelocity.dy3);
|
||||||
|
|
||||||
|
integrationMethod AdamsBashforth4; // integration method
|
||||||
|
|
||||||
|
writeFormat binary; // data writting format (ascii or binary)
|
||||||
|
|
||||||
|
timersReport Yes; // report timers
|
||||||
|
|
||||||
|
timersReportInterval 0.1; // time interval for reporting timers
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,11 @@ contactSearch
|
||||||
{
|
{
|
||||||
method NBS; // method for broad search particle-particle
|
method NBS; // method for broad search particle-particle
|
||||||
|
|
||||||
updateInterval 10;
|
updateInterval 10;
|
||||||
|
|
||||||
sizeRatio 1.1;
|
sizeRatio 1.1;
|
||||||
|
|
||||||
cellExtent 0.55;
|
cellExtent 0.55;
|
||||||
|
|
||||||
adjustableBox Yes;
|
adjustableBox Yes;
|
||||||
}
|
}
|
||||||
|
@ -46,26 +46,19 @@ model
|
||||||
0.8e6 0.8e6
|
0.8e6 0.8e6
|
||||||
0.8e6);
|
0.8e6);
|
||||||
|
|
||||||
nu (0.25 0.25 0.25 // Poisson's ratio [-]
|
nu (0.25 0.25 0.25 // Poisson's ratio [-]
|
||||||
0.25 0.25
|
0.25 0.25
|
||||||
0.25);
|
0.25);
|
||||||
|
|
||||||
en (0.97 0.97 0.85 // coefficient of normal restitution
|
|
||||||
0.97 0.85
|
|
||||||
1.00);
|
|
||||||
|
|
||||||
et (1.0 1.0 1.0 // coefficient of tangential restitution
|
|
||||||
1.0 1.0
|
|
||||||
1.0);
|
|
||||||
|
|
||||||
mu (0.65 0.65 0.35 // dynamic friction
|
|
||||||
0.65 0.35
|
|
||||||
0.35);
|
|
||||||
|
|
||||||
mur (0.1 0.1 0.1 // rolling friction
|
|
||||||
0.1 0.1
|
|
||||||
0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
en (0.97 0.97 0.85 // coefficient of normal restitution
|
||||||
|
0.97 0.85
|
||||||
|
1.00);
|
||||||
|
|
||||||
|
mu (0.65 0.65 0.35 // dynamic friction
|
||||||
|
0.65 0.35
|
||||||
|
0.35);
|
||||||
|
|
||||||
|
mur (0.1 0.1 0.1 // rolling friction
|
||||||
|
0.1 0.1
|
||||||
|
0.1);
|
||||||
|
}
|
|
@ -6,49 +6,172 @@ objectName particleInsertion;
|
||||||
objectType dicrionary;
|
objectType dicrionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
active Yes; // is insertion active -> yes or no
|
|
||||||
|
|
||||||
checkForCollision No; // is checked -> yes or no
|
// is insertion active -> yes or no
|
||||||
|
active Yes;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
one layers of particles are packed
|
six layers of particles are packed
|
||||||
*/
|
*/
|
||||||
|
|
||||||
layer0
|
layer0
|
||||||
{
|
{
|
||||||
timeControl simulationTime;
|
timeControl simulationTime;
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
rate 15000; // insertion rate (particles/s)
|
||||||
|
startTime 0; // (s)
|
||||||
|
endTime 0.5; // (s)
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
regionType cylinder; // type of insertion region
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09; // radius of cylinder (m)
|
||||||
|
p1 (0.0 0.0 0.1); // (m,m,m)
|
||||||
|
p2 (0.0 0.0 0.11); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
rate 15000; // insertion rate (particles/s)
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles
|
||||||
|
}
|
||||||
|
|
||||||
startTime 0; // (s)
|
mixture
|
||||||
|
{
|
||||||
endTime 0.5; // (s)
|
lightSphere 1; // mixture composition of inserted particles
|
||||||
|
}
|
||||||
insertionInterval 0.025; // s
|
|
||||||
|
|
||||||
cylinderInfo
|
|
||||||
{
|
|
||||||
radius 0.09; // radius of cylinder (m)
|
|
||||||
|
|
||||||
p1 ( 0.0 0.0 0.1 ); // (m,m,m)
|
|
||||||
|
|
||||||
p2 ( 0.0 0.0 0.11); // (m,m,m)
|
|
||||||
}
|
|
||||||
|
|
||||||
setFields
|
|
||||||
{
|
|
||||||
velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles
|
|
||||||
}
|
|
||||||
|
|
||||||
mixture
|
|
||||||
{
|
|
||||||
lightSphere 1; // mixture composition of inserted particles
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
layer1
|
||||||
|
{
|
||||||
|
timeControl simulationTime;
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
rate 15000; // insertion rate (particles/s)
|
||||||
|
startTime 0.7; // (s)
|
||||||
|
endTime 1.2; // (s)
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09;
|
||||||
|
p1 (0.0 0.0 0.16 ); // (m,m,m)
|
||||||
|
p2 (0.0 0.0 0.17); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
heavySphere 1; // only heavySphere
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layer2
|
||||||
|
{
|
||||||
|
timeControl simulationTime;
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
rate 15000; // insertion rate (particles/s)
|
||||||
|
startTime 1.4; // (s)
|
||||||
|
endTime 1.9; // (s)
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09;
|
||||||
|
p1 ( 0.0 0.0 0.2 ); // (m,m,m)
|
||||||
|
p2 ( 0.0 0.0 0.21); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
lightSphere 1; // only lightSphere
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layer3
|
||||||
|
{
|
||||||
|
timeControl simulationTime;
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
rate 15000; // insertion rate (particles/s)
|
||||||
|
startTime 2.1; // (s)
|
||||||
|
endTime 2.6; // (s)
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09;
|
||||||
|
p1 ( 0.0 0.0 0.28 ); // (m,m,m)
|
||||||
|
p2 ( 0.0 0.0 0.29); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
heavySphere 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layer4
|
||||||
|
{
|
||||||
|
timeControl simulationTime;
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
rate 15000; // insertion rate (particles/s)
|
||||||
|
startTime 2.8; // (s)
|
||||||
|
endTime 3.3; // (s)
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09;
|
||||||
|
p1 ( 0.0 0.0 0.37 ); // (m,m,m)
|
||||||
|
p2 ( 0.0 0.0 0.38); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
lightSphere 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layer5
|
||||||
|
{
|
||||||
|
timeControl simulationTime;
|
||||||
|
regionType cylinder; // type of insertion region
|
||||||
|
rate 15000; // insertion rate (particles/s)
|
||||||
|
startTime 3.4; // (s)
|
||||||
|
endTime 3.9; // (s)
|
||||||
|
insertionInterval 0.025; // s
|
||||||
|
|
||||||
|
cylinderInfo
|
||||||
|
{
|
||||||
|
radius 0.09;
|
||||||
|
p1 ( 0.0 0.0 0.38); // (m,m,m)
|
||||||
|
p2 ( 0.0 0.0 0.39); // (m,m,m)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFields
|
||||||
|
{
|
||||||
|
velocity realx3 (0.0 0.0 -0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
heavySphere 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,10 @@ objectName sphereDict;
|
||||||
objectType sphereShape;
|
objectType sphereShape;
|
||||||
fileFormat ASCII;
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,65 +1,50 @@
|
||||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
| phasicFlow File |
|
| phasicFlow File |
|
||||||
| copyright: www.cemf.ir |
|
| copyright: www.cemf.ir |
|
||||||
\* ------------------------------------------------------------------------- */
|
\* ------------------------------------------------------------------------- */
|
||||||
objectName domainDict;
|
|
||||||
objectType dictionary;
|
objectName domainDict;
|
||||||
|
objectType dictionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
|
|
||||||
|
// Simulation domain: every particle that goes outside this domain will be deleted
|
||||||
|
globalBox
|
||||||
{
|
{
|
||||||
min (-0.11 -0.11 -0.11);
|
min (-0.11 -0.11 -0.11);
|
||||||
|
max ( 0.11 0.11 0.41);
|
||||||
max ( 0.11 0.11 0.41);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boundaries
|
boundaries
|
||||||
{
|
{
|
||||||
// Determines how often (how many iterations) do you want to
|
left
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
// rebuild the list of particles in the neighbor list
|
right
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
// of all boundaries in the simulation domain
|
bottom
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
neighborListUpdateInterval 30;
|
top
|
||||||
|
{
|
||||||
// Determines how often do you want to update the new changes in the boundary
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
updateInterval 10;
|
|
||||||
|
|
||||||
// The distance from the boundary plane within which particles are marked to be in the boundary list
|
|
||||||
|
|
||||||
neighborLength 0.004;
|
|
||||||
|
|
||||||
left
|
|
||||||
{
|
|
||||||
type exit; // other options: periodict, reflective
|
|
||||||
}
|
|
||||||
|
|
||||||
right
|
|
||||||
{
|
|
||||||
type exit; // other options: periodict, reflective
|
|
||||||
}
|
|
||||||
|
|
||||||
bottom
|
|
||||||
{
|
|
||||||
type exit; // other options: periodict, reflective
|
|
||||||
}
|
|
||||||
|
|
||||||
top
|
|
||||||
{
|
|
||||||
type exit; // other options: periodict, reflective
|
|
||||||
}
|
|
||||||
|
|
||||||
rear
|
|
||||||
{
|
|
||||||
type exit; // other options: periodict, reflective
|
|
||||||
}
|
|
||||||
|
|
||||||
front
|
|
||||||
{
|
|
||||||
type exit; // other options: periodict, reflective
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
rear
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type exit; // other options: periodic, reflective
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,76 +1,55 @@
|
||||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
| phasicFlow File |
|
| phasicFlow File |
|
||||||
| copyright: www.cemf.ir |
|
| copyright: www.cemf.ir |
|
||||||
\* ------------------------------------------------------------------------- */
|
\* ------------------------------------------------------------------------- */
|
||||||
objectName geometryDict;
|
|
||||||
objectType dictionary;
|
objectName geometryDict;
|
||||||
|
objectType dictionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
motionModel stationary; // motion model can be rotatingAxis or stationary or vibrating
|
|
||||||
|
motionModel stationary; // motion model can be rotatingAxis, stationary, or vibrating
|
||||||
|
|
||||||
stationaryInfo
|
stationaryInfo
|
||||||
{
|
{
|
||||||
|
// No additional information needed for stationary motion model
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaces
|
surfaces
|
||||||
{
|
{
|
||||||
cylinderShell
|
cylinderShell
|
||||||
{
|
{
|
||||||
type cylinderWall; // other options: cuboidWall and planeWall
|
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
|
||||||
|
radius1 0.1; // radius at p1
|
||||||
p2 (0.0 0.0 0.4); // end point of cylinder axis
|
radius2 0.1; // radius at p2
|
||||||
|
resolution 36; // number of divisions
|
||||||
radius1 0.1; // radius at p1
|
material wallMat; // material name of this wall
|
||||||
|
}
|
||||||
radius2 0.1; // radius at p2
|
|
||||||
|
|
||||||
resolution 36; // number of divisions
|
|
||||||
|
|
||||||
material wallMat; // material name of this wall
|
|
||||||
}
|
|
||||||
|
|
||||||
coneShell
|
|
||||||
{
|
|
||||||
type cylinderWall; // other options: cuboidWall and planeWall
|
|
||||||
|
|
||||||
p1 (0.0 0.0 -0.1); // begin point of cylinder axis
|
|
||||||
|
|
||||||
p2 (0.0 0.0 0.0); // end point of cylinder axis
|
|
||||||
|
|
||||||
radius1 0.02; // radius at p1
|
|
||||||
|
|
||||||
radius2 0.1; // radius at p2
|
|
||||||
|
|
||||||
resolution 36; // number of divisions
|
|
||||||
|
|
||||||
material wallMat; // material name of this wall
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
This is a plane wall at the exit of silo
|
|
||||||
*/
|
|
||||||
|
|
||||||
exitGate
|
|
||||||
{
|
|
||||||
type planeWall; // other options: cuboidWall and cylinderWall
|
|
||||||
|
|
||||||
p1 (-0.02 -0.02 -0.1); // first point of the wall
|
|
||||||
|
|
||||||
p2 ( 0.02 -0.02 -0.1); // second point of the wall
|
|
||||||
|
|
||||||
p3 ( 0.02 0.02 -0.1); // third point of the wall
|
|
||||||
|
|
||||||
p4 (-0.02 0.02 -0.1); // fourth point of the wall
|
|
||||||
|
|
||||||
material wallMat; // material name of the wall
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
coneShell
|
||||||
|
{
|
||||||
|
type cylinderWall; // other options: cuboidWall and planeWall
|
||||||
|
p1 (0.0 0.0 -0.1); // begin point of cylinder axis
|
||||||
|
p2 (0.0 0.0 0.0); // end point of cylinder axis
|
||||||
|
radius1 0.02; // radius at p1
|
||||||
|
radius2 0.1; // radius at p2
|
||||||
|
resolution 36; // number of divisions
|
||||||
|
material wallMat; // material name of this wall
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
This is a plane wall at the exit of the silo that plugs the exit.
|
||||||
|
*/
|
||||||
|
exitGate
|
||||||
|
{
|
||||||
|
type planeWall; // other options: cuboidWall and cylinderWall
|
||||||
|
p1 (-0.02 -0.02 -0.1); // first point of the wall
|
||||||
|
p2 ( 0.02 -0.02 -0.1); // second point of the wall
|
||||||
|
p3 ( 0.02 0.02 -0.1); // third point of the wall
|
||||||
|
p4 (-0.02 0.02 -0.1); // fourth point of the wall
|
||||||
|
material wallMat; // material name of the wall
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,9 +10,7 @@ setFields
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Default value for fields defined for particles
|
Default value for fields defined for particles
|
||||||
|
|
||||||
These fields should always be defined for simulations with
|
These fields should always be defined for simulations with
|
||||||
|
|
||||||
spherical particles.
|
spherical particles.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -20,7 +18,7 @@ setFields
|
||||||
{
|
{
|
||||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||||
|
|
||||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
acceleration realx3 (0 0 0); // linear acceleration (m/s^2)
|
||||||
|
|
||||||
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||||
|
|
||||||
|
@ -31,17 +29,8 @@ setFields
|
||||||
{}
|
{}
|
||||||
}
|
}
|
||||||
|
|
||||||
positionParticles // positions particles
|
positionParticles
|
||||||
{
|
{
|
||||||
method empty; // other options: ordered and random
|
method empty; // empty simulation
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,42 +1,36 @@
|
||||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
| phasicFlow File |
|
| phasicFlow File |
|
||||||
| copyright: www.cemf.ir |
|
| copyright: www.cemf.ir |
|
||||||
\* ------------------------------------------------------------------------- */
|
\* ------------------------------------------------------------------------- */
|
||||||
objectName settingsDict;
|
objectName settingsDict;
|
||||||
objectType dictionary;
|
objectType dictionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
run layerdSiloFilling;
|
run layeredSiloFilling;
|
||||||
|
|
||||||
dt 0.00001; // time step for integration (s)
|
dt 0.00001; // time step for integration (s)
|
||||||
|
|
||||||
startTime 0.0; // start time for simulation
|
startTime 0.0; // start time for simulation
|
||||||
|
|
||||||
endTime 5.0; // end time for simulation
|
endTime 5.0; // end time for simulation
|
||||||
|
|
||||||
saveInterval 0.05; // time interval for saving the simulation
|
saveInterval 0.05; // time interval for saving the simulation
|
||||||
|
|
||||||
timePrecision 6; // maximum number of digits for time folder
|
timePrecision 6; // maximum number of digits for time folder
|
||||||
|
|
||||||
g (0 0 -9.8); // gravity vector (m/s2)
|
g (0 0 -9.8); // gravity vector (m/s^2)
|
||||||
|
|
||||||
// save data objects that are not automatically saved on disk.
|
// save data objects that are not automatically saved on disk.
|
||||||
|
// overrides the default behavior
|
||||||
// overrides the default behavior
|
includeObjects (diameter mass);
|
||||||
|
|
||||||
includeObjects (diameter);
|
|
||||||
|
|
||||||
// exclude unnecessary data from saving on disk
|
// exclude unnecessary data from saving on disk
|
||||||
|
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
|
||||||
|
|
||||||
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
|
integrationMethod AdamsBashforth2; // integration method
|
||||||
|
|
||||||
integrationMethod AdamsBashforth2; // integration method
|
|
||||||
|
|
||||||
writeFormat ascii; // data writting format (ascii or binary)
|
|
||||||
|
|
||||||
timersReport Yes; // report timers
|
|
||||||
|
|
||||||
timersReportInterval 0.01; // time interval for reporting timers
|
|
||||||
|
|
||||||
|
writeFormat ascii; // data writing format (ascii or binary)
|
||||||
|
|
||||||
|
timersReport Yes; // report timers
|
||||||
|
|
||||||
|
timersReportInterval 0.05; // time interval for reporting timers
|
||||||
|
|
|
@ -1,23 +1,27 @@
|
||||||
# Simulating a screw conveyor {#screwConveyor}
|
# Simulating a Screw Conveyor
|
||||||
## Problem definition
|
|
||||||
The problem is to simulate a screw conveyorwith the diameter 0.2 m and the length 1 m and 20 cm pitch. It is filled with 30,000 4-mm spherical particles. The timestep for integration is 0.00001 s.
|
|
||||||
<div align="center"><b>
|
|
||||||
a view of rotating drum
|
|
||||||
|
|
||||||
![]()
|
## Problem Definition
|
||||||
</b></div>
|
|
||||||
|
The problem is to simulate a screw conveyor with a diameter of 0.2 m and a length of 1 m with a variable pitch. It is filled with 10 mm and 9 mm spherical particles. The timestep for integration is 0.00002 s. Particles are inserted from the top of the feeder at a rate of 2800 particles/s. The number composition of large and small particles is 2:1.
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
<img src="./screw.jpeg" style="width: 400px;">
|
||||||
|
<b>
|
||||||
|
|
||||||
|
A view of the screw conveyor simulation
|
||||||
|
</b>
|
||||||
|
</div>
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
## Setting up the case
|
## 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`).
|
|
||||||
|
|
||||||
|
|
||||||
### Creating particles
|
PhasicFlow simulation case setup is based on the 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`).
|
||||||
|
|
||||||
Open the file `settings/particlesDict`. Two dictionaries, `positionParticles` and `setFields` position particles and set the field values for the particles.
|
### Creating Particles
|
||||||
In dictionary `positionParticles`, the positioning `method` is `positionOrdered`, which position particles in order in the space defined by `box`. `box` space is defined by two corner points `min` and `max`. In dictionary `positionOrderedInfo`, `numPoints` defines number of particles; `diameter`, the distance between two adjacent particles, and `axisOrder` defines the axis order for filling the space by particles.
|
|
||||||
|
Open the file `settings/particlesDict`. Two dictionaries, `positionParticles` and `setFields`, position particles and set the field values for the particles. In the dictionary `positionParticles`, the positioning `method` is `empty`, which means that there are no particles in the simulation at the start.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
in <b>settings/particlesDict</b> file
|
in <b>settings/particlesDict</b> file
|
||||||
|
@ -26,20 +30,20 @@ in <b>settings/particlesDict</b> file
|
||||||
```C++
|
```C++
|
||||||
positionParticles
|
positionParticles
|
||||||
{
|
{
|
||||||
|
// A list of options are: ordered, random
|
||||||
method empty; // creates the required fields with zero particles (empty).
|
method empty; // creates the required fields with zero particles (empty).
|
||||||
|
|
||||||
maxNumberOfParticles 50000; // maximum number of particles in the simulation
|
mortonSorting Yes; // perform initial sorting based on morton
|
||||||
mortonSorting Yes; // perform initial sorting based on morton code?
|
|
||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Enter the following command in the terminal to create the particles and store them in `0` folder.
|
Enter the following command in the terminal to create the particles and store them in the `0` folder:
|
||||||
|
|
||||||
`> particlesPhasicFlow`
|
`> particlesPhasicFlow`
|
||||||
|
|
||||||
### Creating geometry
|
### 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. `rotatingAxisMotion` 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.
|
|
||||||
|
In the 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. The `rotatingAxis` model defines a fixed axis which rotates around itself. The dictionary `rotAxis` defines a motion component with `p1` and `p2` as the endpoints of the axis and `omega` as the rotation speed in rad/s. You can define more than one motion component in a simulation.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
in <b>settings/geometryDict</b> file
|
in <b>settings/geometryDict</b> file
|
||||||
|
@ -47,23 +51,21 @@ in <b>settings/geometryDict</b> file
|
||||||
|
|
||||||
```C++
|
```C++
|
||||||
motionModel rotatingAxisMotion;
|
motionModel rotatingAxisMotion;
|
||||||
.
|
|
||||||
.
|
|
||||||
.
|
|
||||||
rotatingAxisMotionInfo
|
rotatingAxisMotionInfo
|
||||||
{
|
{
|
||||||
rotAxis
|
rotAxis
|
||||||
{
|
{
|
||||||
p1 (1.09635 0.2010556 0.22313511); // first point for the axis of rotation
|
p1 (0 0 0.0); // first point for the axis of rotation
|
||||||
p2 (0.0957492 0.201556 0.22313511); // second point for the axis of rotation
|
p2 (0 0 1.0); // second point for the axis of rotation
|
||||||
omega 3; // rotation speed (rad/s)
|
omega 3.14; // rotation speed (rad/s)
|
||||||
startTime 5;
|
startTime 1; // when t>1 s, rotation starts
|
||||||
endTime 30;
|
endTime 30; // when t>30 s, rotation stops
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
In the dictionary `surfaces` you can define all the surfaces (shell) 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 helix, `material` name `prop1`, `motion` component `none` is defined. `helix` define plane helix at center of cylindrical shell, `material` name `prop1` and `motion` component `rotAxis`.'rotAxis' is use for helix because it is rotating and 'none' is use for shell because It is motionless.
|
|
||||||
|
In the dictionary `surfaces`, you can define all the surfaces in the simulation. Two main options are available: built-in geometries in PhasicFlow, and providing surfaces with an STL file (ASCII format). Here we use `stlWall` as a method to provide the surface information through STL files. In the `shell` dictionary, `material` is set to `prop1` and `motion` is set to `none` (meaning this surface is fixed). `helix` defines the screw at the center of the cylindrical part of the shell. For this surface, `material` is set to `prop1` and `motion` is set to `rotAxis`.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
in <b>settings/geometryDict</b> file
|
in <b>settings/geometryDict</b> file
|
||||||
|
@ -75,8 +77,8 @@ surfaces
|
||||||
helix
|
helix
|
||||||
{
|
{
|
||||||
type stlWall; // type of the wall
|
type stlWall; // type of the wall
|
||||||
file helix.stl; // file name in stl folder
|
file screw.stl; // file name in stl folder
|
||||||
material prop1; // material name of this wall
|
material prop1; // material name of this wall
|
||||||
motion rotAxis; // motion component name
|
motion rotAxis; // motion component name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,20 +86,19 @@ surfaces
|
||||||
{
|
{
|
||||||
type stlWall; // type of the wall
|
type stlWall; // type of the wall
|
||||||
file shell.stl; // file name in stl folder
|
file shell.stl; // file name in stl folder
|
||||||
material prop1; // material name of this wall
|
material prop1; // material name of this wall
|
||||||
motion none; // motion component name
|
motion none; // this surface is not moving ==> none
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Enter the following command in the terminal to create the geometry and store it in `0/geometry` folder.
|
Enter the following command in the terminal to create the geometry and store it in the `0/geometry` folder:
|
||||||
|
|
||||||
`> geometryPhasicFlow`
|
`> geometryPhasicFlow`
|
||||||
|
|
||||||
### Defining properties and interactions
|
### 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.
|
|
||||||
|
In the file `caseSetup/interaction`, you will find properties of materials. `materials` defines a list of material names in the simulation and `densities` sets the corresponding density of each material name. The `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 properties should be defined in this dictionary.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
in <b>caseSetup/interaction</b> file
|
in <b>caseSetup/interaction</b> file
|
||||||
|
@ -105,13 +106,14 @@ in <b>caseSetup/interaction</b> file
|
||||||
|
|
||||||
```C++
|
```C++
|
||||||
materials (prop1); // a list of materials names
|
materials (prop1); // a list of materials names
|
||||||
densities (1000.0); // density of materials [kg/m3]
|
densities (2300.0); // density of materials [kg/m3]
|
||||||
|
|
||||||
contactListType sortedContactList;
|
contactListType sortedContactList;
|
||||||
|
|
||||||
model
|
model
|
||||||
{
|
{
|
||||||
contactForceModel nonLinearNonLimited;
|
contactForceModel nonLinearNonLimited;
|
||||||
|
|
||||||
rollingFrictionModel normal;
|
rollingFrictionModel normal;
|
||||||
|
|
||||||
Yeff (1.0e6); // Young modulus [Pa]
|
Yeff (1.0e6); // Young modulus [Pa]
|
||||||
|
@ -120,18 +122,15 @@ model
|
||||||
|
|
||||||
nu (0.25); // Poisson's ratio [-]
|
nu (0.25); // Poisson's ratio [-]
|
||||||
|
|
||||||
en (0.7); // coefficient of normal restitution
|
en (0.8); // coefficient of normal restitution
|
||||||
|
|
||||||
et (1.0); // coefficient of tangential restitution
|
|
||||||
|
|
||||||
mu (0.3); // dynamic friction
|
mu (0.3); // dynamic friction
|
||||||
|
|
||||||
mur (0.1); // rolling friction
|
mur (0.2); // 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 and `wallMapping` shows how particles are mapped onto walls for finding neighbor list for particle-wall contacts. `updateFrequency` sets the frequency for 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 dictionary `contactSearch` sets the methods for broad search. `method` specifies the algorithm for finding the neighbor list for particle-particle contacts. `updateInterval` sets the intervals (in terms of the number of iterations) between each occurrence of updating the neighbor list, and `sizeRatio` sets the size of enlarged cells (with respect to particle diameter) for finding the neighbor list. A larger `sizeRatio` includes more particles in the neighbor list, requiring less frequent updates.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
in <b>caseSetup/interaction</b> file
|
in <b>caseSetup/interaction</b> file
|
||||||
|
@ -140,69 +139,61 @@ in <b>caseSetup/interaction</b> file
|
||||||
```C++
|
```C++
|
||||||
contactSearch
|
contactSearch
|
||||||
{
|
{
|
||||||
method NBS; // method for broad search particle-particle
|
method NBS; // method for broad search
|
||||||
wallMapping cellMapping; // method for broad search particle-wall
|
|
||||||
|
updateInterval 10;
|
||||||
|
|
||||||
NBSInfo
|
sizeRatio 1.1;
|
||||||
{
|
|
||||||
updateFrequency 10; // each 20 timesteps, update neighbor list
|
|
||||||
sizeRatio 1.1; // bounding box size to particle diameter (max)
|
|
||||||
}
|
|
||||||
|
|
||||||
cellMappingInfo
|
cellExtent 0.55;
|
||||||
{
|
|
||||||
updateFrequency 10; // each 20 timesteps, update neighbor list
|
|
||||||
cellExtent 0.6; // bounding box for particle-wall search (> 0.5)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
adjustableBox Yes;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
In the file `caseSetup/sphereShape`, 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 can define a list of `names` for shapes, a list of `diameters` for shapes, and their `materials` names.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
in <b>caseSetup/sphereShape</b> file
|
in <b>caseSetup/shapes</b> file
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
```C++
|
```C++
|
||||||
names (sphere1); // names of shapes
|
names (sphere1 sphere2); // names of shapes
|
||||||
diameters (0.01); // diameter of shapes
|
diameters (0.01 0.009); // diameter of shapes
|
||||||
materials (prop1); // material names for shapes
|
materials (prop1 prop1); // material names for shapes
|
||||||
```
|
```
|
||||||
|
|
||||||
Other settings for the simulation can be set in file `settings/settingsDict`. The dictionary `domain` 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.
|
Other settings for the simulation can be set in the file `settings/settingsDict`. The dictionary `domain` defines a rectangular bounding box with two corner points for the simulation. Each particle that gets out of this box will be deleted automatically.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
in <b>settings/settingsDict</b> file
|
in <b>settings/settingsDict</b> file
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
```C++
|
```C++
|
||||||
dt 0.0001; // time step for integration (s)
|
dt 0.00002; // time step for integration (s)
|
||||||
startTime 0; // start time for simulation
|
|
||||||
endTime 20; // end time for simulation
|
|
||||||
saveInterval 0.05; // time interval for saving the simulation
|
|
||||||
timePrecision 6; // maximum number of digits for time folder
|
|
||||||
g (0 -9.8 0); // gravity vector (m/s2)
|
|
||||||
|
|
||||||
domain
|
startTime 0; // start time for simulation
|
||||||
{
|
|
||||||
min (0.0 -0.06 0.001);
|
|
||||||
max (1.2 1 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
integrationMethod AdamsBashforth3; // integration method
|
endTime 20; // end time for simulation
|
||||||
|
|
||||||
timersReport Yes; // report timers?
|
saveInterval 0.025; // time interval for saving the simulation
|
||||||
|
|
||||||
timersReportInterval 0.01; // time interval for reporting timers
|
timePrecision 4; // maximum number of digits for time folder
|
||||||
|
|
||||||
|
g (0 -9.8 0); // gravity vector (m/s2)
|
||||||
|
|
||||||
|
writeFormat binary; // field files will be saved in binary format
|
||||||
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running the case
|
## 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.
|
|
||||||
|
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:
|
||||||
|
|
||||||
`> sphereGranFlow`
|
`> sphereGranFlow`
|
||||||
|
|
||||||
## Post processing
|
## 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/`.
|
|
||||||
|
|
||||||
`> pFlowToVTK`
|
After finishing the simulation, you can render the results in ParaView. To convert the results to VTK format, 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:
|
||||||
|
|
||||||
|
`> pFlowToVTK --binary -f diameter id velocity`
|
||||||
|
|
|
@ -6,45 +6,42 @@ objectName interaction;
|
||||||
objectType dicrionary;
|
objectType dicrionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
materials (prop1); // a list of materials names
|
|
||||||
|
|
||||||
densities (1000.0); // density of materials [kg/m3]
|
materials (prop1); // a list of materials names
|
||||||
|
densities (2300.0); // density of materials [kg/m3]
|
||||||
|
|
||||||
contactListType sortedContactList;
|
contactListType sortedContactList;
|
||||||
|
|
||||||
contactSearch
|
|
||||||
{
|
|
||||||
method NBS; // method for broad search
|
|
||||||
|
|
||||||
updateInterval 10;
|
|
||||||
|
|
||||||
sizeRatio 1.1;
|
|
||||||
|
|
||||||
cellExtent 0.55;
|
|
||||||
|
|
||||||
adjustableBox Yes;
|
|
||||||
}
|
|
||||||
|
|
||||||
model
|
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.8); // coefficient of normal restitution
|
||||||
|
|
||||||
et (1.0); // coefficient of tangential restitution
|
mu (0.3); // dynamic friction
|
||||||
|
|
||||||
mu (0.3); // dynamic friction
|
mur (0.2); // rolling friction
|
||||||
|
|
||||||
mur (0.1); // rolling friction
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
contactSearch
|
||||||
|
{
|
||||||
|
method NBS; // method for broad search
|
||||||
|
|
||||||
|
updateInterval 10;
|
||||||
|
|
||||||
|
sizeRatio 1.1;
|
||||||
|
|
||||||
|
cellExtent 0.55;
|
||||||
|
|
||||||
|
adjustableBox Yes;
|
||||||
|
}
|
||||||
|
|
|
@ -6,46 +6,42 @@ objectName particleInsertion;
|
||||||
objectType dicrionary;
|
objectType dicrionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
active Yes; // is insertion active -> Yes or No
|
|
||||||
|
|
||||||
checkForCollision No; // is checked -> Yes or No
|
active yes; // is insertion active?
|
||||||
|
|
||||||
/*
|
|
||||||
five layers of particles are packed one-by-one using 5 insertion steps
|
|
||||||
*/
|
|
||||||
|
|
||||||
layer0
|
feeder
|
||||||
{
|
{
|
||||||
timeControl simulationTime;
|
rate 2800; // insertion rate (particles/s)
|
||||||
|
|
||||||
|
timeControl simulationTime;
|
||||||
|
|
||||||
regionType cylinder; // type of insertion region
|
startTime 0;
|
||||||
|
|
||||||
|
endTime 100;
|
||||||
|
|
||||||
|
insertionInterval 0.04; //s
|
||||||
|
|
||||||
|
regionType box;
|
||||||
|
|
||||||
rate 5000; // Particles Insertion Rate (particles/s)
|
boxInfo
|
||||||
|
|
||||||
startTime 0; // Start time of LightParticles insertion (s)
|
|
||||||
|
|
||||||
endTime 100; // End time of LightParticles insertion (s)
|
|
||||||
|
|
||||||
insertionInterval 0.03; // Time Interval of LightParticles insertion (s)
|
|
||||||
|
|
||||||
cylinderInfo
|
|
||||||
{
|
{
|
||||||
p1 (0.22 0.730 0.25); // Bottom of cylinderRegion(m,m,m)
|
|
||||||
|
|
||||||
p2 (0.22 0.742 0.25); // Top of cylinderRegion (m,m,m)
|
min ( -0.15 0.34 0.01); // (m,m,m)
|
||||||
|
max ( 0.15 0.36 0.15); // (m,m,m)
|
||||||
radius 0.09; // radius of cylinder (m)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// initial velocity of inserted particles
|
||||||
setFields
|
setFields
|
||||||
{
|
{
|
||||||
velocity realx3 (0.0 -0.6 -0); // initial velocity of inserted particles
|
velocity realx3 (0.0 -0.65 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mixture composition of inserted particles
|
||||||
mixture
|
mixture
|
||||||
{
|
{
|
||||||
sphere1 1; // mixture composition of inserted particles
|
sphere1 2;
|
||||||
|
sphere2 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,10 @@
|
||||||
| copyright: www.cemf.ir |
|
| copyright: www.cemf.ir |
|
||||||
\* ------------------------------------------------------------------------- */
|
\* ------------------------------------------------------------------------- */
|
||||||
objectName sphereDict;
|
objectName sphereDict;
|
||||||
objectType sphereShape;
|
objectType shapes;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
names (sphere1); // names of shapes
|
|
||||||
|
|
||||||
diameters (0.01); // diameter of shapes
|
names (sphere1 sphere2); // names of shapes
|
||||||
|
diameters (0.01 0.009); // diameter of shapes
|
||||||
materials (prop1); // material names for shapes
|
materials (prop1 prop1); // material names for shapes
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
|
||||||
| phasicFlow File |
|
|
||||||
| copyright: www.cemf.ir |
|
|
||||||
\* ------------------------------------------------------------------------- */
|
|
||||||
objectName sphereDict;
|
|
||||||
objectType sphereShape;
|
|
||||||
fileFormat ASCII;
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
names (sphere1); // names of shapes
|
|
||||||
diameters (0.01); // diameter of shapes
|
|
||||||
materials (prop1); // material names for shapes
|
|
|
@ -15,7 +15,10 @@ echo "3) Running the case"
|
||||||
echo "<--------------------------------------------------------------------->\n"
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
sphereGranFlow
|
sphereGranFlow
|
||||||
|
|
||||||
|
echo "\n<--------------------------------------------------------------------->"
|
||||||
|
echo "4) Converting to VTK"
|
||||||
|
echo "<--------------------------------------------------------------------->\n"
|
||||||
|
pFlowToVTK -f diameter velocity id
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 356 KiB |
|
@ -1,64 +1,50 @@
|
||||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||||
| phasicFlow File |
|
| phasicFlow File |
|
||||||
| copyright: www.cemf.ir |
|
| copyright: www.cemf.ir |
|
||||||
\* ------------------------------------------------------------------------- */
|
\* ------------------------------------------------------------------------- */
|
||||||
objectName domainDict;
|
|
||||||
objectType dictionary;
|
objectName domainDict;
|
||||||
|
objectType dictionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
|
|
||||||
{
|
|
||||||
min (0.0 -0.06 0.001); // lower corner point of the box
|
|
||||||
|
|
||||||
max (1.2 1 0.5); // upper corner point of the box
|
// Simulation domain: every particle that goes outside this domain will be deleted
|
||||||
}
|
globalBox
|
||||||
|
|
||||||
decomposition
|
|
||||||
{
|
{
|
||||||
direction z;
|
min (-0.2 -0.20 -0.01);
|
||||||
|
max ( 0.2 0.4 1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
boundaries
|
boundaries
|
||||||
{
|
{
|
||||||
|
left
|
||||||
|
{
|
||||||
|
type exit;
|
||||||
|
}
|
||||||
|
|
||||||
neighborListUpdateInterval 50; /* Determines how often (how many iterations) do you want to
|
right
|
||||||
|
{
|
||||||
|
type exit;
|
||||||
|
}
|
||||||
|
|
||||||
rebuild the list of particles in the neighbor list
|
bottom
|
||||||
|
{
|
||||||
|
type exit;
|
||||||
|
}
|
||||||
|
|
||||||
of all boundaries in the simulation domain */
|
top
|
||||||
|
{
|
||||||
|
type exit;
|
||||||
|
}
|
||||||
|
|
||||||
updateInterval 10; // Determines how often do you want to update the new changes in the boundary
|
rear
|
||||||
|
{
|
||||||
|
type exit;
|
||||||
|
}
|
||||||
|
|
||||||
neighborLength 0.004; // The distance from the boundary plane within which particles are marked to be in the boundary list
|
front
|
||||||
|
{
|
||||||
left
|
type exit;
|
||||||
{
|
}
|
||||||
type exit; // other options: periodic, 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
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -6,47 +6,41 @@ objectName geometryDict;
|
||||||
objectType dictionary;
|
objectType dictionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
motionModel rotatingAxis; // motion model: rotating object around an axis
|
|
||||||
|
// motion model: rotating object around an axis
|
||||||
|
motionModel rotatingAxis;
|
||||||
|
|
||||||
rotatingAxisInfo
|
rotatingAxisInfo
|
||||||
{
|
{
|
||||||
rotAxis
|
rotAxis
|
||||||
{
|
{
|
||||||
p1 (1.09635 0.2010556 0.22313511); // first point for the axis of rotation
|
p1 (0 0 0.0); // first point for the axis of rotation
|
||||||
|
p2 (0 0 1.0); // second point for the axis of rotation
|
||||||
p2 (0.0957492 0.201556 0.22313511); // second point for the axis of rotation
|
omega 3.14; // rotation speed (rad/s)
|
||||||
|
startTime 1; // when t>1 s, rotation starts
|
||||||
omega 3; // rotation speed (rad/s)
|
endTime 30; // when t>30 s, rotation stops
|
||||||
|
|
||||||
startTime 5; // Start time of Geometry Rotating
|
|
||||||
|
|
||||||
endTime 30; // End time of Geometry Rotating
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
surfaces
|
surfaces
|
||||||
{
|
{
|
||||||
helix
|
helix
|
||||||
{
|
{
|
||||||
type stlWall; // type of the wall
|
type stlWall; // type of the wall
|
||||||
|
file screw.stl; // file name in stl folder
|
||||||
file helix.stl; // file name in stl folder
|
material prop1; // material name of this wall
|
||||||
|
motion rotAxis; // motion component name
|
||||||
material prop1; // material name of this wall
|
|
||||||
|
|
||||||
motion rotAxis; // motion component name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
shell
|
shell
|
||||||
{
|
{
|
||||||
type stlWall; // type of the wall
|
type stlWall; // type of the wall
|
||||||
|
file shell.stl; // file name in stl folder
|
||||||
file shell.stl; // file name in stl folder
|
material prop1; // material name of this wall
|
||||||
|
motion none; // this surface is not moving ==> none
|
||||||
material prop1; // material name of this wall
|
|
||||||
|
|
||||||
motion none; // motion component name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,72 +6,34 @@ objectName particlesDict;
|
||||||
objectType dictionary;
|
objectType dictionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
// positions particles
|
||||||
|
positionParticles
|
||||||
|
{
|
||||||
|
// A list of options are: ordered, random
|
||||||
|
method empty; // creates the required fields with zero particles (empty).
|
||||||
|
|
||||||
|
mortonSorting Yes; // perform initial sorting based on morton
|
||||||
|
}
|
||||||
|
|
||||||
setFields
|
setFields
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
Default value for fields defined for particles
|
|
||||||
|
|
||||||
These fields should always be defined for simulations with
|
|
||||||
|
|
||||||
spherical particles.
|
|
||||||
*/
|
|
||||||
|
|
||||||
defaultValue
|
defaultValue
|
||||||
{
|
{
|
||||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
// linear velocity (m/s)
|
||||||
|
velocity realx3 (0 0 0);
|
||||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
|
||||||
|
// linear acceleration (m/s2)
|
||||||
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
acceleration realx3 (0 0 0);
|
||||||
|
|
||||||
shapeName word sphere1; // name of the particle shape
|
// rotational velocity (rad/s)
|
||||||
|
rVelocity realx3 (0 0 0);
|
||||||
|
|
||||||
|
// name of the particle shape
|
||||||
|
shapeName word sphere1;
|
||||||
}
|
}
|
||||||
|
|
||||||
selectors
|
selectors
|
||||||
{
|
{}
|
||||||
shapeAssigne
|
|
||||||
{
|
|
||||||
selector stridedRange; // other options: box, cylinder, sphere, randomPoints
|
|
||||||
|
|
||||||
stridedRangeInfo
|
|
||||||
{
|
|
||||||
begin 0; // begin index of points
|
|
||||||
|
|
||||||
end 5000; // end index of points
|
|
||||||
|
|
||||||
stride 3; // stride for selector
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldValue // fields that the selector is applied to
|
|
||||||
{
|
|
||||||
shapeName word sphere1; // sets shapeName of the selected points to largeSphere
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
positionParticles // positions particles
|
|
||||||
{
|
|
||||||
method ordered; // other options: random and empty
|
|
||||||
|
|
||||||
mortonSorting Yes; // perform initial sorting based on morton code?
|
|
||||||
|
|
||||||
orderedInfo
|
|
||||||
{
|
|
||||||
diameter 0.01; // minimum space between centers of particles
|
|
||||||
|
|
||||||
numPoints 5000; // number of particles in the simulation
|
|
||||||
|
|
||||||
axisOrder (z y x); // axis order for filling the space with particles
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
max (0.08 0.08 1); // upper corner point of the box
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -6,29 +6,37 @@ objectName settingsDict;
|
||||||
objectType dictionary;
|
objectType dictionary;
|
||||||
fileFormat ASCII;
|
fileFormat ASCII;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
run screwConveyor;
|
run screwConveyor;
|
||||||
|
|
||||||
dt 0.0001; // time step for integration (s)
|
dt 0.00002; // time step for integration (s)
|
||||||
|
|
||||||
startTime 0; // start time for simulation
|
startTime 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.025; // time interval for saving the simulation
|
||||||
|
|
||||||
timePrecision 6; // maximum number of digits for time folder
|
timePrecision 4; // maximum number of digits for time folder
|
||||||
|
|
||||||
|
g (0 -9.8 0); // gravity vector (m/s2)
|
||||||
|
|
||||||
|
writeFormat binary; // field files will be saved in binary format
|
||||||
|
|
||||||
|
// A list of options: AB2, AB3, AB4, AB5
|
||||||
|
integrationMethod AdamsBashforth4; // integration method
|
||||||
|
|
||||||
|
// overrides the default behavior
|
||||||
|
includeObjects (diameter);
|
||||||
|
|
||||||
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
|
// exclude unnecessary data from saving on disk
|
||||||
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
|
excludeObjects (rVelocity.dy1 rVelocity.dy2 rVelocity.dy3
|
||||||
|
pStructPosition.dy1 pStructPosition.dy2 pStructPosition.dy3
|
||||||
|
pStructVelocity.dy1 pStructVelocity.dy2 pStructVelocity.dy3);
|
||||||
|
|
||||||
|
|
||||||
integrationMethod AdamsBashforth2; // integration method
|
timersReport Yes; // report timers?
|
||||||
|
|
||||||
writeFormat ascii; // data writting format (ascii or binary)
|
timersReportInterval 0.1; // time interval for reporting timers
|
||||||
|
|
||||||
timersReport Yes; // report timers (Yes or No)
|
|
||||||
|
|
||||||
timersReportInterval 0.01; // time interval for reporting timers
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -30,7 +30,7 @@ pFlow::empty::empty(
|
||||||
positionParticles(control, dict),
|
positionParticles(control, dict),
|
||||||
position_
|
position_
|
||||||
(
|
(
|
||||||
"empty",maxNumberOfParticles(), 0, RESERVE()
|
"empty",1, 0, RESERVE()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
}
|
}
|
|
@ -146,8 +146,8 @@ pFlow::positionOrdered::positionOrdered
|
||||||
position_
|
position_
|
||||||
(
|
(
|
||||||
"positionOrdered",
|
"positionOrdered",
|
||||||
max(maxNumberOfParticles(), numPoints_),
|
numPoints_,
|
||||||
numPoints_ ,
|
numPoints_,
|
||||||
RESERVE()
|
RESERVE()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,45 +32,10 @@ pFlow::realx3Vector pFlow::positionParticles::sortByMortonCode(
|
||||||
uint64 index;
|
uint64 index;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*realx3 minP = min(position);
|
|
||||||
realx3 maxP = max(position);
|
|
||||||
real cellsize = maxDiameter();
|
|
||||||
cells<uint64> allCells( box(minP, maxP), cellsize);
|
|
||||||
|
|
||||||
Vector<indexMorton> indMor(position.size(),RESERVE());
|
|
||||||
|
|
||||||
indMor.clear();
|
|
||||||
|
|
||||||
uint64 ind=0;
|
|
||||||
for(const auto& p:position)
|
|
||||||
{
|
|
||||||
auto cellInd = allCells.pointIndex(p);
|
|
||||||
indMor.push_back(
|
|
||||||
{ xyzToMortonCode64(cellInd.x(), cellInd.y(), cellInd.z()),
|
|
||||||
ind++});
|
|
||||||
}
|
|
||||||
|
|
||||||
INFORMATION<<"Performing morton sorting."<<END_INFO;
|
|
||||||
std::sort(
|
|
||||||
indMor.begin(),
|
|
||||||
indMor.end(),
|
|
||||||
[]( const indexMorton &lhs, const indexMorton &rhs){
|
|
||||||
return lhs.morton < rhs.morton; } );
|
|
||||||
|
|
||||||
realx3Vector sortedPos(position.capacity(), RESERVE());
|
|
||||||
sortedPos.clear();
|
|
||||||
|
|
||||||
|
|
||||||
for(auto& ind:indMor)
|
|
||||||
{
|
|
||||||
sortedPos.push_back( position[ind.index] );
|
|
||||||
}*/
|
|
||||||
|
|
||||||
WARNING<<"Morton sorting is inactive!"<<END_WARNING;
|
WARNING<<"Morton sorting is inactive!"<<END_WARNING;
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pFlow::positionParticles::positionParticles
|
pFlow::positionParticles::positionParticles
|
||||||
(
|
(
|
||||||
systemControl& control,
|
systemControl& control,
|
||||||
|
@ -78,12 +43,8 @@ pFlow::positionParticles::positionParticles
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
regionType_(dict.getValOrSet<word>("regionType", "domain")),
|
regionType_(dict.getValOrSet<word>("regionType", "domain")),
|
||||||
maxNumberOfParticles_(dict.getValOrSet(
|
|
||||||
"maxNumberOfParticles",
|
|
||||||
static_cast<uint32>(10000))),
|
|
||||||
mortonSorting_(dict.getValOrSet("mortonSorting", Logical("Yes")))
|
mortonSorting_(dict.getValOrSet("mortonSorting", Logical("Yes")))
|
||||||
{
|
{
|
||||||
|
|
||||||
if( regionType_ != "domain" )
|
if( regionType_ != "domain" )
|
||||||
{
|
{
|
||||||
pRegion_ = peakableRegion::create(
|
pRegion_ = peakableRegion::create(
|
||||||
|
@ -92,7 +53,7 @@ pFlow::positionParticles::positionParticles
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fileDictionary domainDict
|
fileDictionary domainDictionary
|
||||||
(
|
(
|
||||||
objectFile
|
objectFile
|
||||||
{
|
{
|
||||||
|
@ -103,12 +64,10 @@ pFlow::positionParticles::positionParticles
|
||||||
},
|
},
|
||||||
&control.settings()
|
&control.settings()
|
||||||
);
|
);
|
||||||
pRegion_ = peakableRegion::create(regionType_,domainDict.subDict("globalBox"));
|
pRegion_ = peakableRegion::create("box", domainDictionary.subDict("globalBox"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pFlow::realx3Vector pFlow::positionParticles::getFinalPosition()
|
pFlow::realx3Vector pFlow::positionParticles::getFinalPosition()
|
||||||
{
|
{
|
||||||
if(mortonSorting_)
|
if(mortonSorting_)
|
||||||
|
@ -130,10 +89,8 @@ pFlow::uniquePtr<pFlow::positionParticles>
|
||||||
const dictionary & dict
|
const dictionary & dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
word method = dict.getVal<word>("method");
|
word method = dict.getVal<word>("method");
|
||||||
|
|
||||||
|
|
||||||
if( dictionaryvCtorSelector_.search(method) )
|
if( dictionaryvCtorSelector_.search(method) )
|
||||||
{
|
{
|
||||||
return dictionaryvCtorSelector_[method] (control, dict);
|
return dictionaryvCtorSelector_[method] (control, dict);
|
||||||
|
|
|
@ -40,12 +40,8 @@ private:
|
||||||
|
|
||||||
word regionType_;
|
word regionType_;
|
||||||
|
|
||||||
uint32 maxNumberOfParticles_ = 10000;
|
|
||||||
|
|
||||||
Logical mortonSorting_;
|
Logical mortonSorting_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
realx3Vector sortByMortonCode(const realx3Vector& position)const;
|
realx3Vector sortByMortonCode(const realx3Vector& position)const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -83,12 +79,6 @@ public:
|
||||||
return mortonSorting_();
|
return mortonSorting_();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
|
||||||
auto maxNumberOfParticles()const
|
|
||||||
{
|
|
||||||
return maxNumberOfParticles_;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual uint32 numPoints()const = 0;
|
virtual uint32 numPoints()const = 0;
|
||||||
|
|
||||||
virtual uint32 size()const = 0;
|
virtual uint32 size()const = 0;
|
||||||
|
|
|
@ -122,14 +122,14 @@ pFlow::positionRandom::positionRandom
|
||||||
position_
|
position_
|
||||||
(
|
(
|
||||||
"position",
|
"position",
|
||||||
maxNumberOfParticles(),
|
1,
|
||||||
0,
|
0,
|
||||||
RESERVE()
|
RESERVE()
|
||||||
),
|
),
|
||||||
diameters_
|
diameters_
|
||||||
(
|
(
|
||||||
"diameters",
|
"diameters",
|
||||||
maxNumberOfParticles(),
|
1,
|
||||||
0,
|
0,
|
||||||
RESERVE()
|
RESERVE()
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue