/* * SlittedSheathAxiSymm.java */ import com.comsol.model.*; import com.comsol.model.util.*; /** Model exported on Jul 25 2018, 13:54 by COMSOL 5.3.0.260. */ public class SlittedSheathAxiSymm { public static Model run() { Model model = ModelUtil.create("Model"); model.modelPath("C:\\Users\\Irwin_Lab\\Desktop\\Henry\\COMSOL Applications"); model.comments("Untitled\n\n"); model.component().create("comp1", true); model.component("comp1").geom().create("geom1", 2); model.component("comp1").geom("geom1").axisymmetric(true); model.component("comp1").mesh().create("mesh1"); model.component("comp1").physics().create("mf", "InductionCurrents", "geom1"); model.study().create("std1"); model.study("std1").create("time", "Transient"); model.study("std1").feature("time").activate("mf", true); model.component().create("comp2", true); model.component("comp2").geom().create("geom2", 3); model.component("comp2").mesh().create("mesh2"); model.component("comp2").geom("geom2").create("imp1", "Import"); model.component("comp2").geom("geom2").feature("imp1") .set("filename", "C:\\Users\\Irwin_Lab\\Desktop\\Henry\\CAD\\SheathAssm\\SheathAssm.SLDASM"); model.component("comp2").geom("geom2").feature("imp1").importData(); model.component("comp2").geom("geom2").run("imp1"); model.component("comp2").geom("geom2").feature().create("wp1", "WorkPlane"); model.component("comp2").geom("geom2").feature("wp1").set("unite", true); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp1").set("quickplane", "yz"); model.component("comp2").geom("geom2").feature("wp1").set("quickx", ".03"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp1").set("quickx", ".025"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp1").set("quickx", ".02"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp1").set("quickx", ".03"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp1").set("quickx", ".019"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp1").set("quickx", ".018"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp1").set("quickx", ".019"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp1").set("quickx", ".0185"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").run("wp1"); model.component("comp2").geom("geom2").create("pard1", "PartitionDomains"); model.component("comp2").geom("geom2").feature("pard1").selection("domain") .set("imp1.SheathAssmSheathSolidCap1SheathSolidCap", new int[]{1}); model.component("comp2").geom("geom2").feature("pard1").selection("domain") .set("imp1.SheathAssmSheathInnerCylinder1SheathInnerCylinder", new int[]{1}); model.component("comp2").geom("geom2").feature("pard1").selection("domain") .set("imp1.SheathAssmSheathOuterCylinder1SheathOuterCylinder", new int[]{1}); model.component("comp2").geom("geom2").feature("pard1").selection("domain") .set("imp1.SheathAssmSheathSlittedCap1SheathSlittedCap(2)", new int[]{1}); model.component("comp2").geom("geom2").feature("pard1").selection("domain") .set("imp1.SheathAssmSheathSlittedCap1SheathSlittedCap(1)", new int[]{1}); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature().create("del1", "Delete"); model.component("comp2").geom("geom2").feature("del1").selection("input").init(3); model.component("comp2").geom("geom2").feature("del1").selection("input").set("pard1(1)", new int[]{2}); model.component("comp2").geom("geom2").feature("del1").selection("input").set("pard1(2)", new int[]{2}); model.component("comp2").geom("geom2").feature("del1").selection("input").set("pard1(3)", new int[]{2}); model.component("comp2").geom("geom2").feature("del1").selection("input").set("pard1(4)", new int[]{2}); model.component("comp2").geom("geom2").feature("del1").selection("input").set("pard1(5)", new int[]{2}); model.component("comp2").geom("geom2").run("del1"); model.component("comp2").geom("geom2").run("del1"); model.component("comp2").geom("geom2").feature().create("wp2", "WorkPlane"); model.component("comp2").geom("geom2").feature("wp2").set("unite", true); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp2").set("quickz", ".23"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp2").set("quickz", ".225"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp2").set("quickz", ".235"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp2").geom("geom2").feature("wp2").set("quickz", ".2325"); model.component("comp2").geom("geom2").runPre("fin"); model.component("comp1").geom("geom1").create("cro1", "CrossSection"); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").run("cro1"); model.component("comp1").geom("geom1").create("mov1", "Move"); model.component("comp1").geom("geom1").feature("mov1").selection("input").init(); model.component("comp1").geom("geom1").feature("mov1").selection("input") .set(new String[]{"cro1.del1(1)", "cro1.del1(2)", "cro1.del1(3)", "cro1.del1(4)", "cro1.del1(5)"}); model.component("comp1").geom("geom1").feature("mov1").set("displx", ".025"); model.component("comp1").geom("geom1").feature("mov1").set("disply", "-.01"); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").feature("mov1").set("disply", "-.1"); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").feature("mov1").set("disply", "-.02"); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").feature("mov1").set("displx", ".03"); model.component("comp1").geom("geom1").runPre("fin"); model.component("comp1").geom("geom1").run("mov1"); model.component("comp1").geom("geom1").create("r1", "Rectangle"); model.component("comp1").geom("geom1").feature("r1").set("type", "solid"); model.component("comp1").geom("geom1").feature("r1").set("base", "corner"); model.component("comp1").geom("geom1").feature("r1").set("pos", new String[]{"0", "-0.12"}); model.component("comp1").geom("geom1").feature("r1").set("size", new String[]{"0.05", "0.24"}); model.component("comp1").geom("geom1").run("r1"); model.component("comp1").geom("geom1").run(); model.component("comp1").physics("mf").create("coil1", "Coil", 2); model.component("comp1").physics("mf").feature("coil1").selection().set(new int[]{1, 2, 3, 4, 5, 6}); model.component("comp1").physics("mf").feature().remove("coil1"); model.component("comp1").physics("mf").create("ecd1", "ExternalCurrentDensity", 2); model.component("comp1").physics("mf").feature("ecd1").selection().set(new int[]{1, 2, 3, 4, 5, 6}); model.component("comp1").physics("mf").feature("ecd1").set("Je", new String[]{"0", "0", "cos(t[1/s])"}); model.component("comp1").physics("mf").prop("components").set("components", "threecomponent"); model.component("comp1").geom("geom1").run("r1"); model.component("comp1").geom("geom1").create("sca1", "Scale"); model.component("comp1").geom("geom1").feature("sca1").selection("input").set(new String[]{"mov1"}); model.component("comp1").geom("geom1").feature("sca1").set("pos", new String[]{".02325", "0"}); model.component("comp1").geom("geom1").feature("sca1").set("isotropic", "scale"); model.param().set("scale", "1"); model.param().descr("scale", "Scaling for sheath"); model.param().set("scale", ".5"); model.component("comp1").geom("geom1").run("fin"); model.component("comp1").geom("geom1").feature("sca1").set("type", "anisotropic"); model.component("comp1").geom("geom1").feature("sca1").set("anisotropic", new String[]{"scale", "1"}); model.component("comp1").geom("geom1").runPre("fin"); model.param().set("scale", "1"); model.component("comp1").geom("geom1").runPre("fin"); model.study("std1").feature("time").set("tlist", "range(0,0.1,3.2)"); model.component("comp1").geom("geom1").run(); model.component("comp1").mesh("mesh1").autoMeshSize(9); model.component("comp1").mesh("mesh1").run(); model.param().set("scale", ".1"); model.component("comp1").geom("geom1").run("fin"); model.component("comp1").mesh("mesh1").run(); model.param().set("scale", "1"); model.study("std1").create("param", "Parametric"); model.study("std1").feature("param").setIndex("pname", "scale", 0); model.study("std1").feature("param").setIndex("plistarr", "", 0); model.study("std1").feature("param").setIndex("punit", "", 0); model.study("std1").feature("param").setIndex("pname", "scale", 0); model.study("std1").feature("param").setIndex("plistarr", "", 0); model.study("std1").feature("param").setIndex("punit", "", 0); model.study("std1").feature("param").setIndex("plistarr", "range(1,-0.1,0.1)", 0); model.component("comp1").geom("geom1").run("fin"); model.component("comp1").probe().create("dom1", "Domain"); model.component("comp1").geom("geom1").run("fin"); model.component("comp1").geom("geom1").create("r2", "Rectangle"); model.component("comp1").geom("geom1").feature("r2").set("type", "solid"); model.component("comp1").geom("geom1").feature("r2").set("base", "corner"); model.component("comp1").geom("geom1").feature("r2") .set("pos", new String[]{"0.010524223592288", "-0.097328864657191"}); model.component("comp1").geom("geom1").feature("r2").set("size", new String[]{"0.025400291676316", "0.193675"}); model.component("comp1").geom("geom1").run("r2"); model.component("comp1").geom("geom1").run(); model.component("comp1").probe("dom1").label("MagFluxProbe"); model.component("comp1").probe("dom1").set("type", "integral"); model.component("comp1").probe("dom1").selection().set(new int[]{2, 3, 4, 5, 6, 7, 8, 9, 10, 11}); model.component("comp1").probe().create("dom2", "Domain"); model.component("comp1").probe("dom2").selection().set(new int[]{2, 3, 5, 6, 7, 8, 9, 10, 11}); model.component("comp1").probe("dom2").set("expr", "mf.normJ"); model.component("comp1").probe("dom2").set("type", "integral"); model.component("comp1").probe("dom2").label("Current Probe"); model.study("std1").feature("param").set("useaccumtable", true); model.component("comp1").material().create("mat1", "Common"); model.component("comp1").material("mat1").label("Air"); model.component("comp1").material("mat1").set("family", "air"); model.component("comp1").material("mat1").propertyGroup("def").set("relpermeability", "1"); model.component("comp1").material("mat1").propertyGroup("def").set("relpermittivity", "1"); model.component("comp1").material("mat1").propertyGroup("def").set("dynamicviscosity", "eta(T[1/K])[Pa*s]"); model.component("comp1").material("mat1").propertyGroup("def").set("ratioofspecificheat", "1.4"); model.component("comp1").material("mat1").propertyGroup("def").set("electricconductivity", "0[S/m]"); model.component("comp1").material("mat1").propertyGroup("def").set("heatcapacity", "Cp(T[1/K])[J/(kg*K)]"); model.component("comp1").material("mat1").propertyGroup("def").set("density", "rho(pA[1/Pa],T[1/K])[kg/m^3]"); model.component("comp1").material("mat1").propertyGroup("def").set("thermalconductivity", "k(T[1/K])[W/(m*K)]"); model.component("comp1").material("mat1").propertyGroup("def").set("soundspeed", "cs(T[1/K])[m/s]"); model.component("comp1").material("mat1").propertyGroup("def").func().create("eta", "Piecewise"); model.component("comp1").material("mat1").propertyGroup("def").func("eta").set("funcname", "eta"); model.component("comp1").material("mat1").propertyGroup("def").func("eta").set("arg", "T"); model.component("comp1").material("mat1").propertyGroup("def").func("eta").set("extrap", "constant"); 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().create("Cp", "Piecewise"); model.component("comp1").material("mat1").propertyGroup("def").func("Cp").set("funcname", "Cp"); model.component("comp1").material("mat1").propertyGroup("def").func("Cp").set("arg", "T"); model.component("comp1").material("mat1").propertyGroup("def").func("Cp").set("extrap", "constant"); 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().create("rho", "Analytic"); model.component("comp1").material("mat1").propertyGroup("def").func("rho").set("funcname", "rho"); 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("expr", "pA*0.02897/8.314/T"); model.component("comp1").material("mat1").propertyGroup("def").func("rho").set("dermethod", "manual"); model.component("comp1").material("mat1").propertyGroup("def").func("rho") .set("argders", new String[][]{{"pA", "d(pA*0.02897/8.314/T,pA)"}, {"T", "d(pA*0.02897/8.314/T,T)"}}); model.component("comp1").material("mat1").propertyGroup("def").func().create("k", "Piecewise"); model.component("comp1").material("mat1").propertyGroup("def").func("k").set("funcname", "k"); model.component("comp1").material("mat1").propertyGroup("def").func("k").set("arg", "T"); model.component("comp1").material("mat1").propertyGroup("def").func("k").set("extrap", "constant"); 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().create("cs", "Analytic"); model.component("comp1").material("mat1").propertyGroup("def").func("cs").set("funcname", "cs"); model.component("comp1").material("mat1").propertyGroup("def").func("cs").set("args", new String[]{"T"}); model.component("comp1").material("mat1").propertyGroup("def").func("cs").set("expr", "sqrt(1.4*287*T)"); model.component("comp1").material("mat1").propertyGroup("def").func("cs").set("dermethod", "manual"); model.component("comp1").material("mat1").propertyGroup("def").func("cs") .set("argders", new String[][]{{"T", "d(sqrt(1.4*287*T),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().create("RefractiveIndex", "Refractive index"); model.component("comp1").material("mat1").propertyGroup("RefractiveIndex").set("n", "1"); model.component("comp1").material("mat1").set("family", "air"); model.component("comp1").material("mat1").selection().set(new int[]{1, 2, 3, 4, 5, 6}); model.component("comp1").material().create("mat2", "Common"); model.component("comp1").material("mat2").selection().set(new int[]{7, 8, 9, 10, 11}); model.component("comp1").material("mat2").propertyGroup("def").set("relpermeability", new String[]{"1"}); model.component("comp1").material("mat2").propertyGroup("def").set("electricconductivity", new String[]{"1e20"}); model.component("comp1").material("mat2").propertyGroup("def").set("relpermittivity", new String[]{"1"}); model.sol().create("sol1"); model.sol("sol1").study("std1"); model.study("std1").feature("time").set("notlistsolnum", 1); model.study("std1").feature("time").set("notsolnum", "1"); model.study("std1").feature("time").set("listsolnum", 1); model.study("std1").feature("time").set("solnum", "1"); model.sol("sol1").create("st1", "StudyStep"); model.sol("sol1").feature("st1").set("study", "std1"); model.sol("sol1").feature("st1").set("studystep", "time"); model.sol("sol1").create("v1", "Variables"); model.sol("sol1").feature("v1").set("control", "time"); model.sol("sol1").create("t1", "Time"); model.sol("sol1").feature("t1").set("tlist", "range(0,0.1,3.2)"); model.sol("sol1").feature("t1").set("plot", "off"); model.sol("sol1").feature("t1").set("plotgroup", "Default"); model.sol("sol1").feature("t1").set("plotfreq", "tout"); model.sol("sol1").feature("t1").set("probesel", "all"); model.sol("sol1").feature("t1").set("probes", new String[]{"dom1", "dom2"}); model.sol("sol1").feature("t1").set("probefreq", "tsteps"); model.sol("sol1").feature("t1").set("atolglobalvaluemethod", "factor"); model.sol("sol1").feature("t1").set("control", "time"); model.sol("sol1").feature("t1").create("fc1", "FullyCoupled"); model.sol("sol1").feature("t1").feature("fc1").set("linsolver", "dDef"); model.sol("sol1").feature("t1").feature().remove("fcDef"); model.sol("sol1").attach("std1"); model.batch().create("p1", "Parametric"); model.batch("p1").study("std1"); model.result().table().create("tbl1", "Table"); model.result().table("tbl1").label("Accumulated Probe Table 1"); model.study("std1").feature("param").set("accumtable", "tbl1"); model.result().table("tbl1").set("probetag", "std1/param"); model.batch("p1").create("so1", "Solutionseq"); model.batch("p1").feature("so1").set("seq", "sol1"); model.batch("p1").feature("so1").set("store", "on"); model.batch("p1").feature("so1").set("clear", "on"); model.batch("p1").feature("so1").set("psol", "none"); model.batch("p1").set("pname", new String[]{"scale"}); model.batch("p1").set("plistarr", new String[]{"range(1,-0.1,0.1)"}); model.batch("p1").set("sweeptype", "sparse"); model.batch("p1").set("probesel", "all"); model.batch("p1").set("probes", new String[]{"dom1", "dom2"}); model.batch("p1").set("plot", "off"); model.batch("p1").set("err", "on"); model.batch("p1").attach("std1"); model.batch("p1").set("control", "param"); model.sol().create("sol2"); model.sol("sol2").study("std1"); model.sol("sol2").label("Parametric Solutions 1"); model.batch("p1").feature("so1").set("psol", "sol2"); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("data", "dset2"); model.result("pg1").set("outertype", "none"); model.result("pg1").set("data", "dset2"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset().create("rev1", "Revolve2D"); model.result().dataset("rev1").set("data", "dset2"); model.result().dataset("rev1").set("startangle", -90); model.result().dataset("rev1").set("revangle", 225); model.result().dataset("rev1").set("data", "dset2"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.component("comp1").probe("dom1").genResult("none"); model.component("comp1").probe("dom2").genResult("none"); model.result().remove("pg2"); model.result().remove("pg1"); model.result().remove("pg3"); model.result().numerical().remove("pev1"); model.result().numerical().remove("pev2"); model.sol("sol1").feature("t1").set("tstepsbdf", "intermediate"); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("solvertype", "none"); model.result("pg1").set("data", "dset1"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("solvertype", "none"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset().create("rev2", "Revolve2D"); model.result().dataset("rev2").set("startangle", -90); model.result().dataset("rev2").set("revangle", 225); model.result().dataset("rev2").set("data", "dset1"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("data", "rev2"); model.result("pg2").set("showlooplevel", new String[]{"off", "off", "off"}); model.result("pg2").set("data", "rev2"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.component("comp1").probe("dom1").genResult("none"); model.component("comp1").probe("dom2").genResult("none"); model.result().remove("pg2"); model.result().remove("pg1"); model.result().remove("pg3"); model.result().numerical().remove("pev1"); model.result().numerical().remove("pev2"); model.component("comp1").material("mat1").propertyGroup("def") .set("electricconductivity", new String[]{"1e-3[S/m]"}); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("data", "dset2"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset("rev1").set("data", "dset2"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.component("comp1").probe("dom1").genResult("none"); model.component("comp1").probe("dom2").genResult("none"); model.result().remove("pg2"); model.result().remove("pg1"); model.result().numerical().remove("pev1"); model.result().numerical().remove("pev2"); model.component("comp1").probe().remove("dom1"); model.component("comp1").probe().remove("dom2"); model.result().numerical().create("int1", "IntSurface"); model.result().numerical("int1").set("expr", new String[]{"mf.normB"}); model.result().numerical("int1").set("descr", new String[]{"Magnetic flux density norm"}); model.result().numerical("int1").set("unit", new String[]{"Wb"}); model.result().numerical("int1").selection().set(new int[]{4, 7, 8, 9, 10, 11}); model.result().numerical("int1").label("MagFluxNorm"); model.result().numerical().create("int2", "IntSurface"); model.result().numerical("int2").selection().set(new int[]{7, 8, 9, 10, 11}); model.result().numerical("int2").set("expr", new String[]{"mf.normJ"}); model.result().numerical("int2").set("descr", new String[]{"Current density norm"}); model.result().numerical("int2").set("unit", new String[]{"A"}); model.result().numerical("int2").label("Current"); model.study("std1").feature("param").set("useaccumtable", false); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("data", "dset2"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset("rev1").set("data", "dset2"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.result().remove("pg2"); model.study("std1").feature("param").active(false); model.batch().remove("p1"); model.sol().remove("sol1"); model.sol().remove("sol2"); model.study("std1").feature().remove("param"); model.sol().create("sol1"); model.sol("sol1").study("std1"); model.study("std1").feature("time").set("notlistsolnum", 1); model.study("std1").feature("time").set("notsolnum", "1"); model.study("std1").feature("time").set("listsolnum", 1); model.study("std1").feature("time").set("solnum", "1"); model.sol("sol1").create("st1", "StudyStep"); model.sol("sol1").feature("st1").set("study", "std1"); model.sol("sol1").feature("st1").set("studystep", "time"); model.sol("sol1").create("v1", "Variables"); model.sol("sol1").feature("v1").set("control", "time"); model.sol("sol1").create("t1", "Time"); model.sol("sol1").feature("t1").set("tlist", "range(0,0.1,3.2)"); model.sol("sol1").feature("t1").set("plot", "off"); model.sol("sol1").feature("t1").set("plotgroup", "Default"); model.sol("sol1").feature("t1").set("plotfreq", "tout"); model.sol("sol1").feature("t1").set("probesel", "all"); model.sol("sol1").feature("t1").set("probes", new String[]{}); model.sol("sol1").feature("t1").set("probefreq", "tsteps"); model.sol("sol1").feature("t1").set("atolglobalvaluemethod", "factor"); model.sol("sol1").feature("t1").set("control", "time"); model.sol("sol1").feature("t1").create("fc1", "FullyCoupled"); model.sol("sol1").feature("t1").feature("fc1").set("linsolver", "dDef"); model.sol("sol1").feature("t1").feature().remove("fcDef"); model.sol("sol1").attach("std1"); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("data", "dset1"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset().create("rev1", "Revolve2D"); model.result().dataset("rev1").set("startangle", -90); model.result().dataset("rev1").set("revangle", 225); model.result().dataset("rev1").set("data", "dset1"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.result().remove("pg2"); model.result().remove("pg1"); model.component("comp1").mesh("mesh1").autoMeshSize(5); model.component("comp1").mesh("mesh1").run(); model.sol("sol1").study("std1"); model.study("std1").feature("time").set("notlistsolnum", 1); model.study("std1").feature("time").set("notsolnum", "1"); model.study("std1").feature("time").set("listsolnum", 1); model.study("std1").feature("time").set("solnum", "1"); model.sol("sol1").feature().remove("t1"); 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", "time"); model.sol("sol1").create("v1", "Variables"); model.sol("sol1").feature("v1").set("control", "time"); model.sol("sol1").create("t1", "Time"); model.sol("sol1").feature("t1").set("tlist", "range(0,0.1,3.2)"); model.sol("sol1").feature("t1").set("plot", "off"); model.sol("sol1").feature("t1").set("plotgroup", "Default"); model.sol("sol1").feature("t1").set("plotfreq", "tout"); model.sol("sol1").feature("t1").set("probesel", "all"); model.sol("sol1").feature("t1").set("probes", new String[]{}); model.sol("sol1").feature("t1").set("probefreq", "tsteps"); model.sol("sol1").feature("t1").set("atolglobalvaluemethod", "factor"); model.sol("sol1").feature("t1").set("control", "time"); model.sol("sol1").feature("t1").create("fc1", "FullyCoupled"); model.sol("sol1").feature("t1").feature("fc1").set("linsolver", "dDef"); model.sol("sol1").feature("t1").feature().remove("fcDef"); model.sol("sol1").attach("std1"); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("solvertype", "none"); model.result("pg1").set("data", "dset1"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("solvertype", "none"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset("rev1").set("data", "dset1"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("showlooplevel", new String[]{"off", "off", "off"}); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.result().remove("pg2"); model.result().remove("pg1"); model.sol("sol1").feature("t1").set("tstepsbdf", "intermediate"); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("solvertype", "none"); model.result("pg1").set("data", "dset1"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("solvertype", "none"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset("rev1").set("data", "dset1"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("showlooplevel", new String[]{"off", "off", "off"}); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.result().remove("pg2"); model.result().remove("pg1"); model.sol("sol1").feature("t1").feature("fc1").set("jtech", "onevery"); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("solvertype", "none"); model.result("pg1").set("data", "dset1"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("solvertype", "none"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset("rev1").set("data", "dset1"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("showlooplevel", new String[]{"off", "off", "off"}); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); return model; } public static Model run2(Model model) { model.result().remove("pg2"); model.result().remove("pg1"); model.sol("sol1").feature("t1").set("tstepsbdf", "strict"); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("solvertype", "none"); model.result("pg1").set("data", "dset1"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("solvertype", "none"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset("rev1").set("data", "dset1"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("showlooplevel", new String[]{"off", "off", "off"}); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.result().remove("pg2"); model.result().remove("pg1"); model.sol("sol1").feature("t1").set("tstepsbdf", "intermediate"); model.sol("sol1").feature("t1").set("eventtol", 1); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("solvertype", "none"); model.result("pg1").set("data", "dset1"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("solvertype", "none"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset("rev1").set("data", "dset1"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("showlooplevel", new String[]{"off", "off", "off"}); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.result().remove("pg2"); model.result().remove("pg1"); model.sol("sol1").feature("t1").set("tstepsbdf", "strict"); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("solvertype", "none"); model.result("pg1").set("data", "dset1"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("solvertype", "none"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset("rev1").set("data", "dset1"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("showlooplevel", new String[]{"off", "off", "off"}); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.result().remove("pg2"); model.result().remove("pg1"); model.sol("sol1").feature("t1").set("tstepsbdf", "manual"); model.sol("sol1").feature("t1").set("timestepbdf", "0.1"); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("solvertype", "none"); model.result("pg1").set("data", "dset1"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("solvertype", "none"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset("rev1").set("data", "dset1"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("showlooplevel", new String[]{"off", "off", "off"}); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.result().remove("pg2"); model.result().remove("pg1"); model.sol("sol1").feature("t1").set("tstepsbdf", "strict"); model.component("comp1").mesh("mesh1").autoMeshSize(1); model.component("comp1").mesh("mesh1").run(); model.result().create("pg1", "PlotGroup2D"); model.result("pg1").label("Magnetic Flux Density Norm (mf)"); model.result("pg1").set("solvertype", "none"); model.result("pg1").set("data", "dset1"); model.result("pg1").feature().create("surf1", "Surface"); model.result("pg1").feature("surf1").set("solvertype", "none"); model.result("pg1").feature("surf1").set("data", "parent"); model.result().dataset("rev1").set("data", "dset1"); model.result().create("pg2", "PlotGroup3D"); model.result("pg2").label("Magnetic Flux Density Norm, Revolved Geometry (mf)"); model.result("pg2").set("showlooplevel", new String[]{"off", "off", "off"}); model.result("pg2").set("data", "rev1"); model.result("pg2").feature().create("surf1", "Surface"); model.result("pg2").feature("surf1").set("data", "parent"); model.result().remove("pg2"); model.result().remove("pg1"); model.mesh().clearMeshes(); model.sol("sol1").clearSolutionData(); model.component("comp1").mesh("mesh1").autoMeshSize(5); model.label("SlittedSheathAxiSymm.mph"); return model; } public static void main(String[] args) { Model model = run(); run2(model); } }