pyvale 2025.5.3__cp311-cp311-musllinux_1_2_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (174) hide show
  1. pyvale/__init__.py +89 -0
  2. pyvale/analyticmeshgen.py +102 -0
  3. pyvale/analyticsimdatafactory.py +91 -0
  4. pyvale/analyticsimdatagenerator.py +323 -0
  5. pyvale/blendercalibrationdata.py +15 -0
  6. pyvale/blenderlightdata.py +26 -0
  7. pyvale/blendermaterialdata.py +15 -0
  8. pyvale/blenderrenderdata.py +30 -0
  9. pyvale/blenderscene.py +488 -0
  10. pyvale/blendertools.py +420 -0
  11. pyvale/camera.py +146 -0
  12. pyvale/cameradata.py +69 -0
  13. pyvale/cameradata2d.py +84 -0
  14. pyvale/camerastereo.py +217 -0
  15. pyvale/cameratools.py +522 -0
  16. pyvale/cython/rastercyth.c +32211 -0
  17. pyvale/cython/rastercyth.cpython-311-aarch64-linux-musl.so +0 -0
  18. pyvale/cython/rastercyth.py +640 -0
  19. pyvale/data/__init__.py +5 -0
  20. pyvale/data/cal_target.tiff +0 -0
  21. pyvale/data/case00_HEX20_out.e +0 -0
  22. pyvale/data/case00_HEX27_out.e +0 -0
  23. pyvale/data/case00_HEX8_out.e +0 -0
  24. pyvale/data/case00_TET10_out.e +0 -0
  25. pyvale/data/case00_TET14_out.e +0 -0
  26. pyvale/data/case00_TET4_out.e +0 -0
  27. pyvale/data/case13_out.e +0 -0
  28. pyvale/data/case16_out.e +0 -0
  29. pyvale/data/case17_out.e +0 -0
  30. pyvale/data/case18_1_out.e +0 -0
  31. pyvale/data/case18_2_out.e +0 -0
  32. pyvale/data/case18_3_out.e +0 -0
  33. pyvale/data/case25_out.e +0 -0
  34. pyvale/data/case26_out.e +0 -0
  35. pyvale/data/optspeckle_2464x2056px_spec5px_8bit_gblur1px.tiff +0 -0
  36. pyvale/dataset.py +325 -0
  37. pyvale/errorcalculator.py +109 -0
  38. pyvale/errordriftcalc.py +146 -0
  39. pyvale/errorintegrator.py +336 -0
  40. pyvale/errorrand.py +607 -0
  41. pyvale/errorsyscalib.py +134 -0
  42. pyvale/errorsysdep.py +327 -0
  43. pyvale/errorsysfield.py +414 -0
  44. pyvale/errorsysindep.py +808 -0
  45. pyvale/examples/__init__.py +5 -0
  46. pyvale/examples/basics/ex1_1_basicscalars_therm2d.py +131 -0
  47. pyvale/examples/basics/ex1_2_sensormodel_therm2d.py +158 -0
  48. pyvale/examples/basics/ex1_3_customsens_therm3d.py +216 -0
  49. pyvale/examples/basics/ex1_4_basicerrors_therm3d.py +153 -0
  50. pyvale/examples/basics/ex1_5_fielderrs_therm3d.py +168 -0
  51. pyvale/examples/basics/ex1_6_caliberrs_therm2d.py +133 -0
  52. pyvale/examples/basics/ex1_7_spatavg_therm2d.py +123 -0
  53. pyvale/examples/basics/ex2_1_basicvectors_disp2d.py +112 -0
  54. pyvale/examples/basics/ex2_2_vectorsens_disp2d.py +111 -0
  55. pyvale/examples/basics/ex2_3_sensangle_disp2d.py +139 -0
  56. pyvale/examples/basics/ex2_4_chainfielderrs_disp2d.py +196 -0
  57. pyvale/examples/basics/ex2_5_vectorfields3d_disp3d.py +109 -0
  58. pyvale/examples/basics/ex3_1_basictensors_strain2d.py +114 -0
  59. pyvale/examples/basics/ex3_2_tensorsens2d_strain2d.py +111 -0
  60. pyvale/examples/basics/ex3_3_tensorsens3d_strain3d.py +182 -0
  61. pyvale/examples/basics/ex4_1_expsim2d_thermmech2d.py +171 -0
  62. pyvale/examples/basics/ex4_2_expsim3d_thermmech3d.py +252 -0
  63. pyvale/examples/genanalyticdata/ex1_1_scalarvisualisation.py +35 -0
  64. pyvale/examples/genanalyticdata/ex1_2_scalarcasebuild.py +43 -0
  65. pyvale/examples/genanalyticdata/ex2_1_analyticsensors.py +80 -0
  66. pyvale/examples/imagedef2d/ex_imagedef2d_todisk.py +79 -0
  67. pyvale/examples/renderblender/ex1_1_blenderscene.py +121 -0
  68. pyvale/examples/renderblender/ex1_2_blenderdeformed.py +119 -0
  69. pyvale/examples/renderblender/ex2_1_stereoscene.py +128 -0
  70. pyvale/examples/renderblender/ex2_2_stereodeformed.py +131 -0
  71. pyvale/examples/renderblender/ex3_1_blendercalibration.py +120 -0
  72. pyvale/examples/renderrasterisation/ex_rastenp.py +153 -0
  73. pyvale/examples/renderrasterisation/ex_rastercyth_oneframe.py +218 -0
  74. pyvale/examples/renderrasterisation/ex_rastercyth_static_cypara.py +187 -0
  75. pyvale/examples/renderrasterisation/ex_rastercyth_static_pypara.py +190 -0
  76. pyvale/examples/visualisation/ex1_1_plot_traces.py +102 -0
  77. pyvale/examples/visualisation/ex2_1_animate_sim.py +89 -0
  78. pyvale/experimentsimulator.py +175 -0
  79. pyvale/field.py +128 -0
  80. pyvale/fieldconverter.py +351 -0
  81. pyvale/fieldsampler.py +111 -0
  82. pyvale/fieldscalar.py +166 -0
  83. pyvale/fieldtensor.py +218 -0
  84. pyvale/fieldtransform.py +388 -0
  85. pyvale/fieldvector.py +213 -0
  86. pyvale/generatorsrandom.py +505 -0
  87. pyvale/imagedef2d.py +569 -0
  88. pyvale/integratorfactory.py +240 -0
  89. pyvale/integratorquadrature.py +217 -0
  90. pyvale/integratorrectangle.py +165 -0
  91. pyvale/integratorspatial.py +89 -0
  92. pyvale/integratortype.py +43 -0
  93. pyvale/output.py +17 -0
  94. pyvale/pyvaleexceptions.py +11 -0
  95. pyvale/raster.py +31 -0
  96. pyvale/rastercy.py +77 -0
  97. pyvale/rasternp.py +603 -0
  98. pyvale/rendermesh.py +147 -0
  99. pyvale/sensorarray.py +178 -0
  100. pyvale/sensorarrayfactory.py +196 -0
  101. pyvale/sensorarraypoint.py +278 -0
  102. pyvale/sensordata.py +71 -0
  103. pyvale/sensordescriptor.py +213 -0
  104. pyvale/sensortools.py +142 -0
  105. pyvale/simcases/case00_HEX20.i +242 -0
  106. pyvale/simcases/case00_HEX27.i +242 -0
  107. pyvale/simcases/case00_HEX8.i +242 -0
  108. pyvale/simcases/case00_TET10.i +242 -0
  109. pyvale/simcases/case00_TET14.i +242 -0
  110. pyvale/simcases/case00_TET4.i +242 -0
  111. pyvale/simcases/case01.i +101 -0
  112. pyvale/simcases/case02.i +156 -0
  113. pyvale/simcases/case03.i +136 -0
  114. pyvale/simcases/case04.i +181 -0
  115. pyvale/simcases/case05.i +234 -0
  116. pyvale/simcases/case06.i +305 -0
  117. pyvale/simcases/case07.geo +135 -0
  118. pyvale/simcases/case07.i +87 -0
  119. pyvale/simcases/case08.geo +144 -0
  120. pyvale/simcases/case08.i +153 -0
  121. pyvale/simcases/case09.geo +204 -0
  122. pyvale/simcases/case09.i +87 -0
  123. pyvale/simcases/case10.geo +204 -0
  124. pyvale/simcases/case10.i +257 -0
  125. pyvale/simcases/case11.geo +337 -0
  126. pyvale/simcases/case11.i +147 -0
  127. pyvale/simcases/case12.geo +388 -0
  128. pyvale/simcases/case12.i +329 -0
  129. pyvale/simcases/case13.i +140 -0
  130. pyvale/simcases/case14.i +159 -0
  131. pyvale/simcases/case15.geo +337 -0
  132. pyvale/simcases/case15.i +150 -0
  133. pyvale/simcases/case16.geo +391 -0
  134. pyvale/simcases/case16.i +357 -0
  135. pyvale/simcases/case17.geo +135 -0
  136. pyvale/simcases/case17.i +144 -0
  137. pyvale/simcases/case18.i +254 -0
  138. pyvale/simcases/case18_1.i +254 -0
  139. pyvale/simcases/case18_2.i +254 -0
  140. pyvale/simcases/case18_3.i +254 -0
  141. pyvale/simcases/case19.geo +252 -0
  142. pyvale/simcases/case19.i +99 -0
  143. pyvale/simcases/case20.geo +252 -0
  144. pyvale/simcases/case20.i +250 -0
  145. pyvale/simcases/case21.geo +74 -0
  146. pyvale/simcases/case21.i +155 -0
  147. pyvale/simcases/case22.geo +82 -0
  148. pyvale/simcases/case22.i +140 -0
  149. pyvale/simcases/case23.geo +164 -0
  150. pyvale/simcases/case23.i +140 -0
  151. pyvale/simcases/case24.geo +79 -0
  152. pyvale/simcases/case24.i +123 -0
  153. pyvale/simcases/case25.geo +82 -0
  154. pyvale/simcases/case25.i +140 -0
  155. pyvale/simcases/case26.geo +166 -0
  156. pyvale/simcases/case26.i +140 -0
  157. pyvale/simcases/run_1case.py +61 -0
  158. pyvale/simcases/run_all_cases.py +69 -0
  159. pyvale/simcases/run_build_case.py +64 -0
  160. pyvale/simcases/run_example_cases.py +69 -0
  161. pyvale/simtools.py +67 -0
  162. pyvale/visualexpplotter.py +191 -0
  163. pyvale/visualimagedef.py +74 -0
  164. pyvale/visualimages.py +76 -0
  165. pyvale/visualopts.py +493 -0
  166. pyvale/visualsimanimator.py +111 -0
  167. pyvale/visualsimsensors.py +318 -0
  168. pyvale/visualtools.py +136 -0
  169. pyvale/visualtraceplotter.py +142 -0
  170. pyvale-2025.5.3.dist-info/METADATA +144 -0
  171. pyvale-2025.5.3.dist-info/RECORD +174 -0
  172. pyvale-2025.5.3.dist-info/WHEEL +5 -0
  173. pyvale-2025.5.3.dist-info/licenses/LICENSE +21 -0
  174. pyvale-2025.5.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,242 @@
