Peano
TPV26.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
3 from .Scenario import Scenario
4 
5 import os
6 
7 class TPV26(Scenario):
8  """
9  Part of a series of benchmarks by the Statewide California Earthquake Center (SCEC)
10 
11  Single planar vertical strike-slip fault in a linear elastic medium.
12 
13  The description of the scenario can be found at: https://strike.scec.org/cvws/tpv26_27docs.html
14  """
15 
16  domain_offset = [-1.6, 0.0, -1.6] #for 81 cells, this leads to a "buffer" of three cells at the start and end around the fault
17  domain_size = [43.2, 43.2, 43.2] #leads to a cell size of 0.5333... for 81 cells
18 
19  end_time = 20.0
20 
21  tracer_coordinates = [
22  # off-fault at surface (18 total)
23  [ 0.0, 0.0, 0.0],
24  [10.0, 0.0, 0.0],
25  [30.0, 0.0, 0.0],
26  [40.0, 0.0, 0.0],
27  [17.0, 0.0, 15.0],
28  [23.0, 0.0, 15.0],
29  [ 0.0, 0.0, 20.0],
30  [10.0, 0.0, 20.0],
31  [30.0, 0.0, 20.0],
32  [40.0, 0.0, 20.0],
33  [17.0, 0.0, 25.0],
34  [23.0, 0.0, 25.0],
35  [17.0, 0.0, 35.0],
36  [23.0, 0.0, 35.0],
37  [ 0.0, 0.0, 40.0],
38  [10.0, 0.0, 40.0],
39  [30.0, 0.0, 40.0],
40  [40.0, 0.0, 40.0],
41  # on-fault at surface (2 total)
42  [20.0, 0.0, 15.0],
43  [20.0, 0.0, 35.0],
44  #on-fault at hypocenter depth (6 total)
45  [20.0, 10.0, 5.0],
46  [20.0, 10.0, 15.0],
47  [20.0, 10.0, 20.0],
48  [20.0, 10.0, 25.0],
49  [20.0, 10.0, 30.0],
50  [20.0, 10.0, 35.0],
51  #on-fault off hypocenter depth (4 total)
52  [20.0, 5.0, 15.0],
53  [20.0, 5.0, 35.0],
54  [20.0, 15.0, 15.0],
55  [20.0, 15.0, 35.0],
56  ]
57 
58  def initial_conditions(self):
59  return """
60  Q[Shortcuts::rho] = 2.67;
61  Q[Shortcuts::cp ] = 6.0;
62  Q[Shortcuts::cs ] = 3.464;
63 """
64 
65  def generate_required_files(self, order):
66 
67  dictionary = { "MODE": order+1 }
68  self.generate_file_from_templategenerate_file_from_template(
69  os.path.dirname(os.path.realpath(__file__))+"/specs/TPV26/tpv26.yaml.template",
70  "tpv26.yaml", dictionary
71  )
72 
73  self.copy_file_to_current_foldercopy_file_to_current_folder(
74  os.path.dirname(os.path.realpath(__file__))+"/specs/TPV26/tpv26_fault.yaml",
75  "tpv26_fault.yaml"
76  )
77 
78  return
def generate_file_from_template(self, template_file, full_qualified_filename, dictionary)
Definition: Scenario.py:21
def copy_file_to_current_folder(self, current_filename, full_qualified_filename)
Definition: Scenario.py:32
Part of a series of benchmarks by the Statewide California Earthquake Center (SCEC)
Definition: TPV26.py:7
def generate_required_files(self, order)
Definition: TPV26.py:65
def initial_conditions(self)
Definition: TPV26.py:58