EGS_Mesh

EGS_Mesh is an unstructured tetrahedral mesh library for EGSnrc.

:start geometry:
    library = egs_mesh
    name    = my_mesh
    file    = # your mesh here
:stop geometry:

If you're new to EGS_Mesh, you can work through a guided example. You can also consult the egsinp syntax reference. If you want to simulate STEP files using EGS_Mesh, check out the STEP file example.

Overview

EGS_Mesh offers modelling flexibility over traditional voxel-based simulations. Instead of building up a geometry using a constructive-solid approach, EGS_Mesh uses tetrahedral mesh files as input. CAD geometries can be meshed and then simulated directly.

Users can generate meshes using the standalone tool Gmsh, or create a mesh file from their data.

Alternatives

Other Monte Carlo codes that support tetrahedral mesh simulations include:

Guided simulation

This guide goes through a complete EGS_Mesh simulation step by step. By the end, you'll be ready to conduct your own simulations. Along the way we'll cover:

  • Fundamental EGSnrc and EGS_Mesh concepts
  • Gmsh basics
  • Running EGSnrc simulations
  • Viewing EGS_Mesh simulation results in Paraview

Prerequisites

To follow along, you'll need the following software:

  • EGSnrc with EGS_Mesh library support and the mevegs user code
  • Gmsh
  • Paraview

With that, you're ready to start!

Generate an input mesh

EGS_Mesh simulations have three steps:

  1. Create an input mesh file for your geometry
  2. Write an egsinp file for your simulation
  3. Run the simulation and view the results

For this example, you're going to simulate a cube of water. The cube will have side lengths of 10cm for a total volume of 1000 cm³.

Water cube

Creating the geometry using Gmsh

In this example, you'll create the geometry in Gmsh and then mesh it. It's also possible to define your geometry in CAD, export it to STEP, and then use Gmsh to mesh the STEP file.

First, open Gmsh. Create a new script file using File->New called cube.geo. If prompted, use the OpenCASCADE geometry kernel. Create a 10cm cube using:

Geometry->Elementary entities->Add->Box

After adding the box, hit the q key to quit the box dialog. Gmsh is unitless, so a length of 10 could have any unit attached. By default, EGS_Mesh assumes mesh files are given in cm.

Adding a box

Assigning mesh media

You've made a cube. But how will EGSnrc know it's water? You also have to assign EGSnrc media names to each volume. Media names are specified using Gmsh Physical Volumes. Open the Physical Volumes dialog using:

Geometry->Physical groups->Add->Volume

In the Name input, enter H2O for water. Select the volume using the mouse, and the yellow sphere at the center of the cube should turn red. End the selection by pressing the e key, and then hit the q key to exit the volume dialog entirely.

Assigning media

Meshing the geometry

Now, you have a geometry with media names attached. All that's left is to mesh it. Generate a 3D mesh using:

Mesh->3D

Creating a mesh

After meshing, you can find information like the number of tetrahedrons using Tools->Statistics. The mesh shown here has 1153 elements. Mesh visibility settings are in Tools->Options->Mesh->Visibility.

Write the mesh to disk using:

File->Save Mesh

Only ASCII v4.1 msh files are currently supported in EGS_Mesh. You can open up the file in a text editor to check the details:

$MeshFormat
4.1 0 8
$EndMeshFormat
$PhysicalNames
1
3 1 "H2O"
$EndPhysicalNames
... // continued

Here, the format version is confirmed to be 4.1, and the only media name is H2O. Further on in the file, node coordinates and element nodes are also stored. The msh format is documented here.

With a fresh mesh file in hand, you're ready to write an EGSnrc input file.

Scripting in Gmsh

If GUIs aren't your thing, Gmsh also has a scripting interface. Every action in the GUI is written to a project script file, which can be edited and reloaded on the fly.

The script for this session looks like:

SetFactory("OpenCASCADE");
Box(1) = {0, 0, 0, 10, 10, 10};
Physical Volume("H2O") = {1};

You can edit the script using Geometry->Edit script. After you make changes and save, reload it with Geometry->Reload script. Gmsh also provides language bindings for Python, C++, Julia and C, but this requires installing the Gmsh Software Development Kit.

Going further

  1. Try meshing another geometry, like a Torus.

  2. There are a few ways to generate a more refined mesh. One way is to adjust the maximum element size (Tools->Options->Mesh->General->Max element size). Try obtaining a mesh with roughly 50,000 elements by varying the maximum element size. Before remeshing, hit the 0 key to reset the old mesh. If you need to refine just a few mesh areas, check out the Gmsh documentation on size fields.

  3. Change the meshing algorithm using Tools->Options->Mesh->3D algorithm and remesh. Do you observe any difference in the generated mesh? For complex models, sometimes one algorithm succeeds where another fails.

Note: the full mesh file is saved below. You can copy the contents to a file using the copy button on the top right and continue the walkthrough if there were any issues generating the mesh yourself.

