diff --git a/PotentialFlow/magnus.pro b/PotentialFlow/magnus.pro index 8a45487029c4658de826e02883cd350e16ce01be..d34d6cd27dcb2681f7f3375562a6d0898c63c96f 100644 --- a/PotentialFlow/magnus.pro +++ b/PotentialFlow/magnus.pro @@ -257,9 +257,6 @@ Resolution{ // The run-time variable $newDmdt is used in Generate[A] // whereas $circ, $dmdt, $argV and $phiTrailing are evaluated // by the PostOperation[Trailing]. - // A file containing "PhiTrailing = $phiTrailing;" is - // after convergence written on disk to be used - // for formatting purposes in the PostOperation section. DeleteFile["KJiter.txt"]; @@ -290,8 +287,7 @@ Resolution{ Print[{$syscount, $circ, $dmdt, $jac, $argV}, Format "iter = %3g Circ = %5.2f Dmdt = %5.2f jac=%5.2f argV = %5.3e"]; } - Print[{$phiTrailing}, Format "PhiTrailing=%g;", File "PhiTrailing.txt"]; - EndIf + EndIf } } } @@ -377,25 +373,28 @@ PostOperation{ // Stagnation points are points where Norm[{d phi}] is zero // This is better seen in log scale. Print[normVelocity, OnElementsOf Vol_rho, File "p.pos"]; - Echo[ Str["l=PostProcessing.NbViews-1;", - "View[l].Name = 'stagnation points';", - "View[l].ScaleType = 2; // log scale"], - File "tmp.geo", LastTimeStepOnly] ; + Echo[Str["l=PostProcessing.NbViews-1;", + "View[l].Name = 'stagnation points';", + "View[l].ScaleType = 2; // log scale"], + File "tmp.geo"] ; - // Show the isovalue "phi=$PhiTrailing" - // which should be perpendicular to the airfoil - // if the Kutta condition is fulfilled - Print[phi, OnElementsOf Vol_rho, File "KJ.pos"]; - Echo[Str["Merge 'PhiTrailing.txt';", - "l=PostProcessing.NbViews-1;", - "View[l].Name = 'isovalue phiTrailing';", - "View[l].IntervalsType = 3;", - "Mesh.SurfaceEdges = 0; // hide mesh", - "View[l].RangeType = 2; // custom range", - "View[l].CustomMin = PhiTrailing;", - "View[l].CustomMax = 1.001*PhiTrailing;", - "View[l].NbIso = 10;"], - File "tmp.geo", LastTimeStepOnly] ; + If( Flag_Object == 0 ) + Print[phi, OnElementsOf Vol_rho, File "phi.pos"]; + Else + // Show the isovalue "phi=$PhiTrailing" + // which is perpendicular to the airfoil + // iff the Kutta condition is fulfilled + Print[phi, OnElementsOf Vol_rho, File "KJ.pos"]; + Print[{$phiTrailing, 1.001*$phiTrailing}, Format + Str["l=PostProcessing.NbViews-1;", + "View[l].Name = 'isovalue phiTrailing';", + "View[l].IntervalsType = 3;", + "Mesh.SurfaceEdges = 0; // hide mesh", + "View[l].RangeType = 2; // custom range", + "View[l].CustomMin = %g;", + "View[l].CustomMax = %g;"], + File "tmp.geo"] ; + EndIf } } } @@ -409,7 +408,8 @@ PostOperation{ // for the Airfoil model Print[Dmdt, OnRegion Sur_Cut, File > "KJiter.txt", Format Table, StoreInVariable $dmdt, SendToServer "Output/Dmdt" ]; - Print[phi, OnPoint{1.0001,0,0}, File > "KJiter.txt", Color "Ivory", + // P_edge = {1.0001,0,0} + Print[phi, OnPoint {1.0001,0,0}, File > "KJiter.txt", Color "Ivory", StoreInVariable $phiTrailing, Format Table, SendToServer "Output/PhiTrailing"]; @@ -420,7 +420,6 @@ PostOperation{ // for the Airfoil model } } - DefineConstant[ R_ = {"PotentialFlow", Name "GetDP/1ResolutionChoices", Visible 0}, C_ = {"-solve -pos", Name "GetDP/9ComputeCommand", Visible 0},