Peano
Loading...
Searching...
No Matches
dynamicRupture.h
Go to the documentation of this file.
1#pragma once
2
3#include "./idx.h"
6
8
9template <class Shortcuts, int basisSize, int numberOfVariables, int numberOfParameters, typename T>
11 T& sxx, T& syy,
12 T& szz, T& sxy,
13 T& sxz, T& syz,
14 double* const x
15){
16
17 easi::ArraysAdapter<T> adapter;
18 adapter.addBindingPoint("s_xx",&sxx);
19 adapter.addBindingPoint("s_yy",&syy);
20 adapter.addBindingPoint("s_zz",&szz);
21 adapter.addBindingPoint("s_xy",&sxy);
22 adapter.addBindingPoint("s_yz",&syz);
23 adapter.addBindingPoint("s_xz",&sxz);
24
25 easi::Query query(1,3);
26 query.group(0) = 0;
27 query.x(0,0) = x[0];
28 query.x(0,1) = x[1];
29 query.x(0,2) = x[2];
30
31 model->evaluate(query,adapter);
32
33}
34
35
36template <class Shortcuts, int basisSize, int numberOfVariables, int numberOfParameters, typename T>
38 T& T0_n, T& T0_m, T& T0_l,
39 double* const x, double t,
40 T* const l, T* const m, T* const n
41){
42
43 T sxx, syy, szz, sxy, sxz, syz;
44 T Tx,Ty,Tz;
45
46 // initial stress tensor
47 initialStressTensor(sxx, syy, szz, sxy, sxz, syz, x);
48
49 //Extract tractions
50 Tx = n[0] * sxx + n[1] * sxy + n[2] * sxz;
51 Ty = n[0] * sxy + n[1] * syy + n[2] * syz;
52 Tz = n[0] * sxz + n[1] * syz + n[2] * szz;
53
54 // rotate tractions into local orthogonal coordinates
55 ::Numerics::rotateIntoOrthogonalBasis(n,m,l,Tx,Ty,Tz,T0_n,T0_m,T0_l);
56
57 easi::ArraysAdapter<T> adapter;
58 T n_yz;
59 adapter.addBindingPoint("n_yz",&n_yz);
60 //
61
62 easi::Query query(1,3);
63 query.group(0) = 0;
64 query.x(0,0) = x[0];
65 query.x(0,1) = x[1];
66 query.x(0,2) = x[2];
67
68 model->evaluate(query,adapter);
69
70 T0_l = T0_l + n_yz;
71
72}
73
74template <class Shortcuts, int basisSize, int numberOfVariables, int numberOfParameters, typename T>
76 T& tau_str, T sigma_n, T S,
77 double* const x, double t
78){
79
80 T cohesion;
81 T r_T;
82 T f_T = 0.0;
83 T d_c = 0.0;
84
85 easi::ArraysAdapter<T> adapter;
86 adapter.addBindingPoint("cohesion",&cohesion);
87 adapter.addBindingPoint("forced_rupture_time",&r_T);
88 adapter.addBindingPoint("d_c" ,&d_c);
89
90 easi::Query query(1,3);
91 query.group(0) = 0;
92 query.x(0,0) = x[0];
93 query.x(0,1) = x[1];
94 query.x(0,2) = x[2];
95
96 model->evaluate(query,adapter);
97
98 T fy;
99 T fz;
100
101 boxcar(fy, x[1]-f_cy,f_wy);
102 boxcar(fz, x[2]-f_cz,f_wz);
103
104 cohesion += 1e10*(1.0-fy*fz);
105
106 if(t<r_T){
107 f_T=0.0;
108 } else if ((t0_rupture > 0.00001) && ( t < r_T+t0_rupture)){
109 f_T = (t-r_T)/t0_rupture;
110 } else {
111 f_T = 1.0;
112 }
113
114 // friction coefficient
115 T fric_coeff = mu_s - (mu_s-mu_d) * std::max<T>(f_T,std::min(S,d_c)/d_c);
116
117 tau_str = cohesion + fric_coeff*std::max<T>(0.0,sigma_n);
118}
119
120
121template <class Shortcuts, int basisSize, int numberOfVariables, int numberOfParameters, typename T>
123 // f(x) is boxcar of unit amplitude in (x-w,x+w)
124 T tol = 1e-8;
125
126 if ((-w+tol)<x && x< (w-tol)){ // inside
127 f = 1.0;
128 }
129 else if (std::abs(-w-x)<=tol || std::abs(x-w)<=tol){ // boundary
130 f = 0.5;
131 }
132 else{ // outside
133 f = 0.0;
134 }
135 return f;
136}
137
138
139// solve for slip-rate (vv):
140template <class Shortcuts, int basisSize, int numberOfVariables, int numberOfParameters, typename T>
142 T& v1, T& v2, T& Vel,
143 T& tau1, T& tau2,
144 T phi_1, T phi_2,
145 T eta, T tau_str, T sigma_n
146){
147
148 T Phi = std::sqrt(std::pow(phi_1, 2) + std::pow(phi_2, 2)); // stress-transfer functional
149 Vel = (Phi - tau_str)/eta; // slip-rate
150
151 //compute slip velocities
152 v1 = phi_1/(eta+tau_str/Vel);
153 v2 = phi_2/(eta+tau_str/Vel);
154
155 //compute shear stress on the fault
156 tau1 = phi_1 - eta*v1;
157 tau2 = phi_2 - eta*v2;
158}
159
160
161// Rupture Dynamics
162template <class Shortcuts, int basisSize, int numberOfVariables, int numberOfParameters, typename T>
164 T vn_p, T vn_m,
165 T Tn_p, T Tn_m,
166 T zn_p, T zn_m,
167 T& vn_hat_p, T& vn_hat_m,
168 T& Tn_hat_p, T& Tn_hat_m,
169 T vm_p, T vm_m,
170 T Tm_p, T Tm_m,
171 T zl_p, T zl_m,
172 T& vm_hat_p, T& vm_hat_m,
173 T& Tm_hat_p, T& Tm_hat_m,
174 T vl_p, T vl_m,
175 T Tl_p, T Tl_m,
176 T zm_p, T zm_m,
177 T& vl_hat_p, T& vl_hat_m,
178 T& Tl_hat_p, T& Tl_hat_m,
179 T* const l, T* const m, T* const n, double* const x, T S, double t
180){
181 // compute characteristics
182 T p_l = zl_p*vl_p + Tl_p;
183 T p_m = zm_p*vm_p + Tm_p;
184 T p_n = zn_p*vn_p + Tn_p;
185
186 T q_l = zl_m*vl_m - Tl_m;
187 T q_m = zm_m*vm_m - Tm_m;
188 T q_n = zn_m*vn_m - Tn_m;
189
190 // half of the harmonic mean of Z1_s, Z2_s
191 T eta_s=(zl_p*zl_m)/(zl_p+zl_m);
192 T eta_n=(zn_p*zn_m)/(zn_p+zn_m);
193
194 T phi_l= eta_s*(p_l/zl_p - q_l/zl_m);
195 T phi_m= eta_s*(p_m/zm_p - q_m/zm_m);
196 T phi_n= eta_n*(p_n/zn_p - q_n/zn_m);
197
198 T T0_l=0;
199 T T0_m=0;
200 T T0_n=0;
201
202 // get prestress (where normal traction is effective normal traction)
203 preStress(T0_n, T0_m, T0_l, x, 0.0, l, m, n);
204
205 vn_hat_m = (p_n - phi_n)/zn_p;
206 Tn_hat_m = phi_n;
207 vn_hat_p = (q_n + phi_n)/zn_m;
208 Tn_hat_p = phi_n;
209
210 T tau_lock = std::sqrt(std::pow(T0_l + phi_l, 2) + std::pow(T0_m + phi_m, 2));
211 T sigma_n = std::max<T>(0.0, -(T0_n + phi_n)); // including prestress
212 T tau_str;
213 T Vel = 0.0;
214 T Tl, Tm, vv_l, vv_m;
215 tauStrength(tau_str, sigma_n, S, x, t);
216
217 if (tau_lock >= tau_str){
218
219 slipWeakening(vv_m, vv_l, Vel, Tm, Tl, phi_m+T0_m, phi_l+T0_l, eta_s, tau_str, sigma_n);
220
221 Tm_hat_m = Tm - T0_m;
222 Tl_hat_m = Tl - T0_l;
223
224 Tm_hat_p = Tm - T0_m;
225 Tl_hat_p = Tl - T0_l;
226 }else{
227 Tm_hat_m = phi_m;
228 Tl_hat_m = phi_l;
229
230 Tm_hat_p = phi_m;
231 Tl_hat_p = phi_l;
232
233 vv_m = 0.0;
234 vv_l = 0.0;
235
236 Vel = 0.0;
237 }
238
239 vm_hat_p = (Tm_hat_m + q_m)/zm_m + vv_m;
240 vl_hat_p = (Tl_hat_m + q_l)/zl_m + vv_l;
241
242 vm_hat_m = (p_m - Tm_hat_p)/zm_p - vv_m;
243 vl_hat_m = (p_l - Tl_hat_p)/zl_p - vv_l;
244
245}
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)
void initialStressTensor(T &sxx, T &syy, T &szz, T &sxy, T &sxz, T &syz, double *const x)
void tauStrength(T &tau_str, T sigma_n, T S, double *const x, double t)
void rotateIntoOrthogonalBasis(T *n, T *m, T *l, T Tx, T Ty, T Tz, T &Tn, T &Tm, T &Tl)