4 #include "routines_curvilinear.h"
5 #include "riemannsolver_routines.h"
7 #include "../Curvilinear/ContextSlipWeakening.h"
9 template <
class Shortcuts,
int basisSize,
int numberOfVariables,
int numberOfParameters,
typename T>
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);
25 easi::Query query(1,3);
31 model->evaluate(query,adapter);
36 template <
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
43 T sxx, syy, szz, sxy, sxz, syz;
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;
57 easi::ArraysAdapter<T> adapter;
59 adapter.addBindingPoint(
"n_yz",&n_yz);
62 easi::Query query(1,3);
68 model->evaluate(query,adapter);
74 template <
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
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);
90 easi::Query query(1,3);
96 model->evaluate(query,adapter);
104 cohesion += 1e10*(1.0-fy*fz);
108 }
else if ((t0_rupture > 0.00001) && (
t < r_T+t0_rupture)){
109 f_T = (
t-r_T)/t0_rupture;
115 T fric_coeff = mu_s - (mu_s-mu_d) * std::max(f_T,
std::min(S,d_c)/d_c);
117 tau_str = cohesion + fric_coeff*std::max(0.0,sigma_n);
121 template <
class Shortcuts,
int basisSize,
int numberOfVariables,
int numberOfParameters,
typename T>
126 if ((-
w+tol)<
x &&
x< (
w-tol)){
129 else if (std::abs(-
w-
x)<=tol || std::abs(
x-
w)<=tol){
140 template <
class Shortcuts,
int basisSize,
int numberOfVariables,
int numberOfParameters,
typename T>
142 T& v1, T& v2, T& Vel,
145 T eta, T tau_str, T sigma_n
148 T Phi = std::sqrt(std::pow(phi_1, 2) + std::pow(phi_2, 2));
149 Vel = (Phi - tau_str)/eta;
152 v1 = phi_1/(eta+tau_str/Vel);
153 v2 = phi_2/(eta+tau_str/Vel);
156 tau1 = phi_1 - eta*v1;
157 tau2 = phi_2 - eta*v2;
162 template <
class Shortcuts,
int basisSize,
int numberOfVariables,
int numberOfParameters,
typename T>
167 T& vn_hat_p, T& vn_hat_m,
168 T& Tn_hat_p, T& Tn_hat_m,
172 T& vm_hat_p, T& vm_hat_m,
173 T& Tm_hat_p, T& Tm_hat_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
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;
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;
191 T eta_s=(zl_p*zl_m)/(zl_p+zl_m);
192 T eta_n=(zn_p*zn_m)/(zn_p+zn_m);
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);
205 vn_hat_m = (p_n - phi_n)/zn_p;
207 vn_hat_p = (q_n + phi_n)/zn_m;
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(0.0, -(T0_n + phi_n));
214 T Tl, Tm, vv_l, vv_m;
217 if (tau_lock >= tau_str){
219 slip_weakening(vv_m, vv_l, Vel, Tm, Tl, phi_m+T0_m, phi_l+T0_l, eta_s, tau_str, sigma_n);
221 Tm_hat_m = Tm - T0_m;
222 Tl_hat_m = Tl - T0_l;
224 Tm_hat_p = Tm - T0_m;
225 Tl_hat_p = Tl - T0_l;
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;
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;
static double min(double const x, double const y)
void initialstresstensor(double &sxx, double &syy, double &sxy, double *x)
void TauStrength(double &tau_str, double sigma_n, double S, double *x, double t)
void slip_weakening(double &v1, double &Vel, double &tau1, double phi_1, double eta, double tau_str, double sigma_n)
void rotate_into_orthogonal_basis(double *n, double *m, double Tx, double Ty, double &Tn, double &Tm)
void SlipWeakeningFriction(double vn_p, double vn_m, double Tn_p, double Tn_m, double zn_p, double zn_m, double &vn_hat_p, double &vn_hat_m, double &Tn_hat_p, double &Tn_hat_m, double vm_p, double vm_m, double Tm_p, double Tm_m, double zm_p, double zm_m, double &vm_hat_p, double &vm_hat_m, double &Tm_hat_p, double &Tm_hat_m, double *m, double *n, double *x, double S)
void prestress(double &T0_n, double &T0_m, double *x, double t, double *m, double *n)
double boxcar(double &f, double x, double w)