cube.msh file
$MeshFormat
4.1 0 8
$EndMeshFormat
$PhysicalNames
1
3 1 "H2O"
$EndPhysicalNames
$Entities
8 12 6 1
1 0 0 10 0 
2 0 0 0 0 
3 0 10 10 0 
4 0 10 0 0 
5 10 0 10 0 
6 10 0 0 0 
7 10 10 10 0 
8 10 10 0 0 
1 -1e-007 -1e-007 -1.000000002804313e-007 1e-007 1e-007 10.0000001 0 2 2 -1 
2 -1e-007 -1.000000002804313e-007 9.999999900000001 1e-007 10.0000001 10.0000001 0 2 1 -3 
3 -1e-007 9.999999900000001 -1.000000002804313e-007 1e-007 10.0000001 10.0000001 0 2 4 -3 
4 -1e-007 -1.000000002804313e-007 -1e-007 1e-007 10.0000001 1e-007 0 2 2 -4 
5 9.999999900000001 -1e-007 -1.000000002804313e-007 10.0000001 1e-007 10.0000001 0 2 6 -5 
6 9.999999900000001 -1.000000002804313e-007 9.999999900000001 10.0000001 10.0000001 10.0000001 0 2 5 -7 
7 9.999999900000001 9.999999900000001 -1.000000002804313e-007 10.0000001 10.0000001 10.0000001 0 2 8 -7 
8 9.999999900000001 -1.000000002804313e-007 -1e-007 10.0000001 10.0000001 1e-007 0 2 6 -8 
9 -1.000000002804313e-007 -1e-007 -1e-007 10.0000001 1e-007 1e-007 0 2 2 -6 
10 -1.000000002804313e-007 -1e-007 9.999999900000001 10.0000001 1e-007 10.0000001 0 2 1 -5 
11 -1.000000002804313e-007 9.999999900000001 -1e-007 10.0000001 10.0000001 1e-007 0 2 4 -8 
12 -1.000000002804313e-007 9.999999900000001 9.999999900000001 10.0000001 10.0000001 10.0000001 0 2 3 -7 
1 -1e-007 -1.000000002804313e-007 -1.000000002804313e-007 1e-007 10.0000001 10.0000001 0 4 1 2 -3 -4 
2 9.999999900000001 -1.000000002804313e-007 -1.000000002804313e-007 10.0000001 10.0000001 10.0000001 0 4 5 6 -7 -8 
3 -1.000000002804313e-007 -1e-007 -1.000000002804313e-007 10.0000001 1e-007 10.0000001 0 4 9 5 -10 -1 
4 -1.000000002804313e-007 9.999999900000001 -1.000000002804313e-007 10.0000001 10.0000001 10.0000001 0 4 11 7 -12 -3 
5 -1.000000002804313e-007 -1.000000002804313e-007 -1e-007 10.0000001 10.0000001 1e-007 0 4 4 11 -8 -9 
6 -1.000000002804313e-007 -1.000000002804313e-007 9.999999900000001 10.0000001 10.0000001 10.0000001 0 4 2 12 -6 -10 
1 -1.000000002804313e-007 -1.000000002804313e-007 -1.000000002804313e-007 10.0000001 10.0000001 10.0000001 1 1 6 1 2 3 4 5 6 
$EndEntities
$Nodes
27 366 1 366
0 1 0 1
1
0 0 10
0 2 0 1
2
0 0 0
0 3 0 1
3
0 10 10
0 4 0 1
4
0 10 0
0 5 0 1
5
10 0 10
0 6 0 1
6
10 0 0
0 7 0 1
7
10 10 10
0 8 0 1
8
10 10 0
1 1 0 5
9
10
11
12
13
0 0 1.666666666666662
0 0 3.333333333333323
0 0 4.999999999999986
0 0 6.666666666666647
0 0 8.333333333333321
1 2 0 5
14
15
16
17
18
0 1.666666666666662 10
0 3.333333333333323 10
0 4.999999999999986 10
0 6.666666666666647 10
0 8.333333333333321 10
1 3 0 5
19
20
21
22
23
0 10 1.666666666666662
0 10 3.333333333333323
0 10 4.999999999999986
0 10 6.666666666666647
0 10 8.333333333333321
1 4 0 5
24
25
26
27
28
0 1.666666666666662 0
0 3.333333333333323 0
0 4.999999999999986 0
0 6.666666666666647 0
0 8.333333333333321 0
1 5 0 5
29
30
31
32
33
10 0 1.666666666666662
10 0 3.333333333333323
10 0 4.999999999999986
10 0 6.666666666666647
10 0 8.333333333333321
1 6 0 5
34
35
36
37
38
10 1.666666666666662 10
10 3.333333333333323 10
10 4.999999999999986 10
10 6.666666666666647 10
10 8.333333333333321 10
1 7 0 5
39
40
41
42
43
10 10 1.666666666666662
10 10 3.333333333333323
10 10 4.999999999999986
10 10 6.666666666666647
10 10 8.333333333333321
1 8 0 5
44
45
46
47
48
10 1.666666666666662 0
10 3.333333333333323 0
10 4.999999999999986 0
10 6.666666666666647 0
10 8.333333333333321 0
1 9 0 5
49
50
51
52
53
1.666666666666662 0 0
3.333333333333323 0 0
4.999999999999986 0 0
6.666666666666647 0 0
8.333333333333321 0 0
1 10 0 5
54
55
56
57
58
1.666666666666662 0 10
3.333333333333323 0 10
4.999999999999986 0 10
6.666666666666647 0 10
8.333333333333321 0 10
1 11 0 5
59
60
61
62
63
1.666666666666662 10 0
3.333333333333323 10 0
4.999999999999986 10 0
6.666666666666647 10 0
8.333333333333321 10 0
1 12 0 5
64
65
66
67
68
1.666666666666662 10 10
3.333333333333323 10 10
4.999999999999986 10 10
6.666666666666647 10 10
8.333333333333321 10 10
2 1 0 41
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
0 5.033137425324112 4.978063957884034
0 7.087591793447951 7.068215154276066
0 2.931784845723934 7.087591793447946
0 7.07827521718551 2.865209698904819
0 2.912408206552051 2.931784845723936
0 5.008576439425326 7.871266611070288
0 7.87126661107029 4.991423560574671
0 5 2.202380952380952
0 2.128733388929707 5.008576439425325
0 1.761627594503586 1.764049674400071
0 1.764049674400069 8.23837240549641
0 8.237207833463605 1.755727781047679
0 8.238372405496413 8.235950325599928
0 5.706406138086535 6.495039931862317
0 6.823527081542217 4.196165460175166
0 3.601190476190474 5.684523809523808
0 4.315476190476192 3.601190476190476
0 3.580048256730807 8.41873189377305
0 8.441548847078678 3.533044056982424
0 1.581268106226945 3.580048256730807
0 3.558899127100923 1.631262966058042
0 6.445452125468789 8.393005315585391
0 8.418731893773055 6.419951743269181
0 6.46066508795366 1.559133949858432
0 1.620741885565005 6.442326078531255
0 3.324641006341506 4.397800211028859
0 4.401138915214744 6.680019889780803
0 5.785180167080281 3.233690749232313
0 6.823443490540694 5.691476634673572
0 7.424468230354308 0.8287154327265278
0 0.8461978899912683 7.420174621006908
0 7.420956132741292 9.15723891029633
0 9.164276074817368 7.413975517217269
0 2.580131680401124 0.8488281601145283
0 0.8357239251826327 2.586024482782715
0 9.16968917013557 2.572192959507522
0 2.586024482782715 9.164276074817364
0 9.142926434707434 9.142320914733313
0 0.8576790852666827 9.142926434707432
0 9.142635291699232 0.8555986119285853
0 0.8570735652925618 0.8576790852666833
2 2 0 41
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
10 5.033137425324112 4.978063957884034
10 7.087591793447951 7.068215154276066
10 2.931784845723934 7.087591793447946
10 7.07827521718551 2.865209698904819
10 2.912408206552051 2.931784845723936
10 5.008576439425326 7.871266611070288
10 7.87126661107029 4.991423560574671
10 5 2.202380952380952
10 2.128733388929707 5.008576439425325
10 1.761627594503586 1.764049674400071
10 1.764049674400069 8.23837240549641
10 8.237207833463605 1.755727781047679
10 8.238372405496413 8.235950325599928
10 5.706406138086535 6.495039931862317
10 6.823527081542217 4.196165460175166
10 3.601190476190474 5.684523809523808
10 4.315476190476192 3.601190476190476
10 3.580048256730807 8.41873189377305
10 8.441548847078678 3.533044056982424
10 1.581268106226945 3.580048256730807
10 3.558899127100923 1.631262966058042
10 6.445452125468789 8.393005315585391
10 8.418731893773055 6.419951743269181
10 6.46066508795366 1.559133949858432
10 1.620741885565005 6.442326078531255
10 3.324641006341506 4.397800211028859
10 4.401138915214744 6.680019889780803
10 5.785180167080281 3.233690749232313
10 6.823443490540694 5.691476634673572
10 7.424468230354308 0.8287154327265278
10 0.8461978899912683 7.420174621006908
10 7.420956132741292 9.15723891029633
10 9.164276074817368 7.413975517217269
10 2.580131680401124 0.8488281601145283
10 0.8357239251826327 2.586024482782715
10 9.16968917013557 2.572192959507522
10 2.586024482782715 9.164276074817364
10 9.142926434707434 9.142320914733313
10 0.8576790852666827 9.142926434707432
10 9.142635291699232 0.8555986119285853
10 0.8570735652925618 0.8576790852666833
2 3 0 41
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
4.978063957884034 0 5.033137425324112
7.068215154276066 0 7.087591793447951
2.865209698904819 0 7.07827521718551
7.087591793447946 0 2.931784845723934
2.931784845723936 0 2.912408206552051
7.871266611070288 0 5.008576439425326
4.991423560574671 0 7.87126661107029
2.202380952380952 0 5
5.008576439425325 0 2.128733388929707
1.764049674400071 0 1.761627594503586
8.23837240549641 0 1.764049674400069
1.755727781047679 0 8.237207833463605
8.235950325599928 0 8.238372405496413
6.495039931862317 0 5.706406138086535
4.196165460175166 0 6.823527081542217
5.684523809523808 0 3.601190476190474
3.601190476190476 0 4.315476190476192
8.41873189377305 0 3.580048256730807
3.533044056982424 0 8.441548847078678
3.580048256730807 0 1.581268106226945
1.631262966058042 0 3.558899127100923
8.393005315585391 0 6.445452125468789
6.419951743269181 0 8.418731893773055
1.559133949858432 0 6.46066508795366
6.442326078531255 0 1.620741885565005
4.397800211028859 0 3.324641006341506
6.680019889780803 0 4.401138915214744
3.233690749232313 0 5.785180167080281
5.691476634673572 0 6.823443490540694
0.8287154327265278 0 7.424468230354308
7.420174621006908 0 0.8461978899912683
9.15723891029633 0 7.420956132741292
7.413975517217269 0 9.164276074817368
0.8488281601145283 0 2.580131680401124
2.586024482782715 0 0.8357239251826327
2.572192959507522 0 9.16968917013557
9.164276074817364 0 2.586024482782715
9.142320914733313 0 9.142926434707434
0.8555986119285853 0 9.142635291699232
9.142926434707432 0 0.8576790852666827
0.8576790852666833 0 0.8570735652925618
2 4 0 41
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
4.978063957884034 10 5.033137425324112
7.068215154276066 10 7.087591793447951
2.865209698904819 10 7.07827521718551
7.087591793447946 10 2.931784845723934
2.931784845723936 10 2.912408206552051
7.871266611070288 10 5.008576439425326
4.991423560574671 10 7.87126661107029
2.202380952380952 10 5
5.008576439425325 10 2.128733388929707
1.764049674400071 10 1.761627594503586
8.23837240549641 10 1.764049674400069
1.755727781047679 10 8.237207833463605
8.235950325599928 10 8.238372405496413
6.495039931862317 10 5.706406138086535
4.196165460175166 10 6.823527081542217
5.684523809523808 10 3.601190476190474
3.601190476190476 10 4.315476190476192
8.41873189377305 10 3.580048256730807
3.533044056982424 10 8.441548847078678
3.580048256730807 10 1.581268106226945
1.631262966058042 10 3.558899127100923
8.393005315585391 10 6.445452125468789
6.419951743269181 10 8.418731893773055
1.559133949858432 10 6.46066508795366
6.442326078531255 10 1.620741885565005
4.397800211028859 10 3.324641006341506
6.680019889780803 10 4.401138915214744
3.233690749232313 10 5.785180167080281
5.691476634673572 10 6.823443490540694
0.8287154327265278 10 7.424468230354308
7.420174621006908 10 0.8461978899912683
9.15723891029633 10 7.420956132741292
7.413975517217269 10 9.164276074817368
0.8488281601145283 10 2.580131680401124
2.586024482782715 10 0.8357239251826327
2.572192959507522 10 9.16968917013557
9.164276074817364 10 2.586024482782715
9.142320914733313 10 9.142926434707434
0.8555986119285853 10 9.142635291699232
9.142926434707432 10 0.8576790852666827
0.8576790852666833 10 0.8570735652925618
2 5 0 41
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
5.033137425324112 4.978063957884034 0
7.087591793447951 7.068215154276066 0
2.931784845723934 7.087591793447946 0
7.07827521718551 2.865209698904819 0
2.912408206552051 2.931784845723936 0
7.87126661107029 4.991423560574671 0
5.008576439425326 7.871266611070288 0
5 2.202380952380952 0
2.128733388929707 5.008576439425325 0
1.761627594503586 1.764049674400071 0
1.764049674400069 8.23837240549641 0
8.237207833463605 1.755727781047679 0
8.238372405496413 8.235950325599928 0
5.706406138086535 6.495039931862317 0
6.823527081542217 4.196165460175166 0
3.601190476190474 5.684523809523808 0
4.315476190476192 3.601190476190476 0
3.580048256730807 8.41873189377305 0
8.441548847078678 3.533044056982424 0
1.581268106226945 3.580048256730807 0
3.558899127100923 1.631262966058042 0
6.445452125468789 8.393005315585391 0
8.418731893773055 6.419951743269181 0
6.46066508795366 1.559133949858432 0
1.620741885565005 6.442326078531255 0
4.401138915214744 6.680019889780803 0
3.324641006341506 4.397800211028859 0
5.785180167080281 3.233690749232313 0
6.823443490540694 5.691476634673572 0
7.424468230354308 0.8287154327265278 0
0.8461978899912683 7.420174621006908 0
7.420956132741292 9.15723891029633 0
9.164276074817368 7.413975517217269 0
2.580131680401124 0.8488281601145283 0
0.8357239251826327 2.586024482782715 0
9.16968917013557 2.572192959507522 0
2.586024482782715 9.164276074817364 0
9.142926434707434 9.142320914733313 0
0.8576790852666827 9.142926434707432 0
9.142635291699232 0.8555986119285853 0
0.8570735652925618 0.8576790852666833 0
2 6 0 41
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
5.033137425324112 4.978063957884034 10
7.087591793447951 7.068215154276066 10
2.931784845723934 7.087591793447946 10
7.07827521718551 2.865209698904819 10
2.912408206552051 2.931784845723936 10
7.87126661107029 4.991423560574671 10
5.008576439425326 7.871266611070288 10
5 2.202380952380952 10
2.128733388929707 5.008576439425325 10
1.761627594503586 1.764049674400071 10
1.764049674400069 8.23837240549641 10
8.237207833463605 1.755727781047679 10
8.238372405496413 8.235950325599928 10
5.706406138086535 6.495039931862317 10
6.823527081542217 4.196165460175166 10
3.601190476190474 5.684523809523808 10
4.315476190476192 3.601190476190476 10
3.580048256730807 8.41873189377305 10
8.441548847078678 3.533044056982424 10
1.581268106226945 3.580048256730807 10
3.558899127100923 1.631262966058042 10
6.445452125468789 8.393005315585391 10
8.418731893773055 6.419951743269181 10
6.46066508795366 1.559133949858432 10
1.620741885565005 6.442326078531255 10
3.324641006341506 4.397800211028859 10
4.401138915214744 6.680019889780803 10
5.785180167080281 3.233690749232313 10
6.823443490540694 5.691476634673572 10
7.424468230354308 0.8287154327265278 10
0.8461978899912683 7.420174621006908 10
7.420956132741292 9.15723891029633 10
9.164276074817368 7.413975517217269 10
2.580131680401124 0.8488281601145283 10
0.8357239251826327 2.586024482782715 10
9.16968917013557 2.572192959507522 10
2.586024482782715 9.164276074817364 10
9.142926434707434 9.142320914733313 10
0.8576790852666827 9.142926434707432 10
9.142635291699232 0.8555986119285853 10
0.8570735652925618 0.8576790852666833 10
3 1 0 52
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
5 4.999999999999999 5
3.159092456333339 6.835656483887658 3.164343516112342
6.835656483887658 3.164343516112341 3.15909245633334
3.164343516112341 3.15909245633334 6.835656483887658
6.835637319377509 3.164362680622491 6.840923691934037
3.164362680622491 6.840923691934036 6.835637319377508
6.840923691934037 6.835637319377509 3.164362680622492
6.836842651472115 6.836842651472115 6.836842651472115
3.163157348527885 3.163157348527884 3.163157348527885
4.743113821917304 5.000003324182252 7.501860451782565
5.000003324182252 7.501860451782564 4.743113821917304
7.501860451782566 4.743113821917304 5.000003324182251
2.498712566983841 5.000003324182251 5.257459196849101
5.000003324182252 5.257459196849103 2.498712566983841
5.257459196849103 2.498712566983841 5.000003324182252
1.746519075259313 2.679504812633787 8.253480924740691
8.253480924740691 1.746519075259313 2.679504812633787
2.679504812633784 8.253480924740693 1.74651907525931
1.733228765165208 1.74651907525931 2.679504812633784
8.255353982712458 1.740915991076484 7.340403139687549
7.340403139687549 8.255353982712458 1.740915991076485
1.736716654425622 7.337102259001611 8.2595673833781
8.268672399947912 8.261891489570971 7.329969167296016
2.014778846775584 4.998143341257853 3.147483571636094
4.998143341257854 3.147483571636096 2.014778846775584
3.147483571636097 2.014778846775584 4.998143341257854
2.037111238468511 7.10384883620137 5.001223832275405
7.103848836201371 5.001223832275405 2.037111238468513
5.001223832275405 2.037111238468513 7.103848836201371
5.00052899137604 7.104290482329501 7.959338535761171
7.104290482329501 7.959338535761171 5.000528991376041
7.959338535761171 5.000528991376041 7.1042904823295
7.751931602428114 2.248068397571888 5.000017612945396
2.248068397571887 5.000017612945396 7.751931602428114
5.000017612945396 7.751931602428113 2.248068397571887
1.307877295072796 1.306935703282792 8.692122704927206
1.306935703282792 8.692122704927208 1.307877295072796
8.692122704927208 1.307877295072796 1.306935703282792
1.307877295072795 8.693064961949064 8.692122704927206
8.692122704927206 1.307877295072796 8.693064961949064
8.693064961949064 8.692122704927206 1.307877295072796
8.689891760878954 8.689891760878954 8.689891760878954
1.310108239121043 1.310108239121043 1.310108239121043
4.548761885542784 1.887089342257003 3.354269860419683
1.887089342257003 3.354269860419682 4.548761885542783
3.354269860419683 4.548761885542782 1.887089342257004
8.144976113683573 6.455212908975502 5.513372148304923
5.513372148304923 8.144976113683573 6.455212908975503
6.455212908975503 5.513372148304923 8.144976113683573
2.660132623195177 8.459007577615173 3.903235006125929
3.903235006125928 2.66013262319518 8.459007577615173
8.459007577615173 3.903235006125928 2.660132623195179
$EndNodes
$Elements
1 1153 1 1153
3 1 4 1153
1 219 325 320 341 
2 137 326 321 342 
3 301 324 319 343 
4 219 325 341 364 
5 324 343 301 365 
6 137 326 342 366 
7 266 185 170 357 
8 315 320 324 344 
9 315 321 325 345 
10 319 326 315 346 
11 315 345 322 361 
12 315 344 322 362 
13 322 315 346 363 
14 257 235 316 360 
15 71 318 93 359 
16 154 317 175 358 
17 102 267 89 357 
18 194 215 219 320 
19 297 301 277 319 
20 113 133 137 321 
21 315 324 322 344 
22 315 325 322 345 
23 322 315 326 346 
24 295 224 305 356 
25 306 141 131 356 
26 303 183 297 354 
27 139 265 133 355 
28 221 101 215 353 
29 256 236 317 331 
30 72 316 92 332 
31 174 153 318 330 
32 92 263 98 351 
33 256 181 262 352 
34 99 180 174 350 
35 215 320 194 336 
36 133 321 113 335 
37 277 297 319 334 
38 323 333 170 358 
39 145 128 228 355 
40 309 292 146 354 
41 227 210 310 353 
42 194 320 210 336 
43 320 325 219 362 
44 319 324 301 363 
45 321 326 137 361 
46 277 319 292 334 
47 128 113 321 335 
48 236 256 317 339 
49 174 318 153 340 
50 92 316 72 338 
51 275 296 322 337 
52 237 323 252 333 
53 251 268 143 352 
54 225 87 104 351 
55 186 307 169 350 
56 175 317 339 358 
57 316 338 257 360 
58 93 318 340 359 
59 323 315 328 338 
60 323 315 329 339 
61 315 327 323 340 
62 252 323 237 360 
63 318 330 153 365 
64 316 332 72 364 
65 236 317 331 366 
66 288 292 277 319 
67 124 128 113 321 
68 210 194 206 320 
69 316 328 315 338 
70 317 329 315 339 
71 315 318 327 340 
72 275 322 295 337 
73 275 322 296 363 
74 324 329 319 343 
75 326 328 321 342 
76 325 327 320 341 
77 317 328 326 342 
78 318 329 324 343 
79 316 327 325 341 
80 214 322 344 362 
81 296 322 346 363 
82 237 253 323 333 
83 315 322 325 362 
84 315 322 326 361 
85 322 324 315 363 
86 253 339 323 358 
87 89 338 323 360 
88 316 315 327 338 
89 317 315 328 339 
90 315 329 318 340 
91 112 334 319 347 
92 195 335 321 349 
93 323 328 315 339 
94 315 323 329 340 
95 323 327 315 338 
96 276 336 320 348 
97 256 175 317 339 
98 93 318 174 340 
99 92 257 316 338 
100 137 321 133 342 
101 301 319 297 343 
102 219 320 215 341 
103 237 323 253 339 
104 175 317 154 331 
105 257 316 235 332 
106 93 318 71 330 
107 323 338 328 360 
108 323 339 329 358 
109 323 340 327 359 
110 295 322 275 344 
111 316 315 325 327 
112 317 315 326 328 
113 318 315 324 329 
114 319 324 315 329 
115 320 325 315 327 
116 321 326 315 328 
117 153 343 318 365 
118 72 341 316 364 
119 236 342 317 366 
120 235 316 258 332 
121 71 318 95 330 
122 177 154 317 331 
123 214 337 322 362 
124 210 320 206 344 
125 292 319 288 346 
126 124 128 321 345 
127 295 214 322 344 
128 295 322 214 337 
129 174 318 93 330 
130 92 316 257 332 
131 256 317 175 331 
132 253 323 170 358 
133 252 89 323 360 
134 288 277 301 319 
135 206 194 219 320 
136 124 113 137 321 
137 89 252 323 333 
138 170 323 253 333 
139 206 320 219 362 
140 124 321 137 361 
141 288 319 301 363 
142 124 345 321 361 
143 320 206 344 362 
144 319 288 346 363 
145 289 320 276 344 
146 125 319 112 346 
147 195 207 321 345 
148 317 329 177 347 
149 318 327 95 348 
150 316 328 258 349 
151 125 112 319 347 
152 195 321 207 349 
153 289 276 320 348 
154 323 339 237 360 
155 91 336 70 341 
156 152 173 334 343 
157 255 335 234 342 
158 275 344 322 363 
159 72 83 96 338 
160 153 165 178 340 
161 236 247 260 339 
162 258 332 316 349 
163 177 331 317 347 
164 95 330 318 348 
165 111 131 337 346 
166 246 321 328 342 
167 320 327 82 341 
168 319 329 164 343 
169 251 352 143 366 
170 87 351 225 364 
171 307 169 350 365 
172 82 327 320 348 
173 246 328 321 349 
174 164 329 319 347 
175 257 248 235 360 
176 166 154 175 358 
177 71 93 84 359 
178 207 325 321 345 
179 125 326 319 346 
180 289 324 320 344 
181 214 193 337 362 
182 321 335 246 349 
183 319 334 164 347 
184 320 336 82 348 
185 275 296 337 356 
186 321 325 207 349 
187 125 319 326 347 
188 289 320 324 348 
189 237 333 252 357 
190 174 153 330 350 
191 72 332 92 351 
192 256 236 331 352 
193 194 336 210 353 
194 246 261 234 342 
195 152 164 179 343 
196 97 70 82 341 
197 128 113 335 355 
198 277 334 292 354 
199 215 336 194 353 
200 277 297 334 354 
201 133 335 113 355 
202 315 317 326 329 
203 315 318 324 327 
204 315 316 325 328 
205 315 324 320 327 
206 315 325 321 328 
207 315 326 319 329 
208 275 337 295 356 
209 237 253 333 357 
210 93 340 77 359 
211 241 257 338 360 
212 175 339 159 358 
213 155 170 333 358 
214 195 218 207 345 
215 300 289 276 344 
216 136 125 112 346 
217 333 340 155 358 
218 329 339 317 358 
219 328 338 316 360 
220 327 340 318 359 
221 297 183 173 354 
222 133 265 255 355 
223 215 101 91 353 
224 153 169 343 365 
225 251 342 236 366 
226 72 87 341 364 
227 127 146 292 354 
228 209 228 128 355 
229 210 291 310 353 
230 306 131 296 356 
231 295 214 224 356 
232 325 328 316 349 
233 324 327 318 348 
234 326 329 317 347 
235 319 329 326 347 
236 321 328 325 349 
237 320 327 324 348 
238 267 252 89 357 
239 170 253 266 357 
240 217 349 325 364 
241 135 347 326 366 
242 299 348 324 365 
243 217 196 332 364 
244 114 331 135 366 
245 278 330 299 365 
246 256 175 181 352 
247 263 92 257 351 
248 93 99 174 350 
249 219 208 325 364 
250 290 324 301 365 
251 137 126 326 366 
252 192 219 325 362 
253 274 301 324 363 
254 110 137 326 361 
255 193 345 337 362 
256 96 92 72 338 
257 174 153 178 340 
258 236 260 256 339 
259 329 340 151 343 
260 233 328 339 342 
261 327 338 69 341 
262 307 294 169 365 
263 251 143 130 366 
264 212 87 225 364 
265 165 151 340 343 
266 83 69 338 341 
267 233 339 247 342 
268 174 77 93 340 
269 256 159 175 339 
270 257 92 241 338 
271 325 349 316 364 
272 324 348 318 365 
273 326 347 317 366 
274 219 215 199 341 
275 281 301 297 343 
276 117 137 133 342 
277 158 77 174 340 
278 240 159 256 339 
279 76 241 92 338 
280 292 288 279 346 
281 124 116 128 345 
282 198 210 206 344 
283 332 349 217 364 
284 330 348 299 365 
285 135 331 347 366 
286 158 171 77 340 
287 253 159 240 339 
288 76 89 241 338 
289 251 247 236 342 
290 72 87 83 341 
291 165 153 169 343 
292 323 340 333 358 
293 80 87 72 351 
294 236 244 251 352 
295 169 153 162 350 
296 128 121 113 355 
297 285 277 292 354 
298 194 210 203 353 
299 219 341 199 364 
300 137 342 117 366 
301 281 301 343 365 
302 316 341 325 364 
303 318 343 324 365 
304 317 342 326 366 
305 83 69 96 338 
306 233 260 247 339 
307 165 151 178 340 
308 275 286 296 356 
309 237 252 242 357 
310 170 333 253 357 
311 295 337 214 356 
312 131 337 296 356 
313 210 336 291 353 
314 215 91 336 353 
315 279 346 288 363 
316 116 345 124 361 
317 206 198 344 362 
318 252 333 89 357 
319 127 292 334 354 
320 209 128 335 355 
321 133 255 335 355 
322 297 173 334 354 
323 93 174 330 350 
324 256 331 175 352 
325 92 332 257 351 
326 216 335 195 349 
327 134 334 112 347 
328 256 244 236 352 
329 80 72 92 351 
330 174 162 153 350 
331 298 336 276 348 
332 121 133 113 355 
333 277 285 297 354 
334 203 215 194 353 
335 286 275 295 356 
336 132 337 213 345 
337 257 241 248 360 
338 159 166 175 358 
339 84 93 77 359 
340 237 242 253 357 
341 214 204 224 356 
342 306 296 286 356 
343 267 242 252 357 
344 170 185 160 357 
345 290 274 301 324 
346 192 219 208 325 
347 137 126 110 326 
348 316 349 332 364 
349 317 347 331 366 
350 318 348 330 365 
351 193 205 345 362 
352 275 287 344 363 
353 111 123 346 361 
354 261 255 234 342 
355 97 91 70 341 
356 152 179 173 343 
357 155 333 171 340 
358 91 75 215 341 
359 133 255 238 342 
360 297 173 157 343 
361 337 345 322 362 
362 92 98 80 351 
363 256 262 244 352 
364 174 180 162 350 
365 139 133 121 355 
366 303 297 285 354 
367 221 215 203 353 
368 214 344 198 362 
369 296 346 279 363 
370 155 340 167 358 
371 237 339 249 360 
372 73 338 85 359 
373 198 291 210 344 
374 116 209 128 345 
375 292 279 127 346 
376 197 116 132 345 
377 296 115 279 346 
378 214 280 198 344 
379 263 257 243 351 
380 175 161 181 352 
381 79 99 93 350 
382 172 164 152 334 
383 254 246 234 335 
384 116 197 209 345 
385 279 115 127 346 
386 198 280 291 344 
387 110 124 137 361 
388 192 206 219 362 
389 274 288 301 363 
390 251 244 268 352 
391 80 104 87 351 
392 186 169 162 350 
393 145 121 128 355 
394 309 285 292 354 
395 227 203 210 353 
396 70 90 82 336 
397 286 295 305 356 
398 141 122 131 356 
399 199 215 75 341 
400 133 238 117 342 
401 297 157 281 343 
402 295 280 214 344 
403 197 132 213 345 
404 131 115 296 346 
405 78 102 89 357 
406 266 253 242 357 
407 95 327 82 348 
408 177 329 164 347 
409 258 328 246 349 
410 193 213 337 345 
411 281 343 157 365 
412 117 342 238 366 
413 199 341 75 364 
414 217 325 208 364 
415 299 324 290 365 
416 126 135 326 366 
417 289 298 276 348 
418 216 195 207 349 
419 125 134 112 347 
420 217 196 211 332 
421 278 293 299 330 
422 114 129 135 331 
423 250 235 258 332 
424 177 168 154 331 
425 71 95 86 330 
426 276 291 300 344 
427 112 127 136 346 
428 195 209 218 345 
429 316 338 327 341 
430 317 339 328 342 
431 318 340 329 343 
432 207 325 217 349 
433 125 326 135 347 
434 289 324 299 348 
435 274 324 300 344 
436 192 325 218 345 
437 136 110 326 346 
438 274 324 344 363 
439 326 346 110 361 
440 192 325 345 362 
441 328 339 323 360 
442 329 340 323 358 
443 327 338 323 359 
444 246 335 254 349 
445 172 164 334 347 
446 111 337 138 361 
447 82 336 90 348 
448 211 217 332 349 
449 299 330 293 348 
450 135 331 129 347 
451 258 250 332 349 
452 86 330 95 348 
453 168 331 177 347 
454 207 218 325 345 
455 300 324 289 344 
456 136 326 125 346 
457 167 155 171 340 
458 249 237 253 339 
459 73 89 85 338 
460 322 346 326 361 
461 322 345 325 362 
462 322 344 324 363 
463 302 275 296 363 
464 214 220 193 362 
465 295 275 287 344 
466 193 205 213 345 
467 131 111 123 346 
468 69 338 327 359 
469 233 339 328 360 
470 151 340 329 358 
471 192 345 205 362 
472 274 344 287 363 
473 123 110 346 361 
474 75 87 212 364 
475 169 294 157 365 
476 238 251 130 366 
477 117 238 130 366 
478 294 281 157 365 
479 212 199 75 364 
480 333 340 323 359 
481 207 218 192 325 
482 136 110 125 326 
483 300 274 289 324 
484 274 300 287 344 
485 136 123 110 346 
486 192 218 205 345 
487 82 95 69 327 
488 246 258 233 328 
489 164 177 151 329 
490 168 118 129 347 
491 282 293 86 348 
492 250 239 211 349 
493 88 333 73 359 
494 200 211 239 349 
495 118 168 156 347 
496 86 74 282 348 
497 118 156 172 347 
498 170 160 333 357 
499 216 200 239 349 
500 282 74 298 348 
501 214 337 204 356 
502 111 132 138 337 
503 216 239 254 349 
504 74 90 298 348 
505 172 134 118 347 
506 322 345 337 361 
507 217 192 208 325 
508 110 126 135 326 
509 299 274 290 324 
510 95 84 69 327 
511 248 233 258 328 
512 166 151 177 329 
513 165 179 151 343 
514 233 247 261 342 
515 83 97 69 341 
516 175 331 161 352 
517 257 332 243 351 
518 79 93 330 350 
519 160 155 170 333 
520 207 192 217 325 
521 110 135 125 326 
522 299 289 274 324 
523 138 337 132 361 
524 69 85 338 359 
525 167 340 151 358 
526 233 249 339 360 
527 214 193 204 337 
528 169 157 343 365 
529 238 342 251 366 
530 75 341 87 364 
531 168 129 331 347 
532 250 211 332 349 
533 293 330 86 348 
534 122 337 131 356 
535 284 291 276 336 
536 112 120 127 334 
537 195 202 209 335 
538 78 89 333 357 
539 91 81 70 336 
540 255 245 234 335 
541 152 173 163 334 
542 216 254 335 349 
543 172 334 134 347 
544 90 336 298 348 
545 92 96 76 338 
546 174 178 158 340 
547 256 260 240 339 
548 86 308 105 330 
549 168 144 187 331 
550 211 226 269 332 
551 155 176 170 358 
552 259 252 237 360 
553 88 73 94 359 
554 294 330 278 365 
555 130 331 114 366 
556 196 212 332 364 
557 264 222 254 335 
558 182 140 172 334 
559 184 103 88 333 
560 304 90 100 336 
561 213 142 223 337 
562 69 327 84 359 
563 248 233 328 360 
564 151 329 166 358 
565 200 216 207 349 
566 118 134 125 347 
567 282 298 289 348 
568 79 93 71 330 
569 175 154 161 331 
570 257 235 243 332 
571 294 283 278 330 
572 130 119 114 331 
573 196 212 201 332 
574 111 131 122 337 
575 172 156 164 347 
576 74 82 90 348 
577 239 246 254 349 
578 46 133 255 238 
579 56 157 297 173 
580 91 75 21 215 
581 252 26 89 241 
582 253 170 51 159 
583 171 88 11 77 
584 267 89 25 102 
585 73 78 89 333 
586 61 211 250 239 
587 168 118 31 129 
588 293 16 282 86 
589 61 200 211 239 
590 74 282 16 86 
591 118 168 31 156 
592 198 66 291 280 
593 36 127 279 115 
594 197 41 116 209 
595 115 279 36 296 
596 41 132 197 116 
597 198 66 280 214 
598 138 132 116 361 
599 214 198 220 362 
600 296 279 302 363 
601 297 281 157 56 
602 199 21 75 215 
603 117 133 46 238 
604 156 31 118 172 
605 256 240 51 159 
606 158 11 174 77 
607 76 26 92 241 
608 74 298 16 282 
609 239 216 61 200 
610 240 253 51 159 
611 76 89 26 241 
612 158 171 11 77 
613 211 200 217 349 
614 135 129 118 347 
615 282 299 293 348 
616 156 168 177 347 
617 258 239 250 349 
618 86 95 74 348 
619 304 90 17 100 
620 140 32 182 172 
621 62 264 222 254 
622 75 212 21 199 
623 238 46 117 130 
624 281 294 157 56 
625 298 74 16 90 
626 216 239 61 254 
627 46 238 251 130 
628 294 169 157 56 
629 87 212 21 75 
630 172 31 118 134 
631 10 184 103 88 
632 50 266 185 170 
633 131 306 37 141 
634 295 224 67 305 
635 213 142 42 223 
636 292 36 127 279 
637 210 198 66 291 
638 128 116 41 209 
639 308 15 86 105 
640 168 144 30 187 
641 269 226 211 60 
642 11 93 174 77 
643 257 92 26 241 
644 175 256 51 159 
645 280 66 295 214 
646 197 213 132 41 
647 36 131 115 296 
648 171 158 167 340 
649 240 249 253 339 
650 89 76 85 338 
651 300 291 280 344 
652 218 209 197 345 
653 127 115 136 346 
654 165 169 157 343 
655 238 247 251 342 
656 75 83 87 341 
657 263 98 27 92 
658 12 174 99 180 
659 262 181 256 52 
660 131 123 115 346 
661 280 295 287 344 
662 205 197 213 345 
663 265 139 133 47 
664 22 221 101 215 
665 183 303 297 57 
666 96 69 85 338 
667 260 233 249 339 
668 167 178 151 340 
669 251 268 45 143 
670 104 225 20 87 
671 186 55 169 307 
672 173 179 157 343 
673 75 91 97 341 
674 261 238 255 342 
675 65 310 227 210 
676 40 145 128 228 
677 146 309 35 292 
678 308 105 330 350 
679 144 187 331 352 
680 226 269 332 351 
681 155 167 176 358 
682 73 85 94 359 
683 259 237 249 360 
684 140 334 182 354 
685 222 335 264 355 
686 304 336 100 353 
687 184 103 333 357 
688 223 337 142 356 
689 252 259 241 360 
690 88 94 77 359 
691 176 159 170 358 
692 302 287 275 363 
693 111 138 123 361 
694 193 220 205 362 
695 156 177 164 347 
696 74 95 82 348 
697 239 258 246 349 
698 200 207 217 349 
699 125 135 118 347 
700 289 299 282 348 
701 269 226 59 351 
702 14 105 308 350 
703 29 187 144 352 
704 58 183 303 354 
705 48 265 139 355 
706 23 101 221 353 
707 124 110 138 361 
708 192 220 206 362 
709 274 302 288 363 
710 34 309 146 354 
711 39 145 228 355 
712 28 98 263 351 
713 53 262 181 352 
714 13 180 99 350 
715 310 64 227 353 
716 33 140 182 354 
717 63 222 264 355 
718 304 100 18 353 
719 141 306 38 356 
720 43 223 142 356 
721 68 305 224 356 
722 54 307 186 350 
723 44 143 268 352 
724 19 225 104 351 
725 24 267 102 357 
726 266 49 185 357 
727 9 103 184 357 
728 167 151 176 358 
729 85 69 94 359 
730 249 233 259 360 
731 69 84 94 359 
732 151 166 176 358 
733 248 259 233 360 
734 168 129 144 331 
735 308 86 293 330 
736 250 211 269 332 
737 134 172 140 334 
738 216 254 222 335 
739 213 132 142 337 
740 88 171 184 333 
741 298 90 304 336 
742 196 217 208 364 
743 126 114 135 366 
744 278 299 290 365 
745 192 205 220 362 
746 138 110 123 361 
747 287 302 274 363 
748 89 267 25 252 
749 298 16 17 90 
750 32 31 172 134 
751 61 62 216 254 
752 172 140 32 134 
753 17 298 90 304 
754 216 62 222 254 
755 10 184 88 171 
756 50 266 170 253 
757 137 117 126 366 
758 219 199 208 364 
759 281 290 301 365 
760 306 131 37 296 
761 224 295 67 214 
762 142 213 42 132 
763 211 250 269 60 
764 86 293 15 308 
765 144 168 30 129 
766 213 42 132 41 
767 36 37 131 296 
768 66 295 214 67 
769 212 21 20 87 
770 294 55 169 56 
771 46 251 45 130 
772 88 11 10 171 
773 170 51 50 253 
774 89 25 26 252 
775 26 27 92 257 
776 93 12 11 174 
777 51 256 175 52 
778 105 79 86 330 
779 161 168 187 331 
780 308 293 283 330 
781 129 119 144 331 
782 250 269 243 332 
783 211 201 226 332 
784 66 65 210 291 
785 40 128 41 209 
786 127 35 36 292 
787 60 211 250 61 
788 15 16 293 86 
789 168 31 30 129 
790 181 175 256 52 
791 92 27 263 257 
792 174 93 12 99 
793 307 55 169 294 
794 225 212 20 87 
795 143 45 251 130 
796 144 331 119 352 
797 308 330 283 350 
798 161 331 187 352 
799 79 330 105 350 
800 226 332 201 351 
801 243 332 269 351 
802 122 142 132 337 
803 88 103 78 333 
804 265 133 255 47 
805 101 91 22 215 
806 297 183 57 173 
807 297 57 56 173 
808 21 22 91 215 
809 47 133 255 46 
810 138 116 124 361 
811 206 220 198 362 
812 279 288 302 363 
813 65 310 210 291 
814 128 40 228 209 
815 127 146 35 292 
816 264 335 245 355 
817 182 334 163 354 
818 120 334 140 354 
819 202 335 222 355 
820 264 254 245 335 
821 182 172 163 334 
822 134 140 120 334 
823 216 222 202 335 
824 78 333 103 357 
825 100 336 81 353 
826 284 336 304 353 
827 213 223 204 337 
828 81 100 90 336 
829 298 304 284 336 
830 184 333 160 357 
831 122 142 337 356 
832 184 171 160 333 
833 204 337 223 356 
834 79 71 86 330 
835 168 161 154 331 
836 250 243 235 332 
837 283 293 278 330 
838 129 114 119 331 
839 211 196 201 332 
840 314 107 14 350 
841 59 232 271 351 
842 190 29 150 352 
843 58 313 188 354 
844 48 149 270 355 
845 23 230 106 353 
846 34 148 313 354 
847 39 231 149 355 
848 64 312 230 353 
849 107 189 13 350 
850 271 108 28 351 
851 53 190 272 352 
852 54 189 314 350 
853 44 272 150 352 
854 19 108 232 351 
855 188 148 33 354 
856 63 270 231 355 
857 18 106 312 353 
858 43 147 229 356 
859 311 147 38 356 
860 68 229 311 356 
861 109 273 24 357 
862 191 49 273 357 
863 9 191 109 357 
864 122 132 111 337 
865 78 73 88 333 
866 254 234 245 335 
867 172 152 163 334 
868 120 112 134 334 
869 202 195 216 335 
870 193 213 204 337 
871 248 241 259 360 
872 84 77 94 359 
873 159 176 166 358 
874 81 90 70 336 
875 276 298 284 336 
876 160 171 155 333 
877 121 39 149 355 
878 34 313 285 354 
879 203 64 230 353 
880 162 189 54 350 
881 80 108 19 351 
882 244 272 44 352 
883 58 303 285 354 
884 48 139 121 355 
885 23 221 203 353 
886 28 80 98 351 
887 244 262 53 352 
888 13 162 180 350 
889 285 313 58 354 
890 121 149 48 355 
891 23 203 230 353 
892 80 28 108 351 
893 162 13 189 350 
894 53 272 244 352 
895 121 145 39 355 
896 285 309 34 354 
897 203 227 64 353 
898 54 186 162 350 
899 44 268 244 352 
900 19 104 80 351 
901 33 148 120 354 
902 63 231 202 355 
903 163 188 33 354 
904 245 270 63 355 
905 79 14 107 350 
906 59 271 243 351 
907 29 190 161 352 
908 314 14 283 350 
909 119 150 29 352 
910 201 232 59 351 
911 18 312 284 353 
912 81 106 18 353 
913 161 190 53 352 
914 79 107 13 350 
915 243 271 28 351 
916 283 54 314 350 
917 19 232 201 351 
918 44 150 119 352 
919 105 14 79 350 
920 243 269 59 351 
921 161 187 29 352 
922 14 308 283 350 
923 29 144 119 352 
924 201 59 226 351 
925 58 188 163 354 
926 48 270 245 355 
927 23 106 81 353 
928 58 163 183 354 
929 48 245 265 355 
930 34 120 148 354 
931 39 202 231 355 
932 81 101 23 353 
933 284 312 64 353 
934 34 146 120 354 
935 39 228 202 355 
936 310 284 64 353 
937 245 63 264 355 
938 33 182 163 354 
939 68 311 286 356 
940 122 38 147 356 
941 204 43 229 356 
942 81 18 100 353 
943 242 273 49 357 
944 78 109 24 357 
945 160 191 9 357 
946 43 122 147 356 
947 311 38 286 356 
948 68 204 229 356 
949 286 38 306 356 
950 43 142 122 356 
951 68 224 204 356 
952 24 273 242 357 
953 191 160 49 357 
954 9 109 78 357 
955 120 140 33 354 
956 202 222 63 355 
957 24 242 267 357 
958 9 78 103 357 
959 160 185 49 357 
960 304 18 284 353 
961 243 28 263 351 
962 53 181 161 352 
963 79 13 99 350 
964 286 305 68 356 
965 122 141 38 356 
966 204 223 43 356 
967 283 307 54 350 
968 201 225 19 351 
969 119 143 44 352 
970 78 24 102 357 
971 242 49 266 357 
972 9 184 160 357 
973 115 123 136 346 
974 280 287 300 344 
975 205 218 197 345 
976 238 261 247 342 
977 157 179 165 343 
978 97 83 75 341 
979 76 96 85 338 
980 240 260 249 339 
981 158 178 167 340 
982 196 208 212 364 
983 290 294 278 365 
984 114 126 130 366 
985 189 107 314 350 
986 190 150 272 352 
987 232 108 271 351 
988 313 148 188 354 
989 149 231 270 355 
990 106 230 312 353 
991 229 147 311 356 
992 109 191 273 357 
993 23 22 221 101 
994 57 183 303 58 
995 265 48 139 47 
996 98 27 28 263 
997 99 13 12 180 
998 52 262 181 53 
999 309 35 34 146 
1000 64 65 310 227 
1001 39 145 40 228 
1002 29 30 144 187 
1003 14 15 308 105 
1004 60 269 226 59 
1005 67 305 224 68 
1006 43 223 42 142 
1007 38 37 306 141 
1008 63 62 264 222 
1009 304 17 18 100 
1010 33 32 182 140 
1011 268 45 143 44 
1012 186 54 55 307 
1013 225 20 19 104 
1014 102 24 25 267 
1015 9 10 184 103 
1016 49 50 266 185 
1017 313 188 5 58 
1018 106 23 3 230 
1019 270 48 8 149 
1020 148 5 34 313 
1021 3 312 230 64 
1022 39 8 149 231 
1023 272 6 44 150 
1024 232 19 4 108 
1025 314 54 1 189 
1026 107 1 13 189 
1027 108 28 4 271 
1028 272 53 6 190 
1029 4 59 232 271 
1030 1 14 314 107 
1031 29 6 190 150 
1032 18 3 312 106 
1033 5 33 188 148 
1034 8 270 231 63 
1035 7 68 229 311 
1036 147 38 7 311 
1037 147 229 7 43 
1038 109 9 2 191 
1039 2 24 109 273 
1040 273 191 2 49 
1041 294 290 281 365 
1042 208 199 212 364 
1043 126 117 130 366 
1044 149 8 270 231 
1045 3 312 106 230 
1046 148 188 5 313 
1047 6 272 190 150 
1048 108 4 232 271 
1049 107 314 1 189 
1050 7 229 147 311 
1051 191 2 109 273 
1052 362 315 320 325 
1053 362 320 315 344 
1054 361 315 321 326 
1055 361 321 315 345 
1056 363 315 319 324 
1057 363 319 315 346 
1058 342 335 133 255 
1059 342 133 335 321 
1060 334 343 297 319 
1061 297 343 334 173 
1062 341 336 215 91 
1063 341 215 336 320 
1064 337 346 296 322 
1065 296 346 337 131 
1066 360 235 328 248 
1067 360 328 235 316 
1068 258 328 235 248 
1069 258 235 328 316 
1070 359 71 327 84 
1071 359 327 71 318 
1072 95 327 71 84 
1073 95 71 327 318 
1074 358 154 329 166 
1075 358 329 154 317 
1076 177 329 154 166 
1077 177 154 329 317 
1078 341 72 338 83 
1079 341 338 72 316 
1080 342 236 339 247 
1081 342 339 236 317 
1082 343 153 340 165 
1083 343 340 153 318 
1084 320 276 291 336 
1085 291 276 320 344 
1086 291 210 320 336 
1087 320 210 291 344 
1088 292 319 127 334 
1089 292 127 319 346 
1090 112 127 319 334 
1091 112 319 127 346 
1092 128 321 209 335 
1093 128 209 321 345 
1094 195 209 321 335 
1095 195 321 209 345 
1096 336 341 82 70 
1097 82 341 336 320 
1098 337 346 361 111 
1099 361 346 337 322 
1100 335 342 246 234 
1101 246 342 335 321 
1102 334 343 164 152 
1103 164 343 334 319 
1104 323 359 73 333 
1105 73 359 323 338 
1106 73 89 323 333 
1107 323 89 73 338 
1108 365 307 330 350 
1109 365 330 307 294 
1110 283 330 307 350 
1111 283 307 330 294 
1112 225 364 332 212 
1113 332 364 225 351 
1114 332 201 225 212 
1115 225 201 332 351 
1116 366 143 331 352 
1117 366 331 143 130 
1118 119 331 143 352 
1119 119 143 331 130 
1120 358 253 159 170 
1121 358 159 253 339 
1122 360 89 241 252 
1123 360 241 89 338 
1124 351 364 72 332 
1125 72 364 351 87 
1126 350 365 153 330 
1127 153 365 350 169 
1128 366 352 236 251 
1129 366 236 352 331 
1130 340 359 171 77 
1131 340 171 359 333 
1132 88 171 359 77 
1133 88 359 171 333 
1134 354 173 163 183 
1135 354 163 173 334 
1136 355 255 245 265 
1137 355 245 255 335 
1138 354 127 120 334 
1139 354 120 127 146 
1140 355 209 202 335 
1141 355 202 209 228 
1142 353 91 81 101 
1143 353 81 91 336 
1144 353 291 284 336 
1145 353 284 291 310 
1146 345 132 361 116 
1147 345 361 132 337 
1148 82 341 69 97 
1149 69 341 82 327 
1150 342 246 233 328 
1151 342 233 246 261 
1152 164 343 151 179 
1153 151 343 164 329 
$EndElements
$Parametrizations
0 0
$EndParametrizations

