pyvale 2025.5.3__cp311-cp311-manylinux_2_17_aarch64.manylinux2014_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.
- 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-aarch64-linux-gnu.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
- pyvale.libs/libgomp-d22c30c5.so.1.0.0 +0 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
//==============================================================================
|
|
2
|
+
// Gmsh 3D parametric plate with hole mesh
|
|
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 = 1;
|
|
10
|
+
|
|
11
|
+
// View options - not required when
|
|
12
|
+
Geometry.PointLabels = 0;
|
|
13
|
+
Geometry.CurveLabels = 0;
|
|
14
|
+
Geometry.SurfaceLabels = 1;
|
|
15
|
+
Geometry.VolumeLabels = 0;
|
|
16
|
+
|
|
17
|
+
//------------------------------------------------------------------------------
|
|
18
|
+
// Variables
|
|
19
|
+
file_name = "case23.msh";
|
|
20
|
+
|
|
21
|
+
// Geometric variables
|
|
22
|
+
plate_width = 100e-3;
|
|
23
|
+
plate_height = plate_width+50e-3; // Must be greater than plate width
|
|
24
|
+
plate_diff = plate_height-plate_width;
|
|
25
|
+
plate_thick = 2e-3;
|
|
26
|
+
|
|
27
|
+
hole_rad = 25e-3/2;
|
|
28
|
+
hole_loc_x = plate_width/2;
|
|
29
|
+
hole_loc_y = plate_height/2;
|
|
30
|
+
hole_circ = 2*Pi*hole_rad;
|
|
31
|
+
|
|
32
|
+
// Mesh variables
|
|
33
|
+
elem_order = 1;
|
|
34
|
+
|
|
35
|
+
plate_thick_layers = 2;
|
|
36
|
+
hole_sect_nodes = 9; // Must be odd
|
|
37
|
+
plate_rad_nodes = 9;
|
|
38
|
+
plate_diff_nodes = 5; // numbers of nodes along the rectangular extension
|
|
39
|
+
plate_edge_nodes = Floor((hole_sect_nodes-1)/2)+1;
|
|
40
|
+
elem_size = hole_circ/(4*(hole_sect_nodes-1));
|
|
41
|
+
tol = elem_size; // Used for bounding box selection tolerance
|
|
42
|
+
tol_thick = plate_thick/(4*plate_thick_layers);
|
|
43
|
+
|
|
44
|
+
//------------------------------------------------------------------------------
|
|
45
|
+
// Geometry Definition
|
|
46
|
+
|
|
47
|
+
// Split plate into eight pieces with a square around the hole to allow spider
|
|
48
|
+
// web meshing around the hole
|
|
49
|
+
s1 = news;
|
|
50
|
+
Rectangle(s1) = {0.0,0.0,0.0,
|
|
51
|
+
plate_width/2,plate_diff/2};
|
|
52
|
+
s2 = news;
|
|
53
|
+
Rectangle(s2) = {plate_width/2,0.0,0.0,
|
|
54
|
+
plate_width/2,plate_diff/2};
|
|
55
|
+
|
|
56
|
+
s3 = news;
|
|
57
|
+
Rectangle(s3) = {0.0,plate_diff/2,0.0,
|
|
58
|
+
plate_width/2,plate_width/2};
|
|
59
|
+
s4 = news;
|
|
60
|
+
Rectangle(s4) = {plate_width/2,plate_diff/2,0.0,
|
|
61
|
+
plate_width/2,plate_width/2};
|
|
62
|
+
|
|
63
|
+
s5 = news;
|
|
64
|
+
Rectangle(s5) = {0.0,plate_width/2+plate_diff/2,0.0,
|
|
65
|
+
plate_width/2,plate_width/2};
|
|
66
|
+
s6 = news;
|
|
67
|
+
Rectangle(s6) = {plate_width/2,plate_width/2+plate_diff/2,0.0,
|
|
68
|
+
plate_width/2,plate_width/2};
|
|
69
|
+
|
|
70
|
+
s7 = news;
|
|
71
|
+
Rectangle(s7) = {0.0,plate_height-plate_diff/2,0.0,
|
|
72
|
+
plate_width/2,plate_diff/2};
|
|
73
|
+
s8 = news;
|
|
74
|
+
Rectangle(s8) = {plate_width/2,plate_height-plate_diff/2,0.0,
|
|
75
|
+
plate_width/2,plate_diff/2};
|
|
76
|
+
|
|
77
|
+
// Merge coincicent edges of the four overlapping squares
|
|
78
|
+
BooleanFragments{ Surface{s1}; Delete; }
|
|
79
|
+
{ Surface{s2,s3,s4,s5,s6,s7,s8}; Delete; }
|
|
80
|
+
|
|
81
|
+
// Create the hole surface
|
|
82
|
+
c2 = newc; Circle(c2) = {hole_loc_x,hole_loc_y,0.0,hole_rad};
|
|
83
|
+
cl2 = newcl; Curve Loop(cl2) = {c2};
|
|
84
|
+
s9 = news; Plane Surface(s9) = {cl2};
|
|
85
|
+
// Bore out the hole from the quarters of the plate
|
|
86
|
+
BooleanDifference{ Surface{s3,s4,s5,s6}; Delete; }{ Surface{s9}; Delete; }
|
|
87
|
+
|
|
88
|
+
//------------------------------------------------------------------------------
|
|
89
|
+
// Transfinite meshing (line element sizes and mapped meshing)
|
|
90
|
+
Transfinite Curve{31,24,26,28} = plate_rad_nodes;
|
|
91
|
+
Transfinite Curve{1,5,3,7,23,29,30,34,14,17,19,22} = plate_edge_nodes;
|
|
92
|
+
Transfinite Curve{32,33,25,27} = hole_sect_nodes;
|
|
93
|
+
Transfinite Curve{4,2,6,20,18,21} = plate_diff_nodes;
|
|
94
|
+
|
|
95
|
+
// NOTE: recombine surface turns default triangles into quads
|
|
96
|
+
|
|
97
|
+
Transfinite Surface{s1} = {1,2,3,4};
|
|
98
|
+
Recombine Surface{s1};
|
|
99
|
+
Transfinite Surface{s2} = {2,5,6,3};
|
|
100
|
+
Recombine Surface{s2};
|
|
101
|
+
|
|
102
|
+
Transfinite Surface{s3} = {17,18,3,16};
|
|
103
|
+
Recombine Surface{s3};
|
|
104
|
+
Transfinite Surface{s4} = {18,19,20,3};
|
|
105
|
+
Recombine Surface{s4};
|
|
106
|
+
Transfinite Surface{s5} = {17,21,10,16};
|
|
107
|
+
Recombine Surface{s5};
|
|
108
|
+
Transfinite Surface{s6} = {19,21,10,20};
|
|
109
|
+
Recombine Surface{s6};
|
|
110
|
+
|
|
111
|
+
Transfinite Surface{s7} = {11,10,13,14};
|
|
112
|
+
Recombine Surface{s7};
|
|
113
|
+
Transfinite Surface{s8} = {10,12,15,13};
|
|
114
|
+
Recombine Surface{s8};
|
|
115
|
+
|
|
116
|
+
Extrude{0.0,0.0,plate_thick}{
|
|
117
|
+
Surface{:}; Layers{plate_thick_layers}; Recombine;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
//------------------------------------------------------------------------------
|
|
121
|
+
// Physical lines and surfaces for export/BCs
|
|
122
|
+
Physical Volume("plate-vol") = {Volume{:}};
|
|
123
|
+
|
|
124
|
+
ps1() = Surface In BoundingBox{
|
|
125
|
+
0.0-tol,plate_height-tol,0.0-tol,
|
|
126
|
+
plate_width+tol,plate_height+tol,plate_thick+tol};
|
|
127
|
+
Physical Surface("bc-top-disp") = {ps1(0),ps1(1)};
|
|
128
|
+
|
|
129
|
+
ps2() = Surface In BoundingBox{
|
|
130
|
+
0.0-tol,0.0-tol,0.0-tol,
|
|
131
|
+
plate_width+tol,0.0+tol,plate_thick+tol};
|
|
132
|
+
Physical Surface("bc-base-disp") = {ps2(0),ps2(1)};
|
|
133
|
+
|
|
134
|
+
ps3() = Surface In BoundingBox{
|
|
135
|
+
0.0-tol,0.0-tol,plate_thick-tol_thick,
|
|
136
|
+
plate_width+tol,plate_height+tol,plate_thick+tol_thick};
|
|
137
|
+
Physical Surface("plate-surf-vis-front") = {ps3(0),ps3(1),ps3(2),ps3(3),
|
|
138
|
+
ps3(4),ps3(5),ps3(6),ps3(7)};
|
|
139
|
+
|
|
140
|
+
ps4() = Surface In BoundingBox{
|
|
141
|
+
0.0-tol,0.0-tol,0.0-tol_thick,
|
|
142
|
+
plate_width+tol,plate_height+tol,0.0+tol_thick};
|
|
143
|
+
Physical Surface("plate-surf-vis-back") = {ps4(0),ps4(1),ps4(2),ps4(3),
|
|
144
|
+
ps4(4),ps4(5),ps4(6),ps4(7)};
|
|
145
|
+
|
|
146
|
+
//------------------------------------------------------------------------------
|
|
147
|
+
// Global meshing
|
|
148
|
+
num_threads = 4;
|
|
149
|
+
|
|
150
|
+
Mesh.Algorithm = 6;
|
|
151
|
+
Mesh.Algorithm3D = 10;
|
|
152
|
+
|
|
153
|
+
General.NumThreads = num_threads;
|
|
154
|
+
Mesh.MaxNumThreads1D = num_threads;
|
|
155
|
+
Mesh.MaxNumThreads2D = num_threads;
|
|
156
|
+
Mesh.MaxNumThreads3D = num_threads;
|
|
157
|
+
|
|
158
|
+
Mesh.ElementOrder = elem_order;
|
|
159
|
+
Mesh 3;
|
|
160
|
+
|
|
161
|
+
//------------------------------------------------------------------------------
|
|
162
|
+
// Save and exit
|
|
163
|
+
Save Str(file_name);
|
|
164
|
+
Exit;
|
pyvale/simcases/case23.i
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
#-------------------------------------------------------------------------
|
|
2
|
+
# pyvale: gmsh,mechanical,transient
|
|
3
|
+
#-------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
#-------------------------------------------------------------------------
|
|
6
|
+
#_* MOOSEHERDER VARIABLES - START
|
|
7
|
+
|
|
8
|
+
endTime = 8
|
|
9
|
+
timeStep = 1
|
|
10
|
+
|
|
11
|
+
# Mechanical Loads/BCs
|
|
12
|
+
topDispRate = ${fparse 1e-3 / endTime} # m/s
|
|
13
|
+
|
|
14
|
+
# Mechanical Props: SS316L @ 20degC
|
|
15
|
+
ss316LEMod = 200e9 # Pa
|
|
16
|
+
ss316LPRatio = 0.3 # -
|
|
17
|
+
|
|
18
|
+
#** MOOSEHERDER VARIABLES - END
|
|
19
|
+
#-------------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
[GlobalParams]
|
|
22
|
+
displacements = 'disp_x disp_y disp_z'
|
|
23
|
+
[]
|
|
24
|
+
|
|
25
|
+
[Mesh]
|
|
26
|
+
type = FileMesh
|
|
27
|
+
file = 'case23.msh'
|
|
28
|
+
[]
|
|
29
|
+
|
|
30
|
+
[Modules/TensorMechanics/Master]
|
|
31
|
+
[all]
|
|
32
|
+
strain = SMALL
|
|
33
|
+
incremental = true
|
|
34
|
+
add_variables = true
|
|
35
|
+
material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
|
|
36
|
+
material_output_order = FIRST # CONSTANT, FIRST, SECOND,
|
|
37
|
+
generate_output = 'vonmises_stress strain_xx strain_xy strain_xz strain_yx strain_yy strain_yz strain_zx strain_zy strain_zz stress_xx stress_xy stress_xz stress_yx stress_yy stress_yz stress_zx stress_zy stress_zz max_principal_strain mid_principal_strain min_principal_strain'
|
|
38
|
+
[]
|
|
39
|
+
[]
|
|
40
|
+
|
|
41
|
+
[BCs]
|
|
42
|
+
[bottom_x]
|
|
43
|
+
type = DirichletBC
|
|
44
|
+
variable = disp_x
|
|
45
|
+
boundary = 'bc-base-disp'
|
|
46
|
+
value = 0.0
|
|
47
|
+
[]
|
|
48
|
+
[bottom_y]
|
|
49
|
+
type = DirichletBC
|
|
50
|
+
variable = disp_y
|
|
51
|
+
boundary = 'bc-base-disp'
|
|
52
|
+
value = 0.0
|
|
53
|
+
[]
|
|
54
|
+
[bottom_z]
|
|
55
|
+
type = DirichletBC
|
|
56
|
+
variable = disp_z
|
|
57
|
+
boundary = 'bc-base-disp'
|
|
58
|
+
value = 0.0
|
|
59
|
+
[]
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
[top_x]
|
|
63
|
+
type = DirichletBC
|
|
64
|
+
variable = disp_x
|
|
65
|
+
boundary = 'bc-top-disp'
|
|
66
|
+
value = 0.0
|
|
67
|
+
[]
|
|
68
|
+
[top_y]
|
|
69
|
+
type = FunctionDirichletBC
|
|
70
|
+
variable = disp_y
|
|
71
|
+
boundary = 'bc-top-disp'
|
|
72
|
+
function = '${topDispRate}*t'
|
|
73
|
+
[]
|
|
74
|
+
[top_z]
|
|
75
|
+
type = DirichletBC
|
|
76
|
+
variable = disp_z
|
|
77
|
+
boundary = 'bc-top-disp'
|
|
78
|
+
value = 0.0
|
|
79
|
+
[]
|
|
80
|
+
[]
|
|
81
|
+
|
|
82
|
+
[Materials]
|
|
83
|
+
[elasticity]
|
|
84
|
+
type = ComputeIsotropicElasticityTensor
|
|
85
|
+
youngs_modulus = ${ss316LEMod}
|
|
86
|
+
poissons_ratio = ${ss316LPRatio}
|
|
87
|
+
[]
|
|
88
|
+
[stress]
|
|
89
|
+
type = ComputeFiniteStrainElasticStress
|
|
90
|
+
[]
|
|
91
|
+
[]
|
|
92
|
+
|
|
93
|
+
[Preconditioning]
|
|
94
|
+
[SMP]
|
|
95
|
+
type = SMP
|
|
96
|
+
full = true
|
|
97
|
+
[]
|
|
98
|
+
[]
|
|
99
|
+
|
|
100
|
+
[Executioner]
|
|
101
|
+
type = Transient
|
|
102
|
+
solve_type = 'PJFNK'
|
|
103
|
+
petsc_options_iname = '-pc_type -pc_hypre_type'
|
|
104
|
+
petsc_options_value = 'hypre boomeramg'
|
|
105
|
+
end_time= ${endTime}
|
|
106
|
+
dt = ${timeStep}
|
|
107
|
+
[]
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
[Postprocessors]
|
|
111
|
+
[react_y_bot]
|
|
112
|
+
type = SidesetReaction
|
|
113
|
+
direction = '0 1 0'
|
|
114
|
+
stress_tensor = stress
|
|
115
|
+
boundary = 'bc-base-disp'
|
|
116
|
+
[]
|
|
117
|
+
[react_y_top]
|
|
118
|
+
type = SidesetReaction
|
|
119
|
+
direction = '0 1 0'
|
|
120
|
+
stress_tensor = stress
|
|
121
|
+
boundary = 'bc-top-disp'
|
|
122
|
+
[]
|
|
123
|
+
|
|
124
|
+
[disp_y_max]
|
|
125
|
+
type = NodalExtremeValue
|
|
126
|
+
variable = disp_y
|
|
127
|
+
[]
|
|
128
|
+
[disp_x_max]
|
|
129
|
+
type = NodalExtremeValue
|
|
130
|
+
variable = disp_x
|
|
131
|
+
[]
|
|
132
|
+
[disp_z_max]
|
|
133
|
+
type = NodalExtremeValue
|
|
134
|
+
variable = disp_x
|
|
135
|
+
[]
|
|
136
|
+
[]
|
|
137
|
+
|
|
138
|
+
[Outputs]
|
|
139
|
+
exodus = true
|
|
140
|
+
[]
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//==============================================================================
|
|
2
|
+
// Gmsh 2D plate imaging test case
|
|
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 = 1;
|
|
10
|
+
|
|
11
|
+
// View options - not required when
|
|
12
|
+
Geometry.PointLabels = 1;
|
|
13
|
+
Geometry.CurveLabels = 1;
|
|
14
|
+
Geometry.SurfaceLabels = 1;
|
|
15
|
+
Geometry.VolumeLabels = 0;
|
|
16
|
+
|
|
17
|
+
//-------------------------------------------------------------------------
|
|
18
|
+
//_* MOOSEHERDER VARIABLES - START
|
|
19
|
+
file_name = "case24.msh";
|
|
20
|
+
|
|
21
|
+
// Geometric variables
|
|
22
|
+
plate_height = 50e-3;
|
|
23
|
+
plate_width = 100e-3;
|
|
24
|
+
|
|
25
|
+
// Must be an integer
|
|
26
|
+
elem_order = 1;
|
|
27
|
+
mesh_ref = 1;
|
|
28
|
+
mesh_size = 5e-3/mesh_ref;
|
|
29
|
+
num_threads = 4;
|
|
30
|
+
//** MOOSEHERDER VARIABLES - END
|
|
31
|
+
//------------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
//------------------------------------------------------------------------------
|
|
34
|
+
// Calculated / Fixed Variables
|
|
35
|
+
tol = mesh_size/4; // Used for bounding box selection tolerance
|
|
36
|
+
|
|
37
|
+
//------------------------------------------------------------------------------
|
|
38
|
+
// Geometry Definition
|
|
39
|
+
s1 = news;
|
|
40
|
+
Rectangle(s1) =
|
|
41
|
+
{0.0,0.0,0.0,
|
|
42
|
+
plate_width,plate_height};
|
|
43
|
+
|
|
44
|
+
//------------------------------------------------------------------------------
|
|
45
|
+
// Mesh Sizing
|
|
46
|
+
MeshSize{ PointsOf{ Surface{:}; } } = mesh_size;
|
|
47
|
+
Transfinite Surface{Surface{:}};
|
|
48
|
+
//Recombine Surface{Surface{:}};
|
|
49
|
+
|
|
50
|
+
// Extrude{0.0,0.0,plate_thick}{
|
|
51
|
+
// Surface{:}; Layers{plate_thick_layers}; Recombine;
|
|
52
|
+
// }
|
|
53
|
+
|
|
54
|
+
//------------------------------------------------------------------------------
|
|
55
|
+
// Physical Volumes and Surfaces
|
|
56
|
+
Physical Surface("plate-surf") = {Surface{:}};
|
|
57
|
+
|
|
58
|
+
Physical Curve("bc-top") = {3};
|
|
59
|
+
Physical Curve("bc-base") = {1};
|
|
60
|
+
Physical Curve("bc-left") = {4};
|
|
61
|
+
Physical Curve("bc-right") = {2};
|
|
62
|
+
|
|
63
|
+
//------------------------------------------------------------------------------
|
|
64
|
+
// Global meshing
|
|
65
|
+
Mesh.Algorithm = 6;
|
|
66
|
+
Mesh.Algorithm3D = 10;
|
|
67
|
+
|
|
68
|
+
General.NumThreads = num_threads;
|
|
69
|
+
Mesh.MaxNumThreads1D = num_threads;
|
|
70
|
+
Mesh.MaxNumThreads2D = num_threads;
|
|
71
|
+
Mesh.MaxNumThreads3D = num_threads;
|
|
72
|
+
|
|
73
|
+
Mesh.ElementOrder = elem_order;
|
|
74
|
+
Mesh 2;
|
|
75
|
+
|
|
76
|
+
//------------------------------------------------------------------------------
|
|
77
|
+
// Save and exit
|
|
78
|
+
Save Str(file_name);
|
|
79
|
+
Exit;
|
pyvale/simcases/case24.i
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#-------------------------------------------------------------------------
|
|
2
|
+
# pyvale: simple,2Dplate,1mat,thermal,transient
|
|
3
|
+
#-------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
#-------------------------------------------------------------------------
|
|
6
|
+
#_* MOOSEHERDER VARIABLES - START
|
|
7
|
+
endTime = 200
|
|
8
|
+
timeStep = 5
|
|
9
|
+
|
|
10
|
+
# Thermal Loads/BCs
|
|
11
|
+
coolantTemp = 20.0 # degC
|
|
12
|
+
heatTransCoeff = 125.0e3 # W.m^-2.K^-1
|
|
13
|
+
surfHeatFlux = 500.0e3 # W.m^-2
|
|
14
|
+
timeConst = 1 # s
|
|
15
|
+
|
|
16
|
+
# Material Properties: Pure (OFHC) Copper at 250degC
|
|
17
|
+
cuDensity = 8829.0 # kg.m^-3
|
|
18
|
+
cuThermCond = 384.0 # W.m^-1.K^-1
|
|
19
|
+
cuSpecHeat = 406.0 # J.kg^-1.K^-1
|
|
20
|
+
|
|
21
|
+
#** MOOSEHERDER VARIABLES - END
|
|
22
|
+
#-------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
[Mesh]
|
|
25
|
+
type = FileMesh
|
|
26
|
+
file = 'case24.msh'
|
|
27
|
+
[]
|
|
28
|
+
|
|
29
|
+
[Variables]
|
|
30
|
+
[temperature]
|
|
31
|
+
initial_condition = ${coolantTemp}
|
|
32
|
+
[]
|
|
33
|
+
[]
|
|
34
|
+
|
|
35
|
+
[Kernels]
|
|
36
|
+
[heat_conduction]
|
|
37
|
+
type = HeatConduction
|
|
38
|
+
variable = temperature
|
|
39
|
+
[]
|
|
40
|
+
[time_derivative]
|
|
41
|
+
type = HeatConductionTimeDerivative
|
|
42
|
+
variable = temperature
|
|
43
|
+
[]
|
|
44
|
+
[]
|
|
45
|
+
|
|
46
|
+
[Materials]
|
|
47
|
+
[copper_thermal]
|
|
48
|
+
type = HeatConductionMaterial
|
|
49
|
+
thermal_conductivity = ${cuThermCond}
|
|
50
|
+
specific_heat = ${cuSpecHeat}
|
|
51
|
+
[]
|
|
52
|
+
[copper_density]
|
|
53
|
+
type = GenericConstantMaterial
|
|
54
|
+
prop_names = 'density'
|
|
55
|
+
prop_values = ${cuDensity}
|
|
56
|
+
[]
|
|
57
|
+
[]
|
|
58
|
+
|
|
59
|
+
[BCs]
|
|
60
|
+
[heat_flux_out_left]
|
|
61
|
+
type = ConvectiveHeatFluxBC
|
|
62
|
+
variable = temperature
|
|
63
|
+
boundary = 'bc-left'
|
|
64
|
+
T_infinity = ${coolantTemp}
|
|
65
|
+
heat_transfer_coefficient = ${heatTransCoeff}
|
|
66
|
+
[]
|
|
67
|
+
[heat_flux_in_right]
|
|
68
|
+
type = FunctionNeumannBC
|
|
69
|
+
variable = temperature
|
|
70
|
+
boundary = 'bc-right'
|
|
71
|
+
function = '${fparse surfHeatFlux}*(1-exp(-(1/${timeConst})*t))'
|
|
72
|
+
[]
|
|
73
|
+
[heat_flux_out_bot]
|
|
74
|
+
type = ConvectiveHeatFluxBC
|
|
75
|
+
variable = temperature
|
|
76
|
+
boundary = 'bc-base'
|
|
77
|
+
T_infinity = ${coolantTemp}
|
|
78
|
+
heat_transfer_coefficient = ${heatTransCoeff}
|
|
79
|
+
[]
|
|
80
|
+
[heat_flux_in_top]
|
|
81
|
+
type = FunctionNeumannBC
|
|
82
|
+
variable = temperature
|
|
83
|
+
boundary = 'bc-top'
|
|
84
|
+
function = '${fparse surfHeatFlux}*(1-exp(-(1/${timeConst})*t))'
|
|
85
|
+
[]
|
|
86
|
+
[]
|
|
87
|
+
|
|
88
|
+
[Executioner]
|
|
89
|
+
type = Transient
|
|
90
|
+
|
|
91
|
+
solve_type = PJFNK # PJNFK or NEWTON
|
|
92
|
+
l_max_its = 100 # default = 1000
|
|
93
|
+
l_tol = 1e-6 # default = 1e-5
|
|
94
|
+
nl_abs_tol = 1e-6 # default = 1e-50
|
|
95
|
+
nl_rel_tol = 1e-6 # default = 1e-8
|
|
96
|
+
|
|
97
|
+
petsc_options_iname = '-pc_type -pc_hypre_type'
|
|
98
|
+
petsc_options_value = 'hypre boomeramg'
|
|
99
|
+
|
|
100
|
+
start_time = 0.0
|
|
101
|
+
end_time = ${endTime}
|
|
102
|
+
dt = ${timeStep}
|
|
103
|
+
|
|
104
|
+
[Predictor]
|
|
105
|
+
type = SimplePredictor
|
|
106
|
+
scale = 1
|
|
107
|
+
[]
|
|
108
|
+
[]
|
|
109
|
+
|
|
110
|
+
[Postprocessors]
|
|
111
|
+
[max_temp]
|
|
112
|
+
type = NodalExtremeValue
|
|
113
|
+
variable = temperature
|
|
114
|
+
[]
|
|
115
|
+
[avg_temp]
|
|
116
|
+
type = AverageNodalVariableValue
|
|
117
|
+
variable = temperature
|
|
118
|
+
[]
|
|
119
|
+
[]
|
|
120
|
+
|
|
121
|
+
[Outputs]
|
|
122
|
+
exodus = true
|
|
123
|
+
[]
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
//==============================================================================
|
|
2
|
+
// Gmsh 3D simple block imaging test case
|
|
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 = 1;
|
|
10
|
+
|
|
11
|
+
// View options - not required when
|
|
12
|
+
Geometry.PointLabels = 1;
|
|
13
|
+
Geometry.CurveLabels = 1;
|
|
14
|
+
Geometry.SurfaceLabels = 1;
|
|
15
|
+
Geometry.VolumeLabels = 0;
|
|
16
|
+
|
|
17
|
+
//-------------------------------------------------------------------------
|
|
18
|
+
//_* MOOSEHERDER VARIABLES - START
|
|
19
|
+
file_name = "case25.msh";
|
|
20
|
+
|
|
21
|
+
// Geometric variables
|
|
22
|
+
plate_height = 15e-3;
|
|
23
|
+
plate_width = 10e-3;
|
|
24
|
+
plate_thick = 5e-3;
|
|
25
|
+
|
|
26
|
+
mesh_size = 5e-3/mesh_ref;
|
|
27
|
+
|
|
28
|
+
// Must be an integer
|
|
29
|
+
plate_thick_layers = 1;
|
|
30
|
+
elem_order = 1;
|
|
31
|
+
mesh_ref = 1;
|
|
32
|
+
num_threads = 4;
|
|
33
|
+
//** MOOSEHERDER VARIABLES - END
|
|
34
|
+
//------------------------------------------------------------------------------
|
|
35
|
+
|
|
36
|
+
//------------------------------------------------------------------------------
|
|
37
|
+
// Calculated / Fixed Variables
|
|
38
|
+
tol = mesh_size/4; // Used for bounding box selection tolerance
|
|
39
|
+
|
|
40
|
+
//------------------------------------------------------------------------------
|
|
41
|
+
// Geometry Definition
|
|
42
|
+
s1 = news;
|
|
43
|
+
Rectangle(s1) =
|
|
44
|
+
{0.0,0.0,0.0,
|
|
45
|
+
plate_width,plate_height};
|
|
46
|
+
|
|
47
|
+
//------------------------------------------------------------------------------
|
|
48
|
+
// Mesh Sizing
|
|
49
|
+
MeshSize{ PointsOf{ Surface{:}; } } = mesh_size;
|
|
50
|
+
Transfinite Surface{Surface{:}};
|
|
51
|
+
//Recombine Surface{Surface{:}};
|
|
52
|
+
|
|
53
|
+
Extrude{0.0,0.0,plate_thick}{
|
|
54
|
+
Surface{:}; Layers{plate_thick_layers}; // Recombine;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
//------------------------------------------------------------------------------
|
|
58
|
+
// Physical Volumes and Surfaces
|
|
59
|
+
Physical Volume("plate-vol") = {Volume{:}};
|
|
60
|
+
|
|
61
|
+
Physical Surface("plate-surf-vis-front") = {6};
|
|
62
|
+
Physical Surface("plate-surf-vis-back") = {1};
|
|
63
|
+
Physical Surface("bc-top-disp") = {4};
|
|
64
|
+
Physical Surface("bc-base-disp") = {2};
|
|
65
|
+
|
|
66
|
+
//------------------------------------------------------------------------------
|
|
67
|
+
// Global meshing
|
|
68
|
+
Mesh.Algorithm = 6;
|
|
69
|
+
Mesh.Algorithm3D = 10;
|
|
70
|
+
|
|
71
|
+
General.NumThreads = num_threads;
|
|
72
|
+
Mesh.MaxNumThreads1D = num_threads;
|
|
73
|
+
Mesh.MaxNumThreads2D = num_threads;
|
|
74
|
+
Mesh.MaxNumThreads3D = num_threads;
|
|
75
|
+
|
|
76
|
+
Mesh.ElementOrder = elem_order;
|
|
77
|
+
Mesh 3;
|
|
78
|
+
|
|
79
|
+
//------------------------------------------------------------------------------
|
|
80
|
+
// Save and exit
|
|
81
|
+
Save Str(file_name);
|
|
82
|
+
Exit;
|