Skip to content
Snippets Groups Projects
Commit 922a10e2 authored by François Henrotte's avatar François Henrotte
Browse files

Use Print[{}, Format, File] in PostOperation

parent b6f84c96
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -257,9 +257,6 @@ Resolution{ ...@@ -257,9 +257,6 @@ Resolution{
// The run-time variable $newDmdt is used in Generate[A] // The run-time variable $newDmdt is used in Generate[A]
// whereas $circ, $dmdt, $argV and $phiTrailing are evaluated // whereas $circ, $dmdt, $argV and $phiTrailing are evaluated
// by the PostOperation[Trailing]. // 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"]; DeleteFile["KJiter.txt"];
...@@ -290,7 +287,6 @@ Resolution{ ...@@ -290,7 +287,6 @@ Resolution{
Print[{$syscount, $circ, $dmdt, $jac, $argV}, Print[{$syscount, $circ, $dmdt, $jac, $argV},
Format "iter = %3g Circ = %5.2f Dmdt = %5.2f jac=%5.2f argV = %5.3e"]; 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
} }
} }
...@@ -380,22 +376,25 @@ PostOperation{ ...@@ -380,22 +376,25 @@ PostOperation{
Echo[Str["l=PostProcessing.NbViews-1;", Echo[Str["l=PostProcessing.NbViews-1;",
"View[l].Name = 'stagnation points';", "View[l].Name = 'stagnation points';",
"View[l].ScaleType = 2; // log scale"], "View[l].ScaleType = 2; // log scale"],
File "tmp.geo", LastTimeStepOnly] ; File "tmp.geo"] ;
If( Flag_Object == 0 )
Print[phi, OnElementsOf Vol_rho, File "phi.pos"];
Else
// Show the isovalue "phi=$PhiTrailing" // Show the isovalue "phi=$PhiTrailing"
// which should be perpendicular to the airfoil // which is perpendicular to the airfoil
// if the Kutta condition is fulfilled // iff the Kutta condition is fulfilled
Print[phi, OnElementsOf Vol_rho, File "KJ.pos"]; Print[phi, OnElementsOf Vol_rho, File "KJ.pos"];
Echo[Str["Merge 'PhiTrailing.txt';", Print[{$phiTrailing, 1.001*$phiTrailing}, Format
"l=PostProcessing.NbViews-1;", Str["l=PostProcessing.NbViews-1;",
"View[l].Name = 'isovalue phiTrailing';", "View[l].Name = 'isovalue phiTrailing';",
"View[l].IntervalsType = 3;", "View[l].IntervalsType = 3;",
"Mesh.SurfaceEdges = 0; // hide mesh", "Mesh.SurfaceEdges = 0; // hide mesh",
"View[l].RangeType = 2; // custom range", "View[l].RangeType = 2; // custom range",
"View[l].CustomMin = PhiTrailing;", "View[l].CustomMin = %g;",
"View[l].CustomMax = 1.001*PhiTrailing;", "View[l].CustomMax = %g;"],
"View[l].NbIso = 10;"], File "tmp.geo"] ;
File "tmp.geo", LastTimeStepOnly] ; EndIf
} }
} }
} }
...@@ -409,6 +408,7 @@ PostOperation{ // for the Airfoil model ...@@ -409,6 +408,7 @@ PostOperation{ // for the Airfoil model
Print[Dmdt, OnRegion Sur_Cut, File > "KJiter.txt", Format Table, Print[Dmdt, OnRegion Sur_Cut, File > "KJiter.txt", Format Table,
StoreInVariable $dmdt, StoreInVariable $dmdt,
SendToServer "Output/Dmdt" ]; SendToServer "Output/Dmdt" ];
// P_edge = {1.0001,0,0}
Print[phi, OnPoint {1.0001,0,0}, File > "KJiter.txt", Color "Ivory", Print[phi, OnPoint {1.0001,0,0}, File > "KJiter.txt", Color "Ivory",
StoreInVariable $phiTrailing, StoreInVariable $phiTrailing,
Format Table, SendToServer "Output/PhiTrailing"]; Format Table, SendToServer "Output/PhiTrailing"];
...@@ -420,7 +420,6 @@ PostOperation{ // for the Airfoil model ...@@ -420,7 +420,6 @@ PostOperation{ // for the Airfoil model
} }
} }
DefineConstant[ DefineConstant[
R_ = {"PotentialFlow", Name "GetDP/1ResolutionChoices", Visible 0}, R_ = {"PotentialFlow", Name "GetDP/1ResolutionChoices", Visible 0},
C_ = {"-solve -pos", Name "GetDP/9ComputeCommand", Visible 0}, C_ = {"-solve -pos", Name "GetDP/9ComputeCommand", Visible 0},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment