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.
- pyvale/__init__.py +89 -0
- pyvale/analyticmeshgen.py +102 -0
- pyvale/analyticsimdatafactory.py +91 -0
- pyvale/analyticsimdatagenerator.py +323 -0
- pyvale/blendercalibrationdata.py +15 -0
- pyvale/blenderlightdata.py +26 -0
- pyvale/blendermaterialdata.py +15 -0
- pyvale/blenderrenderdata.py +30 -0
- pyvale/blenderscene.py +488 -0
- pyvale/blendertools.py +420 -0
- pyvale/camera.py +146 -0
- pyvale/cameradata.py +69 -0
- pyvale/cameradata2d.py +84 -0
- pyvale/camerastereo.py +217 -0
- pyvale/cameratools.py +522 -0
- pyvale/cython/rastercyth.c +32211 -0
- pyvale/cython/rastercyth.cpython-311-x86_64-linux-gnu.so +0 -0
- pyvale/cython/rastercyth.py +640 -0
- pyvale/data/__init__.py +5 -0
- pyvale/data/cal_target.tiff +0 -0
- pyvale/data/case00_HEX20_out.e +0 -0
- pyvale/data/case00_HEX27_out.e +0 -0
- pyvale/data/case00_HEX8_out.e +0 -0
- pyvale/data/case00_TET10_out.e +0 -0
- pyvale/data/case00_TET14_out.e +0 -0
- pyvale/data/case00_TET4_out.e +0 -0
- pyvale/data/case13_out.e +0 -0
- pyvale/data/case16_out.e +0 -0
- pyvale/data/case17_out.e +0 -0
- pyvale/data/case18_1_out.e +0 -0
- pyvale/data/case18_2_out.e +0 -0
- pyvale/data/case18_3_out.e +0 -0
- pyvale/data/case25_out.e +0 -0
- pyvale/data/case26_out.e +0 -0
- pyvale/data/optspeckle_2464x2056px_spec5px_8bit_gblur1px.tiff +0 -0
- pyvale/dataset.py +325 -0
- pyvale/errorcalculator.py +109 -0
- pyvale/errordriftcalc.py +146 -0
- pyvale/errorintegrator.py +336 -0
- pyvale/errorrand.py +607 -0
- pyvale/errorsyscalib.py +134 -0
- pyvale/errorsysdep.py +327 -0
- pyvale/errorsysfield.py +414 -0
- pyvale/errorsysindep.py +808 -0
- pyvale/examples/__init__.py +5 -0
- pyvale/examples/basics/ex1_1_basicscalars_therm2d.py +131 -0
- pyvale/examples/basics/ex1_2_sensormodel_therm2d.py +158 -0
- pyvale/examples/basics/ex1_3_customsens_therm3d.py +216 -0
- pyvale/examples/basics/ex1_4_basicerrors_therm3d.py +153 -0
- pyvale/examples/basics/ex1_5_fielderrs_therm3d.py +168 -0
- pyvale/examples/basics/ex1_6_caliberrs_therm2d.py +133 -0
- pyvale/examples/basics/ex1_7_spatavg_therm2d.py +123 -0
- pyvale/examples/basics/ex2_1_basicvectors_disp2d.py +112 -0
- pyvale/examples/basics/ex2_2_vectorsens_disp2d.py +111 -0
- pyvale/examples/basics/ex2_3_sensangle_disp2d.py +139 -0
- pyvale/examples/basics/ex2_4_chainfielderrs_disp2d.py +196 -0
- pyvale/examples/basics/ex2_5_vectorfields3d_disp3d.py +109 -0
- pyvale/examples/basics/ex3_1_basictensors_strain2d.py +114 -0
- pyvale/examples/basics/ex3_2_tensorsens2d_strain2d.py +111 -0
- pyvale/examples/basics/ex3_3_tensorsens3d_strain3d.py +182 -0
- pyvale/examples/basics/ex4_1_expsim2d_thermmech2d.py +171 -0
- pyvale/examples/basics/ex4_2_expsim3d_thermmech3d.py +252 -0
- pyvale/examples/genanalyticdata/ex1_1_scalarvisualisation.py +35 -0
- pyvale/examples/genanalyticdata/ex1_2_scalarcasebuild.py +43 -0
- pyvale/examples/genanalyticdata/ex2_1_analyticsensors.py +80 -0
- pyvale/examples/imagedef2d/ex_imagedef2d_todisk.py +79 -0
- pyvale/examples/renderblender/ex1_1_blenderscene.py +121 -0
- pyvale/examples/renderblender/ex1_2_blenderdeformed.py +119 -0
- pyvale/examples/renderblender/ex2_1_stereoscene.py +128 -0
- pyvale/examples/renderblender/ex2_2_stereodeformed.py +131 -0
- pyvale/examples/renderblender/ex3_1_blendercalibration.py +120 -0
- pyvale/examples/renderrasterisation/ex_rastenp.py +153 -0
- pyvale/examples/renderrasterisation/ex_rastercyth_oneframe.py +218 -0
- pyvale/examples/renderrasterisation/ex_rastercyth_static_cypara.py +187 -0
- pyvale/examples/renderrasterisation/ex_rastercyth_static_pypara.py +190 -0
- pyvale/examples/visualisation/ex1_1_plot_traces.py +102 -0
- pyvale/examples/visualisation/ex2_1_animate_sim.py +89 -0
- pyvale/experimentsimulator.py +175 -0
- pyvale/field.py +128 -0
- pyvale/fieldconverter.py +351 -0
- pyvale/fieldsampler.py +111 -0
- pyvale/fieldscalar.py +166 -0
- pyvale/fieldtensor.py +218 -0
- pyvale/fieldtransform.py +388 -0
- pyvale/fieldvector.py +213 -0
- pyvale/generatorsrandom.py +505 -0
- pyvale/imagedef2d.py +569 -0
- pyvale/integratorfactory.py +240 -0
- pyvale/integratorquadrature.py +217 -0
- pyvale/integratorrectangle.py +165 -0
- pyvale/integratorspatial.py +89 -0
- pyvale/integratortype.py +43 -0
- pyvale/output.py +17 -0
- pyvale/pyvaleexceptions.py +11 -0
- pyvale/raster.py +31 -0
- pyvale/rastercy.py +77 -0
- pyvale/rasternp.py +603 -0
- pyvale/rendermesh.py +147 -0
- pyvale/sensorarray.py +178 -0
- pyvale/sensorarrayfactory.py +196 -0
- pyvale/sensorarraypoint.py +278 -0
- pyvale/sensordata.py +71 -0
- pyvale/sensordescriptor.py +213 -0
- pyvale/sensortools.py +142 -0
- pyvale/simcases/case00_HEX20.i +242 -0
- pyvale/simcases/case00_HEX27.i +242 -0
- pyvale/simcases/case00_HEX8.i +242 -0
- pyvale/simcases/case00_TET10.i +242 -0
- pyvale/simcases/case00_TET14.i +242 -0
- pyvale/simcases/case00_TET4.i +242 -0
- pyvale/simcases/case01.i +101 -0
- pyvale/simcases/case02.i +156 -0
- pyvale/simcases/case03.i +136 -0
- pyvale/simcases/case04.i +181 -0
- pyvale/simcases/case05.i +234 -0
- pyvale/simcases/case06.i +305 -0
- pyvale/simcases/case07.geo +135 -0
- pyvale/simcases/case07.i +87 -0
- pyvale/simcases/case08.geo +144 -0
- pyvale/simcases/case08.i +153 -0
- pyvale/simcases/case09.geo +204 -0
- pyvale/simcases/case09.i +87 -0
- pyvale/simcases/case10.geo +204 -0
- pyvale/simcases/case10.i +257 -0
- pyvale/simcases/case11.geo +337 -0
- pyvale/simcases/case11.i +147 -0
- pyvale/simcases/case12.geo +388 -0
- pyvale/simcases/case12.i +329 -0
- pyvale/simcases/case13.i +140 -0
- pyvale/simcases/case14.i +159 -0
- pyvale/simcases/case15.geo +337 -0
- pyvale/simcases/case15.i +150 -0
- pyvale/simcases/case16.geo +391 -0
- pyvale/simcases/case16.i +357 -0
- pyvale/simcases/case17.geo +135 -0
- pyvale/simcases/case17.i +144 -0
- pyvale/simcases/case18.i +254 -0
- pyvale/simcases/case18_1.i +254 -0
- pyvale/simcases/case18_2.i +254 -0
- pyvale/simcases/case18_3.i +254 -0
- pyvale/simcases/case19.geo +252 -0
- pyvale/simcases/case19.i +99 -0
- pyvale/simcases/case20.geo +252 -0
- pyvale/simcases/case20.i +250 -0
- pyvale/simcases/case21.geo +74 -0
- pyvale/simcases/case21.i +155 -0
- pyvale/simcases/case22.geo +82 -0
- pyvale/simcases/case22.i +140 -0
- pyvale/simcases/case23.geo +164 -0
- pyvale/simcases/case23.i +140 -0
- pyvale/simcases/case24.geo +79 -0
- pyvale/simcases/case24.i +123 -0
- pyvale/simcases/case25.geo +82 -0
- pyvale/simcases/case25.i +140 -0
- pyvale/simcases/case26.geo +166 -0
- pyvale/simcases/case26.i +140 -0
- pyvale/simcases/run_1case.py +61 -0
- pyvale/simcases/run_all_cases.py +69 -0
- pyvale/simcases/run_build_case.py +64 -0
- pyvale/simcases/run_example_cases.py +69 -0
- pyvale/simtools.py +67 -0
- pyvale/visualexpplotter.py +191 -0
- pyvale/visualimagedef.py +74 -0
- pyvale/visualimages.py +76 -0
- pyvale/visualopts.py +493 -0
- pyvale/visualsimanimator.py +111 -0
- pyvale/visualsimsensors.py +318 -0
- pyvale/visualtools.py +136 -0
- pyvale/visualtraceplotter.py +142 -0
- pyvale-2025.5.3.dist-info/METADATA +144 -0
- pyvale-2025.5.3.dist-info/RECORD +175 -0
- pyvale-2025.5.3.dist-info/WHEEL +6 -0
- pyvale-2025.5.3.dist-info/licenses/LICENSE +21 -0
- pyvale-2025.5.3.dist-info/top_level.txt +1 -0
- pyvale.libs/libgomp-a34b3233.so.1.0.0 +0 -0
pyvale/simcases/case16.i
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
#-------------------------------------------------------------------------
|
|
2
|
+
# pyvale: gmsh,monoblock,3mat,thermal/mechanical,transient
|
|
3
|
+
#-------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
#-------------------------------------------------------------------------
|
|
6
|
+
#_* MOOSEHERDER VARIABLES - START
|
|
7
|
+
|
|
8
|
+
endTime = 20
|
|
9
|
+
timeStep = 1
|
|
10
|
+
|
|
11
|
+
coolantTemp= 150.0 # degC
|
|
12
|
+
heatTransCoeff= 125.0e3 # W.m^-2.K^-1
|
|
13
|
+
surfHeatFlux= 4.67e6 # W.m^-2, taken from Adel's first paper
|
|
14
|
+
timeConst = 1 # s
|
|
15
|
+
|
|
16
|
+
# Material Properties:
|
|
17
|
+
# Thermal Props: Copper-Chromium-Zirconium pg.148 at 200degC
|
|
18
|
+
cucrzrDensity = 8816.0 # kg.m^-3
|
|
19
|
+
cucrzrThermCond = 343.0 # W.m^-1.K^-1
|
|
20
|
+
cucrzrSpecHeat = 407.0 # J.kg^-1.K^-1
|
|
21
|
+
|
|
22
|
+
# Thermal Props: 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
|
+
# Thermal Props: Tungsten at 600degC
|
|
28
|
+
wDensity = 19150.0 # kg.m^-3
|
|
29
|
+
wThermCond = 127.0 # W.m^-1.K^-1
|
|
30
|
+
wSpecHeat = 147.0 # J.kg^-1.K^-1
|
|
31
|
+
|
|
32
|
+
# Mechanical Props: Copper-Chromium-Zirconium at 200degC
|
|
33
|
+
cucrzrEMod = 123e9 # Pa
|
|
34
|
+
cucrzrPRatio = 0.33 # -
|
|
35
|
+
|
|
36
|
+
# Mechanical Props: OFHC Copper at 250degC
|
|
37
|
+
cuEMod = 108e9 # Pa
|
|
38
|
+
cuPRatio = 0.33 # -
|
|
39
|
+
|
|
40
|
+
# Mechanical Props: Tungsten at 250degC
|
|
41
|
+
wEMod = 387e9 # Pa
|
|
42
|
+
wPRatio = 0.29 # -
|
|
43
|
+
|
|
44
|
+
# Thermo-mechanical coupling
|
|
45
|
+
stressFreeTemp = ${coolantTemp} # degC
|
|
46
|
+
cucrzrThermExp = 17.7e-6 # 1/degC
|
|
47
|
+
cuThermExp = 17.8e-6 # 1/degC
|
|
48
|
+
wThermExp = 4.72e-6 # 1/degC
|
|
49
|
+
|
|
50
|
+
# Mesh file string
|
|
51
|
+
mesh_file = 'case16.msh'
|
|
52
|
+
|
|
53
|
+
#** MOOSEHERDER VARIABLES - END
|
|
54
|
+
#-------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
[GlobalParams]
|
|
57
|
+
displacements = 'disp_x disp_y disp_z'
|
|
58
|
+
[]
|
|
59
|
+
|
|
60
|
+
[Mesh]
|
|
61
|
+
type = FileMesh
|
|
62
|
+
file = ${mesh_file}
|
|
63
|
+
[]
|
|
64
|
+
|
|
65
|
+
[Variables]
|
|
66
|
+
[temperature]
|
|
67
|
+
family = LAGRANGE
|
|
68
|
+
order = SECOND
|
|
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
|
+
[Modules/TensorMechanics/Master]
|
|
85
|
+
[all]
|
|
86
|
+
strain = SMALL # SMALL or FINITE
|
|
87
|
+
incremental = true
|
|
88
|
+
add_variables = true
|
|
89
|
+
material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
|
|
90
|
+
material_output_order = FIRST # CONSTANT, FIRST, SECOND,
|
|
91
|
+
automatic_eigenstrain_names = true
|
|
92
|
+
generate_output = 'strain_xx strain_xy strain_xz strain_yx strain_yy strain_yz strain_zx strain_zy strain_zz'
|
|
93
|
+
[]
|
|
94
|
+
[]
|
|
95
|
+
|
|
96
|
+
[Materials]
|
|
97
|
+
[cucrzr_thermal]
|
|
98
|
+
type = HeatConductionMaterial
|
|
99
|
+
thermal_conductivity = ${cucrzrThermCond}
|
|
100
|
+
specific_heat = ${cucrzrSpecHeat}
|
|
101
|
+
block = 'pipe-cucrzr'
|
|
102
|
+
[]
|
|
103
|
+
[cucrzr_density]
|
|
104
|
+
type = GenericConstantMaterial
|
|
105
|
+
prop_names = 'density'
|
|
106
|
+
prop_values = ${cucrzrDensity}
|
|
107
|
+
block = 'pipe-cucrzr'
|
|
108
|
+
[]
|
|
109
|
+
[cucrzr_elasticity]
|
|
110
|
+
type = ComputeIsotropicElasticityTensor
|
|
111
|
+
youngs_modulus = ${cucrzrEMod}
|
|
112
|
+
poissons_ratio = ${cucrzrPRatio}
|
|
113
|
+
block = 'pipe-cucrzr'
|
|
114
|
+
[]
|
|
115
|
+
[cucrzr_expansion]
|
|
116
|
+
type = ComputeThermalExpansionEigenstrain
|
|
117
|
+
temperature = temperature
|
|
118
|
+
stress_free_temperature = ${stressFreeTemp}
|
|
119
|
+
thermal_expansion_coeff = ${cucrzrThermExp}
|
|
120
|
+
eigenstrain_name = thermal_expansion_eigenstrain
|
|
121
|
+
block = 'pipe-cucrzr'
|
|
122
|
+
[]
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
[copper_thermal]
|
|
126
|
+
type = HeatConductionMaterial
|
|
127
|
+
thermal_conductivity = ${cuThermCond}
|
|
128
|
+
specific_heat = ${cuSpecHeat}
|
|
129
|
+
block = 'interlayer-cu'
|
|
130
|
+
[]
|
|
131
|
+
[copper_density]
|
|
132
|
+
type = GenericConstantMaterial
|
|
133
|
+
prop_names = 'density'
|
|
134
|
+
prop_values = ${cuDensity}
|
|
135
|
+
block = 'interlayer-cu'
|
|
136
|
+
[]
|
|
137
|
+
[copper_elasticity]
|
|
138
|
+
type = ComputeIsotropicElasticityTensor
|
|
139
|
+
youngs_modulus = ${cuEMod}
|
|
140
|
+
poissons_ratio = ${cuPRatio}
|
|
141
|
+
block = 'interlayer-cu'
|
|
142
|
+
[]
|
|
143
|
+
[copper_expansion]
|
|
144
|
+
type = ComputeThermalExpansionEigenstrain
|
|
145
|
+
temperature = temperature
|
|
146
|
+
stress_free_temperature = ${stressFreeTemp}
|
|
147
|
+
thermal_expansion_coeff = ${cuThermExp}
|
|
148
|
+
eigenstrain_name = thermal_expansion_eigenstrain
|
|
149
|
+
block = 'interlayer-cu'
|
|
150
|
+
[]
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
[tungsten_thermal]
|
|
154
|
+
type = HeatConductionMaterial
|
|
155
|
+
thermal_conductivity = ${wThermCond}
|
|
156
|
+
specific_heat = ${wSpecHeat}
|
|
157
|
+
block = 'armour-w'
|
|
158
|
+
[]
|
|
159
|
+
[tungsten_density]
|
|
160
|
+
type = GenericConstantMaterial
|
|
161
|
+
prop_names = 'density'
|
|
162
|
+
prop_values = ${wDensity}
|
|
163
|
+
block = 'armour-w'
|
|
164
|
+
[]
|
|
165
|
+
[tungsten_elasticity]
|
|
166
|
+
type = ComputeIsotropicElasticityTensor
|
|
167
|
+
youngs_modulus = ${wEMod}
|
|
168
|
+
poissons_ratio = ${wPRatio}
|
|
169
|
+
block = 'armour-w'
|
|
170
|
+
[]
|
|
171
|
+
[tungsten_expansion]
|
|
172
|
+
type = ComputeThermalExpansionEigenstrain
|
|
173
|
+
temperature = temperature
|
|
174
|
+
stress_free_temperature = ${stressFreeTemp}
|
|
175
|
+
thermal_expansion_coeff = ${wThermExp}
|
|
176
|
+
eigenstrain_name = thermal_expansion_eigenstrain
|
|
177
|
+
block = 'armour-w'
|
|
178
|
+
[]
|
|
179
|
+
|
|
180
|
+
[stress]
|
|
181
|
+
type = ComputeFiniteStrainElasticStress # ComputeLinearElasticStress or ComputeFiniteStrainElasticStress
|
|
182
|
+
[]
|
|
183
|
+
[]
|
|
184
|
+
|
|
185
|
+
[BCs]
|
|
186
|
+
[heat_flux_in]
|
|
187
|
+
type = FunctionNeumannBC
|
|
188
|
+
variable = temperature
|
|
189
|
+
boundary = 'bc-top-heatflux'
|
|
190
|
+
function = '${fparse surfHeatFlux}*(1-exp(-(1/${timeConst})*t))'
|
|
191
|
+
#function = '${fparse surfHeatFlux}*(t/${fparse endTime/2})'
|
|
192
|
+
[]
|
|
193
|
+
[heat_flux_out]
|
|
194
|
+
type = ConvectiveHeatFluxBC
|
|
195
|
+
variable = temperature
|
|
196
|
+
boundary = 'bc-pipe-heattransf'
|
|
197
|
+
T_infinity = ${coolantTemp}
|
|
198
|
+
heat_transfer_coefficient = ${heatTransCoeff}
|
|
199
|
+
[]
|
|
200
|
+
|
|
201
|
+
# Lock disp_y for base
|
|
202
|
+
# NOTE: if locking y on base need to comment all disp_y conditions below
|
|
203
|
+
[mech_bc_c_dispy]
|
|
204
|
+
type = DirichletBC
|
|
205
|
+
variable = disp_y
|
|
206
|
+
boundary = 'bc-base-disp'
|
|
207
|
+
value = 0.0
|
|
208
|
+
[]
|
|
209
|
+
|
|
210
|
+
# Lock all disp DOFs at the center of the block
|
|
211
|
+
[mech_bc_c_dispx]
|
|
212
|
+
type = DirichletBC
|
|
213
|
+
variable = disp_x
|
|
214
|
+
boundary = 'bc-c-point-xyz-mech'
|
|
215
|
+
value = 0.0
|
|
216
|
+
[]
|
|
217
|
+
#[mech_bc_c_dispy]
|
|
218
|
+
# type = DirichletBC
|
|
219
|
+
# variable = disp_y
|
|
220
|
+
# boundary = 'bc-c-point-xyz-mech'
|
|
221
|
+
# value = 0.0
|
|
222
|
+
#[]
|
|
223
|
+
[mech_bc_c_dispz]
|
|
224
|
+
type = DirichletBC
|
|
225
|
+
variable = disp_z
|
|
226
|
+
boundary = 'bc-c-point-xyz-mech'
|
|
227
|
+
value = 0.0
|
|
228
|
+
[]
|
|
229
|
+
|
|
230
|
+
# Lock disp yz along the x (left-right) axis
|
|
231
|
+
#[mech_bc_l_dispy]
|
|
232
|
+
# type = DirichletBC
|
|
233
|
+
# variable = disp_y
|
|
234
|
+
# boundary = 'bc-l-point-yz-mech'
|
|
235
|
+
# value = 0.0
|
|
236
|
+
#[]
|
|
237
|
+
[mech_bc_l_dispz]
|
|
238
|
+
type = DirichletBC
|
|
239
|
+
variable = disp_z
|
|
240
|
+
boundary = 'bc-l-point-yz-mech'
|
|
241
|
+
value = 0.0
|
|
242
|
+
[]
|
|
243
|
+
#[mech_bc_r_dispy]
|
|
244
|
+
# type = DirichletBC
|
|
245
|
+
# variable = disp_y
|
|
246
|
+
# boundary = 'bc-r-point-yz-mech'
|
|
247
|
+
# value = 0.0
|
|
248
|
+
#[]
|
|
249
|
+
[mech_bc_r_dispz]
|
|
250
|
+
type = DirichletBC
|
|
251
|
+
variable = disp_z
|
|
252
|
+
boundary = 'bc-r-point-yz-mech'
|
|
253
|
+
value = 0.0
|
|
254
|
+
[]
|
|
255
|
+
|
|
256
|
+
# Lock disp xy along the z (front-back) axis
|
|
257
|
+
[mech_bc_f_dispx]
|
|
258
|
+
type = DirichletBC
|
|
259
|
+
variable = disp_x
|
|
260
|
+
boundary = 'bc-f-point-xy-mech'
|
|
261
|
+
value = 0.0
|
|
262
|
+
[]
|
|
263
|
+
#[mech_bc_f_dispy]
|
|
264
|
+
# type = DirichletBC
|
|
265
|
+
# variable = disp_y
|
|
266
|
+
# boundary = 'bc-f-point-xy-mech'
|
|
267
|
+
# value = 0.0
|
|
268
|
+
#[]
|
|
269
|
+
[mech_bc_b_dispx]
|
|
270
|
+
type = DirichletBC
|
|
271
|
+
variable = disp_x
|
|
272
|
+
boundary = 'bc-b-point-xy-mech'
|
|
273
|
+
value = 0.0
|
|
274
|
+
[]
|
|
275
|
+
#[mech_bc_b_dispy]
|
|
276
|
+
# type = DirichletBC
|
|
277
|
+
# variable = disp_y
|
|
278
|
+
# boundary = 'bc-b-point-xy-mech'
|
|
279
|
+
# value = 0.0
|
|
280
|
+
#[]
|
|
281
|
+
[]
|
|
282
|
+
|
|
283
|
+
[Preconditioning]
|
|
284
|
+
[smp]
|
|
285
|
+
type = SMP
|
|
286
|
+
full = true
|
|
287
|
+
[]
|
|
288
|
+
[]
|
|
289
|
+
|
|
290
|
+
[Executioner]
|
|
291
|
+
type = Transient
|
|
292
|
+
|
|
293
|
+
solve_type = 'NEWTON' # PJNFK or NEWTON
|
|
294
|
+
petsc_options = '-snes_converged_reason'
|
|
295
|
+
petsc_options_iname = '-pc_type -pc_hypre_type'
|
|
296
|
+
petsc_options_value = 'hypre boomeramg'
|
|
297
|
+
line_search = 'none'
|
|
298
|
+
|
|
299
|
+
l_max_its = 1000
|
|
300
|
+
l_tol = 1e-6
|
|
301
|
+
|
|
302
|
+
nl_max_its = 50
|
|
303
|
+
nl_rel_tol = 1e-6
|
|
304
|
+
nl_abs_tol = 1e-6
|
|
305
|
+
|
|
306
|
+
start_time=0.0
|
|
307
|
+
end_time = ${endTime}
|
|
308
|
+
dt = ${timeStep}
|
|
309
|
+
|
|
310
|
+
[Predictor]
|
|
311
|
+
type = SimplePredictor
|
|
312
|
+
scale = 1
|
|
313
|
+
[]
|
|
314
|
+
[]
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
[Postprocessors]
|
|
318
|
+
[temp_max]
|
|
319
|
+
type = NodalExtremeValue
|
|
320
|
+
variable = temperature
|
|
321
|
+
[]
|
|
322
|
+
[temp_avg]
|
|
323
|
+
type = AverageNodalVariableValue
|
|
324
|
+
variable = temperature
|
|
325
|
+
[]
|
|
326
|
+
|
|
327
|
+
[disp_x_max]
|
|
328
|
+
type = NodalExtremeValue
|
|
329
|
+
variable = disp_x
|
|
330
|
+
[]
|
|
331
|
+
[disp_y_max]
|
|
332
|
+
type = NodalExtremeValue
|
|
333
|
+
variable = disp_y
|
|
334
|
+
[]
|
|
335
|
+
[disp_z_max]
|
|
336
|
+
type = NodalExtremeValue
|
|
337
|
+
variable = disp_z
|
|
338
|
+
[]
|
|
339
|
+
|
|
340
|
+
[strain_xx_max]
|
|
341
|
+
type = ElementExtremeValue
|
|
342
|
+
variable = strain_xx
|
|
343
|
+
[]
|
|
344
|
+
[strain_yy_max]
|
|
345
|
+
type = ElementExtremeValue
|
|
346
|
+
variable = strain_yy
|
|
347
|
+
[]
|
|
348
|
+
[strain_zz_max]
|
|
349
|
+
type = ElementExtremeValue
|
|
350
|
+
variable = strain_zz
|
|
351
|
+
[]
|
|
352
|
+
[]
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
[Outputs]
|
|
356
|
+
exodus = true
|
|
357
|
+
[]
|
|
@@ -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 = "case17.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;
|
pyvale/simcases/case17.i
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#-------------------------------------------------------------------------
|
|
2
|
+
# pyvale: simple,2DplateWHole,mechanical,transient
|
|
3
|
+
#-------------------------------------------------------------------------
|
|
4
|
+
# NOTE: default 2D MOOSE solid mechanics is plane strain
|
|
5
|
+
|
|
6
|
+
#-------------------------------------------------------------------------
|
|
7
|
+
#_* MOOSEHERDER VARIABLES - START
|
|
8
|
+
|
|
9
|
+
endTime = 60
|
|
10
|
+
timeStep = 1
|
|
11
|
+
|
|
12
|
+
# Mechanical Loads/BCs
|
|
13
|
+
topDispRate = ${fparse 1.5e-3 / 60} # m/s
|
|
14
|
+
|
|
15
|
+
# Material Properties: OFHC Copper 250degC
|
|
16
|
+
cuEMod= 108e9 # Pa
|
|
17
|
+
cuPRatio = 0.33 # -
|
|
18
|
+
|
|
19
|
+
#** MOOSEHERDER VARIABLES - END
|
|
20
|
+
#-------------------------------------------------------------------------
|
|
21
|
+
|
|
22
|
+
[GlobalParams]
|
|
23
|
+
displacements = 'disp_x disp_y'
|
|
24
|
+
[]
|
|
25
|
+
|
|
26
|
+
[Mesh]
|
|
27
|
+
type = FileMesh
|
|
28
|
+
file = 'case17.msh'
|
|
29
|
+
[]
|
|
30
|
+
|
|
31
|
+
[Modules/TensorMechanics/Master]
|
|
32
|
+
[all]
|
|
33
|
+
strain = SMALL
|
|
34
|
+
incremental = true
|
|
35
|
+
add_variables = true
|
|
36
|
+
material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
|
|
37
|
+
material_output_order = FIRST # CONSTANT, FIRST, SECOND,
|
|
38
|
+
generate_output = 'vonmises_stress stress_xx stress_yy stress_xy strain_xx strain_yy strain_xy'
|
|
39
|
+
[]
|
|
40
|
+
[]
|
|
41
|
+
|
|
42
|
+
[BCs]
|
|
43
|
+
[bottom_x]
|
|
44
|
+
type = DirichletBC
|
|
45
|
+
variable = disp_x
|
|
46
|
+
boundary = 'bc-base'
|
|
47
|
+
value = 0
|
|
48
|
+
[]
|
|
49
|
+
[bottom_y]
|
|
50
|
+
type = DirichletBC
|
|
51
|
+
variable = disp_y
|
|
52
|
+
boundary = 'bc-base'
|
|
53
|
+
value = 0
|
|
54
|
+
[]
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
[top_x]
|
|
58
|
+
type = DirichletBC
|
|
59
|
+
variable = disp_x
|
|
60
|
+
boundary = 'bc-top'
|
|
61
|
+
value = 0.0
|
|
62
|
+
[]
|
|
63
|
+
[top_y]
|
|
64
|
+
type = FunctionDirichletBC
|
|
65
|
+
variable = disp_y
|
|
66
|
+
boundary = 'bc-top'
|
|
67
|
+
function = '${topDispRate}*t'
|
|
68
|
+
[]
|
|
69
|
+
[]
|
|
70
|
+
|
|
71
|
+
[Materials]
|
|
72
|
+
[elasticity]
|
|
73
|
+
type = ComputeIsotropicElasticityTensor
|
|
74
|
+
youngs_modulus = ${cuEMod}
|
|
75
|
+
poissons_ratio = ${cuPRatio}
|
|
76
|
+
[]
|
|
77
|
+
[stress]
|
|
78
|
+
type = ComputeFiniteStrainElasticStress
|
|
79
|
+
[]
|
|
80
|
+
[]
|
|
81
|
+
|
|
82
|
+
[Preconditioning]
|
|
83
|
+
[SMP]
|
|
84
|
+
type = SMP
|
|
85
|
+
full = true
|
|
86
|
+
[]
|
|
87
|
+
[]
|
|
88
|
+
|
|
89
|
+
[Executioner]
|
|
90
|
+
type = Transient
|
|
91
|
+
solve_type = 'PJFNK'
|
|
92
|
+
petsc_options_iname = '-pc_type -pc_hypre_type'
|
|
93
|
+
petsc_options_value = 'hypre boomeramg'
|
|
94
|
+
end_time= ${endTime}
|
|
95
|
+
dt = ${timeStep}
|
|
96
|
+
[]
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
[Postprocessors]
|
|
100
|
+
[react_y_bot]
|
|
101
|
+
type = SidesetReaction
|
|
102
|
+
direction = '0 1 0'
|
|
103
|
+
stress_tensor = stress
|
|
104
|
+
boundary = 'bc-base'
|
|
105
|
+
[]
|
|
106
|
+
[react_y_top]
|
|
107
|
+
type = SidesetReaction
|
|
108
|
+
direction = '0 1 0'
|
|
109
|
+
stress_tensor = stress
|
|
110
|
+
boundary = 'bc-top'
|
|
111
|
+
[]
|
|
112
|
+
|
|
113
|
+
[disp_y_max]
|
|
114
|
+
type = NodalExtremeValue
|
|
115
|
+
variable = disp_y
|
|
116
|
+
[]
|
|
117
|
+
[disp_x_max]
|
|
118
|
+
type = NodalExtremeValue
|
|
119
|
+
variable = disp_x
|
|
120
|
+
[]
|
|
121
|
+
|
|
122
|
+
[max_yy_stress]
|
|
123
|
+
type = ElementExtremeValue
|
|
124
|
+
variable = stress_yy
|
|
125
|
+
[]
|
|
126
|
+
|
|
127
|
+
[strain_yy_avg]
|
|
128
|
+
type = ElementAverageValue
|
|
129
|
+
variable = strain_yy
|
|
130
|
+
[]
|
|
131
|
+
[strain_xx_avg]
|
|
132
|
+
type = ElementAverageValue
|
|
133
|
+
variable = strain_xx
|
|
134
|
+
[]
|
|
135
|
+
|
|
136
|
+
[stress_vm_max]
|
|
137
|
+
type = ElementExtremeValue
|
|
138
|
+
variable = vonmises_stress
|
|
139
|
+
[]
|
|
140
|
+
[]
|
|
141
|
+
|
|
142
|
+
[Outputs]
|
|
143
|
+
exodus = true
|
|
144
|
+
[]
|