Write an egsinp file

Once you have a mesh file, you're ready to write the input file. The three required input file sections are:

  1. Geometry definition
  2. Source definition
  3. Run control

First, define the mesh geometry. An EGS_Mesh geometry block looks like:

:start geometry definition:
    :start geometry:
        library = egs_mesh
        name = my_mesh
        file = cube.msh # your mesh here
    :stop geometry:

    # define a 15x15x15cm vacuum envelope around the mesh
    :start geometry:
        library = egs_box
        name = my_box
        box size = 15 15 15
        # translate it from the origin to the cube's centre point (5, 5, 5)
        :start transformation:
            translation = 5 5 5
        :stop transformation:
        :start media input:
            media = vacuum
        :stop media input:
    :stop geometry:

    :start geometry:
        library = egs_genvelope
        name = my_envelope
        base geometry = my_box
        inscribed geometries = my_mesh
    :stop geometry:

    simulation geometry = my_envelope
:stop geometry definition:

For the mesh, the only input you need to adjust is the file. If you're following along, this should be named cube.msh. We also defined a vacuum envelope around the mesh, so that particles exiting the mesh are only discarded when they exit the vacuum too. This probably won't cause a noticable difference for this convex mesh, but defining an envelope is crucial for correctly simulating meshes in general. For your own simulations, make sure to adjust the envelope's size and position to bound the mesh.

