ringspy 0.2.4__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RingsPy
3
- Version: 0.2.4
3
+ Version: 0.3.2
4
4
  Summary: A geometric generation tool for prismatic cellular solids
5
5
  Home-page: https://github.com/kingyin3613/RingsPy/
6
6
  Author: Hao Yin
@@ -12,6 +12,7 @@ Description: # RingsPy
12
12
  [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
13
13
  [![Tests](https://github.com/kingyin3613/RingsPy/actions/workflows/tests.yml/badge.svg)](https://github.com/kingyin3613/RingsPy/actions/workflows/tests.yml)
14
14
  [![codecov](https://codecov.io/gh/kingyin3613/RingsPy/branch/main/graph/badge.svg?token=4AZN3HGGET)](https://codecov.io/gh/kingyin3613/RingsPy)
15
+ [![status](https://joss.theoj.org/papers/3dd05ca1103829e7620731845b0d2472/status.svg)](https://joss.theoj.org/papers/3dd05ca1103829e7620731845b0d2472)
15
16
 
16
17
  RingsPy is a Voronoi diagrams-based geometric generation tool that generates 3D meshes and models of prismatic cellular solids with radial growth rules.
17
18
 
@@ -30,12 +31,12 @@ Description: # RingsPy
30
31
 
31
32
  RingsPy depends on mainstream Python libraries ``numpy`` and ``scipy``, and optionally depends on library ``hexalattice``, if the regular hexagonal lattice (e.g. honeycomb) is wanted; also ``vtk``, if the 3D STL files are also wanted.
32
33
 
33
- ### 2. Installation check
34
+ ### 2. Installation Check
34
35
 
35
- There are some unit tests in [tests](https://github.com/kingyin3613/RingsPy/tree/main/tests/). You can use ``pytest`` to check whether the installation is successful by running this command:
36
+ There are some unit tests in [tests](https://github.com/kingyin3613/RingsPy/tree/main/tests/). One can use ``pytest`` to check whether the installation is successful by running this command:
36
37
 
37
38
  ```bash
38
- pytest
39
+ pytest .
39
40
  ```
40
41
 
41
42
  ## Getting Started
@@ -43,30 +44,33 @@ Description: # RingsPy
43
44
 
44
45
  1. Edit geometry and algorithm parameters
45
46
  2. Generate mesh using Mesh Generation Tools
46
- 3. Visualize 2D view using Matplotlib or 3D model in Paraview
47
- 4. (Optional) Export 3D STL model for 3D editing and/or printing
47
+ 3. Visualize 2D view using Matplotlib or 3D model in `ParaView`
48
+ 4. (Optional) Export 3D STL model for 3D editing and/or printing
49
+ 5. (Optional) Export input file for numerical simulations with software `Abaqus`
48
50
 
49
51
  ### 1. Geometry and Parameters
50
52
  The first step to generate a cellular geometry is selecting geometry and appropriate parameters.
51
53
 
52
54
  ### 1.1. Geometry
53
- A template file, `test_wood_cube.py` located in the [tests](https://github.com/kingyin3613/RingsPy/tree/main/tests/) directory acts as both the parameter input file, and main executable for the generation of a cubic wood specimen.
55
+ A template file, for example, `test_wood_cube.py` located in the [tests](https://github.com/kingyin3613/RingsPy/tree/main/tests/) directory acts as both the parameter input file, and main executable for the generation of a cubic wood specimen.
54
56
 
55
- *Note: The Mesh Generation Tool by now only accepts many of pre-defined boundary geometries, importing of CAD and/or other 3D model files will be implemented in subsequent versions.*
57
+ *Note: The Mesh Generation Tool by now only accepts many of pre-defined boundary geometries (for v0.3.x, the following 3 shapes are supported: triangle, square, hexagon), importing of CAD and/or other 3D model files will be implemented in subsequent versions.*
56
58
 
57
59
  *Note: for greatest compatibility create the geometry using all millimeters.*
58
60
 
59
61
  ### 1.2. Parameters
60
62
 
61
63
 
62
- By opening a input file, such as `tests/test_wood_cube.py` in any text editor, a file format similar to what is shown below will be displayed:
64
+ By opening a input file, e.g., `tests/test_wood_cube.py` in any text editor, a file format similar to what is shown below will be displayed:
63
65
  ```
64
66
  geoName = 'wood_cube'
65
67
  path = 'meshes'
66
68
 
69
+ radial_growth_rule = 'wood_binary'
67
70
  iter_max = 100
68
71
  print_interval = 500
69
72
 
73
+ # Radial cell growth parameters
70
74
  # length unit: mm
71
75
  r_min = 0 # inner radius of wood log
72
76
  r_max = 4 # outer radius of wood log
@@ -75,47 +79,58 @@ Description: # RingsPy
75
79
  width_early = 0.7*(r_max-r_min)/nrings # early wood ring width
76
80
  width_late = 0.3*(r_max-r_min)/nrings # late wood ring width
77
81
  log_center = (0,0) # coordinates of log center in the global system of reference
78
- box_center = (1.25,0) # coordinates of box center in the global system of reference
79
- box_size = 1.0 # cube size
80
-
81
- # if precracked
82
- x_indent_size = box_size*0.120
83
- y_indent_size = box_size*0.125
84
- x_precrack_size = box_size*0.1
85
- y_precrack_size = box_size*0.02
86
- x_indent = x_min + x_indent_size
87
- y_indent_min = box_center[1] - y_indent_size/2
88
- y_indent_max = box_center[1] + y_indent_size/2
89
- x_precrack = x_indent + x_precrack_size
90
- y_precrack = box_center[1]
91
82
 
92
83
  cellsize_early = 0.02
93
84
  cellsize_late = 0.01
94
85
  cellwallthickness_early = 0.010
95
86
  cellwallthickness_late = 0.006
96
-
97
- merge_operation = 'off'
87
+
88
+ # clipping box parameters
89
+ boundaryFlag = 'on'
90
+ box_shape = 'square'
91
+ box_center = (1.25,0) # coordinates of box center in the global system of reference
92
+ box_size = 1.0 # side length
93
+
94
+ # longitudinal direction parameters
95
+ fiberlength = 0.5*box_size
96
+ theta_min = 0 # radian
97
+ theta_max = 0.05 # radian
98
+ z_min = 0
99
+ z_max = box_size
100
+ long_connector_ratio = 0.02 # longitudinal joint size
101
+
102
+ merge_operation = 'on'
98
103
  merge_tol = 0.01
99
-
104
+
100
105
  precrackFlag = 'off'
101
106
  precrack_widths = 0.1
102
-
103
- boundaryFlag = 'on'
107
+
104
108
  stlFlag = 'on'
109
+
110
+ inpFlag = 'on'
111
+ inpType = 'Abaqus'
105
112
  ```
106
113
 
107
114
  - `geoName` is the geometry name, `path` is the folder where the mesh files will be generated.
108
- - `iter_max` is the max number of iteration for randomly placing a new non-overlapping wood cell particle in the 2D annual rings domain. Generally, larger `iter_max` leads to more centroidal Voronoi cells, for more reference, see [Centroidal Voronoi Tessellation](https://en.wikipedia.org/wiki/Centroidal_Voronoi_tessellation/).
109
- - `print_interval` is the print interval when every n cell particles are placed in the model domain.
110
- - `r_min` and `r_max` are the upper and lower bounds of radii to generate 2D annual rings, `nrings` is the number of rings.
111
- - `width_heart`, `width_early`, and `width_late`, are annual ring widths for heartwood, earlywood, and latewood, respectively, which all together determine the morphology of the wood mesostructure.
112
- - `log_center`,`box_center`, and `box_size` are for locating the wood log and cutting box.
113
- - `_indent`,`_precrack` parameters are related to precracked sample generation, which will be added in the next version.
115
+ - `radial_growth_rule` is the radial growth rule for cell placement. When a file name with extension`.npy` is specified, a saved cell data file will be loaded (for v0.3.x, choose one of these rules: `wood_binary`, `regular_hexagonal`, or a file name with extension `.npy`).
116
+ - `iter_max` is the max number of iteration for randomly placing new non-overlapping cell particles in the 2D toroidal cell placement region. Noticing that, larger `iter_max` leads to more centroidal Voronoi cells, for more reference, see Wiki [Centroidal Voronoi Tessellation](https://en.wikipedia.org/wiki/Centroidal_Voronoi_tessellation/).
117
+ - `print_interval` is the print interval when every n cell particles are placed in the placement region.
118
+ - `r_min` and `r_max` are the upper and lower bounds of radii of toroidal cell placement region, `nrings` is the number of rings.
119
+ - `width_heart`, `width_early`, and `width_late`, are ring widths for heartwood, earlywood, and latewood, respectively, which all together determine the morphology of the cellular structure.
120
+ - `log_center` is the location of the placement region.
114
121
  - `cellsize_early`,`cellsize_late`, `cellwallthickness_early`, and `cellwallthickness_late` are parameters for the earlywood and latewood cells.
115
- - `merge_operation` flag can be turned on/off for the merging operation, when turned on, all small wood cell ridges shorter than the threshold `merge_tol` will be merged with neighboring ridges.
116
- - `precrackFlag` flag is for inserting a pre-crack, for the notched specimens. So far, only a single line pre-crack with the length of `precrack_widths` is supported.
117
122
  - `boundaryFlag` flag can be turned on/off for generating neat boundaries consisting of grains.
123
+ - `box_shape` is the shape of cutting box (for v0.3.x, choose one of following shapes: `triangle`, `square`, or `hexagon`).
124
+ - `box_center`, and `box_size` are for locating the cutting box.
125
+ - `fiberlength` is the length of fibers consisting the prismatic cells during the z- (longitudinal) extrusion.
126
+ - `theta_min` and `theta_max` determine the twisting angles (unit: radian) of the 2D mesh around the `log_center` during the extrusion.
127
+ - `z_min` and `z_max` determine the range of prismatic cells in z- (longitudinal) direction.
128
+ - `long_connector_ratio` is the length of longitudinal joints, with `joint length = long_connector_ratio * fiberlength`.
129
+ - `merge_operation` flag can be turned on/off for the merging operation, when flag is on, cell ridges that are shorter than the threshold `merge_tol` in the 2D mesh will be deleted, and their vertices will be merged respectively, the mesh will be reconstructed. This is designed for eliminating small cell ridges/walls which fall out of the resolution range of the 3D printing and for avoiding having elements with too small stable time increments in numerical simulations.
130
+ - `precrackFlag` flag is for inserting a pre-crack, for the notched specimens. So far, only a single line pre-crack with the length of `precrack_widths` is supported.
118
131
  - `stlFlag` flag can be turned on/off for generating 3D STL files.
132
+ - `inpFlag` flag can be turned on/off for generating input files for numerical simulations.
133
+ - `inpType` indicates the software(s) that the mesh generation should generate input files for.
119
134
 
120
135
  ![MeshGenerator](<./contents/MeshGenerator.png>)
121
136
  ### 2.1. Run Mesh Generation
@@ -136,17 +151,20 @@ Description: # RingsPy
136
151
  - Grain-ridge data file: `wood_cube-vertex.mesh`
137
152
  - Ridge data file: `wood_cube-ridge.mesh`
138
153
  - Visualization files
154
+ - Cross-sectional image file for initial 2D configuration: `wood_cube.png`
139
155
  - Paraview vtk file for initial vertex configuration: `wood_cube_vertices.vtu`
140
156
  - Paraview vtk file for initial grain solid configuration: `wood_cube_beams.vtu`
141
157
  - Paraview vtk file of initial cell ridge configuration: `wood_cube_conns.vtu`
142
158
  - Paraview vtk file of initial connector (volume) configuration: `wood_cube_conns_vol.vtu`
143
159
  - (Optional) 3D model files
144
160
  - STL file of initial cellular solid configuration: `wood_cube.stl`
145
-
161
+ - (Optional) Abaqus input files
162
+ - INP file of simulation input of initial cellular solid configuration in `Abaqus`: `wood_cube.inp`
163
+
146
164
  ### 3. Visualization
147
- A scientific visualization application `ParaView` can directly visualize the generated vtk files; It can also visualize generated 3D model STL files if the STL flag is on. The Paraview software can be downloaded from their official website: [https://www.paraview.org/download/](https://www.paraview.org/download/), latest version is recommeded.
165
+ A scientific visualization application `ParaView` can directly visualize the generated vtk files; It can also visualize generated 3D model STL files if the STL flag is on. `Paraview` is a free software, it can be downloaded from its official website: [https://www.paraview.org/download/](https://www.paraview.org/download/), latest version is recommeded.
148
166
 
149
- ### 3.1. Visualize the components of the 3D model in ParaView
167
+ ### 3.1. Visualize Components of the 3D Model in ParaView
150
168
  1. Open ParaView
151
169
  2. Recommeded to temporarily turn off ray tracing
152
170
  - Uncheck "Enable Ray Tracing" (bottom left)
@@ -165,7 +183,7 @@ Description: # RingsPy
165
183
  - Enter a file name > OK
166
184
  - Leave new window as-is or increase resolution > OK
167
185
 
168
- ### 3.2. Visualize the volumes of the 3D model in ParaView
186
+ ### 3.2. Visualize Volumes of the 3D Model in ParaView
169
187
  1. Open Paraview
170
188
  2. Recommeded to temporarily turn off ray tracing
171
189
  - Uncheck "Enable Ray Tracing" (bottom left)
@@ -185,6 +203,29 @@ Description: # RingsPy
185
203
  - Leave new window as-is or increase resolution > OK
186
204
  ![ModelVisualization](<./contents/ModelVisualization.png>)
187
205
 
206
+ ### 4. (Optional) Numerical Simulation
207
+ The mesh generation tool can also prepare the input files for the numerical simulations of the cellular solid in other softwares. By now (version 0.3.0), the input file format, `.inp`, that is used in a finite element method (FEM) software `Abaqus` is supported, if the INP flag is on. `Abaqus` is a commerical software suite for integrated computer-aided engineering (CAE) and finite element analysis, own by Dassault Systèmes. One may refer to its [Wiki](https://en.wikipedia.org/wiki/Abaqus) for more about `Abaqus`, and to [Introduction](https://bertoldi.seas.harvard.edu/files/bertoldi/files/abaqusinputfilemanualv1.pdf?m=1444417191) for the introduction of Abaqus input files.
208
+
209
+ All steps for the model setup can be accomplished through manually coding the Abaqus input file in a text editor. The method used in the example procedure shown below requires access to the Abaqus GUI.
210
+
211
+ ### 4.1 Create New Model
212
+ 1. Open Abaqus CAE
213
+ 2. Create a new model
214
+ - File > New Model Database > With Standard/Explicit Model
215
+
216
+ ### 4.2 Import Meshed Part
217
+
218
+ 1. Import the meshed part
219
+ - File > Import > Part
220
+ - Select the newly created file which ends in `.inp` (note: you may need to change the File Filter to see this file)
221
+ - Click OK
222
+ 2. Rename part
223
+ - Under the model tree (left) expand `Parts`
224
+ - Right click on the part > Rename...
225
+ - Enter a new name less than 14 characters, no special symbols, and easily recognizable (i.e. "WoodCube")
226
+
227
+ *Note: if FEM parts will be added to the model, this RingsPy generated part must come first alphabetically. Also recommended not to include numbers in the name.*
228
+
188
229
  ## Contributing
189
230
 
190
231
  Contributions are always welcome!
@@ -4,6 +4,7 @@
4
4
  [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
5
5
  [![Tests](https://github.com/kingyin3613/RingsPy/actions/workflows/tests.yml/badge.svg)](https://github.com/kingyin3613/RingsPy/actions/workflows/tests.yml)
6
6
  [![codecov](https://codecov.io/gh/kingyin3613/RingsPy/branch/main/graph/badge.svg?token=4AZN3HGGET)](https://codecov.io/gh/kingyin3613/RingsPy)
7
+ [![status](https://joss.theoj.org/papers/3dd05ca1103829e7620731845b0d2472/status.svg)](https://joss.theoj.org/papers/3dd05ca1103829e7620731845b0d2472)
7
8
 
8
9
  RingsPy is a Voronoi diagrams-based geometric generation tool that generates 3D meshes and models of prismatic cellular solids with radial growth rules.
9
10
 
@@ -22,12 +23,12 @@ to get updates beyond the latest release.
22
23
 
23
24
  RingsPy depends on mainstream Python libraries ``numpy`` and ``scipy``, and optionally depends on library ``hexalattice``, if the regular hexagonal lattice (e.g. honeycomb) is wanted; also ``vtk``, if the 3D STL files are also wanted.
24
25
 
25
- ### 2. Installation check
26
+ ### 2. Installation Check
26
27
 
27
- There are some unit tests in [tests](https://github.com/kingyin3613/RingsPy/tree/main/tests/). You can use ``pytest`` to check whether the installation is successful by running this command:
28
+ There are some unit tests in [tests](https://github.com/kingyin3613/RingsPy/tree/main/tests/). One can use ``pytest`` to check whether the installation is successful by running this command:
28
29
 
29
30
  ```bash
30
- pytest
31
+ pytest .
31
32
  ```
32
33
 
33
34
  ## Getting Started
@@ -35,30 +36,33 @@ Once all required components are installed and one is ready to begin, a path for
35
36
 
36
37
  1. Edit geometry and algorithm parameters
37
38
  2. Generate mesh using Mesh Generation Tools
38
- 3. Visualize 2D view using Matplotlib or 3D model in Paraview
39
- 4. (Optional) Export 3D STL model for 3D editing and/or printing
39
+ 3. Visualize 2D view using Matplotlib or 3D model in `ParaView`
40
+ 4. (Optional) Export 3D STL model for 3D editing and/or printing
41
+ 5. (Optional) Export input file for numerical simulations with software `Abaqus`
40
42
 
41
43
  ### 1. Geometry and Parameters
42
44
  The first step to generate a cellular geometry is selecting geometry and appropriate parameters.
43
45
 
44
46
  ### 1.1. Geometry
45
- A template file, `test_wood_cube.py` located in the [tests](https://github.com/kingyin3613/RingsPy/tree/main/tests/) directory acts as both the parameter input file, and main executable for the generation of a cubic wood specimen.
47
+ A template file, for example, `test_wood_cube.py` located in the [tests](https://github.com/kingyin3613/RingsPy/tree/main/tests/) directory acts as both the parameter input file, and main executable for the generation of a cubic wood specimen.
46
48
 
47
- *Note: The Mesh Generation Tool by now only accepts many of pre-defined boundary geometries, importing of CAD and/or other 3D model files will be implemented in subsequent versions.*
49
+ *Note: The Mesh Generation Tool by now only accepts many of pre-defined boundary geometries (for v0.3.x, the following 3 shapes are supported: triangle, square, hexagon), importing of CAD and/or other 3D model files will be implemented in subsequent versions.*
48
50
 
49
51
  *Note: for greatest compatibility create the geometry using all millimeters.*
50
52
 
51
53
  ### 1.2. Parameters
52
54
 
53
55
 
54
- By opening a input file, such as `tests/test_wood_cube.py` in any text editor, a file format similar to what is shown below will be displayed:
56
+ By opening a input file, e.g., `tests/test_wood_cube.py` in any text editor, a file format similar to what is shown below will be displayed:
55
57
  ```
56
58
  geoName = 'wood_cube'
57
59
  path = 'meshes'
58
60
 
61
+ radial_growth_rule = 'wood_binary'
59
62
  iter_max = 100
60
63
  print_interval = 500
61
64
 
65
+ # Radial cell growth parameters
62
66
  # length unit: mm
63
67
  r_min = 0 # inner radius of wood log
64
68
  r_max = 4 # outer radius of wood log
@@ -67,47 +71,58 @@ width_heart = 0.3*(r_max-r_min)/nrings # heart wood ring width
67
71
  width_early = 0.7*(r_max-r_min)/nrings # early wood ring width
68
72
  width_late = 0.3*(r_max-r_min)/nrings # late wood ring width
69
73
  log_center = (0,0) # coordinates of log center in the global system of reference
70
- box_center = (1.25,0) # coordinates of box center in the global system of reference
71
- box_size = 1.0 # cube size
72
-
73
- # if precracked
74
- x_indent_size = box_size*0.120
75
- y_indent_size = box_size*0.125
76
- x_precrack_size = box_size*0.1
77
- y_precrack_size = box_size*0.02
78
- x_indent = x_min + x_indent_size
79
- y_indent_min = box_center[1] - y_indent_size/2
80
- y_indent_max = box_center[1] + y_indent_size/2
81
- x_precrack = x_indent + x_precrack_size
82
- y_precrack = box_center[1]
83
74
 
84
75
  cellsize_early = 0.02
85
76
  cellsize_late = 0.01
86
77
  cellwallthickness_early = 0.010
87
78
  cellwallthickness_late = 0.006
88
-
89
- merge_operation = 'off'
79
+
80
+ # clipping box parameters
81
+ boundaryFlag = 'on'
82
+ box_shape = 'square'
83
+ box_center = (1.25,0) # coordinates of box center in the global system of reference
84
+ box_size = 1.0 # side length
85
+
86
+ # longitudinal direction parameters
87
+ fiberlength = 0.5*box_size
88
+ theta_min = 0 # radian
89
+ theta_max = 0.05 # radian
90
+ z_min = 0
91
+ z_max = box_size
92
+ long_connector_ratio = 0.02 # longitudinal joint size
93
+
94
+ merge_operation = 'on'
90
95
  merge_tol = 0.01
91
-
96
+
92
97
  precrackFlag = 'off'
93
98
  precrack_widths = 0.1
94
-
95
- boundaryFlag = 'on'
99
+
96
100
  stlFlag = 'on'
101
+
102
+ inpFlag = 'on'
103
+ inpType = 'Abaqus'
97
104
  ```
98
105
 
99
106
  - `geoName` is the geometry name, `path` is the folder where the mesh files will be generated.
100
- - `iter_max` is the max number of iteration for randomly placing a new non-overlapping wood cell particle in the 2D annual rings domain. Generally, larger `iter_max` leads to more centroidal Voronoi cells, for more reference, see [Centroidal Voronoi Tessellation](https://en.wikipedia.org/wiki/Centroidal_Voronoi_tessellation/).
101
- - `print_interval` is the print interval when every n cell particles are placed in the model domain.
102
- - `r_min` and `r_max` are the upper and lower bounds of radii to generate 2D annual rings, `nrings` is the number of rings.
103
- - `width_heart`, `width_early`, and `width_late`, are annual ring widths for heartwood, earlywood, and latewood, respectively, which all together determine the morphology of the wood mesostructure.
104
- - `log_center`,`box_center`, and `box_size` are for locating the wood log and cutting box.
105
- - `_indent`,`_precrack` parameters are related to precracked sample generation, which will be added in the next version.
107
+ - `radial_growth_rule` is the radial growth rule for cell placement. When a file name with extension`.npy` is specified, a saved cell data file will be loaded (for v0.3.x, choose one of these rules: `wood_binary`, `regular_hexagonal`, or a file name with extension `.npy`).
108
+ - `iter_max` is the max number of iteration for randomly placing new non-overlapping cell particles in the 2D toroidal cell placement region. Noticing that, larger `iter_max` leads to more centroidal Voronoi cells, for more reference, see Wiki [Centroidal Voronoi Tessellation](https://en.wikipedia.org/wiki/Centroidal_Voronoi_tessellation/).
109
+ - `print_interval` is the print interval when every n cell particles are placed in the placement region.
110
+ - `r_min` and `r_max` are the upper and lower bounds of radii of toroidal cell placement region, `nrings` is the number of rings.
111
+ - `width_heart`, `width_early`, and `width_late`, are ring widths for heartwood, earlywood, and latewood, respectively, which all together determine the morphology of the cellular structure.
112
+ - `log_center` is the location of the placement region.
106
113
  - `cellsize_early`,`cellsize_late`, `cellwallthickness_early`, and `cellwallthickness_late` are parameters for the earlywood and latewood cells.
107
- - `merge_operation` flag can be turned on/off for the merging operation, when turned on, all small wood cell ridges shorter than the threshold `merge_tol` will be merged with neighboring ridges.
108
- - `precrackFlag` flag is for inserting a pre-crack, for the notched specimens. So far, only a single line pre-crack with the length of `precrack_widths` is supported.
109
114
  - `boundaryFlag` flag can be turned on/off for generating neat boundaries consisting of grains.
115
+ - `box_shape` is the shape of cutting box (for v0.3.x, choose one of following shapes: `triangle`, `square`, or `hexagon`).
116
+ - `box_center`, and `box_size` are for locating the cutting box.
117
+ - `fiberlength` is the length of fibers consisting the prismatic cells during the z- (longitudinal) extrusion.
118
+ - `theta_min` and `theta_max` determine the twisting angles (unit: radian) of the 2D mesh around the `log_center` during the extrusion.
119
+ - `z_min` and `z_max` determine the range of prismatic cells in z- (longitudinal) direction.
120
+ - `long_connector_ratio` is the length of longitudinal joints, with `joint length = long_connector_ratio * fiberlength`.
121
+ - `merge_operation` flag can be turned on/off for the merging operation, when flag is on, cell ridges that are shorter than the threshold `merge_tol` in the 2D mesh will be deleted, and their vertices will be merged respectively, the mesh will be reconstructed. This is designed for eliminating small cell ridges/walls which fall out of the resolution range of the 3D printing and for avoiding having elements with too small stable time increments in numerical simulations.
122
+ - `precrackFlag` flag is for inserting a pre-crack, for the notched specimens. So far, only a single line pre-crack with the length of `precrack_widths` is supported.
110
123
  - `stlFlag` flag can be turned on/off for generating 3D STL files.
124
+ - `inpFlag` flag can be turned on/off for generating input files for numerical simulations.
125
+ - `inpType` indicates the software(s) that the mesh generation should generate input files for.
111
126
 
112
127
  ![MeshGenerator](<./contents/MeshGenerator.png>)
113
128
  ### 2.1. Run Mesh Generation
@@ -128,17 +143,20 @@ The following files should be generated in the `.\meshes\geoName` directory with
128
143
  - Grain-ridge data file: `wood_cube-vertex.mesh`
129
144
  - Ridge data file: `wood_cube-ridge.mesh`
130
145
  - Visualization files
146
+ - Cross-sectional image file for initial 2D configuration: `wood_cube.png`
131
147
  - Paraview vtk file for initial vertex configuration: `wood_cube_vertices.vtu`
132
148
  - Paraview vtk file for initial grain solid configuration: `wood_cube_beams.vtu`
133
149
  - Paraview vtk file of initial cell ridge configuration: `wood_cube_conns.vtu`
134
150
  - Paraview vtk file of initial connector (volume) configuration: `wood_cube_conns_vol.vtu`
135
151
  - (Optional) 3D model files
136
152
  - STL file of initial cellular solid configuration: `wood_cube.stl`
137
-
153
+ - (Optional) Abaqus input files
154
+ - INP file of simulation input of initial cellular solid configuration in `Abaqus`: `wood_cube.inp`
155
+
138
156
  ### 3. Visualization
139
- A scientific visualization application `ParaView` can directly visualize the generated vtk files; It can also visualize generated 3D model STL files if the STL flag is on. The Paraview software can be downloaded from their official website: [https://www.paraview.org/download/](https://www.paraview.org/download/), latest version is recommeded.
157
+ A scientific visualization application `ParaView` can directly visualize the generated vtk files; It can also visualize generated 3D model STL files if the STL flag is on. `Paraview` is a free software, it can be downloaded from its official website: [https://www.paraview.org/download/](https://www.paraview.org/download/), latest version is recommeded.
140
158
 
141
- ### 3.1. Visualize the components of the 3D model in ParaView
159
+ ### 3.1. Visualize Components of the 3D Model in ParaView
142
160
  1. Open ParaView
143
161
  2. Recommeded to temporarily turn off ray tracing
144
162
  - Uncheck "Enable Ray Tracing" (bottom left)
@@ -157,7 +175,7 @@ A scientific visualization application `ParaView` can directly visualize the gen
157
175
  - Enter a file name > OK
158
176
  - Leave new window as-is or increase resolution > OK
159
177
 
160
- ### 3.2. Visualize the volumes of the 3D model in ParaView
178
+ ### 3.2. Visualize Volumes of the 3D Model in ParaView
161
179
  1. Open Paraview
162
180
  2. Recommeded to temporarily turn off ray tracing
163
181
  - Uncheck "Enable Ray Tracing" (bottom left)
@@ -177,6 +195,29 @@ A scientific visualization application `ParaView` can directly visualize the gen
177
195
  - Leave new window as-is or increase resolution > OK
178
196
  ![ModelVisualization](<./contents/ModelVisualization.png>)
179
197
 
198
+ ### 4. (Optional) Numerical Simulation
199
+ The mesh generation tool can also prepare the input files for the numerical simulations of the cellular solid in other softwares. By now (version 0.3.0), the input file format, `.inp`, that is used in a finite element method (FEM) software `Abaqus` is supported, if the INP flag is on. `Abaqus` is a commerical software suite for integrated computer-aided engineering (CAE) and finite element analysis, own by Dassault Systèmes. One may refer to its [Wiki](https://en.wikipedia.org/wiki/Abaqus) for more about `Abaqus`, and to [Introduction](https://bertoldi.seas.harvard.edu/files/bertoldi/files/abaqusinputfilemanualv1.pdf?m=1444417191) for the introduction of Abaqus input files.
200
+
201
+ All steps for the model setup can be accomplished through manually coding the Abaqus input file in a text editor. The method used in the example procedure shown below requires access to the Abaqus GUI.
202
+
203
+ ### 4.1 Create New Model
204
+ 1. Open Abaqus CAE
205
+ 2. Create a new model
206
+ - File > New Model Database > With Standard/Explicit Model
207
+
208
+ ### 4.2 Import Meshed Part
209
+
210
+ 1. Import the meshed part
211
+ - File > Import > Part
212
+ - Select the newly created file which ends in `.inp` (note: you may need to change the File Filter to see this file)
213
+ - Click OK
214
+ 2. Rename part
215
+ - Under the model tree (left) expand `Parts`
216
+ - Right click on the part > Rename...
217
+ - Enter a new name less than 14 characters, no special symbols, and easily recognizable (i.e. "WoodCube")
218
+
219
+ *Note: if FEM parts will be added to the model, this RingsPy generated part must come first alphabetically. Also recommended not to include numbers in the name.*
220
+
180
221
  ## Contributing
181
222
 
182
223
  Contributions are always welcome!