-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Context
Dependency for #55 (PLECS exporter). We need 4 sample .plecs files to reverse-engineer the XML schema before implementing the exporter.
Place all files in tests/testData/plecs/.
File 1: simple_inductor.plecs
Topology: Single-winding gapped inductor
| Parameter | Value |
|---|---|
| Core shape | E32/16/9 (simplified as single magnetic path) |
| Core material | N87, μᵣ = 2200 |
| Core cross-section | A = 83.2 mm² = 83.2e-6 m² |
| Core magnetic path length | l_core = 72.7 mm = 72.7e-3 m |
| Air gap length | l_gap = 1.0 mm = 1.0e-3 m |
| Air gap cross-section | A_gap = 83.2 mm² (same as core) |
| Winding | N = 20 turns |
Magnetic circuit (series loop):
Winding (N=20)
│
├── Constant Permeance "Core" P_core = μ₀·μᵣ·A/l = 4π×10⁻⁷ × 2200 × 83.2e-6 / 72.7e-3 ≈ 3.164e-6 Wb/A·t
│
├── Constant Permeance "AirGap" P_gap = μ₀·A/l = 4π×10⁻⁷ × 83.2e-6 / 1.0e-3 ≈ 1.045e-7 Wb/A·t
│
└── Magnetic Ground
Electrical side: Leave winding terminals unconnected or connect a voltage source if needed.
File 2: transformer.plecs
Topology: Two-winding transformer with core losses, no air gap
| Parameter | Value |
|---|---|
| Core shape | E42/21/15 (simplified as single magnetic path) |
| Core material | N87, μᵣ = 2200 |
| Core cross-section | A = 178 mm² = 178e-6 m² |
| Core magnetic path length | l_core = 97.2 mm = 97.2e-3 m |
| Air gap | None (ungapped) |
| Primary winding | N₁ = 24 turns |
| Secondary winding | N₂ = 12 turns |
| Core loss equivalent | Rm = 5.0e6 A·t·s/Wb |
Magnetic circuit:
┌── Winding "Primary" (N=24)
│
Node_A ──┤── Winding "Secondary" (N=12)
│
├── Constant Permeance "Core" P_core = μ₀·μᵣ·A/l ≈ 5.060e-6 Wb/A·t
│
├── Magnetic Resistance "CoreLoss" Rm = 5.0e6 A·t·s/Wb (in series with core permeance)
│
└── Magnetic Ground
Both windings connect to the same magnetic node (Node_A). Permeance and Magnetic Resistance in series between Node_A and Ground.
File 3: saturable_inductor.plecs
Topology: Single-winding gapped inductor with nonlinear core
| Parameter | Value |
|---|---|
| Core shape | E32/16/9 |
| Core material | N87 — use Saturable Core with BH curve |
| Core cross-section | A = 83.2 mm² = 83.2e-6 m² |
| Core magnetic path length | l_core = 72.7 mm = 72.7e-3 m |
| Air gap length | l_gap = 0.5 mm = 0.5e-3 m |
| Air gap cross-section | A_gap = 83.2e-6 m² |
| Winding | N = 20 turns |
Magnetic circuit:
Winding (N=20)
│
├── Saturable Core "Core" A = 83.2e-6 m², l = 72.7e-3 m, BH curve = N87
│
├── Constant Permeance "AirGap" P_gap = μ₀·A/l = 4π×10⁻⁷ × 83.2e-6 / 0.5e-3 ≈ 2.091e-7 Wb/A·t
│
└── Magnetic Ground
For the Saturable Core BH curve, use N87 data (at least 5-10 B-H points from 0 to 0.4 T).
File 4: ecore_transformer.plecs
Topology: E-core transformer with explicit 3-leg magnetic circuit and center-leg air gap
| Parameter | Value |
|---|---|
| Core shape | E42/21/15 |
| Core material | N87, μᵣ = 2200 |
| Center leg cross-section | A_center = 178 mm² = 178e-6 m² |
| Center leg length | l_center = 42 mm = 42e-3 m |
| Outer leg cross-section | A_outer = 89 mm² = 89e-6 m² |
| Outer leg length | l_outer = 42e-3 m |
| Top/bottom plate length | l_plate = 27.6 mm = 27.6e-3 m (each side) |
| Top/bottom plate cross-section | A_plate = 89e-6 m² |
| Center leg air gap | l_gap = 1.0 mm, A_gap = 178e-6 m² |
| Primary winding | N₁ = 24 turns (on center leg) |
| Secondary winding | N₂ = 12 turns (on center leg) |
Magnetic circuit (3-branch, simplified):
Node_Top
/ | \
P_outer_L | P_outer_R
| | |
| P_gap |
| | |
| Node_W |
| | |
| Winding "Pri" (N=24)
| Winding "Sec" (N=12)
| | |
| P_center |
\ | /
Node_Bot
│
Magnetic Ground
| Element | Formula | Value |
|---|---|---|
| P_center | μ₀·μᵣ·A_center/l_center | ≈ 1.172e-5 Wb/A·t |
| P_outer_L | μ₀·μᵣ·A_outer/(l_outer + 2·l_plate) | ≈ 2.530e-6 Wb/A·t |
| P_outer_R | same as P_outer_L | ≈ 2.530e-6 Wb/A·t |
| P_gap | μ₀·A_gap/l_gap | ≈ 2.237e-7 Wb/A·t |
Acceptance Criteria
- All 4
.plecsfiles committed totests/testData/plecs/ - Files open correctly in PLECS
- Parameter values match the specs above