Next, the source. Let's define an exterior point source. The meshed box starts at the origin and extends 10cm along x, y and z. So placing the source at (5, 5, -1) means the source will be 1cm away from the box's -z face. For this example, you'll simulate a 10MeV photon monoenergetic point source.

:start source definition:
    :start source:
        library     = egs_point_source
        name        = my_source
        position    = 5 5 -1
        :start spectrum:
            type    = monoenergetic
            energy  = 10
        :stop spectrum:
        charge      = 0
    :stop source:
    simulation source = my_source
:stop source definition:

And finally, the run control section. Let's run 1 million histories.

:start run control:
    ncase = 1e6
:stop run control:

The input file is done, and you're ready to run the simulation.

:start geometry definition:
    :start geometry:
        library = egs_mesh
        name = my_mesh
        file = cube.msh # your mesh here
    :stop geometry:

    # define a 15x15x15cm vacuum envelope around the mesh
    :start geometry:
        library = egs_box
        name = my_box
        box size = 15 15 15
        # translate it from the origin to the cube's centre point (5, 5, 5)
        :start transformation:
            translation = 5 5 5
        :stop transformation:
        :start media input:
            media = vacuum
        :stop media input:
    :stop geometry:

    :start geometry:
        library = egs_genvelope
        name = my_envelope
        base geometry = my_box
        inscribed geometries = my_mesh
    :stop geometry:

    simulation geometry = my_envelope
