-
Notifications
You must be signed in to change notification settings - Fork 0
/
Wide_Rift_Extension.py
577 lines (457 loc) · 28.7 KB
/
Wide_Rift_Extension.py
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
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
# %%
import matplotlib.pyplot as plt
import underworld as uw
from underworld import UWGeodynamics as GEO
import underworld.function as fn
from underworld.UWGeodynamics.surfaceProcesses import SedimentationThreshold
import numpy as np
import scipy
import os.path
from mpi4py import MPI
import argparse
import math
# %%
u = GEO.UnitRegistry
GEO.rcParams["CFL"] = 0.2
GEO.rcParams["shear.heating"] = True
GEO.rcParams["popcontrol.split.threshold"] = 0.95
GEO.rcParams["popcontrol.max.splits"] = 100
GEO.rcParams["swarm.particles.per.cell.2D"] = 60
GEO.rcParams["popcontrol.particles.per.cell.2D"] = 60
GEO.rcParams["advection.diffusion.method"] = "SLCN"
# %%
resolution = (1360,440) #500 m resolution
half_rate = 1 * u.centimeter / u.year
model_length = 680e3 * u.meter
model_height = 210e3 * u.meter
surfaceTemp = 293.15 * u.degK
baseModelTemp = 1603.15 * u.degK
bodyforce = 3150 * u.kilogram / u.metre**3 * 9.81 * u.meter / u.second**2
KL = model_length
Kt = KL / half_rate
KM = bodyforce * KL**2 * Kt**2
KT = (baseModelTemp - surfaceTemp)
GEO.scaling_coefficients["[length]"] = KL
GEO.scaling_coefficients["[time]"] = Kt
GEO.scaling_coefficients["[mass]"]= KM
GEO.scaling_coefficients["[temperature]"] = KT
# %%
Model = GEO.Model(elementRes=resolution,
minCoord=(0. * u.kilometer, -190. * u.kilometer),
maxCoord=(680. * u.kilometer, 30. * u.kilometer),
gravity=(0.0, -9.81 * u.meter / u.second**2))
Model.outputDir="Wide_Rift_Extension_O"
Model.diffusivity = 9e-7 * u.metre**2 / u.second
Model.capacity = 1000. * u.joule / (u.kelvin * u.kilogram)
# %%
air = Model.add_material(name="Air", shape=GEO.shapes.Layer(top=Model.top, bottom=0 * u.kilometer))
air.density = 1. * u.kilogram / u.metre**3
air.diffusivity = 1e-5 * u.metre**2 / u.second
air.capacity = 100. * u.joule / (u.kelvin * u.kilogram)
air.compressibility = None
# %%
sediment = Model.add_material(name="Sediment")
sediment.density = GEO.LinearDensity(reference_density=2300. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
sediment.radiogenicHeatProd = 1.15e-6 * u.microwatt / u.meter**3
Sediment1 = Model.add_material(name="Sediment Layer 1", shape=GEO.shapes.Layer(top=0. * u.kilometer, bottom=-1. * u.kilometer))
Sediment1.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
Sediment1.density = GEO.LinearDensity(reference_density = 2600. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
Sediment2 = Model.add_material(name="Sediment Layer 2", shape=GEO.shapes.Layer(top=-1. * u.kilometer, bottom=-2. * u.kilometer))
Sediment2.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
Sediment2.density = GEO.LinearDensity(reference_density = 2600. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
Sediment3 = Model.add_material(name="Sediment Layer 3", shape=GEO.shapes.Layer(top=-2. * u.kilometer, bottom=-3. * u.kilometer))
Sediment3.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
Sediment3.density = GEO.LinearDensity(reference_density = 2600. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
Sediment4 = Model.add_material(name="Sediment Layer 4", shape=GEO.shapes.Layer(top=-3. * u.kilometer, bottom=-4. * u.kilometer))
Sediment4.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
Sediment4.density = GEO.LinearDensity(reference_density = 2600. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
Sediment5 = Model.add_material(name="Sediment Layer 5", shape=GEO.shapes.Layer(top=-4. * u.kilometer, bottom=-5. * u.kilometer))
Sediment5.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
Sediment5.density = GEO.LinearDensity(reference_density = 2600. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
Sediment6 = Model.add_material(name="Sediment Layer 6", shape=GEO.shapes.Layer(top=-5. * u.kilometer, bottom=-6. * u.kilometer))
Sediment6.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
Sediment6.density = GEO.LinearDensity(reference_density = 2600. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
# %%
continentalcrustL3 = Model.add_material(name="Continental Crust Layer3", shape=GEO.shapes.Layer(top=-6. * u.kilometer, bottom=-9. * u.kilometer))
continentalcrustL3.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
continentalcrustL3.density = GEO.LinearDensity(reference_density = 2675. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
continentalcrustL4 = Model.add_material(name="Continental Crust Layer4", shape=GEO.shapes.Layer(top=-9. * u.kilometer, bottom=-12. * u.kilometer))
continentalcrustL4.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
continentalcrustL4.density = GEO.LinearDensity(reference_density = 2675. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
continentalcrustL5 = Model.add_material(name="Continental Crust Layer5", shape=GEO.shapes.Layer(top=-12. * u.kilometer, bottom=-15. * u.kilometer))
continentalcrustL5.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
continentalcrustL5.density = GEO.LinearDensity(reference_density = 2700. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
continentalcrustL6 = Model.add_material(name="Continental Crust Layer6", shape=GEO.shapes.Layer(top=-15. * u.kilometer, bottom=-18. * u.kilometer))
continentalcrustL6.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
continentalcrustL6.density = GEO.LinearDensity(reference_density = 2725. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
continentalcrustL7 = Model.add_material(name="Continental Crust Layer7", shape=GEO.shapes.Layer(top=-18. * u.kilometer, bottom=-21. * u.kilometer))
continentalcrustL7.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
continentalcrustL7.density = GEO.LinearDensity(reference_density = 2750. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
continentalcrustL8 = Model.add_material(name="Continental Crust Layer8", shape=GEO.shapes.Layer(top=-21. * u.kilometer, bottom=-24. * u.kilometer))
continentalcrustL8.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
continentalcrustL8.density = GEO.LinearDensity(reference_density = 2775. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
continentalcrustL9 = Model.add_material(name="Continental Crust Layer9", shape=GEO.shapes.Layer(top=-24. * u.kilometer, bottom=-27. * u.kilometer))
continentalcrustL9.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
continentalcrustL9.density = GEO.LinearDensity(reference_density = 2800. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
continentalcrustL10 = Model.add_material(name="Continental Crust Layer10", shape=GEO.shapes.Layer(top=-27. * u.kilometer, bottom=-36. * u.kilometer))
continentalcrustL10.radiogenicHeatProd = 1.15e-6 * u.watt / u.meter**3
continentalcrustL10.density = GEO.LinearDensity(reference_density = 2825. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
# %%
uppermantle = Model.add_material(name="Upper Mantle", shape=GEO.shapes.Layer(top=-36. * u.kilometer, bottom=-76. * u.kilometer))
uppermantle.density = GEO.LinearDensity(reference_density=3370. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
uppermantle.temperatureLimiter = 1603. * u.kelvin
asthenosphere = Model.add_material(name="Asthenosphere", shape=GEO.shapes.Layer(top=-76. * u.kilometer, bottom=Model.bottom))
asthenosphere.density = GEO.LinearDensity(reference_density=3370. * u.kilogram / u.metre**3,
thermalExpansivity= 2.8e-5 * u.kelvin**-1)
asthenosphere.temperatureLimiter = 1603. * u.kelvin
# %%
rh = GEO.ViscousCreepRegistry()
Model.minViscosity = 1e18 * u.pascal * u.second
Model.maxViscosity = 5e23 * u.pascal * u.second
air.viscosity = 1e18 * u.pascal * u.second
sediment.viscosity = 0.1 * rh.Wet_Quartz_Dislocation_Paterson_and_Luan_1990
Sediment1.viscosity = 1e20 * u.pascal *u.second
Sediment2.viscosity = 0.1 * rh.Wet_Quartz_Dislocation_Paterson_and_Luan_1990
Sediment3.viscosity = 0.1 * rh.Wet_Quartz_Dislocation_Paterson_and_Luan_1990
Sediment4.viscosity = 0.1 * rh.Wet_Quartz_Dislocation_Paterson_and_Luan_1990
Sediment5.viscosity = 0.1 * rh.Wet_Quartz_Dislocation_Paterson_and_Luan_1990
Sediment6.viscosity = 0.1 * rh.Wet_Quartz_Dislocation_Paterson_and_Luan_1990
continentalcrustL3.viscosity = rh.Wet_Quartz_Dislocation_Paterson_and_Luan_1990
continentalcrustL4.viscosity = rh.Wet_Quartz_Dislocation_Paterson_and_Luan_1990
continentalcrustL5.viscosity = rh.Wet_Quartz_Dislocation_Paterson_and_Luan_1990
continentalcrustL6.viscosity = rh.Wet_Quartz_Dislocation_Paterson_and_Luan_1990
continentalcrustL7.viscosity = rh.Wet_Quartz_Dislocation_Paterson_and_Luan_1990
continentalcrustL8.viscosity = rh.Dry_Mafic_Granulite_Dislocation_Wang_et_al_2012
continentalcrustL9.viscosity = rh.Dry_Mafic_Granulite_Dislocation_Wang_et_al_2012
continentalcrustL10.viscosity = rh.Dry_Mafic_Granulite_Dislocation_Wang_et_al_2012
uppermantle.viscosity = rh.Wet_Olivine_Dislocation_Hirth_and_Kohlstedt_2003
asthenosphere.viscosity = rh.Wet_Olivine_Dislocation_Hirth_and_Kohlstedt_2003
# %%
sediment.plasticity = GEO.DruckerPrager(cohesion=1.0 * u.megapascal,
cohesionAfterSoftening=0.1 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.15)
sediment.stressLimiter = 100 * u.megapascal
Sediment1.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.15)
Sediment1.stressLimiter = 100 * u.megapascal
Sediment2.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.15)
Sediment2.stressLimiter = 100 * u.megapascal
Sediment3.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.15)
Sediment3.stressLimiter = 100 * u.megapascal
Sediment4.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.15)
Sediment4.stressLimiter = 100 * u.megapascal
Sediment5.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.15)
Sediment5.stressLimiter = 100 * u.megapascal
Sediment6.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.15)
Sediment6.stressLimiter = 100 * u.megapascal
continentalcrustL3.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.25)
continentalcrustL3.stressLimiter = 125 * u.megapascal
continentalcrustL4.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.25)
continentalcrustL4.stressLimiter = 150 * u.megapascal
continentalcrustL5.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.25)
continentalcrustL5.stressLimiter = 150 * u.megapascal
continentalcrustL6.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.25)
continentalcrustL6.stressLimiter = 150 * u.megapascal
continentalcrustL7.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.25)
continentalcrustL7.stressLimiter = 150 * u.megapascal
continentalcrustL8.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.15)
continentalcrustL8.stressLimiter = 150 * u.megapascal
continentalcrustL9.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.15)
continentalcrustL9.stressLimiter = 150 * u.megapascal
continentalcrustL10.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.1154,
epsilon1=0.0, epsilon2=0.15)
continentalcrustL10.stressLimiter = 150 * u.megapascal
uppermantle.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.0577,
epsilon1=0.0, epsilon2=0.15)
uppermantle.stressLimiter = 250 * u.megapascal
asthenosphere.plasticity = GEO.DruckerPrager(name="Continental Crust",
cohesion=20. * u.megapascal,
cohesionAfterSoftening=0.2 * u.megapascal,
frictionCoefficient=0.577,
frictionAfterSoftening=0.0577,
epsilon1=0.0, epsilon2=0.15)
asthenosphere.stressLimiter = 250 * u.megapascal
# ## Melt
# %%
solidii = GEO.SolidusRegistry()
my_crust_solidus = GEO.Solidus(A1=923 * u.kelvin, A2=-1.2e-07 * u.kelvin / u.pascal, A3=1.2e-16 * u.kelvin / u.pascal**2, A4=0.0 * u.kelvin / u.pascal**3)
mid_crust_solidus = GEO.Solidus(A1=1263 * u.kelvin, A2=-1.2e-07 * u.kelvin / u.pascal, A3=1.2e-16 * u.kelvin / u.pascal**2, A4=0.0 * u.kelvin / u.pascal**3)
mantle_solidus = solidii.Mantle_Solidus
liquidii = GEO.LiquidusRegistry()
my_crust_liquidus = GEO.Liquidus(A1=1423 * u.kelvin, A2=-1.2e-07 * u.kelvin / u.pascal, A3=1.6e-16 * u.kelvin / u.pascal**2, A4=0.0 * u.kelvin / u.pascal**3)
mid_crust_liquidus = GEO.Liquidus(A1=1763 * u.kelvin, A2=-1.2e-07 * u.kelvin / u.pascal, A3=1.6e-16 * u.kelvin / u.pascal**2, A4=0.0 * u.kelvin / u.pascal**3)
mantle_liquidus = liquidii.Mantle_Liquidus
continentalcrustL3.add_melt_modifier(my_crust_solidus, my_crust_liquidus,
latentHeatFusion=250.0 * u.kilojoules / u.kilogram / u.kelvin,
meltFraction=0.,
meltFractionLimit=0.3,
meltExpansion=0.13,
viscosityChangeX1 = 0.15,
viscosityChangeX2 = 0.30,
viscosityChange = 1e-3
)
continentalcrustL4.add_melt_modifier(my_crust_solidus, my_crust_liquidus,
latentHeatFusion=250.0 * u.kilojoules / u.kilogram / u.kelvin,
meltFraction=0.,
meltFractionLimit=0.3,
meltExpansion=0.13,
viscosityChangeX1 = 0.15,
viscosityChangeX2 = 0.30,
viscosityChange = 1e-3
)
continentalcrustL5.add_melt_modifier(my_crust_solidus, my_crust_liquidus,
latentHeatFusion=250.0 * u.kilojoules / u.kilogram / u.kelvin,
meltFraction=0.,
meltFractionLimit=0.3,
meltExpansion=0.13,
viscosityChangeX1 = 0.15,
viscosityChangeX2 = 0.30,
viscosityChange = 1e-3
)
continentalcrustL6.add_melt_modifier(my_crust_solidus, my_crust_liquidus,
latentHeatFusion=250.0 * u.kilojoules / u.kilogram / u.kelvin,
meltFraction=0.,
meltFractionLimit=0.3,
meltExpansion=0.13,
viscosityChangeX1 = 0.15,
viscosityChangeX2 = 0.30,
viscosityChange = 1e-3
)
continentalcrustL7.add_melt_modifier(my_crust_solidus, my_crust_liquidus,
latentHeatFusion=250.0 * u.kilojoules / u.kilogram / u.kelvin,
meltFraction=0.,
meltFractionLimit=0.3,
meltExpansion=0.13,
viscosityChangeX1 = 0.15,
viscosityChangeX2 = 0.30,
viscosityChange = 1e-3
)
continentalcrustL8.add_melt_modifier(my_crust_solidus, my_crust_liquidus,
latentHeatFusion=250.0 * u.kilojoules / u.kilogram / u.kelvin,
meltFraction=0.,
meltFractionLimit=0.3,
meltExpansion=0.13,
viscosityChangeX1 = 0.15,
viscosityChangeX2 = 0.30,
viscosityChange = 1e-3
)
continentalcrustL9.add_melt_modifier(my_crust_solidus, my_crust_liquidus,
latentHeatFusion=250.0 * u.kilojoules / u.kilogram / u.kelvin,
meltFraction=0.,
meltFractionLimit=0.3,
meltExpansion=0.13,
viscosityChangeX1 = 0.15,
viscosityChangeX2 = 0.30,
viscosityChange = 1e-3
)
continentalcrustL10.add_melt_modifier(my_crust_solidus, my_crust_liquidus,
latentHeatFusion=250.0 * u.kilojoules / u.kilogram / u.kelvin,
meltFraction=0.,
meltFractionLimit=0.3,
meltExpansion=0.13,
viscosityChangeX1 = 0.15,
viscosityChangeX2 = 0.30,
viscosityChange = 1e-3
)
uppermantle.add_melt_modifier(mantle_solidus, mantle_liquidus,
latentHeatFusion=250.0 * u.kilojoules / u.kilogram / u.kelvin,
meltFraction=0.,
meltFractionLimit=0.02,
meltExpansion=0.13,
viscosityChangeX1 = 0.001,
viscosityChangeX2 = 0.03,
viscosityChange = 1e-2
)
asthenosphere.add_melt_modifier(mantle_solidus, mantle_liquidus,
latentHeatFusion=250.0 * u.kilojoules / u.kilogram / u.kelvin,
meltFraction=0.,
meltFractionLimit=0.02,
meltExpansion=0.13,
viscosityChangeX1 = 0.001,
viscosityChangeX2 = 0.03,
viscosityChange = 1e-2
)
Model.set_heatFlowBCs(bottom=(0.040 * u.watt / u.metre**2, asthenosphere))
Model.set_temperatureBCs(top=293.15 * u.degK, nodeSets = [(air.shape, 293.15 * u.degK)])
# %%
# %%
import underworld.function as fn
velocity = 1.073 * u.centimeter / u.year
Model.set_velocityBCs(left=[-velocity, None],
right=[velocity, None],
top=[None, None],
bottom=GEO.LecodeIsostasy(reference_mat=asthenosphere, average=False))
# %%
def gaussian(xx, centre, width):
return ( np.exp( -(xx - centre)**2/width))
maxDamage = 0.25
centre = (GEO.nd(340. * u.kilometer), GEO.nd(-40. * u.kilometer))
width = GEO.nd(75. * u.kilometer) # this gives a normal distribution
Model.plasticStrain.data[:] = maxDamage * np.random.rand(*Model.plasticStrain.data.shape[:])
Model.plasticStrain.data[:,0] *= gaussian(Model.swarm.particleCoordinates.data[:,0], centre[0], width)
Model.plasticStrain.data[:,0] *= gaussian(Model.swarm.particleCoordinates.data[:,1], centre[1], width*100)
air_mask = Model.swarm.particleCoordinates.data[:,1] > GEO.nd(0 * u.kilometer)
Model.plasticStrain.data[air_mask] = 0.0
npoints = int(Model.length.magnitude)
coords = np.ndarray((npoints, 2))
coords[:, 0] = np.linspace(GEO.nd(Model.minCoord[0]), GEO.nd(Model.maxCoord[0]), npoints)
coords[:, 1] = GEO.nd(Sediment1.top)
#coords_surface2 = np.ndarray((npoints_surface, 2))
#coords_surface2[:, 0] = np.linspace(Model.minCoord[0], Model.maxCoord[0], npoints_surface)
#coords_surface2[:, 1] = 0. * u.kilometre
#Model.surfaceProcesses = GEO.surfaceProcesses.velocitySurface_2D(airIndex = air.index,sedimentIndex = sediment.index,sedimentationRate = 0.6 * u.millimeter / u.year, erosionRate = 0.1 * u.millimeter / u.year, surfaceElevation = 0.0*u.kilometer, surfaceArray = coords)
# %%
npoints_surface = 1000
coords_surface = np.ndarray((npoints_surface, 2))
coords_surface[:, 0] = np.linspace(GEO.nd(Model.minCoord[0]), GEO.nd(Model.maxCoord[0]), npoints_surface)
coords_surface[:, 1] = GEO.nd(0. * u.kilometre)
surface_tracers = Model.add_passive_tracers(name="Topography", vertices=coords_surface)
npoints_moho = 1000
coords_moho = np.ndarray((npoints_moho, 2))
coords_moho[:, 0] = np.linspace(GEO.nd(Model.minCoord[0]), GEO.nd(Model.maxCoord[0]), npoints_moho)
coords_moho[:, 1] = GEO.nd(0. * u.kilometre) - GEO.nd(continentalcrustL10.bottom)
moho_tracers = Model.add_passive_tracers(name="Moho", vertices=coords_moho)
coords_FSE_Crust = GEO.circles_grid(radius = 1.5 * u.kilometer,
minCoord=[Model.minCoord[0], continentalcrustL10.bottom],
maxCoord=[Model.maxCoord[0], 0.*u.kilometer])
FSE_Crust = Model.add_passive_tracers(name="FSE_Crust", vertices=coords_FSE_Crust)
coords_FSE_Mantle = GEO.circles_grid(radius=1.5 * u.kilometer,
minCoord=[Model.minCoord[0], -76.*u.kilometer],
maxCoord=[Model.maxCoord[0], continentalcrustL10.bottom])
FSE_Mantle = Model.add_passive_tracers(name="FSE_Mantle", vertices=coords_FSE_Mantle)
Model.init_model()
uppermantle.phase_changes = GEO.PhaseChange((Model.temperature > GEO.nd(1600.*u.kelvin)), asthenosphere.index)
#Model.set_heatFlowBCs(bottom=(0.036 * u.watt / u.metre**2, asthenosphere))
# %%
Model.surfaceProcesses = GEO.surfaceProcesses.velocitySurface_2D(
airIndex=air.index, sedimentIndex=sediment.index,
sedimentationRate= 1. *u.millimeter / u.year, erosionRate= 1. * u.millimeter / u.year,
surfaceElevation=0.*u.kilometer,
surfaceArray = coords_surface)
Model.init_model()
Model.set_temperatureBCs(top=293.15 * u.degK,
bottom=1603.15 * u.degK,
nodeSets = [(air.shape, 293.15 * u.degK), (asthenosphere.shape, 1603.15 * u.degK)])
# %%
solver = Model.solver
# Decide whether to use mumps or multigrid
if resolution[0] * resolution[1] < 1e6:
print("Using mumps")
solver.set_inner_method("mumps")
else:
print("Using multigrid with coarse mumps")
#solver.options.mg.levels = 4
solver.options.A11.mg_coarse_pc_factor_mat_solver_package = "mumps"
solver.options.A11.mg_coarse_pc_type = "lu"
solver.options.A11.mg_coarse_ksp_type = "preonly"
#solver.options.A11.mg_coarse_ksp_view = ""
solver.options.A11.ksp_rtol=1e-8 #1e-4
solver.options.A11.ksp_set_min_it_converge = 10
solver.options.A11.use_previous_guess = True
solver.options.scr.ksp_rtol=1e-6 #1e-3
solver.options.scr.use_previous_guess = True
solver.options.scr.ksp_set_min_it_converge = 10
solver.options.scr.ksp_type = "cg"
#solver.options.main.help = ""
solver.options.main.remove_constant_pressure_null_space=True
#solver.options.main.Q22_pc_type = "uwscale"
solver.set_penalty(1.0e2)
#Model.solver = solver
def post_hook():
coords = fn.input()
zz = (coords[0] - GEO.nd(Model.minCoord[0])) / (GEO.nd(Model.maxCoord[0]) - GEO.nd(Model.minCoord[0]))
fact = fn.math.pow(fn.math.tanh(zz*20.0) + fn.math.tanh((1.0-zz)*20.0) - fn.math.tanh(20.0), 4)
Model.plasticStrain.data[:] = Model.plasticStrain.data[:] * fact.evaluate(Model.swarm)
Model.run_for(8000000 * u.years, checkpoint_interval=100000. * u.year, restartStep=-1, restartDir="Wide_Rift_Extension_O")
# %%q
# %%