pyvale 2025.4.0__py3-none-any.whl → 2025.4.1__py3-none-any.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 +51 -52
- pyvale/analyticmeshgen.py +101 -0
- pyvale/{core/analyticsimdatafactory.py → analyticsimdatafactory.py} +32 -9
- pyvale/{core/analyticsimdatagenerator.py → analyticsimdatagenerator.py} +151 -21
- pyvale/{core/camera.py → camera.py} +13 -14
- pyvale/{core/cameradata.py → cameradata.py} +6 -19
- pyvale/{core/cameradata2d.py → cameradata2d.py} +7 -7
- pyvale/{core/cameratools.py → cameratools.py} +18 -19
- pyvale/{core/cython → cython}/rastercyth.py +9 -9
- pyvale/data/__init__.py +5 -7
- 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/{core/dataset.py → dataset.py} +24 -8
- pyvale/{core/errorcalculator.py → errorcalculator.py} +7 -8
- pyvale/{core/errordriftcalc.py → errordriftcalc.py} +6 -7
- pyvale/{core/errorintegrator.py → errorintegrator.py} +8 -9
- pyvale/{core/errorrand.py → errorrand.py} +9 -10
- pyvale/{core/errorsysdep.py → errorsysdep.py} +8 -9
- pyvale/{core/errorsysfield.py → errorsysfield.py} +13 -14
- pyvale/{core/errorsysindep.py → errorsysindep.py} +9 -10
- pyvale/examples/__init__.py +5 -7
- pyvale/examples/analyticdatagen/__init__.py +5 -7
- pyvale/examples/ex1_1_thermal2d.py +6 -9
- pyvale/examples/ex1_2_thermal2d.py +6 -9
- pyvale/examples/ex1_3_thermal2d.py +6 -9
- pyvale/examples/ex1_4_thermal2d.py +6 -9
- pyvale/examples/ex1_5_thermal2d.py +6 -9
- pyvale/examples/ex2_1_thermal3d .py +6 -9
- pyvale/examples/ex2_3_thermal3d.py +6 -9
- pyvale/examples/ex3_1_displacement2d.py +6 -9
- pyvale/examples/ex3_2_displacement2d.py +5 -8
- pyvale/examples/ex3_3_displacement2d.py +6 -9
- pyvale/examples/ex3_4_displacement2d.py +6 -9
- pyvale/examples/ex4_1_strain2d.py +6 -9
- pyvale/examples/ex4_2_strain2d.py +5 -8
- pyvale/examples/ex4_3_strain2d.py +6 -9
- pyvale/examples/ex5_1_multiphysics2d.py +5 -8
- pyvale/examples/ex6_1_multiphysics2d_expsim.py +6 -9
- pyvale/examples/ex6_2_multiphysics3d_expsim.py +15 -13
- pyvale/examples/features/__init__.py +5 -7
- pyvale/examples/rasterisation/ex_rastenp.py +5 -7
- pyvale/examples/rasterisation/ex_rastercyth_oneframe.py +5 -7
- pyvale/examples/rasterisation/ex_rastercyth_static_cypara.py +5 -7
- pyvale/examples/rasterisation/ex_rastercyth_static_pypara.py +5 -7
- pyvale/{core/experimentsimulator.py → experimentsimulator.py} +7 -8
- pyvale/{core/field.py → field.py} +6 -7
- pyvale/{core/fieldconverter.py → fieldconverter.py} +138 -17
- pyvale/{core/fieldsampler.py → fieldsampler.py} +9 -10
- pyvale/{core/fieldscalar.py → fieldscalar.py} +9 -10
- pyvale/{core/fieldtensor.py → fieldtensor.py} +10 -11
- pyvale/{core/fieldtransform.py → fieldtransform.py} +6 -7
- pyvale/{core/fieldvector.py → fieldvector.py} +10 -11
- pyvale/{core/generatorsrandom.py → generatorsrandom.py} +6 -7
- pyvale/{core/imagedef2d.py → imagedef2d.py} +9 -10
- pyvale/{core/integratorfactory.py → integratorfactory.py} +12 -13
- pyvale/{core/integratorquadrature.py → integratorquadrature.py} +9 -10
- pyvale/{core/integratorrectangle.py → integratorrectangle.py} +9 -10
- pyvale/{core/integratorspatial.py → integratorspatial.py} +7 -8
- pyvale/{core/integratortype.py → integratortype.py} +6 -7
- pyvale/{core/optimcheckfuncs.py → optimcheckfuncs.py} +1 -1
- pyvale/{core/raster.py → raster.py} +6 -7
- pyvale/{core/rastercy.py → rastercy.py} +9 -10
- pyvale/{core/rasternp.py → rasternp.py} +10 -13
- pyvale/{core/rendermesh.py → rendermesh.py} +8 -21
- pyvale/{core/sensorarray.py → sensorarray.py} +7 -8
- pyvale/{core/sensorarrayfactory.py → sensorarrayfactory.py} +15 -16
- pyvale/{core/sensorarraypoint.py → sensorarraypoint.py} +12 -13
- pyvale/{core/sensordata.py → sensordata.py} +7 -8
- pyvale/{core/sensordescriptor.py → sensordescriptor.py} +6 -7
- pyvale/{core/sensortools.py → sensortools.py} +7 -8
- pyvale/simcases/case00_HEX20.i +5 -5
- pyvale/simcases/case00_HEX27.i +5 -5
- pyvale/simcases/case00_HEX8.i +242 -0
- pyvale/simcases/case00_TET10.i +2 -2
- pyvale/simcases/case00_TET14.i +2 -2
- pyvale/simcases/case00_TET4.i +242 -0
- pyvale/simcases/run_1case.py +1 -1
- pyvale/{core/visualexpplotter.py → visualexpplotter.py} +8 -10
- pyvale/{core/visualimagedef.py → visualimagedef.py} +6 -7
- pyvale/{core/visualimages.py → visualimages.py} +8 -9
- pyvale/{core/visualopts.py → visualopts.py} +6 -7
- pyvale/{core/visualsimanimator.py → visualsimanimator.py} +10 -11
- pyvale/{core/visualsimplotter.py → visualsimplotter.py} +30 -30
- pyvale/{core/visualtools.py → visualtools.py} +7 -8
- pyvale/{core/visualtraceplotter.py → visualtraceplotter.py} +9 -10
- {pyvale-2025.4.0.dist-info → pyvale-2025.4.1.dist-info}/METADATA +1 -1
- pyvale-2025.4.1.dist-info/RECORD +163 -0
- {pyvale-2025.4.0.dist-info → pyvale-2025.4.1.dist-info}/WHEEL +1 -1
- pyvale/core/__init__.py +0 -7
- pyvale/core/analyticmeshgen.py +0 -59
- pyvale/core/cython/rastercyth.c +0 -32267
- pyvale-2025.4.0.dist-info/RECORD +0 -157
- {pyvale-2025.4.0.dist-info → pyvale-2025.4.1.dist-info}/licenses/LICENSE +0 -0
- {pyvale-2025.4.0.dist-info → pyvale-2025.4.1.dist-info}/top_level.txt +0 -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 = 2
|
|
18
|
+
nElemY = 2
|
|
19
|
+
nElemZ = 2
|
|
20
|
+
eType = HEX8 # 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
|
+
[]
|
pyvale/simcases/case00_TET10.i
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
#-------------------------------------------------------------------------
|
|
6
6
|
#_* MOOSEHERDER VARIABLES - START
|
|
7
7
|
|
|
8
|
-
endTime =
|
|
8
|
+
endTime = 20
|
|
9
9
|
timeStep = 1
|
|
10
10
|
|
|
11
11
|
# Geometric Properties
|
|
@@ -89,7 +89,7 @@ ThermExp = 17.8e-6 # 1/degC
|
|
|
89
89
|
add_variables = true
|
|
90
90
|
material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
|
|
91
91
|
material_output_order = FIRST # CONSTANT, FIRST, SECOND,
|
|
92
|
-
generate_output = '
|
|
92
|
+
generate_output = 'strain_xx strain_yy strain_zz strain_xy strain_yz strain_xz'
|
|
93
93
|
[]
|
|
94
94
|
[]
|
|
95
95
|
|
pyvale/simcases/case00_TET14.i
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
#-------------------------------------------------------------------------
|
|
6
6
|
#_* MOOSEHERDER VARIABLES - START
|
|
7
7
|
|
|
8
|
-
endTime =
|
|
8
|
+
endTime = 20
|
|
9
9
|
timeStep = 1
|
|
10
10
|
|
|
11
11
|
# Geometric Properties
|
|
@@ -89,7 +89,7 @@ ThermExp = 17.8e-6 # 1/degC
|
|
|
89
89
|
add_variables = true
|
|
90
90
|
material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
|
|
91
91
|
material_output_order = FIRST # CONSTANT, FIRST, SECOND,
|
|
92
|
-
generate_output = '
|
|
92
|
+
generate_output = 'strain_xx strain_yy strain_zz strain_xy strain_yz strain_xz'
|
|
93
93
|
[]
|
|
94
94
|
[]
|
|
95
95
|
|
|
@@ -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
|
+
[]
|
pyvale/simcases/run_1case.py
CHANGED
|
@@ -15,7 +15,7 @@ from mooseherder import (MooseConfig,
|
|
|
15
15
|
|
|
16
16
|
#===============================================================================
|
|
17
17
|
# Change this to run a different case
|
|
18
|
-
CASE_STR = '
|
|
18
|
+
CASE_STR = 'case00_HEX27'
|
|
19
19
|
#===============================================================================
|
|
20
20
|
|
|
21
21
|
CASE_FILES = (CASE_STR+'.geo',CASE_STR+'.i')
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
================================================================================
|
|
7
|
-
"""
|
|
8
|
-
from typing import Any
|
|
1
|
+
# ================================================================================
|
|
2
|
+
# pyvale: the python validation engine
|
|
3
|
+
# License: MIT
|
|
4
|
+
# Copyright (C) 2025 The Computer Aided Validation Team
|
|
5
|
+
# ================================================================================
|
|
9
6
|
|
|
7
|
+
from typing import Any
|
|
10
8
|
import numpy as np
|
|
11
9
|
import matplotlib.pyplot as plt
|
|
12
|
-
from pyvale.
|
|
10
|
+
from pyvale.visualopts import (PlotOptsGeneral,
|
|
13
11
|
TraceOptsExperiment)
|
|
14
|
-
from pyvale.
|
|
12
|
+
from pyvale.experimentsimulator import ExperimentSimulator
|
|
15
13
|
|
|
16
14
|
#TODO: Docstrings
|
|
17
15
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"""
|
|
1
|
+
# ================================================================================
|
|
2
|
+
# pyvale: the python validation engine
|
|
3
|
+
# License: MIT
|
|
4
|
+
# Copyright (C) 2025 The Computer Aided Validation Team
|
|
5
|
+
# ================================================================================
|
|
6
|
+
|
|
8
7
|
import numpy as np
|
|
9
8
|
import matplotlib.pyplot as plt
|
|
10
9
|
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"""
|
|
1
|
+
# ================================================================================
|
|
2
|
+
# pyvale: the python validation engine
|
|
3
|
+
# License: MIT
|
|
4
|
+
# Copyright (C) 2025 The Computer Aided Validation Team
|
|
5
|
+
# ================================================================================
|
|
6
|
+
|
|
8
7
|
from typing import Any
|
|
9
8
|
import numpy as np
|
|
10
9
|
import matplotlib.pyplot as plt
|
|
11
|
-
from pyvale.
|
|
12
|
-
from pyvale.
|
|
10
|
+
from pyvale.camera import CameraBasic2D
|
|
11
|
+
from pyvale.visualopts import PlotOptsGeneral
|
|
13
12
|
|
|
14
13
|
# NOTE: This module is a feature under developement.
|
|
15
14
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"""
|
|
1
|
+
# ================================================================================
|
|
2
|
+
# pyvale: the python validation engine
|
|
3
|
+
# License: MIT
|
|
4
|
+
# Copyright (C) 2025 The Computer Aided Validation Team
|
|
5
|
+
# ================================================================================
|
|
6
|
+
|
|
8
7
|
from pathlib import Path
|
|
9
8
|
import enum
|
|
10
9
|
from dataclasses import dataclass
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"""
|
|
1
|
+
# ================================================================================
|
|
2
|
+
# pyvale: the python validation engine
|
|
3
|
+
# License: MIT
|
|
4
|
+
# Copyright (C) 2025 The Computer Aided Validation Team
|
|
5
|
+
# ================================================================================
|
|
6
|
+
|
|
8
7
|
import numpy as np
|
|
9
8
|
#import vtk #NOTE: has to be here to fix latex bug in pyvista/vtk
|
|
10
9
|
# See: https://github.com/pyvista/pyvista/discussions/2928
|
|
11
10
|
#NOTE: causes output to console to be suppressed unfortunately
|
|
12
11
|
import pyvista as pv
|
|
13
|
-
from pyvale.
|
|
14
|
-
from pyvale.
|
|
15
|
-
from pyvale.
|
|
12
|
+
from pyvale.sensorarraypoint import SensorArrayPoint
|
|
13
|
+
from pyvale.visualopts import VisOptsSimSensors, VisOptsAnimation
|
|
14
|
+
from pyvale.visualtools import (create_pv_plotter,
|
|
16
15
|
get_colour_lims,
|
|
17
16
|
set_animation_writer)
|
|
18
|
-
from pyvale.
|
|
17
|
+
from pyvale.visualsimplotter import (add_sensor_points_nom,
|
|
19
18
|
add_sensor_points_pert,
|
|
20
19
|
add_sim_field)
|
|
21
20
|
|