:stop geometry definition:

:start source definition:
    :start source:
        library     = egs_point_source
        name        = my_source
        position    = 5 5 -1
        :start spectrum:
            type    = monoenergetic
            energy  = 10
        :stop spectrum:
        charge      = 0
    :stop source:
    simulation source = my_source
:stop source definition:

:start run control:
    ncase = 1e6
:stop run control:

Run the simulation and view the results

To run the simulation, you'll use the mevegs EGSnrc user code, which outputs the results to a VTK file to be analyzed in Paraview.

As an egs++ geometry, EGS_Mesh is technically usable from any egs++ application. But mevegs converts EGS_Mesh results to VTK for quick analysis without any extra steps.

Back when you created the mesh file, you also assigned media names. In this example, the only media was H2O, but simulations can have many different media. For all mesh media, you have to ensure that EGSnrc has the corresponding data loaded. This can either be done by specifying a pegs4dat file using the -p flag on the command line, or defining the media in the input file. Either method is fine, but for this example you'll use a pegs4dat file. The file tutor_data.pegs4dat comes bundled with EGSnrc and has a definition of H2O.

Enter the mevegs directory in egs_home and run the simulation:

mevegs -i cube.egsinp -p tutor_data.pegs4dat

Make sure the cube.msh file is in the same directory you're running the code in.

