pyvale 2025.5.3__cp311-cp311-manylinux_2_17_x86_64.manylinux2014_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.

Files changed (175) 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-x86_64-linux-gnu.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 +175 -0
  172. pyvale-2025.5.3.dist-info/WHEEL +6 -0
  173. pyvale-2025.5.3.dist-info/licenses/LICENSE +21 -0
  174. pyvale-2025.5.3.dist-info/top_level.txt +1 -0
  175. pyvale.libs/libgomp-a34b3233.so.1.0.0 +0 -0
@@ -0,0 +1,135 @@
1
+ //==============================================================================
2
+ // Gmsh 2D parametric plate 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 = 0;
10
+
11
+ // View options - not required when
12
+ Geometry.PointLabels = 0;
13
+ Geometry.CurveLabels = 0;
14
+ Geometry.SurfaceLabels = 0;
15
+ Geometry.VolumeLabels = 0;
16
+
17
+ //------------------------------------------------------------------------------
18
+ // Variables
19
+ file_name = "case07.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
+
26
+ hole_rad = 25e-3/2;
27
+ hole_loc_x = plate_width/2;
28
+ hole_loc_y = plate_height/2;
29
+ hole_circ = 2*Pi*hole_rad;
30
+
31
+ // Mesh variables
32
+ hole_sect_nodes = 9; // Must be odd
33
+ plate_rad_nodes = 9;
34
+ plate_diff_nodes = 5; // numbers of nodes along the rectangular extension
35
+ plate_edge_nodes = Floor((hole_sect_nodes-1)/2)+1;
36
+ elem_size = hole_circ/(4*(hole_sect_nodes-1));
37
+ tol = elem_size; // Used for bounding box selection tolerance
38
+
39
+ //------------------------------------------------------------------------------
40
+ // Geometry Definition
41
+
42
+ // Split plate into eight pieces with a square around the hole to allow spider
43
+ // web meshing around the hole
44
+ s1 = news;
45
+ Rectangle(s1) = {0.0,0.0,0.0,
46
+ plate_width/2,plate_diff/2};
47
+ s2 = news;
48
+ Rectangle(s2) = {plate_width/2,0.0,0.0,
49
+ plate_width/2,plate_diff/2};
50
+
51
+ s3 = news;
52
+ Rectangle(s3) = {0.0,plate_diff/2,0.0,
53
+ plate_width/2,plate_width/2};
54
+ s4 = news;
55
+ Rectangle(s4) = {plate_width/2,plate_diff/2,0.0,
56
+ plate_width/2,plate_width/2};
57
+
58
+ s5 = news;
59
+ Rectangle(s5) = {0.0,plate_width/2+plate_diff/2,0.0,
60
+ plate_width/2,plate_width/2};
61
+ s6 = news;
62
+ Rectangle(s6) = {plate_width/2,plate_width/2+plate_diff/2,0.0,
63
+ plate_width/2,plate_width/2};
64
+
65
+ s7 = news;
66
+ Rectangle(s7) = {0.0,plate_height-plate_diff/2,0.0,
67
+ plate_width/2,plate_diff/2};
68
+ s8 = news;
69
+ Rectangle(s8) = {plate_width/2,plate_height-plate_diff/2,0.0,
70
+ plate_width/2,plate_diff/2};
71
+
72
+ // Merge coincicent edges of the four overlapping squares
73
+ BooleanFragments{ Surface{s1}; Delete; }
74
+ { Surface{s2,s3,s4,s5,s6,s7,s8}; Delete; }
75
+
76
+
77
+ // Create the hole surface
78
+ c2 = newc; Circle(c2) = {hole_loc_x,hole_loc_y,0.0,hole_rad};
79
+ cl2 = newcl; Curve Loop(cl2) = {c2};
80
+ s9 = news; Plane Surface(s9) = {cl2};
81
+ // Bore out the hole from the quarters of the plate
82
+ BooleanDifference{ Surface{s3,s4,s5,s6}; Delete; }{ Surface{s9}; Delete; }
83
+
84
+
85
+ //------------------------------------------------------------------------------
86
+ // Transfinite meshing (line element sizes and mapped meshing)
87
+ Transfinite Curve{31,24,26,28} = plate_rad_nodes;
88
+ Transfinite Curve{1,5,3,7,23,29,30,34,14,17,19,22} = plate_edge_nodes;
89
+ Transfinite Curve{32,33,25,27} = hole_sect_nodes;
90
+ Transfinite Curve{4,2,6,20,18,21} = plate_diff_nodes;
91
+
92
+ // NOTE: recombine surface turns default triangles into quads
93
+
94
+ Transfinite Surface{s1} = {1,2,3,4};
95
+ Recombine Surface{s1};
96
+ Transfinite Surface{s2} = {2,5,6,3};
97
+ Recombine Surface{s2};
98
+
99
+ Transfinite Surface{s3} = {17,18,3,16};
100
+ Recombine Surface{s3};
101
+ Transfinite Surface{s4} = {18,19,20,3};
102
+ Recombine Surface{s4};
103
+ Transfinite Surface{s5} = {17,21,10,16};
104
+ Recombine Surface{s5};
105
+ Transfinite Surface{s6} = {19,21,10,20};
106
+ Recombine Surface{s6};
107
+
108
+ Transfinite Surface{s7} = {11,10,13,14};
109
+ Recombine Surface{s7};
110
+ Transfinite Surface{s8} = {10,12,15,13};
111
+ Recombine Surface{s8};
112
+
113
+ //------------------------------------------------------------------------------
114
+ // Physical lines and surfaces for export/BCs
115
+ Physical Surface("plate") = {Surface{:}};
116
+
117
+ pc1() = Curve In BoundingBox{
118
+ 0.0-tol,0.0-tol,0.0-tol,
119
+ plate_width+tol,0.0+tol,0.0+tol};
120
+ Physical Curve("bc-base") = {pc1(0),pc1(1)};
121
+
122
+ pc2() = Curve In BoundingBox{
123
+ 0.0-tol,plate_height-tol,0.0-tol,
124
+ plate_width+tol,plate_height+tol,0.0+tol};
125
+ Physical Curve("bc-top") = {pc2(0),pc2(1)};
126
+
127
+ //------------------------------------------------------------------------------
128
+ // Global meshing
129
+ Mesh.ElementOrder = 2;
130
+ Mesh 2;
131
+
132
+ //------------------------------------------------------------------------------
133
+ // Save and exit
134
+ Save Str(file_name);
135
+ Exit;
@@ -0,0 +1,87 @@
1
+ #-------------------------------------------------------------------------
2
+ # pyvale: simple,2DplateWHole,1mat,thermal,steady,
3
+ #-------------------------------------------------------------------------
4
+
5
+ #-------------------------------------------------------------------------
6
+ #_* MOOSEHERDER VARIABLES - START
7
+
8
+ # Thermal Loads/BCs
9
+ coolantTemp = 20.0 # degC
10
+ heatTransCoeff = 125.0e3 # W.m^-2.K^-1
11
+ surfHeatFlux = 500.0e3 # W.m^-2
12
+
13
+ # Material Properties: Pure (OFHC) Copper at 250degC
14
+ cuDensity = 8829.0 # kg.m^-3
15
+ cuThermCond = 384.0 # W.m^-1.K^-1
16
+ cuSpecHeat = 406.0 # J.kg^-1.K^-1
17
+
18
+ #** MOOSEHERDER VARIABLES - END
19
+ #-------------------------------------------------------------------------
20
+
21
+ [Mesh]
22
+ type = FileMesh
23
+ file = 'case07.msh'
24
+ []
25
+
26
+ [Variables]
27
+ [temperature]
28
+ initial_condition = ${coolantTemp}
29
+ []
30
+ []
31
+
32
+ [Kernels]
33
+ [heat_conduction]
34
+ type = HeatConduction
35
+ variable = temperature
36
+ []
37
+ []
38
+
39
+ [Materials]
40
+ [copper_thermal]
41
+ type = HeatConductionMaterial
42
+ thermal_conductivity = ${cuThermCond}
43
+ specific_heat = ${cuSpecHeat}
44
+ []
45
+ [copper_density]
46
+ type = GenericConstantMaterial
47
+ prop_names = 'density'
48
+ prop_values = ${cuDensity}
49
+ []
50
+ []
51
+
52
+ [BCs]
53
+ [heat_flux_out]
54
+ type = ConvectiveHeatFluxBC
55
+ variable = temperature
56
+ boundary = 'bc-base'
57
+ T_infinity = ${coolantTemp}
58
+ heat_transfer_coefficient = ${heatTransCoeff}
59
+ []
60
+ [heat_flux_in]
61
+ type = NeumannBC
62
+ variable = temperature
63
+ boundary = 'bc-top'
64
+ value = ${surfHeatFlux}
65
+ []
66
+ []
67
+
68
+ [Executioner]
69
+ type = Steady
70
+ #end_time= ${endTime}
71
+ #dt = ${timeStep}
72
+ []
73
+
74
+ [Postprocessors]
75
+ [temp_max]
76
+ type = NodalExtremeValue
77
+ variable = temperature
78
+ []
79
+ [temp_avg]
80
+ type = AverageNodalVariableValue
81
+ variable = temperature
82
+ []
83
+ []
84
+
85
+ [Outputs]
86
+ exodus = true
87
+ []
@@ -0,0 +1,144 @@
1
+ //==============================================================================
2
+ // Gmsh 3D parametric rectangular 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 = 0;
10
+
11
+ // View options - not required when
12
+ Geometry.PointLabels = 0;
13
+ Geometry.CurveLabels = 0;
14
+ Geometry.SurfaceLabels = 0;
15
+ Geometry.VolumeLabels = 0;
16
+
17
+ //------------------------------------------------------------------------------
18
+ // Variables
19
+ file_name = "case08.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 = 5e-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
+ hole_sect_nodes = 9; // Must be odd
34
+ plate_rad_nodes = 9;
35
+ plate_diff_nodes = 5; // numbers of nodes along the rectangular extension
36
+ plate_thick_divs = 2; // using quadratic elements so 2 through thickness should be ok
37
+
38
+ plate_edge_nodes = Floor((hole_sect_nodes-1)/2)+1;
39
+ elem_size = hole_circ/(4*(hole_sect_nodes-1));
40
+ tol = elem_size; // Used for bounding box selection tolerance
41
+
42
+ //------------------------------------------------------------------------------
43
+ // Geometry Definition
44
+
45
+ // Split plate into eight pieces with a square around the hole to allow spider
46
+ // web meshing around the hole
47
+ s1 = news;
48
+ Rectangle(s1) = {0.0,0.0,0.0,
49
+ plate_width/2,plate_diff/2};
50
+ s2 = news;
51
+ Rectangle(s2) = {plate_width/2,0.0,0.0,
52
+ plate_width/2,plate_diff/2};
53
+
54
+ s3 = news;
55
+ Rectangle(s3) = {0.0,plate_diff/2,0.0,
56
+ plate_width/2,plate_width/2};
57
+ s4 = news;
58
+ Rectangle(s4) = {plate_width/2,plate_diff/2,0.0,
59
+ plate_width/2,plate_width/2};
60
+
61
+ s5 = news;
62
+ Rectangle(s5) = {0.0,plate_width/2+plate_diff/2,0.0,
63
+ plate_width/2,plate_width/2};
64
+ s6 = news;
65
+ Rectangle(s6) = {plate_width/2,plate_width/2+plate_diff/2,0.0,
66
+ plate_width/2,plate_width/2};
67
+
68
+ s7 = news;
69
+ Rectangle(s7) = {0.0,plate_height-plate_diff/2,0.0,
70
+ plate_width/2,plate_diff/2};
71
+ s8 = news;
72
+ Rectangle(s8) = {plate_width/2,plate_height-plate_diff/2,0.0,
73
+ plate_width/2,plate_diff/2};
74
+
75
+ // Merge coincicent edges of the four overlapping squares
76
+ BooleanFragments{ Surface{s1}; Delete; }
77
+ { Surface{s2,s3,s4,s5,s6,s7,s8}; Delete; }
78
+
79
+
80
+ // Create the hole surface
81
+ c2 = newc; Circle(c2) = {hole_loc_x,hole_loc_y,0.0,hole_rad};
82
+ cl2 = newcl; Curve Loop(cl2) = {c2};
83
+ s9 = news; Plane Surface(s9) = {cl2};
84
+ // Bore out the hole from the quarters of the plate
85
+ BooleanDifference{ Surface{s3,s4,s5,s6}; Delete; }{ Surface{s9}; Delete; }
86
+
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
+ //------------------------------------------------------------------------------
117
+ // Extrude the surface mesh to 3D
118
+ Extrude{0.0,0.0,plate_thick}{
119
+ Surface{:}; Layers{plate_thick_divs}; Recombine;
120
+ }
121
+
122
+ //------------------------------------------------------------------------------
123
+ // Physical surfaces and volumes for export/BCs
124
+ Physical Volume("plate") = {Volume{:}};
125
+
126
+ ps1() = Surface In BoundingBox{
127
+ 0.0-tol,0.0-tol,0.0-tol,
128
+ plate_width+tol,0.0+tol,plate_thick+tol};
129
+ Physical Surface("bc-base") = {ps1(0),ps1(1)};
130
+
131
+ ps2() = Surface In BoundingBox{
132
+ 0.0-tol,plate_height-tol,0.0-tol,
133
+ plate_width+tol,plate_height+tol,plate_thick+tol};
134
+ Physical Surface("bc-top") = {ps2(0),ps2(1)};
135
+
136
+ //------------------------------------------------------------------------------
137
+ // Global meshing
138
+ Mesh.ElementOrder = 2;
139
+ Mesh 3;
140
+
141
+ //------------------------------------------------------------------------------
142
+ // Save and exit
143
+ Save Str(file_name);
144
+ Exit;
@@ -0,0 +1,153 @@
1
+ #-------------------------------------------------------------------------
2
+ # pyvale: simple,3DplateWHole,mechanical,steady,
3
+ #-------------------------------------------------------------------------
4
+ # NOTE: default 2D MOOSE solid mechanics is plane strain
5
+
6
+ #-------------------------------------------------------------------------
7
+ #_* MOOSEHERDER VARIABLES - START
8
+
9
+ # Mechanical Loads/BCs
10
+ topDisp = 0.1e-3 # m
11
+ # tensLoad = 10e6 # Pa
12
+
13
+ # Material Properties: OFHC Copper 250degC
14
+ cuEMod= 108e9 # Pa
15
+ cuPRatio = 0.33 # -
16
+
17
+ #** MOOSEHERDER VARIABLES - END
18
+ #-------------------------------------------------------------------------
19
+
20
+ [GlobalParams]
21
+ displacements = 'disp_x disp_y disp_z'
22
+ []
23
+
24
+ [Mesh]
25
+ type = FileMesh
26
+ file = 'case08.msh'
27
+ []
28
+
29
+ [Modules/TensorMechanics/Master]
30
+ [all]
31
+ strain = SMALL
32
+ incremental = true
33
+ add_variables = true
34
+ material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
35
+ material_output_order = FIRST # CONSTANT, FIRST, SECOND,
36
+ generate_output = 'vonmises_stress stress_xx stress_yy stress_xy strain_xx strain_yy strain_xy'
37
+ []
38
+ []
39
+
40
+ [BCs]
41
+ [bottom_x]
42
+ type = DirichletBC
43
+ variable = disp_x
44
+ boundary = 'bc-base'
45
+ value = 0
46
+ []
47
+ [bottom_y]
48
+ type = DirichletBC
49
+ variable = disp_y
50
+ boundary = 'bc-base'
51
+ value = 0
52
+ []
53
+ [bottom_z]
54
+ type = DirichletBC
55
+ variable = disp_z
56
+ boundary = 'bc-base'
57
+ value = 0
58
+ []
59
+
60
+ [top_y]
61
+ type = DirichletBC
62
+ variable = disp_y
63
+ boundary = 'bc-top'
64
+ value = ${topDisp}
65
+ []
66
+ [top_x]
67
+ type = DirichletBC
68
+ variable = disp_x
69
+ boundary = 'bc-top'
70
+ value = 0
71
+ []
72
+ [top_z]
73
+ type = DirichletBC
74
+ variable = disp_z
75
+ boundary = 'bc-top'
76
+ value = 0
77
+ []
78
+ []
79
+
80
+ [Materials]
81
+ [elasticity]
82
+ type = ComputeIsotropicElasticityTensor
83
+ youngs_modulus = ${cuEMod}
84
+ poissons_ratio = ${cuPRatio}
85
+ []
86
+ [stress]
87
+ type = ComputeFiniteStrainElasticStress
88
+ []
89
+ []
90
+
91
+ [Preconditioning]
92
+ [SMP]
93
+ type = SMP
94
+ full = true
95
+ []
96
+ []
97
+
98
+ [Executioner]
99
+ type = Steady
100
+ solve_type = 'PJFNK'
101
+ petsc_options_iname = '-pc_type -pc_hypre_type'
102
+ petsc_options_value = 'hypre boomeramg'
103
+ #end_time= ${endTime}
104
+ #dt = ${timeStep}
105
+ []
106
+
107
+
108
+ [Postprocessors]
109
+ [react_y_bot]
110
+ type = SidesetReaction
111
+ direction = '0 1 0'
112
+ stress_tensor = stress
113
+ boundary = 'bc-base'
114
+ []
115
+ [react_y_top]
116
+ type = SidesetReaction
117
+ direction = '0 1 0'
118
+ stress_tensor = stress
119
+ boundary = 'bc-top'
120
+ []
121
+
122
+ [disp_y_max]
123
+ type = NodalExtremeValue
124
+ variable = disp_y
125
+ []
126
+ [disp_x_max]
127
+ type = NodalExtremeValue
128
+ variable = disp_x
129
+ []
130
+
131
+ [max_yy_stress]
132
+ type = ElementExtremeValue
133
+ variable = stress_yy
134
+ []
135
+
136
+ [strain_yy_avg]
137
+ type = ElementAverageValue
138
+ variable = strain_yy
139
+ []
140
+ [strain_xx_avg]
141
+ type = ElementAverageValue
142
+ variable = strain_xx
143
+ []
144
+
145
+ [stress_vm_max]
146
+ type = ElementExtremeValue
147
+ variable = vonmises_stress
148
+ []
149
+ []
150
+
151
+ [Outputs]
152
+ exodus = true
153
+ []