pyvale 2025.5.3__cp311-cp311-musllinux_1_2_x86_64.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/__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-x86_64-linux-musl.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 +174 -0
- pyvale-2025.5.3.dist-info/WHEEL +5 -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,337 @@
|
|
|
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 = "case15.msh";
|
|
26
|
+
num_threads = 7;
|
|
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; // Must be an integer greater than 0
|
|
41
|
+
|
|
42
|
+
//_* MOOSEHERDER VARIABLES - END
|
|
43
|
+
//------------------------------------------------------------------------------
|
|
44
|
+
|
|
45
|
+
// Calculated Geometry Variables
|
|
46
|
+
pipe_rad_ext = pipe_rad_int+pipe_thick;
|
|
47
|
+
|
|
48
|
+
interlayer_rad_int = pipe_rad_ext;
|
|
49
|
+
interlayer_rad_ext = interlayer_rad_int+interlayer_thick;
|
|
50
|
+
|
|
51
|
+
monoblock_width = 2*interlayer_rad_ext + 2*monoblock_side;
|
|
52
|
+
monoblock_height = monoblock_width + monoblock_arm_height;
|
|
53
|
+
|
|
54
|
+
pipe_cent_x = 0.0;
|
|
55
|
+
pipe_cent_y = interlayer_rad_ext + monoblock_side;
|
|
56
|
+
|
|
57
|
+
// Calculated Mesh Variables
|
|
58
|
+
pipe_sect_nodes = Round(mesh_ref*5); // Must be odd
|
|
59
|
+
pipe_rad_nodes = Round(mesh_ref*5);
|
|
60
|
+
interlayer_rad_nodes = Round(mesh_ref*5);
|
|
61
|
+
monoblock_side_nodes = Round(mesh_ref*5);
|
|
62
|
+
monoblock_arm_nodes = Round(mesh_ref*5);
|
|
63
|
+
monoblock_depth_nodes = Round(mesh_ref*2);
|
|
64
|
+
monoblock_width_nodes = Floor((pipe_sect_nodes-1)/2)+1;
|
|
65
|
+
/*
|
|
66
|
+
// This is a more reasonable mesh refinement for the monoblock but solve time
|
|
67
|
+
// is much longer
|
|
68
|
+
pipe_sect_nodes = Round(mesh_ref*11); // Must be odd
|
|
69
|
+
pipe_rad_nodes = Round(mesh_ref*7);
|
|
70
|
+
interlayer_rad_nodes = Round(mesh_ref*7);
|
|
71
|
+
monoblock_side_nodes = Round(mesh_ref*9);
|
|
72
|
+
monoblock_arm_nodes = Round(mesh_ref*11);
|
|
73
|
+
monoblock_depth_nodes = Round(mesh_ref*5);
|
|
74
|
+
monoblock_width_nodes = Floor((pipe_sect_nodes-1)/2)+1;
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
// Calculate approx element size by dividing the circumference
|
|
78
|
+
elem_size = 2*Pi*pipe_rad_int/(4*(pipe_sect_nodes-1));
|
|
79
|
+
tol = elem_size/4; // Used for selection tolerance of bounding boxes
|
|
80
|
+
|
|
81
|
+
//------------------------------------------------------------------------------
|
|
82
|
+
// Geometry Definition
|
|
83
|
+
s1 = news;
|
|
84
|
+
Rectangle(s1) =
|
|
85
|
+
{-monoblock_width/2,0.0,0.0,
|
|
86
|
+
monoblock_width/2,monoblock_width/2};
|
|
87
|
+
|
|
88
|
+
s2 = news;
|
|
89
|
+
Rectangle(s2) =
|
|
90
|
+
{-monoblock_width/2,monoblock_width/2,0.0,
|
|
91
|
+
monoblock_width/2,monoblock_width/2};
|
|
92
|
+
|
|
93
|
+
s3 = news;
|
|
94
|
+
Rectangle(s3) =
|
|
95
|
+
{0.0,monoblock_width/2,0.0,
|
|
96
|
+
monoblock_width/2,monoblock_width/2};
|
|
97
|
+
|
|
98
|
+
s4 = news;
|
|
99
|
+
Rectangle(s4) =
|
|
100
|
+
{0.0,0.0,0.0,
|
|
101
|
+
monoblock_width/2,monoblock_width/2};
|
|
102
|
+
|
|
103
|
+
sa1 = news;
|
|
104
|
+
Rectangle(sa1) =
|
|
105
|
+
{-monoblock_width/2,monoblock_width,0.0,
|
|
106
|
+
monoblock_width/2,monoblock_arm_height};
|
|
107
|
+
|
|
108
|
+
sa2 = news;
|
|
109
|
+
Rectangle(sa2) =
|
|
110
|
+
{0.0,monoblock_width,0.0,
|
|
111
|
+
monoblock_width/2,monoblock_arm_height};
|
|
112
|
+
|
|
113
|
+
BooleanFragments{ Surface{s1}; Delete; }{ Surface{s2,s3,s4,sa1,sa2}; Delete; }
|
|
114
|
+
|
|
115
|
+
pipe_block_surfs() = Surface In BoundingBox{
|
|
116
|
+
-monoblock_width/2-tol,-tol,-tol,
|
|
117
|
+
monoblock_width+tol,monoblock_width+tol,tol};
|
|
118
|
+
|
|
119
|
+
c2 = newc; Circle(c2) = {pipe_cent_x,pipe_cent_y,0.0,interlayer_rad_ext};
|
|
120
|
+
cl2 = newcl; Curve Loop(cl2) = {c2};
|
|
121
|
+
s6 = news; Plane Surface(s6) = {cl2};
|
|
122
|
+
|
|
123
|
+
c3 = newc; Circle(c3) = {pipe_cent_x,pipe_cent_y,0.0,pipe_rad_ext};
|
|
124
|
+
cl3 = newcl; Curve Loop(cl3) = {c3};
|
|
125
|
+
s7 = news; Plane Surface(s7) = {cl3};
|
|
126
|
+
|
|
127
|
+
c4 = newc; Circle(c4) = {pipe_cent_x,pipe_cent_y,0.0,pipe_rad_int};
|
|
128
|
+
cl4 = newcl; Curve Loop(cl4) = {c4};
|
|
129
|
+
s8 = news; Plane Surface(s8) = {cl4};
|
|
130
|
+
|
|
131
|
+
BooleanDifference{Surface{pipe_block_surfs(),s6,s7}; Delete;}
|
|
132
|
+
{ Surface{s8}; Delete;}
|
|
133
|
+
|
|
134
|
+
//------------------------------------------------------------------------------
|
|
135
|
+
// Transfinite Line/Curve Meshing
|
|
136
|
+
|
|
137
|
+
cm1() = Curve In BoundingBox{
|
|
138
|
+
pipe_cent_x-interlayer_rad_ext-tol,pipe_cent_y-interlayer_rad_ext-tol,-tol,
|
|
139
|
+
pipe_cent_x+interlayer_rad_ext+tol,pipe_cent_y+interlayer_rad_ext+tol,+tol};
|
|
140
|
+
|
|
141
|
+
For ss In {0:#cm1()-1}
|
|
142
|
+
Transfinite Curve(cm1(ss)) = pipe_sect_nodes;
|
|
143
|
+
EndFor
|
|
144
|
+
|
|
145
|
+
cm1() = Curve In BoundingBox{
|
|
146
|
+
pipe_cent_x+pipe_rad_int-tol,pipe_cent_y-tol,-tol,
|
|
147
|
+
pipe_cent_x+pipe_rad_ext+tol,pipe_cent_y+tol,+tol};
|
|
148
|
+
Transfinite Curve(cm1(0)) = pipe_rad_nodes;
|
|
149
|
+
|
|
150
|
+
cm2() = Curve In BoundingBox{
|
|
151
|
+
pipe_cent_x-pipe_rad_ext-tol,pipe_cent_y-tol,-tol,
|
|
152
|
+
pipe_cent_x-pipe_rad_int+tol,pipe_cent_y+tol,+tol};
|
|
153
|
+
Transfinite Curve(cm2(0)) = pipe_rad_nodes;
|
|
154
|
+
|
|
155
|
+
cm3() = Curve In BoundingBox{
|
|
156
|
+
pipe_cent_x-tol,pipe_cent_y-pipe_rad_ext-tol,-tol,
|
|
157
|
+
pipe_cent_x+tol,pipe_cent_y-pipe_rad_int+tol,+tol};
|
|
158
|
+
Transfinite Curve(cm3(0)) = pipe_rad_nodes;
|
|
159
|
+
|
|
160
|
+
cm4() = Curve In BoundingBox{
|
|
161
|
+
pipe_cent_x-tol,pipe_cent_y+pipe_rad_int-tol,-tol,
|
|
162
|
+
pipe_cent_x+tol,pipe_cent_y+pipe_rad_ext+tol,+tol};
|
|
163
|
+
Transfinite Curve(cm4(0)) = pipe_rad_nodes;
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
cm1() = Curve In BoundingBox{
|
|
167
|
+
pipe_cent_x+interlayer_rad_int-tol,pipe_cent_y-tol,-tol,
|
|
168
|
+
pipe_cent_x+interlayer_rad_ext+tol,pipe_cent_y+tol,+tol};
|
|
169
|
+
Transfinite Curve(cm1(0)) = interlayer_rad_nodes;
|
|
170
|
+
|
|
171
|
+
cm2() = Curve In BoundingBox{
|
|
172
|
+
pipe_cent_x-interlayer_rad_ext-tol,pipe_cent_y-tol,-tol,
|
|
173
|
+
pipe_cent_x-interlayer_rad_int+tol,pipe_cent_y+tol,+tol};
|
|
174
|
+
Transfinite Curve(cm2(0)) = interlayer_rad_nodes;
|
|
175
|
+
|
|
176
|
+
cm3() = Curve In BoundingBox{
|
|
177
|
+
pipe_cent_x-tol,pipe_cent_y-interlayer_rad_ext-tol,-tol,
|
|
178
|
+
pipe_cent_x+tol,pipe_cent_y-interlayer_rad_int+tol,+tol};
|
|
179
|
+
Transfinite Curve(cm3(0)) = interlayer_rad_nodes;
|
|
180
|
+
|
|
181
|
+
cm4() = Curve In BoundingBox{
|
|
182
|
+
pipe_cent_x-tol,pipe_cent_y+interlayer_rad_int-tol,-tol,
|
|
183
|
+
pipe_cent_x+tol,pipe_cent_y+interlayer_rad_ext+tol,+tol};
|
|
184
|
+
Transfinite Curve(cm4(0)) = interlayer_rad_nodes;
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
cm1() = Curve In BoundingBox{
|
|
188
|
+
pipe_cent_x+interlayer_rad_ext-tol,pipe_cent_y-tol,-tol,
|
|
189
|
+
pipe_cent_x+monoblock_width/2+tol,pipe_cent_y+tol,+tol};
|
|
190
|
+
Transfinite Curve(cm1(0)) = monoblock_side_nodes;
|
|
191
|
+
|
|
192
|
+
cm2() = Curve In BoundingBox{
|
|
193
|
+
pipe_cent_x-monoblock_width/2-tol,pipe_cent_y-tol,-tol,
|
|
194
|
+
pipe_cent_x-interlayer_rad_ext+tol,pipe_cent_y+tol,+tol};
|
|
195
|
+
Transfinite Curve(cm2(0)) = monoblock_side_nodes;
|
|
196
|
+
|
|
197
|
+
cm3() = Curve In BoundingBox{
|
|
198
|
+
pipe_cent_x-tol,pipe_cent_y-monoblock_width/2-tol,-tol,
|
|
199
|
+
pipe_cent_x+tol,pipe_cent_y-interlayer_rad_ext+tol,+tol};
|
|
200
|
+
Transfinite Curve(cm3(0)) = monoblock_side_nodes;
|
|
201
|
+
|
|
202
|
+
cm4() = Curve In BoundingBox{
|
|
203
|
+
pipe_cent_x-tol,pipe_cent_y+interlayer_rad_ext-tol,-tol,
|
|
204
|
+
pipe_cent_x+tol,pipe_cent_y+monoblock_width/2+tol,+tol};
|
|
205
|
+
Transfinite Curve(cm4(0)) = monoblock_side_nodes;
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
cm1() = Curve In BoundingBox{
|
|
209
|
+
-monoblock_width/2-tol,monoblock_width-tol,-tol,
|
|
210
|
+
monoblock_width/2+tol,monoblock_width+monoblock_arm_height+tol,+tol};
|
|
211
|
+
|
|
212
|
+
For ss In {0:#cm1()-1}
|
|
213
|
+
|
|
214
|
+
Transfinite Curve(cm1(ss)) = monoblock_arm_nodes;
|
|
215
|
+
EndFor
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
cm1() = Curve In BoundingBox{
|
|
220
|
+
-monoblock_width/2-tol,-tol,-tol,
|
|
221
|
+
-monoblock_width/2+tol,monoblock_width+tol,+tol};
|
|
222
|
+
|
|
223
|
+
For ss In {0:#cm1()-1}
|
|
224
|
+
Transfinite Curve(cm1(ss)) = monoblock_width_nodes;
|
|
225
|
+
EndFor
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
cm2() = Curve In BoundingBox{
|
|
229
|
+
monoblock_width/2-tol,-tol,-tol,
|
|
230
|
+
monoblock_width/2+tol,monoblock_width+tol,+tol};
|
|
231
|
+
|
|
232
|
+
For ss In {0:#cm2()-1}
|
|
233
|
+
Transfinite Curve(cm2(ss)) = monoblock_width_nodes;
|
|
234
|
+
EndFor
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
// Mesh top, bottom and armour horizontal lines
|
|
238
|
+
cm3() = Curve In BoundingBox{
|
|
239
|
+
-monoblock_width/2-tol,-tol,-tol,
|
|
240
|
+
monoblock_width/2+tol,+tol,+tol};
|
|
241
|
+
|
|
242
|
+
For ss In {0:#cm3()-1}
|
|
243
|
+
Transfinite Curve(cm3(ss)) = monoblock_width_nodes;
|
|
244
|
+
EndFor
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
cm3() = Curve In BoundingBox{
|
|
248
|
+
-monoblock_width/2-tol,monoblock_width-tol,-tol,
|
|
249
|
+
monoblock_width/2+tol,monoblock_width+tol,+tol};
|
|
250
|
+
|
|
251
|
+
For ss In {0:#cm3()-1}
|
|
252
|
+
Transfinite Curve(cm3(ss)) = monoblock_width_nodes;
|
|
253
|
+
EndFor
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
cm4() = Curve In BoundingBox{
|
|
257
|
+
-monoblock_width/2-tol,monoblock_width+monoblock_arm_height+-tol,-tol,
|
|
258
|
+
monoblock_width/2+tol,monoblock_width+monoblock_arm_height+tol,+tol};
|
|
259
|
+
|
|
260
|
+
For ss In {0:#cm4()-1}
|
|
261
|
+
Transfinite Curve(cm4(ss)) = monoblock_width_nodes;
|
|
262
|
+
EndFor
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
//------------------------------------------------------------------------------
|
|
266
|
+
// Transfinite Surface Meshing
|
|
267
|
+
|
|
268
|
+
// Mesh the pipe and interlayer
|
|
269
|
+
sm1() = Surface In BoundingBox{
|
|
270
|
+
pipe_cent_x-interlayer_rad_ext-tol,pipe_cent_y-interlayer_rad_ext-tol,-tol,
|
|
271
|
+
pipe_cent_x+interlayer_rad_ext+tol,pipe_cent_y+interlayer_rad_ext+tol,+tol};
|
|
272
|
+
|
|
273
|
+
For ss In {0:#sm1()-1}
|
|
274
|
+
Transfinite Surface{sm1(ss)};
|
|
275
|
+
Recombine Surface{sm1(ss)};
|
|
276
|
+
EndFor
|
|
277
|
+
|
|
278
|
+
// Mesh the armour on top of the block
|
|
279
|
+
sm1() = Surface In BoundingBox{
|
|
280
|
+
-monoblock_width/2-tol,monoblock_width-tol,-tol,
|
|
281
|
+
monoblock_width/2+tol,monoblock_width+monoblock_arm_height+tol,+tol};
|
|
282
|
+
|
|
283
|
+
For ss In {0:#sm1()-1}
|
|
284
|
+
Transfinite Surface{sm1(ss)};
|
|
285
|
+
Recombine Surface{sm1(ss)};
|
|
286
|
+
EndFor
|
|
287
|
+
|
|
288
|
+
// Mesh the block around the interlayer
|
|
289
|
+
Transfinite Surface{22} = {15,16,17,13};
|
|
290
|
+
Recombine Surface{22};
|
|
291
|
+
|
|
292
|
+
Transfinite Surface{27} = {15,24,5,13};
|
|
293
|
+
Recombine Surface{27};
|
|
294
|
+
|
|
295
|
+
Transfinite Surface{30} = {24,5,28,27};
|
|
296
|
+
Recombine Surface{30};
|
|
297
|
+
|
|
298
|
+
Transfinite Surface{31} = {27,28,17,16};
|
|
299
|
+
Recombine Surface{31};
|
|
300
|
+
|
|
301
|
+
//------------------------------------------------------------------------------
|
|
302
|
+
// Extrude the surface mesh to 3D
|
|
303
|
+
Extrude{0.0,0.0,monoblock_depth}{
|
|
304
|
+
Surface{:}; Layers{monoblock_depth_nodes}; Recombine;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
//------------------------------------------------------------------------------
|
|
308
|
+
// Physical Surfaces for Loads and Boundary Condition
|
|
309
|
+
Physical Surface("bc-top-heatflux") = {36,41};
|
|
310
|
+
Physical Surface("bc-pipe-heattransf") = {54,59,83,67};
|
|
311
|
+
|
|
312
|
+
//------------------------------------------------------------------------------
|
|
313
|
+
// Physical Volumes for Material Defs
|
|
314
|
+
Physical Volume("pipe-cucrzr") = {6,9,5,14};
|
|
315
|
+
Physical Volume("interlayer-cu") = {4,7,10,13};
|
|
316
|
+
Physical Volume("armour-w") = {1,2,8,11,3,12};
|
|
317
|
+
|
|
318
|
+
//------------------------------------------------------------------------------
|
|
319
|
+
// Global Mesh controls
|
|
320
|
+
Mesh.Algorithm = 6;
|
|
321
|
+
Mesh.Algorithm3D = 10;
|
|
322
|
+
|
|
323
|
+
General.NumThreads = num_threads;
|
|
324
|
+
Mesh.MaxNumThreads1D = num_threads;
|
|
325
|
+
Mesh.MaxNumThreads2D = num_threads;
|
|
326
|
+
Mesh.MaxNumThreads3D = num_threads;
|
|
327
|
+
|
|
328
|
+
Mesh.ElementOrder = 2;
|
|
329
|
+
|
|
330
|
+
Mesh 3;
|
|
331
|
+
|
|
332
|
+
//------------------------------------------------------------------------------
|
|
333
|
+
// Save and exit
|
|
334
|
+
Save Str(file_name);
|
|
335
|
+
Exit;
|
|
336
|
+
|
|
337
|
+
|
pyvale/simcases/case15.i
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
#-------------------------------------------------------------------------
|
|
2
|
+
# pyvale: gmsh,monoblock,3mat,thermal,transient
|
|
3
|
+
#-------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
#-------------------------------------------------------------------------
|
|
6
|
+
#_* MOOSEHERDER VARIABLES - START
|
|
7
|
+
|
|
8
|
+
endTime = 25
|
|
9
|
+
timeStep = 1
|
|
10
|
+
|
|
11
|
+
coolantTemp=100.0 # degC
|
|
12
|
+
heatTransCoeff=125.0e3 # W.m^-2.K^-1
|
|
13
|
+
surfHeatFlux=10.0e6 # W.m^-2
|
|
14
|
+
timeConst = 1 # s
|
|
15
|
+
|
|
16
|
+
# Copper-Chromium-Zirconium pg.148 at 200degC
|
|
17
|
+
cucrzrDensity = 8816.0 # kg.m^-3
|
|
18
|
+
cucrzrThermCond = 343.0 # W.m^-1.K^-1
|
|
19
|
+
cucrzrSpecHeat = 407.0 # J.kg^-1.K^-1
|
|
20
|
+
|
|
21
|
+
# Pure Copper pg.134 at 250degC
|
|
22
|
+
cuDensity = 8829.0 # kg.m^-3
|
|
23
|
+
cuThermCond = 384.0 # W.m^-1.K^-1
|
|
24
|
+
cuSpecHeat = 406.0 # J.kg^-1.K^-1
|
|
25
|
+
|
|
26
|
+
# Tungsten pg.224 at 600degC
|
|
27
|
+
wDensity = 19150.0 # kg.m^-3
|
|
28
|
+
wThermCond = 127.0 # W.m^-1.K^-1
|
|
29
|
+
wSpecHeat = 147.0 # J.kg^-1.K^-1
|
|
30
|
+
|
|
31
|
+
# Mesh file string
|
|
32
|
+
mesh_file = 'case15.msh'
|
|
33
|
+
|
|
34
|
+
#** MOOSEHERDER VARIABLES - END
|
|
35
|
+
#-------------------------------------------------------------------------
|
|
36
|
+
|
|
37
|
+
[Mesh]
|
|
38
|
+
type = FileMesh
|
|
39
|
+
file = ${mesh_file}
|
|
40
|
+
[]
|
|
41
|
+
|
|
42
|
+
[Variables]
|
|
43
|
+
[temperature]
|
|
44
|
+
family = LAGRANGE
|
|
45
|
+
order = SECOND
|
|
46
|
+
initial_condition = ${coolantTemp}
|
|
47
|
+
[]
|
|
48
|
+
[]
|
|
49
|
+
|
|
50
|
+
[Kernels]
|
|
51
|
+
[heat_conduction]
|
|
52
|
+
type = HeatConduction
|
|
53
|
+
variable = temperature
|
|
54
|
+
[]
|
|
55
|
+
[time_derivative]
|
|
56
|
+
type = HeatConductionTimeDerivative
|
|
57
|
+
variable = temperature
|
|
58
|
+
[]
|
|
59
|
+
[]
|
|
60
|
+
|
|
61
|
+
[Materials]
|
|
62
|
+
[cucrzr_thermal]
|
|
63
|
+
type = HeatConductionMaterial
|
|
64
|
+
thermal_conductivity = ${cucrzrThermCond}
|
|
65
|
+
specific_heat = ${cucrzrSpecHeat}
|
|
66
|
+
block = 'pipe-cucrzr'
|
|
67
|
+
[]
|
|
68
|
+
|
|
69
|
+
[copper_thermal]
|
|
70
|
+
type = HeatConductionMaterial
|
|
71
|
+
thermal_conductivity = ${cuThermCond}
|
|
72
|
+
specific_heat = ${cuSpecHeat}
|
|
73
|
+
block = 'interlayer-cu'
|
|
74
|
+
[]
|
|
75
|
+
|
|
76
|
+
[tungsten_thermal]
|
|
77
|
+
type = HeatConductionMaterial
|
|
78
|
+
thermal_conductivity = ${wThermCond}
|
|
79
|
+
specific_heat = ${wSpecHeat}
|
|
80
|
+
block = 'armour-w'
|
|
81
|
+
[]
|
|
82
|
+
|
|
83
|
+
[cucrzr_density]
|
|
84
|
+
type = GenericConstantMaterial
|
|
85
|
+
prop_names = 'density'
|
|
86
|
+
prop_values = ${cucrzrDensity}
|
|
87
|
+
block = 'pipe-cucrzr'
|
|
88
|
+
[]
|
|
89
|
+
|
|
90
|
+
[copper_density]
|
|
91
|
+
type = GenericConstantMaterial
|
|
92
|
+
prop_names = 'density'
|
|
93
|
+
prop_values = ${cuDensity}
|
|
94
|
+
block = 'interlayer-cu'
|
|
95
|
+
[]
|
|
96
|
+
|
|
97
|
+
[tungsten_density]
|
|
98
|
+
type = GenericConstantMaterial
|
|
99
|
+
prop_names = 'density'
|
|
100
|
+
prop_values = ${wDensity}
|
|
101
|
+
block = 'armour-w'
|
|
102
|
+
[]
|
|
103
|
+
[]
|
|
104
|
+
|
|
105
|
+
[BCs]
|
|
106
|
+
[heat_flux_in]
|
|
107
|
+
type = FunctionNeumannBC
|
|
108
|
+
variable = temperature
|
|
109
|
+
boundary = 'bc-top-heatflux'
|
|
110
|
+
function = '${fparse surfHeatFlux}*(1-exp(-(1/${timeConst})*t))'
|
|
111
|
+
[]
|
|
112
|
+
[heat_flux_out]
|
|
113
|
+
type = ConvectiveHeatFluxBC
|
|
114
|
+
variable = temperature
|
|
115
|
+
boundary = 'bc-pipe-heattransf'
|
|
116
|
+
T_infinity = ${coolantTemp}
|
|
117
|
+
heat_transfer_coefficient = ${heatTransCoeff}
|
|
118
|
+
[]
|
|
119
|
+
[]
|
|
120
|
+
|
|
121
|
+
[Preconditioning]
|
|
122
|
+
[smp]
|
|
123
|
+
type = SMP
|
|
124
|
+
full = true
|
|
125
|
+
[]
|
|
126
|
+
[]
|
|
127
|
+
|
|
128
|
+
[Executioner]
|
|
129
|
+
type = Transient
|
|
130
|
+
solve_type = 'PJFNK'
|
|
131
|
+
petsc_options_iname = '-pc_type -pc_hypre_type'
|
|
132
|
+
petsc_options_value = 'hypre boomeramg'
|
|
133
|
+
end_time = ${endTime}
|
|
134
|
+
dt = ${timeStep}
|
|
135
|
+
[]
|
|
136
|
+
|
|
137
|
+
[Postprocessors]
|
|
138
|
+
[temp_max]
|
|
139
|
+
type = NodalExtremeValue
|
|
140
|
+
variable = temperature
|
|
141
|
+
[]
|
|
142
|
+
[temp_avg]
|
|
143
|
+
type = AverageNodalVariableValue
|
|
144
|
+
variable = temperature
|
|
145
|
+
[]
|
|
146
|
+
[]
|
|
147
|
+
|
|
148
|
+
[Outputs]
|
|
149
|
+
exodus = true
|
|
150
|
+
[]
|