1
+ #-------------------------------------------------------------------------
2
+ # pyvale: single element test 3D
3
+ #-------------------------------------------------------------------------
4
+
5
+ #-------------------------------------------------------------------------
6
+ #_* MOOSEHERDER VARIABLES - START
7
+
8
+ endTime = 20
9
+ timeStep = 1
10
+
11
+ # Geometric Properties
12
+ lengX = 10e-3 # m
13
+ lengY = 10e-3 # m
14
+ lengZ = 10e-3 # m
15
+
16
+ # Mesh Properties
17
+ nElemX = 1
18
+ nElemY = 1
19
+ nElemZ = 1
20
+ eType = TET4 # TET4, TET10, TET11, HEX8, HEX20, HEX27
21
+
22
+ # Thermal BCs
23
+ coolantTemp=100.0 # degC
24
+ heatTransCoeff=125.0e3 # W.m^-2.K^-1
25
+ surfHeatFlux=4.67e6 # W.m^-2, taken from Adel's first paper
26
+ timeConst = 1 # s
27
+
28
+ # Mechanical Loads/BCs
29
+ topDispRate = ${fparse 1e-3 / endTime} # m/s
30
+
31
+ # Thermal Props:
32
+ Density = 8829.0 # kg.m^-3
33
+ ThermCond = 384.0 # W.m^-1.K^-1
34
+ SpecHeat = 406.0 # J.kg^-1.K^-1
35
+
36
+ # Material Properties:
37
+ EMod= 100e9 # Pa
38
+ PRatio = 0.33 # -
39
+
40
+ # Thermo-mechanical coupling
41
+ stressFreeTemp = 20 # degC
42
+ ThermExp = 17.8e-6 # 1/degC
43
+
44
+ #** MOOSEHERDER VARIABLES - END
45
+ #-------------------------------------------------------------------------
46
+
47
+ [GlobalParams]
48
+ displacements = 'disp_x disp_y disp_z'
49
+ []
50
+
51
+ [Mesh]
52
+ [generated]
53
+ type = GeneratedMeshGenerator
54
+ dim = 3
55
+ nx = ${nElemX}
56
+ ny = ${nElemY}
57
+ nz = ${nElemZ}
58
+ xmax = ${lengX}
59
+ ymax = ${lengY}
60
+ zmax = ${lengZ}
61
+ elem_type = ${eType}
62
+ []
63
+ []
64
+
65
+ [Variables]
66
+ [temperature]
67
+ family = LAGRANGE
68
+ order = FIRST
69
+ initial_condition = ${coolantTemp}
70
+ []
71
+ []
72
+
73
+ [Kernels]
74
+ [heat_conduction]
75
+ type = HeatConduction
76
+ variable = temperature
77
+ []
78
+ [time_derivative]
79
+ type = HeatConductionTimeDerivative
80
+ variable = temperature
81
+ []
82
+ []
83
+
84
+
85
+ [Physics/SolidMechanics/QuasiStatic]
86
+ [all]
87
+ strain = SMALL
88
+ incremental = true
89
+ add_variables = true
90
+ material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
91
+ material_output_order = FIRST # CONSTANT, FIRST, SECOND,
92
+ generate_output = 'strain_xx strain_yy strain_zz strain_xy strain_yz strain_xz'
93
+ []
94
+ []
95
+
96
+ [BCs]
97
+ [heat_flux_in]
98
+ type = FunctionNeumannBC
99
+ variable = temperature
100
+ boundary = 'top'
101
+ function = '${fparse surfHeatFlux}*(1-exp(-(1/${timeConst})*t))'
102
+ []
103
+ [heat_flux_out]
104
+ type = ConvectiveHeatFluxBC
105
+ variable = temperature
106
+ boundary = 'bottom'
107
+ T_infinity = ${coolantTemp}
108
+ heat_transfer_coefficient = ${heatTransCoeff}
109
+ []
110
+
111
+ [bottom_x]
112
+ type = DirichletBC
113
+ variable = disp_x
114
+ boundary = 'bottom'
115
+ value = 0.0
116
+ []
117
+ [bottom_y]
118
+ type = DirichletBC
119
+ variable = disp_y
120
+ boundary = 'bottom'
121
+ value = 0.0
122
+ []
123
+ [bottom_z]
124
+ type = DirichletBC
125
+ variable = disp_z
126
+ boundary = 'bottom'
127
+ value = 0.0
128
+ []
129
+ [top_x]
130
+ type = DirichletBC
131
+ variable = disp_x
132
+ boundary = 'top'
133
+ value = 0.0
134
+ []
135
+ [top_y]
136
+ type = FunctionDirichletBC
137
+ variable = disp_y
138
+ boundary = 'top'
139
+ function = '${topDispRate}*t'
140
+ []
141
+ [top_z]
142
+ type = DirichletBC
143
+ variable = disp_z
144
+ boundary = 'top'
145
+ value = 0.0
146
+ []
147
+ []
148
+
149
+ [Materials]
150
+ [mat_thermal]
151
+ type = HeatConductionMaterial
152
+ thermal_conductivity = ${ThermCond}
153
+ specific_heat = ${SpecHeat}
154
+ []
155
+ [mat_density]
156
+ type = GenericConstantMaterial
157
+ prop_names = 'density'
158
+ prop_values = ${Density}
159
+ []
160
+ [mat_expansion]
161
+ type = ComputeThermalExpansionEigenstrain
162
+ temperature = temperature
163
+ stress_free_temperature = ${stressFreeTemp}
164
+ thermal_expansion_coeff = ${ThermExp}
165
+ eigenstrain_name = thermal_expansion_eigenstrain
166
+ []
167
+
168
+ [mat_elasticity]
169
+ type = ComputeIsotropicElasticityTensor
170
+ youngs_modulus = ${EMod}
171
+ poissons_ratio = ${PRatio}
172
+ []
173
+ [stress]
174
+ type = ComputeFiniteStrainElasticStress
175
+ []
176
+ []
177
+
178
+ [Preconditioning]
179
+ [SMP]
180
+ type = SMP
181
+ full = true
182
+ []
183
+ []
184
+
185
+ [Executioner]
186
+ type = Transient
187
+
188
+ solve_type = 'NEWTON'
189
+ petsc_options = '-snes_converged_reason'
190
+ petsc_options_iname = '-pc_type -pc_hypre_type'
191
+ petsc_options_value = 'hypre boomeramg'
192
+
193
+ l_max_its = 1000
194
+ l_tol = 1e-6
195
+
196
+ nl_max_its = 50
197
+ nl_rel_tol = 1e-6
198
+ nl_abs_tol = 1e-6
199
+
200
+ start_time=0.0
201
+ end_time = ${endTime}
202
+ dt = ${timeStep}
203
+
204
+ [Predictor]
205
+ type = SimplePredictor
206
+ scale = 1
207
+ []
208
+ []
209
+
210
+
211
+ [Postprocessors]
212
+ [react_y_bot]
213
+ type = SidesetReaction
214
+ direction = '0 1 0'
215
+ stress_tensor = stress
216
+ boundary = 'bottom'
217
+ []
218
+ [react_y_top]
219
+ type = SidesetReaction
220
+ direction = '0 1 0'
221
+ stress_tensor = stress
222
+ boundary = 'top'
223
+ []
224
+
225
+ [disp_y_max]
226
+ type = NodalExtremeValue
227
+ variable = disp_y
228
+ []
229
+ [disp_x_max]
230
+ type = NodalExtremeValue
231
+ variable = disp_x
232
+ []
233
+ [disp_z_max]
234
+ type = NodalExtremeValue
235
+ variable = disp_z
236
+ []
237
+
238
+ []
239
+
240
+ [Outputs]
241
+ exodus = true
242
+ []
@@ -0,0 +1,101 @@
1
+ #-------------------------------------------------------------------------
2
+ # pyvale: simple,2Dplate,1mat,thermal,steady,
3
+ #-------------------------------------------------------------------------
4
+
5
+ #-------------------------------------------------------------------------
6
+ #_* MOOSEHERDER VARIABLES - START
7
+
8
+ # Geometric Properties
9
+ lengX = 100e-3 # m
10
+ lengY = 50e-3 # m
11
+
12
+ # Mesh Properties
13
+ nElemX = 20
14
+ nElemY = 10
15
+ eType = QUAD4 # QUAD4 for 1st order, QUAD8 for 2nd order
16
+
17
+ # Thermal Loads/BCs
18
+ coolantTemp = 20.0 # degC
19
+ heatTransCoeff = 125.0e3 # W.m^-2.K^-1
20
+ surfHeatFlux = 500.0e3 # W.m^-2
21
+
22
+ # Material Properties: Pure (OFHC) Copper at 250degC
23
+ cuDensity = 8829.0 # kg.m^-3
24
+ cuThermCond = 384.0 # W.m^-1.K^-1
25
+ cuSpecHeat = 406.0 # J.kg^-1.K^-1
26
+
27
+ #** MOOSEHERDER VARIABLES - END
28
+ #-------------------------------------------------------------------------
29
+
30
+ [Mesh]
31
+ [generated]
32
+ type = GeneratedMeshGenerator
33
+ dim = 2
34
+ nx = ${nElemX}
35
+ ny = ${nElemY}
36
+ xmax = ${lengX}
37
+ ymax = ${lengY}
38
+ elem_type = ${eType}
39
+ []
40
+ []
41
+
42
+ [Variables]
43
+ [temperature]
44
+ initial_condition = ${coolantTemp}
45
+ []
46
+ []
47
+
48
+ [Kernels]
49
+ [heat_conduction]
50
+ type = HeatConduction
51
+ variable = temperature
52
+ []
53
+ []
54
+
55
+ [Materials]
56
+ [copper_thermal]
57
+ type = HeatConductionMaterial
58
+ thermal_conductivity = ${cuThermCond}
59
+ specific_heat = ${cuSpecHeat}
60
+ []
61
+ [copper_density]
62
+ type = GenericConstantMaterial
63
+ prop_names = 'density'
64
+ prop_values = ${cuDensity}
65
+ []
66
+ []
67
+
68
+ [BCs]
69
+ [heat_flux_out]
70
+ type = ConvectiveHeatFluxBC
71
+ variable = temperature
72
+ boundary = 'left'
73
+ T_infinity = ${coolantTemp}
74
+ heat_transfer_coefficient = ${heatTransCoeff}
75
+ []
76
+ [heat_flux_in]
77
+ type = NeumannBC
78
+ variable = temperature
79
+ boundary = 'right'
80
+ value = ${surfHeatFlux}
81
+ []
82
+ []
83
+
84
+ [Executioner]
85
+ type = Steady
86
+ []
87
+
88
+ [Postprocessors]
89
+ [max_temp]
90
+ type = NodalExtremeValue
91
+ variable = temperature
92
+ []
93
+ [avg_temp]
94
+ type = AverageNodalVariableValue
95
+ variable = temperature
96
+ []
97
+ []
98
+
99
+ [Outputs]
100
+ exodus = true
101
+ []
@@ -0,0 +1,156 @@
1
+ #-------------------------------------------------------------------------
2
+ # pyvale: simple,2Dplate,mechanical,steady,
3
+ #-------------------------------------------------------------------------
4
+ # NOTE: default 2D MOOSE solid mechanics is plane strain
5
+
6
+ #-------------------------------------------------------------------------
7
+ #_* MOOSEHERDER VARIABLES - START
8
+
9
+ # Geometric Properties
10
+ lengX = 50e-3 # m
11
+ lengY = 100e-3 # m
12
+
13
+ # Mesh Properties
14
+ nElemX = 10
15
+ nElemY = 20
16
+ eType = QUAD8 # QUAD4 for 1st order, QUAD8 for 2nd order
17
+
18
+ # Mechanical Loads/BCs
19
+ topDisp = 1.0e-3 # m
20
+ # tensLoad = 10e6 # Pa
21
+
22
+ # Material Properties: OFHC Copper 250degC
23
+ cuEMod= 108e9 # Pa
24
+ cuPRatio = 0.33 # -
25
+
26
+ #** MOOSEHERDER VARIABLES - END
27
+ #-------------------------------------------------------------------------
28
+
29
+ [GlobalParams]
30
+ displacements = 'disp_x disp_y'
31
+ []
32
+
33
+ [Mesh]
34
+ [generated]
35
+ type = GeneratedMeshGenerator
36
+ dim = 2
37
+ nx = ${nElemX}
38
+ ny = ${nElemY}
39
+ xmax = ${lengX}
40
+ ymax = ${lengY}
41
+ elem_type = ${eType}
42
+ []
43
+ []
44
+
45
+ [Modules/TensorMechanics/Master]
46
+ [all]
47
+ strain = SMALL
48
+ incremental = true
49
+ add_variables = true
50
+ material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
51
+ material_output_order = FIRST # CONSTANT, FIRST, SECOND,
52
+ generate_output = 'vonmises_stress stress_xx stress_yy stress_xy strain_xx strain_yy strain_xy max_principal_strain mid_principal_strain min_principal_strain'
53
+ []
54
+ []
55
+
56
+ [BCs]
57
+ [bottom_x]
58
+ type = DirichletBC
59
+ variable = disp_x
60
+ boundary = 'bottom'
61
+ value = 0.0
62
+ []
63
+ [bottom_y]
64
+ type = DirichletBC
65
+ variable = disp_y
66
+ boundary = 'bottom'
67
+ value = 0.0
68
+ []
69
+ [top_x]
70
+ type = DirichletBC
71
+ variable = disp_x
72
+ boundary = 'top'
73
+ value = 0.0
74
+ []
75
+ [top_y]
76
+ type = DirichletBC
77
+ variable = disp_y
78
+ boundary = 'top'
79
+ value = ${topDisp}
80
+ []
81
+ []
82
+
83
+ [Materials]
84
+ [elasticity]
85
+ type = ComputeIsotropicElasticityTensor
86
+ youngs_modulus = ${cuEMod}
87
+ poissons_ratio = ${cuPRatio}
88
+ []
89
+ [stress]
90
+ type = ComputeFiniteStrainElasticStress # ComputeLinearElasticStress
91
+ []
92
+ []
93
+
94
+ [Preconditioning]
95
+ [SMP]
96
+ type = SMP
97
+ full = true
98
+ []
99
+ []
100
+
101
+ [Executioner]
102
+ type = Steady
103
+ solve_type = 'PJFNK'
104
+ petsc_options_iname = '-pc_type -pc_hypre_type'
105
+ petsc_options_value = 'hypre boomeramg'
106
+ #end_time= ${endTime}
107
+ #dt = ${timeStep}
108
+ []
109
+
110
+
111
+ [Postprocessors]
112
+ [react_y_bot]
113
+ type = SidesetReaction
114
+ direction = '0 1 0'
115
+ stress_tensor = stress
116
+ boundary = 'bottom'
117
+ []
118
+ [react_y_top]
119
+ type = SidesetReaction
120
+ direction = '0 1 0'
121
+ stress_tensor = stress
122
+ boundary = 'top'
123
+ []
124
+
125
+ [disp_y_max]
126
+ type = NodalExtremeValue
127
+ variable = disp_y
128
+ []
129
+ [disp_x_max]
130
+ type = NodalExtremeValue
131
+ variable = disp_x
132
+ []
133
+
134
+ [max_yy_stress]
135
+ type = ElementExtremeValue
136
+ variable = stress_yy
137
+ []
138
+
139
+ [strain_yy_avg]
140
+ type = ElementAverageValue
141
+ variable = strain_yy
142
+ []
143
+ [strain_xx_avg]
144
+ type = ElementAverageValue
145
+ variable = strain_xx
146
+ []
147
+
148
+ [stress_vm_max]
149
+ type = ElementExtremeValue
150
+ variable = vonmises_stress
151
+ []
152
+ []
153
+
154
+ [Outputs]
155
+ exodus = true
156
+ []
@@ -0,0 +1,136 @@
1
+ #-------------------------------------------------------------------------
2
+ # pyvale: simple,2Dplate,2mat,thermal,steady,
3
+ #-------------------------------------------------------------------------
4
+
5
+ #-------------------------------------------------------------------------
6
+ #_* MOOSEHERDER VARIABLES - START
7
+
8
+ # Geometric Properties
9
+ lengX = 100e-3 # m
10
+ lengY = 50e-3 # m
11
+
12
+ # Mesh Properties
13
+ nElemX = 20
14
+ nElemY = 10
15
+ eType = QUAD4 # QUAD4 for 1st order, QUAD8 for 2nd order
16
+
17
+ # Thermal Loads/BCs
18
+ coolantTemp = 20.0 # degC
19
+ heatTransCoeff = 125.0e3 # W.m^-2.K^-1
20
+ surfHeatFlux = 500.0e3 # W.m^-2
21
+
22
+ # Material Properties:
23
+ # Pure (OFHC) Copper at 250degC
24
+ cuDensity = 8829.0 # kg.m^-3
25
+ cuThermCond = 384.0 # W.m^-1.K^-1
26
+ cuSpecHeat = 406.0 # J.kg^-1.K^-1
27
+
28
+ # Tungsten at 600degC
29
+ wDensity = 19150.0 # kg.m^-3
30
+ wThermCond = 127.0 # W.m^-1.K^-1
31
+ wSpecHeat = 147.0 # J.kg^-1.K^-1
32
+
33
+ #** MOOSEHERDER VARIABLES - END
34
+ #-------------------------------------------------------------------------
35
+
36
+ [Mesh]
37
+ [generated]
38
+ type = GeneratedMeshGenerator
39
+ dim = 2
40
+ nx = ${nElemX}
41
+ ny = ${nElemY}
42
+ xmax = ${lengX}
43
+ ymax = ${lengY}
44
+ elem_type = ${eType}
45
+ []
46
+
47
+ [block1]
48
+ type = SubdomainBoundingBoxGenerator
49
+ input = generated
50
+ block_id = 1
51
+ bottom_left = '0 0 0'
52
+ top_right = '${fparse lengX/2} ${fparse lengY} 0'
53
+ []
54
+ [block2]
55
+ type = SubdomainBoundingBoxGenerator
56
+ input = block1
57
+ block_id = 2
58
+ bottom_left = '${fparse lengX/2} 0 0'
59
+ top_right = '${fparse lengX} ${fparse lengY} 0'
60
+ []
61
+ []
62
+
63
+ [Variables]
64
+ [temperature]
65
+ initial_condition = ${coolantTemp}
66
+ []
67
+ []
68
+
69
+ [Kernels]
70
+ [heat_conduction]
71
+ type = HeatConduction
72
+ variable = temperature
73
+ []
74
+ []
75
+
76
+ [Materials]
77
+ [copper_thermal]
78
+ type = HeatConductionMaterial
79
+ thermal_conductivity = ${cuThermCond}
80
+ specific_heat = ${cuSpecHeat}
81
+ block = 1
82
+ []
83
+ [copper_density]
84
+ type = GenericConstantMaterial
85
+ prop_names = 'density'
86
+ prop_values = ${cuDensity}
87
+ block = 1
88
+ []
89
+ [tungsten_thermal]
90
+ type = HeatConductionMaterial
91
+ thermal_conductivity = ${wThermCond}
92
+ specific_heat = ${wSpecHeat}
93
+ block = 2
94
+ []
95
+ [tungsten_density]
96
+ type = GenericConstantMaterial
97
+ prop_names = 'density'
98
+ prop_values = ${wDensity}
99
+ block = 2
100
+ []
101
+ []
102
+
103
+ [BCs]
104
+ [heat_flux_out]
105
+ type = ConvectiveHeatFluxBC
106
+ variable = temperature
107
+ boundary = 'left'
108
+ T_infinity = ${coolantTemp}
109
+ heat_transfer_coefficient = ${heatTransCoeff}
110
+ []
111
+ [heat_flux_in]
112
+ type = NeumannBC
113
+ variable = temperature
114
+ boundary = 'right'
115
+ value = ${surfHeatFlux}
116
+ []
117
+ []
118
+
119
+ [Executioner]
120
+ type = Steady
121
+ []
122
+
123
+ [Postprocessors]
124
+ [temp_max]
125
+ type = NodalExtremeValue
126
+ variable = temperature
127
+ []
128
+ [temp_avg]
129
+ type = AverageNodalVariableValue
130
+ variable = temperature
131
+ []
132
+ []
133
+
134
+ [Outputs]
135
+ exodus = true
136
+ []