mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-07-08 03:07:03 +00:00
Compare commits
245 Commits
d5b9ca4c43
...
main
Author | SHA1 | Date | |
---|---|---|---|
a3c3ca1b84 | |||
94f892f06f | |||
e900128ee7 | |||
75a0f311eb | |||
890dee4021 | |||
4ba301f9d0 | |||
d0c76e2fc4 | |||
c90f775156 | |||
b7f051e099 | |||
ae8ca0d41b | |||
9f17a79fbc | |||
be086ffb67 | |||
a18936c8ec | |||
21a7d0ab4d | |||
c89a297e6f | |||
832d1fb16b | |||
e8ee35791f | |||
a570432f84 | |||
0e4a041ffb | |||
51c6f925d8 | |||
9fb8abb166 | |||
90a8fff673 | |||
a05225ce53 | |||
0053ef002a | |||
ad5233bb77 | |||
d7479cf1bd | |||
83a6e4baa1 | |||
bf0197f643 | |||
5a149f3d85 | |||
80df6bfc9b | |||
b2581cc2a9 | |||
1831c2c6c5 | |||
14731a6c31 | |||
ab856e1df2 | |||
b4bc724a68 | |||
ee33469295 | |||
3933d65303 | |||
cf4d22c963 | |||
86367c7e2c | |||
a7e51a91aa | |||
5e56bf1b8c | |||
343ac1fc04 | |||
6b04d17c7f | |||
97f46379c7 | |||
32fd6cb12e | |||
be16fb0684 | |||
4c96c6fa1e | |||
196b7a1833 | |||
316e71ff7a | |||
7a4a33ef37 | |||
edfbdb22e9 | |||
c6725625b3 | |||
253d6fbaf7 | |||
701baf09e6 | |||
20c94398a9 | |||
dd36e32da4 | |||
a048c2f5d7 | |||
8b324bc2b6 | |||
c7f790a1fa | |||
166d7e72c2 | |||
c126f9a8a3 | |||
7104a33a4b | |||
16b6084d98 | |||
2afea7b273 | |||
2c5b4f55d1 | |||
a7dc69a801 | |||
32287404fa | |||
8b3530c289 | |||
d8c3fc02d5 | |||
4dab700a47 | |||
a50ceeee2c | |||
468730289b | |||
27f0202002 | |||
c69bfc79e1 | |||
69909b3c01 | |||
8986c47b69 | |||
37282f16ac | |||
cd051a6497 | |||
8b5d14afe6 | |||
eb37affb94 | |||
c0d12f4243 | |||
a1b5a9bd5d | |||
dc0edbc845 | |||
b423b6ceb7 | |||
1f6a953154 | |||
bbd3afea0e | |||
53f0e959b0 | |||
c12022fb19 | |||
d876bb6246 | |||
cb40e01b7e | |||
5f6400c032 | |||
8863234c1c | |||
1cd64fb2ec | |||
3fc121ef2b | |||
953059cec5 | |||
2593e2acf1 | |||
7c3b90a22d | |||
72b9b74cc9 | |||
a545acb374 | |||
59fbee9711 | |||
6cc4b3954a | |||
d8c9135700 | |||
544624d579 | |||
cbac1e97b5 | |||
8c543e1649 | |||
be807e4a71 | |||
d5ea338ab3 | |||
a448ce5f8d | |||
e2582f5fd9 | |||
f2e8e69899 | |||
a9e5b9bb59 | |||
77eda47a87 | |||
acb8d0e4eb | |||
19fa3e2822 | |||
73f4b35fd4 | |||
5f8ea2d841 | |||
8da8afbe63 | |||
cde93e953e | |||
c80ee030db | |||
b679b9dcd3 | |||
1a2ad8ffa3 | |||
9de1fa2dc7 | |||
b33fb61672 | |||
245ff9608f | |||
58ef463021 | |||
1100556d72 | |||
14954b3ca6 | |||
3710b19614 | |||
40deb1f9c0 | |||
d69203168e | |||
61be8c60fb | |||
549cb2ffdc | |||
98a30bc98c | |||
7c9a724174 | |||
abd36d4ae7 | |||
35f10e5a94 | |||
093160ba32 | |||
077f25842a | |||
d136ac0262 | |||
c3acea1415 | |||
8e87333973 | |||
162cfd3b6a | |||
ab7f700ead | |||
671b929f52 | |||
c78ab398f6 | |||
d1189c0b2c | |||
ccb7a6dd41 | |||
9e3bb1cfa1 | |||
7bb0a0453a | |||
577a94d07b | |||
5fee39cdd8 | |||
8fe63cca53 | |||
7b534a9e91 | |||
97e6592524 | |||
b7d47a65ad | |||
3441b03167 | |||
340f3a551a | |||
be7b2eb632 | |||
71057e9575 | |||
0613b15c93 | |||
797334af87 | |||
5eef26a6ed | |||
892f5395bc | |||
b65be8881c | |||
23783b7db9 | |||
389e42ee1f | |||
7f7e06ae7d | |||
b007426d5d | |||
3ff4ad1469 | |||
5a5a3c6daf | |||
bff34bbb9e | |||
84197bf237 | |||
169dd73963 | |||
baa99c61c0 | |||
08d0d62d37 | |||
8dcd578a22 | |||
eb62adc87d | |||
5394dce7aa | |||
8038a76699 | |||
c408b60f87 | |||
ab21acdca5 | |||
07b54c4077 | |||
75f679a234 | |||
c32789f34d | |||
09c303a61e | |||
0820e003fc | |||
c4c6c2fc45 | |||
d5dd7af06e | |||
b03d4825ff | |||
67df8ad206 | |||
2df8133c2d | |||
dc0504d2fa | |||
27dfdfa599 | |||
8b9a9acd0c | |||
c87c9716ef | |||
0ed5b2337c | |||
282d9733fc | |||
cfd188587c | |||
e8e1081345 | |||
099e85cfb1 | |||
1cbeb1c963 | |||
a33ec7d8e0 | |||
05ecf37eee | |||
b44c4de3f6 | |||
05b256ba39 | |||
25b2e37d93 | |||
a2561f0f12 | |||
89896c0d69 | |||
fd45625ce6 | |||
3e0161a20f | |||
4552d90eac | |||
98c8116fd3 | |||
fa1211acf8 | |||
12059faefc | |||
3954fcf4ab | |||
ef1fa1ddaf | |||
354daab7c5 | |||
ed4fe6f2f5 | |||
3d0f31a2b2 | |||
ba8f307c56 | |||
f317cef0ef | |||
93617a6ee5 | |||
d7e6292e41 | |||
5a25556b8a | |||
a0c51e94e1 | |||
74c281617b | |||
d2003b35e6 | |||
e05bd2c350 | |||
665879f8ca | |||
e756d471ba | |||
30d5349fcf | |||
68b7d141fa | |||
525e972c20 | |||
6f48eca95b | |||
b5a81bc0fc | |||
d0798dfc0b | |||
729c088c9f | |||
6241fa6dd3 | |||
5f90605a41 | |||
94fcc3d01b | |||
1321e6340e | |||
5864cea7e8 | |||
656e03de36 | |||
41187b0e03 | |||
6969b71cc5 |
153
.github/scripts/sync-wiki.py
vendored
Executable file
153
.github/scripts/sync-wiki.py
vendored
Executable file
@ -0,0 +1,153 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import re
|
||||
import yaml
|
||||
import sys
|
||||
|
||||
# Constants
|
||||
REPO_URL = "https://github.com/PhasicFlow/phasicFlow"
|
||||
REPO_PATH = os.path.join(os.environ.get("GITHUB_WORKSPACE", ""), "repo")
|
||||
WIKI_PATH = os.path.join(os.environ.get("GITHUB_WORKSPACE", ""), "wiki")
|
||||
MAPPING_FILE = os.path.join(REPO_PATH, "doc/mdDocs/markdownList.yml")
|
||||
|
||||
def load_mapping():
|
||||
"""Load the markdown to wiki page mapping file."""
|
||||
try:
|
||||
with open(MAPPING_FILE, 'r') as f:
|
||||
data = yaml.safe_load(f)
|
||||
return data.get('mappings', [])
|
||||
except Exception as e:
|
||||
print(f"Error loading mapping file: {e}")
|
||||
return []
|
||||
|
||||
def convert_relative_links(content, source_path):
|
||||
"""Convert relative links in markdown content to absolute URLs."""
|
||||
# Find markdown links with regex pattern [text](url)
|
||||
md_pattern = r'\[([^\]]+)\]\(([^)]+)\)'
|
||||
|
||||
# Find HTML img tags
|
||||
img_pattern = r'<img\s+src=[\'"]([^\'"]+)[\'"]'
|
||||
|
||||
def replace_link(match):
|
||||
link_text = match.group(1)
|
||||
link_url = match.group(2)
|
||||
|
||||
# Skip if already absolute URL or anchor
|
||||
if link_url.startswith(('http://', 'https://', '#', 'mailto:')):
|
||||
return match.group(0)
|
||||
|
||||
# Get the directory of the source file
|
||||
source_dir = os.path.dirname(source_path)
|
||||
|
||||
# Create absolute path from repository root
|
||||
if link_url.startswith('/'):
|
||||
# If link starts with /, it's already relative to repo root
|
||||
abs_path = link_url
|
||||
else:
|
||||
# Otherwise, it's relative to the file location
|
||||
abs_path = os.path.normpath(os.path.join(source_dir, link_url))
|
||||
if not abs_path.startswith('/'):
|
||||
abs_path = '/' + abs_path
|
||||
|
||||
# Convert to GitHub URL
|
||||
github_url = f"{REPO_URL}/blob/main{abs_path}"
|
||||
return f"[{link_text}]({github_url})"
|
||||
|
||||
def replace_img_src(match):
|
||||
img_src = match.group(1)
|
||||
|
||||
# Skip if already absolute URL
|
||||
if img_src.startswith(('http://', 'https://')):
|
||||
return match.group(0)
|
||||
|
||||
# Get the directory of the source file
|
||||
source_dir = os.path.dirname(source_path)
|
||||
|
||||
# Create absolute path from repository root
|
||||
if img_src.startswith('/'):
|
||||
# If link starts with /, it's already relative to repo root
|
||||
abs_path = img_src
|
||||
else:
|
||||
# Otherwise, it's relative to the file location
|
||||
abs_path = os.path.normpath(os.path.join(source_dir, img_src))
|
||||
if not abs_path.startswith('/'):
|
||||
abs_path = '/' + abs_path
|
||||
|
||||
# Convert to GitHub URL (use raw URL for images)
|
||||
github_url = f"{REPO_URL}/raw/main{abs_path}"
|
||||
return f'<img src="{github_url}"'
|
||||
|
||||
# Replace all markdown links
|
||||
content = re.sub(md_pattern, replace_link, content)
|
||||
|
||||
# Replace all img src tags
|
||||
content = re.sub(img_pattern, replace_img_src, content)
|
||||
|
||||
return content
|
||||
|
||||
def process_file(source_file, target_wiki_page):
|
||||
"""Process a markdown file and copy its contents to a wiki page."""
|
||||
source_path = os.path.join(REPO_PATH, source_file)
|
||||
target_path = os.path.join(WIKI_PATH, f"{target_wiki_page}.md")
|
||||
|
||||
print(f"Processing {source_path} -> {target_path}")
|
||||
|
||||
try:
|
||||
# Check if source exists
|
||||
if not os.path.exists(source_path):
|
||||
print(f"Source file not found: {source_path}")
|
||||
return False
|
||||
|
||||
# Read source content
|
||||
with open(source_path, 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
# Convert relative links
|
||||
content = convert_relative_links(content, source_file)
|
||||
|
||||
# Write to wiki page
|
||||
with open(target_path, 'w') as f:
|
||||
f.write(content)
|
||||
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error processing {source_file}: {e}")
|
||||
return False
|
||||
|
||||
def main():
|
||||
# Check if wiki directory exists
|
||||
if not os.path.exists(WIKI_PATH):
|
||||
print(f"Wiki path not found: {WIKI_PATH}")
|
||||
sys.exit(1)
|
||||
|
||||
# Load mapping
|
||||
mappings = load_mapping()
|
||||
if not mappings:
|
||||
print("No mappings found in the mapping file")
|
||||
sys.exit(1)
|
||||
|
||||
print(f"Found {len(mappings)} mappings to process")
|
||||
|
||||
# Process each mapping
|
||||
success_count = 0
|
||||
for mapping in mappings:
|
||||
source = mapping.get('source')
|
||||
target = mapping.get('target')
|
||||
|
||||
if not source or not target:
|
||||
print(f"Invalid mapping: {mapping}")
|
||||
continue
|
||||
|
||||
if process_file(source, target):
|
||||
success_count += 1
|
||||
|
||||
print(f"Successfully processed {success_count} of {len(mappings)} files")
|
||||
|
||||
# Exit with error if any file failed
|
||||
if success_count < len(mappings):
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
60
.github/workflows/sync-wiki.yml
vendored
Normal file
60
.github/workflows/sync-wiki.yml
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
name: Sync-Wiki
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "**/*.md"
|
||||
- ".github/workflows/sync-wiki.yml"
|
||||
- "doc/mdDocs/markdownList.yml"
|
||||
- ".github/scripts/sync-wiki.py"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync-wiki:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: repo
|
||||
- name: Checkout Wiki
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.repository }}.wiki
|
||||
path: wiki
|
||||
continue-on-error: true
|
||||
- name: Create Wiki Directory if Not Exists
|
||||
run: |
|
||||
if [ ! -d "wiki" ]; then
|
||||
mkdir -p wiki
|
||||
cd wiki
|
||||
git init
|
||||
git config user.name "${{ github.actor }}"
|
||||
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
git remote add origin "https://github.com/${{ github.repository }}.wiki.git"
|
||||
fi
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Install dependencies
|
||||
run: pip install pyyaml
|
||||
- name: Sync markdown files to Wiki
|
||||
run: |
|
||||
python $GITHUB_WORKSPACE/repo/.github/scripts/sync-wiki.py
|
||||
env:
|
||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||
- name: Push changes to wiki
|
||||
run: |
|
||||
cd wiki
|
||||
git config user.name "${{ github.actor }}"
|
||||
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
git add .
|
||||
if git status --porcelain | grep .; then
|
||||
git commit -m "Auto sync wiki from main repository"
|
||||
git push --set-upstream https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.wiki.git master -f
|
||||
else
|
||||
echo "No changes to commit"
|
||||
fi
|
8
.gitignore
vendored
8
.gitignore
vendored
@ -37,11 +37,15 @@
|
||||
*.out
|
||||
*.app
|
||||
|
||||
# directories
|
||||
# Exclude specific directories wherever they appear
|
||||
build/**
|
||||
include/**
|
||||
bin/**
|
||||
lib/**
|
||||
**/build/
|
||||
**/include/
|
||||
**/bin/
|
||||
**/lib/
|
||||
test*/**
|
||||
**/**notnow
|
||||
doc/code-documentation/
|
||||
@ -61,3 +65,5 @@ doc/DTAGS
|
||||
**/[0-9]*.[0-9][0-9][0-9][0-9][0-9][0-9][0-9]
|
||||
**/[0-9]*.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]
|
||||
**/VTK
|
||||
|
||||
|
||||
|
@ -3,30 +3,17 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
||||
# set the project name and version
|
||||
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_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)
|
||||
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)
|
||||
|
||||
#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_Build_Serial "Build phasicFlow and backends for serial 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_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)
|
||||
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_CUDA 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)
|
||||
elseif(pFlow_Build_Cuda)
|
||||
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)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
#add a global include directory
|
||||
include_directories(src/setHelpers src/demComponent "${PROJECT_BINARY_DIR}")
|
||||
|
||||
|
@ -66,12 +66,13 @@ pFlow::uniquePtr<pFlow::DEMSystem>
|
||||
word demSystemName,
|
||||
const std::vector<box>& domains,
|
||||
int argc,
|
||||
char* argv[]
|
||||
char* argv[],
|
||||
bool requireRVel
|
||||
)
|
||||
{
|
||||
if( wordvCtorSelector_.search(demSystemName) )
|
||||
{
|
||||
return wordvCtorSelector_[demSystemName] (demSystemName, domains, argc, argv);
|
||||
return wordvCtorSelector_[demSystemName] (demSystemName, domains, argc, argv, requireRVel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -71,13 +71,15 @@ public:
|
||||
word demSystemName,
|
||||
const std::vector<box>& domains,
|
||||
int argc,
|
||||
char* argv[]
|
||||
char* argv[],
|
||||
bool requireRVel
|
||||
),
|
||||
(
|
||||
demSystemName,
|
||||
domains,
|
||||
argc,
|
||||
argv
|
||||
argv,
|
||||
requireRVel
|
||||
));
|
||||
|
||||
realx3 g()const
|
||||
@ -96,7 +98,7 @@ public:
|
||||
return Control_();
|
||||
}
|
||||
|
||||
auto inline constexpr usingDoulle()const
|
||||
auto inline constexpr usingDouble()const
|
||||
{
|
||||
return pFlow::usingDouble__;
|
||||
}
|
||||
@ -121,6 +123,9 @@ public:
|
||||
virtual
|
||||
span<real> diameter() = 0;
|
||||
|
||||
virtual
|
||||
span<uint32> particleId() = 0;
|
||||
|
||||
virtual
|
||||
span<real> courseGrainFactor() = 0;
|
||||
|
||||
@ -176,7 +181,8 @@ public:
|
||||
word demSystemName,
|
||||
const std::vector<box>& domains,
|
||||
int argc,
|
||||
char* argv[]);
|
||||
char* argv[],
|
||||
bool requireRVel=false);
|
||||
|
||||
};
|
||||
|
||||
|
@ -163,6 +163,12 @@ pFlow::grainDEMSystem::parIndexInDomain(int32 di)const
|
||||
return particleDistribution_->particlesInDomain(di);
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::uint32> pFlow::grainDEMSystem::particleId()
|
||||
{
|
||||
return span<uint32>(particleIdHost_.data(), particleIdHost_.size());
|
||||
}
|
||||
|
||||
|
||||
pFlow::span<pFlow::real> pFlow::grainDEMSystem::diameter()
|
||||
{
|
||||
return span<real>(diameterHost_.data(), diameterHost_.size());
|
||||
@ -233,6 +239,7 @@ bool pFlow::grainDEMSystem::beforeIteration()
|
||||
velocityHost_ = std::as_const(particles_()).velocity().hostView();
|
||||
positionHost_ = std::as_const(particles_()).pointPosition().hostView();
|
||||
diameterHost_ = particles_->diameter().hostView();
|
||||
particleIdHost_ = particles_->particleId().hostView();
|
||||
|
||||
if(requireRVel_)
|
||||
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
|
||||
|
@ -63,6 +63,8 @@ protected:
|
||||
|
||||
ViewType1D<real, HostSpace> diameterHost_;
|
||||
|
||||
ViewType1D<uint32, HostSpace> particleIdHost_;
|
||||
|
||||
bool requireRVel_ = false;
|
||||
|
||||
ViewType1D<realx3, HostSpace> rVelocityHost_;
|
||||
@ -122,6 +124,8 @@ public:
|
||||
|
||||
span<const int32> parIndexInDomain(int32 di)const override;
|
||||
|
||||
span<uint32> particleId() override;
|
||||
|
||||
span<real> diameter() override;
|
||||
|
||||
span<real> courseGrainFactor() override;
|
||||
|
@ -165,6 +165,11 @@ pFlow::sphereDEMSystem::parIndexInDomain(int32 di)const
|
||||
return particleDistribution_->particlesInDomain(di);
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::uint32> pFlow::sphereDEMSystem::particleId()
|
||||
{
|
||||
return span<uint32>();
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::real> pFlow::sphereDEMSystem::diameter()
|
||||
{
|
||||
return span<real>(diameterHost_.data(), diameterHost_.size());
|
||||
@ -235,6 +240,7 @@ bool pFlow::sphereDEMSystem::beforeIteration()
|
||||
velocityHost_ = std::as_const(particles_()).velocity().hostView();
|
||||
positionHost_ = std::as_const(particles_()).pointPosition().hostView();
|
||||
diameterHost_ = particles_->diameter().hostView();
|
||||
particleIdHost_ = particles_->particleId().hostView();
|
||||
|
||||
if(requireRVel_)
|
||||
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
|
||||
|
@ -63,6 +63,8 @@ protected:
|
||||
|
||||
ViewType1D<real, HostSpace> diameterHost_;
|
||||
|
||||
ViewType1D<uint32, HostSpace> particleIdHost_;
|
||||
|
||||
bool requireRVel_ = false;
|
||||
|
||||
ViewType1D<realx3, HostSpace> rVelocityHost_;
|
||||
@ -122,6 +124,8 @@ public:
|
||||
|
||||
span<const int32> parIndexInDomain(int32 di)const override;
|
||||
|
||||
span<uint32> particleId() override;
|
||||
|
||||
span<real> diameter() override;
|
||||
|
||||
span<real> courseGrainFactor() override;
|
||||
|
96
README.md
96
README.md
@ -1,48 +1,76 @@
|
||||
<div align ="center">
|
||||
<img src="doc/phasicFlow_logo_github.png" style="width: 400px;">
|
||||
<div align="center">
|
||||
<img src="doc/phasicFlow_logo_github.png" style="width: 400px;" alt="PhasicFlow Logo">
|
||||
</div>
|
||||
|
||||
## **PhasicFlow: High-Performance Discrete Element Method Simulations**
|
||||
|
||||
**PhasicFlow** is a parallel C++ code for performing DEM simulations. It can run on shared-memory multi-core computational units such as multi-core CPUs or GPUs (for now it works on CUDA-enabled GPUs). The parallelization method mainly relies on loop-level parallelization on a shared-memory computational unit. You can build and run PhasicFlow in serial mode on regular PCs, in parallel mode for multi-core CPUs, or build it for a GPU device to off-load computations to a GPU. In its current statues you can simulate millions of particles (up to 80M particles tested) on a single desktop computer. You can see the [performance tests of PhasicFlow](https://github.com/PhasicFlow/phasicFlow/wiki/Performance-of-phasicFlow) in the wiki page.
|
||||
PhasicFlow is a robust, open-source C++ framework designed for the efficient simulation of granular materials using the Discrete Element Method (DEM). Leveraging parallel computing paradigms, PhasicFlow is capable of executing simulations on shared-memory multi-core architectures, including CPUs and NVIDIA GPUs (CUDA-enabled). The core parallelization strategy focuses on loop-level parallelism, enabling significant performance gains on modern hardware. Users can seamlessly transition between serial execution on standard PCs, parallel execution on multi-core CPUs (OpenMP), and accelerated simulations on GPUs. Currently, PhasicFlow supports simulations involving up to 80 million particles on a single desktop workstation. Detailed performance benchmarks are available on the [PhasicFlow Wiki](https://github.com/PhasicFlow/phasicFlow/wiki/Performance-of-phasicFlow).
|
||||
|
||||
**MPI** parallelization with dynamic load balancing is under development. With this level of parallelization, PhasicFlow can leverage the computational power of **multi-gpu** workstations or clusters with distributed memory CPUs.
|
||||
In summary PhasicFlow can have 6 execution modes:
|
||||
1. Serial on a single CPU core,
|
||||
2. Parallel on a multi-core computer/node (using OpenMP),
|
||||
3. Parallel on an nvidia-GPU (using Cuda),
|
||||
4. Parallel on distributed memory workstation (Using MPI)
|
||||
5. Parallel on distributed memory workstations with multi-core nodes (using MPI+OpenMP)
|
||||
6. Parallel on workstations with multiple GPUs (using MPI+Cuda).
|
||||
## How to build?
|
||||
You can build PhasicFlow for CPU and GPU executions. The latest release of PhasicFlow is v-0.1. [Here is a complete step-by-step procedure for building phasicFlow-v-0.1.](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-Build-PhasicFlow).
|
||||
**Scalable Parallelism: MPI Integration**
|
||||
|
||||
## Online code documentation
|
||||
You can find a full documentation of the code, its features, and other related materials on [online documentation of the code](https://phasicflow.github.io/phasicFlow/)
|
||||
Ongoing development includes the integration of MPI-based parallelization with dynamic load balancing. This enhancement will extend PhasicFlow's capabilities to distributed memory environments, such as multi-GPU workstations and high-performance computing clusters. Upon completion, PhasicFlow will offer six distinct execution modes:
|
||||
|
||||
## How to use PhasicFlow?
|
||||
You can navigate into [tutorials folder](./tutorials) in the phasicFlow folder to see some simulation case setups. If you need more detailed discription, visit our [wiki page tutorials](https://github.com/PhasicFlow/phasicFlow/wiki/Tutorials).
|
||||
1. **Serial Execution:** Single-core CPU.
|
||||
2. **Shared-Memory Parallelism:** Multi-core CPU (OpenMP).
|
||||
3. **GPU Acceleration:** NVIDIA GPU (CUDA).
|
||||
4. **Distributed-Memory Parallelism:** MPI.
|
||||
5. **Hybrid Parallelism:** MPI + OpenMP.
|
||||
6. **Multi-GPU Parallelism:** MPI + CUDA.
|
||||
|
||||
## [PhasicFlowPlus](https://github.com/PhasicFlow/PhasicFlowPlus)
|
||||
PhasicFlowPlus is and extension to PhasicFlow for simulating particle-fluid systems using resolved and unresolved CFD-DEM. [See the repository of this package.](https://github.com/PhasicFlow/PhasicFlowPlus)
|
||||
## **Build and Installation**
|
||||
|
||||
PhasicFlow can be compiled for both CPU and GPU execution.
|
||||
|
||||
## Supporting packages
|
||||
* [Kokkos](https://github.com/kokkos/kokkos) from National Technology & Engineering Solutions of Sandia, LLC (NTESS)
|
||||
* [CLI11 1.8](https://github.com/CLIUtils/CLI11) from University of Cincinnati.
|
||||
* **Current Development (v-1.0):** Comprehensive build instructions are available [here](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-build-PhasicFlow%E2%80%90v%E2%80%901.0).
|
||||
* **Latest Release (v-0.1):** Detailed build instructions are available [here](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-Build-PhasicFlow).
|
||||
|
||||
## **Comprehensive Documentation**
|
||||
|
||||
In-depth documentation, including code structure, features, and usage guidelines, is accessible via the [online documentation portal](https://phasicflow.github.io/phasicFlow/).
|
||||
|
||||
### **Tutorials and Examples**
|
||||
|
||||
Practical examples and simulation setups are provided in the [tutorials directory](./tutorials). For detailed explanations and step-by-step guides, please refer to the [tutorial section on the PhasicFlow Wiki](https://github.com/PhasicFlow/phasicFlow/wiki/Tutorials).
|
||||
|
||||
## Contributing to PhasicFlow
|
||||
We welcome contributions to PhasicFlow! Whether you're a developer or a new user, there are many ways to get involved. Here's how you can help:
|
||||
1. Bug Reports
|
||||
2. Suggestions for better user experience
|
||||
3. Feature request and algorithm improvements
|
||||
4. Tutorials, Simulation Case Setups and documentation
|
||||
5. Direct Code Contributions
|
||||
|
||||
For more details on how you can contribute to PhasicFlow see [this page](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-contribute-to-PhasicFlow).
|
||||
|
||||
## **PhasicFlowPlus: Coupled CFD-DEM Simulations**
|
||||
|
||||
PhasicFlowPlus is an extension of PhasicFlow that facilitates the simulation of particle-fluid systems using resolved and unresolved CFD-DEM methods. The repository for PhasicFlowPlus can be found [here](https://github.com/PhasicFlow/PhasicFlowPlus).
|
||||
|
||||
## How to cite PhasicFlow?
|
||||
|
||||
## How to cite PhasicFlow
|
||||
If you are using PhasicFlow in your research or industrial work, cite the following [article](https://www.sciencedirect.com/science/article/pii/S0010465523001662):
|
||||
|
||||
```
|
||||
@article{NOROUZI2023108821,
|
||||
title = {PhasicFlow: A parallel, multi-architecture open-source code for DEM simulations},
|
||||
journal = {Computer Physics Communications},
|
||||
volume = {291},
|
||||
pages = {108821},
|
||||
year = {2023},
|
||||
issn = {0010-4655},
|
||||
doi = {https://doi.org/10.1016/j.cpc.2023.108821},
|
||||
url = {https://www.sciencedirect.com/science/article/pii/S0010465523001662},
|
||||
author = {H.R. Norouzi},
|
||||
keywords = {Discrete element method, Parallel computing, CUDA, GPU, OpenMP, Granular flow}
|
||||
@article
|
||||
{
|
||||
NOROUZI2023108821,
|
||||
title = {PhasicFlow: A parallel, multi-architecture open-source code for DEM simulations},
|
||||
journal = {Computer Physics Communications},
|
||||
volume = {291},
|
||||
pages = {108821},
|
||||
year = {2023},
|
||||
issn = {0010-4655},
|
||||
doi = {https://doi.org/10.1016/j.cpc.2023.108821},
|
||||
url = {https://www.sciencedirect.com/science/article/pii/S0010465523001662},
|
||||
author = {H.R. Norouzi},
|
||||
keywords = {Discrete element method, Parallel computing, CUDA, GPU, OpenMP, Granular flow}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## **Dependencies**
|
||||
|
||||
PhasicFlow relies on the following external libraries:
|
||||
|
||||
* **Kokkos:** A community-led performance portability ecosystem within the Linux Foundation's High-Performance Software Foundation (HPSF). ([https://github.com/kokkos/kokkos](https://github.com/kokkos/kokkos))
|
||||
* **CLI11 1.8:** A command-line interface parser developed by the University of Cincinnati. ([https://github.com/CLIUtils/CLI11](https://github.com/CLIUtils/CLI11))
|
||||
|
@ -2,18 +2,21 @@
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName interaction;
|
||||
objectType dicrionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
materials (glassMat wallMat); // a list of materials names
|
||||
|
||||
densities (2500.0 2500); // density of materials [kg/m3]
|
||||
|
||||
contactListType sortedContactList;
|
||||
|
||||
model
|
||||
{
|
||||
contactForceModel nonLinearLimited;
|
||||
contactForceModel nonLinearLimited;
|
||||
|
||||
rollingFrictionModel normal;
|
||||
|
||||
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
|
||||
@ -28,9 +31,6 @@ model
|
||||
en (0.97 0.85 // coefficient of normal restitution
|
||||
1.00);
|
||||
|
||||
et (1.0 1.0 // coefficient of tangential restitution
|
||||
1.0);
|
||||
|
||||
mu (0.65 0.65 // dynamic friction
|
||||
0.65);
|
||||
|
||||
@ -41,19 +41,13 @@ model
|
||||
|
||||
contactSearch
|
||||
{
|
||||
method NBS;
|
||||
wallMapping cellMapping;
|
||||
method NBS;
|
||||
|
||||
NBSInfo
|
||||
{
|
||||
updateFrequency 10; // each 20 timesteps, update neighbor list
|
||||
sizeRatio 1.1; // bounding box size to particle diameter (max)
|
||||
}
|
||||
updateInterval 10;
|
||||
|
||||
cellMappingInfo
|
||||
{
|
||||
updateFrequency 10; // each 20 timesteps, update neighbor list
|
||||
cellExtent 0.6; // bounding box for particle-wall search (> 0.5)
|
||||
}
|
||||
sizeRatio 1.1;
|
||||
|
||||
cellExtent 0.55;
|
||||
|
||||
adjustableBox Yes;
|
||||
}
|
72
benchmarks/helicalMixer/helicalMixer_1m/caseSetup/particleInsertion
Executable file
72
benchmarks/helicalMixer/helicalMixer_1m/caseSetup/particleInsertion
Executable file
@ -0,0 +1,72 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particleInsertion;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
active yes; // is insertion active?
|
||||
|
||||
particleInlet1
|
||||
{
|
||||
regionType box; // type of insertion region
|
||||
|
||||
rate 250000; // insertion rate (particles/s)
|
||||
|
||||
timeControl simulationTime;
|
||||
|
||||
startTime 0; // (s)
|
||||
|
||||
endTime 2.0; // (s)
|
||||
|
||||
insertionInterval 0.05; //s
|
||||
|
||||
boxInfo
|
||||
{
|
||||
min (-0.17 0.23 0.46); // (m,m,m)
|
||||
max ( 0.17 0.24 0.88); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
smallParticle 1; // mixture composition of inserted particles
|
||||
}
|
||||
}
|
||||
|
||||
particleInlet2
|
||||
{
|
||||
regionType box; // type of insertion region
|
||||
|
||||
rate 250000; // insertion rate (particles/s)
|
||||
|
||||
timeControl simulationTime;
|
||||
|
||||
startTime 0; // (s)
|
||||
|
||||
endTime 2.0; // (s)
|
||||
|
||||
insertionInterval 0.05; //s
|
||||
|
||||
boxInfo
|
||||
{
|
||||
min ( -0.17 0.23 0.02); // (m,m,m)
|
||||
max ( 0.17 0.24 0.44); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
largeParticle 1; // mixture composition of inserted particles
|
||||
}
|
||||
}
|
13
tutorials/sphereGranFlow/RotatingDrumWithBaffles/caseSetup/sphereShape → benchmarks/helicalMixer/helicalMixer_1m/caseSetup/shapes
Normal file → Executable file
13
tutorials/sphereGranFlow/RotatingDrumWithBaffles/caseSetup/sphereShape → benchmarks/helicalMixer/helicalMixer_1m/caseSetup/shapes
Normal file → Executable file
@ -2,14 +2,11 @@
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName sphereDict;
|
||||
objectType sphereShape;
|
||||
objectName shapes;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// names of shapes
|
||||
names (smallSphere largeSphere);
|
||||
// diameter of shapes (m)
|
||||
diameters (0.004 0.005);
|
||||
// material names for shapes
|
||||
materials (lightMat heavyMat);
|
||||
names (smallParticle largeParticle); // names of shapes
|
||||
diameters (0.004 0.00401); // diameter of shapes
|
||||
materials (glassMat glassMat); // material names for shapes
|
7
benchmarks/helicalMixer/helicalMixer_1m/cleanThisCase
Executable file
7
benchmarks/helicalMixer/helicalMixer_1m/cleanThisCase
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
|
||||
rm -rf VTK
|
||||
rm -rf stl
|
||||
#------------------------------------------------------------------------------
|
32
benchmarks/helicalMixer/helicalMixer_1m/runThisCase
Executable file
32
benchmarks/helicalMixer/helicalMixer_1m/runThisCase
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e # Exit immediately if a command exits with a non-zero status
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "0) Copying stl files"
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
mkdir -p stl
|
||||
cp -rfv $pFlow_PROJECT_DIR/resources/stls/helicalMixer/* ./stl/
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "1) Creating particles"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
particlesPhasicFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "2) Creating geometry"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
geometryPhasicFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "3) Running the case"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
sphereGranFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "4) Converting to VtK"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
pFlowToVTK -f diameter id velocity --binary
|
||||
|
||||
#------------------------------------------------------------------------------
|
49
benchmarks/helicalMixer/helicalMixer_1m/settings/domainDict
Executable file
49
benchmarks/helicalMixer/helicalMixer_1m/settings/domainDict
Executable file
@ -0,0 +1,49 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName domainDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// Simulation domain
|
||||
globalBox
|
||||
{
|
||||
min (-0.19 -0.19 -0.02);
|
||||
max ( 0.19 0.26 0.92);
|
||||
}
|
||||
|
||||
boundaries
|
||||
{
|
||||
|
||||
left
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
rear
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName geometryDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// motion model: rotating object around an axis
|
||||
motionModel rotatingAxis;
|
||||
|
||||
rotatingAxisInfo
|
||||
{
|
||||
rotAxis
|
||||
{
|
||||
// end points of axis
|
||||
p1 (0 0 0);
|
||||
p2 (0 0 1);
|
||||
|
||||
// rotation speed (rad/s) => 30 rpm
|
||||
omega 3.1428;
|
||||
|
||||
// interval for rotation of axis
|
||||
startTime 2.5;
|
||||
endTime 100;
|
||||
}
|
||||
}
|
||||
|
||||
surfaces
|
||||
{
|
||||
|
||||
helix
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file helix2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
shell
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file shell2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion none; // motion component name
|
||||
}
|
||||
|
||||
plug
|
||||
{
|
||||
type planeWall;
|
||||
p1 (-0.075 -0.185 0.375);
|
||||
p2 ( 0.075 -0.185 0.375);
|
||||
p3 ( 0.075 -0.185 0.525);
|
||||
p4 (-0.075 -0.185 0.525);
|
||||
material wallMat;
|
||||
motion none;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particlesDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
setFields
|
||||
{
|
||||
defaultValue
|
||||
{
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word smallParticle; // name of the particle shape
|
||||
}
|
||||
|
||||
selectors
|
||||
{}
|
||||
}
|
||||
|
||||
positionParticles
|
||||
{
|
||||
method empty; // creates the required fields with zero particles (empty).
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName settingsDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
run helicalMixer;
|
||||
|
||||
dt 0.00001; // time step for integration (s)
|
||||
|
||||
startTime 0; // start time for simulation
|
||||
|
||||
endTime 2; // end time for simulation
|
||||
|
||||
saveInterval 0.05; // time interval for saving the simulation
|
||||
|
||||
timePrecision 4; // maximum number of digits for time folder
|
||||
|
||||
g (0 -9.8 0); // gravity vector (m/s2)
|
||||
|
||||
// save necessary (i.e., required) data on disk
|
||||
includeObjects (diameter);
|
||||
|
||||
// exclude unnecessary data from saving on disk
|
||||
excludeObjects ();
|
||||
|
||||
integrationMethod AdamsBashforth2; // integration method
|
||||
|
||||
integrationHistory off; // Do not save integration history on the disk
|
||||
|
||||
writeFormat binary; // data writting format (ascii or binary)
|
||||
|
||||
timersReport Yes; // report timers (Yes or No)
|
||||
|
||||
timersReportInterval 0.05; // time interval for reporting timers
|
@ -2,18 +2,21 @@
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName interaction;
|
||||
objectType dicrionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
materials (glassMat wallMat); // a list of materials names
|
||||
|
||||
densities (2500.0 2500); // density of materials [kg/m3]
|
||||
|
||||
contactListType sortedContactList;
|
||||
|
||||
model
|
||||
{
|
||||
contactForceModel nonLinearLimited;
|
||||
contactForceModel nonLinearLimited;
|
||||
|
||||
rollingFrictionModel normal;
|
||||
|
||||
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
|
||||
@ -28,9 +31,6 @@ model
|
||||
en (0.97 0.85 // coefficient of normal restitution
|
||||
1.00);
|
||||
|
||||
et (1.0 1.0 // coefficient of tangential restitution
|
||||
1.0);
|
||||
|
||||
mu (0.65 0.65 // dynamic friction
|
||||
0.65);
|
||||
|
||||
@ -41,19 +41,13 @@ model
|
||||
|
||||
contactSearch
|
||||
{
|
||||
method NBS;
|
||||
wallMapping cellMapping;
|
||||
method NBS;
|
||||
|
||||
NBSInfo
|
||||
{
|
||||
updateFrequency 10; // each 20 timesteps, update neighbor list
|
||||
sizeRatio 1.05; // bounding box size to particle diameter (max)
|
||||
}
|
||||
updateInterval 10;
|
||||
|
||||
cellMappingInfo
|
||||
{
|
||||
updateFrequency 10; // each 20 timesteps, update neighbor list
|
||||
cellExtent 0.6; // bounding box for particle-wall search (> 0.5)
|
||||
}
|
||||
sizeRatio 1.1;
|
||||
|
||||
cellExtent 0.55;
|
||||
|
||||
adjustableBox Yes;
|
||||
}
|
72
benchmarks/helicalMixer/helicalMixer_250K/caseSetup/particleInsertion
Executable file
72
benchmarks/helicalMixer/helicalMixer_250K/caseSetup/particleInsertion
Executable file
@ -0,0 +1,72 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particleInsertion;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
active yes; // is insertion active?
|
||||
|
||||
particleInlet1
|
||||
{
|
||||
regionType box; // type of insertion region
|
||||
|
||||
rate 62500; // insertion rate (particles/s)
|
||||
|
||||
timeControl simulationTime;
|
||||
|
||||
startTime 0; // (s)
|
||||
|
||||
endTime 2.0; // (s)
|
||||
|
||||
insertionInterval 0.05; //s
|
||||
|
||||
boxInfo
|
||||
{
|
||||
min (-0.17 0.23 0.46); // (m,m,m)
|
||||
max ( 0.17 0.24 0.88); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
smallParticle 1; // mixture composition of inserted particles
|
||||
}
|
||||
}
|
||||
|
||||
particleInlet2
|
||||
{
|
||||
regionType box; // type of insertion region
|
||||
|
||||
rate 62500; // insertion rate (particles/s)
|
||||
|
||||
timeControl simulationTime;
|
||||
|
||||
startTime 0; // (s)
|
||||
|
||||
endTime 2.0; // (s)
|
||||
|
||||
insertionInterval 0.05; //s
|
||||
|
||||
boxInfo
|
||||
{
|
||||
min ( -0.17 0.23 0.02); // (m,m,m)
|
||||
max ( 0.17 0.24 0.44); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
largeParticle 1; // mixture composition of inserted particles
|
||||
}
|
||||
}
|
@ -2,11 +2,11 @@
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particleInsertion;
|
||||
objectType dicrionary;
|
||||
objectName shapes;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
active No; // is checked -> Yes or No
|
||||
|
||||
collisionCheck No; // is insertion active -> Yes or No
|
||||
|
||||
names (smallParticle largeParticle); // names of shapes
|
||||
diameters (0.006 0.00601); // diameter of shapes
|
||||
materials (glassMat glassMat); // material names for shapes
|
8
benchmarks/helicalMixer/helicalMixer_250K/cleanThisCase
Executable file
8
benchmarks/helicalMixer/helicalMixer_250K/cleanThisCase
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
|
||||
rm -rf VTK
|
||||
rm -rf stl
|
||||
|
||||
#------------------------------------------------------------------------------
|
30
benchmarks/helicalMixer/helicalMixer_250K/runThisCase
Executable file
30
benchmarks/helicalMixer/helicalMixer_250K/runThisCase
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
set -e # Exit immediately if a command exits with a non-zero status
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "0) Copying stl files"
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
mkdir -p stl
|
||||
cp -rfv $pFlow_PROJECT_DIR/resources/stls/helicalMixer/* ./stl/
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "1) Creating particles"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
particlesPhasicFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "2) Creating geometry"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
geometryPhasicFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "3) Running the case"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
sphereGranFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "4) Converting to VtK"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
pFlowToVTK -f diameter id velocity --binary
|
||||
|
||||
#------------------------------------------------------------------------------
|
49
benchmarks/helicalMixer/helicalMixer_250K/settings/domainDict
Executable file
49
benchmarks/helicalMixer/helicalMixer_250K/settings/domainDict
Executable file
@ -0,0 +1,49 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName domainDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// Simulation domain
|
||||
globalBox
|
||||
{
|
||||
min (-0.19 -0.19 -0.02);
|
||||
max ( 0.19 0.26 0.92);
|
||||
}
|
||||
|
||||
boundaries
|
||||
{
|
||||
|
||||
left
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
rear
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName geometryDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// motion model: rotating object around an axis
|
||||
motionModel rotatingAxis;
|
||||
|
||||
rotatingAxisInfo
|
||||
{
|
||||
rotAxis
|
||||
{
|
||||
// end points of axis
|
||||
p1 (0 0 0);
|
||||
p2 (0 0 1);
|
||||
|
||||
// rotation speed (rad/s) => 30 rpm
|
||||
omega 3.1428;
|
||||
|
||||
// interval for rotation of axis
|
||||
startTime 2.5;
|
||||
endTime 100;
|
||||
}
|
||||
}
|
||||
|
||||
surfaces
|
||||
{
|
||||
|
||||
helix
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file helix2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
shell
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file shell2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion none; // motion component name
|
||||
}
|
||||
|
||||
plug
|
||||
{
|
||||
type planeWall;
|
||||
p1 (-0.075 -0.185 0.375);
|
||||
p2 ( 0.075 -0.185 0.375);
|
||||
p3 ( 0.075 -0.185 0.525);
|
||||
p4 (-0.075 -0.185 0.525);
|
||||
material wallMat;
|
||||
motion none;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particlesDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
setFields
|
||||
{
|
||||
defaultValue
|
||||
{
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word smallParticle; // name of the particle shape
|
||||
}
|
||||
|
||||
selectors
|
||||
{}
|
||||
}
|
||||
|
||||
positionParticles
|
||||
{
|
||||
method empty; // creates the required fields with zero particles (empty).
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName settingsDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
run helicalMixer;
|
||||
|
||||
dt 0.00001; // time step for integration (s)
|
||||
|
||||
startTime 0; // start time for simulation
|
||||
|
||||
endTime 7.5; // end time for simulation
|
||||
|
||||
saveInterval 0.05; // time interval for saving the simulation
|
||||
|
||||
timePrecision 4; // maximum number of digits for time folder
|
||||
|
||||
g (0 -9.8 0); // gravity vector (m/s2)
|
||||
|
||||
// save necessary (i.e., required) data on disk
|
||||
includeObjects (diameter);
|
||||
|
||||
// exclude unnecessary data from saving on disk
|
||||
excludeObjects ();
|
||||
|
||||
integrationMethod AdamsBashforth2; // integration method
|
||||
|
||||
integrationHistory off; // Do not save integration history on the disk
|
||||
|
||||
writeFormat binary; // data writting format (ascii or binary)
|
||||
|
||||
timersReport Yes; // report timers (Yes or No)
|
||||
|
||||
timersReportInterval 0.05; // time interval for reporting timers
|
53
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/interaction
Executable file
53
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/interaction
Executable file
@ -0,0 +1,53 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName interaction;
|
||||
objectType dicrionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
materials (glassMat wallMat); // a list of materials names
|
||||
|
||||
densities (2500.0 2500); // density of materials [kg/m3]
|
||||
|
||||
contactListType sortedContactList;
|
||||
|
||||
model
|
||||
{
|
||||
contactForceModel nonLinearLimited;
|
||||
|
||||
rollingFrictionModel normal;
|
||||
|
||||
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
|
||||
1.0e6);
|
||||
|
||||
Geff (0.8e6 0.8e6 // Shear modulus [Pa]
|
||||
0.8e6);
|
||||
|
||||
nu (0.25 0.25 // Poisson's ratio [-]
|
||||
0.25);
|
||||
|
||||
en (0.97 0.85 // coefficient of normal restitution
|
||||
1.00);
|
||||
|
||||
mu (0.65 0.65 // dynamic friction
|
||||
0.65);
|
||||
|
||||
mur (0.1 0.1 // rolling friction
|
||||
0.1);
|
||||
|
||||
}
|
||||
|
||||
contactSearch
|
||||
{
|
||||
method NBS;
|
||||
|
||||
updateInterval 10;
|
||||
|
||||
sizeRatio 1.1;
|
||||
|
||||
cellExtent 0.55;
|
||||
|
||||
adjustableBox Yes;
|
||||
}
|
72
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/particleInsertion
Executable file
72
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/particleInsertion
Executable file
@ -0,0 +1,72 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particleInsertion;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
active yes; // is insertion active?
|
||||
|
||||
particleInlet1
|
||||
{
|
||||
regionType box; // type of insertion region
|
||||
|
||||
rate 500000; // insertion rate (particles/s)
|
||||
|
||||
timeControl simulationTime;
|
||||
|
||||
startTime 0; // (s)
|
||||
|
||||
endTime 2.0; // (s)
|
||||
|
||||
insertionInterval 0.05; //s
|
||||
|
||||
boxInfo
|
||||
{
|
||||
min (-0.17 0.23 0.46); // (m,m,m)
|
||||
max ( 0.17 0.24 0.88); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
smallParticle 1; // mixture composition of inserted particles
|
||||
}
|
||||
}
|
||||
|
||||
particleInlet2
|
||||
{
|
||||
regionType box; // type of insertion region
|
||||
|
||||
rate 500000; // insertion rate (particles/s)
|
||||
|
||||
timeControl simulationTime;
|
||||
|
||||
startTime 0; // (s)
|
||||
|
||||
endTime 2.0; // (s)
|
||||
|
||||
insertionInterval 0.05; //s
|
||||
|
||||
boxInfo
|
||||
{
|
||||
min ( -0.17 0.23 0.02); // (m,m,m)
|
||||
max ( 0.17 0.24 0.44); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
largeParticle 1; // mixture composition of inserted particles
|
||||
}
|
||||
}
|
12
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/shapes
Executable file
12
benchmarks/helicalMixer/helicalMixer_2m/caseSetup/shapes
Executable file
@ -0,0 +1,12 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName shapes;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
names (smallParticle largeParticle); // names of shapes
|
||||
diameters (0.003 0.00301); // diameter of shapes
|
||||
materials (glassMat glassMat); // material names for shapes
|
7
benchmarks/helicalMixer/helicalMixer_2m/cleanThisCase
Executable file
7
benchmarks/helicalMixer/helicalMixer_2m/cleanThisCase
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
|
||||
rm -rf VTK
|
||||
rm -rf stl
|
||||
#------------------------------------------------------------------------------
|
32
benchmarks/helicalMixer/helicalMixer_2m/runThisCase
Executable file
32
benchmarks/helicalMixer/helicalMixer_2m/runThisCase
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e # Exit immediately if a command exits with a non-zero status
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "0) Copying stl files"
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
mkdir -p stl
|
||||
cp -rfv $pFlow_PROJECT_DIR/resources/stls/helicalMixer/* ./stl/
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "1) Creating particles"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
particlesPhasicFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "2) Creating geometry"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
geometryPhasicFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "3) Running the case"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
sphereGranFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "4) Converting to VtK"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
pFlowToVTK -f diameter id velocity --binary
|
||||
|
||||
#------------------------------------------------------------------------------
|
49
benchmarks/helicalMixer/helicalMixer_2m/settings/domainDict
Executable file
49
benchmarks/helicalMixer/helicalMixer_2m/settings/domainDict
Executable file
@ -0,0 +1,49 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName domainDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// Simulation domain
|
||||
globalBox
|
||||
{
|
||||
min (-0.19 -0.19 -0.02);
|
||||
max ( 0.19 0.26 0.92);
|
||||
}
|
||||
|
||||
boundaries
|
||||
{
|
||||
|
||||
left
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
rear
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName geometryDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// motion model: rotating object around an axis
|
||||
motionModel rotatingAxis;
|
||||
|
||||
rotatingAxisInfo
|
||||
{
|
||||
rotAxis
|
||||
{
|
||||
// end points of axis
|
||||
p1 (0 0 0);
|
||||
p2 (0 0 1);
|
||||
|
||||
// rotation speed (rad/s) => 30 rpm
|
||||
omega 3.1428;
|
||||
|
||||
// interval for rotation of axis
|
||||
startTime 2.5;
|
||||
endTime 100;
|
||||
}
|
||||
}
|
||||
|
||||
surfaces
|
||||
{
|
||||
|
||||
helix
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file helix2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
shell
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file shell2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion none; // motion component name
|
||||
}
|
||||
|
||||
plug
|
||||
{
|
||||
type planeWall;
|
||||
p1 (-0.075 -0.185 0.375);
|
||||
p2 ( 0.075 -0.185 0.375);
|
||||
p3 ( 0.075 -0.185 0.525);
|
||||
p4 (-0.075 -0.185 0.525);
|
||||
material wallMat;
|
||||
motion none;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particlesDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
setFields
|
||||
{
|
||||
defaultValue
|
||||
{
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word smallParticle; // name of the particle shape
|
||||
}
|
||||
|
||||
selectors
|
||||
{}
|
||||
}
|
||||
|
||||
positionParticles
|
||||
{
|
||||
method empty; // creates the required fields with zero particles (empty).
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName settingsDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
run helicalMixer;
|
||||
|
||||
dt 0.00001; // time step for integration (s)
|
||||
|
||||
startTime 0; // start time for simulation
|
||||
|
||||
endTime 2; // end time for simulation
|
||||
|
||||
saveInterval 0.05; // time interval for saving the simulation
|
||||
|
||||
timePrecision 4; // maximum number of digits for time folder
|
||||
|
||||
g (0 -9.8 0); // gravity vector (m/s2)
|
||||
|
||||
// save necessary (i.e., required) data on disk
|
||||
includeObjects (diameter);
|
||||
|
||||
// exclude unnecessary data from saving on disk
|
||||
excludeObjects ();
|
||||
|
||||
integrationMethod AdamsBashforth2; // integration method
|
||||
|
||||
integrationHistory off; // Do not save integration history on the disk
|
||||
|
||||
writeFormat binary; // data writting format (ascii or binary)
|
||||
|
||||
timersReport Yes; // report timers (Yes or No)
|
||||
|
||||
timersReportInterval 0.05; // time interval for reporting timers
|
53
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/interaction
Executable file
53
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/interaction
Executable file
@ -0,0 +1,53 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName interaction;
|
||||
objectType dicrionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
materials (glassMat wallMat); // a list of materials names
|
||||
|
||||
densities (2500.0 2500); // density of materials [kg/m3]
|
||||
|
||||
contactListType sortedContactList;
|
||||
|
||||
model
|
||||
{
|
||||
contactForceModel nonLinearLimited;
|
||||
|
||||
rollingFrictionModel normal;
|
||||
|
||||
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
|
||||
1.0e6);
|
||||
|
||||
Geff (0.8e6 0.8e6 // Shear modulus [Pa]
|
||||
0.8e6);
|
||||
|
||||
nu (0.25 0.25 // Poisson's ratio [-]
|
||||
0.25);
|
||||
|
||||
en (0.97 0.85 // coefficient of normal restitution
|
||||
1.00);
|
||||
|
||||
mu (0.65 0.65 // dynamic friction
|
||||
0.65);
|
||||
|
||||
mur (0.1 0.1 // rolling friction
|
||||
0.1);
|
||||
|
||||
}
|
||||
|
||||
contactSearch
|
||||
{
|
||||
method NBS;
|
||||
|
||||
updateInterval 10;
|
||||
|
||||
sizeRatio 1.1;
|
||||
|
||||
cellExtent 0.55;
|
||||
|
||||
adjustableBox Yes;
|
||||
}
|
72
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/particleInsertion
Executable file
72
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/particleInsertion
Executable file
@ -0,0 +1,72 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particleInsertion;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
active yes; // is insertion active?
|
||||
|
||||
particleInlet1
|
||||
{
|
||||
regionType box; // type of insertion region
|
||||
|
||||
rate 1000000; // insertion rate (particles/s)
|
||||
|
||||
timeControl simulationTime;
|
||||
|
||||
startTime 0; // (s)
|
||||
|
||||
endTime 2.0; // (s)
|
||||
|
||||
insertionInterval 0.05; //s
|
||||
|
||||
boxInfo
|
||||
{
|
||||
min (-0.17 0.23 0.46); // (m,m,m)
|
||||
max ( 0.17 0.24 0.88); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
smallParticle 1; // mixture composition of inserted particles
|
||||
}
|
||||
}
|
||||
|
||||
particleInlet2
|
||||
{
|
||||
regionType box; // type of insertion region
|
||||
|
||||
rate 1000000; // insertion rate (particles/s)
|
||||
|
||||
timeControl simulationTime;
|
||||
|
||||
startTime 0; // (s)
|
||||
|
||||
endTime 2.0; // (s)
|
||||
|
||||
insertionInterval 0.05; //s
|
||||
|
||||
boxInfo
|
||||
{
|
||||
min ( -0.17 0.23 0.02); // (m,m,m)
|
||||
max ( 0.17 0.24 0.44); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
largeParticle 1; // mixture composition of inserted particles
|
||||
}
|
||||
}
|
12
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/shapes
Executable file
12
benchmarks/helicalMixer/helicalMixer_4m/caseSetup/shapes
Executable file
@ -0,0 +1,12 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName shapes;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
names (smallParticle largeParticle); // names of shapes
|
||||
diameters (0.002 0.00201); // diameter of shapes
|
||||
materials (glassMat glassMat); // material names for shapes
|
7
benchmarks/helicalMixer/helicalMixer_4m/cleanThisCase
Executable file
7
benchmarks/helicalMixer/helicalMixer_4m/cleanThisCase
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
|
||||
rm -rf VTK
|
||||
rm -rf stl
|
||||
#------------------------------------------------------------------------------
|
32
benchmarks/helicalMixer/helicalMixer_4m/runThisCase
Executable file
32
benchmarks/helicalMixer/helicalMixer_4m/runThisCase
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e # Exit immediately if a command exits with a non-zero status
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "0) Copying stl files"
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
mkdir -p stl
|
||||
cp -rfv $pFlow_PROJECT_DIR/resources/stls/helicalMixer/* ./stl/
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "1) Creating particles"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
particlesPhasicFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "2) Creating geometry"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
geometryPhasicFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "3) Running the case"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
sphereGranFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "4) Converting to VtK"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
pFlowToVTK -f diameter id velocity --binary
|
||||
|
||||
#------------------------------------------------------------------------------
|
49
benchmarks/helicalMixer/helicalMixer_4m/settings/domainDict
Executable file
49
benchmarks/helicalMixer/helicalMixer_4m/settings/domainDict
Executable file
@ -0,0 +1,49 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName domainDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// Simulation domain
|
||||
globalBox
|
||||
{
|
||||
min (-0.19 -0.19 -0.02);
|
||||
max ( 0.19 0.26 0.92);
|
||||
}
|
||||
|
||||
boundaries
|
||||
{
|
||||
|
||||
left
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
rear
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName geometryDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// motion model: rotating object around an axis
|
||||
motionModel rotatingAxis;
|
||||
|
||||
rotatingAxisInfo
|
||||
{
|
||||
rotAxis
|
||||
{
|
||||
// end points of axis
|
||||
p1 (0 0 0);
|
||||
p2 (0 0 1);
|
||||
|
||||
// rotation speed (rad/s) => 30 rpm
|
||||
omega 3.1428;
|
||||
|
||||
// interval for rotation of axis
|
||||
startTime 2.5;
|
||||
endTime 100;
|
||||
}
|
||||
}
|
||||
|
||||
surfaces
|
||||
{
|
||||
|
||||
helix
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file helix2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
shell
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file shell2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion none; // motion component name
|
||||
}
|
||||
|
||||
plug
|
||||
{
|
||||
type planeWall;
|
||||
p1 (-0.075 -0.185 0.375);
|
||||
p2 ( 0.075 -0.185 0.375);
|
||||
p3 ( 0.075 -0.185 0.525);
|
||||
p4 (-0.075 -0.185 0.525);
|
||||
material wallMat;
|
||||
motion none;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particlesDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
setFields
|
||||
{
|
||||
defaultValue
|
||||
{
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word smallParticle; // name of the particle shape
|
||||
}
|
||||
|
||||
selectors
|
||||
{}
|
||||
}
|
||||
|
||||
positionParticles
|
||||
{
|
||||
method empty; // creates the required fields with zero particles (empty).
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName settingsDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
run helicalMixer;
|
||||
|
||||
dt 0.00001; // time step for integration (s)
|
||||
|
||||
startTime 0; // start time for simulation
|
||||
|
||||
endTime 2; // end time for simulation
|
||||
|
||||
saveInterval 0.05; // time interval for saving the simulation
|
||||
|
||||
timePrecision 4; // maximum number of digits for time folder
|
||||
|
||||
g (0 -9.8 0); // gravity vector (m/s2)
|
||||
|
||||
// save necessary (i.e., required) data on disk
|
||||
includeObjects (diameter);
|
||||
|
||||
// exclude unnecessary data from saving on disk
|
||||
excludeObjects ();
|
||||
|
||||
integrationMethod AdamsBashforth2; // integration method
|
||||
|
||||
integrationHistory off; // Do not save integration history on the disk
|
||||
|
||||
writeFormat binary; // data writting format (ascii or binary)
|
||||
|
||||
timersReport Yes; // report timers (Yes or No)
|
||||
|
||||
timersReportInterval 0.05; // time interval for reporting timers
|
53
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/interaction
Executable file
53
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/interaction
Executable file
@ -0,0 +1,53 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName interaction;
|
||||
objectType dicrionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
materials (glassMat wallMat); // a list of materials names
|
||||
|
||||
densities (2500.0 2500); // density of materials [kg/m3]
|
||||
|
||||
contactListType sortedContactList;
|
||||
|
||||
model
|
||||
{
|
||||
contactForceModel nonLinearLimited;
|
||||
|
||||
rollingFrictionModel normal;
|
||||
|
||||
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
|
||||
1.0e6);
|
||||
|
||||
Geff (0.8e6 0.8e6 // Shear modulus [Pa]
|
||||
0.8e6);
|
||||
|
||||
nu (0.25 0.25 // Poisson's ratio [-]
|
||||
0.25);
|
||||
|
||||
en (0.97 0.85 // coefficient of normal restitution
|
||||
1.00);
|
||||
|
||||
mu (0.65 0.65 // dynamic friction
|
||||
0.65);
|
||||
|
||||
mur (0.1 0.1 // rolling friction
|
||||
0.1);
|
||||
|
||||
}
|
||||
|
||||
contactSearch
|
||||
{
|
||||
method NBS;
|
||||
|
||||
updateInterval 10;
|
||||
|
||||
sizeRatio 1.1;
|
||||
|
||||
cellExtent 0.55;
|
||||
|
||||
adjustableBox Yes;
|
||||
}
|
72
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/particleInsertion
Executable file
72
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/particleInsertion
Executable file
@ -0,0 +1,72 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particleInsertion;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
active yes; // is insertion active?
|
||||
|
||||
particleInlet1
|
||||
{
|
||||
regionType box; // type of insertion region
|
||||
|
||||
rate 125000; // insertion rate (particles/s)
|
||||
|
||||
timeControl simulationTime;
|
||||
|
||||
startTime 0; // (s)
|
||||
|
||||
endTime 2.0; // (s)
|
||||
|
||||
insertionInterval 0.05; //s
|
||||
|
||||
boxInfo
|
||||
{
|
||||
min (-0.17 0.23 0.46); // (m,m,m)
|
||||
max ( 0.17 0.24 0.88); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
smallParticle 1; // mixture composition of inserted particles
|
||||
}
|
||||
}
|
||||
|
||||
particleInlet2
|
||||
{
|
||||
regionType box; // type of insertion region
|
||||
|
||||
rate 125000; // insertion rate (particles/s)
|
||||
|
||||
timeControl simulationTime;
|
||||
|
||||
startTime 0; // (s)
|
||||
|
||||
endTime 2.0; // (s)
|
||||
|
||||
insertionInterval 0.05; //s
|
||||
|
||||
boxInfo
|
||||
{
|
||||
min ( -0.17 0.23 0.02); // (m,m,m)
|
||||
max ( 0.17 0.24 0.44); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
largeParticle 1; // mixture composition of inserted particles
|
||||
}
|
||||
}
|
12
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/shapes
Executable file
12
benchmarks/helicalMixer/helicalMixer_500k/caseSetup/shapes
Executable file
@ -0,0 +1,12 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName shapes;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
names (smallParticle largeParticle); // names of shapes
|
||||
diameters (0.005 0.00501); // diameter of shapes
|
||||
materials (glassMat glassMat); // material names for shapes
|
7
benchmarks/helicalMixer/helicalMixer_500k/cleanThisCase
Executable file
7
benchmarks/helicalMixer/helicalMixer_500k/cleanThisCase
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
|
||||
rm -rf VTK
|
||||
rm -rf stl
|
||||
#------------------------------------------------------------------------------
|
32
benchmarks/helicalMixer/helicalMixer_500k/runThisCase
Executable file
32
benchmarks/helicalMixer/helicalMixer_500k/runThisCase
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e # Exit immediately if a command exits with a non-zero status
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "0) Copying stl files"
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
mkdir -p stl
|
||||
cp -rfv $pFlow_PROJECT_DIR/resources/stls/helicalMixer/* ./stl/
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "1) Creating particles"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
particlesPhasicFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "2) Creating geometry"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
geometryPhasicFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "3) Running the case"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
sphereGranFlow
|
||||
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "4) Converting to VtK"
|
||||
echo "<--------------------------------------------------------------------->\n"
|
||||
pFlowToVTK -f diameter id velocity --binary
|
||||
|
||||
#------------------------------------------------------------------------------
|
49
benchmarks/helicalMixer/helicalMixer_500k/settings/domainDict
Executable file
49
benchmarks/helicalMixer/helicalMixer_500k/settings/domainDict
Executable file
@ -0,0 +1,49 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName domainDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// Simulation domain
|
||||
globalBox
|
||||
{
|
||||
min (-0.19 -0.19 -0.02);
|
||||
max ( 0.19 0.26 0.92);
|
||||
}
|
||||
|
||||
boundaries
|
||||
{
|
||||
|
||||
left
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
rear
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName geometryDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// motion model: rotating object around an axis
|
||||
motionModel rotatingAxis;
|
||||
|
||||
rotatingAxisInfo
|
||||
{
|
||||
rotAxis
|
||||
{
|
||||
// end points of axis
|
||||
p1 (0 0 0);
|
||||
p2 (0 0 1);
|
||||
|
||||
// rotation speed (rad/s) => 30 rpm
|
||||
omega 3.1428;
|
||||
|
||||
// interval for rotation of axis
|
||||
startTime 2.5;
|
||||
endTime 100;
|
||||
}
|
||||
}
|
||||
|
||||
surfaces
|
||||
{
|
||||
|
||||
helix
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file helix2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
shell
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file shell2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion none; // motion component name
|
||||
}
|
||||
|
||||
plug
|
||||
{
|
||||
type planeWall;
|
||||
p1 (-0.075 -0.185 0.375);
|
||||
p2 ( 0.075 -0.185 0.375);
|
||||
p3 ( 0.075 -0.185 0.525);
|
||||
p4 (-0.075 -0.185 0.525);
|
||||
material wallMat;
|
||||
motion none;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particlesDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
setFields
|
||||
{
|
||||
defaultValue
|
||||
{
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word smallParticle; // name of the particle shape
|
||||
}
|
||||
|
||||
selectors
|
||||
{}
|
||||
}
|
||||
|
||||
positionParticles
|
||||
{
|
||||
method empty; // creates the required fields with zero particles (empty).
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName settingsDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
run helicalMixer;
|
||||
|
||||
dt 0.00001; // time step for integration (s)
|
||||
|
||||
startTime 0; // start time for simulation
|
||||
|
||||
endTime 2; // end time for simulation
|
||||
|
||||
saveInterval 0.05; // time interval for saving the simulation
|
||||
|
||||
timePrecision 4; // maximum number of digits for time folder
|
||||
|
||||
g (0 -9.8 0); // gravity vector (m/s2)
|
||||
|
||||
// save necessary (i.e., required) data on disk
|
||||
includeObjects (diameter);
|
||||
|
||||
// exclude unnecessary data from saving on disk
|
||||
excludeObjects ();
|
||||
|
||||
integrationMethod AdamsBashforth2; // integration method
|
||||
|
||||
integrationHistory off; // Do not save integration history on the disk
|
||||
|
||||
writeFormat binary; // data writting format (ascii or binary)
|
||||
|
||||
timersReport Yes; // report timers (Yes or No)
|
||||
|
||||
timersReportInterval 0.05; // time interval for reporting timers
|
1
benchmarks/helicalMixer/readme.md
Normal file
1
benchmarks/helicalMixer/readme.md
Normal file
@ -0,0 +1 @@
|
||||
# Helical Mixer Benchmark (phasicFlow v-1.0)
|
@ -1,67 +0,0 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName particleInsertion;
|
||||
objectType dicrionary;
|
||||
|
||||
|
||||
active yes; // is insertion active?
|
||||
|
||||
collisionCheck No; // not implemented for yes
|
||||
|
||||
|
||||
|
||||
particleInlet1
|
||||
{
|
||||
type boxRegion; // type of insertion region
|
||||
rate 1000000; // insertion rate (particles/s)
|
||||
startTime 0; // (s)
|
||||
endTime 2.0; // (s)
|
||||
interval 0.05; //s
|
||||
|
||||
boxRegionInfo
|
||||
{
|
||||
min ( -0.17 0.23 0.46); // (m,m,m)
|
||||
max ( 0.17 0.24 0.88); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
smallParticle 1; // mixture composition of inserted particles
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
particleInlet2
|
||||
{
|
||||
type boxRegion; // type of insertion region
|
||||
rate 1000000; // insertion rate (particles/s)
|
||||
startTime 0; // (s)
|
||||
endTime 2.0; // (s)
|
||||
interval 0.05; //s
|
||||
|
||||
boxRegionInfo
|
||||
{
|
||||
min ( -0.17 0.23 0.02); // (m,m,m)
|
||||
max ( 0.17 0.24 0.44); // (m,m,m)
|
||||
}
|
||||
|
||||
setFields
|
||||
{
|
||||
velocity realx3 (0.0 -0.3 0.0); // initial velocity of inserted particles
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
largeParticle 1; // mixture composition of inserted particles
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName sphereDict;
|
||||
objectType sphereShape;
|
||||
|
||||
names (smallParticle largeParticle); // names of shapes
|
||||
diameters (0.002 0.00201); // diameter of shapes
|
||||
materials (glassMat glassMat); // material names for shapes
|
@ -1,56 +0,0 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName geometryDict;
|
||||
objectType dictionary;
|
||||
|
||||
// motion model: rotating object around an axis
|
||||
motionModel rotatingAxisMotion;
|
||||
|
||||
surfaces
|
||||
{
|
||||
|
||||
helix
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file helix2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
|
||||
shell
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
file shell2.stl; // file name in stl folder
|
||||
material wallMat; // material name of this wall
|
||||
motion none; // motion component name
|
||||
}
|
||||
|
||||
|
||||
plug
|
||||
{
|
||||
type planeWall;
|
||||
p1 (-0.075 -0.185 0.375);
|
||||
p2 ( 0.075 -0.185 0.375);
|
||||
p3 ( 0.075 -0.185 0.525);
|
||||
p4 (-0.075 -0.185 0.525);
|
||||
material wallMat; // material name of this wall
|
||||
motion none; // motion component name
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// information for rotatingAxisMotion motion model
|
||||
rotatingAxisMotionInfo
|
||||
{
|
||||
rotAxis
|
||||
{
|
||||
p1 ( 0 0 0);
|
||||
p2 ( 0 0 1);
|
||||
omega 0; //3.1428; // rotation speed (rad/s) => 30 rpm
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName particlesDict;
|
||||
objectType dictionary;
|
||||
|
||||
setFields
|
||||
{
|
||||
defaultValue
|
||||
{
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word smallParticle; // name of the particle shape
|
||||
}
|
||||
|
||||
selectors
|
||||
{}
|
||||
}
|
||||
|
||||
// positions particles
|
||||
positionParticles
|
||||
{
|
||||
method empty; // creates the required fields with zero particles (empty).
|
||||
|
||||
maxNumberOfParticles 4100000; // maximum number of particles in the simulation
|
||||
mortonSorting Yes; // perform initial sorting based on morton code?
|
||||
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName settingsDict;
|
||||
objectType dictionary;;
|
||||
|
||||
run inclinedScrewConveyor;
|
||||
|
||||
dt 0.00001; // time step for integration (s)
|
||||
|
||||
startTime 2.9; // start time for simulation
|
||||
|
||||
endTime 7; // end time for simulation
|
||||
|
||||
saveInterval 0.05; // time interval for saving the simulation
|
||||
|
||||
timePrecision 3; // maximum number of digits for time folder
|
||||
|
||||
g (0 -9.8 0); // gravity vector (m/s2)
|
||||
|
||||
/*
|
||||
Simulation domain
|
||||
every particles that goes outside this domain is deleted.
|
||||
*/
|
||||
domain
|
||||
{
|
||||
min (-0.19 -0.19 -0.02);
|
||||
max ( 0.19 0.26 0.92);
|
||||
}
|
||||
|
||||
integrationMethod AdamsBashforth2; // integration method
|
||||
|
||||
timersReport Yes; // report timers?
|
||||
|
||||
timersReportInterval 0.01; // time interval for reporting timers
|
7
benchmarks/readme.md
Normal file
7
benchmarks/readme.md
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
# Benchmarks
|
||||
|
||||
Benchmakrs has been done on two different simulations: a simulation with simple geometry (rotating drum) and a simulation with complex geometry (helical mixer).
|
||||
|
||||
- [rotating drum](./rotatingDrum/readme.md)
|
||||
- [helical mixer](./helicalMixer/readme.md)
|
BIN
benchmarks/rotatingDrum/images/commericalDEMsnapshot.png
Normal file
BIN
benchmarks/rotatingDrum/images/commericalDEMsnapshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 124 KiB |
BIN
benchmarks/rotatingDrum/images/performance1.png
Normal file
BIN
benchmarks/rotatingDrum/images/performance1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
BIN
benchmarks/rotatingDrum/images/phasicFlow_snapshot.png
Normal file
BIN
benchmarks/rotatingDrum/images/phasicFlow_snapshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 180 KiB |
96
benchmarks/rotatingDrum/readme.md
Normal file
96
benchmarks/rotatingDrum/readme.md
Normal file
@ -0,0 +1,96 @@
|
||||
# Rotating Drum Benchmark (phasicFlow v-1.0)
|
||||
|
||||
## Overview
|
||||
|
||||
This benchmark compares the performance of phasicFlow with a well-stablished commercial DEM software for simulating a rotating drum with varying particle counts (250k to 8M particles). The benchmark measures both computational efficiency and memory usage across different hardware configurations.
|
||||
|
||||
## Simulation Setup
|
||||
|
||||
<div align="center">
|
||||
<img src="./images/commericalDEMsnapshot.png"/>
|
||||
<div align="center">
|
||||
<p>Figure 1. Commercial DEM simulation snapshot</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<img src="./images/phasicFlow_snapshot.png"/>
|
||||
<div align="center">
|
||||
<p>Figure 2. phasicFlow simulation snapshot and visualized using Paraview</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
### Hardware Specifications
|
||||
|
||||
<div align="center">
|
||||
Table 1. Hardware specifications used for benchmarking.
|
||||
</div>
|
||||
|
||||
| System | CPU | GPU | Operating System |
|
||||
| :---------: | :----------------------: | :--------------------------: | :--------------: |
|
||||
| Laptop | Intel i9-13900HX 2.2 GHz | NVIDIA GeForce RTX 4050Ti 6G | Windows 11 24H2 |
|
||||
| Workstation | Intel Xeon 4210 2.2 GHz | NVIDIA RTX A4000 16G | Ubuntu 22.04 |
|
||||
|
||||
### Simulation Parameters
|
||||
|
||||
<div align="center">
|
||||
Table 2. Parameters for rotating drum simulations.
|
||||
</div>
|
||||
|
||||
| Case | Particle Diameter | Particle Count | Drum Length | Drum Radius |
|
||||
| :-------: | :---------------: | :--------------: | :------------------: | :------------------: |
|
||||
| 250k | 6 mm | 250,000 | 0.8 m | 0.2 m |
|
||||
| 500k | 5 mm | 500,000 | 0.8 m | 0.2 m |
|
||||
| 1M | 4 mm | 1,000,000 | 0.8 m | 0.2 m |
|
||||
| 2M | 3 mm | 2,000,000 | 1.2 m | 0.2 m |
|
||||
| 4M | 3 mm | 4,000,000 | 1.6 m | 0.2 m |
|
||||
| 8M | 2 mm | 8,000,000 | 1.6 m | 0.2 m |
|
||||
|
||||
The time step for all simulations was set to 1.0e-5 seconds and the simulation ran for 4 seconds.
|
||||
|
||||
## Performance Comparison
|
||||
|
||||
### Execution Time
|
||||
|
||||
<div align="center">
|
||||
Table 3. Total calculation time (minutes) for different configurations.
|
||||
</div>
|
||||
|
||||
| Software | 250k | 500k | 1M | 2M | 4M | 8M |
|
||||
| :---------------: | :----: | :-----: | :-----: | :-----: | :-----: | :------: |
|
||||
| phasicFlow-4050Ti | 54 min | 111 min | 216 min | 432 min | - | - |
|
||||
| Commercial DEM-4050Ti | 68 min | 136 min | 275 min | 570 min | - | - |
|
||||
| phasicFlow-A4000 | 38 min | 73 min | 146 min | 293 min | 589 min | 1188 min |
|
||||
|
||||
The execution time scales linearly with particle count. phasicFlow demonstrates approximately:
|
||||
|
||||
- 20% faster calculation than the well-established commercial DEM software on the same hardware
|
||||
- 30% performance improvement when using the NVIDIA RTX A4000 compared to the RTX 4050Ti
|
||||
|
||||
<div align="center">
|
||||
<img src="./images/performance1.png"/>
|
||||
<p>Figure 3. Calculation time comparison between phasicFlow and the well-established commercial DEM software.</p>
|
||||
</div>
|
||||
|
||||
### Memory Usage
|
||||
|
||||
<div align="center">
|
||||
Table 4. Memory consumption for different configurations.
|
||||
</div>
|
||||
|
||||
| Software | 250k | 500k | 1M | 2M | 4M | 8M |
|
||||
| :---------------: | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: |
|
||||
| phasicFlow-4050Ti | 252 MB | 412 MB | 710 MB | 1292 MB | - | - |
|
||||
| Commercial DEM-4050Ti | 485 MB | 897 MB | 1525 MB | 2724 MB | - | - |
|
||||
| phasicFlow-A4000 | 344 MB | 480 MB | 802 MB | 1386 MB | 2590 MB | 4966 MB |
|
||||
|
||||
Memory efficiency comparison:
|
||||
|
||||
- phasicFlow uses approximately 0.7 GB of memory per million particles
|
||||
- Commercial DEM software uses approximately 1.2 GB of memory per million particles
|
||||
- phasicFlow shows ~42% lower memory consumption compared to the commercial alternative
|
||||
- The memory usage scales linearly with particle count in both software packages. But due to memory limitations on GPUs, it is possible to run larger simulation on GPUs with phasicFlow.
|
||||
|
||||
## Run Your Own Benchmarks
|
||||
|
||||
The simulation case setup files are available in this folder for users interested in performing similar benchmarks on their own hardware. These files can be used to reproduce the tests and compare performance across different systems.
|
@ -0,0 +1,60 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName interaction;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
materials (glassMat wallMat); // a list of materials names
|
||||
|
||||
densities (2500.0 2500); // density of materials [kg/m3]
|
||||
|
||||
contactListType sortedContactList;
|
||||
|
||||
contactSearch
|
||||
{
|
||||
method NBS;
|
||||
|
||||
updateInterval 20;
|
||||
|
||||
sizeRatio 1.1;
|
||||
|
||||
cellExtent 0.55;
|
||||
|
||||
adjustableBox Yes;
|
||||
}
|
||||
|
||||
model
|
||||
{
|
||||
contactForceModel nonLinearLimited;
|
||||
|
||||
rollingFrictionModel normal;
|
||||
|
||||
/*
|
||||
Property (glassMat-glassMat glassMat-wallMat
|
||||
wallMat-wallMat);
|
||||
*/
|
||||
|
||||
Yeff (1.0e6 1.0e6
|
||||
1.0e6); // Young modulus [Pa]
|
||||
|
||||
Geff (0.8e6 0.8e6
|
||||
0.8e6); // Shear modulus [Pa]
|
||||
|
||||
nu (0.25 0.25
|
||||
0.25); // Poisson's ratio [-]
|
||||
|
||||
en (0.97 0.85
|
||||
1.00); // coefficient of normal restitution
|
||||
|
||||
mu (0.65 0.65
|
||||
0.65); // dynamic friction
|
||||
|
||||
mur (0.1 0.1
|
||||
0.1); // rolling friction
|
||||
}
|
||||
|
@ -2,16 +2,14 @@
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName sphereDict;
|
||||
objectType sphereShape;
|
||||
fileFormat ASCII;
|
||||
|
||||
objectName shapes;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
// name of shapes
|
||||
names (sphere1);
|
||||
names (glassBead); // names of shapes
|
||||
|
||||
// diameter of shapes (m)
|
||||
diameters (0.005);
|
||||
diameters (0.004); // diameter of shapes
|
||||
|
||||
// material name for shapes
|
||||
materials (solidProperty);
|
||||
materials (glassMat); // material names for shapes
|
1
tutorials/sphereGranFlow/toteblender/runThisCase → benchmarks/rotatingDrum/rotatingDrum_1mParticles/runThisCase
Normal file → Executable file
1
tutorials/sphereGranFlow/toteblender/runThisCase → benchmarks/rotatingDrum/rotatingDrum_1mParticles/runThisCase
Normal file → Executable file
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e # Exit immediately if a command exits with a non-zero status
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "1) Creating particles"
|
@ -0,0 +1,50 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName domainDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
|
||||
{
|
||||
min (-0.2 -0.2 0.0);
|
||||
max ( 0.2 0.2 0.8);
|
||||
}
|
||||
|
||||
boundaries
|
||||
{
|
||||
neighborListUpdateInterval 200;
|
||||
|
||||
updateInterval 20;
|
||||
|
||||
left
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
rear
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName geometryDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
motionModel rotatingAxis; // motion model: rotating object around an axis
|
||||
|
||||
rotatingAxisInfo // information for rotatingAxisMotion motion model
|
||||
{
|
||||
rotAxis
|
||||
{
|
||||
p1 (0.0 0.0 0.0); // first point for the axis of rotation
|
||||
|
||||
p2 (0.0 0.0 1.0); // second point for the axis of rotation
|
||||
|
||||
omega 1.256; // rotation speed (rad/s) => 12 rpm
|
||||
}
|
||||
}
|
||||
|
||||
surfaces
|
||||
{
|
||||
cylinder
|
||||
{
|
||||
type cylinderWall; // type of the wall
|
||||
|
||||
p1 (0.0 0.0 0.0); // begin point of cylinder axis
|
||||
|
||||
p2 (0.0 0.0 0.8); // end point of cylinder axis
|
||||
|
||||
radius1 0.2; // radius at p1
|
||||
|
||||
radius2 0.2; // radius at p2
|
||||
|
||||
resolution 60; // number of divisions
|
||||
|
||||
material wallMat; // material name of this wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
/*
|
||||
This is a plane wall at the rear end of cylinder
|
||||
*/
|
||||
|
||||
wall1
|
||||
{
|
||||
type planeWall; // type of the wall
|
||||
|
||||
p1 (-0.2 -0.2 0.0); // first point of the wall
|
||||
|
||||
p2 ( 0.2 -0.2 0.0); // second point
|
||||
|
||||
p3 ( 0.2 0.2 0.0); // third point
|
||||
|
||||
p4 (-0.2 0.2 0.0); // fourth point
|
||||
|
||||
material wallMat; // material name of the wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
/*
|
||||
This is a plane wall at the front end of cylinder
|
||||
*/
|
||||
|
||||
wall2
|
||||
{
|
||||
type planeWall; // type of the wall
|
||||
|
||||
p1 (-0.2 -0.2 0.8); // first point of the wall
|
||||
|
||||
p2 ( 0.2 -0.2 0.8); // second point
|
||||
|
||||
p3 ( 0.2 0.2 0.8); // third point
|
||||
|
||||
p4 (-0.2 0.2 0.8); // fourth point
|
||||
|
||||
material wallMat; // material name of the wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName particlesDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
setFields
|
||||
{
|
||||
defaultValue
|
||||
{
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word glassBead; // name of the particle shape
|
||||
}
|
||||
|
||||
selectors
|
||||
{}
|
||||
}
|
||||
|
||||
positionParticles
|
||||
{
|
||||
method ordered;
|
||||
|
||||
orderedInfo
|
||||
{
|
||||
distance 0.004; // minimum space between centers of particles
|
||||
|
||||
numPoints 1000000; // number of particles in the simulation
|
||||
|
||||
axisOrder (z x y); // axis order for filling the space with particles
|
||||
}
|
||||
|
||||
regionType cylinder; // other options: box and sphere
|
||||
|
||||
cylinderInfo // cylinder for positioning particles
|
||||
{
|
||||
p1 (0.0 0.0 0.01); // lower corner point of the box
|
||||
|
||||
p2 (0.0 0.0 0.79); // upper corner point of the box
|
||||
|
||||
radius 0.195; // radius of cylinder
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName settingsDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
run rotatingDrum_1mParticles;
|
||||
|
||||
dt 0.00001; // time step for integration (s)
|
||||
|
||||
startTime 0; // start time for simulation
|
||||
|
||||
endTime 4; // end time for simulation
|
||||
|
||||
saveInterval 0.2; // time interval for saving the simulation
|
||||
|
||||
timePrecision 5; // maximum number of digits for time folder
|
||||
|
||||
g (0 -9.8 0); // gravity vector (m/s2)
|
||||
|
||||
includeObjects (diameter); // save necessary (i.e., required) data on disk
|
||||
|
||||
// exclude unnecessary data from saving on disk
|
||||
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
|
||||
|
||||
integrationMethod AdamsBashforth2; // integration method
|
||||
|
||||
writeFormat binary; // data writting format (ascii or binary)
|
||||
|
||||
timersReport Yes;
|
||||
|
||||
timersReportInterval 0.01;
|
@ -0,0 +1,60 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName interaction;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
materials (glassMat wallMat); // a list of materials names
|
||||
|
||||
densities (2500.0 2500); // density of materials [kg/m3]
|
||||
|
||||
contactListType sortedContactList;
|
||||
|
||||
contactSearch
|
||||
{
|
||||
method NBS;
|
||||
|
||||
updateInterval 20;
|
||||
|
||||
sizeRatio 1.1;
|
||||
|
||||
cellExtent 0.55;
|
||||
|
||||
adjustableBox Yes;
|
||||
}
|
||||
|
||||
model
|
||||
{
|
||||
contactForceModel nonLinearLimited;
|
||||
|
||||
rollingFrictionModel normal;
|
||||
|
||||
/*
|
||||
Property (glassMat-glassMat glassMat-wallMat
|
||||
wallMat-wallMat);
|
||||
*/
|
||||
|
||||
Yeff (1.0e6 1.0e6
|
||||
1.0e6); // Young modulus [Pa]
|
||||
|
||||
Geff (0.8e6 0.8e6
|
||||
0.8e6); // Shear modulus [Pa]
|
||||
|
||||
nu (0.25 0.25
|
||||
0.25); // Poisson's ratio [-]
|
||||
|
||||
en (0.97 0.85
|
||||
1.00); // coefficient of normal restitution
|
||||
|
||||
mu (0.65 0.65
|
||||
0.65); // dynamic friction
|
||||
|
||||
mur (0.1 0.1
|
||||
0.1); // rolling friction
|
||||
}
|
||||
|
@ -2,12 +2,14 @@
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particleInsertion;
|
||||
objectType dicrionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
objectName shapes;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
active No; // is insertion active -> Yes or No
|
||||
|
||||
collisionCheck No; // is checked -> Yes or No
|
||||
names (glassBead); // names of shapes
|
||||
|
||||
diameters (0.006); // diameter of shapes
|
||||
|
||||
materials (glassMat); // material names for shapes
|
22
benchmarks/rotatingDrum/rotatingDrum_250kParticles/runThisCase
Executable file
22
benchmarks/rotatingDrum/rotatingDrum_250kParticles/runThisCase
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
set -e # Exit immediately if a command exits with a non-zero status
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "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
|
||||
|
||||
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,50 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName domainDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
|
||||
{
|
||||
min (-0.2 -0.2 0.0);
|
||||
max ( 0.2 0.2 0.8);
|
||||
}
|
||||
|
||||
boundaries
|
||||
{
|
||||
neighborListUpdateInterval 200;
|
||||
|
||||
updateInterval 20;
|
||||
|
||||
left
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
rear
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName geometryDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
motionModel rotatingAxis; // motion model: rotating object around an axis
|
||||
|
||||
rotatingAxisInfo // information for rotatingAxisMotion motion model
|
||||
{
|
||||
rotAxis
|
||||
{
|
||||
p1 (0.0 0.0 0.0); // first point for the axis of rotation
|
||||
|
||||
p2 (0.0 0.0 1.0); // second point for the axis of rotation
|
||||
|
||||
omega 1.256; // rotation speed (rad/s) => 12 rpm
|
||||
}
|
||||
}
|
||||
|
||||
surfaces
|
||||
{
|
||||
cylinder
|
||||
{
|
||||
type cylinderWall; // type of the wall
|
||||
|
||||
p1 (0.0 0.0 0.0); // begin point of cylinder axis
|
||||
|
||||
p2 (0.0 0.0 0.8); // end point of cylinder axis
|
||||
|
||||
radius1 0.2; // radius at p1
|
||||
|
||||
radius2 0.2; // radius at p2
|
||||
|
||||
resolution 60; // number of divisions
|
||||
|
||||
material wallMat; // material name of this wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
/*
|
||||
This is a plane wall at the rear end of cylinder
|
||||
*/
|
||||
|
||||
wall1
|
||||
{
|
||||
type planeWall; // type of the wall
|
||||
|
||||
p1 (-0.2 -0.2 0.0); // first point of the wall
|
||||
|
||||
p2 ( 0.2 -0.2 0.0); // second point
|
||||
|
||||
p3 ( 0.2 0.2 0.0); // third point
|
||||
|
||||
p4 (-0.2 0.2 0.0); // fourth point
|
||||
|
||||
material wallMat; // material name of the wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
/*
|
||||
This is a plane wall at the front end of cylinder
|
||||
*/
|
||||
|
||||
wall2
|
||||
{
|
||||
type planeWall; // type of the wall
|
||||
|
||||
p1 (-0.2 -0.2 0.8); // first point of the wall
|
||||
|
||||
p2 ( 0.2 -0.2 0.8); // second point
|
||||
|
||||
p3 ( 0.2 0.2 0.8); // third point
|
||||
|
||||
p4 (-0.2 0.2 0.8); // fourth point
|
||||
|
||||
material wallMat; // material name of the wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName particlesDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
setFields
|
||||
{
|
||||
defaultValue
|
||||
{
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word glassBead; // name of the particle shape
|
||||
}
|
||||
|
||||
selectors
|
||||
{}
|
||||
}
|
||||
|
||||
positionParticles
|
||||
{
|
||||
method ordered;
|
||||
|
||||
orderedInfo
|
||||
{
|
||||
distance 0.006; // minimum space between centers of particles
|
||||
|
||||
numPoints 250000; // number of particles in the simulation
|
||||
|
||||
axisOrder (z x y); // axis order for filling the space with particles
|
||||
}
|
||||
|
||||
regionType cylinder; // other options: box and sphere
|
||||
|
||||
cylinderInfo // cylinder for positioning particles
|
||||
{
|
||||
p1 (0.0 0.0 0.01); // lower corner point of the box
|
||||
|
||||
p2 (0.0 0.0 0.79); // upper corner point of the box
|
||||
|
||||
radius 0.195; // radius of cylinder
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName settingsDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
run rotatingDrum_250KParticles;
|
||||
|
||||
dt 0.00001; // time step for integration (s)
|
||||
|
||||
startTime 0; // start time for simulation
|
||||
|
||||
endTime 4; // end time for simulation
|
||||
|
||||
saveInterval 0.2; // time interval for saving the simulation
|
||||
|
||||
timePrecision 5; // maximum number of digits for time folder
|
||||
|
||||
g (0 -9.8 0); // gravity vector (m/s2)
|
||||
|
||||
includeObjects (diameter); // save necessary (i.e., required) data on disk
|
||||
|
||||
// exclude unnecessary data from saving on disk
|
||||
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
|
||||
|
||||
integrationMethod AdamsBashforth2; // integration method
|
||||
|
||||
writeFormat binary; // data writting format (ascii or binary)
|
||||
|
||||
timersReport Yes;
|
||||
|
||||
timersReportInterval 0.01;
|
@ -0,0 +1,60 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName interaction;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
materials (glassMat wallMat); // a list of materials names
|
||||
|
||||
densities (2500.0 2500); // density of materials [kg/m3]
|
||||
|
||||
contactListType sortedContactList;
|
||||
|
||||
contactSearch
|
||||
{
|
||||
method NBS;
|
||||
|
||||
updateInterval 20;
|
||||
|
||||
sizeRatio 1.1;
|
||||
|
||||
cellExtent 0.55;
|
||||
|
||||
adjustableBox Yes;
|
||||
}
|
||||
|
||||
model
|
||||
{
|
||||
contactForceModel nonLinearLimited;
|
||||
|
||||
rollingFrictionModel normal;
|
||||
|
||||
/*
|
||||
Property (glassMat-glassMat glassMat-wallMat
|
||||
wallMat-wallMat);
|
||||
*/
|
||||
|
||||
Yeff (1.0e6 1.0e6
|
||||
1.0e6); // Young modulus [Pa]
|
||||
|
||||
Geff (0.8e6 0.8e6
|
||||
0.8e6); // Shear modulus [Pa]
|
||||
|
||||
nu (0.25 0.25
|
||||
0.25); // Poisson's ratio [-]
|
||||
|
||||
en (0.97 0.85
|
||||
1.00); // coefficient of normal restitution
|
||||
|
||||
mu (0.65 0.65
|
||||
0.65); // dynamic friction
|
||||
|
||||
mur (0.1 0.1
|
||||
0.1); // rolling friction
|
||||
}
|
||||
|
@ -2,12 +2,14 @@
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName particleInsertion;
|
||||
objectType dicrionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
objectName shapes;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
active No; // is insertion active -> Yes or No
|
||||
|
||||
collisionCheck No; // is checked -> Yes or No
|
||||
names (glassBead); // names of shapes
|
||||
|
||||
diameters (0.003); // diameter of shapes
|
||||
|
||||
materials (glassMat); // material names for shapes
|
0
tutorials/sphereGranFlow/toteblender/cleanThisCase → benchmarks/rotatingDrum/rotatingDrum_2mParticles/cleanThisCase
Normal file → Executable file
0
tutorials/sphereGranFlow/toteblender/cleanThisCase → benchmarks/rotatingDrum/rotatingDrum_2mParticles/cleanThisCase
Normal file → Executable file
22
benchmarks/rotatingDrum/rotatingDrum_2mParticles/runThisCase
Executable file
22
benchmarks/rotatingDrum/rotatingDrum_2mParticles/runThisCase
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
set -e # Exit immediately if a command exits with a non-zero status
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "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
|
||||
|
||||
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,50 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName domainDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
|
||||
{
|
||||
min (-0.2 -0.2 0.0);
|
||||
max ( 0.2 0.2 1.2);
|
||||
}
|
||||
|
||||
boundaries
|
||||
{
|
||||
neighborListUpdateInterval 200;
|
||||
|
||||
updateInterval 20;
|
||||
|
||||
left
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
rear
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName geometryDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
motionModel rotatingAxis; // motion model: rotating object around an axis
|
||||
|
||||
rotatingAxisInfo // information for rotatingAxisMotion motion model
|
||||
{
|
||||
rotAxis
|
||||
{
|
||||
p1 (0.0 0.0 0.0); // first point for the axis of rotation
|
||||
|
||||
p2 (0.0 0.0 1.0); // second point for the axis of rotation
|
||||
|
||||
omega 1.256; // rotation speed (rad/s) => 12 rpm
|
||||
}
|
||||
}
|
||||
|
||||
surfaces
|
||||
{
|
||||
cylinder
|
||||
{
|
||||
type cylinderWall; // type of the wall
|
||||
|
||||
p1 (0.0 0.0 0.0); // begin point of cylinder axis
|
||||
|
||||
p2 (0.0 0.0 1.2); // end point of cylinder axis
|
||||
|
||||
radius1 0.2; // radius at p1
|
||||
|
||||
radius2 0.2; // radius at p2
|
||||
|
||||
resolution 60; // number of divisions
|
||||
|
||||
material wallMat; // material name of this wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
/*
|
||||
This is a plane wall at the rear end of cylinder
|
||||
*/
|
||||
|
||||
wall1
|
||||
{
|
||||
type planeWall; // type of the wall
|
||||
|
||||
p1 (-0.2 -0.2 0.0); // first point of the wall
|
||||
|
||||
p2 ( 0.2 -0.2 0.0); // second point
|
||||
|
||||
p3 ( 0.2 0.2 0.0); // third point
|
||||
|
||||
p4 (-0.2 0.2 0.0); // fourth point
|
||||
|
||||
material wallMat; // material name of the wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
/*
|
||||
This is a plane wall at the front end of cylinder
|
||||
*/
|
||||
|
||||
wall2
|
||||
{
|
||||
type planeWall; // type of the wall
|
||||
|
||||
p1 (-0.2 -0.2 1.2); // first point of the wall
|
||||
|
||||
p2 ( 0.2 -0.2 1.2); // second point
|
||||
|
||||
p3 ( 0.2 0.2 1.2); // third point
|
||||
|
||||
p4 (-0.2 0.2 1.2); // fourth point
|
||||
|
||||
material wallMat; // material name of the wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName particlesDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
setFields
|
||||
{
|
||||
defaultValue
|
||||
{
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word glassBead; // name of the particle shape
|
||||
}
|
||||
|
||||
selectors
|
||||
{}
|
||||
}
|
||||
|
||||
positionParticles
|
||||
{
|
||||
method ordered;
|
||||
|
||||
orderedInfo
|
||||
{
|
||||
distance 0.003; // minimum space between centers of particles
|
||||
|
||||
numPoints 2000000; // number of particles in the simulation
|
||||
|
||||
axisOrder (z x y); // axis order for filling the space with particles
|
||||
}
|
||||
|
||||
regionType cylinder; // other options: box and sphere
|
||||
|
||||
cylinderInfo // cylinder for positioning particles
|
||||
{
|
||||
p1 (0.0 0.0 0.01); // lower corner point of the box
|
||||
|
||||
p2 (0.0 0.0 1.19); // upper corner point of the box
|
||||
|
||||
radius 0.195; // radius of cylinder
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName settingsDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
run rotatingDrum_2mParticles;
|
||||
|
||||
dt 0.00001; // time step for integration (s)
|
||||
|
||||
startTime 0; // start time for simulation
|
||||
|
||||
endTime 4; // end time for simulation
|
||||
|
||||
saveInterval 0.2; // time interval for saving the simulation
|
||||
|
||||
timePrecision 5; // maximum number of digits for time folder
|
||||
|
||||
g (0 -9.8 0); // gravity vector (m/s2)
|
||||
|
||||
includeObjects (diameter); // save necessary (i.e., required) data on disk
|
||||
|
||||
// exclude unnecessary data from saving on disk
|
||||
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
|
||||
|
||||
integrationMethod AdamsBashforth2; // integration method
|
||||
|
||||
writeFormat binary; // data writting format (ascii or binary)
|
||||
|
||||
timersReport Yes;
|
||||
|
||||
timersReportInterval 0.01;
|
@ -0,0 +1,60 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName interaction;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
materials (glassMat wallMat); // a list of materials names
|
||||
|
||||
densities (2500.0 2500); // density of materials [kg/m3]
|
||||
|
||||
contactListType sortedContactList;
|
||||
|
||||
contactSearch
|
||||
{
|
||||
method NBS;
|
||||
|
||||
updateInterval 20;
|
||||
|
||||
sizeRatio 1.1;
|
||||
|
||||
cellExtent 0.55;
|
||||
|
||||
adjustableBox Yes;
|
||||
}
|
||||
|
||||
model
|
||||
{
|
||||
contactForceModel nonLinearLimited;
|
||||
|
||||
rollingFrictionModel normal;
|
||||
|
||||
/*
|
||||
Property (glassMat-glassMat glassMat-wallMat
|
||||
wallMat-wallMat);
|
||||
*/
|
||||
|
||||
Yeff (1.0e6 1.0e6
|
||||
1.0e6); // Young modulus [Pa]
|
||||
|
||||
Geff (0.8e6 0.8e6
|
||||
0.8e6); // Shear modulus [Pa]
|
||||
|
||||
nu (0.25 0.25
|
||||
0.25); // Poisson's ratio [-]
|
||||
|
||||
en (0.97 0.85
|
||||
1.00); // coefficient of normal restitution
|
||||
|
||||
mu (0.65 0.65
|
||||
0.65); // dynamic friction
|
||||
|
||||
mur (0.1 0.1
|
||||
0.1); // rolling friction
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName shapes;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
names (glassBead); // names of shapes
|
||||
|
||||
diameters (0.003); // diameter of shapes
|
||||
|
||||
materials (glassMat); // material names for shapes
|
7
benchmarks/rotatingDrum/rotatingDrum_4mParticles/cleanThisCase
Executable file
7
benchmarks/rotatingDrum/rotatingDrum_4mParticles/cleanThisCase
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
|
||||
rm -rf VTK
|
||||
|
||||
#------------------------------------------------------------------------------
|
22
benchmarks/rotatingDrum/rotatingDrum_4mParticles/runThisCase
Executable file
22
benchmarks/rotatingDrum/rotatingDrum_4mParticles/runThisCase
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
set -e # Exit immediately if a command exits with a non-zero status
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
echo "\n<--------------------------------------------------------------------->"
|
||||
echo "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
|
||||
|
||||
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,50 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName domainDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
|
||||
{
|
||||
min (-0.2 -0.2 0.0);
|
||||
max ( 0.2 0.2 1.6);
|
||||
}
|
||||
|
||||
boundaries
|
||||
{
|
||||
neighborListUpdateInterval 200;
|
||||
|
||||
updateInterval 20;
|
||||
|
||||
left
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
rear
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type exit; // other options: periodic, reflective
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName geometryDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
motionModel rotatingAxis; // motion model: rotating object around an axis
|
||||
|
||||
rotatingAxisInfo // information for rotatingAxisMotion motion model
|
||||
{
|
||||
rotAxis
|
||||
{
|
||||
p1 (0.0 0.0 0.0); // first point for the axis of rotation
|
||||
|
||||
p2 (0.0 0.0 1.0); // second point for the axis of rotation
|
||||
|
||||
omega 1.256; // rotation speed (rad/s) => 12 rpm
|
||||
}
|
||||
}
|
||||
|
||||
surfaces
|
||||
{
|
||||
cylinder
|
||||
{
|
||||
type cylinderWall; // type of the wall
|
||||
|
||||
p1 (0.0 0.0 0.0); // begin point of cylinder axis
|
||||
|
||||
p2 (0.0 0.0 1.6); // end point of cylinder axis
|
||||
|
||||
radius1 0.2; // radius at p1
|
||||
|
||||
radius2 0.2; // radius at p2
|
||||
|
||||
resolution 60; // number of divisions
|
||||
|
||||
material wallMat; // material name of this wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
/*
|
||||
This is a plane wall at the rear end of cylinder
|
||||
*/
|
||||
|
||||
wall1
|
||||
{
|
||||
type planeWall; // type of the wall
|
||||
|
||||
p1 (-0.2 -0.2 0.0); // first point of the wall
|
||||
|
||||
p2 ( 0.2 -0.2 0.0); // second point
|
||||
|
||||
p3 ( 0.2 0.2 0.0); // third point
|
||||
|
||||
p4 (-0.2 0.2 0.0); // fourth point
|
||||
|
||||
material wallMat; // material name of the wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
|
||||
/*
|
||||
This is a plane wall at the front end of cylinder
|
||||
*/
|
||||
|
||||
wall2
|
||||
{
|
||||
type planeWall; // type of the wall
|
||||
|
||||
p1 (-0.2 -0.2 1.6); // first point of the wall
|
||||
|
||||
p2 ( 0.2 -0.2 1.6); // second point
|
||||
|
||||
p3 ( 0.2 0.2 1.6); // third point
|
||||
|
||||
p4 (-0.2 0.2 1.6); // fourth point
|
||||
|
||||
material wallMat; // material name of the wall
|
||||
|
||||
motion rotAxis; // motion component name
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName particlesDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
setFields
|
||||
{
|
||||
defaultValue
|
||||
{
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word glassBead; // name of the particle shape
|
||||
}
|
||||
|
||||
selectors
|
||||
{}
|
||||
}
|
||||
|
||||
positionParticles
|
||||
{
|
||||
method ordered;
|
||||
|
||||
orderedInfo
|
||||
{
|
||||
distance 0.003; // minimum space between centers of particles
|
||||
|
||||
numPoints 4000000; // number of particles in the simulation
|
||||
|
||||
axisOrder (z x y); // axis order for filling the space with particles
|
||||
}
|
||||
|
||||
regionType cylinder; // other options: box and sphere
|
||||
|
||||
cylinderInfo // cylinder for positioning particles
|
||||
{
|
||||
p1 (0.0 0.0 0.01); // lower corner point of the box
|
||||
|
||||
p2 (0.0 0.0 1.59); // upper corner point of the box
|
||||
|
||||
radius 0.195; // radius of cylinder
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
objectName settingsDict;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
run rotatingDrum_4mParticles;
|
||||
|
||||
dt 0.00001; // time step for integration (s)
|
||||
|
||||
startTime 0; // start time for simulation
|
||||
|
||||
endTime 4; // end time for simulation
|
||||
|
||||
saveInterval 0.2; // time interval for saving the simulation
|
||||
|
||||
timePrecision 5; // maximum number of digits for time folder
|
||||
|
||||
g (0 -9.8 0); // gravity vector (m/s2)
|
||||
|
||||
includeObjects (diameter); // save necessary (i.e., required) data on disk
|
||||
|
||||
// exclude unnecessary data from saving on disk
|
||||
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
|
||||
|
||||
integrationMethod AdamsBashforth2; // integration method
|
||||
|
||||
writeFormat binary; // data writting format (ascii or binary)
|
||||
|
||||
timersReport Yes;
|
||||
|
||||
timersReportInterval 0.01;
|
@ -0,0 +1,60 @@
|
||||
/* -------------------------------*- C++ -*--------------------------------- *\
|
||||
| phasicFlow File |
|
||||
| copyright: www.cemf.ir |
|
||||
\* ------------------------------------------------------------------------- */
|
||||
|
||||
objectName interaction;
|
||||
objectType dictionary;
|
||||
fileFormat ASCII;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
materials (glassMat wallMat); // a list of materials names
|
||||
|
||||
densities (2500.0 2500); // density of materials [kg/m3]
|
||||
|
||||
contactListType sortedContactList;
|
||||
|
||||
contactSearch
|
||||
{
|
||||
method NBS;
|
||||
|
||||
updateInterval 20;
|
||||
|
||||
sizeRatio 1.1;
|
||||
|
||||
cellExtent 0.55;
|
||||
|
||||
adjustableBox Yes;
|
||||
}
|
||||
|
||||
model
|
||||
{
|
||||
contactForceModel nonLinearLimited;
|
||||
|
||||
rollingFrictionModel normal;
|
||||
|
||||
/*
|
||||
Property (glassMat-glassMat glassMat-wallMat
|
||||
wallMat-wallMat);
|
||||
*/
|
||||
|
||||
Yeff (1.0e6 1.0e6
|
||||
1.0e6); // Young modulus [Pa]
|
||||
|
||||
Geff (0.8e6 0.8e6
|
||||
0.8e6); // Shear modulus [Pa]
|
||||
|
||||
nu (0.25 0.25
|
||||
0.25); // Poisson's ratio [-]
|
||||
|
||||
en (0.97 0.85
|
||||
1.00); // coefficient of normal restitution
|
||||
|
||||
mu (0.65 0.65
|
||||
0.65); // dynamic friction
|
||||
|
||||
mur (0.1 0.1
|
||||
0.1); // rolling friction
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user