pyvale 2025.5.3__cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.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-i386-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-65f46eca.so.1.0.0 +0 -0
@@ -0,0 +1,329 @@
1
+ #-------------------------------------------------------------------------
2
+ # pyvale: gmsh,monoblock,3mat,therm--mechanical,steady,
3
+ #-------------------------------------------------------------------------
4
+
5
+ #-------------------------------------------------------------------------
6
+ #_* MOOSEHERDER VARIABLES - START
7
+
8
+ coolantTemp=100.0 # degC
9
+ heatTransCoeff=125.0e3 # W.m^-2.K^-1
10
+ surfHeatFlux=4.67e6 # W.m^-2, Taken from Adel's first paper
11
+
12
+ # Material Properties:
13
+ # Thermal Props: Copper-Chromium-Zirconium pg.148 at 200degC
14
+ cucrzrDensity = 8816.0 # kg.m^-3
15
+ cucrzrThermCond = 343.0 # W.m^-1.K^-1
16
+ cucrzrSpecHeat = 407.0 # J.kg^-1.K^-1
17
+
18
+ # Thermal Props: Pure (OFHC) Copper at 250degC
19
+ cuDensity = 8829.0 # kg.m^-3
20
+ cuThermCond = 384.0 # W.m^-1.K^-1
21
+ cuSpecHeat = 406.0 # J.kg^-1.K^-1
22
+
23
+ # Thermal Props: Tungsten at 600degC
24
+ wDensity = 19150.0 # kg.m^-3
25
+ wThermCond = 127.0 # W.m^-1.K^-1
26
+ wSpecHeat = 147.0 # J.kg^-1.K^-1
27
+
28
+ # Mechanical Props: Copper-Chromium-Zirconium at 200degC
29
+ cucrzrEMod = 123e9 # Pa
30
+ cucrzrPRatio = 0.33 # -
31
+
32
+ # Mechanical Props: OFHC Copper at 250degC
33
+ cuEMod = 108e9 # Pa
34
+ cuPRatio = 0.33 # -
35
+
36
+ # Mechanical Props: Tungsten at 250degC
37
+ wEMod = 387e9 # Pa
38
+ wPRatio = 0.29 # -
39
+
40
+ # Thermo-mechanical coupling
41
+ stressFreeTemp = 20 # degC
42
+ cucrzrThermExp = 17.7e-6 # 1/degC
43
+ cuThermExp = 17.8e-6 # 1/degC
44
+ wThermExp = 4.72e-6 # 1/degC
45
+
46
+ # Mesh file string
47
+ mesh_file = 'case12.msh'
48
+
49
+ #** MOOSEHERDER VARIABLES - END
50
+ #-------------------------------------------------------------------------
51
+
52
+ [GlobalParams]
53
+ displacements = 'disp_x disp_y disp_z'
54
+ []
55
+
56
+ [Mesh]
57
+ type = FileMesh
58
+ file = ${mesh_file}
59
+ []
60
+
61
+ [Variables]
62
+ [temperature]
63
+ family = LAGRANGE
64
+ order = SECOND
65
+ initial_condition = ${coolantTemp}
66
+ []
67
+ []
68
+
69
+ [Kernels]
70
+ [heat_conduction]
71
+ type = HeatConduction
72
+ variable = temperature
73
+ []
74
+ []
75
+
76
+ [Modules/TensorMechanics/Master]
77
+ [all]
78
+ strain = SMALL # SMALL or FINITE
79
+ incremental = true
80
+ add_variables = true
81
+ material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
82
+ material_output_order = FIRST # CONSTANT, FIRST, SECOND,
83
+ automatic_eigenstrain_names = true
84
+ 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'
85
+ []
86
+ []
87
+
88
+ [Materials]
89
+ [cucrzr_thermal]
90
+ type = HeatConductionMaterial
91
+ thermal_conductivity = ${cucrzrThermCond}
92
+ specific_heat = ${cucrzrSpecHeat}
93
+ block = 'pipe-cucrzr'
94
+ []
95
+ [cucrzr_density]
96
+ type = GenericConstantMaterial
97
+ prop_names = 'density'
98
+ prop_values = ${cucrzrDensity}
99
+ block = 'pipe-cucrzr'
100
+ []
101
+ [cucrzr_elasticity]
102
+ type = ComputeIsotropicElasticityTensor
103
+ youngs_modulus = ${cucrzrEMod}
104
+ poissons_ratio = ${cucrzrPRatio}
105
+ block = 'pipe-cucrzr'
106
+ []
107
+ [cucrzr_expansion]
108
+ type = ComputeThermalExpansionEigenstrain
109
+ temperature = temperature
110
+ stress_free_temperature = ${stressFreeTemp}
111
+ thermal_expansion_coeff = ${cucrzrThermExp}
112
+ eigenstrain_name = thermal_expansion_eigenstrain
113
+ block = 'pipe-cucrzr'
114
+ []
115
+
116
+
117
+ [copper_thermal]
118
+ type = HeatConductionMaterial
119
+ thermal_conductivity = ${cuThermCond}
120
+ specific_heat = ${cuSpecHeat}
121
+ block = 'interlayer-cu'
122
+ []
123
+ [copper_density]
124
+ type = GenericConstantMaterial
125
+ prop_names = 'density'
126
+ prop_values = ${cuDensity}
127
+ block = 'interlayer-cu'
128
+ []
129
+ [copper_elasticity]
130
+ type = ComputeIsotropicElasticityTensor
131
+ youngs_modulus = ${cuEMod}
132
+ poissons_ratio = ${cuPRatio}
133
+ block = 'interlayer-cu'
134
+ []
135
+ [copper_expansion]
136
+ type = ComputeThermalExpansionEigenstrain
137
+ temperature = temperature
138
+ stress_free_temperature = ${stressFreeTemp}
139
+ thermal_expansion_coeff = ${cuThermExp}
140
+ eigenstrain_name = thermal_expansion_eigenstrain
141
+ block = 'interlayer-cu'
142
+ []
143
+
144
+
145
+ [tungsten_thermal]
146
+ type = HeatConductionMaterial
147
+ thermal_conductivity = ${wThermCond}
148
+ specific_heat = ${wSpecHeat}
149
+ block = 'armour-w'
150
+ []
151
+ [tungsten_density]
152
+ type = GenericConstantMaterial
153
+ prop_names = 'density'
154
+ prop_values = ${wDensity}
155
+ block = 'armour-w'
156
+ []
157
+ [tungsten_elasticity]
158
+ type = ComputeIsotropicElasticityTensor
159
+ youngs_modulus = ${wEMod}
160
+ poissons_ratio = ${wPRatio}
161
+ block = 'armour-w'
162
+ []
163
+ [tungsten_expansion]
164
+ type = ComputeThermalExpansionEigenstrain
165
+ temperature = temperature
166
+ stress_free_temperature = ${stressFreeTemp}
167
+ thermal_expansion_coeff = ${wThermExp}
168
+ eigenstrain_name = thermal_expansion_eigenstrain
169
+ block = 'armour-w'
170
+ []
171
+
172
+ [stress]
173
+ type = ComputeFiniteStrainElasticStress # ComputeLinearElasticStress or ComputeFiniteStrainElasticStress
174
+ []
175
+ []
176
+
177
+ [BCs]
178
+ [heat_flux_in]
179
+ type = NeumannBC
180
+ variable = temperature
181
+ boundary = 'bc-top-heatflux'
182
+ value = ${surfHeatFlux}
183
+ []
184
+ [heat_flux_out]
185
+ type = ConvectiveHeatFluxBC
186
+ variable = temperature
187
+ boundary = 'bc-pipe-heattransf'
188
+ T_infinity = ${coolantTemp}
189
+ heat_transfer_coefficient = ${heatTransCoeff}
190
+ []
191
+
192
+ # Lock disp_y for base
193
+ # NOTE: if locking y on base need to comment all disp_y conditions below
194
+ [mech_bc_c_dispy]
195
+ type = DirichletBC
196
+ variable = disp_y
197
+ boundary = 'bc-base-disp'
198
+ value = 0.0
199
+ []
200
+
201
+ # Lock all disp DOFs at the center of the block
202
+ [mech_bc_c_dispx]
203
+ type = DirichletBC
204
+ variable = disp_x
205
+ boundary = 'bc-c-point-xyz-mech'
206
+ value = 0.0
207
+ []
208
+ #[mech_bc_c_dispy]
209
+ # type = DirichletBC
210
+ # variable = disp_y
211
+ # boundary = 'bc-c-point-xyz-mech'
212
+ # value = 0.0
213
+ #[]
214
+ [mech_bc_c_dispz]
215
+ type = DirichletBC
216
+ variable = disp_z
217
+ boundary = 'bc-c-point-xyz-mech'
218
+ value = 0.0
219
+ []
220
+
221
+ # Lock disp yz along the x (left-right) axis
222
+ #[mech_bc_l_dispy]
223
+ # type = DirichletBC
224
+ # variable = disp_y
225
+ # boundary = 'bc-l-point-yz-mech'
226
+ # value = 0.0
227
+ #[]
228
+ [mech_bc_l_dispz]
229
+ type = DirichletBC
230
+ variable = disp_z
231
+ boundary = 'bc-l-point-yz-mech'
232
+ value = 0.0
233
+ []
234
+ #[mech_bc_r_dispy]
235
+ # type = DirichletBC
236
+ # variable = disp_y
237
+ # boundary = 'bc-r-point-yz-mech'
238
+ # value = 0.0
239
+ #[]
240
+ [mech_bc_r_dispz]
241
+ type = DirichletBC
242
+ variable = disp_z
243
+ boundary = 'bc-r-point-yz-mech'
244
+ value = 0.0
245
+ []
246
+
247
+ # Lock disp xy along the z (front-back) axis
248
+ [mech_bc_f_dispx]
249
+ type = DirichletBC
250
+ variable = disp_x
251
+ boundary = 'bc-f-point-xy-mech'
252
+ value = 0.0
253
+ []
254
+ #[mech_bc_f_dispy]
255
+ # type = DirichletBC
256
+ # variable = disp_y
257
+ # boundary = 'bc-f-point-xy-mech'
258
+ # value = 0.0
259
+ #[]
260
+ [mech_bc_b_dispx]
261
+ type = DirichletBC
262
+ variable = disp_x
263
+ boundary = 'bc-b-point-xy-mech'
264
+ value = 0.0
265
+ []
266
+ #[mech_bc_b_dispy]
267
+ # type = DirichletBC
268
+ # variable = disp_y
269
+ # boundary = 'bc-b-point-xy-mech'
270
+ # value = 0.0
271
+ #[]
272
+ []
273
+
274
+ [Preconditioning]
275
+ [smp]
276
+ type = SMP
277
+ full = true
278
+ []
279
+ []
280
+
281
+ [Executioner]
282
+ type = Steady
283
+ solve_type = 'PJFNK'
284
+ petsc_options_iname = '-pc_type -pc_hypre_type'
285
+ petsc_options_value = 'hypre boomeramg'
286
+ []
287
+
288
+
289
+ [Postprocessors]
290
+ [temp_max]
291
+ type = NodalExtremeValue
292
+ variable = temperature
293
+ []
294
+ [temp_avg]
295
+ type = AverageNodalVariableValue
296
+ variable = temperature
297
+ []
298
+
299
+ [disp_x_max]
300
+ type = NodalExtremeValue
301
+ variable = disp_x
302
+ []
303
+ [disp_y_max]
304
+ type = NodalExtremeValue
305
+ variable = disp_y
306
+ []
307
+ [disp_z_max]
308
+ type = NodalExtremeValue
309
+ variable = disp_z
310
+ []
311
+
312
+ [strain_xx_max]
313
+ type = ElementExtremeValue
314
+ variable = strain_xx
315
+ []
316
+ [strain_yy_max]
317
+ type = ElementExtremeValue
318
+ variable = strain_yy
319
+ []
320
+ [strain_zz_max]
321
+ type = ElementExtremeValue
322
+ variable = strain_zz
323
+ []
324
+ []
325
+
326
+
327
+ [Outputs]
328
+ exodus = true
329
+ []
@@ -0,0 +1,140 @@
1
+ #-------------------------------------------------------------------------
2
+ # pyvale: simple,2Dplate,1mat,thermal,transient
3
+ #-------------------------------------------------------------------------
4
+
5
+ #-------------------------------------------------------------------------
6
+ #_* MOOSEHERDER VARIABLES - START
7
+ endTime = 200
8
+ timeStep = 5
9
+
10
+ # Geometric Properties
11
+ lengX = 100e-3 # m
12
+ lengY = 50e-3 # m
13
+
14
+ # Mesh Properties
15
+ nElemX = 20
16
+ nElemY = 10
17
+ eType = QUAD4 # QUAD4 for 1st order, QUAD8 for 2nd order
18
+
19
+ # Thermal Loads/BCs
20
+ coolantTemp = 20.0 # degC
21
+ heatTransCoeff = 125.0e3 # W.m^-2.K^-1
22
+ surfHeatFlux = 500.0e3 # W.m^-2
23
+ timeConst = 1 # s
24
+
25
+ # Material Properties: Pure (OFHC) Copper at 250degC
26
+ cuDensity = 8829.0 # kg.m^-3
27
+ cuThermCond = 384.0 # W.m^-1.K^-1
28
+ cuSpecHeat = 406.0 # J.kg^-1.K^-1
29
+
30
+ #** MOOSEHERDER VARIABLES - END
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
+ [Variables]
46
+ [temperature]
47
+ initial_condition = ${coolantTemp}
48
+ []
49
+ []
50
+
51
+ [Kernels]
52
+ [heat_conduction]
53
+ type = HeatConduction
54
+ variable = temperature
55
+ []
56
+ [time_derivative]
57
+ type = HeatConductionTimeDerivative
58
+ variable = temperature
59
+ []
60
+ []
61
+
62
+ [Materials]
63
+ [copper_thermal]
64
+ type = HeatConductionMaterial
65
+ thermal_conductivity = ${cuThermCond}
66
+ specific_heat = ${cuSpecHeat}
67
+ []
68
+ [copper_density]
69
+ type = GenericConstantMaterial
70
+ prop_names = 'density'
71
+ prop_values = ${cuDensity}
72
+ []
73
+ []
74
+
75
+ [BCs]
76
+ [heat_flux_out_left]
77
+ type = ConvectiveHeatFluxBC
78
+ variable = temperature
79
+ boundary = 'left'
80
+ T_infinity = ${coolantTemp}
81
+ heat_transfer_coefficient = ${heatTransCoeff}
82
+ []
83
+ [heat_flux_in_right]
84
+ type = FunctionNeumannBC
85
+ variable = temperature
86
+ boundary = 'right'
87
+ function = '${fparse surfHeatFlux}*(1-exp(-(1/${timeConst})*t))'
88
+ []
89
+ [heat_flux_out_bot]
90
+ type = ConvectiveHeatFluxBC
91
+ variable = temperature
92
+ boundary = 'bottom'
93
+ T_infinity = ${coolantTemp}
94
+ heat_transfer_coefficient = ${heatTransCoeff}
95
+ []
96
+ [heat_flux_in_top]
97
+ type = FunctionNeumannBC
98
+ variable = temperature
99
+ boundary = 'top'
100
+ function = '${fparse surfHeatFlux}*(1-exp(-(1/${timeConst})*t))'
101
+ []
102
+ []
103
+
104
+ [Executioner]
105
+ type = Transient
106
+
107
+ solve_type = PJFNK # PJNFK or NEWTON
108
+ l_max_its = 100 # default = 1000
109
+ l_tol = 1e-6 # default = 1e-5
110
+ nl_abs_tol = 1e-6 # default = 1e-50
111
+ nl_rel_tol = 1e-6 # default = 1e-8
112
+
113
+ line_search = none # TODO: check this helps
114
+ petsc_options_iname = '-pc_type -pc_hypre_type'
115
+ petsc_options_value = 'hypre boomeramg'
116
+
117
+ start_time = 0.0
118
+ end_time = ${endTime}
119
+ dt = ${timeStep}
120
+
121
+ [Predictor]
122
+ type = SimplePredictor
123
+ scale = 1
124
+ []
125
+ []
126
+
127
+ [Postprocessors]
128
+ [max_temp]
129
+ type = NodalExtremeValue
130
+ variable = temperature
131
+ []
132
+ [avg_temp]
133
+ type = AverageNodalVariableValue
134
+ variable = temperature
135
+ []
136
+ []
137
+
138
+ [Outputs]
139
+ exodus = true
140
+ []
@@ -0,0 +1,159 @@
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
+ # NOTE: only used for transient solves
10
+ endTime = 60 # s
11
+ timeStep = 5 # s
12
+
13
+ # Geometric Properties
14
+ lengX = 50e-3 # m
15
+ lengY = 100e-3 # m
16
+
17
+ # Mesh Properties
18
+ nElemX = 10
19
+ nElemY = 20
20
+ eType = QUAD8 # QUAD4 for 1st order, QUAD8 for 2nd order
21
+
22
+ # Mechanical Loads/BCs
23
+ topDispRate = ${fparse 1e-3 / 60} # m/s
24
+
25
+ # Material Properties: OFHC Copper 250degC
26
+ cuEMod= 108e9 # Pa
27
+ cuPRatio = 0.33 # -
28
+
29
+ #** MOOSEHERDER VARIABLES - END
30
+ #-------------------------------------------------------------------------
31
+
32
+ [GlobalParams]
33
+ displacements = 'disp_x disp_y'
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
+
48
+ [Modules/TensorMechanics/Master]
49
+ [all]
50
+ strain = SMALL
51
+ incremental = true
52
+ add_variables = true
53
+ material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
54
+ material_output_order = FIRST # CONSTANT, FIRST, SECOND,
55
+ 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'
56
+ []
57
+ []
58
+
59
+ [BCs]
60
+ [bottom_x]
61
+ type = DirichletBC
62
+ variable = disp_x
63
+ boundary = 'bottom'
64
+ value = 0.0
65
+ []
66
+ [bottom_y]
67
+ type = DirichletBC
68
+ variable = disp_y
69
+ boundary = 'bottom'
70
+ value = 0.0
71
+ []
72
+ [top_x]
73
+ type = DirichletBC
74
+ variable = disp_x
75
+ boundary = 'top'
76
+ value = 0.0
77
+ []
78
+ [top_y]
79
+ type = FunctionDirichletBC
80
+ variable = disp_y
81
+ boundary = 'top'
82
+ function = '${topDispRate}*t'
83
+ []
84
+ []
85
+
86
+ [Materials]
87
+ [elasticity]
88
+ type = ComputeIsotropicElasticityTensor
89
+ youngs_modulus = ${cuEMod}
90
+ poissons_ratio = ${cuPRatio}
91
+ []
92
+ [stress]
93
+ type = ComputeFiniteStrainElasticStress # ComputeLinearElasticStress
94
+ []
95
+ []
96
+
97
+ [Preconditioning]
98
+ [SMP]
99
+ type = SMP
100
+ full = true
101
+ []
102
+ []
103
+
104
+ [Executioner]
105
+ type = Transient
106
+ solve_type = 'PJFNK'
107
+ petsc_options_iname = '-pc_type -pc_hypre_type'
108
+ petsc_options_value = 'hypre boomeramg'
109
+ end_time= ${endTime}
110
+ dt = ${timeStep}
111
+ []
112
+
113
+
114
+ [Postprocessors]
115
+ [react_y_bot]
116
+ type = SidesetReaction
117
+ direction = '0 1 0'
118
+ stress_tensor = stress
119
+ boundary = 'bottom'
120
+ []
121
+ [react_y_top]
122
+ type = SidesetReaction
123
+ direction = '0 1 0'
124
+ stress_tensor = stress
125
+ boundary = 'top'
126
+ []
127
+
128
+ [disp_y_max]
129
+ type = NodalExtremeValue
130
+ variable = disp_y
131
+ []
132
+ [disp_x_max]
133
+ type = NodalExtremeValue
134
+ variable = disp_x
135
+ []
136
+
137
+ [max_yy_stress]
138
+ type = ElementExtremeValue
139
+ variable = stress_yy
140
+ []
141
+
142
+ [strain_yy_avg]
143
+ type = ElementAverageValue
144
+ variable = strain_yy
145
+ []
146
+ [strain_xx_avg]
147
+ type = ElementAverageValue
148
+ variable = strain_xx
149
+ []
150
+
151
+ [stress_vm_max]
152
+ type = ElementExtremeValue
153
+ variable = vonmises_stress
154
+ []
155
+ []
156
+
157
+ [Outputs]
158
+ exodus = true
159
+ []