diff --git a/src/main/java/gov/usgs/earthquake/nshmp/gmm/UsgsPrviBackbone2025.java b/src/main/java/gov/usgs/earthquake/nshmp/gmm/UsgsPrviBackbone2025.java index 6e0e2b239b1042189836125ddb59b87c8f1fd6ac..aa37b1eb46e6a880fecb67909602876cc3b298dc 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/gmm/UsgsPrviBackbone2025.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/gmm/UsgsPrviBackbone2025.java @@ -81,6 +81,10 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel { final double a, b; final double φs2sPrvi, φs2sNga; final double Ï„Sub, φSub, φSubSS, φSubS2S; + final double Ï„SubPga, φSubPga, φSubSSpga, φSubS2Spga; + + final double bnl, cnl, vlin; + final double bnlSub, vlinSub, ÏB, ÏW; Coefficients(Imt imt) { @@ -103,6 +107,24 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel { φSub = coeffsSubSigma.get("phi_mean"); φSubSS = coeffsSubSigma.get("PhiSS_PRVI"); φSubS2S = coeffsSubSigma.get("phiS2S_PRVI_smooth"); + + Map<String, Double> coeffsSubSigmaPga = COEFFS_SIGMA_SUBDUCTION.get(Imt.PGA); + Ï„SubPga = coeffsSubSigmaPga.get("tau_mean"); + φSubPga = coeffsSubSigmaPga.get("phi_mean"); + φSubSSpga = coeffsSubSigmaPga.get("PhiSS_PRVI"); + φSubS2Spga = coeffsSubSigmaPga.get("phiS2S_PRVI_smooth"); + + Map<String, Double> coeffsAsk14 = AbrahamsonEtAl_2014.COEFFS.get(imt); + bnl = coeffsAsk14.get("b"); + cnl = coeffsAsk14.get("c"); + vlin = coeffsAsk14.get("Vlin"); + + Map<String, Double> coeffsAg20 = AbrahamsonGulerce_2020.COEFFS.get(imt); + bnlSub = coeffsAg20.get("b"); + vlinSub = coeffsAg20.get("vlin"); + ÏB = coeffsAg20.get("rhoB"); + ÏW = coeffsAg20.get("rhoB"); + } } @@ -221,6 +243,8 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel { CB_14_PRVI, 0.25, CY_14_PRVI, 0.25); + private final AbrahamsonEtAl_2014 σPgaGmm; + ActiveCrust(Imt imt) { this(imt, NAME); } @@ -231,18 +255,40 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel { ActiveCrust(Imt imt, String name, Map<Gmm, Double> gmms) { super(imt, name, gmms, getPrviEpi(ACTIVE_CRUST, imt)); + this.σPgaGmm = (AbrahamsonEtAl_2014) Gmm.ASK_14_BASE.instance(imt); } @Override double[] calcSigmas(GmmInput in) { Coefficients c = super.coeffs; double Ï„ = calcTau(in.Mw, c); + double saRock = calcSaRock(in); + double dAmp_p1 = AbrahamsonEtAl_2014.get_dAmp(c.bnl, c.cnl, c.vlin, in.vs30, saRock) + 1.0; + double Ï„nl = Ï„ * dAmp_p1; double φSS = calcPhiSS(in.Mw, c); - double σNga = sqrt(Ï„ * Ï„ + c.φs2sNga * c.φs2sNga + φSS * φSS); - double σPrvi = sqrt(Ï„ * Ï„ + c.φs2sPrvi * c.φs2sPrvi + φSS * φSS); + double φSqNga = φSS * φSS + c.φs2sNga * c.φs2sNga; + double φSqPrvi = φSS * φSS + c.φs2sPrvi * c.φs2sPrvi; + + double φNlNgaSq = calcPhiSSNonLinSq(φSqNga, dAmp_p1); + double φNlPrviSq = calcPhiSSNonLinSq(φSqPrvi, dAmp_p1); + + double σNga = sqrt(Ï„nl * Ï„nl + φNlNgaSq); + double σPrvi = sqrt(Ï„nl * Ï„nl + φNlPrviSq); + return new double[] { σNga, σPrvi }; } + private double calcSaRock(GmmInput in) { + // ASK Vs30 rock = 1180 m/s + // Also disable basin term. + GmmInput inRock = GmmInput.builder().fromCopy(in) + .vs30(AbrahamsonEtAl_2014.VS_RK) + .z1p0(Double.NaN) + .build(); + + return Math.exp(σPgaGmm.calc(inRock).get(0).value().mean()); + } + // active crust tau static double calcTau(double Mw, Coefficients c) { if (Mw <= 4.5) { @@ -262,6 +308,11 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel { static double calcPhiSS(double Mw, Coefficients c) { return Mw <= 5.0 ? c.a : Mw > 6.5 ? c.b : c.a + (Mw - 5.0) * ((c.b - c.a) / 1.5); } + + static double calcPhiSSNonLinSq(double φ, double dAmp_p1) { + double phiBsq = φ * φ - AbrahamsonEtAl_2014.PHI_AMP_SQ; + return phiBsq * dAmp_p1 * dAmp_p1 + AbrahamsonEtAl_2014.PHI_AMP_SQ; + } } /* PRVI 2025 Active Crust - sigma NGA */ @@ -387,6 +438,8 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel { KBCG_20_PRVI_INTERFACE, 0.3333, PSBAH_20_PRVI_INTERFACE, 0.3334); + private final AbrahamsonGulerce_2020 σPgaGmm; + Interface(Imt imt) { this(imt, NAME); } @@ -397,14 +450,12 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel { Interface(Imt imt, String name, Map<Gmm, Double> gmms) { super(imt, name, gmms, getPrviEpi(SUBDUCTION_INTERFACE, imt)); + σPgaGmm = (AbrahamsonGulerce_2020) Gmm.AG_20_GLOBAL_INTERFACE.instance(Imt.PGA); } @Override double[] calcSigmas(GmmInput in) { - Coefficients c = super.coeffs; - double σNga = sqrt(c.Ï„Sub * c.Ï„Sub + c.φSub * c.φSub); - double σPrvi = sqrt(c.Ï„Sub * c.Ï„Sub + c.φSubS2S * c.φSubS2S + c.φSubSS * c.φSubSS); - return new double[] { σNga, σPrvi }; + return calcSubductionSigmas(super.coeffs, σPgaGmm, in); } } @@ -531,6 +582,8 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel { KBCG_20_PRVI_SLAB, 0.3333, PSBAH_20_PRVI_SLAB, 0.3334); + private final AbrahamsonGulerce_2020 σPgaGmm; + Slab(Imt imt) { this(imt, NAME); } @@ -541,14 +594,12 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel { Slab(Imt imt, String name, Map<Gmm, Double> gmms) { super(imt, name, gmms, getPrviEpi(SUBDUCTION_SLAB, imt)); + σPgaGmm = (AbrahamsonGulerce_2020) Gmm.AG_20_GLOBAL_SLAB.instance(Imt.PGA); } @Override double[] calcSigmas(GmmInput in) { - Coefficients c = super.coeffs; - double σNga = sqrt(c.Ï„Sub * c.Ï„Sub + c.φSub * c.φSub); - double σPrvi = sqrt(c.Ï„Sub * c.Ï„Sub + c.φSubS2S * c.φSubS2S + c.φSubSS * c.φSubSS); - return new double[] { σNga, σPrvi }; + return calcSubductionSigmas(super.coeffs, σPgaGmm, in); } } @@ -683,4 +734,42 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel { return tree.build(); } + private static double[] calcSubductionSigmas( + Coefficients c, + GroundMotionModel σPgaGmm, + GmmInput in) { + + double pgaRock = calcSubPgaRock(in, σPgaGmm); + double dSite = AbrahamsonGulerce_2020.calc_dSite(c.bnlSub, c.vlinSub, in.vs30, pgaRock); + double Ï„NlSq = calcNonLinTermSq(c.Ï„Sub, c.Ï„SubPga, dSite, c.ÏB); + + double φPrvi = sqrt(c.φSubS2S * c.φSubS2S + c.φSubSS * c.φSubSS); + double φPrviPga = sqrt(c.φSubS2Spga * c.φSubS2Spga + c.φSubSSpga * c.φSubSSpga); + + double φNlSqNga = calcNonLinTermSq(c.φSub, c.φSubPga, dSite, c.ÏW); + double φNlSqPrvi = calcNonLinTermSq(φPrvi, φPrviPga, dSite, c.ÏW); + + double σNga = sqrt(Ï„NlSq + φNlSqNga); + double σPrvi = sqrt(Ï„NlSq + φNlSqPrvi); + return new double[] { σNga, σPrvi }; + + } + + private static double calcSubPgaRock(GmmInput in, GroundMotionModel σGmm) { + // ASK Vs30 rock = 1180 m/s + // Also disable basin term. + GmmInput inRock = GmmInput.builder().fromCopy(in) + .vs30(AbrahamsonGulerce_2020.VS30_ROCK) + .z2p5(Double.NaN) + .build(); + + // branch index 1 = middle branch of epistemic logic tree in AG_20 + return Math.exp(σGmm.calc(inRock).get(1).value().mean()); + } + + /* Used for both Ï„ and φ calculations; v = variable. */ + private static double calcNonLinTermSq(double v, double vPga, double dSite, double Ï) { + return v * v + dSite * dSite * vPga * vPga + 2.0 * dSite * v * vPga * Ï; + } + }