Skip to content
Snippets Groups Projects
Commit ea5fffea authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

cleanup

parent dc36cadb
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,6 @@ Function{
nu[Region[{Domain,-Core}]] = 1/mu0; // linear
dnudb2[] = dInterpolationLinear[SquNorm[$1]]{List[Mat1_nu_b2]} ;
dnudb_1[] = 2.0*dInterpolationLinear[SquNorm[$1]]{List[Mat1_nu_b2]}*SquDyadicProduct[$1];
dhdb_NL[Core] = 2*dnudb2[$1#1] * SquDyadicProduct[#1];
// This is the current density which feeds the inductor.
......@@ -321,30 +320,34 @@ PostProcessing {
}
}
PostOperation Get_ObjectiveConstraints UsingPost ObjectiveConstraints {
CreateDir[Opt_ResDir];
Print[w,
OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
Format SimpleTable, File StrCat[Opt_ResDir,"w.txt"]];
Print[bMag,
OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
Format SimpleTable, File StrCat[Opt_ResDir,"bMag.txt"]];
Print[az, OnElementsOf Domain, Format NodeTable, File "",
SendToServer StrCat[Opt_ResDir_Onelab,"a"], Hidden 1];
//Print[bMag, OnElementsOf Domain, File StrCat[Opt_ResDir,"az.pos"]];
//Print[az, OnElementsOf Domain, File StrCat[Opt_ResDir,"az.pos"]];
Print[bTarget, OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
File StrCat[Opt_ResDir,"bTarget.pos"]];
Print[b, OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
File StrCat[Opt_ResDir,"b.pos"]];
If(Flag_PrintLevel>5)
Print[mur, OnElementsOf Domain, File StrCat[Opt_ResDir,"mur.pos"]];
Print[az, OnElementsOf Domain, File StrCat[Opt_ResDir,"az.pos"]];
Print[a, OnElementsOf Domain, File StrCat[Opt_ResDir,"a.pos"]];
Print[b, OnElementsOf Domain, File StrCat[Opt_ResDir,"b.pos"]];
Print[bMag, OnElementsOf Domain, File StrCat[Opt_ResDir,"bMag.pos"]];
Print[js, OnElementsOf Coil, File StrCat[Opt_ResDir,"js.pos"]];
EndIf
PostOperation {
{ Name Get_ObjectiveConstraints; NameOfPostProcessing ObjectiveConstraints;
Operation{
CreateDir[Opt_ResDir];
Print[w,
OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
Format SimpleTable, File StrCat[Opt_ResDir,"w.txt"]];
Print[bMag,
OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
Format SimpleTable, File StrCat[Opt_ResDir,"bMag.txt"]];
Print[az, OnElementsOf Domain, Format NodeTable, File "",
SendToServer StrCat[Opt_ResDir_Onelab,"a"], Hidden 1];
//Print[bMag, OnElementsOf Domain, File StrCat[Opt_ResDir,"az.pos"]];
//Print[az, OnElementsOf Domain, File StrCat[Opt_ResDir,"az.pos"]];
Print[bTarget, OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
File StrCat[Opt_ResDir,"bTarget.pos"]];
Print[b, OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
File StrCat[Opt_ResDir,"b.pos"]];
If(Flag_PrintLevel>5)
Print[mur, OnElementsOf Domain, File StrCat[Opt_ResDir,"mur.pos"]];
Print[az, OnElementsOf Domain, File StrCat[Opt_ResDir,"az.pos"]];
Print[a, OnElementsOf Domain, File StrCat[Opt_ResDir,"a.pos"]];
Print[b, OnElementsOf Domain, File StrCat[Opt_ResDir,"b.pos"]];
Print[bMag, OnElementsOf Domain, File StrCat[Opt_ResDir,"bMag.pos"]];
Print[js, OnElementsOf Coil, File StrCat[Opt_ResDir,"js.pos"]];
EndIf
}
}
}
// -------------------------------------------------------------------------
......@@ -359,9 +362,13 @@ PostProcessing{
}
}
PostOperation Get_GradOf_w UsingPost Direct_MagSta {
Print[Lie_w, OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A], 0} { 0:50*Pi/180:5*Pi/180, 0, 0 },
Format SimpleTable, File StrCat[Opt_ResDir,Sprintf["Grad_w_wrt_dv_%g.txt",VelocityTag]]];
PostOperation{
{ Name Get_GradOf_w; NameOfPostProcessing Direct_MagSta;
Operation {
Print[Lie_w, OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A], 0} { 0:50*Pi/180:5*Pi/180, 0, 0 },
Format SimpleTable, File StrCat[Opt_ResDir,Sprintf["Grad_w_wrt_dv_%g.txt",VelocityTag]]];
}
}
}
// Show useful data
......@@ -374,10 +381,14 @@ PostProcessing {
}
}
PostOperation Show_shape UsingPost Show_shape{
CreateDir[Opt_ResDir];
Print[ VV, OnElementsOf Domain,File StrCat[Opt_ResDir, "velocity.pos"] ];
Print[ Lie_az, OnElementsOf Domain,File StrCat[Opt_ResDir, "Lie_az.pos"] ];
PostOperation{
{ Name Show_shape; NameOfPostProcessing Show_shape;
Operation {
CreateDir[Opt_ResDir];
Print[ VV, OnElementsOf Domain,File StrCat[Opt_ResDir, "velocity.pos"] ];
Print[ Lie_az, OnElementsOf Domain,File StrCat[Opt_ResDir, "Lie_az.pos"] ];
}
}
}
// -------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment