/* * full_tpc.java */ import com.comsol.model.*; import com.comsol.model.util.*; import java.io.*; import java.util.Arrays; import java.util.List; import java.util.ArrayList; import java.util.Vector; import java.util.Stack; import java.text.*; /** Model exported on Nov 10 2012, 19:51 by COMSOL 4.1.0.88. */ public class full_tpc_mb_dev { public static void main(String[] args) { int deformcath=0; int single_force=0; double force = 0.3;//[N] double forceStop =0.3; double forceStep =0.3; int single_degree=0; double degree =-0.3; double DegStop =0.3; double DegStep =0.1; int single=1; Integer shortci=4; //4 in reality Integer shortco=3; //3 in reality double Els; double ElsStart=-200; double ElsEnd=-200; double ElsStep=-1; double Ed=-312.9; double dLs=4.7; double dLsStart=4.7; double dLsStop=5.0; double dLsStep=0.1; Integer nofStr=484; double strShifti=0; double strShifto=0; String name; Els=ElsStart; if (single==0) while(dLs<=dLsStop){ while(Els>=ElsEnd) { name="_86ar85"; run(Ed,Els,shortci,shortco,name,dLs,nofStr,-3458.6,-3528.6,-25940,strShifti,strShifto,0,0,0); // Drift=86%, GEM=85% Els+=ElsStep; } dLs+=dLsStep; Els=ElsStart; } else { //Els=-200.; Els=-341; //Ed=-309.6; //dLs=3.5; dLs=4.7; //nofStr=20; System.out.println("****************SINGLE*********************"); //name="perfect_"; //run(Ed,Els,0,0,name,dLs,nofStr,0,0,0,0,0,1,0,0); //name="bending_"; //run(Ed,Els,shortci,shortco,name,dLs,nofStr,0,0,0,0,0,1,2,0); name=""; String name2; name2=name+"86ar85_Midshort"; run(Ed,Els,shortci,shortco,name2,dLs,nofStr,-3458.6,-3528.6,-25940,strShifti,strShifto,1,0,0); // Drift=86%, GEM=85% //run(Ed,Els,0,0,name2,dLs,nofStr,0,-160,-22547.176,strShifti,strShifto,1,0,0); // perfect //name2=name+"86ar84_"; //run(Ed,Els,shortci,shortco,name2,dLs,nofStr,-3417.97,-3487.97,-25898.9); //Drift=86%, GEM=84% //name2=name+"65ar81_noMidshort";//_shortcountV2"; //run(Ed,Els,shortci,shortco,name2,dLs,nofStr,-3295.88,-3365.73,-20306,0,0,1,0,0); //Drift=65%, GEM=81% (actually 80.6) Pion Beamtime //name2=name+"65ar80_noMidshor";//_shortcountV2"; //run(Ed,Els,shortci,shortco,name2,dLs,nofStr,-3255.2,-3325.05,-20265,0,0,1,0,0); //Drift=65%, GEM=80% (actually 79.6) Pion Beamtime /* for(int scale=60; scale<=90; scale+=2) { name2=name+Integer.toString(scale)+"ar85_"; //System.out.println(name2); //System.out.println(-30162*(double)(scale/100.)); run(Ed,Els,shortci,shortco,name2,dLs,nofStr,-3255.2,-3325.05,-30162*(double)(scale/100.),0,0); } */ } } public static Model run(double E1, double E2, Integer _shorti, Integer _shorto, String addon, double dLsG1, Integer nofStrips, double V1, double V2, double V3, double shi, double sho, int deformcath, double force, double degree) { // Integer nofStrips=10;//479; //Double dLsG1=0.47; String fieldf; //Settings Deformcath double step=0.1;//[mm]s double length=105.0;//[mm] int corr=1050; double high=1.0;//[mm] double width=100.0;//[mm] double AreaMoment=high*Math.pow(width,3)*1/12 ; double Emod=36.0;//[MPa] Vector rValues = new Vector(); Vector zValues = new Vector(); Double zCathode=0.25+0.001+dLsG1+(nofStrips*1.5); Double zCathodedef=0.25+0.001+dLsG1+(nofStrips*1.5)+1; Integer stud=1; int dbgplots=1; int replace_file=1; boolean oneRow=false; double Edrift=E1; double Els=E2; double Vd=Edrift*(nofStrips*0.15); if (V3!=0) Vd=V3; //3.5 mm ls gem distance to strips double Vls=Els*(dLsG1/10.); if (V2!=0) Vls=V2; double Vgem=0; System.out.println("*******************************************"); System.out.println("now doing: Els="+Double.toString(Els)); System.out.println("Ed="+Double.toString(Edrift)); System.out.println("dLs="+Double.toString(dLsG1)); System.out.println("Inner/Outer Shorts:"+Integer.toString(_shorti)+"/"+Integer.toString(_shorto)); System.out.println("Inner/Outer Shift:"+Double.toString(shi)+"/"+Double.toString(sho)); System.out.println("Number of Strips="+Integer.toString(nofStrips)); System.out.println("Force"+Double.toString(force)); System.out.println("*******************************************"); if (V1!=0) { Vgem=V1; Edrift=(Vd-Vgem)/(nofStrips*0.15+dLsG1/10.); Els=(Vls-Vgem)/(dLsG1/10.); System.out.println("************CHANGED FIELDS*****************"); System.out.println("Els="+Double.toString(Els)); System.out.println("Ed="+Double.toString(Edrift)); System.out.println("*******************************************"); } Integer shortsi=_shorti; Integer shortso=_shorto; Integer midshort=1; double Vstepi=0; double Vstepo=0; if (shortsi>0) Vstepi=(Vd-Vls)/((double)nofStrips-((double)shortsi)); else Vstepi=(Vd-Vls)/((double)nofStrips-0.5); if (shortso>0) Vstepo=(Vd-Vls)/( (double)nofStrips-( (double)shortso ) ); else Vstepo=(Vd-Vls)/( (double)nofStrips-0.5 ); //System.out.println(((double)nofStrips-((double)shorts/2.))); // int srow[][]=new int[][]{{1944,1,2428},{3890,1,4374},{4375,3,5827},{6319,3,7771}}; System.out.println("Vstepi:"+Double.toString(Vstepi)); System.out.println("Vstepo:"+Double.toString(Vstepo)); int srow[][]=new int[][]{{1944,1,2428}, {3890,1,4374}, {4375,3,5827}, {6319,3,7771}}; srow[0][0]=4*nofStrips+4; srow[0][1]=1; srow[0][2]=srow[0][0]+nofStrips-1; srow[1][0]=srow[0][2]+3*(nofStrips-1)+4; srow[1][1]=1; srow[1][2]=srow[1][0]+nofStrips-1; if (deformcath==1) { System.out.println("big offset"); srow[2][0]=srow[1][2]+1050+11; } else { System.out.println("no offset"); srow[2][0]=srow[1][2]+11; } srow[2][1]=3; srow[2][2]=srow[2][0]+3*(nofStrips-1); srow[3][0]=srow[2][2]+nofStrips+3; srow[3][1]=3; srow[3][2]=srow[3][0]+3*(nofStrips-1); int srow2[][]=new int[][]{{1944,1,2428}, {3890,1,4374}, {4375,3,5827}, {6319,3,7771}}; srow2[0][0]=3; srow2[0][1]=4; srow2[0][2]=srow2[0][0]+4*(nofStrips-1); srow2[1][0]=srow2[0][2]+1*(nofStrips-1)+6; srow2[1][1]=3; srow2[1][2]=srow2[1][0]+3*(nofStrips-1); if (deformcath==1) { System.out.println("big offset"); srow2[2][0]=srow2[1][2]+1050+13+4*nofStrips; System.out.println("*******"+Double.toString(srow2[2][0])); } else { System.out.println("no offset"); srow2[2][0]=srow2[1][2]+13+4*nofStrips; } srow2[2][1]=1; srow2[2][2]=srow2[2][0]+(nofStrips-1); srow2[3][0]=srow2[2][2]+3*nofStrips+2; srow2[3][1]=2; srow2[3][2]=srow2[3][0]+2*(nofStrips-1); int ngems; int[] ndriftDef=new int[1050]; int value; int stop; int stop2; if (degree != 0.){ value = srow[1][2]+4; stop = srow[1][2]+4; ngems=srow[1][2]+2; } else{ value = srow[1][2]+5; stop = srow[1][2]+5; ngems=srow[1][2]+3; } for (int i= 0; i < 1050; i++) { ndriftDef[i]=value; if (value == stop){ if (degree != 0.){ value+=5; } else{ value+=2; } } if ((degree!=0.) && (value == srow[1][2]+528)){ value+=2; } value+=1; } int ndrift=srow[1][2]+5; Model model = ModelUtil.create("Model"); // model.modelPath("E:/last_strip_studies"); String CathodeBending = "(Bforce*Clength^3)/(6*Emod*AreaMoment)*( (( x -CmaxR)/Clength)^3-3*(( x -CmaxR)/Clength)^2)+Cz"; model.param().set("Els" , Double.toString(Els) +" [V/cm]"); model.param().set("Edrift" , Double.toString(Edrift) +" [V/cm]"); model.param().set("dLsG1" , Double.toString(dLsG1) +" [mm]"); model.param().set("Vls" , Double.toString(Vls) +" [V]"); model.param().set("Vd" , Double.toString(Vd) +" [V]"); model.param().set("Vg" , Double.toString(Vgem) +" [V]"); model.param().set("midshort", Integer.toString(midshort)); model.param().set("shortsi", Integer.toString(shortsi)); model.param().set("shortso", Integer.toString(shortso)); //this setting for number of shortcuts counted on BOTH sides of the stripfoil //model.param().set("Vstepi","(Vd-Vls) / (nofStrips-0.5*shortsi - 0.5*(shortsi==0) )"); //model.param().set("Vstepo","(Vd-Vls) / (nofStrips-0.5*shortso - 0.5*(shortso==0) - midshort)"); //this setting for number of shortcuts on ONE side counted only model.param().set("Vstepi","(Vd-Vls) / (nofStrips-shortsi - 0.5*(shortsi==0) + 0.5*(shortsi>0) )"); model.param().set("Vstepo","(Vd-Vls) / (nofStrips-shortso - 0.5*(shortso==0) + 0.5*(shortso>0) - midshort)"); model.param().set("Bforce", Double.toString(force)+" [N]"); model.param().set("Emod", Double.toString(Emod)+" [MPa]"); model.param().set("AreaMoment",Double.toString(AreaMoment)+" [mm^4]"); model.param().set("nofStrips",Integer.toString(nofStrips)); model.param().set("Cz","0.25[mm]+0.001[mm]+dLsG1+(nofStrips*1.5[mm])"); model.param().set("Clength", "105[mm]+2*( 2e-3 + 1e-3 )"); model.param().set("CmaxR", "155[mm]+ 2e-3 + 1e-3"); model.param().set("CminZ", CathodeBending.replace(" x "," 50[mm] - 2e-3[mm] - 1e-3[mm]")); model.param().set("shi",Double.toString(shi)); model.param().set("sho",Double.toString(sho)); model.param().set("Anode_rot",Double.toString(degree)); model.modelNode().create("mod1"); model.func().create("an1", "Analytic"); model.func("an1") .set("expr", CathodeBending); model.func("an1").set("argunit", "m"); model.func("an1").set("plotargs", new String[][]{{"x", "50[mm]", "155[mm]"}}); System.out.println("starting Geometry"); model.geom().create("geom1", 2); model.geom("geom1").axisymmetric(true); model.geom("geom1").lengthUnit("mm"); model.geom("geom1").feature().create("anode", "Rectangle"); //gem if (deformcath==1) { model.geom("geom1").feature().create("Cathode_p1", "BezierPolygon");//deform cathode } else { model.geom("geom1").feature().create("Cathode", "Rectangle"); //cathode } //gem model.geom("geom1").feature("anode").set("size", new String[]{"105", "1-1e-3"}); double theta = Math.toRadians(degree); double offset=105./2*Math.tan(theta); double pos=-1*Math.abs(offset)-0.5; model.geom("geom1").feature("anode").set("pos", new String[]{"102.5", Double.toString(pos)}); model.geom("geom1").feature("anode").set("base", "center"); model.geom("geom1").feature("anode").set("rot", "Anode_rot"); //cathode double xminB=50 - 2e-3 - 1e-3 - 1e-4; double xmaxB=155 + 2e-3 + 1e-3 + 1e-4; double yminB; double ymaxB; if (deformcath==1) //calculate the values of the bending curve { String[][] CathodePoints=new String[2][4]; CathodePoints[0][0]="50 - 2e-3 - 1e-3"; CathodePoints[1][0]=CathodeBending.replace(" x "," 50[mm] - 2e-3[mm] - 1e-3[mm]"); CathodePoints[0][1]="50 - 2e-3 - 1e-3"; CathodePoints[1][1]="Cz+2e-3[mm]"; CathodePoints[0][2]="155 + 2e-3 + 1e-3"; CathodePoints[1][2]="Cz+2e-3[mm]"; CathodePoints[0][3]="155 + 2e-3 + 1e-3"; CathodePoints[1][3]=CathodeBending.replace(" x "," 155[mm] + 2e-3[mm] + 1e-3[mm]"); model.geom("geom1").feature("Cathode_p1") .set("p",CathodePoints); model.geom("geom1").feature("Cathode_p1") .set("w", new String[]{"1", "1", "1", "1", "1", "1"}); model.geom("geom1").feature("Cathode_p1").set("type", "open"); model.geom("geom1").feature("Cathode_p1") .set("degree", new String[]{"1", "1", "1"}); model.geom("geom1").feature().create("Cathode_p2", "ParametricCurve"); model.geom("geom1").feature("Cathode_p2").set("parmin", "50 - 2e-3 - 1e-3"); model.geom("geom1").feature("Cathode_p2").set("parmax", "155+ 2e-3 + 1e-3"); model.geom("geom1").feature("Cathode_p2").set("pos", new String[]{"0", "0"}); model.geom("geom1").feature("Cathode_p2") .set("coord", new String[]{"s", CathodeBending.replace(" x "," s ")}); model.geom("geom1").feature().create("Cathode", "ConvertToSolid"); model.geom("geom1").feature("Cathode").selection("input") .set(new String[]{"Cathode_p1", "Cathode_p2"}); ymaxB=zCathode; model.param().set("shi","-(Cz-CminZ)"); shi=(force*Math.pow(length,3))/(6*Emod*AreaMoment) * (Math.pow((50)/length,3)-3*(Math.pow((50)/length,2)));//move the inner strips } else { model.geom("geom1").feature("Cathode").set("pos", new String[]{"50", Double.toString(zCathode)}); model.geom("geom1").feature("Cathode").set("size", new String[]{"105", "1"}); yminB=zCathode-0.1; ymaxB=zCathode+0.1; } String fieldf_old="full_field_"+Double.toString(Els)+"_"+Double.toString(Edrift)+"_"+Integer.toString(_shorti)+"s"+Integer.toString(_shorto)+"_"+Double.toString(dLsG1)+"_"+Double.toString(shi)+"sh"+Double.toString(sho)+"_"+Double.toString(force)+"_"+Double.toString(degree)+"_"+addon; fieldf=String.format("full_field_%.2f_%.2f_%ds%d_%.3f_%.3fsh%.3f_%.4f_%s",Els,Edrift,_shorti,_shorto,dLsG1,shi,sho,force,addon); String outpath="/data/fopiroot_data/field_sim/"; File runfile=new File(outpath+"/"+fieldf+".run"); if (replace_file==0) { System.out.println("Checking Fieldfile: "+outpath+fieldf+".txt"); if ( new File(outpath+"/"+fieldf+".txt").isFile() ) { System.out.println("Field already calculated. skipping"); return model; } if ( new File(outpath+"/"+fieldf_old+".txt").isFile() ) { System.out.println("Field already calculated. Skipping"); return model; } if (new File(outpath+"/"+fieldf+".run").isFile()) { System.out.println("Field is calculated at the moment"); return model; } try { runfile.createNewFile(); } catch (IOException e) { System.err.println("Error opening lockfile" + e.getMessage()); return model; } } //other cathode material model.geom("geom1").feature().create("r1", "Rectangle"); model.geom("geom1").feature().create("r2", "Rectangle"); model.geom("geom1").feature().create("r3", "Rectangle"); model.geom("geom1").feature().create("r4", "Rectangle"); model.geom("geom1").feature().create("r5", "Rectangle"); model.geom("geom1").feature().create("r6", "Rectangle"); model.geom("geom1").feature().create("r7", "Rectangle"); model.geom("geom1").feature().create("r8", "Rectangle"); model.geom("geom1").feature("r1").set("size", new String[]{"105 + 2*(2e-3[mm] + 1e-3[mm])", "0.175"}); model.geom("geom1").feature("r1").set("pos", new String[]{"50 - 2e-3 - 1e-3", "Cz+2e-3[mm]"}); model.geom("geom1").feature("r2").name("Rectangle 2a"); model.geom("geom1").feature("r2").set("size", new String[]{"105+ 2*(2e-3[mm] + 1e-3[mm])", "2"}); model.geom("geom1").feature("r2").set("pos", new String[]{"50 - 2e-3 - 1e-3", "Cz+2e-3[mm]+0.175"}); model.geom("geom1").feature("r3").name("Rectangle 3a"); model.geom("geom1").feature("r3").set("size", new String[]{"105+ 2*(2e-3[mm] + 1e-3[mm])", "0.125"}); model.geom("geom1").feature("r3").set("pos", new String[]{"50 - 2e-3 - 1e-3", "Cz+2e-3[mm]+0.175+2"}); model.geom("geom1").feature("r4").name("Rectangle 4a"); model.geom("geom1").feature("r4").set("size", new String[]{"105+ 2*(2e-3[mm] + 1e-3[mm])", "2"}); model.geom("geom1").feature("r4").set("pos", new String[]{"50 - 2e-3 - 1e-3", "Cz+2e-3[mm]+0.175+2+0.125"}); model.geom("geom1").feature("r5").name("Rectangle 5a"); model.geom("geom1").feature("r5").set("size", new String[]{"105+ 2*(2e-3[mm] + 1e-3[mm])", "0.125"}); model.geom("geom1").feature("r5").set("pos", new String[]{"50 - 2e-3 - 1e-3", "Cz+2e-3[mm]+0.175+2+0.125+2"}); model.geom("geom1").feature("r6").name("Rectangle 6a"); model.geom("geom1").feature("r6").set("size", new String[]{"105+ 2*(2e-3[mm] + 1e-3[mm])", "2"}); model.geom("geom1").feature("r6").set("pos", new String[]{"50 - 2e-3 - 1e-3", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125"}); model.geom("geom1").feature("r7").name("Rectangle 7a"); model.geom("geom1").feature("r7").set("size", new String[]{"105+ 2*(2e-3[mm] + 1e-3[mm])", "0.175"}); model.geom("geom1").feature("r7").set("pos", new String[]{"50 - 2e-3 - 1e-3", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2"}); model.geom("geom1").feature("r8").name("Rectangle 8a"); model.geom("geom1").feature("r8").set("size", new String[]{"105+2*(25e-3 + 2e-3 + 3e-3 + 1e-3 + 0.15 + 2 + 0.125 + 2 + 0.15 + 2e-3)", "2e-3"}); model.geom("geom1").feature("r8").set("pos", new String[]{"50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15-2e-3", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175"}); //volume Double zVolume=zCathode+2.; model.geom("geom1").feature().create("gas volume", "Rectangle"); //volume model.geom("geom1").feature("gas volume").set("pos", new String[]{"44", "-3"}); model.geom("geom1").feature("gas volume").set("size", new String[]{"117","Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175+6"}); //strips Double zS1=dLsG1+0.75; model.geom("geom1").feature().create("inner strip", "Rectangle");//inner striprows if(! oneRow) model.geom("geom1").feature().create("outer strip", "Rectangle");//outer striprows model.geom("geom1").feature("inner strip").set("pos", new String[]{"50 - 3e-3", "dLsG1"}); model.geom("geom1").feature("inner strip").set("size", new String[]{"2e-3", "1"}); if(! oneRow) { model.geom("geom1").feature("outer strip").set("pos", new String[]{"50 - 25e-3 - 2e-3 - 3e-3", "dLsG1+0.75"}); model.geom("geom1").feature("outer strip").set("size", new String[]{"2e-3", "1"}); } model.geom("geom1").feature().create("inner striprow", "Array"); if(!oneRow) model.geom("geom1").feature().create("outer striprow", "Array"); model.geom("geom1").feature("inner striprow").set("size", new String[]{"1", "nofStrips"}); model.geom("geom1").feature("inner striprow").set("displ", new String[]{"0", "1.5"}); model.geom("geom1").feature("inner striprow").selection("input").set(new String[]{"inner strip"}); if(!oneRow) { model.geom("geom1").feature("outer striprow").set("size", new String[]{"1", "nofStrips"}); model.geom("geom1").feature("outer striprow").set("displ", new String[]{"0", "1.5"}); model.geom("geom1").feature("outer striprow").selection("input").set(new String[]{"outer strip"}); } model.geom("geom1").feature().create("strip_insulator","Rectangle"); model.geom("geom1").feature("strip_insulator").set("pos", new String[]{"50 - 25e-3 - 2e-3 - 1e-3","dLsG1"}); model.geom("geom1").feature("strip_insulator").set("size", new String[]{"25e-3", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175-dLsG1"}); model.geom("geom1").feature().create("mir1", "Mirror"); model.geom("geom1").feature("mir1").set("keep", true); model.geom("geom1").feature("mir1").set("pos", new String[]{"102.5", "0"}); if(!oneRow) model.geom("geom1").feature("mir1").selection("input").set(new String[]{"inner striprow","outer striprow","strip_insulator"}); else model.geom("geom1").feature("mir1").selection("input").set(new String[]{"inner striprow","strip_insulator"}); model.geom("geom1").feature().create("mov1","Move"); model.geom("geom1").feature("mov1").selection("input").set(new String[]{"mir1"}); model.geom("geom1").feature("mov1").set("disply","sho"); model.geom("geom1").feature().create("mov2","Move"); if(!oneRow) model.geom("geom1").feature("mov2").selection("input").set(new String[]{"inner striprow","outer striprow","strip_insulator"}); else model.geom("geom1").feature("mov2").selection("input").set(new String[]{"inner striprow","strip_insulator"}); model.geom("geom1").feature("mov2").set("disply","shi"); model.geom("geom1").feature().create("first Kapton", "Rectangle"); model.geom("geom1").feature("first Kapton").set("size", new String[]{"0.150", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175+1"}); model.geom("geom1").feature("first Kapton").set("pos", new String[]{"50-25e-3-2e-3-3e-3 - 1e-3 -0.15", "-1"}); model.geom("geom1").feature().create("first Rohazell", "Rectangle"); model.geom("geom1").feature("first Rohazell").set("size", new String[]{"2", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175+1"}); model.geom("geom1").feature("first Rohazell").set("pos", new String[]{"50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2", "-1"}); model.geom("geom1").feature().create("middle Kapton", "Rectangle"); model.geom("geom1").feature("middle Kapton").set("size", new String[]{"0.125", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175+1"}); model.geom("geom1").feature("middle Kapton").set("pos", new String[]{"50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125", "-1"}); model.geom("geom1").feature().create("second Rohazell", "Rectangle"); model.geom("geom1").feature("second Rohazell").set("size", new String[]{"2", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175+1"}); model.geom("geom1").feature("second Rohazell").set("pos", new String[]{"50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2", "-1"}); model.geom("geom1").feature().create("second Kapton", "Rectangle"); model.geom("geom1").feature("second Kapton").set("size", new String[]{"0.15", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175+1"}); model.geom("geom1").feature("second Kapton").set("pos", new String[]{"50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15", "-1"}); model.geom("geom1").feature().create("alu insu", "Rectangle"); model.geom("geom1").feature("alu insu").set("size", new String[]{"2e-3", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175+1"}); model.geom("geom1").feature("alu insu").set("pos", new String[]{"50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15-2e-3", "-1"}); model.geom("geom1").feature().create("mir2", "Mirror"); model.geom("geom1").feature("mir2").set("createselection", true); model.geom("geom1").feature("mir2").set("pos", new String[]{"102.5", "0"}); model.geom("geom1").feature("mir2").set("keep", true); model.geom("geom1").feature("mir2").selection("input").set(new String[]{"first Kapton", "first Rohazell", "middle Kapton", "second Rohazell", "second Kapton", "alu insu"}); double stamp=System.currentTimeMillis(); model.geom("geom1").run(); System.out.println("Run Geometry needed: "+Double.toString((System.currentTimeMillis()-stamp)/1000)+" s"); int scounter=0; double xmin=0; double xmax=0; double ymin=0; double ymax=0; String shift=""; for (int row=0;row<4;row++) { System.out.println("adding selections to row: "+Integer.toString(row)); scounter=1; ymin=-1e-3; ymax=1+1e-3; if (row==0 | row==1) { //2 + first row + kapton scounter=2+nofStrips+1; //1e-3 is box offset to make sure other partis are inside xmin=50-3e-3 -1e-3; xmax=50-1e-3 +1e-3; //ymin+=shi; //ymax+=shi; shift="shi"; if (row==0) { //starts at 2 (1=air) scounter=2; //kapton thickness, other striprow thicknes + box offset xmin+=-25e-3 - 2e-3 - 1e-3; xmax+=-25e-3 + 1e-3; ymin+=0.75; ymax+=0.75; } } if (row==2 | row==3) { //2 + first row + kapton + second row + anode + cathode scounter=2 + nofStrips + 1 + nofStrips + 1 + 1; xmin=155; xmax=155+3e-3 +1e-3; //ymin+=sho; //ymax+=sho; shift="sho"; if(row==3) { //2 + first row + kapton + second row + anode + cathode + third row + kapton scounter=2 + nofStrips + 1 + nofStrips + 1 + 1 + nofStrips + 1; xmin+=25e-3 + 2e-3; xmax+=25e-3 + 2e-3; ymin+=0.75; ymax+=0.75; } } for (int st=0;st<=nofStrips-1;st++) { System.out.print("At strip "+Integer.toString(st)+" of "+Integer.toString(nofStrips-1)+"\r"); if (st>0) { ymin+=1.5; ymax+=1.5; } String sname="r" +Integer.toString(row)+"s"+Integer.toString(st); String selname="sel_"+sname; model.selection().create(selname,"Box"); model.selection(selname).name(selname); model.selection(selname).set("entitydim", "1"); model.selection(selname).set("inputent", "all"); model.selection(selname).set("condition", "inside"); model.selection(selname).set("groupcontang", "off"); model.selection(selname).set("xmin", Double.toString(xmin)); model.selection(selname).set("xmax", Double.toString(xmax)); model.selection(selname).set("ymin", Double.toString(ymin)+"+"+shift+"+dLsG1"); model.selection(selname).set("ymax", Double.toString(ymax)+"+"+shift+"+dLsG1"); //model.geom("geom1").run(selname); scounter++; } System.out.println(""); } //selection Anode String selnameAnod="sel_Anod"; double xminA=102.4; double xmaxA=102.6; double yminA=-0.1+offset; double ymaxA=0.1+offset; model.selection().create(selnameAnod,"Box"); model.selection(selnameAnod).name(selnameAnod); model.selection(selnameAnod).set("entitydim", "1"); model.selection(selnameAnod).set("inputent", "all"); model.selection(selnameAnod).set("condition", "intersects"); model.selection(selnameAnod).set("groupcontang", "off"); model.selection(selnameAnod).set("xmin", Double.toString(xminA)); model.selection(selnameAnod).set("xmax", Double.toString(xmaxA)); model.selection(selnameAnod).set("ymin", Double.toString(yminA)); model.selection(selnameAnod).set("ymax", Double.toString(ymaxA)); //selection bended Cathode String selnameBend="sel_cathode"; model.selection().create(selnameBend,"Box"); model.selection(selnameBend).name(selnameBend); model.selection(selnameBend).set("entitydim", "1"); model.selection(selnameBend).set("inputent", "all"); model.selection(selnameBend).set("condition", "inside"); model.selection(selnameBend).set("groupcontang", "off"); model.selection(selnameBend).set("xmin", Double.toString(xminB)); model.selection(selnameBend).set("xmax", Double.toString(xmaxB)); model.selection(selnameBend).set("ymin", "CminZ-1e-4[mm]"); model.selection(selnameBend).set("ymax", "Cz+1e-4[mm]+2e-3"); String selnameInsu1="sel_insu1"; model.selection().create(selnameInsu1,"Box"); model.selection(selnameInsu1).name(selnameInsu1); model.selection(selnameInsu1).set("entitydim","2"); model.selection(selnameInsu1).set("inputent","all"); model.selection(selnameInsu1).set("condition","intersects"); model.selection(selnameInsu1).set("groupcontang","off"); model.selection(selnameInsu1).set("xmin","49.98"); model.selection(selnameInsu1).set("xmax","49.99"); model.selection(selnameInsu1).set("ymin","CminZ"); model.selection(selnameInsu1).set("ymax","CminZ+0.1[mm]"); String selnameInsu2="sel_insu2"; model.selection().create(selnameInsu2,"Box"); model.selection(selnameInsu2).name(selnameInsu2); model.selection(selnameInsu2).set("entitydim","2"); model.selection(selnameInsu2).set("inputent","all"); model.selection(selnameInsu2).set("condition","intersects"); model.selection(selnameInsu2).set("groupcontang","off"); model.selection(selnameInsu2).set("xmin","155.01"); model.selection(selnameInsu2).set("xmax","155.02"); model.selection(selnameInsu2).set("ymin","CminZ"); model.selection(selnameInsu2).set("ymax","CminZ+0.1[mm]"); model.selection().create("sel_insu3", "Box"); model.selection("sel_insu3").name("Box 3"); model.selection("sel_insu3").set("ymin", "CminZ"); model.selection("sel_insu3") .set("xmin", "50-25e-3-2e-3-3e-3 - 1e-3 -0.075"); model.selection("sel_insu3").set("ymax", "CminZ+0.1[mm]"); model.selection("sel_insu3") .set("xmax", "50-25e-3-2e-3-3e-3 - 1e-3 - 0.07"); model.selection("sel_insu3").name("sel_insu1.2"); model.selection().create("sel_insu4", "Box"); model.selection("sel_insu4").name("Box 4"); model.selection("sel_insu4").set("ymin", "CminZ"); model.selection("sel_insu4") .set("xmin", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125/2"); model.selection("sel_insu4").set("ymax", "CminZ+0.1[mm]"); model.selection("sel_insu4") .set("xmax", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125/2"); model.selection("sel_insu4").name("sel_insu1.2.2"); model.selection().create("sel_insu5", "Box"); model.selection("sel_insu5").name("Box 5"); model.selection("sel_insu5").set("ymin", "CminZ"); model.selection("sel_insu5") .set("xmin", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15/2"); model.selection("sel_insu5").set("ymax", "CminZ+0.1[mm]"); model.selection("sel_insu5") .set("xmax", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15/2"); model.selection("sel_insu5").name("sel_insu1.2.2.2"); model.selection().create("sel_insu6", "Box"); model.selection("sel_insu6").name("Box 6"); model.selection("sel_insu6").set("ymin", "CminZ"); model.selection("sel_insu6").set("xmin", "155.031+0.150/2"); model.selection("sel_insu6").set("ymax", "CminZ+0.1[mm]"); model.selection("sel_insu6").set("xmax", "155.031+0.150/2+0.01"); model.selection("sel_insu6").name("sel_insu1.2.3"); model.selection().create("sel_insu7", "Box"); model.selection("sel_insu7").name("Box 7"); model.selection("sel_insu7").set("ymin", "CminZ"); model.selection("sel_insu7").set("xmin", "155.031+0.15+2+0.125/2"); model.selection("sel_insu7").set("ymax", "CminZ+0.1[mm]"); model.selection("sel_insu7").set("xmax", "155.031+0.15+2+0.125/2"); model.selection("sel_insu7").name("sel_insu1.2.2.3"); model.selection().create("sel_insu8", "Box"); model.selection("sel_insu8").name("Box 8"); model.selection("sel_insu8").set("ymin", "CminZ"); model.selection("sel_insu8").set("xmin", "155.031+0.15+2+0.125+2+0.15/2"); model.selection("sel_insu8").set("ymax", "CminZ+0.1[mm]"); model.selection("sel_insu8").set("xmax", "155.031+0.15+2+0.125+2+0.15/2"); model.selection("sel_insu8").name("sel_insu1.2.2.2.2"); model.selection().create("box1", "Box"); model.selection().create("box2", "Box"); model.selection().create("box3", "Box"); model.selection().create("box4", "Box"); model.selection().create("box5", "Box"); model.selection().create("box6", "Box"); model.selection("box1").name("Box 1"); model.selection("box1").set("ymin", "CminZ"); model.selection("box1") .set("xmin", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2/2"); model.selection("box1").set("ymax", "CminZ+0.1[mm]"); model.selection("box1") .set("xmax", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2/2"); model.selection("box1").name("sel_rohacell"); model.selection("box2").name("Box 2"); model.selection("box2").set("ymin", "CminZ"); model.selection("box2") .set("xmin", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2/2"); model.selection("box2").set("ymax", "CminZ+0.1[mm]"); model.selection("box2") .set("xmax", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2/2"); model.selection("box2").name("sel_rohacell2"); model.selection("box3").name("Box 3"); model.selection("box3").set("ymin", "CminZ"); model.selection("box3").set("xmin", "155.031+0.15+2+0.125+2/2"); model.selection("box3").set("ymax", "CminZ+0.1[mm]"); model.selection("box3").set("xmax", "155.031+0.15+2+0.125+2/2"); model.selection("box3").name("sel_rohacell2.2"); model.selection("box4").name("Box 4"); model.selection("box4").set("ymin", "CminZ"); model.selection("box4").set("xmin", "155.031+0.15+2/2"); model.selection("box4").set("ymax", "CminZ+0.1[mm]"); model.selection("box4").set("xmax", "155.031+0.15+2/2"); model.selection("box4").name("sel_rohacell2.2.2"); model.selection("box5").name("Box 5"); model.selection("box5").set("ymin", "CminZ"); model.selection("box5") .set("xmin", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15-2e-3/2"); model.selection("box5").set("ymax", "CminZ+0.1[mm]"); model.selection("box5") .set("xmax", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15-2e-3/2"); model.selection("box5").name("sel_alu"); model.selection("box6").name("Box 6"); model.selection("box6").set("ymin", "CminZ"); model.selection("box6").set("xmin", "155.031+0.15+2+0.125+2+0.15+2e-3/2"); model.selection("box6").set("ymax", "CminZ+0.1[mm]"); model.selection("box6").set("xmax", "155.031+0.15+2+0.125+2+0.15+2e-3/2"); model.selection("box6").name("sel_alu 1"); model.selection().create("box9", "Box"); model.selection("box9").set("entitydim", "1"); model.selection().create("box10", "Box"); model.selection("box10").set("entitydim", "1"); model.selection("box9").name("Box 9"); model.selection("box9").set("ymin", "0-1-1e-4"); model.selection("box9") .set("xmin", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15-2e-3-1e-4"); model.selection("box9").set("ymax", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175+1e-4"); model.selection("box9").set("condition", "inside"); model.selection("box9") .set("xmax", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15 + 1e-4"); model.selection("box10").name("Box 10"); model.selection("box10").set("ymin", "0-1-1e-4"); model.selection("box10") .set("xmin", "155.031 + 0.15+2+0.125+2+0.15-1e-4"); model.selection("box10").set("ymax", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175+1e-4"); model.selection("box10").set("condition", "inside"); model.selection("box10") .set("xmax", "155.031+0.15+2+0.125+2+0.15+1e-4+2e-3"); //selections for cathode material model.selection().create("cat_kapton1", "Box"); model.selection("cat_kapton1").name("Cathode Kapton 1"); model.selection("cat_kapton1").set("ymin", "Cz + 2e-3[mm]+0.175/2"); model.selection("cat_kapton1").set("xmin", "102"); model.selection("cat_kapton1").set("ymax", "Cz + 2e-3[mm]+0.175/2"); model.selection("cat_kapton1").set("xmax", "103"); model.selection().create("cat_roha1", "Box"); model.selection("cat_roha1").name("cathode Rohazell 1"); model.selection("cat_roha1").set("ymin", "Cz + 2e-3[mm]+0.175+1"); model.selection("cat_roha1").set("xmin", "102"); model.selection("cat_roha1").set("ymax", "Cz + 2e-3[mm]+0.175+1"); model.selection("cat_roha1").set("xmax", "103"); model.selection().create("cat_kapton2", "Box"); model.selection("cat_kapton2").name("Cathode Kapton 2"); model.selection("cat_kapton2").set("ymin", "Cz + 2e-3[mm]+0.175+2+0.125/2"); model.selection("cat_kapton2").set("xmin", "102"); model.selection("cat_kapton2").set("ymax", "Cz + 2e-3[mm]+0.175+2+0.125/2"); model.selection("cat_kapton2").set("xmax", "103"); model.selection().create("cat_roha2", "Box"); model.selection("cat_roha2").name("Cathode Rohazell 2"); model.selection("cat_roha2").set("ymin", "Cz + 2e-3[mm]+0.175+2+0.125+2/2"); model.selection("cat_roha2").set("xmin", "102"); model.selection("cat_roha2").set("ymax", "Cz + 2e-3[mm]+0.175+2+0.125+2/2"); model.selection("cat_roha2").set("xmax", "103"); model.selection().create("cat_kapton3", "Box"); model.selection("cat_kapton3").name("Cathode Kapton3"); model.selection("cat_kapton3") .set("ymin", "Cz + 2e-3[mm]+0.175+2+0.125+2+0.125/2"); model.selection("cat_kapton3").set("xmin", "102"); model.selection("cat_kapton3") .set("ymax", "Cz + 2e-3[mm]+0.175+2+0.125+2+0.125/2"); model.selection("cat_kapton3").set("xmax", "103"); model.selection().create("cat_roha3", "Box"); model.selection("cat_roha3").name("Cathode Rohazell 3"); model.selection("cat_roha3") .set("ymin", "Cz + 2e-3[mm]+0.175+2+0.125+2+0.125+2/2"); model.selection("cat_roha3").set("xmin", "102"); model.selection("cat_roha3") .set("ymax", "Cz + 2e-3[mm]+0.175+2+0.125+2+0.125+2/2"); model.selection("cat_roha3").set("xmax", "103"); model.selection().create("cat_kapton4", "Box"); model.selection("cat_kapton4").name("Cathode Kapton 4"); model.selection("cat_kapton4") .set("ymin", "Cz + 2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175/2"); model.selection("cat_kapton4").set("xmin", "102"); model.selection("cat_kapton4") .set("ymax", "Cz + 2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175/2"); model.selection("cat_kapton4").set("xmax", "103"); model.selection().create("cat_alushield", "Box"); model.selection("cat_alushield").name("Cathode Alushield"); model.selection("cat_alushield") .set("ymin", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175-2e-4"); model.selection("cat_alushield") .set("xmin", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15-2e-3-2e-4"); model.selection("cat_alushield") .set("ymax", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175-1e-4+2e-3+2e-4"); model.selection("cat_alushield").set("condition", "inside"); model.selection("cat_alushield") .set("xmax", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15-2e-3-1e-4+105+2*(25e-3 + 2e-3 + 3e-3 + 1e-3 + 0.15 + 2 + 0.125 + 2 + 0.15 + 2e-3)+2e-4"); model.selection().create("cat_alushieldB", "Box"); model.selection("cat_alushieldB").name("Cath Alushield B"); model.selection("cat_alushieldB").set("condition", "inside"); model.selection("cat_alushieldB").set("entitydim", "1"); model.selection("cat_alushieldB") .set("ymin", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175-2e-4"); model.selection("cat_alushieldB") .set("xmin", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15-2e-3-2e-4"); model.selection("cat_alushieldB") .set("ymax", "Cz+2e-3[mm]+0.175+2+0.125+2+0.125+2+0.175-1e-4+2e-3+2e-4"); model.selection("cat_alushieldB").set("condition", "inside"); model.selection("cat_alushieldB") .set("xmax", "50-25e-3-2e-3-3e-3 - 1e-3 -0.15-2-0.125-2-0.15-2e-3-1e-4+105+2*(25e-3 + 2e-3 + 3e-3 + 1e-3 + 0.15 + 2 + 0.125 + 2 + 0.15 + 2e-3)+2e-4"); String selnameInsu="sel_Insu"; model.selection().create(selnameInsu, "Union"); model.selection(selnameInsu).name("Union Kapton"); model.selection(selnameInsu).set("input", new String[]{selnameInsu1, selnameInsu2,"sel_insu3","sel_insu4","sel_insu5","sel_insu6","sel_insu7","sel_insu8","cat_kapton1","cat_kapton2","cat_kapton3","cat_kapton4"}); model.selection().create("uni1", "Union"); model.selection("uni1") .set("input", new String[]{"box1", "box2", "box3", "box4","cat_roha1","cat_roha2","cat_roha3"}); model.selection("uni1").name("Union rohacell"); model.selection().create("uni2", "Union"); model.selection("uni2").set("input", new String[]{"box5", "box6","cat_alushield"}); model.selection("uni2").name("Union alu"); model.selection().create("uni3", "Union"); model.selection("uni3").set("entitydim", "1"); model.selection("uni3").set("input", new String[]{"box9", "box10","cat_alushieldB"}); model.selection("uni3").name("Union alu 1"); System.out.println("Run Geometry and Selections needed: "+Double.toString((System.currentTimeMillis()-stamp)/1000)+" s"); System.out.println("adding materials"); model.material().create("mat1"); model.material("mat1").name("Copper"); model.material("mat1").set("family", "copper"); model.material("mat1").propertyGroup("def").set("relpermeability", "1"); model.material("mat1").propertyGroup("def") .set("electricconductivity", "5.998e7[S/m]"); model.material("mat1").propertyGroup("def") .set("thermalexpansioncoefficient", "17e-6[1/K]"); model.material("mat1").propertyGroup("def") .set("heatcapacity", "385[J/(kg*K)]"); model.material("mat1").propertyGroup("def").set("relpermittivity", "1e9"); model.material("mat1").propertyGroup("def") .set("density", "8700[kg/m^3]"); model.material("mat1").propertyGroup("def") .set("thermalconductivity", "400[W/(m*K)]"); model.material("mat1").propertyGroup() .create("Enu", "Elastizit\u00e4tsmodul und Poissonzahl"); model.material("mat1").propertyGroup("Enu").set("poissonsratio", "0.35"); model.material("mat1").propertyGroup("Enu") .set("youngsmodulus", "110e9[Pa]"); model.material("mat1").propertyGroup() .create("linzRes", "Linearisierter spezifischer Widerstand"); model.material("mat1").propertyGroup("linzRes") .set("alpha", "0.0039[1/K]"); model.material("mat1").propertyGroup("linzRes") .set("rho0", "1.72e-8[ohm*m]"); model.material("mat1").propertyGroup("linzRes").set("Tref", "298[K]"); model.material("mat1").set("family", "copper"); model.material().create("mat2"); model.material("mat2").name("Air"); model.material("mat2").set("family", "air"); model.material("mat2").propertyGroup("def").set("relpermeability", "1"); model.material("mat2").propertyGroup("def").set("relpermittivity", "1"); model.material("mat2").propertyGroup("def") .set("dynamicviscosity", "eta(T[1/K])[Pa*s]"); model.material("mat2").propertyGroup("def") .set("ratioofspecificheat", "1.4"); model.material("mat2").propertyGroup("def") .set("electricconductivity", "0[S/m]"); model.material("mat2").propertyGroup("def") .set("heatcapacity", "Cp(T[1/K])[J/(kg*K)]"); model.material("mat2").propertyGroup("def") .set("density", "rho(pA[1/Pa],T[1/K])[kg/m^3]"); model.material("mat2").propertyGroup("def") .set("thermalconductivity", "k(T[1/K])[W/(m*K)]"); model.material("mat2").propertyGroup("def") .set("soundspeed", "cs(T[1/K])[m/s]"); model.material("mat2").propertyGroup("def").func() .create("eta", "Piecewise"); model.material("mat2").propertyGroup("def").func("eta") .set("funcname", "eta"); model.material("mat2").propertyGroup("def").func("eta").set("arg", "T"); model.material("mat2").propertyGroup("def").func("eta") .set("extrap", "constant"); model.material("mat2").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.material("mat2").propertyGroup("def").func() .create("Cp", "Piecewise"); model.material("mat2").propertyGroup("def").func("Cp") .set("funcname", "Cp"); model.material("mat2").propertyGroup("def").func("Cp").set("arg", "T"); model.material("mat2").propertyGroup("def").func("Cp") .set("extrap", "constant"); model.material("mat2").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.material("mat2").propertyGroup("def").func() .create("rho", "Analytic"); model.material("mat2").propertyGroup("def").func("rho") .set("funcname", "rho"); model.material("mat2").propertyGroup("def").func("rho") .set("args", new String[]{"pA", "T"}); model.material("mat2").propertyGroup("def").func("rho") .set("expr", "pA*0.02897/8.314/T"); model.material("mat2").propertyGroup("def").func("rho") .set("dermethod", "manual"); model.material("mat2").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.material("mat2").propertyGroup("def").func() .create("k", "Piecewise"); model.material("mat2").propertyGroup("def").func("k") .set("funcname", "k"); model.material("mat2").propertyGroup("def").func("k").set("arg", "T"); model.material("mat2").propertyGroup("def").func("k") .set("extrap", "constant"); model.material("mat2").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.material("mat2").propertyGroup("def").func() .create("cs", "Analytic"); model.material("mat2").propertyGroup("def").func("cs") .set("funcname", "cs"); model.material("mat2").propertyGroup("def").func("cs") .set("args", new String[]{"T"}); model.material("mat2").propertyGroup("def").func("cs") .set("expr", "sqrt(1.4*287*T)"); model.material("mat2").propertyGroup("def").func("cs") .set("dermethod", "manual"); model.material("mat2").propertyGroup("def").func("cs") .set("argders", new String[][]{{"T", "d(sqrt(1.4*287*T),T)"}}); model.material("mat2").propertyGroup("def").addInput("temperature"); model.material("mat2").propertyGroup("def").addInput("pressure"); model.material("mat2").set("family", "air"); model.material().create("mat3"); model.material("mat3").propertyGroup("def").func() .create("k", "Piecewise"); model.material("mat3").propertyGroup("def").func() .create("C", "Piecewise"); model.material("mat3").propertyGroup("def").func() .create("rho", "Piecewise"); model.material("mat3").name("Polyimide tape (Kapton HN) [solid]"); model.material("mat3").propertyGroup("def").func("k") .set("pieces", new String[][]{{"5.0", "140.0", "-0.001372384+0.005601653*T^1+2.082966E-6*T^2-5.05445E-9*T^3"}, {"140.0", "300.0", "-0.007707532+0.005769136*T^1+5.622796E-7*T^2-4.329984E-10*T^3"}}); model.material("mat3").propertyGroup("def").func("k").set("arg", "T"); model.material("mat3").propertyGroup("def").func("C") .set("pieces", new String[][]{{"4.0", "30.0", "2.809666-1.394349*T^1+0.2106639*T^2+0.004752016*T^3-3.279998E-4*T^4+4.282249E-6*T^5"}, {"30.0", "300.0", "-86.86946+7.816917*T^1-0.03664788*T^2+9.9128E-5*T^3-1.08441E-7*T^4"}}); model.material("mat3").propertyGroup("def").func("C").set("arg", "T"); model.material("mat3").propertyGroup("def").func("rho") .set("pieces", new String[][]{{"293.0", "303.0", "1420.0"}}); model.material("mat3").propertyGroup("def").func("rho").set("arg", "T"); model.material("mat3").propertyGroup("def") .set("thermalconductivity", new String[]{"k(T[1/K])[W/(m*K)]", "0", "0", "0", "k(T[1/K])[W/(m*K)]", "0", "0", "0", "k(T[1/K])[W/(m*K)]"}); model.material("mat3").propertyGroup("def") .set("heatcapacity", "C(T[1/K])[J/(kg*K)]"); model.material("mat3").propertyGroup("def") .set("density", "rho(T[1/K])[kg/m^3]"); model.material("mat3").propertyGroup("def") .set("relpermittivity", new String[]{"3.83", "0", "0", "0", "3.83", "0", "0", "0", "3.83"}); model.material("mat3").propertyGroup("def").addInput("temperature"); model.material().create("mat4"); model.material("mat4").selection().named("uni1"); model.material("mat4").name("Rohacell"); model.material("mat4").propertyGroup("def").set("density", "52.1"); model.material("mat4").propertyGroup("def") .set("relpermittivity", new String[]{"1.05", "0", "0", "0", "1.05", "0", "0", "0", "1.05"}); model.material().create("mat5"); model.material("mat5").propertyGroup("def").func() .create("dL_solid_1", "Piecewise"); model.material("mat5").propertyGroup("def").func() .create("CTE_solid_1", "Piecewise"); model.material("mat5").propertyGroup("def").func() .create("k_solid_bulk_1", "Piecewise"); model.material("mat5").propertyGroup("def").func() .create("res_solid_1", "Piecewise"); model.material("mat5").propertyGroup("def").func() .create("alpha_solid_1", "Piecewise"); model.material("mat5").propertyGroup("def").func() .create("C_solid_1", "Piecewise"); model.material("mat5").propertyGroup("def").func() .create("HC_solid_1", "Piecewise"); model.material("mat5").propertyGroup("def").func() .create("mu", "Piecewise"); model.material("mat5").propertyGroup("def").func() .create("sigma_solid_1", "Piecewise"); model.material("mat5").propertyGroup("def").func() .create("rho_solid_1", "Piecewise"); model.material("mat5").propertyGroup("def").func() .create("VP_solid_1", "Piecewise"); model.material("mat5").propertyGroup("def").func() .create("kappa", "Piecewise"); model.material("mat5").propertyGroup() .create("Enu", "Young's modulus and Poisson's ratio"); model.material("mat5").propertyGroup("Enu").func() .create("E", "Piecewise"); model.material("mat5").propertyGroup("Enu").func() .create("nu", "Piecewise"); model.material("mat5").selection().named("uni2"); model.material("mat5").name("Aluminum [solid,bulk]"); model.material("mat5").propertyGroup("def").func("dL_solid_1") .set("pieces", new String[][]{{"20.0", "188.0", "-0.004116601-4.000347E-6*T^1+5.370388E-8*T^2+3.714324E-10*T^3-1.45073E-12*T^4"}, {"188.0", "933.0", "-0.006312089+2.156284E-5*T^1-4.744254E-9*T^2+1.811015E-11*T^3-7.336673E-15*T^4"}}); model.material("mat5").propertyGroup("def").func("dL_solid_1") .set("arg", "T"); model.material("mat5").propertyGroup("def").func("CTE_solid_1") .set("pieces", new String[][]{{"20.0", "79.0", "-3.317274E-6+3.068688E-7*T^1-1.004816E-8*T^2+1.724768E-10*T^3-8.846061E-13*T^4"}, {"79.0", "230.0", "-2.288239E-5+6.674915E-7*T^1-4.402622E-9*T^2+1.455358E-11*T^3-1.910622E-14*T^4"}, {"230.0", "900.0", "1.243109E-5+5.050772E-8*T^1-5.806556E-11*T^2+3.014305E-14*T^3"}}); model.material("mat5").propertyGroup("def").func("CTE_solid_1") .set("arg", "T"); model.material("mat5").propertyGroup("def").func("k_solid_bulk_1") .set("pieces", new String[][]{{"0.0", "14.0", "3895.7*T^1+203.42*T^2-56.434*T^3+2.0664*T^4"}, {"14.0", "50.0", "49148.0-2950.9*T^1+63.175*T^2-0.46605*T^3"}, {"50.0", "82.0", "15117.0-626.0*T^1+10.348*T^2-0.078676*T^3+2.2917E-4*T^4"}, {"82.0", "297.0", "913.09-12.076*T^1+0.080875*T^2-2.3988E-4*T^3+2.6487E-7*T^4"}, {"297.0", "933.0", "39.646+1.684*T^1-0.0054134*T^2+8.4313E-6*T^3-6.537E-9*T^4+2.002E-12*T^5"}}); model.material("mat5").propertyGroup("def").func("k_solid_bulk_1") .set("arg", "T"); model.material("mat5").propertyGroup("def").func("res_solid_1") .set("pieces", new String[][]{{"1.0", "20.0", "1.091612E-12-1.10726E-13*T^1+3.696901E-14*T^2-2.781934E-15*T^3+1.008733E-16*T^4"}, {"20.0", "50.0", "-3.323487E-11+7.29041E-12*T^1-4.771551E-13*T^2+1.071535E-14*T^3"}, {"50.0", "200.0", "1.046556E-10-3.988929E-11*T^1+1.061978E-12*T^2-2.337666E-15*T^3"}, {"200.0", "933.0", "-1.037048E-8+1.451201E-10*T^1-8.192563E-14*T^2+6.619834E-17*T^3"}}); model.material("mat5").propertyGroup("def").func("res_solid_1") .set("arg", "T"); model.material("mat5").propertyGroup("def").func("alpha_solid_1") .set("pieces", new String[][]{{"20.0", "220.0", "1.371347E-5+7.808536E-8*T^1-2.568882E-10*T^2+3.615726E-13*T^3"}, {"220.0", "610.0", "5.760185E-6+1.707141E-7*T^1-6.548135E-10*T^2+1.220625E-12*T^3-1.064883E-15*T^4+3.535918E-19*T^5"}, {"610.0", "933.0", "1.9495E-5+9.630182E-9*T^1+9.462013E-13*T^2"}}); model.material("mat5").propertyGroup("def").func("alpha_solid_1") .set("arg", "T"); model.material("mat5").propertyGroup("def").func("C_solid_1") .set("pieces", new String[][]{{"100.0", "320.0", "-290.4161+11.181*T^1-0.04125401*T^2+7.112754E-5*T^3-4.60822E-8*T^4"}, {"320.0", "933.0", "595.6585+1.513029*T^1-0.002070065*T^2+1.303608E-6*T^3"}}); model.material("mat5").propertyGroup("def").func("C_solid_1") .set("arg", "T"); model.material("mat5").propertyGroup("def").func("HC_solid_1") .set("pieces", new String[][]{{"100.0", "320.0", "-7.835862+0.3016802*T^1-0.001113095*T^2+1.919128E-6*T^3-1.243367E-9*T^4"}, {"320.0", "933.0", "16.07176+0.04082379*T^1-5.585347E-5*T^2+3.517331E-8*T^3"}}); model.material("mat5").propertyGroup("def").func("HC_solid_1") .set("arg", "T"); model.material("mat5").propertyGroup("def").func("mu") .set("pieces", new String[][]{{"0.0", "773.0", "2.894653E10-120032.4*T^1-69037.36*T^2+158.6722*T^3-0.1348974*T^4"}}); model.material("mat5").propertyGroup("def").func("mu").set("arg", "T"); model.material("mat5").propertyGroup("def").func("sigma_solid_1") .set("pieces", new String[][]{{"1.0", "20.0", "1/(1.008733E-16*T^4-2.781934E-15*T^3+3.696901E-14*T^2-1.107260E-13*T+1.091612E-12)"}, {"20.0", "50.0", "1/(1.071535E-14*T^3-4.771551E-13*T^2+7.290410E-12*T-3.323487E-11)"}, {"50.0", "200.0", "1/(-2.337666E-15*T^3+1.061978E-12*T^2-3.988929E-11*T+1.0465563E-10)"}, {"200.0", "933.0", "1/(6.619834E-17*T^3-8.192563E-14*T^2+1.451201E-10*T-1.037048E-08)"}}); model.material("mat5").propertyGroup("def").func("sigma_solid_1") .set("arg", "T"); model.material("mat5").propertyGroup("def").func("rho_solid_1") .set("pieces", new String[][]{{"20.0", "130.0", "2734.317-0.02751647*T^1+0.001016054*T^2-1.700864E-5*T^3+5.734155E-8*T^4"}, {"130.0", "933.0", "2736.893-0.006011681*T^1-7.012444E-4*T^2+1.3582E-6*T^3-1.367828E-9*T^4+5.177991E-13*T^5"}}); model.material("mat5").propertyGroup("def").func("rho_solid_1") .set("arg", "T"); model.material("mat5").propertyGroup("def").func("VP_solid_1") .set("pieces", new String[][]{{"293.0", "933.0", "(exp((-1.734200e+004/T-7.927000e-001*log10(T)+1.233981e+001)*log(10.0)))*1.333200e+002"}}); model.material("mat5").propertyGroup("def").func("VP_solid_1") .set("arg", "T"); model.material("mat5").propertyGroup("def").func("kappa") .set("pieces", new String[][]{{"0.0", "773.0", "7.252413E10+1872882.0*T^1-71106.44*T^2+52.7109*T^3"}}); model.material("mat5").propertyGroup("def").func("kappa").set("arg", "T"); model.material("mat5").propertyGroup("def") .set("dL", "(dL_solid_1(T[1/K])-dL_solid_1(Tempref[1/K]))/(1+dL_solid_1(Tempref[1/K]))"); model.material("mat5").propertyGroup("def") .set("CTE", "CTE_solid_1(T[1/K])[1/K]"); model.material("mat5").propertyGroup("def") .set("thermalconductivity", new String[]{"k_solid_bulk_1(T[1/K])[W/(m*K)]", "0", "0", "0", "k_solid_bulk_1(T[1/K])[W/(m*K)]", "0", "0", "0", "k_solid_bulk_1(T[1/K])[W/(m*K)]"}); model.material("mat5").propertyGroup("def") .set("resistivity", new String[]{"res_solid_1(T[1/K])[ohm*m]", "0", "0", "0", "res_solid_1(T[1/K])[ohm*m]", "0", "0", "0", "res_solid_1(T[1/K])[ohm*m]"}); model.material("mat5").propertyGroup("def") .set("thermalexpansioncoefficient", new String[]{"(alpha_solid_1(T[1/K])[1/K]+(Tempref-293[K])*if(abs(T-Tempref)>1e-3,(alpha_solid_1(T[1/K])[1/K]-alpha_solid_1(Tempref[1/K])[1/K])/(T-Tempref),d(alpha_solid_1(T[1/K]),T)[1/K]))/(1+alpha_solid_1(Tempref[1/K])[1/K]*(Tempref-293[K]))", "0", "0", "0", "(alpha_solid_1(T[1/K])[1/K]+(Tempref-293[K])*if(abs(T-Tempref)>1e-3,(alpha_solid_1(T[1/K])[1/K]-alpha_solid_1(Tempref[1/K])[1/K])/(T-Tempref),d(alpha_solid_1(T[1/K]),T)[1/K]))/(1+alpha_solid_1(Tempref[1/K])[1/K]*(Tempref-293[K]))", "0", "0", "0", "(alpha_solid_1(T[1/K])[1/K]+(Tempref-293[K])*if(abs(T-Tempref)>1e-3,(alpha_solid_1(T[1/K])[1/K]-alpha_solid_1(Tempref[1/K])[1/K])/(T-Tempref),d(alpha_solid_1(T[1/K]),T)[1/K]))/(1+alpha_solid_1(Tempref[1/K])[1/K]*(Tempref-293[K]))"}); model.material("mat5").propertyGroup("def") .set("heatcapacity", "C_solid_1(T[1/K])[J/(kg*K)]"); model.material("mat5").propertyGroup("def") .set("HC", "HC_solid_1(T[1/K])[J/(mol*K)]"); model.material("mat5").propertyGroup("def").set("mu", "mu(T[1/K])[Pa]"); model.material("mat5").propertyGroup("def") .set("electricconductivity", new String[]{"sigma_solid_1(T[1/K])[S/m]", "0", "0", "0", "sigma_solid_1(T[1/K])[S/m]", "0", "0", "0", "sigma_solid_1(T[1/K])[S/m]"}); model.material("mat5").propertyGroup("def") .set("density", "rho_solid_1(T[1/K])[kg/m^3]"); model.material("mat5").propertyGroup("def") .set("VP", "VP_solid_1(T[1/K])[Pa]"); model.material("mat5").propertyGroup("def") .set("kappa", "kappa(T[1/K])[Pa]"); model.material("mat5").propertyGroup("def") .set("relpermittivity", new String[]{"1e9", "0", "0", "0", "1e9", "0", "0", "0", "1e9"}); model.material("mat5").propertyGroup("def").addInput("temperature"); model.material("mat5").propertyGroup("def") .addInput("strainreferencetemperature"); model.material("mat5").propertyGroup("Enu").func("E") .set("pieces", new String[][]{{"0.0", "773.0", "7.659324E10+2007396.0*T^1-186458.4*T^2+419.2175*T^3-0.3495083*T^4"}}); model.material("mat5").propertyGroup("Enu").func("E").set("arg", "T"); model.material("mat5").propertyGroup("Enu").func("nu") .set("pieces", new String[][]{{"0.0", "773.0", "0.3238668+3.754548E-6*T^1+2.213647E-7*T^2-6.565023E-10*T^3+4.21277E-13*T^4+3.170505E-16*T^5"}}); model.material("mat5").propertyGroup("Enu").func("nu").set("arg", "T"); model.material("mat5").propertyGroup("Enu") .set("youngsmodulus", "E(T[1/K])[Pa]"); model.material("mat5").propertyGroup("Enu") .set("poissonsratio", "nu(T[1/K])"); model.material("mat5").propertyGroup("Enu").addInput("temperature"); model.material("mat1").selection().all(); model.material().move("mat2", 1); model.material("mat2").selection().set(new int[]{1}); model.material("mat3").selection().named(selnameInsu); stamp=System.currentTimeMillis(); System.out.println("adding physics"); model.physics().create("es", "Electrostatics", "geom1"); scounter=0; double pot=0; double Vstep; xmin=0; xmax=0; ymin=0; ymax=0; //set potentials of field strips stamp=System.currentTimeMillis(); for (int row=0;row<4;row++){ scounter=0; System.out.println("adding potential to row: "+Integer.toString(row)); int[] strip = new int[4]; strip[0]=srow[row][0]; strip[1]=srow2[row][0]; ymin=dLsG1-1e-3; ymax=dLsG1+1+1e-3; if (row==0 | row==1) { strip[2]=strip[1]+1; //1e-3 is box offset to make sure other partis are inside xmin=50-3e-3 -1e-3; xmax=50-1e-3 +1e-3; ymin+=shi; ymax+=shi; if (row==0) { //kapton thickness, other striprow thicknes + box offset xmin+=-25e-3-2e-3 -1e-3; xmax+=-25e-3 +1e-3; ymin+=0.75; ymax+=0.75; } } if (row==2 | row==3) { xmin=155; xmax=155+3e-3 +1e-3; ymin+=sho; ymax+=sho; strip[2]=strip[0]+1; if(row==3) { xmin+=25e-3+2e-3; xmax+=25e-3+2e-3; ymin+=0.75; ymax+=0.75; } } if (row==0) {strip[3]=strip[2]+2;} else {strip[3]=strip[2]+1;} for (int st=0;st<=nofStrips-1;st++) { System.out.print("At strip "+Integer.toString(st)+" of "+Integer.toString(nofStrips-1)+"\r"); if (st>0) { ymin+=1.5; ymax+=1.5; } String sname="r" +Integer.toString(row)+"s"+Integer.toString(st); String selname="sel_"+sname; model.physics("es").feature().create(sname, "ElectricPotential", 1); model.physics("es").feature(sname).selection().named(selname); model.physics("es").feature(sname).name(sname); String potS=""; String VstepS=""; if (row==0|row==1) { Vstep=Vstepi; VstepS="Vstepi"; } else { Vstep=Vstepo; VstepS="Vstepo"; } //this is for creating a shortcut in the middle of outer fieldcage if (midshort==1) { if (row==2 | row==3) { if(st==Math.ceil(nofStrips/2)) scounter--; } } //end shortcut if (row==0 | row==3) { pot=Vls+Vstep/2.+Vstep*scounter; potS="Vls+"+VstepS+"/2.+"+VstepS+"*"+Integer.toString(scounter); } else { pot=Vls+Vstep*scounter; potS="Vls+"+VstepS+"*"+Integer.toString(scounter); } potS="("+potS+")*( ("+potS+")>Vd)+Vd*(("+potS+")<=Vd) "; model.physics("es").feature(sname).set("V0", potS); scounter++; strip[0]+=srow[row][1]; strip[1]+=srow2[row][1]; if (row==0 | row==1) {strip[2]=strip[1]+1;} if (row==2 | row==3) {strip[2]=strip[0]+1;} if (row==0) {strip[3]=strip[2]+2;} else {strip[3]=strip[2]+1;} } System.out.println(""); } System.out.println("Adding Physics needed: "+Double.toString((System.currentTimeMillis()-stamp)/1000)+" s"); //set potential of drift System.out.println("Adding drift potential"); model.physics("es").feature().create("Vdrift", "ElectricPotential", 1); model.physics("es").feature("Vdrift").selection().named(selnameBend); model.physics("es").feature("Vdrift").name("Vdrift"); model.physics("es").feature("Vdrift").set("V0", "Vd"); //set gem potential System.out.println("adding gem potential"); model.physics("es").feature().create("Vgem", "ElectricPotential", 1); model.physics("es").feature("Vgem").selection().named(selnameAnod); model.physics("es").feature("Vgem").name("Vgem"); model.physics("es").feature("Vgem").set("V0", "Vg"); model.physics("es").feature().create("gnd1", "Ground", 1); model.physics("es").feature("gnd1").selection().named("uni3"); System.out.println("adding mesh"); model.mesh().create("mesh1", "geom1"); model.mesh("mesh1").feature().create("sca1", "Scale"); model.mesh("mesh1").feature().create("sca2", "Scale"); model.mesh("mesh1").feature().create("ftri1", "FreeTri"); model.mesh("mesh1").feature("size").set("hauto", 4); model.mesh("mesh1").feature("size").set("hmax", "100"); model.mesh("mesh1").feature("size").set("hmin", "15"); model.mesh("mesh1").feature("size").set("hcurve", "1"); model.mesh("mesh1").feature("size").set("hgrad", "1.2"); model.mesh("mesh1").feature("size").set("hnarrow", "0.05"); model.mesh("mesh1").feature("ftri1").set("xscale", "15"); model.mesh("mesh1").feature("ftri1").set("yscale", "10"); model.mesh("mesh1").feature("sca1").selection().named("uni1"); model.mesh("mesh1").feature("sca2").selection().named("sel_Insu"); System.out.println("adding study"); model.study().create("std1"); model.study("std1").feature().create("stat", "Stationary"); if (stud==1) { System.out.println("start meshing"); model.mesh("mesh1").run(); System.out.println("creating solution"); model.sol().create("sol1"); model.sol("sol1").study("std1"); model.sol("sol1").attach("std1"); System.out.println("start study"); model.study("std1").run(); System.out.println("Creating fieldmatrix"); model.result().dataset().create("cpt1", "CutPoint2D"); model.result().dataset("cpt1").set("method", "grid"); model.result().dataset("cpt1").name("field grid"); model.result().dataset("cpt1").set("gridx", "range(50,0.5,155)"); model.result().dataset("cpt1").set("gridy", "range(0,0.5,dLsG1+nofStrips*1.5)"); model.result().dataset("cpt1").run(); System.out.println("adding result"); model.result().export().create("data1", "Data"); model.result().export("data1").set("data", "cpt1"); model.result().export("data1").setIndex("expr", "es.Er", 0); model.result().export("data1").setIndex("expr", "es.Ez", 1); model.result().export("data1").setIndex("expr", "V", 2); model.result().export("data1").setIndex("unit", "V/cm", 0); model.result().export("data1").setIndex("unit", "V/cm", 1); model.result().export("data1").setIndex("unit", "V", 2); model.result().export("data1") .set("filename", outpath+"/"+fieldf+".txt"); System.out.println("exporting result to "+outpath+"/"+fieldf+".txt"); model.result().export("data1").run(); } if (dbgplots==1 && stud==1) { System.out.println("adding study 2"); model.study().create("std2"); model.study("std2").feature().create("param", "Parametric"); model.study("std2").feature().create("stat", "Stationary"); model.study("std2").feature("stat").set("initstudyhide", "on"); model.study("std2").feature("stat").set("initsolhide", "on"); model.study("std2").feature("stat").set("notstudyhide", "on"); model.study("std2").feature("stat").set("notsolhide", "on"); model.study("std2").feature("stat").set("initstudyhide", "on"); model.study("std2").feature("stat").set("initsolhide", "on"); model.study("std2").feature("stat").set("notstudyhide", "on"); model.study("std2").feature("stat").set("notsolhide", "on"); model.study("std2").name("Real Pot with Shorts"); model.study("std2").feature("param").set("pname", new String[]{"shortsi", "shortso", "Vg", "Vls", "Vd"}); model.study("std2").feature("param").set("plistarr", new String[]{"4", "3", "-3458.6", "-3528.6", "-25940"}); System.out.println("creating solution 2"); model.sol().create("sol2"); model.sol("sol2").study("std2"); model.sol("sol2").attach("std2"); //create all views System.out.println("adding views"); model.view().create("view4", "geom1"); model.view("view4").name("close to strips inner"); model.view("view4").set("locked", true); model.view("view4").axis().set("xmin", "48"); model.view("view4").axis().set("ymin", "435.0"); model.view("view4").axis().set("manualgrid", "on"); model.view("view4").axis().set("yspacing", "0.5"); model.view("view4").axis().set("xmax", "57"); model.view("view4").axis().set("ymax", "439"); model.view().create("view5", "geom1"); model.view("view5").name("close to cathode corner"); model.view("view5").set("locked", true); model.view("view5").axis().set("xmin", "48"); model.view("view5").axis().set("ymin", "708"); model.view("view5").axis().set("manualgrid", "on"); model.view("view5").axis().set("xmax", "90"); model.view("view5").axis().set("ymax", "735"); model.view().create("view6", "geom1"); model.view("view6").name("close to last strip"); model.view("view6").set("locked", true); model.view("view6").axis().set("xmin", "48"); model.view("view6").axis().set("ymin", "0"); model.view("view6").axis().set("manualgrid", "on"); model.view("view6").axis().set("xmax", "90"); model.view("view6").axis().set("ymax", "17"); model.view().create("view7", "geom1"); model.view("view7").name("fieldcage soldering"); model.view("view7").set("locked", true); model.view("view7").axis().set("xmin", "110"); model.view("view7").axis().set("xmax", "157"); model.view("view7").axis().set("manualgrid", "on"); model.view("view7").axis().set("ymin", "0"); model.view("view7").axis().set("ymax", "17"); //create datasets System.out.println("creating datasets"); System.out.println("adding cutlines left"); model.result().dataset().create("cln1", "CutLine2D"); model.result().dataset("cln1").name("left"); model.result().dataset("cln1").set("genpoints", new String[][]{{"51", "0"}, {"51", "1000"}}); model.result().dataset("cln1").set("genparaactive", "on"); model.result().dataset("cln1").set("genparadist", "range(0,-0.05,-50)"); System.out.println("adding cutline right"); model.result().dataset().create("cln2", "CutLine2D"); model.result().dataset("cln2").name("right"); model.result().dataset("cln2").set("genpoints", new String[][]{{"155+12.5e-3", "0"}, {"155+12.5e-3", "1000"}}); System.out.println("adding cutline last strip"); model.result().dataset().create("cln4", "CutLine2D"); model.result().dataset("cln4").name("Last Strip"); model.result().dataset("cln4").set("genpoints", new String[][]{{"49", "dLsG1+0.5"}, {"156", "dLsG1+0.5"}}); System.out.println("adding cutline last strip 1"); model.result().dataset().create("cln5", "CutLine2D"); model.result().dataset("cln5").set("data", "dset2"); model.result().dataset("cln5").name("Last Strip 1"); model.result().dataset("cln5").set("spacevars", new String[]{"cln4x"}); model.result().dataset("cln5").set("genpoints", new String[][]{{"49", "dLsG1+0.5"}, {"156", "dLsG1+0.5"}}); System.out.println("adding cutline middle"); model.result().dataset().create("cln6", "CutLine2D"); model.result().dataset("cln6").name("middle"); model.result().dataset("cln6").set("genpoints", new String[][]{{"49", "350"}, {"156", "350"}}); System.out.println("adding cutline middle 1"); model.result().dataset().create("cln7", "CutLine2D"); model.result().dataset("cln7").set("data", "dset2"); model.result().dataset("cln7").name("middle 1"); model.result().dataset("cln7").set("spacevars", new String[]{"cln6x"}); model.result().dataset("cln7").set("genpoints", new String[][]{{"49", "350"}, {"156", "350"}}); System.out.println("adding plotgroup potential"); model.result().create("pg_pot", "PlotGroup2D"); model.result("pg_pot").feature().create("surf1", "Surface"); model.result("pg_pot").feature().create("con1", "Contour"); model.result("pg_pot").name("Potential"); //model.result("pg_pot").set("solnum", "4"); model.result("pg_pot").feature("con1").set("number", "80"); model.result("pg_pot").feature("con1").set("color", "black"); model.result("pg_pot").feature("con1").set("coloring", "uniform"); model.result("pg_pot").feature("con1").set("colorlegend", false); System.out.println("adding plotgroup radial field"); model.result().create("pg_er", "PlotGroup2D"); model.result("pg_er").feature().create("surf1", "Surface"); model.result("pg_er").name("Radial Field"); model.result("pg_er").set("xlabelactive", true); model.result("pg_er").set("window", "window2"); model.result("pg_er").set("ylabelactive", true); model.result("pg_er").set("titletype", "custom"); model.result("pg_er").set("solutionintitle", false); model.result("pg_er").set("typeintitle", false); model.result("pg_er").set("ylabel", "Z (mm)"); model.result("pg_er").set("windowtitleactive", true); model.result("pg_er").set("xlabel", "Radius (mm)"); //model.result("pg_er").set("solnum", "4"); model.result("pg_er").set("windowtitle", "Radial Field"); model.result("pg_er").feature("surf1") .set("descr", "Electric field, r component"); model.result("pg_er").feature("surf1").set("rangecolormax", "20"); model.result("pg_er").feature("surf1").set("expr", "es.Er"); model.result("pg_er").feature("surf1").set("rangecoloractive", "on"); model.result("pg_er").feature("surf1").set("resolution", "fine"); model.result("pg_er").feature("surf1").set("rangecolormin", "-20"); model.result("pg_er").feature("surf1").set("unit", "V/cm"); System.out.println("adding plotgroup drift field"); model.result().create("pg_ez", "PlotGroup2D"); model.result("pg_ez").feature().create("surf1", "Surface"); model.result("pg_ez").name("Drift Field"); model.result("pg_ez").set("xlabelactive", true); model.result("pg_ez").set("window", "window3"); model.result("pg_ez").set("ylabelactive", true); model.result("pg_ez").set("titletype", "custom"); model.result("pg_ez").set("solutionintitle", false); model.result("pg_ez").set("typeintitle", false); model.result("pg_ez").set("ylabel", "Z (mm)"); model.result("pg_ez").set("windowtitleactive", true); model.result("pg_ez").set("xlabel", "Radius (mm)"); // model.result("pg_ez").set("solnum", "4"); model.result("pg_ez").set("windowtitle", "Drift Field"); model.result("pg_ez").feature("surf1") .set("descr", "Electric field, z component"); model.result("pg_ez").feature("surf1").set("rangecolormax", "290"); model.result("pg_ez").feature("surf1").set("expr", "es.Ez"); model.result("pg_ez").feature("surf1").set("rangecoloractive", "on"); model.result("pg_ez").feature("surf1").set("resolution", "fine"); model.result("pg_ez").feature("surf1").set("rangecolormin", "320"); model.result("pg_ez").feature("surf1").set("unit", "V/cm"); System.out.println("adding plotgroup abs field"); model.result().create("pg_e", "PlotGroup2D"); model.result("pg_e").feature().create("surf1", "Surface"); model.result("pg_e").name("Abs Field"); model.result("pg_e").set("xlabelactive", true); model.result("pg_e").set("window", "window4"); model.result("pg_e").set("ylabelactive", true); model.result("pg_e").set("titletype", "custom"); model.result("pg_e").set("solutionintitle", false); model.result("pg_e").set("typeintitle", false); model.result("pg_e").set("ylabel", "Z (mm)"); model.result("pg_e").set("windowtitleactive", true); model.result("pg_e").set("xlabel", "Radius (mm)"); // model.result("pg_e").set("solnum", "4"); model.result("pg_e").set("windowtitle", "Absolute Field"); model.result("pg_e").feature("surf1").set("descr", "Electric field norm"); model.result("pg_e").feature("surf1").set("rangecolormax", "400"); model.result("pg_e").feature("surf1").set("expr", "es.normE"); model.result("pg_e").feature("surf1").set("rangecoloractive", "on"); model.result("pg_e").feature("surf1").set("resolution", "fine"); model.result("pg_e").feature("surf1").set("rangecolormin", "200"); model.result("pg_e").feature("surf1").set("unit", "V/cm"); System.out.println("adding plotgroup along strips (left)"); model.result().create("pg4", "PlotGroup1D"); model.result("pg4").feature().create("lngr1", "LineGraph"); model.result("pg4").feature().create("lngr2", "LineGraph"); model.result("pg4").name("Potential along strips"); model.result("pg4").set("ylabel", "Electric potential (V)"); model.result("pg4").set("xlabel", "Arc length"); model.result("pg4").set("ylabelactive", false); model.result("pg4").set("xlabelactive", false); model.result("pg4").feature("lngr1").set("data", "cln1"); model.result("pg4").feature("lngr1").set("solrepresentation", "solnum"); model.result("pg4").feature("lngr1").set("legend", true); model.result("pg4").feature("lngr2").set("data", "cln2"); model.result("pg4").feature("lngr2").set("solrepresentation", "solnum"); model.result("pg4").feature("lngr2").set("legend", true); System.out.println("adding plotgroup Ez along z"); model.result().create("pg8", "PlotGroup1D"); model.result("pg8").feature().create("lngr2", "LineGraph"); model.result("pg8").name("Ez along z"); // model.result("pg8").set("solnum", new String[]{"4"}); model.result("pg8").set("ylabel", "dEz/Ez"); model.result("pg8").set("titletype", "custom"); model.result("pg8").set("windowtitleactive", true); model.result("pg8").set("ylabelactive", true); model.result("pg8").set("typeintitle", false); model.result("pg8").set("xlabel", "Z (cm)"); model.result("pg8").set("windowtitle", "Ez along Z"); model.result("pg8").set("window", "window8"); model.result("pg8").set("xlabelactive", true); model.result("pg8").set("innerinput", "manual"); model.result("pg8").feature("lngr2").name("Ez"); model.result("pg8").feature("lngr2").set("data", "cln1"); model.result("pg8").feature("lngr2").set("titletype", "custom"); model.result("pg8").feature("lngr2").set("solrepresentation", "solnum"); model.result("pg8").feature("lngr2").set("unit", "1"); model.result("pg8").feature("lngr2").set("typeintitle", false); model.result("pg8").feature("lngr2") .set("expr", "abs( (es.Ez- (Vg-Vd)/(Cz) ) / ( (Vg-Vd)/(Cz) ) )"); model.result("pg8").feature("lngr2") .set("descr", "Relative deviation from nominal drift field"); model.result("pg8").feature("lngr2").set("unitintitle", false); // model.result("pg8").feature("lngr2").set("solnum", new String[]{"4"}); model.result("pg8").feature("lngr2").set("innerinput", "manual"); model.result("pg8").feature("lngr2").set("descractive", true); model.result("pg8").feature("lngr2").set("legend", true); System.out.println("adding plotgroup Er along z"); model.result().create("pg11", "PlotGroup1D"); model.result("pg11").feature().create("lngr1", "LineGraph"); model.result("pg11").name("Er along z"); model.result("pg11").feature("lngr1").name("Er"); model.result("pg11").feature("lngr1").set("data", "cln1"); model.result("pg11").feature("lngr1").set("solrepresentation", "solnum"); model.result("pg11").feature("lngr1").set("unit", "V/m"); model.result("pg11").feature("lngr1").set("expr", "es.Er"); model.result("pg11").feature("lngr1") .set("descr", "Electric field, r component"); // model.result("pg11").feature("lngr1").set("solnum", new String[]{"4"}); model.result("pg11").feature("lngr1").set("innerinput", "manual"); model.result("pg11").feature("lngr1").set("legend", true); System.out.println("adding plotgroup Er along last strip"); model.result().create("pg9", "PlotGroup1D"); model.result("pg9").feature().create("lngr1", "LineGraph"); model.result("pg9").name("Er along last strip"); model.result("pg9").set("data", "cln4"); model.result("pg9").set("ylabel", "Electric field, r component (V/cm)"); model.result("pg9").set("windowtitleactive", true); model.result("pg9").set("xlabel", "Arc length"); model.result("pg9").set("windowtitle", "Er along ls"); model.result("pg9").set("window", "window7"); model.result("pg9").set("ylabelactive", false); model.result("pg9").set("xlabelactive", false); model.result("pg9").feature("lngr1").set("unit", "V/cm"); model.result("pg9").feature("lngr1").set("expr", "es.Er"); model.result("pg9").feature("lngr1") .set("descr", "Electric field, r component"); model.result("pg9").feature("lngr1").set("resolution", "fine"); model.result("pg9").feature("lngr1").set("legend", true); System.out.println("adding plotgroup Ez along last strip"); model.result().create("pg10", "PlotGroup1D"); model.result("pg10").feature().create("lngr1", "LineGraph"); model.result("pg10").name("Ez along last strip"); model.result("pg10").set("ylabel", "Electric field, z component (V/cm)"); model.result("pg10").set("windowtitleactive", true); model.result("pg10").set("xlabel", "Arc length"); model.result("pg10").set("windowtitle", "Ez along ls"); model.result("pg10").set("window", "window8"); model.result("pg10").set("ylabelactive", false); model.result("pg10").set("xlabelactive", false); model.result("pg10").feature("lngr1").set("data", "cln4"); model.result("pg10").feature("lngr1").set("solrepresentation", "solnum"); model.result("pg10").feature("lngr1").set("unit", "V/cm"); model.result("pg10").feature("lngr1").set("expr", "es.Ez"); model.result("pg10").feature("lngr1") .set("descr", "Electric field, z component"); model.result("pg10").feature("lngr1").set("legend", true); System.out.println("adding plotgroup Er along middle"); model.result().create("pg12", "PlotGroup1D"); model.result("pg12").feature().create("lngr1", "LineGraph"); model.result("pg12").name("Er alonng middle"); model.result("pg12").set("data", "cln6"); model.result("pg12").set("ylabel", "Electric field, r component (V/cm)"); model.result("pg12").set("xlabel", "Arc length"); model.result("pg12").set("ylog", true); model.result("pg12").set("ylabelactive", false); model.result("pg12").set("xlabelactive", false); model.result("pg12").feature("lngr1").set("unit", "V/cm"); model.result("pg12").feature("lngr1").set("expr", "es.Er"); model.result("pg12").feature("lngr1") .set("descr", "Electric field, r component"); model.result("pg12").feature("lngr1").set("resolution", "extrafine"); System.out.println("adding plotgroup radial field 1"); model.result().create("pg_er1", "PlotGroup2D"); model.result("pg_er1").feature().create("surf1", "Surface"); model.result("pg_er1").name("Radial Field 1"); model.result("pg_er1").set("data", "dset2"); model.result("pg_er1").set("xlabelactive", true); model.result("pg_er1").set("window", "window2"); model.result("pg_er1").set("ylabelactive", true); model.result("pg_er1").set("titletype", "custom"); model.result("pg_er1").set("solrepresentation", "solutioninfo"); model.result("pg_er1").set("solutionintitle", false); model.result("pg_er1").set("typeintitle", false); model.result("pg_er1").set("ylabel", "Z (mm)"); model.result("pg_er1").set("windowtitleactive", true); //model.result("pg_er1").set("looplevel", new String[]{"1"}); model.result("pg_er1").set("xlabel", "Radius (mm)"); model.result("pg_er1").set("windowtitle", "Radial Field"); model.result("pg_er1").feature("surf1") .set("descr", "Electric field, r component"); model.result("pg_er1").feature("surf1").set("rangecolormax", "20"); model.result("pg_er1").feature("surf1").set("expr", "es.Er"); model.result("pg_er1").feature("surf1").set("rangecoloractive", "on"); model.result("pg_er1").feature("surf1").set("resolution", "fine"); model.result("pg_er1").feature("surf1").set("rangecolormin", "-20"); model.result("pg_er1").feature("surf1").set("unit", "V/cm"); System.out.println("adding plotgroup drift field 1"); model.result().create("pg_ez1", "PlotGroup2D"); model.result("pg_ez1").feature().create("surf1", "Surface"); model.result("pg_ez1").name("Drift Field 1"); model.result("pg_ez1").set("data", "dset2"); model.result("pg_ez1").set("xlabelactive", true); model.result("pg_ez1").set("window", "window3"); model.result("pg_ez1").set("ylabelactive", true); model.result("pg_ez1").set("titletype", "custom"); model.result("pg_ez1").set("solrepresentation", "solutioninfo"); model.result("pg_ez1").set("solutionintitle", false); model.result("pg_ez1").set("typeintitle", false); model.result("pg_ez1").set("ylabel", "Z (mm)"); model.result("pg_ez1").set("windowtitleactive", true); //model.result("pg_ez1").set("looplevel", new String[]{"1"}); model.result("pg_ez1").set("xlabel", "Radius (mm)"); model.result("pg_ez1").set("windowtitle", "Drift Field"); model.result("pg_ez1").feature("surf1") .set("descr", "Electric field, z component"); model.result("pg_ez1").feature("surf1").set("rangecolormax", "400"); model.result("pg_ez1").feature("surf1").set("expr", "es.Ez"); model.result("pg_ez1").feature("surf1").set("rangecoloractive", "on"); model.result("pg_ez1").feature("surf1").set("resolution", "fine"); model.result("pg_ez1").feature("surf1").set("rangecolormin", "200"); model.result("pg_ez1").feature("surf1").set("unit", "V/cm"); System.out.println("adding plotgroup abs field 1"); model.result().create("pg_e1", "PlotGroup2D"); model.result("pg_e1").feature().create("surf1", "Surface"); model.result("pg_e1").name("Abs Field 1"); model.result("pg_e1").set("data", "dset2"); model.result("pg_e1").set("xlabelactive", true); model.result("pg_e1").set("window", "window4"); model.result("pg_e1").set("ylabelactive", true); model.result("pg_e1").set("titletype", "custom"); model.result("pg_e1").set("solrepresentation", "solutioninfo"); model.result("pg_e1").set("solutionintitle", false); model.result("pg_e1").set("typeintitle", false); model.result("pg_e1").set("ylabel", "Z (mm)"); model.result("pg_e1").set("windowtitleactive", true); // model.result("pg_e1").set("looplevel", new String[]{"1"}); model.result("pg_e1").set("xlabel", "Radius (mm)"); model.result("pg_e1").set("windowtitle", "Absolute Field"); model.result("pg_e1").feature("surf1") .set("descr", "Electric field norm"); model.result("pg_e1").feature("surf1").set("rangecolormax", "400"); model.result("pg_e1").feature("surf1").set("expr", "es.normE"); model.result("pg_e1").feature("surf1").set("rangecoloractive", "on"); model.result("pg_e1").feature("surf1").set("resolution", "fine"); model.result("pg_e1").feature("surf1").set("rangecolormin", "200"); model.result("pg_e1").feature("surf1").set("unit", "V/cm"); System.out.println("adding plotgroup ez along middle"); model.result().create("pg13", "PlotGroup1D"); model.result("pg13").feature().create("lngr1", "LineGraph"); model.result("pg13").feature().create("lngr2", "LineGraph"); model.result("pg13").feature().create("lngr3", "LineGraph"); model.result("pg13").name("Ez diff along middle"); model.result("pg13").set("data", "cln6"); // model.result("pg13").set("solnum", new String[]{"3", "4", "5", "6"}); model.result("pg13") .set("ylabel", "abs( (es.Ez - (Vg-Vd)/Cz ) / ( ( Vg-Vd)/Cz ) ) (1)"); model.result("pg13").set("xlabel", "Reversed arc length"); model.result("pg13").set("innerinput", "manual"); model.result("pg13").set("ylog", true); model.result("pg13").set("ylabelactive", false); model.result("pg13").set("xlabelactive", false); model.result("pg13").feature("lngr1").set("unit", "1"); model.result("pg13").feature("lngr1").set("xdata", "reversedarc"); model.result("pg13").feature("lngr1") .set("expr", "abs( (es.Ez - (Vg-Vd)/Cz ) / ( ( Vg-Vd)/Cz ) )"); model.result("pg13").feature("lngr1") .set("descr", "abs( (es.Ez - (Vg-Vd)/Cz ) / ( ( Vg-Vd)/Cz ) )"); model.result("pg13").feature("lngr1").set("legend", true); model.result("pg13").feature("lngr2").active(false); model.result("pg13").feature("lngr2").set("unit", "V/m"); model.result("pg13").feature("lngr2").set("expr", "(Vg-Vd)/(Cz)"); model.result("pg13").feature("lngr2").set("descr", "(Vg-Vd)/(Cz)"); model.result("pg13").feature("lngr3").active(false); model.result("pg13").feature("lngr3").set("unit", "cV/m"); model.result("pg13").feature("lngr3").set("expr", "es.Ez"); model.result("pg13").feature("lngr3") .set("descr", "Electric field, z component"); model.result("pg13").feature("lngr3").set("legend", true); //add exports System.out.println("adding export Erlines"); model.result().export().create("plot2", "Plot"); model.result().export("plot2").active(false); model.result().export("plot2").name("Erlines"); model.result().export("plot2") .set("filename", "/data/fopiroot_data/field_sim//fieldlines_full_field_-341.00_-312.90_0s0_4.700_727.951sh0.000_0.0000_perfect__Er_lines.txt"); model.result().export("plot2").set("plotgroup", "pg8"); System.out.println("adding export Ez_diff"); model.result().export().create("plot3", "Plot"); model.result().export("plot2").set("plot", "lngr2"); model.result().export("plot3").active(false); model.result().export("plot3").name("Ez_diff"); model.result().export("plot3") .set("filename", "/data/fopiroot_data/field_sim//fieldlines_full_field_-341.00_-312.90_0s0_4.700_727.951sh0.000_0.0000_perfect__Ezdiff_lines.txt"); model.result().export("plot3").set("plotgroup", "pg8"); model.result().export("plot3").set("plot", "lngr2"); System.out.println("adding export Er inner perfect"); model.result().export().create("img1", "Image2D"); model.result().export("img1").name("Er inner perfect"); model.result().export("img1") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_radial_strips.png"); model.result().export("img1").set("sizedesc", "102 x 51 mm"); model.result().export("img1").set("view", "view4"); model.result().export("img1").set("width", "2400"); model.result().export("img1").set("plotgroup", "pg_er"); model.result().export("img1").set("height", "1200"); model.result().export("img1").set("unit", "px"); model.result().export("img1").set("height", "1200"); model.result().export("img1").set("width", "2400"); model.result().export("img1").set("lockratio", "off"); model.result().export("img1").set("resolution", "600"); model.result().export("img1").set("size", "manual"); model.result().export("img1").set("antialias", "on"); model.result().export("img1").set("title", "on"); model.result().export("img1").set("legend", "on"); model.result().export("img1").set("logo", "off"); model.result().export("img1").set("options", "on"); model.result().export("img1").set("fontsize", "5"); model.result().export("img1").set("customcolor", new double[]{1, 1, 1}); model.result().export("img1").set("background", "color"); model.result().export("img1").set("qualitylevel", "92"); model.result().export("img1").set("qualityactive", "off"); model.result().export("img1").set("imagetype", "png"); model.result().export("img1").set("axes", "on"); System.out.println("adding export Ez inner perfect"); model.result().export().create("img2", "Image2D"); model.result().export("img2").name("Ez inner perfect"); model.result().export("img2") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_z_strips.png"); model.result().export("img2").set("sizedesc", "102 x 51 mm"); model.result().export("img2").set("view", "view4"); model.result().export("img2").set("width", "2400"); model.result().export("img2").set("plotgroup", "pg_ez"); model.result().export("img2").set("height", "1200"); model.result().export("img2").set("unit", "px"); model.result().export("img2").set("height", "1200"); model.result().export("img2").set("width", "2400"); model.result().export("img2").set("lockratio", "off"); model.result().export("img2").set("resolution", "600"); model.result().export("img2").set("size", "manual"); model.result().export("img2").set("antialias", "on"); model.result().export("img2").set("title", "on"); model.result().export("img2").set("legend", "on"); model.result().export("img2").set("logo", "off"); model.result().export("img2").set("options", "on"); model.result().export("img2").set("fontsize", "5"); model.result().export("img2").set("customcolor", new double[]{1, 1, 1}); model.result().export("img2").set("background", "color"); model.result().export("img2").set("qualitylevel", "92"); model.result().export("img2").set("qualityactive", "off"); model.result().export("img2").set("imagetype", "png"); model.result().export("img2").set("axes", "on"); System.out.println("adding export E inner perfect"); model.result().export().create("img3", "Image2D"); model.result().export("img3").name("E inner perfect"); model.result().export("img3") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_abs_strips.png"); model.result().export("img3").set("sizedesc", "102 x 51 mm"); model.result().export("img3").set("view", "view4"); model.result().export("img3").set("width", "2400"); model.result().export("img3").set("plotgroup", "pg_e"); model.result().export("img3").set("height", "1200"); model.result().export("img3").set("unit", "px"); model.result().export("img3").set("height", "1200"); model.result().export("img3").set("width", "2400"); model.result().export("img3").set("lockratio", "off"); model.result().export("img3").set("resolution", "600"); model.result().export("img3").set("size", "manual"); model.result().export("img3").set("antialias", "on"); model.result().export("img3").set("title", "on"); model.result().export("img3").set("legend", "on"); model.result().export("img3").set("logo", "off"); model.result().export("img3").set("options", "on"); model.result().export("img3").set("fontsize", "5"); model.result().export("img3").set("customcolor", new double[]{1, 1, 1}); model.result().export("img3").set("background", "color"); model.result().export("img3").set("qualitylevel", "92"); model.result().export("img3").set("qualityactive", "off"); model.result().export("img3").set("imagetype", "png"); model.result().export("img3").set("axes", "on"); System.out.println("adding export Er cathode perfect"); model.result().export().create("img4", "Image2D"); model.result().export("img4").name("Er cathode perfect"); model.result().export("img4") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_radial_cathode.png"); model.result().export("img4").set("sizedesc", "102 x 51 mm"); model.result().export("img4").set("view", "view5"); model.result().export("img4").set("width", "2400"); model.result().export("img4").set("plotgroup", "pg_er"); model.result().export("img4").set("height", "1200"); model.result().export("img4").set("unit", "px"); model.result().export("img4").set("height", "1200"); model.result().export("img4").set("width", "2400"); model.result().export("img4").set("lockratio", "off"); model.result().export("img4").set("resolution", "600"); model.result().export("img4").set("size", "manual"); model.result().export("img4").set("antialias", "on"); model.result().export("img4").set("title", "on"); model.result().export("img4").set("legend", "on"); model.result().export("img4").set("logo", "off"); model.result().export("img4").set("options", "on"); model.result().export("img4").set("fontsize", "5"); model.result().export("img4").set("customcolor", new double[]{1, 1, 1}); model.result().export("img4").set("background", "color"); model.result().export("img4").set("qualitylevel", "92"); model.result().export("img4").set("qualityactive", "off"); model.result().export("img4").set("imagetype", "png"); model.result().export("img4").set("axes", "on"); System.out.println("adding export Ez cathode perfect"); model.result().export().create("img5", "Image2D"); model.result().export("img5").name("Ez cathode perfect"); model.result().export("img5") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_z_cathode.png"); model.result().export("img5").set("sizedesc", "102 x 51 mm"); model.result().export("img5").set("view", "view5"); model.result().export("img5").set("width", "2400"); model.result().export("img5").set("plotgroup", "pg_ez"); model.result().export("img5").set("height", "1200"); model.result().export("img5").set("unit", "px"); model.result().export("img5").set("height", "1200"); model.result().export("img5").set("width", "2400"); model.result().export("img5").set("lockratio", "off"); model.result().export("img5").set("resolution", "600"); model.result().export("img5").set("size", "manual"); model.result().export("img5").set("antialias", "on"); model.result().export("img5").set("title", "on"); model.result().export("img5").set("legend", "on"); model.result().export("img5").set("logo", "off"); model.result().export("img5").set("options", "on"); model.result().export("img5").set("fontsize", "5"); model.result().export("img5").set("customcolor", new double[]{1, 1, 1}); model.result().export("img5").set("background", "color"); model.result().export("img5").set("qualitylevel", "92"); model.result().export("img5").set("qualityactive", "off"); model.result().export("img5").set("imagetype", "png"); model.result().export("img5").set("axes", "on"); System.out.println("adding export E cathode perfect"); model.result().export().create("img6", "Image2D"); model.result().export("img6").name("E cathode perfect"); model.result().export("img6") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_abs_cathode.png"); model.result().export("img6").set("sizedesc", "102 x 51 mm"); model.result().export("img6").set("view", "view5"); model.result().export("img6").set("width", "2400"); model.result().export("img6").set("plotgroup", "pg_e"); model.result().export("img6").set("height", "1200"); model.result().export("img6").set("unit", "px"); model.result().export("img6").set("height", "1200"); model.result().export("img6").set("width", "2400"); model.result().export("img6").set("lockratio", "off"); model.result().export("img6").set("resolution", "600"); model.result().export("img6").set("size", "manual"); model.result().export("img6").set("antialias", "on"); model.result().export("img6").set("title", "on"); model.result().export("img6").set("legend", "on"); model.result().export("img6").set("logo", "off"); model.result().export("img6").set("options", "on"); model.result().export("img6").set("fontsize", "5"); model.result().export("img6").set("customcolor", new double[]{1, 1, 1}); model.result().export("img6").set("background", "color"); model.result().export("img6").set("qualitylevel", "92"); model.result().export("img6").set("qualityactive", "off"); model.result().export("img6").set("imagetype", "png"); model.result().export("img6").set("axes", "on"); System.out.println("adding export Er ls perfect"); model.result().export().create("img13", "Image2D"); model.result().export("img13").name("Er ls perfect"); model.result().export("img13") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_radial_ls.png"); model.result().export("img13").set("sizedesc", "102 x 51 mm"); model.result().export("img13").set("view", "view6"); model.result().export("img13").set("width", "2400"); model.result().export("img13").set("plotgroup", "pg_er"); model.result().export("img13").set("height", "1200"); model.result().export("img13").set("unit", "px"); model.result().export("img13").set("height", "1200"); model.result().export("img13").set("width", "2400"); model.result().export("img13").set("lockratio", "off"); model.result().export("img13").set("resolution", "600"); model.result().export("img13").set("size", "manual"); model.result().export("img13").set("antialias", "on"); model.result().export("img13").set("title", "on"); model.result().export("img13").set("legend", "on"); model.result().export("img13").set("logo", "off"); model.result().export("img13").set("options", "on"); model.result().export("img13").set("fontsize", "5"); model.result().export("img13").set("customcolor", new double[]{1, 1, 1}); model.result().export("img13").set("background", "color"); model.result().export("img13").set("qualitylevel", "92"); model.result().export("img13").set("qualityactive", "off"); model.result().export("img13").set("imagetype", "png"); model.result().export("img13").set("axes", "on"); System.out.println("adding export Ez ls perfect"); model.result().export().create("img14", "Image2D"); model.result().export("img14").name("Ez ls perfect"); model.result().export("img14") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_z_ls.png"); model.result().export("img14").set("sizedesc", "102 x 51 mm"); model.result().export("img14").set("view", "view6"); model.result().export("img14").set("width", "2400"); model.result().export("img14").set("plotgroup", "pg_ez"); model.result().export("img14").set("height", "1200"); model.result().export("img14").set("unit", "px"); model.result().export("img14").set("height", "1200"); model.result().export("img14").set("width", "2400"); model.result().export("img14").set("lockratio", "off"); model.result().export("img14").set("resolution", "600"); model.result().export("img14").set("size", "manual"); model.result().export("img14").set("antialias", "on"); model.result().export("img14").set("title", "on"); model.result().export("img14").set("legend", "on"); model.result().export("img14").set("logo", "off"); model.result().export("img14").set("options", "on"); model.result().export("img14").set("fontsize", "5"); model.result().export("img14").set("customcolor", new double[]{1, 1, 1}); model.result().export("img14").set("background", "color"); model.result().export("img14").set("qualitylevel", "92"); model.result().export("img14").set("qualityactive", "off"); model.result().export("img14").set("imagetype", "png"); model.result().export("img14").set("axes", "on"); System.out.println("adding export E ls perfect"); model.result().export().create("img15", "Image2D"); model.result().export("img15").name("E ls perfect"); model.result().export("img15") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_abs_ls.png"); model.result().export("img15").set("sizedesc", "102 x 51 mm"); model.result().export("img15").set("view", "view6"); model.result().export("img15").set("width", "2400"); model.result().export("img15").set("plotgroup", "pg_e"); model.result().export("img15").set("height", "1200"); model.result().export("img15").set("unit", "px"); model.result().export("img15").set("height", "1200"); model.result().export("img15").set("width", "2400"); model.result().export("img15").set("lockratio", "off"); model.result().export("img15").set("resolution", "600"); model.result().export("img15").set("size", "manual"); model.result().export("img15").set("antialias", "on"); model.result().export("img15").set("title", "on"); model.result().export("img15").set("legend", "on"); model.result().export("img15").set("logo", "off"); model.result().export("img15").set("options", "on"); model.result().export("img15").set("fontsize", "5"); model.result().export("img15").set("customcolor", new double[]{1, 1, 1}); model.result().export("img15").set("background", "color"); model.result().export("img15").set("qualitylevel", "92"); model.result().export("img15").set("qualityactive", "off"); model.result().export("img15").set("imagetype", "png"); model.result().export("img15").set("axes", "on"); System.out.println("adding export Er solder perfect"); model.result().export().create("img19", "Image2D"); model.result().export("img19").name("Er solder perfect"); model.result().export("img19") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_radial_solder.png"); model.result().export("img19").set("sizedesc", "102 x 51 mm"); model.result().export("img19").set("view", "view7"); model.result().export("img19").set("width", "2400"); model.result().export("img19").set("plotgroup", "pg_er"); model.result().export("img19").set("height", "1200"); model.result().export("img19").set("unit", "px"); model.result().export("img19").set("height", "1200"); model.result().export("img19").set("width", "2400"); model.result().export("img19").set("lockratio", "off"); model.result().export("img19").set("resolution", "600"); model.result().export("img19").set("size", "manual"); model.result().export("img19").set("antialias", "on"); model.result().export("img19").set("title", "on"); model.result().export("img19").set("legend", "on"); model.result().export("img19").set("logo", "off"); model.result().export("img19").set("options", "on"); model.result().export("img19").set("fontsize", "5"); model.result().export("img19").set("customcolor", new double[]{1, 1, 1}); model.result().export("img19").set("background", "color"); model.result().export("img19").set("qualitylevel", "92"); model.result().export("img19").set("qualityactive", "off"); model.result().export("img19").set("imagetype", "png"); model.result().export("img19").set("axes", "on"); //chage image export attributes! System.out.println("adding export Ez solder perfect"); model.result().export().create("img20", "Image2D"); model.result().export("img20").name("Ez solder perfect"); model.result().export("img20") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_z_solder.png"); model.result().export("img20").set("sizedesc", "102 x 51 mm"); model.result().export("img20").set("view", "view7"); model.result().export("img20").set("width", "2400"); model.result().export("img20").set("plotgroup", "pg_ez"); model.result().export("img20").set("height", "1200"); model.result().export("img20").set("unit", "px"); model.result().export("img20").set("height", "1200"); model.result().export("img20").set("width", "2400"); model.result().export("img20").set("lockratio", "off"); model.result().export("img20").set("resolution", "600"); model.result().export("img20").set("size", "manual"); model.result().export("img20").set("antialias", "on"); model.result().export("img20").set("title", "on"); model.result().export("img20").set("legend", "on"); model.result().export("img20").set("logo", "off"); model.result().export("img20").set("options", "on"); model.result().export("img20").set("fontsize", "5"); model.result().export("img20").set("customcolor", new double[]{1, 1, 1}); model.result().export("img20").set("background", "color"); model.result().export("img20").set("qualitylevel", "92"); model.result().export("img20").set("qualityactive", "off"); model.result().export("img20").set("imagetype", "png"); model.result().export("img20").set("axes", "on"); System.out.println("adding export E solder perfect"); model.result().export().create("img21", "Image2D"); model.result().export("img21").name("E solder perfect"); model.result().export("img21") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_abs_solder.png"); model.result().export("img21").set("sizedesc", "102 x 51 mm"); model.result().export("img21").set("view", "view7"); model.result().export("img21").set("width", "2400"); model.result().export("img21").set("plotgroup", "pg_e"); model.result().export("img21").set("height", "1200"); model.result().export("img21").set("unit", "px"); model.result().export("img21").set("height", "1200"); model.result().export("img21").set("width", "2400"); model.result().export("img21").set("lockratio", "off"); model.result().export("img21").set("resolution", "600"); model.result().export("img21").set("size", "manual"); model.result().export("img21").set("antialias", "on"); model.result().export("img21").set("title", "on"); model.result().export("img21").set("legend", "on"); model.result().export("img21").set("logo", "off"); model.result().export("img21").set("options", "on"); model.result().export("img21").set("fontsize", "5"); model.result().export("img21").set("customcolor", new double[]{1, 1, 1}); model.result().export("img21").set("background", "color"); model.result().export("img21").set("qualitylevel", "92"); model.result().export("img21").set("qualityactive", "off"); model.result().export("img21").set("imagetype", "png"); model.result().export("img21").set("axes", "on"); System.out.println("adding export Er inner real"); model.result().export().create("img7", "Image2D"); model.result().export("img7").name("Er inner real"); model.result().export("img7") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_radial_strips_shorts.png"); model.result().export("img7").set("sizedesc", "102 x 51 mm"); model.result().export("img7").set("view", "view4"); model.result().export("img7").set("width", "2400"); model.result().export("img7").set("plotgroup", "pg_er1"); model.result().export("img7").set("height", "1200"); model.result().export("img7").set("unit", "px"); model.result().export("img7").set("height", "1200"); model.result().export("img7").set("width", "2400"); model.result().export("img7").set("lockratio", "off"); model.result().export("img7").set("resolution", "600"); model.result().export("img7").set("size", "manual"); model.result().export("img7").set("antialias", "on"); model.result().export("img7").set("title", "on"); model.result().export("img7").set("legend", "on"); model.result().export("img7").set("logo", "off"); model.result().export("img7").set("options", "on"); model.result().export("img7").set("fontsize", "5"); model.result().export("img7").set("customcolor", new double[]{1, 1, 1}); model.result().export("img7").set("background", "color"); model.result().export("img7").set("qualitylevel", "92"); model.result().export("img7").set("qualityactive", "off"); model.result().export("img7").set("imagetype", "png"); model.result().export("img7").set("axes", "on"); System.out.println("adding export Ez inner real"); model.result().export().create("img8", "Image2D"); model.result().export("img8").name("Ez inner real"); model.result().export("img8") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_z_strips_shorts.png"); model.result().export("img8").set("sizedesc", "102 x 51 mm"); model.result().export("img8").set("view", "view4"); model.result().export("img8").set("width", "2400"); model.result().export("img8").set("plotgroup", "pg_ez1"); model.result().export("img8").set("height", "1200"); model.result().export("img8").set("unit", "px"); model.result().export("img8").set("height", "1200"); model.result().export("img8").set("width", "2400"); model.result().export("img8").set("lockratio", "off"); model.result().export("img8").set("resolution", "600"); model.result().export("img8").set("size", "manual"); model.result().export("img8").set("antialias", "on"); model.result().export("img8").set("title", "on"); model.result().export("img8").set("legend", "on"); model.result().export("img8").set("logo", "off"); model.result().export("img8").set("options", "on"); model.result().export("img8").set("fontsize", "5"); model.result().export("img8").set("customcolor", new double[]{1, 1, 1}); model.result().export("img8").set("background", "color"); model.result().export("img8").set("qualitylevel", "92"); model.result().export("img8").set("qualityactive", "off"); model.result().export("img8").set("imagetype", "png"); model.result().export("img8").set("axes", "on"); System.out.println("adding export E inner real"); model.result().export().create("img9", "Image2D"); model.result().export("img9").name("E inner real"); model.result().export("img9") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_abs_strips_shorts.png"); model.result().export("img9").set("sizedesc", "102 x 51 mm"); model.result().export("img9").set("view", "view4"); model.result().export("img9").set("width", "2400"); model.result().export("img9").set("plotgroup", "pg_e1"); model.result().export("img9").set("height", "1200"); model.result().export("img9").set("unit", "px"); model.result().export("img9").set("height", "1200"); model.result().export("img9").set("width", "2400"); model.result().export("img9").set("lockratio", "off"); model.result().export("img9").set("resolution", "600"); model.result().export("img9").set("size", "manual"); model.result().export("img9").set("antialias", "on"); model.result().export("img9").set("title", "on"); model.result().export("img9").set("legend", "on"); model.result().export("img9").set("logo", "off"); model.result().export("img9").set("options", "on"); model.result().export("img9").set("fontsize", "5"); model.result().export("img9").set("customcolor", new double[]{1, 1, 1}); model.result().export("img9").set("background", "color"); model.result().export("img9").set("qualitylevel", "92"); model.result().export("img9").set("qualityactive", "off"); model.result().export("img9").set("imagetype", "png"); model.result().export("img9").set("axes", "on"); System.out.println("adding export Er cathode real"); model.result().export().create("img10", "Image2D"); model.result().export("img10").name("Er cathode real"); model.result().export("img10") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_radial_cathode_shorts.png"); model.result().export("img10").set("sizedesc", "102 x 51 mm"); model.result().export("img10").set("view", "view5"); model.result().export("img10").set("width", "2400"); model.result().export("img10").set("plotgroup", "pg_er1"); model.result().export("img10").set("height", "1200"); model.result().export("img10").set("unit", "px"); model.result().export("img10").set("height", "1200"); model.result().export("img10").set("width", "2400"); model.result().export("img10").set("lockratio", "off"); model.result().export("img10").set("resolution", "600"); model.result().export("img10").set("size", "manual"); model.result().export("img10").set("antialias", "on"); model.result().export("img10").set("title", "on"); model.result().export("img10").set("legend", "on"); model.result().export("img10").set("logo", "off"); model.result().export("img10").set("options", "on"); model.result().export("img10").set("fontsize", "5"); model.result().export("img10").set("customcolor", new double[]{1, 1, 1}); model.result().export("img10").set("background", "color"); model.result().export("img10").set("qualitylevel", "92"); model.result().export("img10").set("qualityactive", "off"); model.result().export("img10").set("imagetype", "png"); model.result().export("img10").set("axes", "on"); System.out.println("adding export Ez cathode real"); model.result().export().create("img11", "Image2D"); model.result().export("img11").name("Ez cathode real"); model.result().export("img11") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_z_cathode_shorts.png"); model.result().export("img11").set("sizedesc", "102 x 51 mm"); model.result().export("img11").set("view", "view5"); model.result().export("img11").set("width", "2400"); model.result().export("img11").set("plotgroup", "pg_ez1"); model.result().export("img11").set("height", "1200"); model.result().export("img11").set("unit", "px"); model.result().export("img11").set("height", "1200"); model.result().export("img11").set("width", "2400"); model.result().export("img11").set("lockratio", "off"); model.result().export("img11").set("resolution", "600"); model.result().export("img11").set("size", "manual"); model.result().export("img11").set("antialias", "on"); model.result().export("img11").set("title", "on"); model.result().export("img11").set("legend", "on"); model.result().export("img11").set("logo", "off"); model.result().export("img11").set("options", "on"); model.result().export("img11").set("fontsize", "5"); model.result().export("img11").set("customcolor", new double[]{1, 1, 1}); model.result().export("img11").set("background", "color"); model.result().export("img11").set("qualitylevel", "92"); model.result().export("img11").set("qualityactive", "off"); model.result().export("img11").set("imagetype", "png"); model.result().export("img11").set("axes", "on"); System.out.println("adding export E cathode real"); model.result().export().create("img12", "Image2D"); model.result().export("img12").name("E cathode real"); model.result().export("img12") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_abs_cathode_shorts.png"); model.result().export("img12").set("sizedesc", "102 x 51 mm"); model.result().export("img12").set("view", "view5"); model.result().export("img12").set("width", "2400"); model.result().export("img12").set("plotgroup", "pg_e1"); model.result().export("img12").set("height", "1200"); model.result().export("img12").set("unit", "px"); model.result().export("img12").set("height", "1200"); model.result().export("img12").set("width", "2400"); model.result().export("img12").set("lockratio", "off"); model.result().export("img12").set("resolution", "600"); model.result().export("img12").set("size", "manual"); model.result().export("img12").set("antialias", "on"); model.result().export("img12").set("title", "on"); model.result().export("img12").set("legend", "on"); model.result().export("img12").set("logo", "off"); model.result().export("img12").set("options", "on"); model.result().export("img12").set("fontsize", "5"); model.result().export("img12").set("customcolor", new double[]{1, 1, 1}); model.result().export("img12").set("background", "color"); model.result().export("img12").set("qualitylevel", "92"); model.result().export("img12").set("qualityactive", "off"); model.result().export("img12").set("imagetype", "png"); model.result().export("img12").set("axes", "on"); System.out.println("adding export Er ls real"); model.result().export().create("img16", "Image2D"); model.result().export("img16").name("Er ls real"); model.result().export("img16") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_radial_ls_shorts.png"); model.result().export("img16").set("sizedesc", "102 x 51 mm"); model.result().export("img16").set("view", "view6"); model.result().export("img16").set("width", "2400"); model.result().export("img16").set("plotgroup", "pg_er1"); model.result().export("img16").set("height", "1200"); model.result().export("img16").set("unit", "px"); model.result().export("img16").set("height", "1200"); model.result().export("img16").set("width", "2400"); model.result().export("img16").set("lockratio", "off"); model.result().export("img16").set("resolution", "600"); model.result().export("img16").set("size", "manual"); model.result().export("img16").set("antialias", "on"); model.result().export("img16").set("title", "on"); model.result().export("img16").set("legend", "on"); model.result().export("img16").set("logo", "off"); model.result().export("img16").set("options", "on"); model.result().export("img16").set("fontsize", "5"); model.result().export("img16").set("customcolor", new double[]{1, 1, 1}); model.result().export("img16").set("background", "color"); model.result().export("img16").set("qualitylevel", "92"); model.result().export("img16").set("qualityactive", "off"); model.result().export("img16").set("imagetype", "png"); model.result().export("img16").set("axes", "on"); System.out.println("adding export Ez ls real"); model.result().export().create("img17", "Image2D"); model.result().export("img17").name("Ez ls real"); model.result().export("img17") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_z_ls_shorts.png"); model.result().export("img17").set("sizedesc", "102 x 51 mm"); model.result().export("img17").set("view", "view6"); model.result().export("img17").set("width", "2400"); model.result().export("img17").set("plotgroup", "pg_ez1"); model.result().export("img17").set("height", "1200"); model.result().export("img17").set("unit", "px"); model.result().export("img17").set("height", "1200"); model.result().export("img17").set("width", "2400"); model.result().export("img17").set("lockratio", "off"); model.result().export("img17").set("resolution", "600"); model.result().export("img17").set("size", "manual"); model.result().export("img17").set("antialias", "on"); model.result().export("img17").set("title", "on"); model.result().export("img17").set("legend", "on"); model.result().export("img17").set("logo", "off"); model.result().export("img17").set("options", "on"); model.result().export("img17").set("fontsize", "5"); model.result().export("img17").set("customcolor", new double[]{1, 1, 1}); model.result().export("img17").set("background", "color"); model.result().export("img17").set("qualitylevel", "92"); model.result().export("img17").set("qualityactive", "off"); model.result().export("img17").set("imagetype", "png"); model.result().export("img17").set("axes", "on"); System.out.println("adding export E ls real"); model.result().export().create("img18", "Image2D"); model.result().export("img18").name("E ls real"); model.result().export("img18") .set("pngfilename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/perfect_field/field_abs_ls_shorts.png"); model.result().export("img18").set("sizedesc", "102 x 51 mm"); model.result().export("img18").set("view", "view6"); model.result().export("img18").set("width", "2400"); model.result().export("img18").set("plotgroup", "pg_e1"); model.result().export("img18").set("height", "1200"); model.result().export("img18").set("unit", "px"); model.result().export("img18").set("height", "1200"); model.result().export("img18").set("width", "2400"); model.result().export("img18").set("lockratio", "off"); model.result().export("img18").set("resolution", "600"); model.result().export("img18").set("size", "manual"); model.result().export("img18").set("antialias", "on"); model.result().export("img18").set("title", "on"); model.result().export("img18").set("legend", "on"); model.result().export("img18").set("logo", "off"); model.result().export("img18").set("options", "on"); model.result().export("img18").set("fontsize", "5"); model.result().export("img18").set("customcolor", new double[]{1, 1, 1}); model.result().export("img18").set("background", "color"); model.result().export("img18").set("qualitylevel", "92"); model.result().export("img18").set("qualityactive", "off"); model.result().export("img18").set("imagetype", "png"); model.result().export("img18").set("axes", "on"); System.out.println("adding export data along left"); model.result().export().create("data2", "Data"); model.result().export("data2").set("data", "cln1"); model.result().export("data2") .set("expr", new String[]{"es.Er", "es.Ez"}); model.result().export("data2").set("level", "line"); model.result().export("data2").set("unit", new String[]{"V/cm", "V/m"}); model.result().export("data2").set("resolution", "finer"); model.result().export("data2") .set("filename", "/home/mberger/fopiroot/fopiroot_dev/tpc_field_COMSOL/exports/field_along_lines2.txt"); model.result().export("data2") .set("descr", new String[]{"Electric field, r component", "Electric field, z component"}); } runfile.delete(); System.out.println("all done"); return model; } }