EGSnrc will print a few screens of information to the console and then report simulation progress until it's done.

Running 1000000 histories

  Batch             CPU time        Result   Uncertainty(%)
==========================================================
      1                1.09       0.501526           0.31
      2                2.44       0.501762           0.22
      3                3.70       0.502413           0.18
      4                5.22       0.501949           0.16
      5                7.25       0.501994           0.14
      6                9.19       0.501892           0.13
      7               10.92       0.501821           0.12
      8               13.03       0.501918           0.11
      9               15.42       0.502218           0.10
     10               17.25       0.502418           0.10


Finished simulation

Total cpu time for this run:            17.25 (sec.) 0.0048(hours)
Histories per hour:                     2.08696e+08
Number of random numbers used:          121444161
Number of electron CH steps:            5.88643e+06
Number of all electron steps:           9.2142e+06


 last case = 1000000 Etot = 1e+07


================================================================================
Finished simulation

  Elapsed time:                   20.5 s (  0.006 h)
  CPU time:                       17.8 s (  0.005 h)
  Ratio:                          1.152

Afterwards, there should be a new file called cube.vtk. Start Paraview and open this file using File->Open, and Apply in the Properties toolbar. Color the mesh by dose to see the dose results.

View the dose results

And you're done! That's a full EGS_Mesh simulation from start to finish. Color the mesh by uncertainty to see whether these results can be trusted, or if you need to run more histories to be sure.

