pyvale 2025.5.3__cp311-cp311-musllinux_1_2_aarch64.whl

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.

Potentially problematic release.


This version of pyvale might be problematic. Click here for more details.

Files changed (174) hide show
  1. pyvale/__init__.py +89 -0
  2. pyvale/analyticmeshgen.py +102 -0
  3. pyvale/analyticsimdatafactory.py +91 -0
  4. pyvale/analyticsimdatagenerator.py +323 -0
  5. pyvale/blendercalibrationdata.py +15 -0
  6. pyvale/blenderlightdata.py +26 -0
  7. pyvale/blendermaterialdata.py +15 -0
  8. pyvale/blenderrenderdata.py +30 -0
  9. pyvale/blenderscene.py +488 -0
  10. pyvale/blendertools.py +420 -0
  11. pyvale/camera.py +146 -0
  12. pyvale/cameradata.py +69 -0
  13. pyvale/cameradata2d.py +84 -0
  14. pyvale/camerastereo.py +217 -0
  15. pyvale/cameratools.py +522 -0
  16. pyvale/cython/rastercyth.c +32211 -0
  17. pyvale/cython/rastercyth.cpython-311-aarch64-linux-musl.so +0 -0
  18. pyvale/cython/rastercyth.py +640 -0
  19. pyvale/data/__init__.py +5 -0
  20. pyvale/data/cal_target.tiff +0 -0
  21. pyvale/data/case00_HEX20_out.e +0 -0
  22. pyvale/data/case00_HEX27_out.e +0 -0
  23. pyvale/data/case00_HEX8_out.e +0 -0
  24. pyvale/data/case00_TET10_out.e +0 -0
  25. pyvale/data/case00_TET14_out.e +0 -0
  26. pyvale/data/case00_TET4_out.e +0 -0
  27. pyvale/data/case13_out.e +0 -0
  28. pyvale/data/case16_out.e +0 -0
  29. pyvale/data/case17_out.e +0 -0
  30. pyvale/data/case18_1_out.e +0 -0
  31. pyvale/data/case18_2_out.e +0 -0
  32. pyvale/data/case18_3_out.e +0 -0
  33. pyvale/data/case25_out.e +0 -0
  34. pyvale/data/case26_out.e +0 -0
  35. pyvale/data/optspeckle_2464x2056px_spec5px_8bit_gblur1px.tiff +0 -0
  36. pyvale/dataset.py +325 -0
  37. pyvale/errorcalculator.py +109 -0
  38. pyvale/errordriftcalc.py +146 -0
  39. pyvale/errorintegrator.py +336 -0
  40. pyvale/errorrand.py +607 -0
  41. pyvale/errorsyscalib.py +134 -0
  42. pyvale/errorsysdep.py +327 -0
  43. pyvale/errorsysfield.py +414 -0
  44. pyvale/errorsysindep.py +808 -0
  45. pyvale/examples/__init__.py +5 -0
  46. pyvale/examples/basics/ex1_1_basicscalars_therm2d.py +131 -0
  47. pyvale/examples/basics/ex1_2_sensormodel_therm2d.py +158 -0
  48. pyvale/examples/basics/ex1_3_customsens_therm3d.py +216 -0
  49. pyvale/examples/basics/ex1_4_basicerrors_therm3d.py +153 -0
  50. pyvale/examples/basics/ex1_5_fielderrs_therm3d.py +168 -0
  51. pyvale/examples/basics/ex1_6_caliberrs_therm2d.py +133 -0
  52. pyvale/examples/basics/ex1_7_spatavg_therm2d.py +123 -0
  53. pyvale/examples/basics/ex2_1_basicvectors_disp2d.py +112 -0
  54. pyvale/examples/basics/ex2_2_vectorsens_disp2d.py +111 -0
  55. pyvale/examples/basics/ex2_3_sensangle_disp2d.py +139 -0
  56. pyvale/examples/basics/ex2_4_chainfielderrs_disp2d.py +196 -0
  57. pyvale/examples/basics/ex2_5_vectorfields3d_disp3d.py +109 -0
  58. pyvale/examples/basics/ex3_1_basictensors_strain2d.py +114 -0
  59. pyvale/examples/basics/ex3_2_tensorsens2d_strain2d.py +111 -0
  60. pyvale/examples/basics/ex3_3_tensorsens3d_strain3d.py +182 -0
  61. pyvale/examples/basics/ex4_1_expsim2d_thermmech2d.py +171 -0
  62. pyvale/examples/basics/ex4_2_expsim3d_thermmech3d.py +252 -0
  63. pyvale/examples/genanalyticdata/ex1_1_scalarvisualisation.py +35 -0
  64. pyvale/examples/genanalyticdata/ex1_2_scalarcasebuild.py +43 -0
  65. pyvale/examples/genanalyticdata/ex2_1_analyticsensors.py +80 -0
  66. pyvale/examples/imagedef2d/ex_imagedef2d_todisk.py +79 -0
  67. pyvale/examples/renderblender/ex1_1_blenderscene.py +121 -0
  68. pyvale/examples/renderblender/ex1_2_blenderdeformed.py +119 -0
  69. pyvale/examples/renderblender/ex2_1_stereoscene.py +128 -0
  70. pyvale/examples/renderblender/ex2_2_stereodeformed.py +131 -0
  71. pyvale/examples/renderblender/ex3_1_blendercalibration.py +120 -0
  72. pyvale/examples/renderrasterisation/ex_rastenp.py +153 -0
  73. pyvale/examples/renderrasterisation/ex_rastercyth_oneframe.py +218 -0
  74. pyvale/examples/renderrasterisation/ex_rastercyth_static_cypara.py +187 -0
  75. pyvale/examples/renderrasterisation/ex_rastercyth_static_pypara.py +190 -0
  76. pyvale/examples/visualisation/ex1_1_plot_traces.py +102 -0
  77. pyvale/examples/visualisation/ex2_1_animate_sim.py +89 -0
  78. pyvale/experimentsimulator.py +175 -0
  79. pyvale/field.py +128 -0
  80. pyvale/fieldconverter.py +351 -0
  81. pyvale/fieldsampler.py +111 -0
  82. pyvale/fieldscalar.py +166 -0
  83. pyvale/fieldtensor.py +218 -0
  84. pyvale/fieldtransform.py +388 -0
  85. pyvale/fieldvector.py +213 -0
  86. pyvale/generatorsrandom.py +505 -0
  87. pyvale/imagedef2d.py +569 -0
  88. pyvale/integratorfactory.py +240 -0
  89. pyvale/integratorquadrature.py +217 -0
  90. pyvale/integratorrectangle.py +165 -0
  91. pyvale/integratorspatial.py +89 -0
  92. pyvale/integratortype.py +43 -0
  93. pyvale/output.py +17 -0
  94. pyvale/pyvaleexceptions.py +11 -0
  95. pyvale/raster.py +31 -0
  96. pyvale/rastercy.py +77 -0
  97. pyvale/rasternp.py +603 -0
  98. pyvale/rendermesh.py +147 -0
  99. pyvale/sensorarray.py +178 -0
  100. pyvale/sensorarrayfactory.py +196 -0
  101. pyvale/sensorarraypoint.py +278 -0
  102. pyvale/sensordata.py +71 -0
  103. pyvale/sensordescriptor.py +213 -0
  104. pyvale/sensortools.py +142 -0
  105. pyvale/simcases/case00_HEX20.i +242 -0
  106. pyvale/simcases/case00_HEX27.i +242 -0
  107. pyvale/simcases/case00_HEX8.i +242 -0
  108. pyvale/simcases/case00_TET10.i +242 -0
  109. pyvale/simcases/case00_TET14.i +242 -0
  110. pyvale/simcases/case00_TET4.i +242 -0
  111. pyvale/simcases/case01.i +101 -0
  112. pyvale/simcases/case02.i +156 -0
  113. pyvale/simcases/case03.i +136 -0
  114. pyvale/simcases/case04.i +181 -0
  115. pyvale/simcases/case05.i +234 -0
  116. pyvale/simcases/case06.i +305 -0
  117. pyvale/simcases/case07.geo +135 -0
  118. pyvale/simcases/case07.i +87 -0
  119. pyvale/simcases/case08.geo +144 -0
  120. pyvale/simcases/case08.i +153 -0
  121. pyvale/simcases/case09.geo +204 -0
  122. pyvale/simcases/case09.i +87 -0
  123. pyvale/simcases/case10.geo +204 -0
  124. pyvale/simcases/case10.i +257 -0
  125. pyvale/simcases/case11.geo +337 -0
  126. pyvale/simcases/case11.i +147 -0
  127. pyvale/simcases/case12.geo +388 -0
  128. pyvale/simcases/case12.i +329 -0
  129. pyvale/simcases/case13.i +140 -0
  130. pyvale/simcases/case14.i +159 -0
  131. pyvale/simcases/case15.geo +337 -0
  132. pyvale/simcases/case15.i +150 -0
  133. pyvale/simcases/case16.geo +391 -0
  134. pyvale/simcases/case16.i +357 -0
  135. pyvale/simcases/case17.geo +135 -0
  136. pyvale/simcases/case17.i +144 -0
  137. pyvale/simcases/case18.i +254 -0
  138. pyvale/simcases/case18_1.i +254 -0
  139. pyvale/simcases/case18_2.i +254 -0
  140. pyvale/simcases/case18_3.i +254 -0
  141. pyvale/simcases/case19.geo +252 -0
  142. pyvale/simcases/case19.i +99 -0
  143. pyvale/simcases/case20.geo +252 -0
  144. pyvale/simcases/case20.i +250 -0
  145. pyvale/simcases/case21.geo +74 -0
  146. pyvale/simcases/case21.i +155 -0
  147. pyvale/simcases/case22.geo +82 -0
  148. pyvale/simcases/case22.i +140 -0
  149. pyvale/simcases/case23.geo +164 -0
  150. pyvale/simcases/case23.i +140 -0
  151. pyvale/simcases/case24.geo +79 -0
  152. pyvale/simcases/case24.i +123 -0
  153. pyvale/simcases/case25.geo +82 -0
  154. pyvale/simcases/case25.i +140 -0
  155. pyvale/simcases/case26.geo +166 -0
  156. pyvale/simcases/case26.i +140 -0
  157. pyvale/simcases/run_1case.py +61 -0
  158. pyvale/simcases/run_all_cases.py +69 -0
  159. pyvale/simcases/run_build_case.py +64 -0
  160. pyvale/simcases/run_example_cases.py +69 -0
  161. pyvale/simtools.py +67 -0
  162. pyvale/visualexpplotter.py +191 -0
  163. pyvale/visualimagedef.py +74 -0
  164. pyvale/visualimages.py +76 -0
  165. pyvale/visualopts.py +493 -0
  166. pyvale/visualsimanimator.py +111 -0
  167. pyvale/visualsimsensors.py +318 -0
  168. pyvale/visualtools.py +136 -0
  169. pyvale/visualtraceplotter.py +142 -0
  170. pyvale-2025.5.3.dist-info/METADATA +144 -0
  171. pyvale-2025.5.3.dist-info/RECORD +174 -0
  172. pyvale-2025.5.3.dist-info/WHEEL +5 -0
  173. pyvale-2025.5.3.dist-info/licenses/LICENSE +21 -0
  174. pyvale-2025.5.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,391 @@
