Peano
Loading...
Searching...
No Matches
ContextDynamicRupture.h
Go to the documentation of this file.
1#pragma once
2
4
5#include "asagi_reader.h"
6
7#include "toolbox/curvi/kdTree/InnerNode.h"
8#include "toolbox/curvi/kdTree/Root.h"
9
10template <class Shortcuts, int basisSize, int numberOfVariables, int numberOfParameters, typename T>
11class ContextDynamicRupture: public ContextCurvilinear<Shortcuts, basisSize, numberOfVariables+numberOfParameters, T> {
12
13public:
15 std::string& topography_string,
16 int coarsestMeshLevel,
17 double coarsestMeshSize,
18 double maxAdaptiveDepth,
19 tarch::la::Vector<DIMENSIONS,double> _domainOffset,
20 tarch::la::Vector<DIMENSIONS,double> _domainSize,
21 T* _nodes,
22 T* _dudx
23 ): ContextCurvilinear<Shortcuts, basisSize, numberOfVariables+numberOfParameters, T>(
24 topography_string,
25 coarsestMeshLevel, coarsestMeshSize, maxAdaptiveDepth,
26 _domainOffset, _domainSize,
27 _nodes,_dudx
28 )
29 {
30
31 domainSize[0] = _domainSize[0];
32 domainSize[1] = _domainSize[1];
33 domainSize[2] = _domainSize[2];
34
35 }
36
38 std::string& filename_rupture_model
39 ){
40 asagiReader = new AsagiReader("");
41 easi::YAMLParser parser(3,asagiReader);
42
43 model = parser.parse(filename_rupture_model);
44
45 //double cohesion;
46 easi::ArraysAdapter<T> adapter;
47 adapter.addBindingPoint("mu_s",&mu_s);
48 adapter.addBindingPoint("mu_d",&mu_d);
49 adapter.addBindingPoint("d_c" ,&S_c);
50 adapter.addBindingPoint("t_0" ,&t0_rupture);
51 adapter.addBindingPoint("f_cy",&f_cy);
52 adapter.addBindingPoint("f_wy",&f_wy);
53 adapter.addBindingPoint("f_cz",&f_cz);
54 adapter.addBindingPoint("f_wz",&f_wz);
55
56 easi::Query query(1,3);
57 query.group(0) = 0;
58 query.x(0,0) = 0;
59 query.x(0,1) = 0;
60 query.x(0,2) = 0;
61
62 model->evaluate(query,adapter);
63 }
64
68
69public:
70
71 void riemannSolver(
72 T* FL, T* FR,
73 const T* const QL, const T* const QR,
74 const double t, const double dt,
75 const tarch::la::Vector<DIMENSIONS, double>& cellSize,
76 const int direction,
77 bool isBoundaryFace,
78 int faceIndex,
79 int surface = 2
80 );
81
83 T& sxx, T& syy, T& szz,
84 T& sxy, T& sxz, T& syz,
85 double* const x);
86 void preStress(
87 T& T0_n, T& T0_m, T& T0_l,
88 double* const x, double t,
89 T* const l, T* const m, T* const n);
90 T boxcar(T& f, double x, T w);
91 void tauStrength(T& tau_str, T sigma_n, T S, double* const x, double t);
92 void slipWeakening(
93 T& v1, T& v2,
94 T& Vel, T& tau1, T& tau2,
95 T phi_1, T phi_2,
96 T eta, T tau_str, T sigma_n);
98 T vn_p, T vn_m,
99 T Tn_p, T Tn_m,
100 T zn_p, T zn_m,
101 T& vn_hat_p, T& vn_hat_m,
102 T& Tn_hat_p, T& Tn_hat_m,
103 T vm_p, T vm_m,
104 T Tm_p, T Tm_m,
105 T zl_p, T zl_m,
106 T& vm_hat_p, T& vm_hat_m,
107 T& Tm_hat_p, T& Tm_hat_m,
108 T vl_p,T vl_m,
109 T Tl_p, T Tl_m,
110 T zm_p, T zm_m,
111 T& vl_hat_p, T& vl_hat_m,
112 T& Tl_hat_p, T& Tl_hat_m,
113 T* const l, T* const m, T* const n,
114 double* const x, T S, double t);
115
116public:
117 double domainSize[DIMENSIONS];
118
120 easi::Component* model;
121
122 //rupture parameters
123 T S_c; //Slip-weakening critical distance (meters)
124 T mu_d; //Dynamic coefficient of friction (dimensionless)
125 T mu_s; //Static coefficient of friction (dimensionless)
126
127 //duration of forced rupture (seconds)
128 // the forces holding the fault together will decrease linearly for this duration starting at the forced rupture time.
130
144
145};
const tarch::la::Vector< DIMENSIONS, double > cellSize
ContextCurvilinear(std::string &topography_string, int coarsestMeshLevel, double coarsestMeshSize, double maxAdaptiveDepth, tarch::la::Vector< DIMENSIONS, double > _domainOffset, tarch::la::Vector< DIMENSIONS, double > _domainSize, T *_nodes, T *_dudx)
void slipWeakening(T &v1, T &v2, T &Vel, T &tau1, T &tau2, T phi_1, T phi_2, T eta, T tau_str, T sigma_n)
T f_cy
These define the position of the area with frictional cohesion.
T boxcar(T &f, double x, T w)
void slipWeakeningFriction(T vn_p, T vn_m, T Tn_p, T Tn_m, T zn_p, T zn_m, T &vn_hat_p, T &vn_hat_m, T &Tn_hat_p, T &Tn_hat_m, T vm_p, T vm_m, T Tm_p, T Tm_m, T zl_p, T zl_m, T &vm_hat_p, T &vm_hat_m, T &Tm_hat_p, T &Tm_hat_m, T vl_p, T vl_m, T Tl_p, T Tl_m, T zm_p, T zm_m, T &vl_hat_p, T &vl_hat_m, T &Tl_hat_p, T &Tl_hat_m, T *const l, T *const m, T *const n, double *const x, T S, double t)
void preStress(T &T0_n, T &T0_m, T &T0_l, double *const x, double t, T *const l, T *const m, T *const n)
ContextDynamicRupture(std::string &topography_string, int coarsestMeshLevel, double coarsestMeshSize, double maxAdaptiveDepth, tarch::la::Vector< DIMENSIONS, double > _domainOffset, tarch::la::Vector< DIMENSIONS, double > _domainSize, T *_nodes, T *_dudx)
void initialStressTensor(T &sxx, T &syy, T &szz, T &sxy, T &sxz, T &syz, double *const x)
double domainSize[DIMENSIONS]
void initRuptureModel(std::string &filename_rupture_model)
void tauStrength(T &tau_str, T sigma_n, T S, double *const x, double t)