analyze_sweep(::XFoilSolver, definition, alphas, reynolds_number) can end the Julia process instead of returning. There is no exception, no stacktrace and the exit code is 0, so in a REPL it takes the session away and in a script it looks like a successful run that printed half its output. No try in the caller can catch it: it is a bare Fortran STOP inside XFoil, and gfortran exits 0 on one that carries no message.
How it shows up
Splitting the call on a contour that does it, Xfoil.set_coordinates(def.x, def.y) returns normally (n=239 nb=239) and Xfoil.solve_alpha(0.0, reynolds_number; reinit=true) never returns. Nothing on stdout, nothing on stderr, echo $? says 0.
The contours that do it are the ones whose upper and lower surfaces cross, which is what deform_section's re-wrap makes of a thin already-wrapped section (#321). Nine shapes from one mesh section of a kite wing, one per rolling-ball radius, all 239 nodes, each run in its own process:
min_concave_radius |
shortest panel |
neighbour ratio |
max turn |
crossing panel pairs |
XFoil |
| 0.05 |
8.03e-4 |
2.20 |
45.0° |
34 |
ended the process |
| 0.10 |
7.38e-4 |
4.14 |
48.3° |
34 |
returned |
| 0.15 |
2.08e-4 |
16.65 |
180.0° |
60 |
ended the process |
| 0.20 |
2.66e-4 |
14.45 |
180.0° |
58 |
ended the process |
| 0.30 |
3.09e-4 |
13.54 |
180.0° |
48 |
ended the process |
| 0.40 |
4.07e-4 |
3.54 |
180.0° |
29 |
returned |
| 0.60 |
3.82e-4 |
6.29 |
180.0° |
29 |
returned |
| 0.80 |
3.90e-4 |
5.53 |
180.0° |
35 |
returned |
the stored .dat, one wrap of the same cloud |
5.01e-4 |
7.50 |
32.3° |
0 |
returned |
The rows at 0.05 and 0.10 are the point: they agree on every column and disagree on life and death. So which of these XFoil walks into a STOP on is not something the caller — or a guard — can predict from the geometry. What is true of all eight is that none of them is a simple closed curve, which is the precondition a panel method actually has; the one contour with zero crossings is the only valid input in the set.
What I would do
Check the contour in analyze_sweep before handing it to XFoil and throw, so a section XFoil has no answer for is one failed sweep the caller can catch rather than the end of the session. #320 does that on branch agent/BeyondTheSim.jl-53, with the geometry above as its test.
Not the same concern as #274, which is XFoil's __init__ cost, nor #321, which is why the crossing contour is produced in the first place.
Reported as 1-Bart-1/BeyondTheSim.jl#53, where an example script lost its process this way after a fresh install.
analyze_sweep(::XFoilSolver, definition, alphas, reynolds_number)can end the Julia process instead of returning. There is no exception, no stacktrace and the exit code is 0, so in a REPL it takes the session away and in a script it looks like a successful run that printed half its output. Notryin the caller can catch it: it is a bare FortranSTOPinside XFoil, and gfortran exits 0 on one that carries no message.How it shows up
Splitting the call on a contour that does it,
Xfoil.set_coordinates(def.x, def.y)returns normally (n=239 nb=239) andXfoil.solve_alpha(0.0, reynolds_number; reinit=true)never returns. Nothing on stdout, nothing on stderr,echo $?says 0.The contours that do it are the ones whose upper and lower surfaces cross, which is what
deform_section's re-wrap makes of a thin already-wrapped section (#321). Nine shapes from one mesh section of a kite wing, one per rolling-ball radius, all 239 nodes, each run in its own process:min_concave_radius.dat, one wrap of the same cloudThe rows at 0.05 and 0.10 are the point: they agree on every column and disagree on life and death. So which of these XFoil walks into a
STOPon is not something the caller — or a guard — can predict from the geometry. What is true of all eight is that none of them is a simple closed curve, which is the precondition a panel method actually has; the one contour with zero crossings is the only valid input in the set.What I would do
Check the contour in
analyze_sweepbefore handing it to XFoil and throw, so a section XFoil has no answer for is one failed sweep the caller can catch rather than the end of the session. #320 does that on branchagent/BeyondTheSim.jl-53, with the geometry above as its test.Not the same concern as #274, which is XFoil's
__init__cost, nor #321, which is why the crossing contour is produced in the first place.Reported as 1-Bart-1/BeyondTheSim.jl#53, where an example script lost its process this way after a fresh install.