1
+ //==============================================================================
2
+ // Gmsh 3D Monoblock
3
+ // author: Lloyd Fletcher (scepticalrabbit)
4
+ //==============================================================================
5
+ SetFactory("OpenCASCADE");
6
+ General.Terminal = 0;
7
+
8
+ // View options: turns on/off which pieces of geometry we show
9
+ Geometry.Points = 0;
10
+ Geometry.Curves = 0;
11
+ Geometry.Surfaces = 0;
12
+ Geometry.Volumes = 0;
13
+
14
+ // View options: turns labels on and off for different types of geometry
15
+ Geometry.PointLabels = 0;
16
+ Geometry.CurveLabels = 0;
17
+ Geometry.SurfaceLabels = 0;
18
+ Geometry.VolumeLabels = 0;
19
+
20
+ //------------------------------------------------------------------------------
21
+ // Variable Definitions
22
+
23
+ //------------------------------------------------------------------------------
24
+ //_* MOOSEHERDER VARIABLES - START
25
+ file_name = "case16.msh";
26
+ num_threads = 8;
27
+
28
+ // Specified Geometry variables
29
+ pipe_rad_int = 6e-3;
30
+ pipe_thick = 1.5e-3;
31
+
32
+ interlayer_thick = 2e-3;
33
+
34
+ monoblock_depth = 12e-3;
35
+ monoblock_side = 3e-3;
36
+ monoblock_arm_height = 8e-3;
37
+
38
+ // Specified Mesh variables
39
+ base_divs = 1;
40
+ mesh_ref = 1; // Set to 1 for testing, Must be an integer greater than 0
41
+ elem_order = 2;
42
+
43
+ //_* MOOSEHERDER VARIABLES - END
44
+ //------------------------------------------------------------------------------
45
+
46
+ // Calculated Geometry Variables
47
+ pipe_rad_ext = pipe_rad_int+pipe_thick;
48
+
49
+ interlayer_rad_int = pipe_rad_ext;
50
+ interlayer_rad_ext = interlayer_rad_int+interlayer_thick;
51
+
52
+ monoblock_width = 2*interlayer_rad_ext + 2*monoblock_side;
53
+ monoblock_height = monoblock_width + monoblock_arm_height;
54
+
55
+ pipe_cent_x = 0.0;
56
+ pipe_cent_y = interlayer_rad_ext + monoblock_side;
57
+
58
+ // Calculated Mesh Variables
59
+ pipe_sect_nodes = Round(mesh_ref*5); // Must be odd
60
+ pipe_rad_nodes = Round(mesh_ref*4);
61
+ interlayer_rad_nodes = Round(mesh_ref*4);
62
+ monoblock_side_nodes = Round(mesh_ref*5);
63
+ monoblock_arm_nodes = Round(mesh_ref*5);
64
+ monoblock_depth_nodes = Round(mesh_ref*3); // NOTE: this is half the depth!
65
+ monoblock_width_nodes = Floor((pipe_sect_nodes-1)/2)+1;
66
+
67
+
68
+ // This is a more reasonable mesh refinement for the monoblock but solve time
69
+ // is much longer
70
+ // pipe_sect_nodes = Round(mesh_ref*11); // Must be odd
71
+ // pipe_rad_nodes = Round(mesh_ref*7);
72
+ // interlayer_rad_nodes = Round(mesh_ref*7);
73
+ // monoblock_side_nodes = Round(mesh_ref*9);
74
+ // monoblock_arm_nodes = Round(mesh_ref*11);
75
+ // monoblock_depth_nodes = Round(mesh_ref*5);
76
+ // monoblock_width_nodes = Floor((pipe_sect_nodes-1)/2)+1;
77
+
78
+
79
+ // Calculate approx element size by dividing the circumference
80
+ elem_size = 2*Pi*pipe_rad_int/(4*(pipe_sect_nodes-1));
81
+ tol = elem_size/4; // Used for selection tolerance of bounding boxes
82
+
83
+ //------------------------------------------------------------------------------
84
+ // Geometry Definition
85
+ s1 = news;
86
+ Rectangle(s1) =
87
+ {-monoblock_width/2,0.0,0.0,
88
+ monoblock_width/2,monoblock_width/2};
89
+
90
+ s2 = news;
91
+ Rectangle(s2) =
92
+ {-monoblock_width/2,monoblock_width/2,0.0,
93
+ monoblock_width/2,monoblock_width/2};
94
+
95
+ s3 = news;
96
+ Rectangle(s3) =
97
+ {0.0,monoblock_width/2,0.0,
98
+ monoblock_width/2,monoblock_width/2};
99
+
100
+ s4 = news;
101
+ Rectangle(s4) =
102
+ {0.0,0.0,0.0,
103
+ monoblock_width/2,monoblock_width/2};
104
+
105
+ sa1 = news;
106
+ Rectangle(sa1) =
107
+ {-monoblock_width/2,monoblock_width,0.0,
108
+ monoblock_width/2,monoblock_arm_height};
109
+
110
+ sa2 = news;
111
+ Rectangle(sa2) =
112
+ {0.0,monoblock_width,0.0,
113
+ monoblock_width/2,monoblock_arm_height};
114
+
115
+ BooleanFragments{ Surface{s1}; Delete; }{ Surface{s2,s3,s4,sa1,sa2}; Delete; }
116
+
117
+ pipe_block_surfs() = Surface In BoundingBox{
118
+ -monoblock_width/2-tol,-tol,-tol,
119
+ monoblock_width+tol,monoblock_width+tol,tol};
120
+
121
+ c2 = newc; Circle(c2) = {pipe_cent_x,pipe_cent_y,0.0,interlayer_rad_ext};
122
+ cl2 = newcl; Curve Loop(cl2) = {c2};
123
+ s6 = news; Plane Surface(s6) = {cl2};
124
+
125
+ c3 = newc; Circle(c3) = {pipe_cent_x,pipe_cent_y,0.0,pipe_rad_ext};
126
+ cl3 = newcl; Curve Loop(cl3) = {c3};
127
+ s7 = news; Plane Surface(s7) = {cl3};
128
+
129
+ c4 = newc; Circle(c4) = {pipe_cent_x,pipe_cent_y,0.0,pipe_rad_int};
130
+ cl4 = newcl; Curve Loop(cl4) = {c4};
131
+ s8 = news; Plane Surface(s8) = {cl4};
132
+
133
+ BooleanDifference{Surface{pipe_block_surfs(),s6,s7}; Delete;}
134
+ { Surface{s8}; Delete;}
135
+
136
+ //------------------------------------------------------------------------------
137
+ // Transfinite Line/Curve Meshing
138
+
139
+ cm1() = Curve In BoundingBox{
140
+ pipe_cent_x-interlayer_rad_ext-tol,pipe_cent_y-interlayer_rad_ext-tol,-tol,
141
+ pipe_cent_x+interlayer_rad_ext+tol,pipe_cent_y+interlayer_rad_ext+tol,+tol};
142
+
143
+ For ss In {0:#cm1()-1}
144
+ Transfinite Curve(cm1(ss)) = pipe_sect_nodes;
145
+ EndFor
146
+
147
+ cm1() = Curve In BoundingBox{
148
+ pipe_cent_x+pipe_rad_int-tol,pipe_cent_y-tol,-tol,
149
+ pipe_cent_x+pipe_rad_ext+tol,pipe_cent_y+tol,+tol};
150
+ Transfinite Curve(cm1(0)) = pipe_rad_nodes;
151
+
152
+ cm2() = Curve In BoundingBox{
153
+ pipe_cent_x-pipe_rad_ext-tol,pipe_cent_y-tol,-tol,
154
+ pipe_cent_x-pipe_rad_int+tol,pipe_cent_y+tol,+tol};
155
+ Transfinite Curve(cm2(0)) = pipe_rad_nodes;
156
+
157
+ cm3() = Curve In BoundingBox{
158
+ pipe_cent_x-tol,pipe_cent_y-pipe_rad_ext-tol,-tol,
159
+ pipe_cent_x+tol,pipe_cent_y-pipe_rad_int+tol,+tol};
160
+ Transfinite Curve(cm3(0)) = pipe_rad_nodes;
161
+
162
+ cm4() = Curve In BoundingBox{
163
+ pipe_cent_x-tol,pipe_cent_y+pipe_rad_int-tol,-tol,
164
+ pipe_cent_x+tol,pipe_cent_y+pipe_rad_ext+tol,+tol};
165
+ Transfinite Curve(cm4(0)) = pipe_rad_nodes;
166
+
167
+
168
+ cm1() = Curve In BoundingBox{
169
+ pipe_cent_x+interlayer_rad_int-tol,pipe_cent_y-tol,-tol,
170
+ pipe_cent_x+interlayer_rad_ext+tol,pipe_cent_y+tol,+tol};
171
+ Transfinite Curve(cm1(0)) = interlayer_rad_nodes;
172
+
173
+ cm2() = Curve In BoundingBox{
174
+ pipe_cent_x-interlayer_rad_ext-tol,pipe_cent_y-tol,-tol,
175
+ pipe_cent_x-interlayer_rad_int+tol,pipe_cent_y+tol,+tol};
176
+ Transfinite Curve(cm2(0)) = interlayer_rad_nodes;
177
+
178
+ cm3() = Curve In BoundingBox{
179
+ pipe_cent_x-tol,pipe_cent_y-interlayer_rad_ext-tol,-tol,
180
+ pipe_cent_x+tol,pipe_cent_y-interlayer_rad_int+tol,+tol};
181
+ Transfinite Curve(cm3(0)) = interlayer_rad_nodes;
182
+
183
+ cm4() = Curve In BoundingBox{
184
+ pipe_cent_x-tol,pipe_cent_y+interlayer_rad_int-tol,-tol,
185
+ pipe_cent_x+tol,pipe_cent_y+interlayer_rad_ext+tol,+tol};
186
+ Transfinite Curve(cm4(0)) = interlayer_rad_nodes;
187
+
188
+
189
+ cm1() = Curve In BoundingBox{
190
+ pipe_cent_x+interlayer_rad_ext-tol,pipe_cent_y-tol,-tol,
191
+ pipe_cent_x+monoblock_width/2+tol,pipe_cent_y+tol,+tol};
192
+ Transfinite Curve(cm1(0)) = monoblock_side_nodes;
193
+
194
+ cm2() = Curve In BoundingBox{
195
+ pipe_cent_x-monoblock_width/2-tol,pipe_cent_y-tol,-tol,
196
+ pipe_cent_x-interlayer_rad_ext+tol,pipe_cent_y+tol,+tol};
197
+ Transfinite Curve(cm2(0)) = monoblock_side_nodes;
198
+
199
+ cm3() = Curve In BoundingBox{
200
+ pipe_cent_x-tol,pipe_cent_y-monoblock_width/2-tol,-tol,
201
+ pipe_cent_x+tol,pipe_cent_y-interlayer_rad_ext+tol,+tol};
202
+ Transfinite Curve(cm3(0)) = monoblock_side_nodes;
203
+
204
+ cm4() = Curve In BoundingBox{
205
+ pipe_cent_x-tol,pipe_cent_y+interlayer_rad_ext-tol,-tol,
206
+ pipe_cent_x+tol,pipe_cent_y+monoblock_width/2+tol,+tol};
207
+ Transfinite Curve(cm4(0)) = monoblock_side_nodes;
208
+
209
+
210
+ cm1() = Curve In BoundingBox{
211
+ -monoblock_width/2-tol,monoblock_width-tol,-tol,
212
+ monoblock_width/2+tol,monoblock_width+monoblock_arm_height+tol,+tol};
213
+
214
+ For ss In {0:#cm1()-1}
215
+
216
+ Transfinite Curve(cm1(ss)) = monoblock_arm_nodes;
217
+ EndFor
218
+
219
+
220
+
221
+ cm1() = Curve In BoundingBox{
222
+ -monoblock_width/2-tol,-tol,-tol,
223
+ -monoblock_width/2+tol,monoblock_width+tol,+tol};
224
+
225
+ For ss In {0:#cm1()-1}
226
+ Transfinite Curve(cm1(ss)) = monoblock_width_nodes;
227
+ EndFor
228
+
229
+
230
+ cm2() = Curve In BoundingBox{
231
+ monoblock_width/2-tol,-tol,-tol,
232
+ monoblock_width/2+tol,monoblock_width+tol,+tol};
233
+
234
+ For ss In {0:#cm2()-1}
235
+ Transfinite Curve(cm2(ss)) = monoblock_width_nodes;
236
+ EndFor
237
+
238
+
239
+ // Mesh top, bottom and armour horizontal lines
240
+ cm3() = Curve In BoundingBox{
241
+ -monoblock_width/2-tol,-tol,-tol,
242
+ monoblock_width/2+tol,+tol,+tol};
243
+
244
+ For ss In {0:#cm3()-1}
245
+ Transfinite Curve(cm3(ss)) = monoblock_width_nodes;
246
+ EndFor
247
+
248
+
249
+ cm3() = Curve In BoundingBox{
250
+ -monoblock_width/2-tol,monoblock_width-tol,-tol,
251
+ monoblock_width/2+tol,monoblock_width+tol,+tol};
252
+
253
+ For ss In {0:#cm3()-1}
254
+ Transfinite Curve(cm3(ss)) = monoblock_width_nodes;
255
+ EndFor
256
+
257
+
258
+ cm4() = Curve In BoundingBox{
259
+ -monoblock_width/2-tol,monoblock_width+monoblock_arm_height+-tol,-tol,
260
+ monoblock_width/2+tol,monoblock_width+monoblock_arm_height+tol,+tol};
261
+
262
+ For ss In {0:#cm4()-1}
263
+ Transfinite Curve(cm4(ss)) = monoblock_width_nodes;
264
+ EndFor
265
+
266
+
267
+ //------------------------------------------------------------------------------
268
+ // Transfinite Surface Meshing
269
+
270
+ // Mesh the pipe and interlayer
271
+ sm1() = Surface In BoundingBox{
272
+ pipe_cent_x-interlayer_rad_ext-tol,pipe_cent_y-interlayer_rad_ext-tol,-tol,
273
+ pipe_cent_x+interlayer_rad_ext+tol,pipe_cent_y+interlayer_rad_ext+tol,+tol};
274
+
275
+ For ss In {0:#sm1()-1}
276
+ Transfinite Surface{sm1(ss)};
277
+ Recombine Surface{sm1(ss)};
278
+ EndFor
279
+
280
+ // Mesh the armour on top of the block
281
+ sm1() = Surface In BoundingBox{
282
+ -monoblock_width/2-tol,monoblock_width-tol,-tol,
283
+ monoblock_width/2+tol,monoblock_width+monoblock_arm_height+tol,+tol};
284
+
285
+ For ss In {0:#sm1()-1}
286
+ Transfinite Surface{sm1(ss)};
287
+ Recombine Surface{sm1(ss)};
288
+ EndFor
289
+
290
+ // Mesh the block around the interlayer
291
+ Transfinite Surface{22} = {15,16,17,13};
292
+ Recombine Surface{22};
293
+
294
+ Transfinite Surface{27} = {15,24,5,13};
295
+ Recombine Surface{27};
296
+
297
+ Transfinite Surface{30} = {24,5,28,27};
298
+ Recombine Surface{30};
299
+
300
+ Transfinite Surface{31} = {27,28,17,16};
301
+ Recombine Surface{31};
302
+
303
+ //------------------------------------------------------------------------------
304
+ // Extrude the surface mesh to 3D
305
+ Extrude{0.0,0.0,monoblock_depth/2}{
306
+ Surface{:}; Layers{monoblock_depth_nodes}; Recombine;
307
+ }
308
+
309
+ es1() = Surface In BoundingBox{
310
+ -monoblock_width/2-tol,0.0-tol,monoblock_depth/2-tol,
311
+ monoblock_width/2+tol,monoblock_height+tol,monoblock_depth/2+tol};
312
+
313
+ Extrude{0.0,0.0,monoblock_depth/2}{
314
+ Surface{es1(0),es1(1),es1(2),es1(3),es1(4),es1(5),es1(6),es1(7),es1(8),es1(9),es1(10),es1(11),es1(12),es1(13)}; Layers{monoblock_depth_nodes}; Recombine;
315
+ }
316
+
317
+ //------------------------------------------------------------------------------
318
+ // Physical Surfaces for Loads and Boundary Condition
319
+
320
+ ps0() = Surface In BoundingBox{
321
+ -monoblock_width/2-tol,0.0-tol,0.0-tol,
322
+ monoblock_width/2+tol,0.0+tol,monoblock_depth+tol};
323
+ Physical Surface("bc-base-disp") = {ps0(0),ps0(1),ps0(2),ps0(3)};
324
+
325
+ ps1() = Surface In BoundingBox{
326
+ -monoblock_width/2-tol,monoblock_height-tol,0.0-tol,
327
+ monoblock_width/2+tol,monoblock_height+tol,monoblock_depth+tol};
328
+ Physical Surface("bc-top-heatflux") = {ps1(0),ps1(1),ps1(2),ps1(3)};
329
+
330
+ ps2() = Surface In BoundingBox{
331
+ -pipe_rad_int-tol,monoblock_width/2-pipe_rad_int-tol,0.0-tol,
332
+ pipe_rad_int+tol,monoblock_width/2+pipe_rad_int+tol,monoblock_depth+tol};
333
+ Physical Surface("bc-pipe-heattransf") = {ps2(0),ps2(1),ps2(2),ps2(3),ps2(4),ps2(5),ps2(6),ps2(7)};
334
+
335
+
336
+ // Physical points for applying mechanical BCs
337
+ // Center of the base of the block - lock all DOFs
338
+ pp0() = Point In BoundingBox{
339
+ -tol,-tol,monoblock_depth/2-tol,
340
+ +tol,+tol,monoblock_depth/2+tol};
341
+ Physical Point("bc-c-point-xyz-mech") = {pp0(0)};
342
+
343
+ // Left and right on the base center line
344
+ pp1() = Point In BoundingBox{
345
+ -monoblock_width/2-tol,-tol,monoblock_depth/2-tol,
346
+ -monoblock_width/2+tol,+tol,monoblock_depth/2+tol};
347
+ Physical Point("bc-l-point-yz-mech") = {pp1(0)};
348
+
349
+ pp2() = Point In BoundingBox{
350
+ monoblock_width/2-tol,-tol,monoblock_depth/2-tol,
351
+ monoblock_width/2+tol,+tol,monoblock_depth/2+tol};
352
+ Physical Point("bc-r-point-yz-mech") = {pp2(0)};
353
+
354
+ // Front and back on the base center line
355
+ pp3() = Point In BoundingBox{
356
+ -tol,-tol,monoblock_depth-tol,
357
+ +tol,+tol,monoblock_depth+tol};
358
+ Physical Point("bc-f-point-xy-mech") = {pp3(0)};
359
+
360
+ pp4() = Point In BoundingBox{
361
+ -tol,-tol,-tol,
362
+ +tol,+tol,+tol};
363
+ Physical Point("bc-b-point-xy-mech") = {pp4(0)};
364
+
365
+ //------------------------------------------------------------------------------
366
+ // Physical Volumes for Material Defs
367
+ Physical Volume("pipe-cucrzr") = {5,19,6,20,9,23,14,28};
368
+ Physical Volume("interlayer-cu") = {4,18,7,21,10,24,13,27};
369
+ Physical Volume("armour-w") = {3,17,8,22,25,11,12,26,1,15,2,16};
370
+
371
+ //------------------------------------------------------------------------------
372
+ // Global Mesh controls
373
+ Mesh.Algorithm = 6;
374
+ Mesh.Algorithm3D = 10;
375
+
376
+ General.NumThreads = num_threads;
377
+ Mesh.MaxNumThreads1D = num_threads;
378
+ Mesh.MaxNumThreads2D = num_threads;
379
+ Mesh.MaxNumThreads3D = num_threads;
380
+
381
+ Mesh.SecondOrderIncomplete = 1;
382
+ Mesh.ElementOrder = elem_order;
383
+
384
+ Mesh 3;
385
+
386
+ //------------------------------------------------------------------------------
387
+ // Save and exit
388
+ Save Str(file_name);
389
+ Exit;
390
+
391
+