forked from LukeMondy/lithospheric_modelling_recipe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlmrNumerics.xml
481 lines (408 loc) · 21.6 KB
/
lmrNumerics.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<?xml version="1.0"?>
<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
<param name="gravity" units="m*s^-2"> 9.81 </param>
<!-- === Basic numerical controls ========================= -->
<param name="particlesPerCell"> 40 </param>
<param name="courantFactor"> 0.5 </param>
<!-- ====================================================== -->
<!-- === Timestep controls ================================ -->
<!-- timestepFactor = scales the timestep (best not to go >1). If your model "wobbles" or
has flickering in strain-rate or viscosity, try reducing this value.
maxTimeStepSize = if the dt is > than this, cut it back.
DtGranularity = cut the dt back to the nearest factor of this
WARNING! Using a high DtGranularity can result in timesteps of 0!
If this happens, try reducing or removing this number -->
<param name="timestepFactor"> 0.5 </param>
<param name="maxTimeStepSize" units="yr"> 1e7 </param>
<!--param name="DtGranularity" units="yr"> 1000 </param-->
<!-- ===<=================================================== -->
<!-- === Output controls ================================== -->
<list name="FieldVariablesToCheckpoint" mergeType="merge">
<!-- === Must be checkpointed for model restart ===== -->
<param> VelocityField </param>
<param> PressureField </param>
<param> TemperatureField </param>
<param> TemperatureField-phiDotField </param>
<param> StrainRateField </param>
<param> StressField </param>
<!-- ================================================ -->
<param> StrainRateInvariantField </param>
<param> StressInvariantField </param>
<param> isBrittle </param>
<param> BrittleTotalStrainField </param>
<param> BrittleStrainRateField </param>
<param> ViscosityField </param>
<param> MaterialIndexField </param>
</list>
<!-- ====================================================== -->
<struct name="components" mergeType="merge">
<!-- === Defining fundamental forces ========================================== -->
<!-- ====== Buoyancy forces ============================== -->
<struct name="buoyancyFunc">
<!-- buoyancyFunc calculates the force (F = ma) of all the materials in the model domain.
Every particle will be processed as such, using it's value for DensityProperty. -->
<param name="Type">Ppc_a_Vector</param>
<param name="Alpha">DensityProperty</param>
<param name="vi">0</param>
<param name="vj" units="m*s^-2">-9.81</param>
<param name="vk">0</param>
</struct>
<struct name="buoyancyForceTerm" mergeType="replace">
<!-- Hook in our defined buoyancyFunc into the fundamental UW equations,
with buoyancy being defined as a body force (mom_force). -->
<param name="Type">VectorAssemblyTerm_NA__F</param>
<param name="ForceVector">mom_force</param>
<param name="functionLabel">buoyancyFunc</param>
<param name="Swarm">picIntegrationPoints</param>
<param name="Manager">default_ppcManager</param>
</struct>
<!-- ====== End of Buoyancy forces ======================= -->
<!-- ====== Thermal Energy =============================== -->
<struct name="sourceTerms_thermalEqn">
<param name="Type">Ppc_Operation</param>
<param name="Operation"> + </param>
<list name="Properties">
<!-- Add or remove sources of thermal energy via this operation.
NOTE: having just a single term is OK. -->
<param> radiogenicHeating </param>
</list>
</struct>
<!-- radiogenicHeating = radiogenic_heat_production / (heat_capacity * density ) -->
<struct name="radiogenicHeating">
<param name="Type">Ppc_Operation</param>
<param name="Operation"> / </param>
<list name="Properties">
<param>RadiogenicHeatProductionProperty</param>
<param>rho_cp</param>
</list>
</struct>
<struct name="rho_cp">
<param name="Type">Ppc_Operation</param>
<param name="Operation"> * </param>
<list name="Properties">
<param>DensityProperty</param>
<param>CpProperty</param>
</list>
</struct>
<struct name="thermalEqn">
<!-- This struct allows additional energy sources into the system, for
example: radiogenic heating, or some other user computed function, etc.
The sources of energy are incorporated via the sourceTerms_thermalEqn
struct defined above.-->
<param name="Type">VectorAssemblyTerm_NA__F</param>
<param name="ForceVector">residual</param>
<param name="functionLabel">sourceTerms_thermalEqn</param>
<param name="Swarm">picIntegrationPoints</param>
<param name="Manager">default_ppcManager</param>
</struct>
<!-- === Following structs disabled until further testing! === -->
<!--struct name="viscousHeating">
<param name="Type"> ViscousHeatingTermPpc </param>
<param name="ForceVector">residual</param>
<param name="EnergyEqn">EnergyEqn</param>
<param name="Swarm">picIntegrationPoints</param>
<param name="DeviatoricStressField"> StressField </param>
<param name="StrainRateField"> StrainRateField </param>
<param name="DensityLabel"> DensityProperty </param>
<param name="CpLabel"> CpProperty </param>
</struct-->
<struct name="adiabaticHeating">
<param name="Type"> AdiabaticHeatingTermPpc </param>
<param name="ForceVector"> residual </param>
<param name="EnergyEqn"> EnergyEqn </param>
<param name="Swarm"> picIntegrationPoints </param>
<param name="VelocityField"> VelocityField </param>
<param name="TemperatureField"> TemperatureField </param>
<param name="CpLabel"> CpProperty </param>
<param name="ThermalExpansivityLabel"> ThermalExpansivityProperty </param>
</struct>
<struct name="defaultResidualForceTerm" mergeType="replace">
<!-- This struct ensures advection/diffusion is solved. -->
<param name="Type">SUPGAdvDiffTermPpc</param>
<param name="ForceVector">residual</param>
<param name="EnergyEqn">EnergyEqn</param>
<param name="Swarm">picIntegrationPoints</param>
<param name="VelocityField">VelocityField</param>
<param name="PhiField">TemperatureField</param>
<param name="DiffusivityLabel">DiffusivityProperty</param>
</struct>
<!-- ====== End of Thermal Energy ======================== -->
<!-- === End of fundamental forces definitions ========================================== -->
<!-- === The nitty-gritty numerics (best to leave alone if unsure) ====================== -->
<!-- The Ppc Manager-->
<struct name="default_ppcManager">
<param name="Type">PpcManager</param>
<param name="MaterialSwarm"> materialSwarm </param>
<param name="IntegrationSwarm"> picIntegrationPoints </param>
<param name="Scaling">default_scaling</param>
<param name="Mesh"> linearMesh </param>
<param name="Gravity"> gravity </param>
<!-- The "Properties" list defines what MaterialExtensions the model has.
Each property must have a name, and every material defined must reference it.
MaterialExtensions also have a number of optional storage and calculation options:
<param name="StoreOnMesh"> True </param> Store the result on the mesh.
<param name="StoreOnParticles"> True </param> Store the result on the particles.
<param name="StoreNLOnParticles"> True </param> Re-calculate this property on every non-linear iteration.
<param name="StorePreviousValue"> True </param> Store the previous timestep's value on the particles.
<param name="PassiveProperty"> True </param> Force the calculation of this property (Required if the property is not part of the stokes-flow/energy equations).
NOTE: If you have any dependence in your variables on parameters that need to be calculated, e.g., pressure, ensure
you enable StoreNLOnParticle - this means the calculation will use the 'best' result of the non-linear solver.
-->
<list name="Properties">
<struct>
<param name="PropertyName"> DensityProperty </param>
<param name="StoreOnParticles"> True </param>
<param name="StoreOnMesh"> True </param>
<param name="StoreNLOnParticles"> True </param>
</struct>
<!-- === Thermal properties ============== -->
<struct>
<param name="PropertyName"> DiffusivityProperty </param>
</struct>
<struct>
<param name="PropertyName"> CpProperty </param>
</struct>
<struct>
<param name="PropertyName"> ThermalExpansivityProperty </param>
</struct>
<struct>
<param name="PropertyName"> RadiogenicHeatProductionProperty </param>
</struct>
<!-- ===================================== -->
</list>
</struct>
<!-- === Need these Ppc_Constants if you DON'T use melt ============== -->
<struct name="MeltFractionProperty">
<param name="Type"> Ppc_Constant </param>
<param name="Value"> 0 </param>
</struct>
<struct name="MeltFractionLimitProperty">
<param name="Type"> Ppc_Constant </param>
<param name="Value"> 0 </param>
</struct>
<struct name="MeltExpansionProperty">
<param name="Type"> Ppc_Constant </param>
<param name="Value"> 0 </param>
</struct>
<struct name="LiquidusProperty">
<param name="Type"> Ppc_Constant </param>
<param name="Value"> 0 </param>
</struct>
<struct name="SolidusProperty">
<param name="Type"> Ppc_Constant </param>
<param name="Value"> 0 </param>
</struct>
<struct name="LatentHeatFusionProperty">
<param name="Type"> Ppc_Constant </param>
<param name="Value"> 0 </param>
</struct>
<!-- ===================================== -->
<!-- Allow PPC to access variables -->
<struct name="temperature_ppc_wrapper">
<param name="Type">Ppc_Variable</param>
<param name="FieldVariable">TemperatureField</param>
</struct>
<struct name="pressure_ppc_wrapper">
<param name="Type">Ppc_Variable</param>
<param name="FieldVariable">PressureField</param>
</struct>
<!-- === User-defined fields ============================= -->
<!-- Swarm variables are interpolated to the mesh
using SwarmVariableField -->
<struct name="isBrittle">
<param name="Type">SwarmVariableField</param>
<param name="swarmVariable">materialSwarm-HasYielded</param>
<param name="Mesh">linearMesh</param>
<param name="MaterialSwarm">materialSwarm</param>
<param name="Swarm">picIntegrationPoints</param>
<param name="Context">context</param>
</struct>
<struct name="BrittleTotalStrainField">
<param name="Type">SwarmVariableField</param>
<param name="swarmVariable">materialSwarm-PostFailureWeakening</param>
<param name="Mesh">linearMesh</param>
<param name="MaterialSwarm">materialSwarm</param>
<param name="Swarm">picIntegrationPoints</param>
<param name="Context">context</param>
</struct>
<struct name="BrittleStrainRateField">
<param name="Type">SwarmVariableField</param>
<param name="swarmVariable">materialSwarm-PostFailureWeakeningIncrement</param>
<param name="Mesh">linearMesh</param>
<param name="MaterialSwarm">materialSwarm</param>
<param name="Swarm">picIntegrationPoints</param>
<param name="Context">context</param>
</struct>
<!-- Disabled due to bugs -->
<!--
<struct name="cumulativeTotalStrainField">
<param name="Type">SwarmVariableField</param>
<param name="swarmVariable">materialSwarm-cumulativeTotalStrain</param>
<param name="Mesh">linearMesh</param>
<param name="MaterialSwarm">materialSwarm</param>
<param name="Swarm">picIntegrationPoints</param>
<param name="Context">context</param>
</struct>
-->
<!-- ====================================================== -->
<!-- === Scaling options ============================= -->
<!-- If any of these coefficients are not equal to 1.0, then you must
ensure all your values have units assigned.-->
<struct name="default_scaling">
<param name="Type">Scaling</param>
<param name="spaceCoefficient_meters">1.0</param>
<param name="timeCoefficient_seconds">1.0</param>
<param name="massCoefficient_kilograms">1.0</param>
<param name="temperatureCoefficient_kelvin">1.0</param>
<param name="electricCurrentCoefficient_amperes">1</param>
</struct>
<!-- ================================================ -->
<!-- === Solver details ============================= -->
<struct name="weights" mergeType="replace">
<!-- === Most modified ============== -->
<param name="maxDeletions"> 0 </param>
<param name="maxSplits"> 100 </param>
<param name="Inflow"> True </param>
<!-- ================================ -->
<param name="Type"> PCDVC </param>
<param name="resolutionX"> 10 </param>
<param name="resolutionY"> 10 </param>
<param name="resolutionZ"> 10 </param>
<param name="lowerT"> 0.6 </param>
<param name="upperT"> 5 </param>
<param name="Threshold"> 0.95 </param>
<param name="CentPosRatio"> 0.01 </param>
<param name="MaterialPointsSwarm"> materialSwarm </param>
<param name="splitInInterfaceCells"> False </param>
<!--param name="allowSplittingInBoundaryInterfaceCells"> False </param-->
</struct>
<struct name="uzawa" mergeType="merge">
<param name="monitor" mergeType="replace">True</param>
<param name="tolerance" mergeType="replace">@linearTolerance</param>
<param name="maxIterations" mergeType="replace">@linearMaxIterations</param>
<param name="minIterations" mergeType="replace">@linearMinIterations</param>
</struct>
<struct name="stokesEqn" mergeType="merge">
<param name="nonLinearMinIterations" mergeType="replace">@nonLinearMinIterations</param>
<param name="makeConvergenceFile" mergeType="replace"> true </param>
<param name="killNonConvergent" mergeType="replace"> true </param>
</struct>
<!-- ============================================== -->
<!-- === Implementation for flux BCs =============== -->
<struct name="borderCellLayout">
<param name="Type">SingleCellLayout</param>
</struct>
<struct name="borderParticleLayout">
<param name="Type">GaussBorderParticleLayout</param>
</struct>
<struct name="borderGaussSwarm">
<param name="Type">IntegrationPointsSwarm</param>
<param name="CellLayout">borderCellLayout</param>
<param name="ParticleLayout">borderParticleLayout</param>
<param name="FeMesh">elementMesh</param>
<param name="TimeIntegrator">timeIntegrator</param>
<param name="IntegrationPointMapper">borderGaussMapper</param>
</struct>
<struct name="borderGaussMapper">
<param name="Type">GaussMapper</param>
<param name="IntegrationPointsSwarm">borderGaussSwarm</param>
<param name="MaterialPointsSwarm">borderGaussMaterialSwarm</param>
</struct>
<struct name="borderBackgroundLayout">
<param name="Type">BackgroundParticleLayout</param>
</struct>
<struct name="borderGaussMSwarmMovementHandler">
<param name="Type">ParticleMovementHandler</param>
</struct>
<struct name="borderGaussMaterialSwarm">
<param name="Type">MaterialPointsSwarm</param>
<param name="CellLayout">borderCellLayout</param>
<param name="ParticleLayout">borderBackgroundLayout</param>
<param name="FeMesh">elementMesh</param>
<list name="ParticleCommHandlers">
<param>borderGaussMSwarmMovementHandler</param>
</list>
</struct>
<!-- ============================================== -->
<!-- === Mesh parameters ========================== -->
<struct name="linearMeshGenerator" mergeType="merge">
<!-- Forces the mesh to be regular -->
<param name="regular" mergeType="replace">True</param>
</struct>
<!-- ============================================== -->
<!-- === Use multiple thermal timestpes if needed = -->
<struct name="EnergyEqn" mergeType="merge">
<param name="multiThermalSteps"> True </param>
</struct>
<!-- ============================================== -->
</struct>
<list name="plugins" mergeType="merge">
<struct>
<!-- The pressure calibration plugin is used to ensure
Underworld uses real-world pressure values (appr-
oximately). Stokes flow only has a pressure grad-
iant term, so the calibration plugin is used to
ensure it is properly offset.
The plugin calculates the average pressure across
the top of the model, and removes that value from
everywhere in the model. -->
<param name="Type"> Underworld_PressureCalibration </param>
<param name="Context"> context </param>
<param name="UsingTopPressure"> True </param>
<param name="ReferenceHeight"> maxY </param>
</struct>
<!-- The following plugins write a text file into the results
folder, which lists all the swarm and field variables
respectively available for outputting -->
<struct>
<param name="Type"> StgFEM_SwarmVariableList </param>
<param name="Context"> context </param>
</struct>
<struct>
<param name="Type"> StgFEM_FeVariableList </param>
<param name="Context"> context </param>
</struct>
<struct>
<param name="Type"> StgFEM_PeakMemory </param>
<param name="Context"> context </param>
</struct>
</list>
<!-- === Numerical controls (that probably shouldn't be touched) ==== -->
<param name="shadowDepth"> 1 </param>
<param name="allowUnbalancing"> True </param>
<param name="timeIntegratorOrder"> 2 </param>
<!-- ================================================================ -->
<!-- === Mesh parameters ======================= -->
<param name="VerticalAxis"> 1 </param>
<!-- =========================================== -->
<!-- NOTE: All of the following values are ALWAYS overwritten by lmrRunModel.py
They have been relegated to the bottom of this file because they are
should never have to be directly modified by any user. -->
<!-- === Mesh parameters ======================= -->
<!-- These values are always overwritten -->
<param name="dim"> 2 </param>
<param name="elementResI"> 208 </param>
<param name="elementResJ"> 112 </param>
<param name="elementResK"> 0 </param>
<!-- =========================================== -->
<!-- === Numerical tolerance values ============ -->
<!-- These values are always overwritten -->
<param name="linearTolerance"> 1e-5 </param>
<param name="linearMinIterations"> 10 </param>
<param name="linearMaxIterations"> 15000 </param>
<param name="nonLinearTolerance"> 1e-3 </param>
<param name="nonLinearMinIterations"> 10 </param>
<param name="nonLinearMaxIterations"> 500 </param>
<!-- =========================================== -->
<!-- === Output controls ====================== -->
<!-- These values are always overwritten -->
<param name="outputPath"> ./model </param>
<param name="checkpointEvery"> 1000000000 </param>
<param name="dumpEvery"> 1000000000 </param>
<param name="checkpointAtTimeInc" units="yr"> 1e10 </param>
<!-- === Model timing ======================== -->
<!-- These values are always overwritten -->
<param name="maxTimeSteps"> 2000000 </param>
<param name="end" units="yr"> 1e12 </param>
<!-- =========================================== -->
</StGermainData>