added preset saving and heat transfer

This commit is contained in:
2026-02-13 15:06:15 -06:00
parent f707c87f7e
commit a881a0a381
7 changed files with 559 additions and 20 deletions

View File

@@ -78,6 +78,7 @@ def draw_toroid(
output_path: str = "toroid.png",
dpi: int = 180,
fig_size_mm: float = 180.0,
actual_fill: float | None = None,
) -> None:
"""
Render a to-scale top-down cross-section of the transformer as a PNG.
@@ -110,9 +111,10 @@ def draw_toroid(
ax.set_xlabel("mm", fontsize=8)
ax.set_ylabel("mm", fontsize=8)
ax.tick_params(labelsize=7)
fill_str = f" fill={actual_fill*100:.1f}%" if actual_fill is not None else ""
ax.set_title(
f"Toroid cross-section "
f"ID={ID:.1f} mm OD={OD:.1f} mm H={core.height_mm:.1f} mm",
f"ID={ID:.1f} mm OD={OD:.1f} mm H={core.height_mm:.1f} mm{fill_str}",
fontsize=9, pad=6,
)