summaryrefslogtreecommitdiff
path: root/src/beta_scales.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/beta_scales.c')
-rw-r--r--src/beta_scales.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/beta_scales.c b/src/beta_scales.c
new file mode 100644
index 0000000..8cbc5d1
--- /dev/null
+++ b/src/beta_scales.c
@@ -0,0 +1,21 @@
+
+#include "fracture.h"
+
+double beta_scaling_flat(double beta, double x, double y) { return beta; }
+
+double beta_mag(double beta) {
+ double aa = -7.52579;
+ double bb = 9.63706;
+ double cc = 0.692515;
+ double dd = -2.47638;
+
+ return gsl_sf_exp(aa + bb * gsl_sf_erf(cc * (gsl_sf_log(beta) - dd)));
+}
+
+double beta_scaling_gaus(double beta, double x, double y) {
+ double sigma = 0.25;
+ double nu_f = 1.56;
+ double betap = beta * gsl_sf_exp((gsl_pow_2(x - 0.5) + gsl_pow_2(y - 0.5)) /
+ (2 * sigma * 2 * nu_f));
+ return betap;
+}