Going further

  1. Refine the mesh and run another simulation. How did the simulation runtime change? Do the results look different? More refined meshes are required to observe accurate dose gradients.

  2. After the simulation, the histories per hour is reported. Run a simulation with more histories and check if the histories per hour changes. Given this number, how long would it take you to run one billion histories?

  3. Run an EGS_XYZGeometry simulation with a similar number of elements and compare the simulation runtimes. Typically, EGS_Mesh simulations are 2 to 3 times slower than EGS_XYZGeometry. Do you observe this? How do the results compare?

  4. The dose result is fairly uneven, especially for coarse meshes like this one. Why? Does this persist if you keep refining the mesh?

References

Egsinp syntax

The basic EGS_Mesh input file syntax is:

:start geometry definition:
    :start geometry:
        library = egs_mesh
        name = my_mesh
        file = model.msh # your mesh here
    :stop geometry:

    simulation geometry = my_mesh
:stop geometry definition:

However, most meshes should be simulated in an envelope, otherwise particles exiting the mesh are discarded immediately, even if they would have reentered the mesh later on.

In an envelope

This example embeds a mesh inside an air box.

:start geometry definition: 
    :start geometry:        
        library = egs_mesh
        name = my_mesh    
        file = model.msh 
    :stop geometry:

    # define a 50cm air cube at the origin
    :start geometry:
        library = egs_box
        name = my_box
        box size = 50 50 50
        :start media input:
            media = air
        :stop media input:
    :stop geometry:
    
    # embed the mesh in the air box
    :start geometry:
        library = egs_genvelope
        name = my_envelope
        base geometry = my_box
        inscribed geometries = my_mesh
    :stop geometry:

    simulation geometry = my_envelope
:stop geometry definition:

Scaling the mesh

Mesh files are assumed to be in cm. The scale key can be used to scale the mesh if the file uses different units.

:start geometry definition:
    :start geometry:
        library = egs_mesh
        name = my_mesh
        file = model.msh
        scale = 0.1 # multiply all node coordinates by 0.1 (e.g. mm to cm)
    :stop geometry:

    simulation geometry = my_mesh
:stop geometry definition:

STEP file simulation (WIP)

TODO

Mesh file reference (WIP)

Developer reference (WIP)

TODO