/* * example_tiltedplates_offsetfed_100MHz.java */ import com.comsol.model.*; import com.comsol.model.util.*; /** Model exported on Dec 24 2024, 09:38 by COMSOL 6.3.0.290. */ public class example_tiltedplates_offsetfed_100MHz { public static Model run() { Model model = ModelUtil.create("Model"); model.modelPath("C:\\Users\\rkoslover\\Downloads"); model.component().create("comp1", true); model.component("comp1").geom().create("geom1", 3); model.component("comp1").mesh().create("mesh1"); model.component("comp1").physics().create("mef", "ElectricInductionCurrents", "geom1"); model.study().create("std1"); model.study("std1").create("freq", "Frequency"); model.study("std1").feature("freq").setSolveFor("/physics/mef", true); model.component("comp1").geom("geom1").geomRep("comsol"); model.component("comp1").geom("geom1").create("sph1", "Sphere"); model.component("comp1").geom("geom1").feature("sph1").set("r", ".1"); model.component("comp1").geom("geom1").run("sph1"); model.component("comp1").geom("geom1").run(); model.component("comp1").material().create("mat1", "Common"); model.component("comp1").material("mat1").propertyGroup("def").func().create("eta", "Piecewise"); model.component("comp1").material("mat1").propertyGroup("def").func().create("Cp", "Piecewise"); model.component("comp1").material("mat1").propertyGroup("def").func().create("rho", "Analytic"); model.component("comp1").material("mat1").propertyGroup("def").func().create("k", "Piecewise"); model.component("comp1").material("mat1").propertyGroup("def").func().create("cs", "Analytic"); model.component("comp1").material("mat1").propertyGroup("def").func().create("an1", "Analytic"); model.component("comp1").material("mat1").propertyGroup("def").func().create("an2", "Analytic"); model.component("comp1").material("mat1").propertyGroup().create("RefractiveIndex", "Refractive index"); model.component("comp1").material("mat1").propertyGroup().create("NonlinearModel", "Nonlinear model"); model.component("comp1").material("mat1").propertyGroup().create("idealGas", "Ideal gas"); model.component("comp1").material("mat1").propertyGroup("idealGas").func().create("Cp", "Piecewise"); model.component("comp1").material("mat1").label("Air"); model.component("comp1").material("mat1").set("family", "air"); model.component("comp1").material("mat1").propertyGroup("def").func("eta").set("arg", "T"); model.component("comp1").material("mat1").propertyGroup("def").func("eta") .set("pieces", new String[][]{{"200.0", "1600.0", "-8.38278E-7+8.35717342E-8*T^1-7.69429583E-11*T^2+4.6437266E-14*T^3-1.06585607E-17*T^4"}}); model.component("comp1").material("mat1").propertyGroup("def").func("eta").set("argunit", "K"); model.component("comp1").material("mat1").propertyGroup("def").func("eta").set("fununit", "Pa*s"); model.component("comp1").material("mat1").propertyGroup("def").func("Cp").set("arg", "T"); model.component("comp1").material("mat1").propertyGroup("def").func("Cp") .set("pieces", new String[][]{{"200.0", "1600.0", "1047.63657-0.372589265*T^1+9.45304214E-4*T^2-6.02409443E-7*T^3+1.2858961E-10*T^4"}}); model.component("comp1").material("mat1").propertyGroup("def").func("Cp").set("argunit", "K"); model.component("comp1").material("mat1").propertyGroup("def").func("Cp").set("fununit", "J/(kg*K)"); model.component("comp1").material("mat1").propertyGroup("def").func("rho") .set("expr", "pA*0.02897/R_const[K*mol/J]/T"); model.component("comp1").material("mat1").propertyGroup("def").func("rho").set("args", new String[]{"pA", "T"}); model.component("comp1").material("mat1").propertyGroup("def").func("rho").set("fununit", "kg/m^3"); model.component("comp1").material("mat1").propertyGroup("def").func("rho") .set("argunit", new String[]{"Pa", "K"}); model.component("comp1").material("mat1").propertyGroup("def").func("rho") .set("plotaxis", new String[]{"off", "on"}); model.component("comp1").material("mat1").propertyGroup("def").func("rho") .set("plotfixedvalue", new String[]{"101325", "273.15"}); model.component("comp1").material("mat1").propertyGroup("def").func("rho") .set("plotargs", new String[][]{{"pA", "101325", "101325"}, {"T", "273.15", "293.15"}}); model.component("comp1").material("mat1").propertyGroup("def").func("k").set("arg", "T"); model.component("comp1").material("mat1").propertyGroup("def").func("k") .set("pieces", new String[][]{{"200.0", "1600.0", "-0.00227583562+1.15480022E-4*T^1-7.90252856E-8*T^2+4.11702505E-11*T^3-7.43864331E-15*T^4"}}); model.component("comp1").material("mat1").propertyGroup("def").func("k").set("argunit", "K"); model.component("comp1").material("mat1").propertyGroup("def").func("k").set("fununit", "W/(m*K)"); model.component("comp1").material("mat1").propertyGroup("def").func("cs") .set("expr", "sqrt(1.4*R_const[K*mol/J]/0.02897*T)"); model.component("comp1").material("mat1").propertyGroup("def").func("cs").set("args", new String[]{"T"}); model.component("comp1").material("mat1").propertyGroup("def").func("cs").set("fununit", "m/s"); model.component("comp1").material("mat1").propertyGroup("def").func("cs").set("argunit", new String[]{"K"}); model.component("comp1").material("mat1").propertyGroup("def").func("cs") .set("plotfixedvalue", new String[]{"273.15"}); model.component("comp1").material("mat1").propertyGroup("def").func("cs") .set("plotargs", new String[][]{{"T", "273.15", "373.15"}}); model.component("comp1").material("mat1").propertyGroup("def").func("an1").set("funcname", "alpha_p"); model.component("comp1").material("mat1").propertyGroup("def").func("an1") .set("expr", "-1/rho(pA,T)*d(rho(pA,T),T)"); model.component("comp1").material("mat1").propertyGroup("def").func("an1").set("args", new String[]{"pA", "T"}); model.component("comp1").material("mat1").propertyGroup("def").func("an1").set("fununit", "1/K"); model.component("comp1").material("mat1").propertyGroup("def").func("an1") .set("argunit", new String[]{"Pa", "K"}); model.component("comp1").material("mat1").propertyGroup("def").func("an1") .set("plotaxis", new String[]{"off", "on"}); model.component("comp1").material("mat1").propertyGroup("def").func("an1") .set("plotfixedvalue", new String[]{"101325", "273.15"}); model.component("comp1").material("mat1").propertyGroup("def").func("an1") .set("plotargs", new String[][]{{"pA", "101325", "101325"}, {"T", "273.15", "373.15"}}); model.component("comp1").material("mat1").propertyGroup("def").func("an2").set("funcname", "muB"); model.component("comp1").material("mat1").propertyGroup("def").func("an2").set("expr", "0.6*eta(T)"); model.component("comp1").material("mat1").propertyGroup("def").func("an2").set("args", new String[]{"T"}); model.component("comp1").material("mat1").propertyGroup("def").func("an2").set("fununit", "Pa*s"); model.component("comp1").material("mat1").propertyGroup("def").func("an2").set("argunit", new String[]{"K"}); model.component("comp1").material("mat1").propertyGroup("def").func("an2") .set("plotfixedvalue", new String[]{"200"}); model.component("comp1").material("mat1").propertyGroup("def").func("an2") .set("plotargs", new String[][]{{"T", "200", "1600"}}); model.component("comp1").material("mat1").propertyGroup("def").set("thermalexpansioncoefficient", ""); model.component("comp1").material("mat1").propertyGroup("def").set("molarmass", ""); model.component("comp1").material("mat1").propertyGroup("def").set("bulkviscosity", ""); model.component("comp1").material("mat1").propertyGroup("def") .set("thermalexpansioncoefficient", new String[]{"alpha_p(pA,T)", "0", "0", "0", "alpha_p(pA,T)", "0", "0", "0", "alpha_p(pA,T)"}); model.component("comp1").material("mat1").propertyGroup("def").set("molarmass", "0.02897[kg/mol]"); model.component("comp1").material("mat1").propertyGroup("def").set("bulkviscosity", "muB(T)"); model.component("comp1").material("mat1").propertyGroup("def") .set("relpermeability", new String[]{"1", "0", "0", "0", "1", "0", "0", "0", "1"}); model.component("comp1").material("mat1").propertyGroup("def") .set("relpermittivity", new String[]{"1", "0", "0", "0", "1", "0", "0", "0", "1"}); model.component("comp1").material("mat1").propertyGroup("def").set("dynamicviscosity", "eta(T)"); model.component("comp1").material("mat1").propertyGroup("def").set("ratioofspecificheat", "1.4"); model.component("comp1").material("mat1").propertyGroup("def") .set("electricconductivity", new String[]{"0[S/m]", "0", "0", "0", "0[S/m]", "0", "0", "0", "0[S/m]"}); model.component("comp1").material("mat1").propertyGroup("def").set("heatcapacity", "Cp(T)"); model.component("comp1").material("mat1").propertyGroup("def").set("density", "rho(pA,T)"); model.component("comp1").material("mat1").propertyGroup("def") .set("thermalconductivity", new String[]{"k(T)", "0", "0", "0", "k(T)", "0", "0", "0", "k(T)"}); model.component("comp1").material("mat1").propertyGroup("def").set("soundspeed", "cs(T)"); model.component("comp1").material("mat1").propertyGroup("def").addInput("temperature"); model.component("comp1").material("mat1").propertyGroup("def").addInput("pressure"); model.component("comp1").material("mat1").propertyGroup("RefractiveIndex") .set("n", new String[]{"1", "0", "0", "0", "1", "0", "0", "0", "1"}); model.component("comp1").material("mat1").propertyGroup("NonlinearModel").set("BA", "def.gamma-1"); model.component("comp1").material("mat1").propertyGroup("idealGas").func("Cp").label("Piecewise 2"); model.component("comp1").material("mat1").propertyGroup("idealGas").func("Cp").set("arg", "T"); model.component("comp1").material("mat1").propertyGroup("idealGas").func("Cp") .set("pieces", new String[][]{{"200.0", "1600.0", "1047.63657-0.372589265*T^1+9.45304214E-4*T^2-6.02409443E-7*T^3+1.2858961E-10*T^4"}}); model.component("comp1").material("mat1").propertyGroup("idealGas").func("Cp").set("argunit", "K"); model.component("comp1").material("mat1").propertyGroup("idealGas").func("Cp").set("fununit", "J/(kg*K)"); model.component("comp1").material("mat1").propertyGroup("idealGas").set("Rs", "R_const/Mn"); model.component("comp1").material("mat1").propertyGroup("idealGas").set("heatcapacity", "Cp(T)"); model.component("comp1").material("mat1").propertyGroup("idealGas").set("ratioofspecificheat", "1.4"); model.component("comp1").material("mat1").propertyGroup("idealGas").set("molarmass", "0.02897[kg/mol]"); model.component("comp1").material("mat1").propertyGroup("idealGas").addInput("temperature"); model.component("comp1").material("mat1").propertyGroup("idealGas").addInput("pressure"); model.component("comp1").material("mat1").materialType("nonSolid"); model.component("comp1").physics("mef").setGroupBySpaceDimension(true); model.component("comp1").physics("mef").create("trans1", "TransitionBoundaryCondition", 2); model.component("comp1").physics("mef").feature().remove("trans1"); model.component("comp1").geom("geom1").create("cyl1", "Cylinder"); model.component("comp1").geom("geom1").feature("cyl1").label("Cylinder disk 1"); model.component("comp1").geom("geom1").feature("cyl1").set("r", ".01"); model.component("comp1").geom("geom1").feature("cyl1").set("h", ".001"); model.component("comp1").geom("geom1").run("cyl1"); model.component("comp1").view("view1").set("renderwireframe", true); model.component("comp1").geom("geom1").feature("cyl1").set("r", ".03"); model.component("comp1").geom("geom1").run("cyl1"); model.component("comp1").geom("geom1").feature("cyl1").set("h", ".002"); model.component("comp1").geom("geom1").run("cyl1"); model.component("comp1").geom("geom1").feature().duplicate("cyl2", "cyl1"); model.component("comp1").geom("geom1").feature("cyl2").label("Cylinder disk 2"); model.component("comp1").geom("geom1").feature("cyl2").set("pos", new String[]{"0", "0", ".003"}); model.component("comp1").geom("geom1").run("cyl2"); model.component("comp1").geom("geom1").feature("cyl2").set("r", ".02"); model.component("comp1").geom("geom1").feature("cyl1").set("r", ".02"); model.component("comp1").geom("geom1").run("cyl1"); model.component("comp1").geom("geom1").run("cyl2"); model.component("comp1").geom("geom1").feature("cyl2").set("h", ".001"); model.component("comp1").geom("geom1").feature("cyl1").set("h", ".001"); model.component("comp1").geom("geom1").run("cyl1"); model.component("comp1").geom("geom1").run("cyl2"); model.component("comp1").geom("geom1").feature("cyl2").set("pos", new String[]{"0", "0", ".002"}); model.component("comp1").geom("geom1").run("cyl2"); model.component("comp1").geom("geom1").feature("cyl2").label("Cylinder disk 2, tilted slightly"); model.component("comp1").geom("geom1").feature("cyl2").set("axistype", "y"); model.component("comp1").geom("geom1").feature("cyl2").label("Cylinder disk 2, tilted slightly around y axis"); model.component("comp1").geom("geom1").feature("cyl2").set("rot", 10); model.component("comp1").geom("geom1").run("cyl2"); model.component("comp1").geom("geom1").feature("cyl2").set("axistype", "z"); model.component("comp1").geom("geom1").run("cyl2"); model.component("comp1").geom("geom1").feature("cyl2").set("rot", 0); model.component("comp1").geom("geom1").run("cyl2"); model.component("comp1").geom("geom1").feature("cyl2").label("Cylinder disk 2"); model.component("comp1").geom("geom1").run("cyl2"); model.component("comp1").geom("geom1").create("rot1", "Rotate"); model.component("comp1").geom("geom1").feature("rot1").label("Rotate disk 2 slightly"); model.component("comp1").geom("geom1").feature("rot1").selection("input").set("cyl2"); model.component("comp1").geom("geom1").feature("rot1").set("axistype", "y"); model.component("comp1").geom("geom1").feature("rot1").set("pos", new String[]{"0", "0", ".002"}); model.component("comp1").geom("geom1").feature("rot1").set("rot", 10); model.component("comp1").geom("geom1").run("rot1"); model.component("comp1").geom("geom1").feature("rot1").set("rot", 1); model.component("comp1").geom("geom1").run("rot1"); model.component("comp1").geom("geom1").feature("rot1").label("Rotate disk 2 ny half a degree"); model.component("comp1").geom("geom1").feature("rot1").set("rot", ".5"); model.component("comp1").geom("geom1").run("rot1"); model.component("comp1").geom("geom1").create("cyl3", "Cylinder"); model.component("comp1").geom("geom1").feature("cyl3").label("Cylinder top connection"); model.component("comp1").geom("geom1").feature("cyl3") .label("Cylinder top connection, offset from ctr a bit, along x"); model.component("comp1").geom("geom1").feature("cyl3").set("r", ".002"); model.component("comp1").geom("geom1").feature("rot1").label("Rotate disk 2 by half a degree"); model.component("comp1").geom("geom1").feature("cyl3").set("pos", new String[]{"0", "0", ".003"}); model.component("comp1").geom("geom1").run("cyl3"); model.component("comp1").geom("geom1").feature("cyl3").set("h", ".1"); model.component("comp1").geom("geom1").run("cyl3"); model.component("comp1").view("view1").camera().set("projection", "orthographic"); model.component("comp1").geom("geom1").feature("cyl3").set("pos", new String[]{"0", "0", ".002"}); model.component("comp1").geom("geom1").run("cyl3"); model.component("comp1").geom("geom1").feature("cyl3").set("pos", new String[]{"0", "0", ".0025"}); model.component("comp1").geom("geom1").run("cyl3"); model.component("comp1").geom("geom1").feature("cyl3").set("pos", new String[]{".005", "0", ".0025"}); model.component("comp1").geom("geom1").run("cyl3"); model.component("comp1").geom("geom1").feature().duplicate("cyl4", "cyl3"); model.component("comp1").geom("geom1").feature("cyl4").label("Cylinder bottom connection, centered"); model.component("comp1").geom("geom1").feature("cyl4").set("pos", new String[]{"0", "0", "-.1"}); model.component("comp1").geom("geom1").run("cyl4"); model.component("comp1").geom("geom1").feature("cyl4").set("h", ".105"); model.component("comp1").geom("geom1").run("cyl4"); model.component("comp1").geom("geom1").feature("cyl4").set("h", ".1005"); model.component("comp1").geom("geom1").run("cyl4"); model.component("comp1").geom("geom1").feature("cyl4").set("pos", new String[]{"0", "0", "-.11"}); model.component("comp1").geom("geom1").feature("cyl4").set("h", ".1105"); model.component("comp1").geom("geom1").feature("cyl3").set("h", ".11"); model.component("comp1").geom("geom1").run("cyl3"); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").run("cyl4"); model.component("comp1").geom("geom1").create("uni1", "Union"); model.component("comp1").geom("geom1").feature("uni1").label("Union top disk and top wire"); model.component("comp1").geom("geom1").feature("uni1").selection("input").set("cyl3", "rot1"); model.component("comp1").geom("geom1").feature("uni1").set("intbnd", false); model.component("comp1").geom("geom1").run("uni1"); model.component("comp1").geom("geom1").feature().duplicate("uni2", "uni1"); model.component("comp1").geom("geom1").feature("uni2").label("Union bottom disk and bottom wire"); model.component("comp1").geom("geom1").feature("uni2").selection("input").set("cyl1", "cyl4"); model.component("comp1").geom("geom1").run("uni2"); model.component("comp1").geom("geom1").run(); model.component("comp1").geom("geom1").create("dif1", "Difference"); model.component("comp1").geom("geom1").feature("dif1") .label("Difference. Subtract all conductors (perfect) from computational space"); model.component("comp1").geom("geom1").feature("dif1").selection("input2").set("uni1", "uni2"); model.component("comp1").geom("geom1").feature("dif1").selection("input").set("sph1"); model.component("comp1").geom("geom1").run("dif1"); model.component("comp1").geom("geom1").feature("sph1").set("r", ".05"); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").run(); model.component("comp1").geom("geom1").run("uni2"); model.component("comp1").geom("geom1").feature("sph1") .label("Sphere 1. Keep it small compared to lambda, but large enough to not perturb much."); model.component("comp1").geom("geom1").feature("sph1").set("r", ".07"); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").feature("sph1") .label("Sphere 1. Small compared to lambda, but large enough to not perturb much."); model.component("comp1").geom("geom1").run(); model.component("comp1").physics("mef").create("lport1", "LumpedPort", 2); model.component("comp1").physics("mef").feature("lport1").set("PortType", "Via"); model.component("comp1").view("view1").set("showDirections", false); model.component("comp1").physics("mef").feature("lport1").set("TerminalType", "Current"); model.component("comp1").physics("mef").feature("lport1").set("PortType", "UserDefined"); model.component("comp1").view("view1").set("showDirections", false); model.component("comp1").physics("mef").feature("lport1").set("PortType", "Uniform"); model.component("comp1").view("view1").set("showDirections", false); model.component("comp1").physics("mef").feature("lport1").set("PortType", "UserDefined"); model.component("comp1").view("view1").set("showDirections", false); model.component("comp1").view("view1").set("transparency", true); model.component("comp1").geom("geom1").feature("cyl3").set("r", ".001"); model.component("comp1").geom("geom1").feature("cyl4").set("r", ".001"); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").run(); model.component("comp1").physics("mef").feature().remove("lport1"); model.component("comp1").physics("mef").create("scu1", "SurfaceCurrent", 2); model.component("comp1").physics("mef").feature("scu1").selection().set(13, 14, 19, 21, 25, 26, 27, 28); model.component("comp1").physics("mef").feature("scu1").set("Js0", new int[]{0, 0, 1}); model.component("comp1").physics("mef").feature("scu1") .label("Surface Current (a simple uniform current on the wires)"); model.component("comp1").physics("mef").feature("scu1") .label("Surface Current (just a simple uniform current on these wires)"); model.component("comp1").geom("geom1").feature("cyl3").set("pos", new String[]{".0025", "0", ".0025"}); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").feature("rot1").label("Rotate disk 2 by half a degree, for fun"); model.component("comp1").geom("geom1").run(); model.component("comp1").mesh("mesh1").create("ftet1", "FreeTet"); model.study("std1").feature("freq").set("punit", "MHz"); model.study("std1").feature("freq").set("plist", 100); model.sol().create("sol1"); model.sol("sol1").study("std1"); model.sol("sol1").create("st1", "StudyStep"); model.sol("sol1").feature("st1").set("study", "std1"); model.sol("sol1").feature("st1").set("studystep", "freq"); model.sol("sol1").create("v1", "Variables"); model.sol("sol1").feature("v1").set("control", "freq"); model.sol("sol1").create("s1", "Stationary"); model.sol("sol1").feature("s1").create("p1", "Parametric"); model.sol("sol1").feature("s1").feature().remove("pDef"); model.sol("sol1").feature("s1").feature("p1").set("pname", new String[]{"freq"}); model.sol("sol1").feature("s1").feature("p1").set("plistarr", new String[]{"100"}); model.sol("sol1").feature("s1").feature("p1").set("punit", new String[]{"MHz"}); model.sol("sol1").feature("s1").feature("p1").set("pcontinuationmode", "no"); model.sol("sol1").feature("s1").feature("p1").set("preusesol", "no"); model.sol("sol1").feature("s1").feature("p1").set("pdistrib", "off"); model.sol("sol1").feature("s1").feature("p1").set("plot", "off"); model.sol("sol1").feature("s1").feature("p1").set("plotgroup", "Default"); model.sol("sol1").feature("s1").feature("p1").set("probesel", "all"); model.sol("sol1").feature("s1").feature("p1").set("probes", new String[]{}); model.sol("sol1").feature("s1").feature("p1").set("control", "freq"); model.sol("sol1").feature("s1").set("linpmethod", "sol"); model.sol("sol1").feature("s1").set("linpsol", "zero"); model.sol("sol1").feature("s1").set("control", "freq"); model.sol("sol1").feature("s1").create("fc1", "FullyCoupled"); model.sol("sol1").feature("s1").create("i1", "Iterative"); model.sol("sol1").feature("s1").feature("i1").set("linsolver", "fgmres"); model.sol("sol1").feature("s1").feature("i1").set("nlinnormuse", true); model.sol("sol1").feature("s1").feature("i1").set("rhob", 10000); model.sol("sol1").feature("s1").feature("i1").create("mg1", "Multigrid"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("pr").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("po").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").create("kp1", "KrylovPreconditioner"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1") .set("prefuntype", "right"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").set("prefun", "gmres"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1") .set("iterm", "itertol"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").set("iter", "25"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("fc1").set("linsolver", "i1"); model.sol("sol1").feature("s1").feature().remove("fcDef"); model.sol("sol1").attach("std1"); model.component("comp1").mesh("mesh1").feature("ftet1").create("size1", "Size"); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size1").selection().geom("geom1", 3); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size1").label("Size 1, general"); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size1").selection().set(1); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size1").set("custom", true); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size1").set("hmaxactive", true); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size1").set("hmax", 0.002); model.component("comp1").mesh("mesh1").run("size"); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size1").set("hmax", 0.005); model.component("comp1").mesh("mesh1").run(); model.component("comp1").mesh("mesh1").feature("ftet1").create("size2", "Size"); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size2") .label("Size on inner surfaces of the two plates"); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size2").selection().geom("geom1", 2); model.component("comp1").view("view1").set("rendermesh", false); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size2").selection().set(8, 11); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size2").set("custom", true); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size2").set("hmaxactive", true); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size2").set("hmax", 0.001); model.component("comp1").mesh("mesh1").run(); model.component("comp1").view("view1").set("rendermesh", true); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size2") .label("Size on inner surfaces and edges of the two plates"); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size2") .label("Size on plate surfaces and wires"); model.component("comp1").mesh("mesh1").feature("ftet1").feature("size2").selection() .set(5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28); model.component("comp1").mesh("mesh1").run(); model.component("comp1").material("mat1").label("Air, but just a little conductive"); model.component("comp1").material("mat1").propertyGroup("def") .set("electricconductivity", new String[]{"0.5[S/m]"}); model.component("comp1").material("mat1").label("Air, but a little conductive for stability"); model.sol("sol1").study("std1"); model.sol("sol1").feature().remove("s1"); model.sol("sol1").feature().remove("v1"); model.sol("sol1").feature().remove("st1"); model.sol("sol1").create("st1", "StudyStep"); model.sol("sol1").feature("st1").set("study", "std1"); model.sol("sol1").feature("st1").set("studystep", "freq"); model.sol("sol1").create("v1", "Variables"); model.sol("sol1").feature("v1").set("control", "freq"); model.sol("sol1").create("s1", "Stationary"); model.sol("sol1").feature("s1").create("p1", "Parametric"); model.sol("sol1").feature("s1").feature().remove("pDef"); model.sol("sol1").feature("s1").feature("p1").set("pname", new String[]{"freq"}); model.sol("sol1").feature("s1").feature("p1").set("plistarr", new String[]{"100"}); model.sol("sol1").feature("s1").feature("p1").set("punit", new String[]{"MHz"}); model.sol("sol1").feature("s1").feature("p1").set("pcontinuationmode", "no"); model.sol("sol1").feature("s1").feature("p1").set("preusesol", "no"); model.sol("sol1").feature("s1").feature("p1").set("pdistrib", "off"); model.sol("sol1").feature("s1").feature("p1").set("plot", "off"); model.sol("sol1").feature("s1").feature("p1").set("plotgroup", "Default"); model.sol("sol1").feature("s1").feature("p1").set("probesel", "all"); model.sol("sol1").feature("s1").feature("p1").set("probes", new String[]{}); model.sol("sol1").feature("s1").feature("p1").set("control", "freq"); model.sol("sol1").feature("s1").set("linpmethod", "sol"); model.sol("sol1").feature("s1").set("linpsol", "zero"); model.sol("sol1").feature("s1").set("control", "freq"); model.sol("sol1").feature("s1").create("fc1", "FullyCoupled"); model.sol("sol1").feature("s1").create("i1", "Iterative"); model.sol("sol1").feature("s1").feature("i1").set("linsolver", "fgmres"); model.sol("sol1").feature("s1").feature("i1").set("nlinnormuse", true); model.sol("sol1").feature("s1").feature("i1").set("rhob", 10000); model.sol("sol1").feature("s1").feature("i1").create("mg1", "Multigrid"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("pr").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("po").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").create("kp1", "KrylovPreconditioner"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1") .set("prefuntype", "right"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").set("prefun", "gmres"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1") .set("iterm", "itertol"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").set("iter", "25"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("fc1").set("linsolver", "i1"); model.sol("sol1").feature("s1").feature().remove("fcDef"); model.sol("sol1").attach("std1"); model.sol("sol1").runAll(); model.result().create("pg1", "PlotGroup3D"); model.result("pg1").label("Magnetic Flux Density Norm (mef)"); model.result("pg1").set("frametype", "spatial"); model.result("pg1").set("showlegendsmaxmin", true); model.result("pg1").set("defaultPlotID", "InterfaceComponents/PlotDefaults/icom6/pdef1/pcond2/pcond1/pg1"); model.result("pg1").feature().create("mslc1", "Multislice"); model.result("pg1").feature("mslc1").set("showsolutionparams", "on"); model.result("pg1").feature("mslc1").set("solutionparams", "parent"); model.result("pg1").feature("mslc1").set("expr", "mef.normB"); model.result("pg1").feature("mslc1").set("multiplanexmethod", "coord"); model.result("pg1").feature("mslc1").set("xcoord", "mef.CPx"); model.result("pg1").feature("mslc1").set("multiplaneymethod", "coord"); model.result("pg1").feature("mslc1").set("ycoord", "mef.CPy"); model.result("pg1").feature("mslc1").set("multiplanezmethod", "coord"); model.result("pg1").feature("mslc1").set("zcoord", "mef.CPz"); model.result("pg1").feature("mslc1").set("colortable", "Prism"); model.result("pg1").feature("mslc1").set("colortabletrans", "nonlinear"); model.result("pg1").feature("mslc1").set("colorcalibration", -0.8); model.result("pg1").feature("mslc1").set("showsolutionparams", "on"); model.result("pg1").feature("mslc1").set("data", "parent"); model.result("pg1").feature().create("strmsl1", "StreamlineMultislice"); model.result("pg1").feature("strmsl1").set("showsolutionparams", "on"); model.result("pg1").feature("strmsl1").set("solutionparams", "parent"); model.result("pg1").feature("strmsl1").set("multiplanexmethod", "coord"); return model; } public static Model run2(Model model) { model.result("pg1").feature("strmsl1").set("xcoord", "mef.CPx"); model.result("pg1").feature("strmsl1").set("multiplaneymethod", "coord"); model.result("pg1").feature("strmsl1").set("ycoord", "mef.CPy"); model.result("pg1").feature("strmsl1").set("multiplanezmethod", "coord"); model.result("pg1").feature("strmsl1").set("zcoord", "mef.CPz"); model.result("pg1").feature("strmsl1").set("titletype", "none"); model.result("pg1").feature("strmsl1").set("posmethod", "uniform"); model.result("pg1").feature("strmsl1").set("udist", 0.02); model.result("pg1").feature("strmsl1").set("maxlen", 0.4); model.result("pg1").feature("strmsl1").set("maxtime", Double.POSITIVE_INFINITY); model.result("pg1").feature("strmsl1").set("inheritcolor", false); model.result("pg1").feature("strmsl1").set("showsolutionparams", "on"); model.result("pg1").feature("strmsl1").set("maxtime", Double.POSITIVE_INFINITY); model.result("pg1").feature("strmsl1").set("showsolutionparams", "on"); model.result("pg1").feature("strmsl1").set("maxtime", Double.POSITIVE_INFINITY); model.result("pg1").feature("strmsl1").set("showsolutionparams", "on"); model.result("pg1").feature("strmsl1").set("maxtime", Double.POSITIVE_INFINITY); model.result("pg1").feature("strmsl1").set("showsolutionparams", "on"); model.result("pg1").feature("strmsl1").set("maxtime", Double.POSITIVE_INFINITY); model.result("pg1").feature("strmsl1").set("data", "parent"); model.result("pg1").feature("strmsl1").set("inheritplot", "mslc1"); model.result("pg1").feature("strmsl1").feature().create("col1", "Color"); model.result("pg1").feature("strmsl1").feature("col1").set("expr", "mef.normB"); model.result("pg1").feature("strmsl1").feature("col1").set("colortable", "PrismDark"); model.result("pg1").feature("strmsl1").feature("col1").set("colorlegend", false); model.result("pg1").feature("strmsl1").feature("col1").set("colortabletrans", "nonlinear"); model.result("pg1").feature("strmsl1").feature("col1").set("colorcalibration", -0.8); model.result("pg1").feature("strmsl1").feature().create("filt1", "Filter"); model.result("pg1").feature("strmsl1").feature("filt1").set("expr", "!isScalingSystemDomain"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Electric Potential (mef)"); model.result("pg2").set("frametype", "spatial"); model.result("pg2").set("showlegendsmaxmin", true); model.result("pg2") .set("defaultPlotID", "InterfaceComponents/PlotDefaults/icom2/pdef1/pcond2/pcond1/pcond1/pg1"); model.result("pg2").feature().create("mslc1", "Multislice"); model.result("pg2").feature("mslc1").set("showsolutionparams", "on"); model.result("pg2").feature("mslc1").set("solutionparams", "parent"); model.result("pg2").feature("mslc1").set("multiplanexmethod", "coord"); model.result("pg2").feature("mslc1").set("xcoord", "mef.CPx"); model.result("pg2").feature("mslc1").set("multiplaneymethod", "coord"); model.result("pg2").feature("mslc1").set("ycoord", "mef.CPy"); model.result("pg2").feature("mslc1").set("multiplanezmethod", "coord"); model.result("pg2").feature("mslc1").set("zcoord", "mef.CPz"); model.result("pg2").feature("mslc1").set("colortable", "Dipole"); model.result("pg2").feature("mslc1").set("showsolutionparams", "on"); model.result("pg2").feature("mslc1").set("data", "parent"); model.result("pg2").feature().create("strmsl1", "StreamlineMultislice"); model.result("pg2").feature("strmsl1").set("showsolutionparams", "on"); model.result("pg2").feature("strmsl1").set("solutionparams", "parent"); model.result("pg2").feature("strmsl1").set("expr", new String[]{"mef.Ex", "mef.Ey", "mef.Ez"}); model.result("pg2").feature("strmsl1").set("multiplanexmethod", "coord"); model.result("pg2").feature("strmsl1").set("xcoord", "mef.CPx"); model.result("pg2").feature("strmsl1").set("multiplaneymethod", "coord"); model.result("pg2").feature("strmsl1").set("ycoord", "mef.CPy"); model.result("pg2").feature("strmsl1").set("multiplanezmethod", "coord"); model.result("pg2").feature("strmsl1").set("zcoord", "mef.CPz"); model.result("pg2").feature("strmsl1").set("titletype", "none"); model.result("pg2").feature("strmsl1").set("posmethod", "uniform"); model.result("pg2").feature("strmsl1").set("udist", 0.02); model.result("pg2").feature("strmsl1").set("maxlen", 0.4); model.result("pg2").feature("strmsl1").set("maxtime", Double.POSITIVE_INFINITY); model.result("pg2").feature("strmsl1").set("inheritcolor", false); model.result("pg2").feature("strmsl1").set("showsolutionparams", "on"); model.result("pg2").feature("strmsl1").set("maxtime", Double.POSITIVE_INFINITY); model.result("pg2").feature("strmsl1").set("showsolutionparams", "on"); model.result("pg2").feature("strmsl1").set("maxtime", Double.POSITIVE_INFINITY); model.result("pg2").feature("strmsl1").set("showsolutionparams", "on"); model.result("pg2").feature("strmsl1").set("maxtime", Double.POSITIVE_INFINITY); model.result("pg2").feature("strmsl1").set("showsolutionparams", "on"); model.result("pg2").feature("strmsl1").set("maxtime", Double.POSITIVE_INFINITY); model.result("pg2").feature("strmsl1").set("data", "parent"); model.result("pg2").feature("strmsl1").set("inheritplot", "mslc1"); model.result("pg2").feature("strmsl1").feature().create("col1", "Color"); model.result("pg2").feature("strmsl1").feature("col1").set("colortable", "DipoleDark"); model.result("pg2").feature("strmsl1").feature("col1").set("colorlegend", false); model.result("pg2").feature("strmsl1").feature().create("filt1", "Filter"); model.result("pg2").feature("strmsl1").feature("filt1").set("expr", "!isScalingSystemDomain"); model.result("pg1").run(); model.component("comp1").geom("geom1").feature("cyl1").set("pos", new String[]{"0", "0", "-.0015"}); model.component("comp1").geom("geom1").run("cyl1"); model.component("comp1").geom("geom1").feature("cyl2").set("pos", new String[]{"0", "0", ".005"}); model.component("comp1").geom("geom1").run("cyl2"); model.component("comp1").geom("geom1").feature("cyl2").set("pos", new String[]{"0", "0", ".0005"}); model.component("comp1").geom("geom1").run("cyl2"); model.component("comp1").geom("geom1").feature("rot1").set("pos", new String[]{"0", "0", ".001"}); model.component("comp1").geom("geom1").run("rot1"); model.component("comp1").geom("geom1").run("cyl3"); model.component("comp1").geom("geom1").feature("cyl3").set("pos", new String[]{".0025", "0", ".001"}); model.component("comp1").geom("geom1").run("cyl3"); model.component("comp1").geom("geom1").run("cyl4"); model.component("comp1").geom("geom1").feature("cyl4").set("h", ".1005"); model.component("comp1").geom("geom1").run("cyl4"); model.component("comp1").geom("geom1").feature("cyl4").set("h", ".105"); model.component("comp1").geom("geom1").run("cyl4"); model.component("comp1").geom("geom1").feature("cyl4").set("h", ".11"); model.component("comp1").geom("geom1").run("cyl4"); model.component("comp1").geom("geom1").feature("cyl4").set("h", ".109"); model.component("comp1").geom("geom1").run("cyl4"); model.component("comp1").geom("geom1").run("uni1"); model.component("comp1").geom("geom1").run("uni2"); model.component("comp1").geom("geom1").run("dif1"); model.component("comp1").geom("geom1").run(); model.component("comp1").mesh("mesh1").run(); model.sol("sol1").study("std1"); model.sol("sol1").feature().remove("s1"); model.sol("sol1").feature().remove("v1"); model.sol("sol1").feature().remove("st1"); model.sol("sol1").create("st1", "StudyStep"); model.sol("sol1").feature("st1").set("study", "std1"); model.sol("sol1").feature("st1").set("studystep", "freq"); model.sol("sol1").create("v1", "Variables"); model.sol("sol1").feature("v1").set("control", "freq"); model.sol("sol1").create("s1", "Stationary"); model.sol("sol1").feature("s1").create("p1", "Parametric"); model.sol("sol1").feature("s1").feature().remove("pDef"); model.sol("sol1").feature("s1").feature("p1").set("pname", new String[]{"freq"}); model.sol("sol1").feature("s1").feature("p1").set("plistarr", new String[]{"100"}); model.sol("sol1").feature("s1").feature("p1").set("punit", new String[]{"MHz"}); model.sol("sol1").feature("s1").feature("p1").set("pcontinuationmode", "no"); model.sol("sol1").feature("s1").feature("p1").set("preusesol", "no"); model.sol("sol1").feature("s1").feature("p1").set("pdistrib", "off"); model.sol("sol1").feature("s1").feature("p1").set("plot", "off"); model.sol("sol1").feature("s1").feature("p1").set("plotgroup", "pg1"); model.sol("sol1").feature("s1").feature("p1").set("probesel", "all"); model.sol("sol1").feature("s1").feature("p1").set("probes", new String[]{}); model.sol("sol1").feature("s1").feature("p1").set("control", "freq"); model.sol("sol1").feature("s1").set("linpmethod", "sol"); model.sol("sol1").feature("s1").set("linpsol", "zero"); model.sol("sol1").feature("s1").set("control", "freq"); model.sol("sol1").feature("s1").create("fc1", "FullyCoupled"); model.sol("sol1").feature("s1").create("i1", "Iterative"); model.sol("sol1").feature("s1").feature("i1").set("linsolver", "fgmres"); model.sol("sol1").feature("s1").feature("i1").set("nlinnormuse", true); model.sol("sol1").feature("s1").feature("i1").set("rhob", 10000); model.sol("sol1").feature("s1").feature("i1").create("mg1", "Multigrid"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("pr").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("po").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").create("kp1", "KrylovPreconditioner"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1") .set("prefuntype", "right"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").set("prefun", "gmres"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1") .set("iterm", "itertol"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").set("iter", "25"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("fc1").set("linsolver", "i1"); model.sol("sol1").feature("s1").feature().remove("fcDef"); model.sol("sol1").attach("std1"); model.sol("sol1").runAll(); model.result("pg1").run(); model.result().create("pg3", "PlotGroup3D"); model.result().move("pg3", 0); model.result("pg3").label("3D Plot, Slice of magnetic field between the plates"); model.result("pg3").create("slc1", "Slice"); model.result("pg3").feature("slc1").set("quickplane", "xy"); model.result("pg3").feature("slc1").set("quickzmethod", "coord"); model.result("pg3").feature("slc1").set("expr", "mef.normB"); model.result("pg3").feature("slc1").set("descr", "Magnetic flux density norm"); model.result("pg3").label("3D Plot, Slice of |B| between the plates"); model.result("pg3").feature("slc1").label("XY Slice of |B| at z=0"); model.result("pg3").run(); model.component("comp1").view("view1").set("transparency", false); model.result("pg3").set("showlegendsmaxmin", true); model.result("pg3").run(); model.result().duplicate("pg4", "pg3"); model.result().move("pg4", 1); model.result("pg4").label("3D Plot, Slice of |E| between the plates at z=0"); model.result("pg4").feature("slc1").label("XY Slice of |E| at z=0"); model.result("pg4").feature("slc1").set("expr", "mef.normE"); model.result("pg4").run(); model.component("comp1").view("view1").set("transparency", false); model.result().create("pg5", "PlotGroup3D"); model.result().move("pg5", 2); model.result("pg5").label("3D Plot Surface Current density (norm)"); model.result("pg5").create("surf1", "Surface"); model.result("pg5").feature("surf1").set("expr", "mef.normJs"); model.result("pg5").feature("surf1").set("descr", "Surface current density norm"); model.result("pg5").run(); model.result("pg5").feature("surf1").create("sel1", "Selection"); model.result("pg5").feature("surf1").feature("sel1").selection() .set(5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19, 20, 22, 24, 25, 26, 27, 28); model.result("pg5").run(); model.component("comp1").view("view1").set("transparency", true); model.result().remove("pg1"); model.result().remove("pg2"); model.result("pg3").run(); model.result().move("pg4", 0); model.result("pg3").label("3D Plot, Slice of |B| between the plates at z=0"); model.result("pg3").run(); model.result("pg4").run(); model.sol("sol1").clearSolutionData(); model.component("comp1").material("mat1").propertyGroup("def") .set("electricconductivity", new String[]{"0[S/m]"}); model.sol("sol1").study("std1"); model.sol("sol1").feature().remove("s1"); model.sol("sol1").feature().remove("v1"); model.sol("sol1").feature().remove("st1"); model.sol("sol1").create("st1", "StudyStep"); model.sol("sol1").feature("st1").set("study", "std1"); model.sol("sol1").feature("st1").set("studystep", "freq"); model.sol("sol1").create("v1", "Variables"); model.sol("sol1").feature("v1").set("control", "freq"); model.sol("sol1").create("s1", "Stationary"); model.sol("sol1").feature("s1").create("p1", "Parametric"); model.sol("sol1").feature("s1").feature().remove("pDef"); model.sol("sol1").feature("s1").feature("p1").set("pname", new String[]{"freq"}); model.sol("sol1").feature("s1").feature("p1").set("plistarr", new String[]{"100"}); model.sol("sol1").feature("s1").feature("p1").set("punit", new String[]{"MHz"}); model.sol("sol1").feature("s1").feature("p1").set("pcontinuationmode", "no"); model.sol("sol1").feature("s1").feature("p1").set("preusesol", "no"); model.sol("sol1").feature("s1").feature("p1").set("pdistrib", "off"); model.sol("sol1").feature("s1").feature("p1").set("plot", "off"); model.sol("sol1").feature("s1").feature("p1").set("plotgroup", "pg3"); model.sol("sol1").feature("s1").feature("p1").set("probesel", "all"); model.sol("sol1").feature("s1").feature("p1").set("probes", new String[]{}); model.sol("sol1").feature("s1").feature("p1").set("control", "freq"); model.sol("sol1").feature("s1").set("linpmethod", "sol"); model.sol("sol1").feature("s1").set("linpsol", "zero"); model.sol("sol1").feature("s1").set("control", "freq"); model.sol("sol1").feature("s1").create("fc1", "FullyCoupled"); model.sol("sol1").feature("s1").create("i1", "Iterative"); model.sol("sol1").feature("s1").feature("i1").set("linsolver", "fgmres"); model.sol("sol1").feature("s1").feature("i1").set("nlinnormuse", true); model.sol("sol1").feature("s1").feature("i1").set("rhob", 10000); model.sol("sol1").feature("s1").feature("i1").create("mg1", "Multigrid"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("pr").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("po").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").create("kp1", "KrylovPreconditioner"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1") .set("prefuntype", "right"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").set("prefun", "gmres"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1") .set("iterm", "itertol"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").set("iter", "25"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("fc1").set("linsolver", "i1"); model.sol("sol1").feature("s1").feature().remove("fcDef"); model.sol("sol1").attach("std1"); model.sol("sol1").runAll(); model.result("pg4").run(); model.result("pg3").run(); model.result("pg5").run(); model.result("pg4").run(); model.sol("sol1").clearSolutionData(); model.label("example_tiltedplates_offsetfed_100MHz.mph"); model.mesh().clearMeshes(); model.label("example_tiltedplates_offsetfed_100MHz.mph"); model.result().create("pg6", "PlotGroup3D"); model.result("pg6").label("3D Plot Mag field arrows on a slice between the plates"); model.result("pg6").create("arwv1", "ArrowVolume"); model.result("pg6").feature("arwv1").set("arrowzmethod", "coord"); model.result("pg6").feature("arwv1").set("zcoord", 0); model.result("pg6").feature("arwv1").set("xnumber", 15); model.result("pg6").feature("arwv1").set("ynumber", 15); model.result("pg6").run(); model.sol("sol1").study("std1"); model.sol("sol1").feature().remove("s1"); model.sol("sol1").feature().remove("v1"); model.sol("sol1").feature().remove("st1"); model.sol("sol1").create("st1", "StudyStep"); model.sol("sol1").feature("st1").set("study", "std1"); model.sol("sol1").feature("st1").set("studystep", "freq"); model.sol("sol1").create("v1", "Variables"); model.sol("sol1").feature("v1").set("control", "freq"); model.sol("sol1").create("s1", "Stationary"); model.sol("sol1").feature("s1").create("p1", "Parametric"); model.sol("sol1").feature("s1").feature().remove("pDef"); model.sol("sol1").feature("s1").feature("p1").set("pname", new String[]{"freq"}); model.sol("sol1").feature("s1").feature("p1").set("plistarr", new String[]{"100"}); model.sol("sol1").feature("s1").feature("p1").set("punit", new String[]{"MHz"}); model.sol("sol1").feature("s1").feature("p1").set("pcontinuationmode", "no"); model.sol("sol1").feature("s1").feature("p1").set("preusesol", "no"); model.sol("sol1").feature("s1").feature("p1").set("pdistrib", "off"); model.sol("sol1").feature("s1").feature("p1").set("plot", "off"); model.sol("sol1").feature("s1").feature("p1").set("plotgroup", "pg3"); model.sol("sol1").feature("s1").feature("p1").set("probesel", "all"); model.sol("sol1").feature("s1").feature("p1").set("probes", new String[]{}); model.sol("sol1").feature("s1").feature("p1").set("control", "freq"); model.sol("sol1").feature("s1").set("linpmethod", "sol"); model.sol("sol1").feature("s1").set("linpsol", "zero"); model.sol("sol1").feature("s1").set("control", "freq"); model.sol("sol1").feature("s1").create("fc1", "FullyCoupled"); model.sol("sol1").feature("s1").create("i1", "Iterative"); model.sol("sol1").feature("s1").feature("i1").set("linsolver", "fgmres"); model.sol("sol1").feature("s1").feature("i1").set("nlinnormuse", true); model.sol("sol1").feature("s1").feature("i1").set("rhob", 10000); model.sol("sol1").feature("s1").feature("i1").create("mg1", "Multigrid"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("pr").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("po").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").create("kp1", "KrylovPreconditioner"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1") .set("prefuntype", "right"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").set("prefun", "gmres"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1") .set("iterm", "itertol"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").set("iter", "25"); model.sol("sol1").feature("s1").feature("i1").feature("mg1").feature("cs").feature("kp1").create("so1", "SOR"); model.sol("sol1").feature("s1").feature("fc1").set("linsolver", "i1"); model.sol("sol1").feature("s1").feature().remove("fcDef"); model.sol("sol1").attach("std1"); model.sol("sol1").runAll(); model.result("pg6").run(); model.result().export().create("anim1", "Animation"); model.result().export("anim1").set("target", "player"); model.result().export("anim1").set("fontsize", "18"); model.result().export("anim1").set("colortheme", "globaltheme"); model.result().export("anim1").set("customcolor", new double[]{1, 1, 1}); model.result().export("anim1").set("background", "color"); model.result().export("anim1").set("gltfincludelines", "on"); model.result().export("anim1").set("title1d", "on"); model.result().export("anim1").set("legend1d", "on"); model.result().export("anim1").set("logo1d", "off"); model.result().export("anim1").set("options1d", "on"); model.result().export("anim1").set("title2d", "on"); model.result().export("anim1").set("legend2d", "on"); model.result().export("anim1").set("logo2d", "on"); model.result().export("anim1").set("options2d", "off"); model.result().export("anim1").set("title3d", "on"); model.result().export("anim1").set("legend3d", "on"); model.result().export("anim1").set("logo3d", "off"); model.result().export("anim1").set("options3d", "off"); model.result().export("anim1").set("axisorientation", "on"); model.result().export("anim1").set("grid", "off"); model.result().export("anim1").set("axes1d", "on"); model.result().export("anim1").set("axes2d", "on"); model.result().export("anim1").set("showgrid", "on"); model.result().export("anim1").set("plotgroup", "pg6"); model.result().export("anim1").set("sweeptype", "dde"); model.result().export("anim1").set("maxframes", 21); model.result().export("anim1").set("repeat", "forever"); model.result().export("anim1").set("stopped", true); model.result().export("anim1").run(); model.result().export("anim1").set("target", "file"); model.result().export("anim1").set("size", "current"); model.result().export("anim1").set("options3d", true); model.result().export("anim1").set("grid", true); model.result().export("anim1").set("fontsize", 12); model.result().export("anim1").set("giffilename", "C:\\Users\\rkoslover\\Desktop\\example.gif"); model.result().export("anim1").run(); model.sol("sol1").clearSolutionData(); model.mesh().clearMeshes(); model.label("example_tiltedplates_offsetfed_100MHz.mph"); return model; } public static void main(String[] args) { Model model = run(); run2(model); } }