Peano
Loading...
Searching...
No Matches
Husavik.py
Go to the documentation of this file.
1# This file is part of the ExaHyPE2 project. For conditions of distribution and
2# use, please see the copyright notice at www.peano-framework.org
3from .Scenario import Scenario
4
5import os
6
8 """
9 Simulates an earthquake in the north Iceland region, around the Húsavı́k-Flatey fault.
10 The scenario was originally implemented by Leonhard Rannabauer, and most of the files
11 can be found in his zenodo repository at https://zenodo.org/records/6386282, except for
12 the material parameters which are missing.
13 Similar results should be reproduceable from https://zenodo.org/records/8021690 and
14 https://zenodo.org/records/7990543, with the later being where we recovered the
15 material parameters from.
16
17 The description of the scenario and results be found in Leonhard Rannabauer's thesis,
18 in section 8.5: https://mediatum.ub.tum.de/node?id=1639212
19 """
20
21 domain_offset = [-48.1, 0.0, -48.2]
22 domain_size = [96.4, 96.4, 96.4]
23
24 end_time = 25.0
25
26 #These tracers were simply copied from Leonhard Rannabauer's work, where they were hardcoded
27 # for the ExaHyPE1 case where the domain was divided into 241 cells, as such they are likely
28 # to be slightly off from the correct position in all cases
29 tracer_coordinates = [
30 [9.376232362467874, 0.0001, 33.85099388956314], #body6.75st33.85dp0.09
31 [8.246753305766788, 0.0001, 11.638967936983136], #body5.48st11.64dp0.03
32 [0.7195568229321125, 0.0001, 17.21881025466928], #body-1.53st17.22dp-0.00
33 [6.327888926556476, 0.0001, 25.284520456084465], #body3.82st25.28dp0.07
34 [0.6536504638487628, 0.0001, 8.417249776348854], #body-1.13st8.42dp-0.19
35
36 [14.164660762183253, 0.0001, 15.356787444428392], #body10.95st15.36dp0.10
37 [1.3017916972263137, 0.0001, 15.034320297763315], #body-1.05st15.03dp-0.00
38 [25.435497238874177, 0.0001, 15.401601578655573], #body22.92st15.40dp0.16
39 [17.176126224582518, 0.0001, 7.010609949850732], #body15.19st7.01dp-0.07
40 [-4.492292804805409, 0.0001, 2.131659303817287], #body-4.98st2.13dp-0.64
41
42 [0.6555189792723084, 0.0001, -12.686892531023204], #body1.98st-12.69dp-0.04
43 [26.253429292802664, 0.0001, -6.9879120653472455], #body27.40st-6.99dp0.04
44 [24.94953750613164, 0.0001, -20.029540641285166], #body27.62st-20.03dp-0.74
45 [0.8540967046388133, 0.0001, -13.184495969619547], #body2.34st-13.18dp-0.06
46 [5.621345523615631, 0.0001, -9.743473279568661], #body6.72st-9.74dp-0.05
47
48 [-1.6476579634324366, 0.0001, -19.484646795241588], #body0.57st-19.48dp0.06
49 [17.766222982618473, 0.0001, -28.1068295777377], #body21.14st-28.11dp-0.91
50 [25.39664055692495, 0.0001, -33.966402224667945], #body28.13st-33.97dp-0.37
51 [28.08399500705491, 0.0001, -24.61055416454974], #body30.73st-24.61dp-0.55
52 [36.51336697284584, 0.0001, -42.29182654225224], #body38.37st-42.29dp-0.13
53
54 [9.376232362467874, -0.08808115836556851, 33.85099388956314], #body6.75st33.85dp0.00
55 [8.246753305766788, -0.027295721133612005, 11.638967936983136], #body5.48st11.64dp0.00
56 [0.7195568229321125, 0.0011934993109008474, 17.21881025466928], #body-1.53st17.22dp0.00
57 [6.327888926556476, -0.06958613567893224, 25.284520456084465], #body3.82st25.28dp0.00
58 [0.6536504638487628, 0.18714757066801724, 8.417249776348854], #body-1.13st8.42dp0.00.
59
60 [14.164660762183253, -0.09536041761818126, 15.356787444428392], #body10.95st15.36dp0.00
61 [1.3017916972263137, 0.0029445021370122504, 15.034320297763315], #body-1.05st15.03dp0.00
62 [25.435497238874177, -0.1627025699401088, 15.401601578655573], #body22.92st15.40dp0.00
63 [17.176126224582518, 0.0665791035924741, 7.010609949850732], #body15.19st7.01dp0.00
64 [-4.492292804805409, 0.6364933043727774, 2.131659303817287], #body-4.98st2.13dp0.00
65
66 [0.6555189792723084, 0.0353022881074736, -12.686892531023204], #body1.98st-12.69dp0.00
67 [26.253429292802664, -0.03509966432142164, -6.9879120653472455], #body27.40st-6.99dp0.00
68 [24.94953750613164, 0.7298889865128331, -20.029540641285166], #body27.62st-20.03dp0.00
69 [0.8540967046388133, 0.05651829134625075, -13.184495969619547], #body2.34st-13.18dp0.00
70 [5.621345523615631, 0.0534422072164773, -9.743473279568661], #body6.72st-9.74dp0.00
71
72 [-1.6476579634324366, -0.06441300382012116, -19.484646795241588], #body0.57st-19.48dp0.00
73 [17.766222982618473, 0.8969251457533431, -28.1068295777377], #body21.14st-28.11dp0.00
74 [25.39664055692495, 0.3685598288835763, -33.966402224667945], #body28.13st-33.97dp0.00
75 [28.08399500705491, 0.5510383744940981, -24.61055416454974], #body30.73st-24.61dp0.00
76 [36.51336697284584, 0.12614619980480768, -42.29182654225224] #body38.37st-42.29dp0.00
77 ]
78
79 fault_coordinates = [
80 ]
81
83 return """
84 double rho, mu, lambda;
85
86 easi::ArraysAdapter<double> adapter;
87 adapter.addBindingPoint("rho", &rho);
88 adapter.addBindingPoint("mu", &mu);
89 adapter.addBindingPoint("lambda", &lambda);
90
91 easi::Query query(1,3);
92 query.group(0) = 0;
93 query.x(0,0) = x[0];
94 query.x(0,1) = x[1];
95 query.x(0,2) = x[2];
96 context->model->evaluate(query,adapter);
97
98 Q[Shortcuts::rho] = rho;
99 Q[Shortcuts::cp] = sqrt((lambda + 2*mu)/rho);
100 Q[Shortcuts::cs] = sqrt(mu/rho);
101"""
102
103 def generate_required_files(self, order):
104
105 dictionary = { "MODE": order+1 }
107 os.path.dirname(os.path.realpath(__file__))+"/specs/Husavik/husavik.yaml.template",
108 "husavik.yaml", dictionary
109 )
110
111 for file in ["husavik_fault.yaml", "initial_stress.yaml", "material_parameters.nc", "material.yaml", "north_iceland_fault.nc", "north_iceland_topography_96_4.nc"]:
113 os.path.dirname(os.path.realpath(__file__))+"/specs/Husavik/" + file,
114 file
115 )
116
117 return
Simulates an earthquake in the north Iceland region, around the Húsavı́k-Flatey fault.
Definition Husavik.py:7
generate_required_files(self, order)
Definition Husavik.py:103
copy_file_to_current_folder(self, current_filename, full_qualified_filename)
Definition Scenario.py:32
generate_file_from_template(self, template_file, full_qualified_filename, dictionary)
Definition Scenario.py:21