import com.comsol.model.*;
import com.comsol.model.util.*;
import java.util.Arrays;
/** Defined pressure envelope from nonlinear sources and 3D weak waves. */
public class PressureEnvelope3D {
  static final String ROOT="./";
  static void installEOS(Model m) { 
    m.func().create("pfpp","Analytic");
    m.func("pfpp").set("funcname","pfpp");
    m.func("pfpp").set("args","TK,rr");
    m.func("pfpp").set("expr","rr*28.866254046397302*TK*(1+((0.036359237000000003)*(rr/625.03377999999998)^4*(421/TK)^1)*(4)+((1.1222855)*(rr/625.03377999999998)^1*(421/TK)^0.19)*(1)+((-0.63721963999999998)*(rr/625.03377999999998)^1*(421/TK)^1)*(1)+((-1.3599905999999999)*(rr/625.03377999999998)^2*(421/TK)^1)*(2)+((0.24995429)*(rr/625.03377999999998)^3*(421/TK)^0.33000000000000002)*(3)+((-2.2913320000000001)*(rr/625.03377999999998)^1*(421/TK)^1.51*exp(-(rr/625.03377999999998)^2))*(1-2*(rr/625.03377999999998)^2)+((-0.95997986000000002)*(rr/625.03377999999998)^3*(421/TK)^2.2200000000000002*exp(-(rr/625.03377999999998)^2))*(3-2*(rr/625.03377999999998)^2)+((1.2463966)*(rr/625.03377999999998)^2*(421/TK)^0.96999999999999997*exp(-(rr/625.03377999999998)^1))*(2-1*(rr/625.03377999999998)^1)+((-0.41785522000000003)*(rr/625.03377999999998)^2*(421/TK)^2.54*exp(-(rr/625.03377999999998)^2))*(2-2*(rr/625.03377999999998)^2)+((-0.49360387)*(rr/625.03377999999998)^1*(421/TK)^0.75*exp(-1.1679999999999999*((rr/625.03377999999998)-0.317)^2-2.1299999999999999*((421/TK)-1.1399999999999999)^2))*(1-2*1.1679999999999999*(rr/625.03377999999998)*((rr/625.03377999999998)-0.317))+((1.8336733000000001)*(rr/625.03377999999998)^1*(421/TK)^0.375*exp(-0.94399999999999995*((rr/625.03377999999998)-0.70199999999999996)^2-2.1299999999999999*((421/TK)-1.1850000000000001)^2))*(1-2*0.94399999999999995*(rr/625.03377999999998)*((rr/625.03377999999998)-0.70199999999999996))+((-0.27152336999999999)*(rr/625.03377999999998)^1*(421/TK)^0.5*exp(-2.2799999999999998*((rr/625.03377999999998)-0.68600000000000005)^2-2.1299999999999999*((421/TK)-0.94999999999999996)^2))*(1-2*2.2799999999999998*(rr/625.03377999999998)*((rr/625.03377999999998)-0.68600000000000005))+((-0.11731069)*(rr/625.03377999999998)^3*(421/TK)^1*exp(-1.486*((rr/625.03377999999998)-1.2569999999999999)^2-1.865*((421/TK)-1.02)^2))*(3-2*1.486*(rr/625.03377999999998)*((rr/625.03377999999998)-1.2569999999999999))+((-0.48844599999999999)*(rr/625.03377999999998)^2*(421/TK)^0.81499999999999995*exp(-1.78*((rr/625.03377999999998)-0.94699999999999995)^2-1.5900000000000001*((421/TK)-1.0249999999999999)^2))*(2-2*1.78*(rr/625.03377999999998)*((rr/625.03377999999998)-0.94699999999999995)))");
    m.func("pfpp").set("argunit",new String[]{"1","1"});
    m.func("pfpp").set("fununit","1");
    m.func().create("pfpu","Analytic");
    m.func("pfpu").set("funcname","pfpu");
    m.func("pfpu").set("args","TK,rr");
    m.func("pfpu").set("expr","28.866254046397302*TK*((-6.5375660406399998)*(421/TK)+14+5.7610000000000001*1.152019002375297*(421/TK)/(exp(1.152019002375297*(421/TK))-1)+19.370000000000001*2.4370546318289787*(421/TK)/(exp(2.4370546318289787*(421/TK))-1)+7.0960000000000001*4.7719714964370548*(421/TK)/(exp(4.7719714964370548*(421/TK))-1)+((0.036359237000000003)*(rr/625.03377999999998)^4*(421/TK)^1)*1+((1.1222855)*(rr/625.03377999999998)^1*(421/TK)^0.19)*0.19+((-0.63721963999999998)*(rr/625.03377999999998)^1*(421/TK)^1)*1+((-1.3599905999999999)*(rr/625.03377999999998)^2*(421/TK)^1)*1+((0.24995429)*(rr/625.03377999999998)^3*(421/TK)^0.33000000000000002)*0.33000000000000002+((-2.2913320000000001)*(rr/625.03377999999998)^1*(421/TK)^1.51*exp(-(rr/625.03377999999998)^2))*1.51+((-0.95997986000000002)*(rr/625.03377999999998)^3*(421/TK)^2.2200000000000002*exp(-(rr/625.03377999999998)^2))*2.2200000000000002+((1.2463966)*(rr/625.03377999999998)^2*(421/TK)^0.96999999999999997*exp(-(rr/625.03377999999998)^1))*0.96999999999999997+((-0.41785522000000003)*(rr/625.03377999999998)^2*(421/TK)^2.54*exp(-(rr/625.03377999999998)^2))*2.54+((-0.49360387)*(rr/625.03377999999998)^1*(421/TK)^0.75*exp(-1.1679999999999999*((rr/625.03377999999998)-0.317)^2-2.1299999999999999*((421/TK)-1.1399999999999999)^2))*(0.75-2*2.1299999999999999*(421/TK)*((421/TK)-1.1399999999999999))+((1.8336733000000001)*(rr/625.03377999999998)^1*(421/TK)^0.375*exp(-0.94399999999999995*((rr/625.03377999999998)-0.70199999999999996)^2-2.1299999999999999*((421/TK)-1.1850000000000001)^2))*(0.375-2*2.1299999999999999*(421/TK)*((421/TK)-1.1850000000000001))+((-0.27152336999999999)*(rr/625.03377999999998)^1*(421/TK)^0.5*exp(-2.2799999999999998*((rr/625.03377999999998)-0.68600000000000005)^2-2.1299999999999999*((421/TK)-0.94999999999999996)^2))*(0.5-2*2.1299999999999999*(421/TK)*((421/TK)-0.94999999999999996))+((-0.11731069)*(rr/625.03377999999998)^3*(421/TK)^1*exp(-1.486*((rr/625.03377999999998)-1.2569999999999999)^2-1.865*((421/TK)-1.02)^2))*(1-2*1.865*(421/TK)*((421/TK)-1.02))+((-0.48844599999999999)*(rr/625.03377999999998)^2*(421/TK)^0.81499999999999995*exp(-1.78*((rr/625.03377999999998)-0.94699999999999995)^2-1.5900000000000001*((421/TK)-1.0249999999999999)^2))*(0.81499999999999995-2*1.5900000000000001*(421/TK)*((421/TK)-1.0249999999999999)))");
    m.func("pfpu").set("argunit",new String[]{"1","1"});
    m.func("pfpu").set("fununit","1");
    m.func().create("pfpg","Analytic");
    m.func("pfpg").set("funcname","pfpg");
    m.func("pfpg").set("args","TK,rr");
    m.func("pfpg").set("expr","28.866254046397302*TK*(1+log((rr/625.03377999999998))+9.4767038900500005+(-6.5375660406399998)*(421/TK)+14*log((421/TK))+5.7610000000000001*log(1-exp(-1.152019002375297*(421/TK)))+19.370000000000001*log(1-exp(-2.4370546318289787*(421/TK)))+7.0960000000000001*log(1-exp(-4.7719714964370548*(421/TK)))+(0.036359237000000003)*(rr/625.03377999999998)^4*(421/TK)^1+(1.1222855)*(rr/625.03377999999998)^1*(421/TK)^0.19+(-0.63721963999999998)*(rr/625.03377999999998)^1*(421/TK)^1+(-1.3599905999999999)*(rr/625.03377999999998)^2*(421/TK)^1+(0.24995429)*(rr/625.03377999999998)^3*(421/TK)^0.33000000000000002+(-2.2913320000000001)*(rr/625.03377999999998)^1*(421/TK)^1.51*exp(-(rr/625.03377999999998)^2)+(-0.95997986000000002)*(rr/625.03377999999998)^3*(421/TK)^2.2200000000000002*exp(-(rr/625.03377999999998)^2)+(1.2463966)*(rr/625.03377999999998)^2*(421/TK)^0.96999999999999997*exp(-(rr/625.03377999999998)^1)+(-0.41785522000000003)*(rr/625.03377999999998)^2*(421/TK)^2.54*exp(-(rr/625.03377999999998)^2)+(-0.49360387)*(rr/625.03377999999998)^1*(421/TK)^0.75*exp(-1.1679999999999999*((rr/625.03377999999998)-0.317)^2-2.1299999999999999*((421/TK)-1.1399999999999999)^2)+(1.8336733000000001)*(rr/625.03377999999998)^1*(421/TK)^0.375*exp(-0.94399999999999995*((rr/625.03377999999998)-0.70199999999999996)^2-2.1299999999999999*((421/TK)-1.1850000000000001)^2)+(-0.27152336999999999)*(rr/625.03377999999998)^1*(421/TK)^0.5*exp(-2.2799999999999998*((rr/625.03377999999998)-0.68600000000000005)^2-2.1299999999999999*((421/TK)-0.94999999999999996)^2)+(-0.11731069)*(rr/625.03377999999998)^3*(421/TK)^1*exp(-1.486*((rr/625.03377999999998)-1.2569999999999999)^2-1.865*((421/TK)-1.02)^2)+(-0.48844599999999999)*(rr/625.03377999999998)^2*(421/TK)^0.81499999999999995*exp(-1.78*((rr/625.03377999999998)-0.94699999999999995)^2-1.5900000000000001*((421/TK)-1.0249999999999999)^2)+((0.036359237000000003)*(rr/625.03377999999998)^4*(421/TK)^1)*(4)+((1.1222855)*(rr/625.03377999999998)^1*(421/TK)^0.19)*(1)+((-0.63721963999999998)*(rr/625.03377999999998)^1*(421/TK)^1)*(1)+((-1.3599905999999999)*(rr/625.03377999999998)^2*(421/TK)^1)*(2)+((0.24995429)*(rr/625.03377999999998)^3*(421/TK)^0.33000000000000002)*(3)+((-2.2913320000000001)*(rr/625.03377999999998)^1*(421/TK)^1.51*exp(-(rr/625.03377999999998)^2))*(1-2*(rr/625.03377999999998)^2)+((-0.95997986000000002)*(rr/625.03377999999998)^3*(421/TK)^2.2200000000000002*exp(-(rr/625.03377999999998)^2))*(3-2*(rr/625.03377999999998)^2)+((1.2463966)*(rr/625.03377999999998)^2*(421/TK)^0.96999999999999997*exp(-(rr/625.03377999999998)^1))*(2-1*(rr/625.03377999999998)^1)+((-0.41785522000000003)*(rr/625.03377999999998)^2*(421/TK)^2.54*exp(-(rr/625.03377999999998)^2))*(2-2*(rr/625.03377999999998)^2)+((-0.49360387)*(rr/625.03377999999998)^1*(421/TK)^0.75*exp(-1.1679999999999999*((rr/625.03377999999998)-0.317)^2-2.1299999999999999*((421/TK)-1.1399999999999999)^2))*(1-2*1.1679999999999999*(rr/625.03377999999998)*((rr/625.03377999999998)-0.317))+((1.8336733000000001)*(rr/625.03377999999998)^1*(421/TK)^0.375*exp(-0.94399999999999995*((rr/625.03377999999998)-0.70199999999999996)^2-2.1299999999999999*((421/TK)-1.1850000000000001)^2))*(1-2*0.94399999999999995*(rr/625.03377999999998)*((rr/625.03377999999998)-0.70199999999999996))+((-0.27152336999999999)*(rr/625.03377999999998)^1*(421/TK)^0.5*exp(-2.2799999999999998*((rr/625.03377999999998)-0.68600000000000005)^2-2.1299999999999999*((421/TK)-0.94999999999999996)^2))*(1-2*2.2799999999999998*(rr/625.03377999999998)*((rr/625.03377999999998)-0.68600000000000005))+((-0.11731069)*(rr/625.03377999999998)^3*(421/TK)^1*exp(-1.486*((rr/625.03377999999998)-1.2569999999999999)^2-1.865*((421/TK)-1.02)^2))*(3-2*1.486*(rr/625.03377999999998)*((rr/625.03377999999998)-1.2569999999999999))+((-0.48844599999999999)*(rr/625.03377999999998)^2*(421/TK)^0.81499999999999995*exp(-1.78*((rr/625.03377999999998)-0.94699999999999995)^2-1.5900000000000001*((421/TK)-1.0249999999999999)^2))*(2-2*1.78*(rr/625.03377999999998)*((rr/625.03377999999998)-0.94699999999999995)))");
    m.func("pfpg").set("argunit",new String[]{"1","1"});
    m.func("pfpg").set("fununit","1");
    m.func().create("pfhp","Analytic");
    m.func("pfhp").set("funcname","pfhp");
    m.func("pfhp").set("args","TK,rr");
    m.func("pfhp").set("expr","rr*24.59594552747884*TK*(1+((0.035689273000000001)*(rr/616.92664999999988)^4*(448/TK)^1)*(4)+((0.89834616)*(rr/616.92664999999988)^1*(448/TK)^0.14599999999999999)*(1)+((-0.11619206999999999)*(rr/616.92664999999988)^1*(448/TK)^1)*(1)+((-1.6558706999999999)*(rr/616.92664999999988)^2*(448/TK)^1)*(2)+((0.30904009999999998)*(rr/616.92664999999988)^3*(448/TK)^0.39000000000000001)*(3)+((-3.0212884999999998)*(rr/616.92664999999988)^1*(448/TK)^1.5600000000000001*exp(-(rr/616.92664999999988)^2))*(1-2*(rr/616.92664999999988)^2)+((-1.309987)*(rr/616.92664999999988)^3*(448/TK)^2.25*exp(-(rr/616.92664999999988)^2))*(3-2*(rr/616.92664999999988)^2)+((1.4611604)*(rr/616.92664999999988)^2*(448/TK)^0.98699999999999999*exp(-(rr/616.92664999999988)^1))*(2-1*(rr/616.92664999999988)^1)+((-0.63849402)*(rr/616.92664999999988)^2*(448/TK)^2.6019999999999999*exp(-(rr/616.92664999999988)^2))*(2-2*(rr/616.92664999999988)^2)+((-0.40480926)*(rr/616.92664999999988)^1*(448/TK)^1.8700000000000001*exp(-0.87749999999999995*((rr/616.92664999999988)-0.35999999999999999)^2-1.171*((448/TK)-1.254)^2))*(1-2*0.87749999999999995*(rr/616.92664999999988)*((rr/616.92664999999988)-0.35999999999999999))+((2.3673483000000002)*(rr/616.92664999999988)^1*(448/TK)^0.96999999999999997*exp(-1*((rr/616.92664999999988)-0.755)^2-1.1399999999999999*((448/TK)-1.3120000000000001)^2))*(1-2*1*(rr/616.92664999999988)*((rr/616.92664999999988)-0.755))+((0.40072213000000001)*(rr/616.92664999999988)^1*(448/TK)^2.2200000000000002*exp(-1.327*((rr/616.92664999999988)-1.6930000000000001)^2-0.64500000000000002*((448/TK)-1.1779999999999999)^2))*(1-2*1.327*(rr/616.92664999999988)*((rr/616.92664999999988)-1.6930000000000001))+((-0.43534683000000002)*(rr/616.92664999999988)^3*(448/TK)^1.7*exp(-1.1020000000000001*((rr/616.92664999999988)-1.04)^2-0.65800000000000003*((448/TK)-1.3260000000000001)^2))*(3-2*1.1020000000000001*(rr/616.92664999999988)*((rr/616.92664999999988)-1.04))+((-0.90267664000000003)*(rr/616.92664999999988)^2*(448/TK)^1.3100000000000001*exp(-1.274*((rr/616.92664999999988)-0.64600000000000002)^2-0.72699999999999998*((448/TK)-0.90200000000000002)^2))*(2-2*1.274*(rr/616.92664999999988)*((rr/616.92664999999988)-0.64600000000000002)))");
    m.func("pfhp").set("argunit",new String[]{"1","1"});
    m.func("pfhp").set("fununit","1");
    m.func().create("pfhu","Analytic");
    m.func("pfhu").set("funcname","pfhu");
    m.func("pfhu").set("args","TK,rr");
    m.func("pfhu").set("expr","24.59594552747884*TK*((-9.8030217139900007)*(448/TK)+16+4.9020000000000001*0.9665178571428571*(448/TK)/(exp(0.9665178571428571*(448/TK))-1)+23.43*2.03125*(448/TK)/(exp(2.03125*(448/TK))-1)+10.52*4.4241071428571432*(448/TK)/(exp(4.4241071428571432*(448/TK))-1)+((0.035689273000000001)*(rr/616.92664999999988)^4*(448/TK)^1)*1+((0.89834616)*(rr/616.92664999999988)^1*(448/TK)^0.14599999999999999)*0.14599999999999999+((-0.11619206999999999)*(rr/616.92664999999988)^1*(448/TK)^1)*1+((-1.6558706999999999)*(rr/616.92664999999988)^2*(448/TK)^1)*1+((0.30904009999999998)*(rr/616.92664999999988)^3*(448/TK)^0.39000000000000001)*0.39000000000000001+((-3.0212884999999998)*(rr/616.92664999999988)^1*(448/TK)^1.5600000000000001*exp(-(rr/616.92664999999988)^2))*1.5600000000000001+((-1.309987)*(rr/616.92664999999988)^3*(448/TK)^2.25*exp(-(rr/616.92664999999988)^2))*2.25+((1.4611604)*(rr/616.92664999999988)^2*(448/TK)^0.98699999999999999*exp(-(rr/616.92664999999988)^1))*0.98699999999999999+((-0.63849402)*(rr/616.92664999999988)^2*(448/TK)^2.6019999999999999*exp(-(rr/616.92664999999988)^2))*2.6019999999999999+((-0.40480926)*(rr/616.92664999999988)^1*(448/TK)^1.8700000000000001*exp(-0.87749999999999995*((rr/616.92664999999988)-0.35999999999999999)^2-1.171*((448/TK)-1.254)^2))*(1.8700000000000001-2*1.171*(448/TK)*((448/TK)-1.254))+((2.3673483000000002)*(rr/616.92664999999988)^1*(448/TK)^0.96999999999999997*exp(-1*((rr/616.92664999999988)-0.755)^2-1.1399999999999999*((448/TK)-1.3120000000000001)^2))*(0.96999999999999997-2*1.1399999999999999*(448/TK)*((448/TK)-1.3120000000000001))+((0.40072213000000001)*(rr/616.92664999999988)^1*(448/TK)^2.2200000000000002*exp(-1.327*((rr/616.92664999999988)-1.6930000000000001)^2-0.64500000000000002*((448/TK)-1.1779999999999999)^2))*(2.2200000000000002-2*0.64500000000000002*(448/TK)*((448/TK)-1.1779999999999999))+((-0.43534683000000002)*(rr/616.92664999999988)^3*(448/TK)^1.7*exp(-1.1020000000000001*((rr/616.92664999999988)-1.04)^2-0.65800000000000003*((448/TK)-1.3260000000000001)^2))*(1.7-2*0.65800000000000003*(448/TK)*((448/TK)-1.3260000000000001))+((-0.90267664000000003)*(rr/616.92664999999988)^2*(448/TK)^1.3100000000000001*exp(-1.274*((rr/616.92664999999988)-0.64600000000000002)^2-0.72699999999999998*((448/TK)-0.90200000000000002)^2))*(1.3100000000000001-2*0.72699999999999998*(448/TK)*((448/TK)-0.90200000000000002)))");
    m.func("pfhu").set("argunit",new String[]{"1","1"});
    m.func("pfhu").set("fununit","1");
    m.func().create("pfhg","Analytic");
    m.func("pfhg").set("funcname","pfhg");
    m.func("pfhg").set("args","TK,rr");
    m.func("pfhg").set("expr","24.59594552747884*TK*(1+log((rr/616.92664999999988))+14.486127460400001+(-9.8030217139900007)*(448/TK)+16*log((448/TK))+4.9020000000000001*log(1-exp(-0.9665178571428571*(448/TK)))+23.43*log(1-exp(-2.03125*(448/TK)))+10.52*log(1-exp(-4.4241071428571432*(448/TK)))+(0.035689273000000001)*(rr/616.92664999999988)^4*(448/TK)^1+(0.89834616)*(rr/616.92664999999988)^1*(448/TK)^0.14599999999999999+(-0.11619206999999999)*(rr/616.92664999999988)^1*(448/TK)^1+(-1.6558706999999999)*(rr/616.92664999999988)^2*(448/TK)^1+(0.30904009999999998)*(rr/616.92664999999988)^3*(448/TK)^0.39000000000000001+(-3.0212884999999998)*(rr/616.92664999999988)^1*(448/TK)^1.5600000000000001*exp(-(rr/616.92664999999988)^2)+(-1.309987)*(rr/616.92664999999988)^3*(448/TK)^2.25*exp(-(rr/616.92664999999988)^2)+(1.4611604)*(rr/616.92664999999988)^2*(448/TK)^0.98699999999999999*exp(-(rr/616.92664999999988)^1)+(-0.63849402)*(rr/616.92664999999988)^2*(448/TK)^2.6019999999999999*exp(-(rr/616.92664999999988)^2)+(-0.40480926)*(rr/616.92664999999988)^1*(448/TK)^1.8700000000000001*exp(-0.87749999999999995*((rr/616.92664999999988)-0.35999999999999999)^2-1.171*((448/TK)-1.254)^2)+(2.3673483000000002)*(rr/616.92664999999988)^1*(448/TK)^0.96999999999999997*exp(-1*((rr/616.92664999999988)-0.755)^2-1.1399999999999999*((448/TK)-1.3120000000000001)^2)+(0.40072213000000001)*(rr/616.92664999999988)^1*(448/TK)^2.2200000000000002*exp(-1.327*((rr/616.92664999999988)-1.6930000000000001)^2-0.64500000000000002*((448/TK)-1.1779999999999999)^2)+(-0.43534683000000002)*(rr/616.92664999999988)^3*(448/TK)^1.7*exp(-1.1020000000000001*((rr/616.92664999999988)-1.04)^2-0.65800000000000003*((448/TK)-1.3260000000000001)^2)+(-0.90267664000000003)*(rr/616.92664999999988)^2*(448/TK)^1.3100000000000001*exp(-1.274*((rr/616.92664999999988)-0.64600000000000002)^2-0.72699999999999998*((448/TK)-0.90200000000000002)^2)+((0.035689273000000001)*(rr/616.92664999999988)^4*(448/TK)^1)*(4)+((0.89834616)*(rr/616.92664999999988)^1*(448/TK)^0.14599999999999999)*(1)+((-0.11619206999999999)*(rr/616.92664999999988)^1*(448/TK)^1)*(1)+((-1.6558706999999999)*(rr/616.92664999999988)^2*(448/TK)^1)*(2)+((0.30904009999999998)*(rr/616.92664999999988)^3*(448/TK)^0.39000000000000001)*(3)+((-3.0212884999999998)*(rr/616.92664999999988)^1*(448/TK)^1.5600000000000001*exp(-(rr/616.92664999999988)^2))*(1-2*(rr/616.92664999999988)^2)+((-1.309987)*(rr/616.92664999999988)^3*(448/TK)^2.25*exp(-(rr/616.92664999999988)^2))*(3-2*(rr/616.92664999999988)^2)+((1.4611604)*(rr/616.92664999999988)^2*(448/TK)^0.98699999999999999*exp(-(rr/616.92664999999988)^1))*(2-1*(rr/616.92664999999988)^1)+((-0.63849402)*(rr/616.92664999999988)^2*(448/TK)^2.6019999999999999*exp(-(rr/616.92664999999988)^2))*(2-2*(rr/616.92664999999988)^2)+((-0.40480926)*(rr/616.92664999999988)^1*(448/TK)^1.8700000000000001*exp(-0.87749999999999995*((rr/616.92664999999988)-0.35999999999999999)^2-1.171*((448/TK)-1.254)^2))*(1-2*0.87749999999999995*(rr/616.92664999999988)*((rr/616.92664999999988)-0.35999999999999999))+((2.3673483000000002)*(rr/616.92664999999988)^1*(448/TK)^0.96999999999999997*exp(-1*((rr/616.92664999999988)-0.755)^2-1.1399999999999999*((448/TK)-1.3120000000000001)^2))*(1-2*1*(rr/616.92664999999988)*((rr/616.92664999999988)-0.755))+((0.40072213000000001)*(rr/616.92664999999988)^1*(448/TK)^2.2200000000000002*exp(-1.327*((rr/616.92664999999988)-1.6930000000000001)^2-0.64500000000000002*((448/TK)-1.1779999999999999)^2))*(1-2*1.327*(rr/616.92664999999988)*((rr/616.92664999999988)-1.6930000000000001))+((-0.43534683000000002)*(rr/616.92664999999988)^3*(448/TK)^1.7*exp(-1.1020000000000001*((rr/616.92664999999988)-1.04)^2-0.65800000000000003*((448/TK)-1.3260000000000001)^2))*(3-2*1.1020000000000001*(rr/616.92664999999988)*((rr/616.92664999999988)-1.04))+((-0.90267664000000003)*(rr/616.92664999999988)^2*(448/TK)^1.3100000000000001*exp(-1.274*((rr/616.92664999999988)-0.64600000000000002)^2-0.72699999999999998*((448/TK)-0.90200000000000002)^2))*(2-2*1.274*(rr/616.92664999999988)*((rr/616.92664999999988)-0.64600000000000002)))");
    m.func("pfhg").set("argunit",new String[]{"1","1"});
    m.func("pfhg").set("fununit","1");
 }
    public static Model run()throws Exception {
    Model m=ModelUtil.create("pressure_envelope_theory_3d");m.modelPath(ROOT+"scratch");m.label("Theory 1: conditional pressure envelope, finite PFP phase and fixed-energy populations in 3D");
    m.param().set("Lout","0.9[mm]");
    m.param().set("robs","0.5[mm]");
    m.param().set("adet","50[um]");
    m.param().set("hdet","5[um]");
    m.param().set("rhoL","1000[kg/m^3]");
    m.param().set("cL","1480[m/s]");
    m.param().set("muL","1e-3[Pa*s]");
    m.param().set("DP","100[kPa]");
    m.param().set("Tref","293.15[K]");
    m.param().set("Rpop","200[um]");
    m.param().set("tf","1/(2*pi*1[MHz])");
    installEOS(m);
    m.param().set("acP","2.4889372178167041e-05[m]");
    m.param().set("mpcP","1.1281810887041304e-12[kg]");
    m.param().set("S0cP","126.55541943158264[J/(kg*K)]");
    m.param().set("uDcP","-9810.2016267042909[J/kg]");
    m.param().set("rhoDcP","1621.4903685295262[kg/m^3]");
    m.param().set("rDcP","5.4969941859583877e-06[m]");
    m.param().set("bcP","4.9778744356334081e-05[m]","Matching radius; continuum case uses the infinite-near-field dilute limit");
    m.param().set("bscP","bcP/acP");
    m.param().set("taucP","acP*sqrt(rhoL/DP)");
    m.param().set("E0cP","5.5000000000000003e-08[J]","Fixed total retained source energy, including finite PFP internal and interface energy");
    m.param().set("sigcP","0.054[N/m]");
    m.param().set("sigIcP","0.00941[N/m]");
    m.param().set("rhoLcP","1621.2302097446284[kg/m^3]");
    m.param().set("rhoVcP","8.7819467089401986[kg/m^3]");
    m.component().create("cP",true);m.component("cP").geom().create("gcP",3);m.component("cP").sorder("quadratic");
    m.component("cP").label("cP: 1 resolved matching regions");
    m.component("cP").geom("gcP").create("outer","Sphere");m.component("cP").geom("gcP").feature("outer").set("r","Lout");
    m.component("cP").geom("gcP").create("inner1","Sphere");m.component("cP").geom("gcP").feature("inner1").set("r","bcP");m.component("cP").geom("gcP").feature("inner1").set("pos",new String[]{"0[m]","0[m]","0[m]"});
    m.component("cP").geom("gcP").create("dif","Difference");m.component("cP").geom("gcP").feature("dif").selection("input").set("outer");m.component("cP").geom("gcP").feature("dif").selection("input2").set(new String[]{"inner1"});
    m.component("cP").geom("gcP").create("det","Cylinder");m.component("cP").geom("gcP").feature("det").set("r","adet");m.component("cP").geom("gcP").feature("det").set("h","hdet");m.component("cP").geom("gcP").feature("det").set("pos",new String[]{"0","0","robs-hdet/2"});m.component("cP").geom("gcP").run();
    m.component("cP").selection().create("source1cP","Box");m.component("cP").selection("source1cP").set("entitydim",2);m.component("cP").selection("source1cP").set("condition","inside");
    m.component("cP").selection("source1cP").set("xmin","0[m]-1.001*bcP");
    m.component("cP").selection("source1cP").set("xmax","0[m]+1.001*bcP");
    m.component("cP").selection("source1cP").set("ymin","0[m]-1.001*bcP");
    m.component("cP").selection("source1cP").set("ymax","0[m]+1.001*bcP");
    m.component("cP").selection("source1cP").set("zmin","0[m]-1.001*bcP");
    m.component("cP").selection("source1cP").set("zmax","0[m]+1.001*bcP");
    m.component("cP").selection().create("detectorcP","Box");m.component("cP").selection("detectorcP").set("entitydim",3);m.component("cP").selection("detectorcP").set("condition","inside");
    m.component("cP").selection("detectorcP").set("xmin","-1.001*adet");
    m.component("cP").selection("detectorcP").set("xmax","1.001*adet");
    m.component("cP").selection("detectorcP").set("ymin","-1.001*adet");
    m.component("cP").selection("detectorcP").set("ymax","1.001*adet");
    m.component("cP").selection("detectorcP").set("zmin","robs-0.501*hdet");
    m.component("cP").selection("detectorcP").set("zmax","robs+0.501*hdet");
    m.component("cP").selection().create("notfarcP","Box");m.component("cP").selection("notfarcP").set("entitydim",2);m.component("cP").selection("notfarcP").set("condition","inside");
    m.component("cP").selection("notfarcP").set("xmin","-0.8*Lout");
    m.component("cP").selection("notfarcP").set("xmax","0.8*Lout");
    m.component("cP").selection("notfarcP").set("ymin","-0.8*Lout");
    m.component("cP").selection("notfarcP").set("ymax","0.8*Lout");
    m.component("cP").selection("notfarcP").set("zmin","-0.8*Lout");
    m.component("cP").selection("notfarcP").set("zmax","0.8*Lout");
    m.component("cP").selection().create("farcP","Complement");m.component("cP").selection("farcP").set("entitydim",2);m.component("cP").selection("farcP").set("input",new String[]{"notfarcP"});
    m.component("cP").cpl().create("idcP","Integration");m.component("cP").cpl("idcP").selection().geom("gcP",3);m.component("cP").cpl("idcP").selection().named("detectorcP");
    System.out.println("cP_detector="+Arrays.toString(m.component("cP").selection("detectorcP").entities(3)));
    m.component("cP").cpl().create("iocP","Integration");m.component("cP").cpl("iocP").selection().geom("gcP",2);m.component("cP").cpl("iocP").selection().named("farcP");
    System.out.println("cP_far="+Arrays.toString(m.component("cP").selection("farcP").entities(2)));
    m.component("cP").cpl().create("is1cP","Integration");m.component("cP").cpl("is1cP").selection().geom("gcP",2);m.component("cP").cpl("is1cP").selection().named("source1cP");
    System.out.println("cP_source1="+Arrays.toString(m.component("cP").selection("source1cP").entities(2)));
    m.component("cP").cpl().create("ivcP","Integration");m.component("cP").cpl("ivcP").selection().geom("gcP",3);m.component("cP").cpl("ivcP").selection().all();m.component("cP").variable().create("vcP");
    m.component("cP").variable("vcP").set("R1","acP*r1");
    m.component("cP").variable("vcP").set("U1","acP*r1t");
    m.component("cP").variable("vcP").set("Temp1","Tref*theta1");
    m.component("cP").variable("vcP").set("rhoLP1","rhoLcP*exp(qL1)");
    m.component("cP").variable("vcP").set("rhoVP1","rhoVcP*exp(qV1)");
    m.component("cP").variable("vcP").set("Vb1","4*pi*R1^3/3");
    m.component("cP").variable("vcP").set("pLP1","pfpp(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[Pa]");
    m.component("cP").variable("vcP").set("pVP1","pfpp(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[Pa]");
    m.component("cP").variable("vcP").set("uLP1","pfpu(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[J/kg]");
    m.component("cP").variable("vcP").set("uVP1","pfpu(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[J/kg]");
    m.component("cP").variable("vcP").set("gLP1","pfpg(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[J/kg]");
    m.component("cP").variable("vcP").set("gVP1","pfpg(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[J/kg]");
    m.component("cP").variable("vcP").set("fv1","(Vb1-mpcP/rhoLP1)/(mpcP*(1/rhoVP1-1/rhoLP1))");
    m.component("cP").variable("vcP").set("Rg1","(max(fv1*mpcP/rhoVP1,4*pi*(1[nm])^3/3)*3/(4*pi))^(1/3)");
    m.component("cP").variable("vcP").set("Sspec1","((1-fv1)*(uLP1+pLP1/rhoLP1-gLP1)+fv1*(uVP1+pVP1/rhoVP1-gVP1))/Temp1");
    m.component("cP").variable("vcP").set("qvol1","4*pi*R1^2*U1");
    m.component("cP").variable("vcP").set("pB1","pLP1-2*sigcP/R1-4*muL*U1/R1");
    m.component("cP").variable("vcP").set("En1","2*pi*rhoL*R1^3*U1^2*(1-R1/bcP)");
    m.component("cP").variable("vcP").set("Ei1","mpcP*((1-fv1)*uLP1+fv1*uVP1)+4*pi*sigIcP*Rg1^2-mpcP*uDcP-DP*mpcP/rhoDcP-4*pi*sigcP*rDcP^2");
    m.component("cP").variable("vcP").set("Ep1","DP*Vb1+4*pi*sigcP*R1^2");
    m.component("cP").variable("vcP").set("En","1*(En1)");
    m.component("cP").variable("vcP").set("Ei","1*(Ei1)");
    m.component("cP").variable("vcP").set("Ep","1*(Ep1)");
    m.component("cP").variable("vcP").set("Ein","E0cP");
    m.component("cP").variable("vcP").set("phiDt","acP^2/taucP*chit");
    m.component("cP").variable("vcP").set("pAc","-rhoL*phiDt");
    m.component("cP").variable("vcP").set("u2ac","(acP^2/taucP)^2*(chix^2+chiy^2+chiz^2)");
    m.component("cP").variable("vcP").set("Ea","ivcP(rhoL/2*(u2ac+phiDt^2/cL^2))");
    m.component("cP").physics().create("potcP","CoefficientFormPDE","gcP",new String[]{"chi"});m.component("cP").physics("potcP").label("Spatial 3D weak acoustic potential and conservative source flux");
    m.component("cP").physics("potcP").feature("cfeq1").set("c","1");
    m.component("cP").physics("potcP").feature("cfeq1").set("da","0");
    m.component("cP").physics("potcP").feature("cfeq1").set("ea","1/cL^2");
    m.component("cP").physics("potcP").feature("cfeq1").set("f","0");
    m.component("cP").physics("potcP").feature("init1").set("chi","0");m.component("cP").physics("potcP").feature("init1").set("chit","0");
    m.component("cP").physics("potcP").create("flux1","FluxBoundary",2);m.component("cP").physics("potcP").feature("flux1").selection().named("source1cP");m.component("cP").physics("potcP").feature("flux1").set("g","-taucP/acP^2*qvol1/is1cP(1)");m.component("cP").physics("potcP").feature("flux1").set("q","0");
    m.component("cP").physics("potcP").create("radiation","FluxBoundary",2);m.component("cP").physics("potcP").feature("radiation").selection().named("farcP");m.component("cP").physics("potcP").feature("radiation").set("g","-chit/cL");m.component("cP").physics("potcP").feature("radiation").set("q","1/Lout");
    m.component("cP").physics().create("gecP","GlobalEquations");m.component("cP").physics("gecP").label("Finite PFP mass, chemical equilibrium, conserved entropy and source dynamics");
    m.component("cP").physics("gecP").feature("ge1").set("name",new String[]{"r1","theta1","qL1","qV1","ediss","erout","pdet"});
    m.component("cP").physics("gecP").feature("ge1").set("equation",new String[]{"taucP^2*((r1-r1^2/bscP)*r1tt+(1.5-2*r1/bscP)*r1t^2)-(pB1-DP)/DP-taucP*is1cP(chit)/is1cP(1)","(pVP1-pLP1-2*sigIcP/Rg1)/DP","(gLP1-gVP1)/(100[kJ/kg])","(Sspec1-S0cP)/(100[J/(kg*K)])","edisst-1*(16*pi*muL*R1*U1^2)/E0cP","eroutt-rhoL*(acP^2/taucP)^2*iocP(chit*(chit/cL+chi/Lout))/E0cP","tf*pdett+pdet-idcP(pAc)/(idcP(1)*DP)"});
    m.component("cP").physics("gecP").feature("ge1").set("initialValueU",new String[]{"1","1","-2.5199096293844559e-06","-6.0772474348736627e-05","0","0","0"});
    m.component("cP").physics("gecP").feature("ge1").set("initialValueUt",new String[]{"0","0","0","0","0","0","0"});
    m.component("cP").mesh().create("meshcP","gcP");
    m.component("cP").mesh("meshcP").feature("size").set("custom",true);
    m.component("cP").mesh("meshcP").feature("size").set("hmax","150[um]");
    m.component("cP").mesh("meshcP").feature("size").set("hmin","5[um]");
    m.component("cP").mesh("meshcP").feature("size").set("hgrad",1.5);
    m.component("cP").mesh("meshcP").feature("size").set("hcurve",0.3);
    m.component("cP").selection().create("allSourcescP","Union");m.component("cP").selection("allSourcescP").set("entitydim",2);
    m.component("cP").selection("allSourcescP").set("input",new String[]{"source1cP"});
    m.component("cP").mesh("meshcP").create("local","Size");m.component("cP").mesh("meshcP").feature("local").selection().geom("gcP",2);m.component("cP").mesh("meshcP").feature("local").selection().named("allSourcescP");m.component("cP").mesh("meshcP").feature("local").set("custom",true);m.component("cP").mesh("meshcP").feature("local").set("hmaxactive",true);m.component("cP").mesh("meshcP").feature("local").set("hmax","acP/2");
    m.component("cP").mesh("meshcP").create("tet","FreeTet");m.component("cP").mesh("meshcP").run();
    m.study().create("stdcP");m.study("stdcP").label("cP: first 8 microseconds at a fixed 1 MHz virtual pressure receiver");m.study("stdcP").create("time","Transient");m.study("stdcP").feature("time").set("tlist","range(0,25[ns],8[us])");
    for(String stage:m.study().tags())if(stage.startsWith("std"))for(String cc:m.component().tags())for(String ph:m.component(cc).physics().tags())m.study(stage).feature("time").setSolveFor(m.component(cc).physics(ph).resolveModelPath(),cc.equals(stage.substring(3)));
    m.study("stdcP").createAutoSequences("all");String sscP=m.study("stdcP").getSolverSequences("all")[0];
    m.sol(sscP).feature("v1").set("initmethod","init");for(String tag:m.sol(sscP).feature("v1").feature().tags()){m.sol(sscP).feature("v1").feature(tag).set("scalemethod","manual");m.sol(sscP).feature("v1").feature(tag).set("scaleval","1");}
    m.sol(sscP).feature("t1").create("dp","Direct");m.sol(sscP).feature("t1").feature("dp").set("linsolver","pardiso");m.sol(sscP).feature("t1").create("coupledAll","FullyCoupled");m.sol(sscP).feature("t1").feature("coupledAll").set("linsolver","dp");m.sol(sscP).feature("t1").feature("coupledAll").set("maxiter",20);
    for(String remove:new String[]{"se1","fc1"})if(Arrays.asList(m.sol(sscP).feature("t1").feature().tags()).contains(remove))m.sol(sscP).feature("t1").feature().remove(remove);
    m.sol(sscP).feature("t1").set("rtol","2e-5");m.sol(sscP).feature("t1").set("timemethod","genalpha");m.sol(sscP).feature("t1").set("rhoinf",0.75);m.sol(sscP).feature("t1").set("tstepsgenalpha","manual");m.sol(sscP).feature("t1").set("timestepgenalpha","25[ns]");
    m.save(ROOT+"scratch/pressure_envelope_cP_configured.mph");try{m.sol(sscP).runAll();}catch(Exception e){m.save(ROOT+"scratch/pressure_envelope_cP_failed.mph");throw e;}
    m.result().dataset().create("datacP","Solution");m.result().dataset("datacP").set("solution",sscP);m.result().dataset("datacP").set("comp","cP");m.result().table().create("tablecP","Table");m.result().numerical().create("evalcP","EvalGlobal");m.result().numerical("evalcP").set("data","datacP");m.result().numerical("evalcP").set("table","tablecP");
    String[] excP=new String[]{"t","t/taucP","E0cP","cP.pdet*DP","cP.idcP(cP.pAc)/cP.idcP(1)","cP.r1","cP.U1","cP.pLP1","cP.pVP1","cP.Temp1","cP.fv1","cP.Rg1","cP.R1-cP.Rg1","abs(cP.U1)/cL","(cP.Sspec1-S0cP)/(100[J/(kg*K)])","cP.pVP1-cP.pLP1-2*sigIcP/cP.Rg1","cP.gLP1-cP.gVP1","cP.En","cP.Ei","cP.Ep","cP.Ea","E0cP*cP.ediss","E0cP*cP.erout","(cP.En+cP.Ei+cP.Ep+cP.Ea+E0cP*(cP.ediss+cP.erout)-E0cP)/E0cP"};
    m.result().numerical("evalcP").set("expr",excP);m.result().numerical("evalcP").set("descr",excP);m.result().numerical("evalcP").setResult();m.result().table("tablecP").save(ROOT+"data/pressure_envelope_cP.csv");m.save(ROOT+"scratch/pressure_envelope_cP_solved.mph");System.out.println("PRESSURE_SCENARIO_cP_SOLVED="+Arrays.toString(m.sol(sscP).getSize()));
    m.param().set("gasCase","0");
    m.func().create("gasA","Interpolation");m.func("gasA").set("funcname","gasA");m.func("gasA").set("source","table");m.func("gasA").set("nargs",1);m.func("gasA").set("table",new String[][]{{"0","2.5852173032172418e-05"},{"1","2.5000000000000204e-05"},{"2","2.3585357805101539e-05"},{"3","5.1744809887065728e-05"},{"4","5.0000000000000009e-05"},{"5","4.711252016154397e-05"},{"6","4.6614242944652722e-05"}});m.func("gasA").set("argunit",new String[]{"1"});m.func("gasA").set("fununit","m");m.func("gasA").set("interp","linear");
    m.func().create("gasB","Interpolation");m.func("gasB").set("funcname","gasB");m.func("gasB").set("source","table");m.func("gasB").set("nargs",1);m.func("gasB").set("table",new String[][]{{"0","0.050000000000000003"},{"1","0.10000000000000001"},{"2","0.20000000000000001"},{"3","0.050000000000000003"},{"4","0.10000000000000001"},{"5","0.20000000000000001"},{"6","0.10000000000000001"}});m.func("gasB").set("argunit",new String[]{"1"});m.func("gasB").set("fununit","1");m.func("gasB").set("interp","linear");
    m.func().create("gasE","Interpolation");m.func("gasE").set("funcname","gasE");m.func("gasE").set("source","table");m.func("gasE").set("nargs",1);m.func("gasE").set("table",new String[][]{{"0","8.7467175463695827e-09"},{"1","8.7467175463695827e-09"},{"2","8.7467175463695827e-09"},{"3","6.7711793660372013e-08"},{"4","6.7711793660372013e-08"},{"5","6.7711793660372013e-08"},{"6","5.5000000000000003e-08"}});m.func("gasE").set("argunit",new String[]{"1"});m.func("gasE").set("fununit","J");m.func("gasE").set("interp","linear");
    m.param().set("acG","gasA(gasCase)");
    m.param().set("bcG","110[um]","Fixed matching geometry across every gas-case input");
    m.param().set("bscG","bcG/acG");
    m.param().set("taucG","acG*sqrt(rhoL/DP)");
    m.param().set("E0cG","gasE(gasCase)");
    m.param().set("betacG","gasB(gasCase)");
    m.param().set("sigcG","0.072[N/m]");
    m.param().set("kap","1.4");
    m.component().create("cG",true);m.component("cG").geom().create("gcG",3);m.component("cG").sorder("quadratic");
    m.component("cG").label("cG: 1 resolved matching regions");
    m.component("cG").geom("gcG").create("outer","Sphere");m.component("cG").geom("gcG").feature("outer").set("r","Lout");
    m.component("cG").geom("gcG").create("inner1","Sphere");m.component("cG").geom("gcG").feature("inner1").set("r","bcG");m.component("cG").geom("gcG").feature("inner1").set("pos",new String[]{"0[m]","0[m]","0[m]"});
    m.component("cG").geom("gcG").create("dif","Difference");m.component("cG").geom("gcG").feature("dif").selection("input").set("outer");m.component("cG").geom("gcG").feature("dif").selection("input2").set(new String[]{"inner1"});
    m.component("cG").geom("gcG").create("det","Cylinder");m.component("cG").geom("gcG").feature("det").set("r","adet");m.component("cG").geom("gcG").feature("det").set("h","hdet");m.component("cG").geom("gcG").feature("det").set("pos",new String[]{"0","0","robs-hdet/2"});m.component("cG").geom("gcG").run();
    m.component("cG").selection().create("source1cG","Box");m.component("cG").selection("source1cG").set("entitydim",2);m.component("cG").selection("source1cG").set("condition","inside");
    m.component("cG").selection("source1cG").set("xmin","0[m]-1.001*bcG");
    m.component("cG").selection("source1cG").set("xmax","0[m]+1.001*bcG");
    m.component("cG").selection("source1cG").set("ymin","0[m]-1.001*bcG");
    m.component("cG").selection("source1cG").set("ymax","0[m]+1.001*bcG");
    m.component("cG").selection("source1cG").set("zmin","0[m]-1.001*bcG");
    m.component("cG").selection("source1cG").set("zmax","0[m]+1.001*bcG");
    m.component("cG").selection().create("detectorcG","Box");m.component("cG").selection("detectorcG").set("entitydim",3);m.component("cG").selection("detectorcG").set("condition","inside");
    m.component("cG").selection("detectorcG").set("xmin","-1.001*adet");
    m.component("cG").selection("detectorcG").set("xmax","1.001*adet");
    m.component("cG").selection("detectorcG").set("ymin","-1.001*adet");
    m.component("cG").selection("detectorcG").set("ymax","1.001*adet");
    m.component("cG").selection("detectorcG").set("zmin","robs-0.501*hdet");
    m.component("cG").selection("detectorcG").set("zmax","robs+0.501*hdet");
    m.component("cG").selection().create("notfarcG","Box");m.component("cG").selection("notfarcG").set("entitydim",2);m.component("cG").selection("notfarcG").set("condition","inside");
    m.component("cG").selection("notfarcG").set("xmin","-0.8*Lout");
    m.component("cG").selection("notfarcG").set("xmax","0.8*Lout");
    m.component("cG").selection("notfarcG").set("ymin","-0.8*Lout");
    m.component("cG").selection("notfarcG").set("ymax","0.8*Lout");
    m.component("cG").selection("notfarcG").set("zmin","-0.8*Lout");
    m.component("cG").selection("notfarcG").set("zmax","0.8*Lout");
    m.component("cG").selection().create("farcG","Complement");m.component("cG").selection("farcG").set("entitydim",2);m.component("cG").selection("farcG").set("input",new String[]{"notfarcG"});
    m.component("cG").cpl().create("idcG","Integration");m.component("cG").cpl("idcG").selection().geom("gcG",3);m.component("cG").cpl("idcG").selection().named("detectorcG");
    System.out.println("cG_detector="+Arrays.toString(m.component("cG").selection("detectorcG").entities(3)));
    m.component("cG").cpl().create("iocG","Integration");m.component("cG").cpl("iocG").selection().geom("gcG",2);m.component("cG").cpl("iocG").selection().named("farcG");
    System.out.println("cG_far="+Arrays.toString(m.component("cG").selection("farcG").entities(2)));
    m.component("cG").cpl().create("is1cG","Integration");m.component("cG").cpl("is1cG").selection().geom("gcG",2);m.component("cG").cpl("is1cG").selection().named("source1cG");
    System.out.println("cG_source1="+Arrays.toString(m.component("cG").selection("source1cG").entities(2)));
    m.component("cG").cpl().create("ivcG","Integration");m.component("cG").cpl("ivcG").selection().geom("gcG",3);m.component("cG").cpl("ivcG").selection().all();m.component("cG").variable().create("vcG");
    m.component("cG").variable("vcG").set("R1","acG*r1");
    m.component("cG").variable("vcG").set("U1","acG*r1t");
    m.component("cG").variable("vcG").set("pg1","betacG*DP*r1^(-3*kap)");
    m.component("cG").variable("vcG").set("pB1","pg1-2*sigcG/R1-4*muL*U1/R1");
    m.component("cG").variable("vcG").set("qvol1","4*pi*R1^2*U1");
    m.component("cG").variable("vcG").set("En","2*pi*rhoL*R1^3*U1^2*(1-R1/bcG)");
    m.component("cG").variable("vcG").set("Ei","betacG*DP*4*pi*acG^3/(3*(kap-1))*r1^(-3*(kap-1))");
    m.component("cG").variable("vcG").set("Ep","DP*4*pi*R1^3/3+4*pi*sigcG*R1^2");
    m.component("cG").variable("vcG").set("phiDt","acG^2/taucG*chit");
    m.component("cG").variable("vcG").set("pAc","-rhoL*phiDt");
    m.component("cG").variable("vcG").set("u2ac","(acG^2/taucG)^2*(chix^2+chiy^2+chiz^2)");
    m.component("cG").variable("vcG").set("Ea","ivcG(rhoL/2*(u2ac+phiDt^2/cL^2))");
    m.component("cG").physics().create("potcG","CoefficientFormPDE","gcG",new String[]{"chi"});m.component("cG").physics("potcG").label("Spatial 3D weak acoustic potential and conservative source flux");
    m.component("cG").physics("potcG").feature("cfeq1").set("c","1");
    m.component("cG").physics("potcG").feature("cfeq1").set("da","0");
    m.component("cG").physics("potcG").feature("cfeq1").set("ea","1/cL^2");
    m.component("cG").physics("potcG").feature("cfeq1").set("f","0");
    m.component("cG").physics("potcG").feature("init1").set("chi","0");m.component("cG").physics("potcG").feature("init1").set("chit","0");
    m.component("cG").physics("potcG").create("flux1","FluxBoundary",2);m.component("cG").physics("potcG").feature("flux1").selection().named("source1cG");m.component("cG").physics("potcG").feature("flux1").set("g","-taucG/acG^2*qvol1/is1cG(1)");m.component("cG").physics("potcG").feature("flux1").set("q","0");
    m.component("cG").physics("potcG").create("radiation","FluxBoundary",2);m.component("cG").physics("potcG").feature("radiation").selection().named("farcG");m.component("cG").physics("potcG").feature("radiation").set("g","-chit/cL");m.component("cG").physics("potcG").feature("radiation").set("q","1/Lout");
    m.component("cG").physics().create("gecG","GlobalEquations");m.component("cG").physics("gecG").label("Finite gas-inventory pressure benchmark and seven bounded input combinations");
    m.component("cG").physics("gecG").feature("ge1").set("name",new String[]{"r1","ediss","erout","pdet"});
    m.component("cG").physics("gecG").feature("ge1").set("equation",new String[]{"taucG^2*((r1-r1^2/bscG)*r1tt+(1.5-2*r1/bscG)*r1t^2)-(pB1-DP)/DP-taucG*is1cG(chit)/is1cG(1)","edisst-16*pi*muL*R1*U1^2/E0cG","eroutt-rhoL*(acG^2/taucG)^2*iocG(chit*(chit/cL+chi/Lout))/E0cG","tf*pdett+pdet-idcG(pAc)/(idcG(1)*DP)"});
    m.component("cG").physics("gecG").feature("ge1").set("initialValueU",new String[]{"1","0","0","0"});
    m.component("cG").physics("gecG").feature("ge1").set("initialValueUt",new String[]{"0","0","0","0"});
    m.component("cG").mesh().create("meshcG","gcG");
    m.component("cG").mesh("meshcG").feature("size").set("custom",true);
    m.component("cG").mesh("meshcG").feature("size").set("hmax","150[um]");
    m.component("cG").mesh("meshcG").feature("size").set("hmin","5[um]");
    m.component("cG").mesh("meshcG").feature("size").set("hgrad",1.5);
    m.component("cG").mesh("meshcG").feature("size").set("hcurve",0.3);
    m.component("cG").selection().create("allSourcescG","Union");m.component("cG").selection("allSourcescG").set("entitydim",2);
    m.component("cG").selection("allSourcescG").set("input",new String[]{"source1cG"});
    m.component("cG").mesh("meshcG").create("local","Size");m.component("cG").mesh("meshcG").feature("local").selection().geom("gcG",2);m.component("cG").mesh("meshcG").feature("local").selection().named("allSourcescG");m.component("cG").mesh("meshcG").feature("local").set("custom",true);m.component("cG").mesh("meshcG").feature("local").set("hmaxactive",true);m.component("cG").mesh("meshcG").feature("local").set("hmax","acG/2");
    m.component("cG").mesh("meshcG").create("tet","FreeTet");m.component("cG").mesh("meshcG").run();
    m.study().create("stdcG");m.study("stdcG").label("cG: first 8 microseconds at a fixed 1 MHz virtual pressure receiver");m.study("stdcG").create("time","Transient");m.study("stdcG").feature("time").set("tlist","range(0,25[ns],8[us])");
    for(String stage:m.study().tags())if(stage.startsWith("std"))for(String cc:m.component().tags())for(String ph:m.component(cc).physics().tags())m.study(stage).feature("time").setSolveFor(m.component(cc).physics(ph).resolveModelPath(),cc.equals(stage.substring(3)));
    m.study("stdcG").feature("time").set("useparam","on");m.study("stdcG").feature("time").set("pname",new String[]{"gasCase"});m.study("stdcG").feature("time").set("plistarr",new String[]{"0 1 2 3 4 5 6"});m.study("stdcG").feature("time").set("punit",new String[]{""});
    m.study("stdcG").createAutoSequences("all");String sscG=m.study("stdcG").getSolverSequences("all")[0];
    m.sol(sscG).feature("v1").set("initmethod","init");for(String tag:m.sol(sscG).feature("v1").feature().tags()){m.sol(sscG).feature("v1").feature(tag).set("scalemethod","manual");m.sol(sscG).feature("v1").feature(tag).set("scaleval","1");}
    m.sol(sscG).feature("t1").create("dp","Direct");m.sol(sscG).feature("t1").feature("dp").set("linsolver","pardiso");m.sol(sscG).feature("t1").create("coupledAll","FullyCoupled");m.sol(sscG).feature("t1").feature("coupledAll").set("linsolver","dp");m.sol(sscG).feature("t1").feature("coupledAll").set("maxiter",20);
    for(String remove:new String[]{"se1","fc1"})if(Arrays.asList(m.sol(sscG).feature("t1").feature().tags()).contains(remove))m.sol(sscG).feature("t1").feature().remove(remove);
    m.sol(sscG).feature("t1").set("rtol","2e-5");m.sol(sscG).feature("t1").set("timemethod","genalpha");m.sol(sscG).feature("t1").set("rhoinf",0.75);m.sol(sscG).feature("t1").set("tstepsgenalpha","manual");m.sol(sscG).feature("t1").set("timestepgenalpha","25[ns]");
    m.save(ROOT+"scratch/pressure_envelope_cG_configured.mph");try{m.sol(sscG).runAll();}catch(Exception e){m.save(ROOT+"scratch/pressure_envelope_cG_failed.mph");throw e;}
    m.result().dataset().create("datacG","Solution");m.result().dataset("datacG").set("solution",sscG);m.result().dataset("datacG").set("comp","cG");m.result().table().create("tablecG","Table");m.result().numerical().create("evalcG","EvalGlobal");m.result().numerical("evalcG").set("data","datacG");m.result().numerical("evalcG").set("table","tablecG");
    String[] excG=new String[]{"gasCase","t","t/taucG","acG","betacG","E0cG","DP*cG.pdet","cG.idcG(cG.pAc)/cG.idcG(1)","cG.r1","cG.U1","cG.pg1","cG.pB1","cG.En","cG.Ei","cG.Ep","cG.Ea","E0cG*cG.ediss","E0cG*cG.erout","(cG.En+cG.Ei+cG.Ep+cG.Ea+E0cG*(cG.ediss+cG.erout)-E0cG)/E0cG","abs(cG.U1)/cL"};
    m.result().numerical("evalcG").set("expr",excG);m.result().numerical("evalcG").set("descr",excG);m.result().numerical("evalcG").setResult();m.result().table("tablecG").save(ROOT+"data/pressure_envelope_cG.csv");m.save(ROOT+"scratch/pressure_envelope_cG_solved.mph");System.out.println("PRESSURE_SCENARIO_cG_SOLVED="+Arrays.toString(m.sol(sscG).getSize()));
    m.param().set("ac3","1.7235173594713674e-05[m]");
    m.param().set("mpc3","3.746039178803531e-13[kg]");
    m.param().set("S0c3","126.55604211988535[J/(kg*K)]");
    m.param().set("uDc3","-9813.3604892542153[J/kg]");
    m.param().set("rhoDc3","1621.5370905160592[kg/m^3]");
    m.param().set("rDc3","3.8064395716509721e-06[m]");
    m.param().set("bc3","3.4470347189427348e-05[m]","Matching radius; continuum case uses the infinite-near-field dilute limit");
    m.param().set("bsc3","bc3/ac3");
    m.param().set("tauc3","ac3*sqrt(rhoL/DP)");
    m.param().set("E0c3","5.5000000000000003e-08[J]","Fixed total retained source energy, including finite PFP internal and interface energy");
    m.param().set("sigc3","0.054[N/m]");
    m.param().set("sigIc3","0.00941[N/m]");
    m.param().set("rhoLc3","1621.2302097446284[kg/m^3]");
    m.param().set("rhoVc3","8.7819467089401986[kg/m^3]");
    m.component().create("c3",true);m.component("c3").geom().create("gc3",3);m.component("c3").sorder("quadratic");
    m.component("c3").label("c3: 3 resolved matching regions");
    m.component("c3").geom("gc3").create("outer","Sphere");m.component("c3").geom("gc3").feature("outer").set("r","Lout");
    m.component("c3").geom("gc3").create("inner1","Sphere");m.component("c3").geom("gc3").feature("inner1").set("r","bc3");m.component("c3").geom("gc3").feature("inner1").set("pos",new String[]{"0.00020000000000000001[m]","0[m]","0[m]"});
    m.component("c3").geom("gc3").create("inner2","Sphere");m.component("c3").geom("gc3").feature("inner2").set("r","bc3");m.component("c3").geom("gc3").feature("inner2").set("pos",new String[]{"-9.9999999999999964e-05[m]","0.00017320508075688776[m]","0[m]"});
    m.component("c3").geom("gc3").create("inner3","Sphere");m.component("c3").geom("gc3").feature("inner3").set("r","bc3");m.component("c3").geom("gc3").feature("inner3").set("pos",new String[]{"-0.0001000000000000001[m]","-0.0001732050807568877[m]","0[m]"});
    m.component("c3").geom("gc3").create("dif","Difference");m.component("c3").geom("gc3").feature("dif").selection("input").set("outer");m.component("c3").geom("gc3").feature("dif").selection("input2").set(new String[]{"inner1","inner2","inner3"});
    m.component("c3").geom("gc3").create("det","Cylinder");m.component("c3").geom("gc3").feature("det").set("r","adet");m.component("c3").geom("gc3").feature("det").set("h","hdet");m.component("c3").geom("gc3").feature("det").set("pos",new String[]{"0","0","robs-hdet/2"});m.component("c3").geom("gc3").run();
    m.component("c3").selection().create("source1c3","Box");m.component("c3").selection("source1c3").set("entitydim",2);m.component("c3").selection("source1c3").set("condition","inside");
    m.component("c3").selection("source1c3").set("xmin","0.00020000000000000001[m]-1.001*bc3");
    m.component("c3").selection("source1c3").set("xmax","0.00020000000000000001[m]+1.001*bc3");
    m.component("c3").selection("source1c3").set("ymin","0[m]-1.001*bc3");
    m.component("c3").selection("source1c3").set("ymax","0[m]+1.001*bc3");
    m.component("c3").selection("source1c3").set("zmin","0[m]-1.001*bc3");
    m.component("c3").selection("source1c3").set("zmax","0[m]+1.001*bc3");
    m.component("c3").selection().create("source2c3","Box");m.component("c3").selection("source2c3").set("entitydim",2);m.component("c3").selection("source2c3").set("condition","inside");
    m.component("c3").selection("source2c3").set("xmin","-9.9999999999999964e-05[m]-1.001*bc3");
    m.component("c3").selection("source2c3").set("xmax","-9.9999999999999964e-05[m]+1.001*bc3");
    m.component("c3").selection("source2c3").set("ymin","0.00017320508075688776[m]-1.001*bc3");
    m.component("c3").selection("source2c3").set("ymax","0.00017320508075688776[m]+1.001*bc3");
    m.component("c3").selection("source2c3").set("zmin","0[m]-1.001*bc3");
    m.component("c3").selection("source2c3").set("zmax","0[m]+1.001*bc3");
    m.component("c3").selection().create("source3c3","Box");m.component("c3").selection("source3c3").set("entitydim",2);m.component("c3").selection("source3c3").set("condition","inside");
    m.component("c3").selection("source3c3").set("xmin","-0.0001000000000000001[m]-1.001*bc3");
    m.component("c3").selection("source3c3").set("xmax","-0.0001000000000000001[m]+1.001*bc3");
    m.component("c3").selection("source3c3").set("ymin","-0.0001732050807568877[m]-1.001*bc3");
    m.component("c3").selection("source3c3").set("ymax","-0.0001732050807568877[m]+1.001*bc3");
    m.component("c3").selection("source3c3").set("zmin","0[m]-1.001*bc3");
    m.component("c3").selection("source3c3").set("zmax","0[m]+1.001*bc3");
    m.component("c3").selection().create("detectorc3","Box");m.component("c3").selection("detectorc3").set("entitydim",3);m.component("c3").selection("detectorc3").set("condition","inside");
    m.component("c3").selection("detectorc3").set("xmin","-1.001*adet");
    m.component("c3").selection("detectorc3").set("xmax","1.001*adet");
    m.component("c3").selection("detectorc3").set("ymin","-1.001*adet");
    m.component("c3").selection("detectorc3").set("ymax","1.001*adet");
    m.component("c3").selection("detectorc3").set("zmin","robs-0.501*hdet");
    m.component("c3").selection("detectorc3").set("zmax","robs+0.501*hdet");
    m.component("c3").selection().create("notfarc3","Box");m.component("c3").selection("notfarc3").set("entitydim",2);m.component("c3").selection("notfarc3").set("condition","inside");
    m.component("c3").selection("notfarc3").set("xmin","-0.8*Lout");
    m.component("c3").selection("notfarc3").set("xmax","0.8*Lout");
    m.component("c3").selection("notfarc3").set("ymin","-0.8*Lout");
    m.component("c3").selection("notfarc3").set("ymax","0.8*Lout");
    m.component("c3").selection("notfarc3").set("zmin","-0.8*Lout");
    m.component("c3").selection("notfarc3").set("zmax","0.8*Lout");
    m.component("c3").selection().create("farc3","Complement");m.component("c3").selection("farc3").set("entitydim",2);m.component("c3").selection("farc3").set("input",new String[]{"notfarc3"});
    m.component("c3").cpl().create("idc3","Integration");m.component("c3").cpl("idc3").selection().geom("gc3",3);m.component("c3").cpl("idc3").selection().named("detectorc3");
    System.out.println("c3_detector="+Arrays.toString(m.component("c3").selection("detectorc3").entities(3)));
    m.component("c3").cpl().create("ioc3","Integration");m.component("c3").cpl("ioc3").selection().geom("gc3",2);m.component("c3").cpl("ioc3").selection().named("farc3");
    System.out.println("c3_far="+Arrays.toString(m.component("c3").selection("farc3").entities(2)));
    m.component("c3").cpl().create("is1c3","Integration");m.component("c3").cpl("is1c3").selection().geom("gc3",2);m.component("c3").cpl("is1c3").selection().named("source1c3");
    System.out.println("c3_source1="+Arrays.toString(m.component("c3").selection("source1c3").entities(2)));
    m.component("c3").cpl().create("is2c3","Integration");m.component("c3").cpl("is2c3").selection().geom("gc3",2);m.component("c3").cpl("is2c3").selection().named("source2c3");
    System.out.println("c3_source2="+Arrays.toString(m.component("c3").selection("source2c3").entities(2)));
    m.component("c3").cpl().create("is3c3","Integration");m.component("c3").cpl("is3c3").selection().geom("gc3",2);m.component("c3").cpl("is3c3").selection().named("source3c3");
    System.out.println("c3_source3="+Arrays.toString(m.component("c3").selection("source3c3").entities(2)));
    m.component("c3").cpl().create("ivc3","Integration");m.component("c3").cpl("ivc3").selection().geom("gc3",3);m.component("c3").cpl("ivc3").selection().all();m.component("c3").variable().create("vc3");
    m.component("c3").variable("vc3").set("R1","ac3*r1");
    m.component("c3").variable("vc3").set("U1","ac3*r1t");
    m.component("c3").variable("vc3").set("Temp1","Tref*theta1");
    m.component("c3").variable("vc3").set("rhoLP1","rhoLc3*exp(qL1)");
    m.component("c3").variable("vc3").set("rhoVP1","rhoVc3*exp(qV1)");
    m.component("c3").variable("vc3").set("Vb1","4*pi*R1^3/3");
    m.component("c3").variable("vc3").set("pLP1","pfpp(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[Pa]");
    m.component("c3").variable("vc3").set("pVP1","pfpp(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[Pa]");
    m.component("c3").variable("vc3").set("uLP1","pfpu(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("uVP1","pfpu(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("gLP1","pfpg(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("gVP1","pfpg(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("fv1","(Vb1-mpc3/rhoLP1)/(mpc3*(1/rhoVP1-1/rhoLP1))");
    m.component("c3").variable("vc3").set("Rg1","(max(fv1*mpc3/rhoVP1,4*pi*(1[nm])^3/3)*3/(4*pi))^(1/3)");
    m.component("c3").variable("vc3").set("Sspec1","((1-fv1)*(uLP1+pLP1/rhoLP1-gLP1)+fv1*(uVP1+pVP1/rhoVP1-gVP1))/Temp1");
    m.component("c3").variable("vc3").set("qvol1","4*pi*R1^2*U1");
    m.component("c3").variable("vc3").set("pB1","pLP1-2*sigc3/R1-4*muL*U1/R1");
    m.component("c3").variable("vc3").set("En1","2*pi*rhoL*R1^3*U1^2*(1-R1/bc3)");
    m.component("c3").variable("vc3").set("Ei1","mpc3*((1-fv1)*uLP1+fv1*uVP1)+4*pi*sigIc3*Rg1^2-mpc3*uDc3-DP*mpc3/rhoDc3-4*pi*sigc3*rDc3^2");
    m.component("c3").variable("vc3").set("Ep1","DP*Vb1+4*pi*sigc3*R1^2");
    m.component("c3").variable("vc3").set("R2","ac3*r2");
    m.component("c3").variable("vc3").set("U2","ac3*r2t");
    m.component("c3").variable("vc3").set("Temp2","Tref*theta2");
    m.component("c3").variable("vc3").set("rhoLP2","rhoLc3*exp(qL2)");
    m.component("c3").variable("vc3").set("rhoVP2","rhoVc3*exp(qV2)");
    m.component("c3").variable("vc3").set("Vb2","4*pi*R2^3/3");
    m.component("c3").variable("vc3").set("pLP2","pfpp(Temp2/1[K],rhoLP2/(1[kg/m^3]))*1[Pa]");
    m.component("c3").variable("vc3").set("pVP2","pfpp(Temp2/1[K],rhoVP2/(1[kg/m^3]))*1[Pa]");
    m.component("c3").variable("vc3").set("uLP2","pfpu(Temp2/1[K],rhoLP2/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("uVP2","pfpu(Temp2/1[K],rhoVP2/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("gLP2","pfpg(Temp2/1[K],rhoLP2/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("gVP2","pfpg(Temp2/1[K],rhoVP2/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("fv2","(Vb2-mpc3/rhoLP2)/(mpc3*(1/rhoVP2-1/rhoLP2))");
    m.component("c3").variable("vc3").set("Rg2","(max(fv2*mpc3/rhoVP2,4*pi*(1[nm])^3/3)*3/(4*pi))^(1/3)");
    m.component("c3").variable("vc3").set("Sspec2","((1-fv2)*(uLP2+pLP2/rhoLP2-gLP2)+fv2*(uVP2+pVP2/rhoVP2-gVP2))/Temp2");
    m.component("c3").variable("vc3").set("qvol2","4*pi*R2^2*U2");
    m.component("c3").variable("vc3").set("pB2","pLP2-2*sigc3/R2-4*muL*U2/R2");
    m.component("c3").variable("vc3").set("En2","2*pi*rhoL*R2^3*U2^2*(1-R2/bc3)");
    m.component("c3").variable("vc3").set("Ei2","mpc3*((1-fv2)*uLP2+fv2*uVP2)+4*pi*sigIc3*Rg2^2-mpc3*uDc3-DP*mpc3/rhoDc3-4*pi*sigc3*rDc3^2");
    m.component("c3").variable("vc3").set("Ep2","DP*Vb2+4*pi*sigc3*R2^2");
    m.component("c3").variable("vc3").set("R3","ac3*r3");
    m.component("c3").variable("vc3").set("U3","ac3*r3t");
    m.component("c3").variable("vc3").set("Temp3","Tref*theta3");
    m.component("c3").variable("vc3").set("rhoLP3","rhoLc3*exp(qL3)");
    m.component("c3").variable("vc3").set("rhoVP3","rhoVc3*exp(qV3)");
    m.component("c3").variable("vc3").set("Vb3","4*pi*R3^3/3");
    m.component("c3").variable("vc3").set("pLP3","pfpp(Temp3/1[K],rhoLP3/(1[kg/m^3]))*1[Pa]");
    m.component("c3").variable("vc3").set("pVP3","pfpp(Temp3/1[K],rhoVP3/(1[kg/m^3]))*1[Pa]");
    m.component("c3").variable("vc3").set("uLP3","pfpu(Temp3/1[K],rhoLP3/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("uVP3","pfpu(Temp3/1[K],rhoVP3/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("gLP3","pfpg(Temp3/1[K],rhoLP3/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("gVP3","pfpg(Temp3/1[K],rhoVP3/(1[kg/m^3]))*1[J/kg]");
    m.component("c3").variable("vc3").set("fv3","(Vb3-mpc3/rhoLP3)/(mpc3*(1/rhoVP3-1/rhoLP3))");
    m.component("c3").variable("vc3").set("Rg3","(max(fv3*mpc3/rhoVP3,4*pi*(1[nm])^3/3)*3/(4*pi))^(1/3)");
    m.component("c3").variable("vc3").set("Sspec3","((1-fv3)*(uLP3+pLP3/rhoLP3-gLP3)+fv3*(uVP3+pVP3/rhoVP3-gVP3))/Temp3");
    m.component("c3").variable("vc3").set("qvol3","4*pi*R3^2*U3");
    m.component("c3").variable("vc3").set("pB3","pLP3-2*sigc3/R3-4*muL*U3/R3");
    m.component("c3").variable("vc3").set("En3","2*pi*rhoL*R3^3*U3^2*(1-R3/bc3)");
    m.component("c3").variable("vc3").set("Ei3","mpc3*((1-fv3)*uLP3+fv3*uVP3)+4*pi*sigIc3*Rg3^2-mpc3*uDc3-DP*mpc3/rhoDc3-4*pi*sigc3*rDc3^2");
    m.component("c3").variable("vc3").set("Ep3","DP*Vb3+4*pi*sigc3*R3^2");
    m.component("c3").variable("vc3").set("En","1*(En1+En2+En3)");
    m.component("c3").variable("vc3").set("Ei","1*(Ei1+Ei2+Ei3)");
    m.component("c3").variable("vc3").set("Ep","1*(Ep1+Ep2+Ep3)");
    m.component("c3").variable("vc3").set("Ein","E0c3");
    m.component("c3").variable("vc3").set("phiDt","ac3^2/tauc3*chit");
    m.component("c3").variable("vc3").set("pAc","-rhoL*phiDt");
    m.component("c3").variable("vc3").set("u2ac","(ac3^2/tauc3)^2*(chix^2+chiy^2+chiz^2)");
    m.component("c3").variable("vc3").set("Ea","ivc3(rhoL/2*(u2ac+phiDt^2/cL^2))");
    m.component("c3").physics().create("potc3","CoefficientFormPDE","gc3",new String[]{"chi"});m.component("c3").physics("potc3").label("Spatial 3D weak acoustic potential and conservative source flux");
    m.component("c3").physics("potc3").feature("cfeq1").set("c","1");
    m.component("c3").physics("potc3").feature("cfeq1").set("da","0");
    m.component("c3").physics("potc3").feature("cfeq1").set("ea","1/cL^2");
    m.component("c3").physics("potc3").feature("cfeq1").set("f","0");
    m.component("c3").physics("potc3").feature("init1").set("chi","0");m.component("c3").physics("potc3").feature("init1").set("chit","0");
    m.component("c3").physics("potc3").create("flux1","FluxBoundary",2);m.component("c3").physics("potc3").feature("flux1").selection().named("source1c3");m.component("c3").physics("potc3").feature("flux1").set("g","-tauc3/ac3^2*qvol1/is1c3(1)");m.component("c3").physics("potc3").feature("flux1").set("q","0");
    m.component("c3").physics("potc3").create("flux2","FluxBoundary",2);m.component("c3").physics("potc3").feature("flux2").selection().named("source2c3");m.component("c3").physics("potc3").feature("flux2").set("g","-tauc3/ac3^2*qvol2/is2c3(1)");m.component("c3").physics("potc3").feature("flux2").set("q","0");
    m.component("c3").physics("potc3").create("flux3","FluxBoundary",2);m.component("c3").physics("potc3").feature("flux3").selection().named("source3c3");m.component("c3").physics("potc3").feature("flux3").set("g","-tauc3/ac3^2*qvol3/is3c3(1)");m.component("c3").physics("potc3").feature("flux3").set("q","0");
    m.component("c3").physics("potc3").create("radiation","FluxBoundary",2);m.component("c3").physics("potc3").feature("radiation").selection().named("farc3");m.component("c3").physics("potc3").feature("radiation").set("g","-chit/cL");m.component("c3").physics("potc3").feature("radiation").set("q","1/Lout");
    m.component("c3").physics().create("gec3","GlobalEquations");m.component("c3").physics("gec3").label("Finite PFP mass, chemical equilibrium, conserved entropy and source dynamics");
    m.component("c3").physics("gec3").feature("ge1").set("name",new String[]{"r1","theta1","qL1","qV1","r2","theta2","qL2","qV2","r3","theta3","qL3","qV3","ediss","erout","pdet"});
    m.component("c3").physics("gec3").feature("ge1").set("equation",new String[]{"tauc3^2*((r1-r1^2/bsc3)*r1tt+(1.5-2*r1/bsc3)*r1t^2)-(pB1-DP)/DP-tauc3*is1c3(chit)/is1c3(1)","(pVP1-pLP1-2*sigIc3/Rg1)/DP","(gLP1-gVP1)/(100[kJ/kg])","(Sspec1-S0c3)/(100[J/(kg*K)])","tauc3^2*((r2-r2^2/bsc3)*r2tt+(1.5-2*r2/bsc3)*r2t^2)-(pB2-DP)/DP-tauc3*is2c3(chit)/is2c3(1)","(pVP2-pLP2-2*sigIc3/Rg2)/DP","(gLP2-gVP2)/(100[kJ/kg])","(Sspec2-S0c3)/(100[J/(kg*K)])","tauc3^2*((r3-r3^2/bsc3)*r3tt+(1.5-2*r3/bsc3)*r3t^2)-(pB3-DP)/DP-tauc3*is3c3(chit)/is3c3(1)","(pVP3-pLP3-2*sigIc3/Rg3)/DP","(gLP3-gVP3)/(100[kJ/kg])","(Sspec3-S0c3)/(100[J/(kg*K)])","edisst-1*(16*pi*muL*R1*U1^2+16*pi*muL*R2*U2^2+16*pi*muL*R3*U3^2)/E0c3","eroutt-rhoL*(ac3^2/tauc3)^2*ioc3(chit*(chit/cL+chi/Lout))/E0c3","tf*pdett+pdet-idc3(pAc)/(idc3(1)*DP)"});
    m.component("c3").physics("gec3").feature("ge1").set("initialValueU",new String[]{"1","1","-3.6390320940065111e-06","-8.7761660825064932e-05","1","1","-3.6390320940065111e-06","-8.7761660825064932e-05","1","1","-3.6390320940065111e-06","-8.7761660825064932e-05","0","0","0"});
    m.component("c3").physics("gec3").feature("ge1").set("initialValueUt",new String[]{"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"});
    m.component("c3").mesh().create("meshc3","gc3");
    m.component("c3").mesh("meshc3").feature("size").set("custom",true);
    m.component("c3").mesh("meshc3").feature("size").set("hmax","150[um]");
    m.component("c3").mesh("meshc3").feature("size").set("hmin","5[um]");
    m.component("c3").mesh("meshc3").feature("size").set("hgrad",1.5);
    m.component("c3").mesh("meshc3").feature("size").set("hcurve",0.3);
    m.component("c3").selection().create("allSourcesc3","Union");m.component("c3").selection("allSourcesc3").set("entitydim",2);
    m.component("c3").selection("allSourcesc3").set("input",new String[]{"source1c3","source2c3","source3c3"});
    m.component("c3").mesh("meshc3").create("local","Size");m.component("c3").mesh("meshc3").feature("local").selection().geom("gc3",2);m.component("c3").mesh("meshc3").feature("local").selection().named("allSourcesc3");m.component("c3").mesh("meshc3").feature("local").set("custom",true);m.component("c3").mesh("meshc3").feature("local").set("hmaxactive",true);m.component("c3").mesh("meshc3").feature("local").set("hmax","ac3/2");
    m.component("c3").mesh("meshc3").create("tet","FreeTet");m.component("c3").mesh("meshc3").run();
    m.study().create("stdc3");m.study("stdc3").label("c3: first 8 microseconds at a fixed 1 MHz virtual pressure receiver");m.study("stdc3").create("time","Transient");m.study("stdc3").feature("time").set("tlist","range(0,25[ns],8[us])");
    for(String stage:m.study().tags())if(stage.startsWith("std"))for(String cc:m.component().tags())for(String ph:m.component(cc).physics().tags())m.study(stage).feature("time").setSolveFor(m.component(cc).physics(ph).resolveModelPath(),cc.equals(stage.substring(3)));
    m.study("stdc3").createAutoSequences("all");String ssc3=m.study("stdc3").getSolverSequences("all")[0];
    m.sol(ssc3).feature("v1").set("initmethod","init");for(String tag:m.sol(ssc3).feature("v1").feature().tags()){m.sol(ssc3).feature("v1").feature(tag).set("scalemethod","manual");m.sol(ssc3).feature("v1").feature(tag).set("scaleval","1");}
    m.sol(ssc3).feature("t1").create("dp","Direct");m.sol(ssc3).feature("t1").feature("dp").set("linsolver","pardiso");m.sol(ssc3).feature("t1").create("coupledAll","FullyCoupled");m.sol(ssc3).feature("t1").feature("coupledAll").set("linsolver","dp");m.sol(ssc3).feature("t1").feature("coupledAll").set("maxiter",20);
    for(String remove:new String[]{"se1","fc1"})if(Arrays.asList(m.sol(ssc3).feature("t1").feature().tags()).contains(remove))m.sol(ssc3).feature("t1").feature().remove(remove);
    m.sol(ssc3).feature("t1").set("rtol","2e-5");m.sol(ssc3).feature("t1").set("timemethod","genalpha");m.sol(ssc3).feature("t1").set("rhoinf",0.75);m.sol(ssc3).feature("t1").set("tstepsgenalpha","manual");m.sol(ssc3).feature("t1").set("timestepgenalpha","25[ns]");
    m.save(ROOT+"scratch/pressure_envelope_c3_configured.mph");try{m.sol(ssc3).runAll();}catch(Exception e){m.save(ROOT+"scratch/pressure_envelope_c3_failed.mph");throw e;}
    m.result().dataset().create("datac3","Solution");m.result().dataset("datac3").set("solution",ssc3);m.result().dataset("datac3").set("comp","c3");m.result().table().create("tablec3","Table");m.result().numerical().create("evalc3","EvalGlobal");m.result().numerical("evalc3").set("data","datac3");m.result().numerical("evalc3").set("table","tablec3");
    String[] exc3=new String[]{"t","t/tauc3","E0c3","c3.pdet*DP","c3.idc3(c3.pAc)/c3.idc3(1)","c3.r1","c3.U1","c3.pLP1","c3.pVP1","c3.Temp1","c3.fv1","c3.Rg1","c3.R1-c3.Rg1","abs(c3.U1)/cL","(c3.Sspec1-S0c3)/(100[J/(kg*K)])","c3.pVP1-c3.pLP1-2*sigIc3/c3.Rg1","c3.gLP1-c3.gVP1","c3.r2","c3.U2","c3.pLP2","c3.pVP2","c3.Temp2","c3.fv2","c3.Rg2","c3.R2-c3.Rg2","abs(c3.U2)/cL","(c3.Sspec2-S0c3)/(100[J/(kg*K)])","c3.pVP2-c3.pLP2-2*sigIc3/c3.Rg2","c3.gLP2-c3.gVP2","c3.r3","c3.U3","c3.pLP3","c3.pVP3","c3.Temp3","c3.fv3","c3.Rg3","c3.R3-c3.Rg3","abs(c3.U3)/cL","(c3.Sspec3-S0c3)/(100[J/(kg*K)])","c3.pVP3-c3.pLP3-2*sigIc3/c3.Rg3","c3.gLP3-c3.gVP3","c3.En","c3.Ei","c3.Ep","c3.Ea","E0c3*c3.ediss","E0c3*c3.erout","(c3.En+c3.Ei+c3.Ep+c3.Ea+E0c3*(c3.ediss+c3.erout)-E0c3)/E0c3"};
    m.result().numerical("evalc3").set("expr",exc3);m.result().numerical("evalc3").set("descr",exc3);m.result().numerical("evalc3").setResult();m.result().table("tablec3").save(ROOT+"data/pressure_envelope_c3.csv");m.save(ROOT+"scratch/pressure_envelope_c3_solved.mph");System.out.println("PRESSURE_SCENARIO_c3_SOLVED="+Arrays.toString(m.sol(ssc3).getSize()));
    m.param().set("ac5","1.4525420543577222e-05[m]");
    m.param().set("mpc5","2.242355161814176e-13[kg]");
    m.param().set("S0c5","126.55641985399375[J/(kg*K)]");
    m.param().set("uDc5","-9815.2763353628288[J/kg]");
    m.param().set("rhoDc5","1621.5654271537715[kg/m^3]");
    m.param().set("rDc5","3.2079464129430387e-06[m]");
    m.param().set("bc5","2.9050841087154444e-05[m]","Matching radius; continuum case uses the infinite-near-field dilute limit");
    m.param().set("bsc5","bc5/ac5");
    m.param().set("tauc5","ac5*sqrt(rhoL/DP)");
    m.param().set("E0c5","5.5000000000000003e-08[J]","Fixed total retained source energy, including finite PFP internal and interface energy");
    m.param().set("sigc5","0.054[N/m]");
    m.param().set("sigIc5","0.00941[N/m]");
    m.param().set("rhoLc5","1621.2302097446284[kg/m^3]");
    m.param().set("rhoVc5","8.7819467089401986[kg/m^3]");
    m.component().create("c5",true);m.component("c5").geom().create("gc5",3);m.component("c5").sorder("quadratic");
    m.component("c5").label("c5: 5 resolved matching regions");
    m.component("c5").geom("gc5").create("outer","Sphere");m.component("c5").geom("gc5").feature("outer").set("r","Lout");
    m.component("c5").geom("gc5").create("inner1","Sphere");m.component("c5").geom("gc5").feature("inner1").set("r","bc5");m.component("c5").geom("gc5").feature("inner1").set("pos",new String[]{"0.00020000000000000001[m]","0[m]","0[m]"});
    m.component("c5").geom("gc5").create("inner2","Sphere");m.component("c5").geom("gc5").feature("inner2").set("r","bc5");m.component("c5").geom("gc5").feature("inner2").set("pos",new String[]{"6.1803398874989493e-05[m]","0.00019021130325903071[m]","0[m]"});
    m.component("c5").geom("gc5").create("inner3","Sphere");m.component("c5").geom("gc5").feature("inner3").set("r","bc5");m.component("c5").geom("gc5").feature("inner3").set("pos",new String[]{"-0.00016180339887498948[m]","0.00011755705045849465[m]","0[m]"});
    m.component("c5").geom("gc5").create("inner4","Sphere");m.component("c5").geom("gc5").feature("inner4").set("r","bc5");m.component("c5").geom("gc5").feature("inner4").set("pos",new String[]{"-0.00016180339887498951[m]","-0.00011755705045849461[m]","0[m]"});
    m.component("c5").geom("gc5").create("inner5","Sphere");m.component("c5").geom("gc5").feature("inner5").set("r","bc5");m.component("c5").geom("gc5").feature("inner5").set("pos",new String[]{"6.1803398874989452e-05[m]","-0.00019021130325903073[m]","0[m]"});
    m.component("c5").geom("gc5").create("dif","Difference");m.component("c5").geom("gc5").feature("dif").selection("input").set("outer");m.component("c5").geom("gc5").feature("dif").selection("input2").set(new String[]{"inner1","inner2","inner3","inner4","inner5"});
    m.component("c5").geom("gc5").create("det","Cylinder");m.component("c5").geom("gc5").feature("det").set("r","adet");m.component("c5").geom("gc5").feature("det").set("h","hdet");m.component("c5").geom("gc5").feature("det").set("pos",new String[]{"0","0","robs-hdet/2"});m.component("c5").geom("gc5").run();
    m.component("c5").selection().create("source1c5","Box");m.component("c5").selection("source1c5").set("entitydim",2);m.component("c5").selection("source1c5").set("condition","inside");
    m.component("c5").selection("source1c5").set("xmin","0.00020000000000000001[m]-1.001*bc5");
    m.component("c5").selection("source1c5").set("xmax","0.00020000000000000001[m]+1.001*bc5");
    m.component("c5").selection("source1c5").set("ymin","0[m]-1.001*bc5");
    m.component("c5").selection("source1c5").set("ymax","0[m]+1.001*bc5");
    m.component("c5").selection("source1c5").set("zmin","0[m]-1.001*bc5");
    m.component("c5").selection("source1c5").set("zmax","0[m]+1.001*bc5");
    m.component("c5").selection().create("source2c5","Box");m.component("c5").selection("source2c5").set("entitydim",2);m.component("c5").selection("source2c5").set("condition","inside");
    m.component("c5").selection("source2c5").set("xmin","6.1803398874989493e-05[m]-1.001*bc5");
    m.component("c5").selection("source2c5").set("xmax","6.1803398874989493e-05[m]+1.001*bc5");
    m.component("c5").selection("source2c5").set("ymin","0.00019021130325903071[m]-1.001*bc5");
    m.component("c5").selection("source2c5").set("ymax","0.00019021130325903071[m]+1.001*bc5");
    m.component("c5").selection("source2c5").set("zmin","0[m]-1.001*bc5");
    m.component("c5").selection("source2c5").set("zmax","0[m]+1.001*bc5");
    m.component("c5").selection().create("source3c5","Box");m.component("c5").selection("source3c5").set("entitydim",2);m.component("c5").selection("source3c5").set("condition","inside");
    m.component("c5").selection("source3c5").set("xmin","-0.00016180339887498948[m]-1.001*bc5");
    m.component("c5").selection("source3c5").set("xmax","-0.00016180339887498948[m]+1.001*bc5");
    m.component("c5").selection("source3c5").set("ymin","0.00011755705045849465[m]-1.001*bc5");
    m.component("c5").selection("source3c5").set("ymax","0.00011755705045849465[m]+1.001*bc5");
    m.component("c5").selection("source3c5").set("zmin","0[m]-1.001*bc5");
    m.component("c5").selection("source3c5").set("zmax","0[m]+1.001*bc5");
    m.component("c5").selection().create("source4c5","Box");m.component("c5").selection("source4c5").set("entitydim",2);m.component("c5").selection("source4c5").set("condition","inside");
    m.component("c5").selection("source4c5").set("xmin","-0.00016180339887498951[m]-1.001*bc5");
    m.component("c5").selection("source4c5").set("xmax","-0.00016180339887498951[m]+1.001*bc5");
    m.component("c5").selection("source4c5").set("ymin","-0.00011755705045849461[m]-1.001*bc5");
    m.component("c5").selection("source4c5").set("ymax","-0.00011755705045849461[m]+1.001*bc5");
    m.component("c5").selection("source4c5").set("zmin","0[m]-1.001*bc5");
    m.component("c5").selection("source4c5").set("zmax","0[m]+1.001*bc5");
    m.component("c5").selection().create("source5c5","Box");m.component("c5").selection("source5c5").set("entitydim",2);m.component("c5").selection("source5c5").set("condition","inside");
    m.component("c5").selection("source5c5").set("xmin","6.1803398874989452e-05[m]-1.001*bc5");
    m.component("c5").selection("source5c5").set("xmax","6.1803398874989452e-05[m]+1.001*bc5");
    m.component("c5").selection("source5c5").set("ymin","-0.00019021130325903073[m]-1.001*bc5");
    m.component("c5").selection("source5c5").set("ymax","-0.00019021130325903073[m]+1.001*bc5");
    m.component("c5").selection("source5c5").set("zmin","0[m]-1.001*bc5");
    m.component("c5").selection("source5c5").set("zmax","0[m]+1.001*bc5");
    m.component("c5").selection().create("detectorc5","Box");m.component("c5").selection("detectorc5").set("entitydim",3);m.component("c5").selection("detectorc5").set("condition","inside");
    m.component("c5").selection("detectorc5").set("xmin","-1.001*adet");
    m.component("c5").selection("detectorc5").set("xmax","1.001*adet");
    m.component("c5").selection("detectorc5").set("ymin","-1.001*adet");
    m.component("c5").selection("detectorc5").set("ymax","1.001*adet");
    m.component("c5").selection("detectorc5").set("zmin","robs-0.501*hdet");
    m.component("c5").selection("detectorc5").set("zmax","robs+0.501*hdet");
    m.component("c5").selection().create("notfarc5","Box");m.component("c5").selection("notfarc5").set("entitydim",2);m.component("c5").selection("notfarc5").set("condition","inside");
    m.component("c5").selection("notfarc5").set("xmin","-0.8*Lout");
    m.component("c5").selection("notfarc5").set("xmax","0.8*Lout");
    m.component("c5").selection("notfarc5").set("ymin","-0.8*Lout");
    m.component("c5").selection("notfarc5").set("ymax","0.8*Lout");
    m.component("c5").selection("notfarc5").set("zmin","-0.8*Lout");
    m.component("c5").selection("notfarc5").set("zmax","0.8*Lout");
    m.component("c5").selection().create("farc5","Complement");m.component("c5").selection("farc5").set("entitydim",2);m.component("c5").selection("farc5").set("input",new String[]{"notfarc5"});
    m.component("c5").cpl().create("idc5","Integration");m.component("c5").cpl("idc5").selection().geom("gc5",3);m.component("c5").cpl("idc5").selection().named("detectorc5");
    System.out.println("c5_detector="+Arrays.toString(m.component("c5").selection("detectorc5").entities(3)));
    m.component("c5").cpl().create("ioc5","Integration");m.component("c5").cpl("ioc5").selection().geom("gc5",2);m.component("c5").cpl("ioc5").selection().named("farc5");
    System.out.println("c5_far="+Arrays.toString(m.component("c5").selection("farc5").entities(2)));
    m.component("c5").cpl().create("is1c5","Integration");m.component("c5").cpl("is1c5").selection().geom("gc5",2);m.component("c5").cpl("is1c5").selection().named("source1c5");
    System.out.println("c5_source1="+Arrays.toString(m.component("c5").selection("source1c5").entities(2)));
    m.component("c5").cpl().create("is2c5","Integration");m.component("c5").cpl("is2c5").selection().geom("gc5",2);m.component("c5").cpl("is2c5").selection().named("source2c5");
    System.out.println("c5_source2="+Arrays.toString(m.component("c5").selection("source2c5").entities(2)));
    m.component("c5").cpl().create("is3c5","Integration");m.component("c5").cpl("is3c5").selection().geom("gc5",2);m.component("c5").cpl("is3c5").selection().named("source3c5");
    System.out.println("c5_source3="+Arrays.toString(m.component("c5").selection("source3c5").entities(2)));
    m.component("c5").cpl().create("is4c5","Integration");m.component("c5").cpl("is4c5").selection().geom("gc5",2);m.component("c5").cpl("is4c5").selection().named("source4c5");
    System.out.println("c5_source4="+Arrays.toString(m.component("c5").selection("source4c5").entities(2)));
    m.component("c5").cpl().create("is5c5","Integration");m.component("c5").cpl("is5c5").selection().geom("gc5",2);m.component("c5").cpl("is5c5").selection().named("source5c5");
    System.out.println("c5_source5="+Arrays.toString(m.component("c5").selection("source5c5").entities(2)));
    m.component("c5").cpl().create("ivc5","Integration");m.component("c5").cpl("ivc5").selection().geom("gc5",3);m.component("c5").cpl("ivc5").selection().all();m.component("c5").variable().create("vc5");
    m.component("c5").variable("vc5").set("R1","ac5*r1");
    m.component("c5").variable("vc5").set("U1","ac5*r1t");
    m.component("c5").variable("vc5").set("Temp1","Tref*theta1");
    m.component("c5").variable("vc5").set("rhoLP1","rhoLc5*exp(qL1)");
    m.component("c5").variable("vc5").set("rhoVP1","rhoVc5*exp(qV1)");
    m.component("c5").variable("vc5").set("Vb1","4*pi*R1^3/3");
    m.component("c5").variable("vc5").set("pLP1","pfpp(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[Pa]");
    m.component("c5").variable("vc5").set("pVP1","pfpp(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[Pa]");
    m.component("c5").variable("vc5").set("uLP1","pfpu(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("uVP1","pfpu(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("gLP1","pfpg(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("gVP1","pfpg(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("fv1","(Vb1-mpc5/rhoLP1)/(mpc5*(1/rhoVP1-1/rhoLP1))");
    m.component("c5").variable("vc5").set("Rg1","(max(fv1*mpc5/rhoVP1,4*pi*(1[nm])^3/3)*3/(4*pi))^(1/3)");
    m.component("c5").variable("vc5").set("Sspec1","((1-fv1)*(uLP1+pLP1/rhoLP1-gLP1)+fv1*(uVP1+pVP1/rhoVP1-gVP1))/Temp1");
    m.component("c5").variable("vc5").set("qvol1","4*pi*R1^2*U1");
    m.component("c5").variable("vc5").set("pB1","pLP1-2*sigc5/R1-4*muL*U1/R1");
    m.component("c5").variable("vc5").set("En1","2*pi*rhoL*R1^3*U1^2*(1-R1/bc5)");
    m.component("c5").variable("vc5").set("Ei1","mpc5*((1-fv1)*uLP1+fv1*uVP1)+4*pi*sigIc5*Rg1^2-mpc5*uDc5-DP*mpc5/rhoDc5-4*pi*sigc5*rDc5^2");
    m.component("c5").variable("vc5").set("Ep1","DP*Vb1+4*pi*sigc5*R1^2");
    m.component("c5").variable("vc5").set("R2","ac5*r2");
    m.component("c5").variable("vc5").set("U2","ac5*r2t");
    m.component("c5").variable("vc5").set("Temp2","Tref*theta2");
    m.component("c5").variable("vc5").set("rhoLP2","rhoLc5*exp(qL2)");
    m.component("c5").variable("vc5").set("rhoVP2","rhoVc5*exp(qV2)");
    m.component("c5").variable("vc5").set("Vb2","4*pi*R2^3/3");
    m.component("c5").variable("vc5").set("pLP2","pfpp(Temp2/1[K],rhoLP2/(1[kg/m^3]))*1[Pa]");
    m.component("c5").variable("vc5").set("pVP2","pfpp(Temp2/1[K],rhoVP2/(1[kg/m^3]))*1[Pa]");
    m.component("c5").variable("vc5").set("uLP2","pfpu(Temp2/1[K],rhoLP2/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("uVP2","pfpu(Temp2/1[K],rhoVP2/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("gLP2","pfpg(Temp2/1[K],rhoLP2/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("gVP2","pfpg(Temp2/1[K],rhoVP2/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("fv2","(Vb2-mpc5/rhoLP2)/(mpc5*(1/rhoVP2-1/rhoLP2))");
    m.component("c5").variable("vc5").set("Rg2","(max(fv2*mpc5/rhoVP2,4*pi*(1[nm])^3/3)*3/(4*pi))^(1/3)");
    m.component("c5").variable("vc5").set("Sspec2","((1-fv2)*(uLP2+pLP2/rhoLP2-gLP2)+fv2*(uVP2+pVP2/rhoVP2-gVP2))/Temp2");
    m.component("c5").variable("vc5").set("qvol2","4*pi*R2^2*U2");
    m.component("c5").variable("vc5").set("pB2","pLP2-2*sigc5/R2-4*muL*U2/R2");
    m.component("c5").variable("vc5").set("En2","2*pi*rhoL*R2^3*U2^2*(1-R2/bc5)");
    m.component("c5").variable("vc5").set("Ei2","mpc5*((1-fv2)*uLP2+fv2*uVP2)+4*pi*sigIc5*Rg2^2-mpc5*uDc5-DP*mpc5/rhoDc5-4*pi*sigc5*rDc5^2");
    m.component("c5").variable("vc5").set("Ep2","DP*Vb2+4*pi*sigc5*R2^2");
    m.component("c5").variable("vc5").set("R3","ac5*r3");
    m.component("c5").variable("vc5").set("U3","ac5*r3t");
    m.component("c5").variable("vc5").set("Temp3","Tref*theta3");
    m.component("c5").variable("vc5").set("rhoLP3","rhoLc5*exp(qL3)");
    m.component("c5").variable("vc5").set("rhoVP3","rhoVc5*exp(qV3)");
    m.component("c5").variable("vc5").set("Vb3","4*pi*R3^3/3");
    m.component("c5").variable("vc5").set("pLP3","pfpp(Temp3/1[K],rhoLP3/(1[kg/m^3]))*1[Pa]");
    m.component("c5").variable("vc5").set("pVP3","pfpp(Temp3/1[K],rhoVP3/(1[kg/m^3]))*1[Pa]");
    m.component("c5").variable("vc5").set("uLP3","pfpu(Temp3/1[K],rhoLP3/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("uVP3","pfpu(Temp3/1[K],rhoVP3/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("gLP3","pfpg(Temp3/1[K],rhoLP3/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("gVP3","pfpg(Temp3/1[K],rhoVP3/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("fv3","(Vb3-mpc5/rhoLP3)/(mpc5*(1/rhoVP3-1/rhoLP3))");
    m.component("c5").variable("vc5").set("Rg3","(max(fv3*mpc5/rhoVP3,4*pi*(1[nm])^3/3)*3/(4*pi))^(1/3)");
    m.component("c5").variable("vc5").set("Sspec3","((1-fv3)*(uLP3+pLP3/rhoLP3-gLP3)+fv3*(uVP3+pVP3/rhoVP3-gVP3))/Temp3");
    m.component("c5").variable("vc5").set("qvol3","4*pi*R3^2*U3");
    m.component("c5").variable("vc5").set("pB3","pLP3-2*sigc5/R3-4*muL*U3/R3");
    m.component("c5").variable("vc5").set("En3","2*pi*rhoL*R3^3*U3^2*(1-R3/bc5)");
    m.component("c5").variable("vc5").set("Ei3","mpc5*((1-fv3)*uLP3+fv3*uVP3)+4*pi*sigIc5*Rg3^2-mpc5*uDc5-DP*mpc5/rhoDc5-4*pi*sigc5*rDc5^2");
    m.component("c5").variable("vc5").set("Ep3","DP*Vb3+4*pi*sigc5*R3^2");
    m.component("c5").variable("vc5").set("R4","ac5*r4");
    m.component("c5").variable("vc5").set("U4","ac5*r4t");
    m.component("c5").variable("vc5").set("Temp4","Tref*theta4");
    m.component("c5").variable("vc5").set("rhoLP4","rhoLc5*exp(qL4)");
    m.component("c5").variable("vc5").set("rhoVP4","rhoVc5*exp(qV4)");
    m.component("c5").variable("vc5").set("Vb4","4*pi*R4^3/3");
    m.component("c5").variable("vc5").set("pLP4","pfpp(Temp4/1[K],rhoLP4/(1[kg/m^3]))*1[Pa]");
    m.component("c5").variable("vc5").set("pVP4","pfpp(Temp4/1[K],rhoVP4/(1[kg/m^3]))*1[Pa]");
    m.component("c5").variable("vc5").set("uLP4","pfpu(Temp4/1[K],rhoLP4/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("uVP4","pfpu(Temp4/1[K],rhoVP4/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("gLP4","pfpg(Temp4/1[K],rhoLP4/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("gVP4","pfpg(Temp4/1[K],rhoVP4/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("fv4","(Vb4-mpc5/rhoLP4)/(mpc5*(1/rhoVP4-1/rhoLP4))");
    m.component("c5").variable("vc5").set("Rg4","(max(fv4*mpc5/rhoVP4,4*pi*(1[nm])^3/3)*3/(4*pi))^(1/3)");
    m.component("c5").variable("vc5").set("Sspec4","((1-fv4)*(uLP4+pLP4/rhoLP4-gLP4)+fv4*(uVP4+pVP4/rhoVP4-gVP4))/Temp4");
    m.component("c5").variable("vc5").set("qvol4","4*pi*R4^2*U4");
    m.component("c5").variable("vc5").set("pB4","pLP4-2*sigc5/R4-4*muL*U4/R4");
    m.component("c5").variable("vc5").set("En4","2*pi*rhoL*R4^3*U4^2*(1-R4/bc5)");
    m.component("c5").variable("vc5").set("Ei4","mpc5*((1-fv4)*uLP4+fv4*uVP4)+4*pi*sigIc5*Rg4^2-mpc5*uDc5-DP*mpc5/rhoDc5-4*pi*sigc5*rDc5^2");
    m.component("c5").variable("vc5").set("Ep4","DP*Vb4+4*pi*sigc5*R4^2");
    m.component("c5").variable("vc5").set("R5","ac5*r5");
    m.component("c5").variable("vc5").set("U5","ac5*r5t");
    m.component("c5").variable("vc5").set("Temp5","Tref*theta5");
    m.component("c5").variable("vc5").set("rhoLP5","rhoLc5*exp(qL5)");
    m.component("c5").variable("vc5").set("rhoVP5","rhoVc5*exp(qV5)");
    m.component("c5").variable("vc5").set("Vb5","4*pi*R5^3/3");
    m.component("c5").variable("vc5").set("pLP5","pfpp(Temp5/1[K],rhoLP5/(1[kg/m^3]))*1[Pa]");
    m.component("c5").variable("vc5").set("pVP5","pfpp(Temp5/1[K],rhoVP5/(1[kg/m^3]))*1[Pa]");
    m.component("c5").variable("vc5").set("uLP5","pfpu(Temp5/1[K],rhoLP5/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("uVP5","pfpu(Temp5/1[K],rhoVP5/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("gLP5","pfpg(Temp5/1[K],rhoLP5/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("gVP5","pfpg(Temp5/1[K],rhoVP5/(1[kg/m^3]))*1[J/kg]");
    m.component("c5").variable("vc5").set("fv5","(Vb5-mpc5/rhoLP5)/(mpc5*(1/rhoVP5-1/rhoLP5))");
    m.component("c5").variable("vc5").set("Rg5","(max(fv5*mpc5/rhoVP5,4*pi*(1[nm])^3/3)*3/(4*pi))^(1/3)");
    m.component("c5").variable("vc5").set("Sspec5","((1-fv5)*(uLP5+pLP5/rhoLP5-gLP5)+fv5*(uVP5+pVP5/rhoVP5-gVP5))/Temp5");
    m.component("c5").variable("vc5").set("qvol5","4*pi*R5^2*U5");
    m.component("c5").variable("vc5").set("pB5","pLP5-2*sigc5/R5-4*muL*U5/R5");
    m.component("c5").variable("vc5").set("En5","2*pi*rhoL*R5^3*U5^2*(1-R5/bc5)");
    m.component("c5").variable("vc5").set("Ei5","mpc5*((1-fv5)*uLP5+fv5*uVP5)+4*pi*sigIc5*Rg5^2-mpc5*uDc5-DP*mpc5/rhoDc5-4*pi*sigc5*rDc5^2");
    m.component("c5").variable("vc5").set("Ep5","DP*Vb5+4*pi*sigc5*R5^2");
    m.component("c5").variable("vc5").set("En","1*(En1+En2+En3+En4+En5)");
    m.component("c5").variable("vc5").set("Ei","1*(Ei1+Ei2+Ei3+Ei4+Ei5)");
    m.component("c5").variable("vc5").set("Ep","1*(Ep1+Ep2+Ep3+Ep4+Ep5)");
    m.component("c5").variable("vc5").set("Ein","E0c5");
    m.component("c5").variable("vc5").set("phiDt","ac5^2/tauc5*chit");
    m.component("c5").variable("vc5").set("pAc","-rhoL*phiDt");
    m.component("c5").variable("vc5").set("u2ac","(ac5^2/tauc5)^2*(chix^2+chiy^2+chiz^2)");
    m.component("c5").variable("vc5").set("Ea","ivc5(rhoL/2*(u2ac+phiDt^2/cL^2))");
    m.component("c5").physics().create("potc5","CoefficientFormPDE","gc5",new String[]{"chi"});m.component("c5").physics("potc5").label("Spatial 3D weak acoustic potential and conservative source flux");
    m.component("c5").physics("potc5").feature("cfeq1").set("c","1");
    m.component("c5").physics("potc5").feature("cfeq1").set("da","0");
    m.component("c5").physics("potc5").feature("cfeq1").set("ea","1/cL^2");
    m.component("c5").physics("potc5").feature("cfeq1").set("f","0");
    m.component("c5").physics("potc5").feature("init1").set("chi","0");m.component("c5").physics("potc5").feature("init1").set("chit","0");
    m.component("c5").physics("potc5").create("flux1","FluxBoundary",2);m.component("c5").physics("potc5").feature("flux1").selection().named("source1c5");m.component("c5").physics("potc5").feature("flux1").set("g","-tauc5/ac5^2*qvol1/is1c5(1)");m.component("c5").physics("potc5").feature("flux1").set("q","0");
    m.component("c5").physics("potc5").create("flux2","FluxBoundary",2);m.component("c5").physics("potc5").feature("flux2").selection().named("source2c5");m.component("c5").physics("potc5").feature("flux2").set("g","-tauc5/ac5^2*qvol2/is2c5(1)");m.component("c5").physics("potc5").feature("flux2").set("q","0");
    m.component("c5").physics("potc5").create("flux3","FluxBoundary",2);m.component("c5").physics("potc5").feature("flux3").selection().named("source3c5");m.component("c5").physics("potc5").feature("flux3").set("g","-tauc5/ac5^2*qvol3/is3c5(1)");m.component("c5").physics("potc5").feature("flux3").set("q","0");
    m.component("c5").physics("potc5").create("flux4","FluxBoundary",2);m.component("c5").physics("potc5").feature("flux4").selection().named("source4c5");m.component("c5").physics("potc5").feature("flux4").set("g","-tauc5/ac5^2*qvol4/is4c5(1)");m.component("c5").physics("potc5").feature("flux4").set("q","0");
    m.component("c5").physics("potc5").create("flux5","FluxBoundary",2);m.component("c5").physics("potc5").feature("flux5").selection().named("source5c5");m.component("c5").physics("potc5").feature("flux5").set("g","-tauc5/ac5^2*qvol5/is5c5(1)");m.component("c5").physics("potc5").feature("flux5").set("q","0");
    m.component("c5").physics("potc5").create("radiation","FluxBoundary",2);m.component("c5").physics("potc5").feature("radiation").selection().named("farc5");m.component("c5").physics("potc5").feature("radiation").set("g","-chit/cL");m.component("c5").physics("potc5").feature("radiation").set("q","1/Lout");
    m.component("c5").physics().create("gec5","GlobalEquations");m.component("c5").physics("gec5").label("Finite PFP mass, chemical equilibrium, conserved entropy and source dynamics");
    m.component("c5").physics("gec5").feature("ge1").set("name",new String[]{"r1","theta1","qL1","qV1","r2","theta2","qL2","qV2","r3","theta3","qL3","qV3","r4","theta4","qL4","qV4","r5","theta5","qL5","qV5","ediss","erout","pdet"});
    m.component("c5").physics("gec5").feature("ge1").set("equation",new String[]{"tauc5^2*((r1-r1^2/bsc5)*r1tt+(1.5-2*r1/bsc5)*r1t^2)-(pB1-DP)/DP-tauc5*is1c5(chit)/is1c5(1)","(pVP1-pLP1-2*sigIc5/Rg1)/DP","(gLP1-gVP1)/(100[kJ/kg])","(Sspec1-S0c5)/(100[J/(kg*K)])","tauc5^2*((r2-r2^2/bsc5)*r2tt+(1.5-2*r2/bsc5)*r2t^2)-(pB2-DP)/DP-tauc5*is2c5(chit)/is2c5(1)","(pVP2-pLP2-2*sigIc5/Rg2)/DP","(gLP2-gVP2)/(100[kJ/kg])","(Sspec2-S0c5)/(100[J/(kg*K)])","tauc5^2*((r3-r3^2/bsc5)*r3tt+(1.5-2*r3/bsc5)*r3t^2)-(pB3-DP)/DP-tauc5*is3c5(chit)/is3c5(1)","(pVP3-pLP3-2*sigIc5/Rg3)/DP","(gLP3-gVP3)/(100[kJ/kg])","(Sspec3-S0c5)/(100[J/(kg*K)])","tauc5^2*((r4-r4^2/bsc5)*r4tt+(1.5-2*r4/bsc5)*r4t^2)-(pB4-DP)/DP-tauc5*is4c5(chit)/is4c5(1)","(pVP4-pLP4-2*sigIc5/Rg4)/DP","(gLP4-gVP4)/(100[kJ/kg])","(Sspec4-S0c5)/(100[J/(kg*K)])","tauc5^2*((r5-r5^2/bsc5)*r5tt+(1.5-2*r5/bsc5)*r5t^2)-(pB5-DP)/DP-tauc5*is5c5(chit)/is5c5(1)","(pVP5-pLP5-2*sigIc5/Rg5)/DP","(gLP5-gVP5)/(100[kJ/kg])","(Sspec5-S0c5)/(100[J/(kg*K)])","edisst-1*(16*pi*muL*R1*U1^2+16*pi*muL*R2*U2^2+16*pi*muL*R3*U3^2+16*pi*muL*R4*U4^2+16*pi*muL*R5*U5^2)/E0c5","eroutt-rhoL*(ac5^2/tauc5)^2*ioc5(chit*(chit/cL+chi/Lout))/E0c5","tf*pdett+pdet-idc5(pAc)/(idc5(1)*DP)"});
    m.component("c5").physics("gec5").feature("ge1").set("initialValueU",new String[]{"1","1","-4.3179184334226957e-06","-0.0001041337623325709","1","1","-4.3179184334226957e-06","-0.0001041337623325709","1","1","-4.3179184334226957e-06","-0.0001041337623325709","1","1","-4.3179184334226957e-06","-0.0001041337623325709","1","1","-4.3179184334226957e-06","-0.0001041337623325709","0","0","0"});
    m.component("c5").physics("gec5").feature("ge1").set("initialValueUt",new String[]{"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"});
    m.component("c5").mesh().create("meshc5","gc5");
    m.component("c5").mesh("meshc5").feature("size").set("custom",true);
    m.component("c5").mesh("meshc5").feature("size").set("hmax","150[um]");
    m.component("c5").mesh("meshc5").feature("size").set("hmin","5[um]");
    m.component("c5").mesh("meshc5").feature("size").set("hgrad",1.5);
    m.component("c5").mesh("meshc5").feature("size").set("hcurve",0.3);
    m.component("c5").selection().create("allSourcesc5","Union");m.component("c5").selection("allSourcesc5").set("entitydim",2);
    m.component("c5").selection("allSourcesc5").set("input",new String[]{"source1c5","source2c5","source3c5","source4c5","source5c5"});
    m.component("c5").mesh("meshc5").create("local","Size");m.component("c5").mesh("meshc5").feature("local").selection().geom("gc5",2);m.component("c5").mesh("meshc5").feature("local").selection().named("allSourcesc5");m.component("c5").mesh("meshc5").feature("local").set("custom",true);m.component("c5").mesh("meshc5").feature("local").set("hmaxactive",true);m.component("c5").mesh("meshc5").feature("local").set("hmax","ac5/2");
    m.component("c5").mesh("meshc5").create("tet","FreeTet");m.component("c5").mesh("meshc5").run();
    m.study().create("stdc5");m.study("stdc5").label("c5: first 8 microseconds at a fixed 1 MHz virtual pressure receiver");m.study("stdc5").create("time","Transient");m.study("stdc5").feature("time").set("tlist","range(0,25[ns],8[us])");
    for(String stage:m.study().tags())if(stage.startsWith("std"))for(String cc:m.component().tags())for(String ph:m.component(cc).physics().tags())m.study(stage).feature("time").setSolveFor(m.component(cc).physics(ph).resolveModelPath(),cc.equals(stage.substring(3)));
    m.study("stdc5").createAutoSequences("all");String ssc5=m.study("stdc5").getSolverSequences("all")[0];
    m.sol(ssc5).feature("v1").set("initmethod","init");for(String tag:m.sol(ssc5).feature("v1").feature().tags()){m.sol(ssc5).feature("v1").feature(tag).set("scalemethod","manual");m.sol(ssc5).feature("v1").feature(tag).set("scaleval","1");}
    m.sol(ssc5).feature("t1").create("dp","Direct");m.sol(ssc5).feature("t1").feature("dp").set("linsolver","pardiso");m.sol(ssc5).feature("t1").create("coupledAll","FullyCoupled");m.sol(ssc5).feature("t1").feature("coupledAll").set("linsolver","dp");m.sol(ssc5).feature("t1").feature("coupledAll").set("maxiter",20);
    for(String remove:new String[]{"se1","fc1"})if(Arrays.asList(m.sol(ssc5).feature("t1").feature().tags()).contains(remove))m.sol(ssc5).feature("t1").feature().remove(remove);
    m.sol(ssc5).feature("t1").set("rtol","2e-5");m.sol(ssc5).feature("t1").set("timemethod","genalpha");m.sol(ssc5).feature("t1").set("rhoinf",0.75);m.sol(ssc5).feature("t1").set("tstepsgenalpha","manual");m.sol(ssc5).feature("t1").set("timestepgenalpha","25[ns]");
    m.save(ROOT+"scratch/pressure_envelope_c5_configured.mph");try{m.sol(ssc5).runAll();}catch(Exception e){m.save(ROOT+"scratch/pressure_envelope_c5_failed.mph");throw e;}
    m.result().dataset().create("datac5","Solution");m.result().dataset("datac5").set("solution",ssc5);m.result().dataset("datac5").set("comp","c5");m.result().table().create("tablec5","Table");m.result().numerical().create("evalc5","EvalGlobal");m.result().numerical("evalc5").set("data","datac5");m.result().numerical("evalc5").set("table","tablec5");
    String[] exc5=new String[]{"t","t/tauc5","E0c5","c5.pdet*DP","c5.idc5(c5.pAc)/c5.idc5(1)","c5.r1","c5.U1","c5.pLP1","c5.pVP1","c5.Temp1","c5.fv1","c5.Rg1","c5.R1-c5.Rg1","abs(c5.U1)/cL","(c5.Sspec1-S0c5)/(100[J/(kg*K)])","c5.pVP1-c5.pLP1-2*sigIc5/c5.Rg1","c5.gLP1-c5.gVP1","c5.r2","c5.U2","c5.pLP2","c5.pVP2","c5.Temp2","c5.fv2","c5.Rg2","c5.R2-c5.Rg2","abs(c5.U2)/cL","(c5.Sspec2-S0c5)/(100[J/(kg*K)])","c5.pVP2-c5.pLP2-2*sigIc5/c5.Rg2","c5.gLP2-c5.gVP2","c5.r3","c5.U3","c5.pLP3","c5.pVP3","c5.Temp3","c5.fv3","c5.Rg3","c5.R3-c5.Rg3","abs(c5.U3)/cL","(c5.Sspec3-S0c5)/(100[J/(kg*K)])","c5.pVP3-c5.pLP3-2*sigIc5/c5.Rg3","c5.gLP3-c5.gVP3","c5.r4","c5.U4","c5.pLP4","c5.pVP4","c5.Temp4","c5.fv4","c5.Rg4","c5.R4-c5.Rg4","abs(c5.U4)/cL","(c5.Sspec4-S0c5)/(100[J/(kg*K)])","c5.pVP4-c5.pLP4-2*sigIc5/c5.Rg4","c5.gLP4-c5.gVP4","c5.r5","c5.U5","c5.pLP5","c5.pVP5","c5.Temp5","c5.fv5","c5.Rg5","c5.R5-c5.Rg5","abs(c5.U5)/cL","(c5.Sspec5-S0c5)/(100[J/(kg*K)])","c5.pVP5-c5.pLP5-2*sigIc5/c5.Rg5","c5.gLP5-c5.gVP5","c5.En","c5.Ei","c5.Ep","c5.Ea","E0c5*c5.ediss","E0c5*c5.erout","(c5.En+c5.Ei+c5.Ep+c5.Ea+E0c5*(c5.ediss+c5.erout)-E0c5)/E0c5"};
    m.result().numerical("evalc5").set("expr",exc5);m.result().numerical("evalc5").set("descr",exc5);m.result().numerical("evalc5").setResult();m.result().table("tablec5").save(ROOT+"data/pressure_envelope_c5.csv");m.save(ROOT+"scratch/pressure_envelope_c5_solved.mph");System.out.println("PRESSURE_SCENARIO_c5_SOLVED="+Arrays.toString(m.sol(ssc5).getSize()));
    m.param().set("acU","5.3060975082711189e-06[m]");
    m.param().set("mpcU","1.0928631037985286e-14[kg]");
    m.param().set("S0cU","126.56059428419367[J/(kg*K)]");
    m.param().set("uDcU","-9836.42985425392[J/kg]");
    m.param().set("rhoDcU","1621.8782923900924[kg/m^3]");
    m.param().set("rDcU","1.1717086368205036e-06[m]");
    m.param().set("bcU","1[m]","Matching radius; continuum case uses the infinite-near-field dilute limit");
    m.param().set("bscU","bcU/acU");
    m.param().set("taucU","acU*sqrt(rhoL/DP)");
    m.param().set("E0cU","5.5000000000000003e-08[J]","Fixed total retained source energy, including finite PFP internal and interface energy");
    m.param().set("sigcU","0.054[N/m]");
    m.param().set("sigIcU","0.00941[N/m]");
    m.param().set("rhoLcU","1621.2302097446284[kg/m^3]");
    m.param().set("rhoVcU","8.7819467089401986[kg/m^3]");
    m.component().create("cU",true);m.component("cU").geom().create("gcU",3);m.component("cU").sorder("quadratic");
    m.component("cU").label("cU: 100 homogenized PFP bubbles");
    m.component("cU").geom("gcU").create("outer","Sphere");m.component("cU").geom("gcU").feature("outer").set("r","Lout");
    m.component("cU").geom("gcU").create("populationcU","Sphere");m.component("cU").geom("gcU").feature("populationcU").set("r","Rpop");
    m.component("cU").geom("gcU").create("det","Cylinder");m.component("cU").geom("gcU").feature("det").set("r","adet");m.component("cU").geom("gcU").feature("det").set("h","hdet");m.component("cU").geom("gcU").feature("det").set("pos",new String[]{"0","0","robs-hdet/2"});m.component("cU").geom("gcU").run();
    m.component("cU").selection().create("populationcU","Box");m.component("cU").selection("populationcU").set("entitydim",3);m.component("cU").selection("populationcU").set("condition","inside");
    m.component("cU").selection("populationcU").set("xmin","-1.001*Rpop");
    m.component("cU").selection("populationcU").set("xmax","1.001*Rpop");
    m.component("cU").selection("populationcU").set("ymin","-1.001*Rpop");
    m.component("cU").selection("populationcU").set("ymax","1.001*Rpop");
    m.component("cU").selection("populationcU").set("zmin","-1.001*Rpop");
    m.component("cU").selection("populationcU").set("zmax","1.001*Rpop");
    m.component("cU").selection().create("detectorcU","Box");m.component("cU").selection("detectorcU").set("entitydim",3);m.component("cU").selection("detectorcU").set("condition","inside");
    m.component("cU").selection("detectorcU").set("xmin","-1.001*adet");
    m.component("cU").selection("detectorcU").set("xmax","1.001*adet");
    m.component("cU").selection("detectorcU").set("ymin","-1.001*adet");
    m.component("cU").selection("detectorcU").set("ymax","1.001*adet");
    m.component("cU").selection("detectorcU").set("zmin","robs-0.501*hdet");
    m.component("cU").selection("detectorcU").set("zmax","robs+0.501*hdet");
    m.component("cU").selection().create("notfarcU","Box");m.component("cU").selection("notfarcU").set("entitydim",2);m.component("cU").selection("notfarcU").set("condition","inside");
    m.component("cU").selection("notfarcU").set("xmin","-0.8*Lout");
    m.component("cU").selection("notfarcU").set("xmax","0.8*Lout");
    m.component("cU").selection("notfarcU").set("ymin","-0.8*Lout");
    m.component("cU").selection("notfarcU").set("ymax","0.8*Lout");
    m.component("cU").selection("notfarcU").set("zmin","-0.8*Lout");
    m.component("cU").selection("notfarcU").set("zmax","0.8*Lout");
    m.component("cU").selection().create("farcU","Complement");m.component("cU").selection("farcU").set("entitydim",2);m.component("cU").selection("farcU").set("input",new String[]{"notfarcU"});
    m.component("cU").cpl().create("idcU","Integration");m.component("cU").cpl("idcU").selection().geom("gcU",3);m.component("cU").cpl("idcU").selection().named("detectorcU");
    System.out.println("cU_detector="+Arrays.toString(m.component("cU").selection("detectorcU").entities(3)));
    m.component("cU").cpl().create("iocU","Integration");m.component("cU").cpl("iocU").selection().geom("gcU",2);m.component("cU").cpl("iocU").selection().named("farcU");
    System.out.println("cU_far="+Arrays.toString(m.component("cU").selection("farcU").entities(2)));
    m.component("cU").cpl().create("ipcU","Integration");m.component("cU").cpl("ipcU").selection().geom("gcU",3);m.component("cU").cpl("ipcU").selection().named("populationcU");
    System.out.println("cU_population="+Arrays.toString(m.component("cU").selection("populationcU").entities(3)));
    m.component("cU").cpl().create("ivcU","Integration");m.component("cU").cpl("ivcU").selection().geom("gcU",3);m.component("cU").cpl("ivcU").selection().all();m.component("cU").variable().create("vcU");
    m.component("cU").variable("vcU").set("R1","acU*r1");
    m.component("cU").variable("vcU").set("U1","acU*r1t");
    m.component("cU").variable("vcU").set("Temp1","Tref*theta1");
    m.component("cU").variable("vcU").set("rhoLP1","rhoLcU*exp(qL1)");
    m.component("cU").variable("vcU").set("rhoVP1","rhoVcU*exp(qV1)");
    m.component("cU").variable("vcU").set("Vb1","4*pi*R1^3/3");
    m.component("cU").variable("vcU").set("pLP1","pfpp(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[Pa]");
    m.component("cU").variable("vcU").set("pVP1","pfpp(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[Pa]");
    m.component("cU").variable("vcU").set("uLP1","pfpu(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[J/kg]");
    m.component("cU").variable("vcU").set("uVP1","pfpu(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[J/kg]");
    m.component("cU").variable("vcU").set("gLP1","pfpg(Temp1/1[K],rhoLP1/(1[kg/m^3]))*1[J/kg]");
    m.component("cU").variable("vcU").set("gVP1","pfpg(Temp1/1[K],rhoVP1/(1[kg/m^3]))*1[J/kg]");
    m.component("cU").variable("vcU").set("fv1","(Vb1-mpcU/rhoLP1)/(mpcU*(1/rhoVP1-1/rhoLP1))");
    m.component("cU").variable("vcU").set("Rg1","(max(fv1*mpcU/rhoVP1,4*pi*(1[nm])^3/3)*3/(4*pi))^(1/3)");
    m.component("cU").variable("vcU").set("Sspec1","((1-fv1)*(uLP1+pLP1/rhoLP1-gLP1)+fv1*(uVP1+pVP1/rhoVP1-gVP1))/Temp1");
    m.component("cU").variable("vcU").set("qvol1","4*pi*R1^2*U1");
    m.component("cU").variable("vcU").set("pB1","pLP1-2*sigcU/R1-4*muL*U1/R1");
    m.component("cU").variable("vcU").set("En1","2*pi*rhoL*R1^3*U1^2*(1-R1/bcU)");
    m.component("cU").variable("vcU").set("Ei1","mpcU*((1-fv1)*uLP1+fv1*uVP1)+4*pi*sigIcU*Rg1^2-mpcU*uDcU-DP*mpcU/rhoDcU-4*pi*sigcU*rDcU^2");
    m.component("cU").variable("vcU").set("Ep1","DP*Vb1+4*pi*sigcU*R1^2");
    m.component("cU").variable("vcU").set("En","100*(En1)");
    m.component("cU").variable("vcU").set("Ei","100*(Ei1)");
    m.component("cU").variable("vcU").set("Ep","100*(Ep1)");
    m.component("cU").variable("vcU").set("Ein","E0cU");
    m.component("cU").variable("vcU").set("phiDt","acU^2/taucU*chit");
    m.component("cU").variable("vcU").set("pAc","-rhoL*phiDt");
    m.component("cU").variable("vcU").set("u2ac","(acU^2/taucU)^2*(chix^2+chiy^2+chiz^2)");
    m.component("cU").variable("vcU").set("Ea","ivcU(rhoL/2*(u2ac+phiDt^2/cL^2))");
    m.component("cU").physics().create("potcU","CoefficientFormPDE","gcU",new String[]{"chi"});m.component("cU").physics("potcU").label("Spatial 3D weak acoustic potential and conservative source flux");
    m.component("cU").physics("potcU").feature("cfeq1").set("c","1");
    m.component("cU").physics("potcU").feature("cfeq1").set("da","0");
    m.component("cU").physics("potcU").feature("cfeq1").set("ea","1/cL^2");
    m.component("cU").physics("potcU").feature("cfeq1").set("f","0");
    m.component("cU").physics("potcU").feature("init1").set("chi","0");m.component("cU").physics("potcU").feature("init1").set("chit","0");
    m.component("cU").physics("potcU").create("distributed","CoefficientFormPDE",3);m.component("cU").physics("potcU").feature("distributed").selection().named("populationcU");
    m.component("cU").physics("potcU").feature("distributed").set("c","1");
    m.component("cU").physics("potcU").feature("distributed").set("da","0");
    m.component("cU").physics("potcU").feature("distributed").set("ea","1/cL^2");
    m.component("cU").physics("potcU").feature("distributed").set("f","-100*taucU/acU^2*qvol1/ipcU(1)");
    m.component("cU").physics("potcU").create("radiation","FluxBoundary",2);m.component("cU").physics("potcU").feature("radiation").selection().named("farcU");m.component("cU").physics("potcU").feature("radiation").set("g","-chit/cL");m.component("cU").physics("potcU").feature("radiation").set("q","1/Lout");
    m.component("cU").physics().create("gecU","GlobalEquations");m.component("cU").physics("gecU").label("Finite PFP mass, chemical equilibrium, conserved entropy and source dynamics");
    m.component("cU").physics("gecU").feature("ge1").set("name",new String[]{"r1","theta1","qL1","qV1","ediss","erout","pdet"});
    m.component("cU").physics("gecU").feature("ge1").set("equation",new String[]{"taucU^2*((r1-r1^2/bscU)*r1tt+(1.5-2*r1/bscU)*r1t^2)-(pB1-DP)/DP-taucU*ipcU(chit)/ipcU(1)","(pVP1-pLP1-2*sigIcU/Rg1)/DP","(gLP1-gVP1)/(100[kJ/kg])","(Sspec1-S0cU)/(100[J/(kg*K)])","edisst-100*(16*pi*muL*R1*U1^2)/E0cU","eroutt-rhoL*(acU^2/taucU)^2*iocU(chit*(chit/cL+chi/Lout))/E0cU","tf*pdett+pdet-idcU(pAc)/(idcU(1)*DP)"});
    m.component("cU").physics("gecU").feature("ge1").set("initialValueU",new String[]{"1","1","-1.1820766006109311e-05","-0.00028506414542899179","0","0","0"});
    m.component("cU").physics("gecU").feature("ge1").set("initialValueUt",new String[]{"0","0","0","0","0","0","0"});
    m.component("cU").mesh().create("meshcU","gcU");
    m.component("cU").mesh("meshcU").feature("size").set("custom",true);
    m.component("cU").mesh("meshcU").feature("size").set("hmax","150[um]");
    m.component("cU").mesh("meshcU").feature("size").set("hmin","5[um]");
    m.component("cU").mesh("meshcU").feature("size").set("hgrad",1.5);
    m.component("cU").mesh("meshcU").feature("size").set("hcurve",0.3);
    m.component("cU").mesh("meshcU").create("tet","FreeTet");m.component("cU").mesh("meshcU").run();
    m.study().create("stdcU");m.study("stdcU").label("cU: first 8 microseconds at a fixed 1 MHz virtual pressure receiver");m.study("stdcU").create("time","Transient");m.study("stdcU").feature("time").set("tlist","range(0,25[ns],8[us])");
    for(String stage:m.study().tags())if(stage.startsWith("std"))for(String cc:m.component().tags())for(String ph:m.component(cc).physics().tags())m.study(stage).feature("time").setSolveFor(m.component(cc).physics(ph).resolveModelPath(),cc.equals(stage.substring(3)));
    m.study("stdcU").createAutoSequences("all");String sscU=m.study("stdcU").getSolverSequences("all")[0];
    m.sol(sscU).feature("v1").set("initmethod","init");for(String tag:m.sol(sscU).feature("v1").feature().tags()){m.sol(sscU).feature("v1").feature(tag).set("scalemethod","manual");m.sol(sscU).feature("v1").feature(tag).set("scaleval","1");}
    m.sol(sscU).feature("t1").create("dp","Direct");m.sol(sscU).feature("t1").feature("dp").set("linsolver","pardiso");m.sol(sscU).feature("t1").create("coupledAll","FullyCoupled");m.sol(sscU).feature("t1").feature("coupledAll").set("linsolver","dp");m.sol(sscU).feature("t1").feature("coupledAll").set("maxiter",20);
    for(String remove:new String[]{"se1","fc1"})if(Arrays.asList(m.sol(sscU).feature("t1").feature().tags()).contains(remove))m.sol(sscU).feature("t1").feature().remove(remove);
    m.sol(sscU).feature("t1").set("rtol","2e-5");m.sol(sscU).feature("t1").set("timemethod","genalpha");m.sol(sscU).feature("t1").set("rhoinf",0.75);m.sol(sscU).feature("t1").set("tstepsgenalpha","manual");m.sol(sscU).feature("t1").set("timestepgenalpha","25[ns]");
    m.save(ROOT+"scratch/pressure_envelope_cU_configured.mph");try{m.sol(sscU).runAll();}catch(Exception e){m.save(ROOT+"scratch/pressure_envelope_cU_failed.mph");throw e;}
    m.result().dataset().create("datacU","Solution");m.result().dataset("datacU").set("solution",sscU);m.result().dataset("datacU").set("comp","cU");m.result().table().create("tablecU","Table");m.result().numerical().create("evalcU","EvalGlobal");m.result().numerical("evalcU").set("data","datacU");m.result().numerical("evalcU").set("table","tablecU");
    String[] excU=new String[]{"t","t/taucU","E0cU","cU.pdet*DP","cU.idcU(cU.pAc)/cU.idcU(1)","cU.r1","cU.U1","cU.pLP1","cU.pVP1","cU.Temp1","cU.fv1","cU.Rg1","cU.R1-cU.Rg1","abs(cU.U1)/cL","(cU.Sspec1-S0cU)/(100[J/(kg*K)])","cU.pVP1-cU.pLP1-2*sigIcU/cU.Rg1","cU.gLP1-cU.gVP1","cU.En","cU.Ei","cU.Ep","cU.Ea","E0cU*cU.ediss","E0cU*cU.erout","(cU.En+cU.Ei+cU.Ep+cU.Ea+E0cU*(cU.ediss+cU.erout)-E0cU)/E0cU","100*cU.Vb1/cU.ipcU(1)"};
    m.result().numerical("evalcU").set("expr",excU);m.result().numerical("evalcU").set("descr",excU);m.result().numerical("evalcU").setResult();m.result().table("tablecU").save(ROOT+"data/pressure_envelope_cU.csv");m.save(ROOT+"scratch/pressure_envelope_cU_solved.mph");System.out.println("PRESSURE_SCENARIO_cU_SOLVED="+Arrays.toString(m.sol(sscU).getSize()));
    m.save(ROOT+"scratch/pressure_envelope3d_solved.mph");System.out.println("ALL_FIVE_PRESSURE_SCENARIOS_SOLVED");return m;
    }
    public static void main(String[]args)throws Exception{run();}
}
