Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions SU2_PY/OptimalPropeller.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,29 +344,29 @@ def write_external_file(CTrs, CPrs):
# Automatically plot the computed propeller performance.

pl.figure(1)
pl.plot(r, dCt_optimal, "r", markersize=4, label="$\\frac{dCT}{d\overline{r}}$")
pl.plot(r, dCp, "k", markersize=4, label="$\\frac{dCP}{d\overline{r}}$")
pl.plot(r, dCt_optimal, "r", markersize=4, label=r"$\frac{dCT}{d\overline{r}}$")
pl.plot(r, dCp, "k", markersize=4, label=r"$\frac{dCP}{d\overline{r}}$")
pl.grid(True)
pl.legend(numpoints=3)
pl.xlabel("$\overline{r}$")
pl.xlabel(r"$\overline{r}$")
pl.ylabel("")
pl.title("Load Distribution")

pl.figure(2)
pl.plot(chi, a_optimal, "r", markersize=4, label="$a$")
pl.plot(chi, ap_optimal, "k", markersize=4, label="$a^1$")
pl.plot(chi, a_optimal, "r", markersize=4, label=r"$a$")
pl.plot(chi, ap_optimal, "k", markersize=4, label=r"$a^1$")
pl.grid(True)
pl.legend(numpoints=3)
pl.xlabel("$\chi$")
pl.xlabel(r"$\chi$")
pl.ylabel("")
pl.title("Interference Factors")

if prandtl_correction:
pl.figure(3)
pl.plot(r, F, "k", markersize=4)
pl.grid(True)
pl.xlabel("$\overline{r}$")
pl.ylabel("$F(\overline{r})$")
pl.xlabel(r"$\overline{r}$")
pl.ylabel(r"$F(\overline{r})$")
pl.title("Tip Loss Prandtl Correction Function")

pl.show()
9 changes: 6 additions & 3 deletions SU2_PY/SU2/run/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,14 @@ def run_command(Command):
"""
sys.stdout.flush()

# Use communicate() to continuously drain stderr and avoid deadlocks if the
# subprocess writes a lot of output to stderr.
proc = subprocess.Popen(
Command, shell=True, stdout=sys.stdout, stderr=subprocess.PIPE
)
return_code = proc.wait()
message = proc.stderr.read().decode()
_, stderr = proc.communicate()
return_code = proc.returncode
message = stderr.decode(errors="replace")

if return_code < 0:
message = "SU2 process was terminated by signal '%s'\n%s" % (
Expand All @@ -277,7 +280,7 @@ def run_command(Command):
raise SystemExit(message)
elif return_code > 0:
message = "Path = %s\nCommand = %s\nSU2 process returned error '%s'\n%s" % (
os.path.abspath(","),
os.path.abspath("."),
Command,
return_code,
message,
Expand Down
1 change: 0 additions & 1 deletion SU2_PY/parallel_computation_fsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ def parallel_computation(filename, partitions=0, compute=True):
config.SOLUTION_FILENAME = config.RESTART_FILENAME
elif config.SOLVER == "FLUID_STRUCTURE_INTERACTION":
config.SOLUTION_FILENAME = config.RESTART_FILENAME
config.SOLUTION_FILENAME = config.RESTART_FILENAME

info = SU2.run.merge(config)
state.update(info)
Expand Down
Loading