|
20 | 20 | import re |
21 | 21 | import sys |
22 | 22 | import numpy as np |
23 | | -import matplotlib.pyplot as plt |
24 | 23 | from pathlib import Path |
25 | 24 |
|
26 | 25 |
|
@@ -283,39 +282,6 @@ def process_config(case_dir: Path) -> dict | None: |
283 | 282 | print(f" Saved: {out_path.relative_to(case_dir.parent)}") |
284 | 283 | return metrics |
285 | 284 |
|
286 | | - |
287 | | -# # --------------------------------------------------------------------------- |
288 | | -# # Convergence plot |
289 | | -# # --------------------------------------------------------------------------- |
290 | | - |
291 | | -# def plot_convergence(results: list, results_dir: Path): |
292 | | -# results.sort(key=lambda d: d["cells_radial"]) |
293 | | - |
294 | | -# confs = [d["conf"] for d in results] |
295 | | -# p_errors = [d["l2_error_pressure_rel"] for d in results] |
296 | | -# v_errors = [d["l2_error_velocity_rel"] for d in results] |
297 | | - |
298 | | -# fig, ax = plt.subplots(figsize=(10, 6)) |
299 | | -# ax.plot(confs, p_errors, marker="o", linewidth=1.5, |
300 | | -# label=r"Relative $L^2$ Error — Pressure") |
301 | | -# ax.plot(confs, v_errors, marker="s", linewidth=1.5, |
302 | | -# label=r"Relative $L^2$ Error — Velocity") |
303 | | - |
304 | | -# ax.set_yscale("log") |
305 | | -# ax.set_xlabel("Configuration") |
306 | | -# ax.set_ylabel("Relative $L^2$ Error") |
307 | | -# ax.set_title("OpenFOAM Rotating Cylinders — Convergence Summary") |
308 | | -# ax.legend() |
309 | | -# ax.grid(True, which="both", linestyle="-", alpha=0.3) |
310 | | -# plt.xticks(rotation=45) |
311 | | -# plt.tight_layout() |
312 | | - |
313 | | -# plot_path = results_dir / "solution_metrics_plot.png" |
314 | | -# fig.savefig(plot_path, dpi=150) |
315 | | -# plt.close(fig) |
316 | | -# print(f"\nConvergence plot saved to: {plot_path}") |
317 | | - |
318 | | - |
319 | 285 | # --------------------------------------------------------------------------- |
320 | 286 | # Entry point |
321 | 287 | # --------------------------------------------------------------------------- |
|
0 commit comments