Peano
Loading...
Searching...
No Matches
TPV34.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 Part of a series of benchmarks by the Statewide California Earthquake Center (SCEC)
10
11 Imperial Fault, Model 1. Spontaneous rupture on a vertical strike-slip fault.
12 There is a 3D velocity structure in a linear elastic half-space. The velocity structure is derived from
13 SCEC Community Velocity Model CVM-H in the vicinity of the Imperial Fault.
14 Initial shear and normal stresses are proportional to the shear modulus.
15
16 The description of the scenario can be found at: https://strike.scec.org/cvws/tpv34docs.html
17 """
18
19 domain_offset = [3.8, 0., 3.8] #centers the fault which is at 20.
20 domain_size = [32.4, 32.4, 32.4] #leads to a cell size of 0.333 for 81 cells
21
22 end_time = 20.0
23
24 tracer_coordinates = [
25 [17.0, 0.0, 10.0],
26 [17.0, 2.4, 10.0],
27 [17.0, 0.0, 0.0],
28 [17.0, 2.4, 0.0],
29 [17.0, 0.0, 20.0],
30 [17.0, 2.4, 20.0],
31 [17.0, 0.0, 30.0],
32 [17.0, 2.4, 30.0],
33 [17.0, 0.0, 40.0],
34 [17.0, 2.4, 40.0],
35
36 [11.0, 0.0, 10.0],
37 [11.0, 2.4, 10.0],
38 [11.0, 0.0, 0.0],
39 [11.0, 2.4, 0.0],
40 [11.0, 0.0, 20.0],
41 [11.0, 2.4, 20.0],
42 [11.0, 0.0, 30.0],
43 [11.0, 2.4, 30.0],
44 [11.0, 0.0, 40.0],
45 [11.0, 2.4, 40.0],
46
47 [ 5.0, 0.0, 5.0],
48 [ 5.0, 2.4, 5.0],
49 [ 5.0, 0.0, 20.0],
50 [ 5.0, 2.4, 20.0],
51 [ 5.0, 0.0, 35.0],
52 [ 5.0, 2.4, 35.0],
53
54 [20.0, 0.0, 0.0],
55 [20.0, 2.4, 0.0],
56 [20.0, 0.0, 40.0],
57 [20.0, 2.4, 40.0],
58
59 [23.0, 0.0, 10.0],
60 [23.0, 2.4, 10.0],
61 [23.0, 0.0, 0.0],
62 [23.0, 2.4, 0.0],
63 [23.0, 0.0, 20.0],
64 [23.0, 2.4, 20.0],
65 [23.0, 0.0, 30.0],
66 [23.0, 2.4, 30.0],
67 [23.0, 0.0, 40.0],
68 [23.0, 2.4, 40.0],
69
70 [29.0, 0.0, 10.0],
71 [29.0, 2.4, 10.0],
72 [29.0, 0.0, 0.0],
73 [29.0, 2.4, 0.0],
74 [29.0, 0.0, 20.0],
75 [29.0, 2.4, 20.0],
76 [29.0, 0.0, 30.0],
77 [29.0, 2.4, 30.0],
78 [29.0, 0.0, 40.0],
79 [29.0, 2.4, 40.0],
80
81 [35.0, 0.0, 5.0],
82 [35.0, 2.4, 5.0],
83 [35.0, 0.0, 20.0],
84 [35.0, 2.4, 20.0],
85 [35.0, 0.0, 35.0],
86 [35.0, 2.4, 35.0]
87 ]
88
89 fault_coordinates = [
90 [20.0, 0.0, 14.0],
91 [20.0, 1.0, 14.0],
92 [20.0, 2.4, 14.0],
93 [20.0, 5.0, 14.0],
94 [20.0, 7.5, 14.0],
95 [20.0, 10.0, 14.0],
96 [20.0, 12.0, 14.0],
97
98 [20.0, 0.0, 8.0],
99 [20.0, 1.0, 8.0],
100 [20.0, 2.4, 8.0],
101 [20.0, 5.0, 8.0],
102 [20.0, 7.5, 8.0],
103 [20.0, 10.0, 8.0],
104 [20.0, 12.0, 8.0],
105
106 [20.0, 0.0, 20.0],
107 [20.0, 1.0, 20.0],
108 [20.0, 2.4, 20.0],
109 [20.0, 5.0, 20.0],
110 [20.0, 7.5, 20.0],
111 [20.0, 10.0, 20.0],
112 [20.0, 12.0, 20.0],
113
114 [20.0, 0.0, 26.0],
115 [20.0, 1.0, 26.0],
116 [20.0, 2.4, 26.0],
117 [20.0, 5.0, 26.0],
118 [20.0, 7.5, 26.0],
119 [20.0, 10.0, 26.0],
120 [20.0, 12.0, 26.0],
121
122 [20.0, 0.0, 32.0],
123 [20.0, 1.0, 32.0],
124 [20.0, 2.4, 32.0],
125 [20.0, 5.0, 32.0],
126 [20.0, 7.5, 32.0],
127 [20.0, 10.0, 32.0],
128 [20.0, 12.0, 32.0],
129 ]
130
132 return """
133 double rho, cs, cp;
134
135 easi::ArraysAdapter<double> adapter;
136 adapter.addBindingPoint("rho", &rho);
137 adapter.addBindingPoint("cs", &cs);
138 adapter.addBindingPoint("cp", &cp);
139
140 easi::Query query(1,3);
141 query.group(0) = 0;
142 query.x(0,0) = x[0]-20.0;
143 query.x(0,1) = x[1];
144 query.x(0,2) = x[2]-20.0;
145 context->model->evaluate(query,adapter);
146
147 Q[Shortcuts::rho] = rho;
148 Q[Shortcuts::cs] = cs;
149 Q[Shortcuts::cp] = cp;
150
151"""
152
153 def generate_required_files(self, order):
154
155 dictionary = { "MODE": order+1 }
157 os.path.dirname(os.path.realpath(__file__))+"/specs/TPV34/tpv34.yaml.template",
158 "tpv34.yaml", dictionary
159 )
160
162 os.path.dirname(os.path.realpath(__file__))+"/specs/TPV34/tpv34_fault.yaml",
163 "tpv34_fault.yaml"
164 )
165
167 os.path.dirname(os.path.realpath(__file__))+"/specs/TPV34/material.yaml",
168 "material.yaml"
169 )
170
172 os.path.dirname(os.path.realpath(__file__))+"/specs/TPV34/tpv34_mu_mult_plus.nc",
173 "tpv34_mu_mult_plus.nc"
174 )
175
177 os.path.dirname(os.path.realpath(__file__))+"/specs/TPV34/tpv34_rhovsvp.nc",
178 "tpv34_rhovsvp.nc"
179 )
180
181 return
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
Part of a series of benchmarks by the Statewide California Earthquake Center (SCEC)
Definition TPV34.py:7
generate_required_files(self, order)
Definition TPV34.py:153
initial_conditions(self)
Definition TPV34.py:131