pyvale 2025.5.3__cp311-cp311-macosx_14_0_arm64.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.
- pyvale/.dylibs/libomp.dylib +0 -0
- pyvale/__init__.py +89 -0
- pyvale/analyticmeshgen.py +102 -0
- pyvale/analyticsimdatafactory.py +91 -0
- pyvale/analyticsimdatagenerator.py +323 -0
- pyvale/blendercalibrationdata.py +15 -0
- pyvale/blenderlightdata.py +26 -0
- pyvale/blendermaterialdata.py +15 -0
- pyvale/blenderrenderdata.py +30 -0
- pyvale/blenderscene.py +488 -0
- pyvale/blendertools.py +420 -0
- pyvale/camera.py +146 -0
- pyvale/cameradata.py +69 -0
- pyvale/cameradata2d.py +84 -0
- pyvale/camerastereo.py +217 -0
- pyvale/cameratools.py +522 -0
- pyvale/cython/rastercyth.c +32211 -0
- pyvale/cython/rastercyth.cpython-311-darwin.so +0 -0
- pyvale/cython/rastercyth.py +640 -0
- pyvale/data/__init__.py +5 -0
- pyvale/data/cal_target.tiff +0 -0
- pyvale/data/case00_HEX20_out.e +0 -0
- pyvale/data/case00_HEX27_out.e +0 -0
- pyvale/data/case00_HEX8_out.e +0 -0
- pyvale/data/case00_TET10_out.e +0 -0
- pyvale/data/case00_TET14_out.e +0 -0
- pyvale/data/case00_TET4_out.e +0 -0
- pyvale/data/case13_out.e +0 -0
- pyvale/data/case16_out.e +0 -0
- pyvale/data/case17_out.e +0 -0
- pyvale/data/case18_1_out.e +0 -0
- pyvale/data/case18_2_out.e +0 -0
- pyvale/data/case18_3_out.e +0 -0
- pyvale/data/case25_out.e +0 -0
- pyvale/data/case26_out.e +0 -0
- pyvale/data/optspeckle_2464x2056px_spec5px_8bit_gblur1px.tiff +0 -0
- pyvale/dataset.py +325 -0
- pyvale/errorcalculator.py +109 -0
- pyvale/errordriftcalc.py +146 -0
- pyvale/errorintegrator.py +336 -0
- pyvale/errorrand.py +607 -0
- pyvale/errorsyscalib.py +134 -0
- pyvale/errorsysdep.py +327 -0
- pyvale/errorsysfield.py +414 -0
- pyvale/errorsysindep.py +808 -0
- pyvale/examples/__init__.py +5 -0
- pyvale/examples/basics/ex1_1_basicscalars_therm2d.py +131 -0
- pyvale/examples/basics/ex1_2_sensormodel_therm2d.py +158 -0
- pyvale/examples/basics/ex1_3_customsens_therm3d.py +216 -0
- pyvale/examples/basics/ex1_4_basicerrors_therm3d.py +153 -0
- pyvale/examples/basics/ex1_5_fielderrs_therm3d.py +168 -0
- pyvale/examples/basics/ex1_6_caliberrs_therm2d.py +133 -0
- pyvale/examples/basics/ex1_7_spatavg_therm2d.py +123 -0
- pyvale/examples/basics/ex2_1_basicvectors_disp2d.py +112 -0
- pyvale/examples/basics/ex2_2_vectorsens_disp2d.py +111 -0
- pyvale/examples/basics/ex2_3_sensangle_disp2d.py +139 -0
- pyvale/examples/basics/ex2_4_chainfielderrs_disp2d.py +196 -0
- pyvale/examples/basics/ex2_5_vectorfields3d_disp3d.py +109 -0
- pyvale/examples/basics/ex3_1_basictensors_strain2d.py +114 -0
- pyvale/examples/basics/ex3_2_tensorsens2d_strain2d.py +111 -0
- pyvale/examples/basics/ex3_3_tensorsens3d_strain3d.py +182 -0
- pyvale/examples/basics/ex4_1_expsim2d_thermmech2d.py +171 -0
- pyvale/examples/basics/ex4_2_expsim3d_thermmech3d.py +252 -0
- pyvale/examples/genanalyticdata/ex1_1_scalarvisualisation.py +35 -0
- pyvale/examples/genanalyticdata/ex1_2_scalarcasebuild.py +43 -0
- pyvale/examples/genanalyticdata/ex2_1_analyticsensors.py +80 -0
- pyvale/examples/imagedef2d/ex_imagedef2d_todisk.py +79 -0
- pyvale/examples/renderblender/ex1_1_blenderscene.py +121 -0
- pyvale/examples/renderblender/ex1_2_blenderdeformed.py +119 -0
- pyvale/examples/renderblender/ex2_1_stereoscene.py +128 -0
- pyvale/examples/renderblender/ex2_2_stereodeformed.py +131 -0
- pyvale/examples/renderblender/ex3_1_blendercalibration.py +120 -0
- pyvale/examples/renderrasterisation/ex_rastenp.py +153 -0
- pyvale/examples/renderrasterisation/ex_rastercyth_oneframe.py +218 -0
- pyvale/examples/renderrasterisation/ex_rastercyth_static_cypara.py +187 -0
- pyvale/examples/renderrasterisation/ex_rastercyth_static_pypara.py +190 -0
- pyvale/examples/visualisation/ex1_1_plot_traces.py +102 -0
- pyvale/examples/visualisation/ex2_1_animate_sim.py +89 -0
- pyvale/experimentsimulator.py +175 -0
- pyvale/field.py +128 -0
- pyvale/fieldconverter.py +351 -0
- pyvale/fieldsampler.py +111 -0
- pyvale/fieldscalar.py +166 -0
- pyvale/fieldtensor.py +218 -0
- pyvale/fieldtransform.py +388 -0
- pyvale/fieldvector.py +213 -0
- pyvale/generatorsrandom.py +505 -0
- pyvale/imagedef2d.py +569 -0
- pyvale/integratorfactory.py +240 -0
- pyvale/integratorquadrature.py +217 -0
- pyvale/integratorrectangle.py +165 -0
- pyvale/integratorspatial.py +89 -0
- pyvale/integratortype.py +43 -0
- pyvale/output.py +17 -0
- pyvale/pyvaleexceptions.py +11 -0
- pyvale/raster.py +31 -0
- pyvale/rastercy.py +77 -0
- pyvale/rasternp.py +603 -0
- pyvale/rendermesh.py +147 -0
- pyvale/sensorarray.py +178 -0
- pyvale/sensorarrayfactory.py +196 -0
- pyvale/sensorarraypoint.py +278 -0
- pyvale/sensordata.py +71 -0
- pyvale/sensordescriptor.py +213 -0
- pyvale/sensortools.py +142 -0
- pyvale/simcases/case00_HEX20.i +242 -0
- pyvale/simcases/case00_HEX27.i +242 -0
- pyvale/simcases/case00_HEX8.i +242 -0
- pyvale/simcases/case00_TET10.i +242 -0
- pyvale/simcases/case00_TET14.i +242 -0
- pyvale/simcases/case00_TET4.i +242 -0
- pyvale/simcases/case01.i +101 -0
- pyvale/simcases/case02.i +156 -0
- pyvale/simcases/case03.i +136 -0
- pyvale/simcases/case04.i +181 -0
- pyvale/simcases/case05.i +234 -0
- pyvale/simcases/case06.i +305 -0
- pyvale/simcases/case07.geo +135 -0
- pyvale/simcases/case07.i +87 -0
- pyvale/simcases/case08.geo +144 -0
- pyvale/simcases/case08.i +153 -0
- pyvale/simcases/case09.geo +204 -0
- pyvale/simcases/case09.i +87 -0
- pyvale/simcases/case10.geo +204 -0
- pyvale/simcases/case10.i +257 -0
- pyvale/simcases/case11.geo +337 -0
- pyvale/simcases/case11.i +147 -0
- pyvale/simcases/case12.geo +388 -0
- pyvale/simcases/case12.i +329 -0
- pyvale/simcases/case13.i +140 -0
- pyvale/simcases/case14.i +159 -0
- pyvale/simcases/case15.geo +337 -0
- pyvale/simcases/case15.i +150 -0
- pyvale/simcases/case16.geo +391 -0
- pyvale/simcases/case16.i +357 -0
- pyvale/simcases/case17.geo +135 -0
- pyvale/simcases/case17.i +144 -0
- pyvale/simcases/case18.i +254 -0
- pyvale/simcases/case18_1.i +254 -0
- pyvale/simcases/case18_2.i +254 -0
- pyvale/simcases/case18_3.i +254 -0
- pyvale/simcases/case19.geo +252 -0
- pyvale/simcases/case19.i +99 -0
- pyvale/simcases/case20.geo +252 -0
- pyvale/simcases/case20.i +250 -0
- pyvale/simcases/case21.geo +74 -0
- pyvale/simcases/case21.i +155 -0
- pyvale/simcases/case22.geo +82 -0
- pyvale/simcases/case22.i +140 -0
- pyvale/simcases/case23.geo +164 -0
- pyvale/simcases/case23.i +140 -0
- pyvale/simcases/case24.geo +79 -0
- pyvale/simcases/case24.i +123 -0
- pyvale/simcases/case25.geo +82 -0
- pyvale/simcases/case25.i +140 -0
- pyvale/simcases/case26.geo +166 -0
- pyvale/simcases/case26.i +140 -0
- pyvale/simcases/run_1case.py +61 -0
- pyvale/simcases/run_all_cases.py +69 -0
- pyvale/simcases/run_build_case.py +64 -0
- pyvale/simcases/run_example_cases.py +69 -0
- pyvale/simtools.py +67 -0
- pyvale/visualexpplotter.py +191 -0
- pyvale/visualimagedef.py +74 -0
- pyvale/visualimages.py +76 -0
- pyvale/visualopts.py +493 -0
- pyvale/visualsimanimator.py +111 -0
- pyvale/visualsimsensors.py +318 -0
- pyvale/visualtools.py +136 -0
- pyvale/visualtraceplotter.py +142 -0
- pyvale-2025.5.3.dist-info/METADATA +144 -0
- pyvale-2025.5.3.dist-info/RECORD +175 -0
- pyvale-2025.5.3.dist-info/WHEEL +6 -0
- pyvale-2025.5.3.dist-info/licenses/LICENSE +21 -0
- pyvale-2025.5.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
//==============================================================================
|
|
2
|
+
// Gmsh 3D simple test case divertor armour mock-up
|
|
3
|
+
// author: Lloyd Fletcher (scepticalrabbit)
|
|
4
|
+
//==============================================================================
|
|
5
|
+
// Always set to OpenCASCADE - circles and boolean opts are much easier!
|
|
6
|
+
SetFactory("OpenCASCADE");
|
|
7
|
+
|
|
8
|
+
// Allows gmsh to print to terminal in vscode - easier debugging
|
|
9
|
+
General.Terminal = 0;
|
|
10
|
+
|
|
11
|
+
// View options - not required when
|
|
12
|
+
Geometry.PointLabels = 1;
|
|
13
|
+
Geometry.CurveLabels = 0;
|
|
14
|
+
Geometry.SurfaceLabels = 1;
|
|
15
|
+
Geometry.VolumeLabels = 0;
|
|
16
|
+
|
|
17
|
+
//-------------------------------------------------------------------------
|
|
18
|
+
//_* MOOSEHERDER VARIABLES - START
|
|
19
|
+
file_name = "case19.msh";
|
|
20
|
+
|
|
21
|
+
// Geometric variables
|
|
22
|
+
block_width = 37e-3;
|
|
23
|
+
block_leng = 49.5e-3;
|
|
24
|
+
block_armour = 12e-3;
|
|
25
|
+
block_height_square = 11.5e-3;
|
|
26
|
+
block_height_above_pipe = 12.5e-3+block_armour;
|
|
27
|
+
block_height_tot = block_height_square+block_height_above_pipe;
|
|
28
|
+
|
|
29
|
+
// Block half width must be greater than the sum of:
|
|
30
|
+
// block_width/2 >= pipe_rad_in+pipe_thick_fillet_rad
|
|
31
|
+
fillet_rad = 2e-3;
|
|
32
|
+
pipe_rad_in = 6e-3;
|
|
33
|
+
pipe_thick = 1.5e-3;
|
|
34
|
+
pipe_leng = 100e-3;
|
|
35
|
+
|
|
36
|
+
// Must be an integer
|
|
37
|
+
elem_order = 2;
|
|
38
|
+
mesh_ref = 1;
|
|
39
|
+
mesh_size = 2e-3/mesh_ref;
|
|
40
|
+
num_threads = 4;
|
|
41
|
+
//** MOOSEHERDER VARIABLES - END
|
|
42
|
+
//------------------------------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
//------------------------------------------------------------------------------
|
|
45
|
+
// Calculated / Fixed Variables
|
|
46
|
+
pipe_loc_x = 0.0;
|
|
47
|
+
pipe_loc_y = block_height_square;
|
|
48
|
+
|
|
49
|
+
pipe_rad_out = pipe_rad_in + pipe_thick;
|
|
50
|
+
pipe_circ_in = 2*Pi*pipe_rad_in;
|
|
51
|
+
|
|
52
|
+
tol = mesh_size/4; // Used for bounding box selection tolerance
|
|
53
|
+
|
|
54
|
+
//------------------------------------------------------------------------------
|
|
55
|
+
// Geometry Definition
|
|
56
|
+
|
|
57
|
+
// Create the block and the outer pipe diam as solid cylinders
|
|
58
|
+
v1 = newv;
|
|
59
|
+
Box(v1) = {-block_width/2,0,0,
|
|
60
|
+
block_width,block_height_tot,block_leng/2};
|
|
61
|
+
v2 = newv;
|
|
62
|
+
Box(v2) = {-block_width/2,0.0,-block_leng/2,
|
|
63
|
+
block_width,block_height_tot,block_leng/2};
|
|
64
|
+
|
|
65
|
+
v3 = newv;
|
|
66
|
+
Cylinder(v3) = {pipe_loc_x,pipe_loc_y,block_leng/2,
|
|
67
|
+
0.0,0.0,(pipe_leng/2-block_leng/2),pipe_rad_out,2*Pi};
|
|
68
|
+
v4 = newv;
|
|
69
|
+
Cylinder(v4) = {pipe_loc_x,pipe_loc_y,-block_leng/2,
|
|
70
|
+
0.0,0.0,-(pipe_leng/2-block_leng/2),pipe_rad_out,2*Pi};
|
|
71
|
+
|
|
72
|
+
// Need to join the cylinder to the block to create a fillet
|
|
73
|
+
BooleanUnion{ Volume{v1}; Delete; }{ Volume{v3}; Delete; }
|
|
74
|
+
BooleanUnion{ Volume{v2}; Delete; }{ Volume{v4}; Delete; }
|
|
75
|
+
|
|
76
|
+
// Grab the curves between the pipe outer edge and the block to fillet
|
|
77
|
+
cf1() = Curve In BoundingBox{
|
|
78
|
+
pipe_loc_x-pipe_rad_out-tol,pipe_loc_y-pipe_rad_out-tol,block_leng/2-tol,
|
|
79
|
+
pipe_loc_x+pipe_rad_out+tol,pipe_loc_y+pipe_rad_out+tol,block_leng/2+tol};
|
|
80
|
+
|
|
81
|
+
cf2() = Curve In BoundingBox{
|
|
82
|
+
pipe_loc_x-pipe_rad_out-tol,pipe_loc_y-pipe_rad_out-tol,-block_leng/2-tol,
|
|
83
|
+
pipe_loc_x+pipe_rad_out+tol,pipe_loc_y+pipe_rad_out+tol,-block_leng/2+tol};
|
|
84
|
+
|
|
85
|
+
all_vols = Volume{:};
|
|
86
|
+
Fillet{all_vols(0)}{cf1(0)}{fillet_rad}
|
|
87
|
+
Fillet{all_vols(1)}{cf2(0)}{fillet_rad}
|
|
88
|
+
|
|
89
|
+
// Join the two halves of the block but maintain the dividing line
|
|
90
|
+
all_vols = Volume{:};
|
|
91
|
+
BooleanFragments{Volume{all_vols(0)}; Delete;}{Volume{all_vols(1)}; Delete;}
|
|
92
|
+
|
|
93
|
+
// Create the pipe bore
|
|
94
|
+
all_vols = Volume{:};
|
|
95
|
+
v5 = newv;
|
|
96
|
+
Cylinder(v5) = {pipe_loc_x,pipe_loc_y,-pipe_leng/2,
|
|
97
|
+
0.0,0.0,pipe_leng,pipe_rad_in,2*Pi};
|
|
98
|
+
BooleanDifference{Volume{all_vols(0),all_vols(1)}; Delete;}
|
|
99
|
+
{Volume{v5}; Delete;}
|
|
100
|
+
all_vols = Volume{:};
|
|
101
|
+
|
|
102
|
+
// Actual geometry complete - remainder are points for mech BCs
|
|
103
|
+
// For mech BCs on the base of the block
|
|
104
|
+
pb1 = newp; Point(pb1) = {0,0,0};
|
|
105
|
+
pb2 = newp; Point(pb2) = {0,0,block_leng/2};
|
|
106
|
+
pb3 = newp; Point(pb3) = {0,0,-block_leng/2};
|
|
107
|
+
pb4 = newp; Point(pb4) = {-block_width/2,0,0};
|
|
108
|
+
pb5 = newp; Point(pb5) = {block_width/2,0,0};
|
|
109
|
+
|
|
110
|
+
// For mech BCs on the pipe
|
|
111
|
+
pm1 = newp; Point(pm1) = {pipe_loc_x+pipe_rad_out,pipe_loc_y+0.0,pipe_leng/2};
|
|
112
|
+
pm2 = newp; Point(pm2) = {pipe_loc_x+0.0,pipe_loc_y+pipe_rad_out,pipe_leng/2};
|
|
113
|
+
pm3 = newp; Point(pm3) = {pipe_loc_x-pipe_rad_out,pipe_loc_y+0.0,pipe_leng/2};
|
|
114
|
+
pm4 = newp; Point(pm4) = {pipe_loc_x-0.0,pipe_loc_y-pipe_rad_out,pipe_leng/2};
|
|
115
|
+
|
|
116
|
+
pm5 = newp; Point(pm5) = {pipe_loc_x+pipe_rad_out,pipe_loc_y+0.0,-pipe_leng/2};
|
|
117
|
+
pm6 = newp; Point(pm6) = {pipe_loc_x+0.0,pipe_loc_y+pipe_rad_out,-pipe_leng/2};
|
|
118
|
+
pm7 = newp; Point(pm7) = {pipe_loc_x-pipe_rad_out,pipe_loc_y+0.0,-pipe_leng/2};
|
|
119
|
+
pm8 = newp; Point(pm8) = {pipe_loc_x-0.0,pipe_loc_y-pipe_rad_out,-pipe_leng/2};
|
|
120
|
+
|
|
121
|
+
BooleanFragments{Volume{:}; Delete;}
|
|
122
|
+
{Point{pb1,pb2,pb3,pb4,pb5,pm1,pm2,pm3,pm4,pm5,pm6,pm7,pm8}; Delete;}
|
|
123
|
+
|
|
124
|
+
//------------------------------------------------------------------------------
|
|
125
|
+
// Physical surfaces and volumes for export/BCs
|
|
126
|
+
|
|
127
|
+
Physical Volume("stc-vol") = {Volume{:}};
|
|
128
|
+
|
|
129
|
+
// Physical surface for mechanical BC for dispy - like sitting on a flat surface
|
|
130
|
+
ps1() = Surface In BoundingBox{
|
|
131
|
+
-block_width/2-tol,0.0-tol,-block_leng/2-tol,
|
|
132
|
+
block_width/2+tol,0.0+tol,block_leng/2+tol};
|
|
133
|
+
Physical Surface("bc-base-disp") = {ps1(0),ps1(1)};
|
|
134
|
+
|
|
135
|
+
// thermal BCs for top surface heat flux and pipe htc
|
|
136
|
+
ps2() = Surface In BoundingBox{
|
|
137
|
+
-block_width/2-tol,block_height_tot-tol,-block_leng/2-tol,
|
|
138
|
+
block_width/2+tol,block_height_tot+tol,block_leng/2+tol};
|
|
139
|
+
Physical Surface("bc-top-heatflux") = {ps2(0),ps2(1)};
|
|
140
|
+
|
|
141
|
+
ps3() = Surface In BoundingBox{
|
|
142
|
+
pipe_loc_x-pipe_rad_in-tol,pipe_loc_y-pipe_rad_in-tol,-pipe_leng/2-tol,
|
|
143
|
+
pipe_loc_x+pipe_rad_in+tol,pipe_loc_y+pipe_rad_in+tol,pipe_leng/2+tol};
|
|
144
|
+
Physical Surface("bc-pipe-htc") = {ps3(0),ps3(1)};
|
|
145
|
+
|
|
146
|
+
// Physical points for applying mechanical BCs - Lines don't work in 3D
|
|
147
|
+
// Center of the base of the block - lock all DOFs
|
|
148
|
+
pp0() = Point In BoundingBox{
|
|
149
|
+
-tol,-tol,-tol,
|
|
150
|
+
+tol,+tol,+tol};
|
|
151
|
+
Physical Point("bc-base-c-loc-xyz") = {pp0(0)};
|
|
152
|
+
|
|
153
|
+
// Base points on the (p)ositive and (n)egative axes
|
|
154
|
+
pp1() = Point In BoundingBox{
|
|
155
|
+
block_width/2-tol,-tol,-tol,
|
|
156
|
+
block_width/2+tol,+tol,+tol};
|
|
157
|
+
Physical Point("bc-base-px-loc-z") = {pp1(0)};
|
|
158
|
+
|
|
159
|
+
pp2() = Point In BoundingBox{
|
|
160
|
+
-block_width/2-tol,-tol,-tol,
|
|
161
|
+
-block_width/2+tol,+tol,+tol};
|
|
162
|
+
Physical Point("bc-base-nx-loc-z") = {pp2(0)};
|
|
163
|
+
|
|
164
|
+
pp3() = Point In BoundingBox{
|
|
165
|
+
-tol,-tol,block_leng/2-tol,
|
|
166
|
+
+tol,+tol,block_leng/2+tol};
|
|
167
|
+
Physical Point("bc-base-pz-loc-x") = {pp3(0)};
|
|
168
|
+
|
|
169
|
+
pp4() = Point In BoundingBox{
|
|
170
|
+
-tol,-tol,-block_leng/2-tol,
|
|
171
|
+
+tol,+tol,-block_leng/2+tol};
|
|
172
|
+
Physical Point("bc-base-nz-loc-x") = {pp4(0)};
|
|
173
|
+
|
|
174
|
+
// Pipe end in the (p)ositive z direction, (n)orth,(s)outh,(e)ast,(w)est
|
|
175
|
+
loc_x = 0.0;
|
|
176
|
+
loc_y = pipe_rad_out;
|
|
177
|
+
pp5() = Point In BoundingBox{
|
|
178
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,pipe_leng/2-tol,
|
|
179
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,pipe_leng/2+tol};
|
|
180
|
+
Physical Point("bc-pipe-pzn-loc-x") = {pp5(0)};
|
|
181
|
+
|
|
182
|
+
loc_x = 0.0;
|
|
183
|
+
loc_y = -pipe_rad_out;
|
|
184
|
+
pp6() = Point In BoundingBox{
|
|
185
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,pipe_leng/2-tol,
|
|
186
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,pipe_leng/2+tol};
|
|
187
|
+
Physical Point("bc-pipe-pzs-loc-x") = {pp6(0)};
|
|
188
|
+
|
|
189
|
+
loc_x = pipe_rad_out;
|
|
190
|
+
loc_y = 0.0;
|
|
191
|
+
pp7() = Point In BoundingBox{
|
|
192
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,pipe_leng/2-tol,
|
|
193
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,pipe_leng/2+tol};
|
|
194
|
+
Physical Point("bc-pipe-pze-loc-y") = {pp7(0)};
|
|
195
|
+
|
|
196
|
+
loc_x = -pipe_rad_out;
|
|
197
|
+
loc_y = 0.0;
|
|
198
|
+
pp8() = Point In BoundingBox{
|
|
199
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,pipe_leng/2-tol,
|
|
200
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,pipe_leng/2+tol};
|
|
201
|
+
Physical Point("bc-pipe-pzw-loc-y") = {pp8(0)};
|
|
202
|
+
|
|
203
|
+
// Pipe end in the (n)egative z direction, (n)orth,(s)outh,(e)ast,(w)est
|
|
204
|
+
loc_x = 0.0;
|
|
205
|
+
loc_y = pipe_rad_out;
|
|
206
|
+
pp9() = Point In BoundingBox{
|
|
207
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,-pipe_leng/2-tol,
|
|
208
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,-pipe_leng/2+tol};
|
|
209
|
+
Physical Point("bc-pipe-nzn-loc-x") = {pp9(0)};
|
|
210
|
+
|
|
211
|
+
loc_x = 0.0;
|
|
212
|
+
loc_y = -pipe_rad_out;
|
|
213
|
+
pp10() = Point In BoundingBox{
|
|
214
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,-pipe_leng/2-tol,
|
|
215
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,-pipe_leng/2+tol};
|
|
216
|
+
Physical Point("bc-pipe-nzs-loc-x") = {pp10(0)};
|
|
217
|
+
|
|
218
|
+
loc_x = pipe_rad_out;
|
|
219
|
+
loc_y = 0.0;
|
|
220
|
+
pp11() = Point In BoundingBox{
|
|
221
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,-pipe_leng/2-tol,
|
|
222
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,-pipe_leng/2+tol};
|
|
223
|
+
Physical Point("bc-pipe-nze-loc-y") = {pp11(0)};
|
|
224
|
+
|
|
225
|
+
loc_x = -pipe_rad_out;
|
|
226
|
+
loc_y = 0.0;
|
|
227
|
+
pp12() = Point In BoundingBox{
|
|
228
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,-pipe_leng/2-tol,
|
|
229
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,-pipe_leng/2+tol};
|
|
230
|
+
Physical Point("bc-pipe-nzw-loc-y") = {pp12(0)};
|
|
231
|
+
|
|
232
|
+
//------------------------------------------------------------------------------
|
|
233
|
+
// Mesh Sizing
|
|
234
|
+
MeshSize{ PointsOf{ Volume{:}; } } = mesh_size;
|
|
235
|
+
|
|
236
|
+
//------------------------------------------------------------------------------
|
|
237
|
+
// Global meshing
|
|
238
|
+
Mesh.Algorithm = 6;
|
|
239
|
+
Mesh.Algorithm3D = 10;
|
|
240
|
+
|
|
241
|
+
General.NumThreads = num_threads;
|
|
242
|
+
Mesh.MaxNumThreads1D = num_threads;
|
|
243
|
+
Mesh.MaxNumThreads2D = num_threads;
|
|
244
|
+
Mesh.MaxNumThreads3D = num_threads;
|
|
245
|
+
|
|
246
|
+
Mesh.ElementOrder = elem_order;
|
|
247
|
+
Mesh 3;
|
|
248
|
+
|
|
249
|
+
//------------------------------------------------------------------------------
|
|
250
|
+
// Save and exit
|
|
251
|
+
Save Str(file_name);
|
|
252
|
+
Exit;
|
pyvale/simcases/case19.i
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
#-------------------------------------------------------------------------
|
|
2
|
+
# pyvale: gmsh,3Dstc,1mat,thermal,steady,
|
|
3
|
+
#-------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
#-------------------------------------------------------------------------
|
|
6
|
+
#_* MOOSEHERDER VARIABLES - START
|
|
7
|
+
|
|
8
|
+
# NOTE: only used for transient solves
|
|
9
|
+
endTime= 1
|
|
10
|
+
timeStep = 1
|
|
11
|
+
|
|
12
|
+
# Thermal Loads/BCs
|
|
13
|
+
coolantTemp = 150.0 # degC
|
|
14
|
+
heatTransCoeff = 125.0e3 # W.m^-2.K^-1
|
|
15
|
+
|
|
16
|
+
surfHeatPower = 0.25e3 # W
|
|
17
|
+
blockLeng = 49.5e-3
|
|
18
|
+
blockWidth = 37e-3
|
|
19
|
+
surfArea = ${fparse blockLeng*blockWidth} # m^2
|
|
20
|
+
surfHeatFlux = ${fparse surfHeatPower/surfArea} # W.m^-2
|
|
21
|
+
|
|
22
|
+
# Material Properties: SS316L @ 400 degC
|
|
23
|
+
ss316LDensity = 7770.0 # kg.m^-3
|
|
24
|
+
ss316LThermCond = 19.99 # W.m^-1.K^-1
|
|
25
|
+
ss316LSpecHeat = 556.0 # J.kg^-1.K^-1
|
|
26
|
+
|
|
27
|
+
# Mesh file string
|
|
28
|
+
mesh_file = 'case19.msh'
|
|
29
|
+
|
|
30
|
+
#** MOOSEHERDER VARIABLES - END
|
|
31
|
+
#-------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
[Mesh]
|
|
34
|
+
type = FileMesh
|
|
35
|
+
file = ${mesh_file}
|
|
36
|
+
[]
|
|
37
|
+
|
|
38
|
+
[Variables]
|
|
39
|
+
[temperature]
|
|
40
|
+
initial_condition = ${coolantTemp}
|
|
41
|
+
[]
|
|
42
|
+
[]
|
|
43
|
+
|
|
44
|
+
[Kernels]
|
|
45
|
+
[heat_conduction]
|
|
46
|
+
type = HeatConduction
|
|
47
|
+
variable = temperature
|
|
48
|
+
[]
|
|
49
|
+
[]
|
|
50
|
+
|
|
51
|
+
[Materials]
|
|
52
|
+
[copper_thermal]
|
|
53
|
+
type = HeatConductionMaterial
|
|
54
|
+
thermal_conductivity = ${ss316LThermCond}
|
|
55
|
+
specific_heat = ${ss316LSpecHeat}
|
|
56
|
+
[]
|
|
57
|
+
[copper_density]
|
|
58
|
+
type = GenericConstantMaterial
|
|
59
|
+
prop_names = 'density'
|
|
60
|
+
prop_values = ${ss316LDensity}
|
|
61
|
+
[]
|
|
62
|
+
[]
|
|
63
|
+
|
|
64
|
+
[BCs]
|
|
65
|
+
[heat_flux_out]
|
|
66
|
+
type = ConvectiveHeatFluxBC
|
|
67
|
+
variable = temperature
|
|
68
|
+
boundary = 'bc-pipe-htc'
|
|
69
|
+
T_infinity = ${coolantTemp}
|
|
70
|
+
heat_transfer_coefficient = ${heatTransCoeff}
|
|
71
|
+
[]
|
|
72
|
+
[heat_flux_in]
|
|
73
|
+
type = NeumannBC
|
|
74
|
+
variable = temperature
|
|
75
|
+
boundary = 'bc-top-heatflux'
|
|
76
|
+
value = ${surfHeatFlux}
|
|
77
|
+
[]
|
|
78
|
+
[]
|
|
79
|
+
|
|
80
|
+
[Executioner]
|
|
81
|
+
type = Transient
|
|
82
|
+
end_time= ${endTime}
|
|
83
|
+
dt = ${timeStep}
|
|
84
|
+
[]
|
|
85
|
+
|
|
86
|
+
[Postprocessors]
|
|
87
|
+
[temp_max]
|
|
88
|
+
type = NodalExtremeValue
|
|
89
|
+
variable = temperature
|
|
90
|
+
[]
|
|
91
|
+
[temp_avg]
|
|
92
|
+
type = AverageNodalVariableValue
|
|
93
|
+
variable = temperature
|
|
94
|
+
[]
|
|
95
|
+
[]
|
|
96
|
+
|
|
97
|
+
[Outputs]
|
|
98
|
+
exodus = true
|
|
99
|
+
[]
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
//==============================================================================
|
|
2
|
+
// Gmsh 3D simple test case divertor armour mock-up
|
|
3
|
+
// author: Lloyd Fletcher (scepticalrabbit)
|
|
4
|
+
//==============================================================================
|
|
5
|
+
// Always set to OpenCASCADE - circles and boolean opts are much easier!
|
|
6
|
+
SetFactory("OpenCASCADE");
|
|
7
|
+
|
|
8
|
+
// Allows gmsh to print to terminal in vscode - easier debugging
|
|
9
|
+
General.Terminal = 0;
|
|
10
|
+
|
|
11
|
+
// View options - not required when
|
|
12
|
+
Geometry.PointLabels = 1;
|
|
13
|
+
Geometry.CurveLabels = 0;
|
|
14
|
+
Geometry.SurfaceLabels = 1;
|
|
15
|
+
Geometry.VolumeLabels = 0;
|
|
16
|
+
|
|
17
|
+
//-------------------------------------------------------------------------
|
|
18
|
+
//_* MOOSEHERDER VARIABLES - START
|
|
19
|
+
file_name = "case20.msh";
|
|
20
|
+
|
|
21
|
+
// Geometric variables
|
|
22
|
+
block_width = 37e-3;
|
|
23
|
+
block_leng = 49.5e-3;
|
|
24
|
+
block_armour = 12e-3;
|
|
25
|
+
block_height_square = 11.5e-3;
|
|
26
|
+
block_height_above_pipe = 12.5e-3+block_armour;
|
|
27
|
+
block_height_tot = block_height_square+block_height_above_pipe;
|
|
28
|
+
|
|
29
|
+
// Block half width must be greater than the sum of:
|
|
30
|
+
// block_width/2 >= pipe_rad_in+pipe_thick_fillet_rad
|
|
31
|
+
fillet_rad = 2e-3;
|
|
32
|
+
pipe_rad_in = 6e-3;
|
|
33
|
+
pipe_thick = 1.5e-3;
|
|
34
|
+
pipe_leng = 100e-3;
|
|
35
|
+
|
|
36
|
+
// Must be an integer
|
|
37
|
+
elem_order = 2;
|
|
38
|
+
mesh_ref = 1;
|
|
39
|
+
mesh_size = 2e-3/mesh_ref;
|
|
40
|
+
num_threads = 4;
|
|
41
|
+
//** MOOSEHERDER VARIABLES - END
|
|
42
|
+
//------------------------------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
//------------------------------------------------------------------------------
|
|
45
|
+
// Calculated / Fixed Variables
|
|
46
|
+
pipe_loc_x = 0.0;
|
|
47
|
+
pipe_loc_y = block_height_square;
|
|
48
|
+
|
|
49
|
+
pipe_rad_out = pipe_rad_in + pipe_thick;
|
|
50
|
+
pipe_circ_in = 2*Pi*pipe_rad_in;
|
|
51
|
+
|
|
52
|
+
tol = mesh_size/4; // Used for bounding box selection tolerance
|
|
53
|
+
|
|
54
|
+
//------------------------------------------------------------------------------
|
|
55
|
+
// Geometry Definition
|
|
56
|
+
|
|
57
|
+
// Create the block and the outer pipe diam as solid cylinders
|
|
58
|
+
v1 = newv;
|
|
59
|
+
Box(v1) = {-block_width/2,0,0,
|
|
60
|
+
block_width,block_height_tot,block_leng/2};
|
|
61
|
+
v2 = newv;
|
|
62
|
+
Box(v2) = {-block_width/2,0.0,-block_leng/2,
|
|
63
|
+
block_width,block_height_tot,block_leng/2};
|
|
64
|
+
|
|
65
|
+
v3 = newv;
|
|
66
|
+
Cylinder(v3) = {pipe_loc_x,pipe_loc_y,block_leng/2,
|
|
67
|
+
0.0,0.0,(pipe_leng/2-block_leng/2),pipe_rad_out,2*Pi};
|
|
68
|
+
v4 = newv;
|
|
69
|
+
Cylinder(v4) = {pipe_loc_x,pipe_loc_y,-block_leng/2,
|
|
70
|
+
0.0,0.0,-(pipe_leng/2-block_leng/2),pipe_rad_out,2*Pi};
|
|
71
|
+
|
|
72
|
+
// Need to join the cylinder to the block to create a fillet
|
|
73
|
+
BooleanUnion{ Volume{v1}; Delete; }{ Volume{v3}; Delete; }
|
|
74
|
+
BooleanUnion{ Volume{v2}; Delete; }{ Volume{v4}; Delete; }
|
|
75
|
+
|
|
76
|
+
// Grab the curves between the pipe outer edge and the block to fillet
|
|
77
|
+
cf1() = Curve In BoundingBox{
|
|
78
|
+
pipe_loc_x-pipe_rad_out-tol,pipe_loc_y-pipe_rad_out-tol,block_leng/2-tol,
|
|
79
|
+
pipe_loc_x+pipe_rad_out+tol,pipe_loc_y+pipe_rad_out+tol,block_leng/2+tol};
|
|
80
|
+
|
|
81
|
+
cf2() = Curve In BoundingBox{
|
|
82
|
+
pipe_loc_x-pipe_rad_out-tol,pipe_loc_y-pipe_rad_out-tol,-block_leng/2-tol,
|
|
83
|
+
pipe_loc_x+pipe_rad_out+tol,pipe_loc_y+pipe_rad_out+tol,-block_leng/2+tol};
|
|
84
|
+
|
|
85
|
+
all_vols = Volume{:};
|
|
86
|
+
Fillet{all_vols(0)}{cf1(0)}{fillet_rad}
|
|
87
|
+
Fillet{all_vols(1)}{cf2(0)}{fillet_rad}
|
|
88
|
+
|
|
89
|
+
// Join the two halves of the block but maintain the dividing line
|
|
90
|
+
all_vols = Volume{:};
|
|
91
|
+
BooleanFragments{Volume{all_vols(0)}; Delete;}{Volume{all_vols(1)}; Delete;}
|
|
92
|
+
|
|
93
|
+
// Create the pipe bore
|
|
94
|
+
all_vols = Volume{:};
|
|
95
|
+
v5 = newv;
|
|
96
|
+
Cylinder(v5) = {pipe_loc_x,pipe_loc_y,-pipe_leng/2,
|
|
97
|
+
0.0,0.0,pipe_leng,pipe_rad_in,2*Pi};
|
|
98
|
+
BooleanDifference{Volume{all_vols(0),all_vols(1)}; Delete;}
|
|
99
|
+
{Volume{v5}; Delete;}
|
|
100
|
+
all_vols = Volume{:};
|
|
101
|
+
|
|
102
|
+
// Actual geometry complete - remainder are points for mech BCs
|
|
103
|
+
// For mech BCs on the base of the block
|
|
104
|
+
pb1 = newp; Point(pb1) = {0,0,0};
|
|
105
|
+
pb2 = newp; Point(pb2) = {0,0,block_leng/2};
|
|
106
|
+
pb3 = newp; Point(pb3) = {0,0,-block_leng/2};
|
|
107
|
+
pb4 = newp; Point(pb4) = {-block_width/2,0,0};
|
|
108
|
+
pb5 = newp; Point(pb5) = {block_width/2,0,0};
|
|
109
|
+
|
|
110
|
+
// For mech BCs on the pipe
|
|
111
|
+
pm1 = newp; Point(pm1) = {pipe_loc_x+pipe_rad_out,pipe_loc_y+0.0,pipe_leng/2};
|
|
112
|
+
pm2 = newp; Point(pm2) = {pipe_loc_x+0.0,pipe_loc_y+pipe_rad_out,pipe_leng/2};
|
|
113
|
+
pm3 = newp; Point(pm3) = {pipe_loc_x-pipe_rad_out,pipe_loc_y+0.0,pipe_leng/2};
|
|
114
|
+
pm4 = newp; Point(pm4) = {pipe_loc_x-0.0,pipe_loc_y-pipe_rad_out,pipe_leng/2};
|
|
115
|
+
|
|
116
|
+
pm5 = newp; Point(pm5) = {pipe_loc_x+pipe_rad_out,pipe_loc_y+0.0,-pipe_leng/2};
|
|
117
|
+
pm6 = newp; Point(pm6) = {pipe_loc_x+0.0,pipe_loc_y+pipe_rad_out,-pipe_leng/2};
|
|
118
|
+
pm7 = newp; Point(pm7) = {pipe_loc_x-pipe_rad_out,pipe_loc_y+0.0,-pipe_leng/2};
|
|
119
|
+
pm8 = newp; Point(pm8) = {pipe_loc_x-0.0,pipe_loc_y-pipe_rad_out,-pipe_leng/2};
|
|
120
|
+
|
|
121
|
+
BooleanFragments{Volume{:}; Delete;}
|
|
122
|
+
{Point{pb1,pb2,pb3,pb4,pb5,pm1,pm2,pm3,pm4,pm5,pm6,pm7,pm8}; Delete;}
|
|
123
|
+
|
|
124
|
+
//------------------------------------------------------------------------------
|
|
125
|
+
// Physical surfaces and volumes for export/BCs
|
|
126
|
+
|
|
127
|
+
Physical Volume("stc-vol") = {Volume{:}};
|
|
128
|
+
|
|
129
|
+
// Physical surface for mechanical BC for dispy - like sitting on a flat surface
|
|
130
|
+
ps1() = Surface In BoundingBox{
|
|
131
|
+
-block_width/2-tol,0.0-tol,-block_leng/2-tol,
|
|
132
|
+
block_width/2+tol,0.0+tol,block_leng/2+tol};
|
|
133
|
+
Physical Surface("bc-base-disp") = {ps1(0),ps1(1)};
|
|
134
|
+
|
|
135
|
+
// thermal BCs for top surface heat flux and pipe htc
|
|
136
|
+
ps2() = Surface In BoundingBox{
|
|
137
|
+
-block_width/2-tol,block_height_tot-tol,-block_leng/2-tol,
|
|
138
|
+
block_width/2+tol,block_height_tot+tol,block_leng/2+tol};
|
|
139
|
+
Physical Surface("bc-top-heatflux") = {ps2(0),ps2(1)};
|
|
140
|
+
|
|
141
|
+
ps3() = Surface In BoundingBox{
|
|
142
|
+
pipe_loc_x-pipe_rad_in-tol,pipe_loc_y-pipe_rad_in-tol,-pipe_leng/2-tol,
|
|
143
|
+
pipe_loc_x+pipe_rad_in+tol,pipe_loc_y+pipe_rad_in+tol,pipe_leng/2+tol};
|
|
144
|
+
Physical Surface("bc-pipe-htc") = {ps3(0),ps3(1)};
|
|
145
|
+
|
|
146
|
+
// Physical points for applying mechanical BCs - Lines don't work in 3D
|
|
147
|
+
// Center of the base of the block - lock all DOFs
|
|
148
|
+
pp0() = Point In BoundingBox{
|
|
149
|
+
-tol,-tol,-tol,
|
|
150
|
+
+tol,+tol,+tol};
|
|
151
|
+
Physical Point("bc-base-c-loc-xyz") = {pp0(0)};
|
|
152
|
+
|
|
153
|
+
// Base points on the (p)ositive and (n)egative axes
|
|
154
|
+
pp1() = Point In BoundingBox{
|
|
155
|
+
block_width/2-tol,-tol,-tol,
|
|
156
|
+
block_width/2+tol,+tol,+tol};
|
|
157
|
+
Physical Point("bc-base-px-loc-z") = {pp1(0)};
|
|
158
|
+
|
|
159
|
+
pp2() = Point In BoundingBox{
|
|
160
|
+
-block_width/2-tol,-tol,-tol,
|
|
161
|
+
-block_width/2+tol,+tol,+tol};
|
|
162
|
+
Physical Point("bc-base-nx-loc-z") = {pp2(0)};
|
|
163
|
+
|
|
164
|
+
pp3() = Point In BoundingBox{
|
|
165
|
+
-tol,-tol,block_leng/2-tol,
|
|
166
|
+
+tol,+tol,block_leng/2+tol};
|
|
167
|
+
Physical Point("bc-base-pz-loc-x") = {pp3(0)};
|
|
168
|
+
|
|
169
|
+
pp4() = Point In BoundingBox{
|
|
170
|
+
-tol,-tol,-block_leng/2-tol,
|
|
171
|
+
+tol,+tol,-block_leng/2+tol};
|
|
172
|
+
Physical Point("bc-base-nz-loc-x") = {pp4(0)};
|
|
173
|
+
|
|
174
|
+
// Pipe end in the (p)ositive z direction, (n)orth,(s)outh,(e)ast,(w)est
|
|
175
|
+
loc_x = 0.0;
|
|
176
|
+
loc_y = pipe_rad_out;
|
|
177
|
+
pp5() = Point In BoundingBox{
|
|
178
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,pipe_leng/2-tol,
|
|
179
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,pipe_leng/2+tol};
|
|
180
|
+
Physical Point("bc-pipe-pzn-loc-x") = {pp5(0)};
|
|
181
|
+
|
|
182
|
+
loc_x = 0.0;
|
|
183
|
+
loc_y = -pipe_rad_out;
|
|
184
|
+
pp6() = Point In BoundingBox{
|
|
185
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,pipe_leng/2-tol,
|
|
186
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,pipe_leng/2+tol};
|
|
187
|
+
Physical Point("bc-pipe-pzs-loc-x") = {pp6(0)};
|
|
188
|
+
|
|
189
|
+
loc_x = pipe_rad_out;
|
|
190
|
+
loc_y = 0.0;
|
|
191
|
+
pp7() = Point In BoundingBox{
|
|
192
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,pipe_leng/2-tol,
|
|
193
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,pipe_leng/2+tol};
|
|
194
|
+
Physical Point("bc-pipe-pze-loc-y") = {pp7(0)};
|
|
195
|
+
|
|
196
|
+
loc_x = -pipe_rad_out;
|
|
197
|
+
loc_y = 0.0;
|
|
198
|
+
pp8() = Point In BoundingBox{
|
|
199
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,pipe_leng/2-tol,
|
|
200
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,pipe_leng/2+tol};
|
|
201
|
+
Physical Point("bc-pipe-pzw-loc-y") = {pp8(0)};
|
|
202
|
+
|
|
203
|
+
// Pipe end in the (n)egative z direction, (n)orth,(s)outh,(e)ast,(w)est
|
|
204
|
+
loc_x = 0.0;
|
|
205
|
+
loc_y = pipe_rad_out;
|
|
206
|
+
pp9() = Point In BoundingBox{
|
|
207
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,-pipe_leng/2-tol,
|
|
208
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,-pipe_leng/2+tol};
|
|
209
|
+
Physical Point("bc-pipe-nzn-loc-x") = {pp9(0)};
|
|
210
|
+
|
|
211
|
+
loc_x = 0.0;
|
|
212
|
+
loc_y = -pipe_rad_out;
|
|
213
|
+
pp10() = Point In BoundingBox{
|
|
214
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,-pipe_leng/2-tol,
|
|
215
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,-pipe_leng/2+tol};
|
|
216
|
+
Physical Point("bc-pipe-nzs-loc-x") = {pp10(0)};
|
|
217
|
+
|
|
218
|
+
loc_x = pipe_rad_out;
|
|
219
|
+
loc_y = 0.0;
|
|
220
|
+
pp11() = Point In BoundingBox{
|
|
221
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,-pipe_leng/2-tol,
|
|
222
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,-pipe_leng/2+tol};
|
|
223
|
+
Physical Point("bc-pipe-nze-loc-y") = {pp11(0)};
|
|
224
|
+
|
|
225
|
+
loc_x = -pipe_rad_out;
|
|
226
|
+
loc_y = 0.0;
|
|
227
|
+
pp12() = Point In BoundingBox{
|
|
228
|
+
pipe_loc_x+loc_x-tol,pipe_loc_y+loc_y-tol,-pipe_leng/2-tol,
|
|
229
|
+
pipe_loc_x+loc_x+tol,pipe_loc_y+loc_y+tol,-pipe_leng/2+tol};
|
|
230
|
+
Physical Point("bc-pipe-nzw-loc-y") = {pp12(0)};
|
|
231
|
+
|
|
232
|
+
//------------------------------------------------------------------------------
|
|
233
|
+
// Mesh Sizing
|
|
234
|
+
MeshSize{ PointsOf{ Volume{:}; } } = mesh_size;
|
|
235
|
+
|
|
236
|
+
//------------------------------------------------------------------------------
|
|
237
|
+
// Global meshing
|
|
238
|
+
Mesh.Algorithm = 6;
|
|
239
|
+
Mesh.Algorithm3D = 10;
|
|
240
|
+
|
|
241
|
+
General.NumThreads = num_threads;
|
|
242
|
+
Mesh.MaxNumThreads1D = num_threads;
|
|
243
|
+
Mesh.MaxNumThreads2D = num_threads;
|
|
244
|
+
Mesh.MaxNumThreads3D = num_threads;
|
|
245
|
+
|
|
246
|
+
Mesh.ElementOrder = elem_order;
|
|
247
|
+
Mesh 3;
|
|
248
|
+
|
|
249
|
+
//------------------------------------------------------------------------------
|
|
250
|
+
// Save and exit
|
|
251
|
+
Save Str(file_name);
|
|
252
|
+
Exit;
|