TX

Transformer

Physical Networks
Run the live example Free · no sign-up · runs in your browser

Acausal electrical transformer coupling primary terminals (p1, n1) and secondary terminals (p2, n2) by turns ratio N=Np/NsN = N_p / N_s. Supports optional primary and secondary copper winding resistances (RpR_p, RsR_s) with thermal loss export on q_diss and H.

Mathematical Model

Vp1−Vn1=N(Vp2−Vn2)−(NRs+RpN)Is,Ip=−IsN,Qdiss=Ip2Rp+Is2RsV_{p1} - V_{n1} = N(V_{p2} - V_{n2}) - \left(N R_s + \frac{R_p}{N}\right) I_s, \qquad I_p = -\frac{I_s}{N}, \qquad Q_{\text{diss}} = I_p^2 R_p + I_s^2 R_s

Inputs & Outputs

Direction ID Label Type Status
→ In p1 P+ number Required
→ In n1 P- number Required
→ In p2 S+ number Required
→ In n2 S- number Required
→ In H H number Optional
← Out q_diss Q_diss number Output

Parameters

Parameters Label Type Default Description
turnsRatio Turns Ratio (N = Np / Ns) number 10 Primary-to-secondary turns ratio (> 1 for step-down, < 1 for step-up)
primaryResistance Primary Resistance (Rp) number 0 Primary winding series resistance in Ohms
secondaryResistance Secondary Resistance (Rs) number 0 Secondary winding series resistance in Ohms

Usage Examples

Example 1: 10:1 Step-Down Power Supply

Drive p1/n1 with a 230 V AC VoltageSource through a turnsRatio = 10 Transformer into a Diode rectifier and Resistor load.

Example 2: Winding Loss Thermal Coupling

Set secondaryResistance = 1 Ω and connect H to a ThermalMass to observe copper I2RI^2 R heating.

Remarks & Best Practices

  • Ground Reference: Always connect both primary and secondary return paths (n1, n2) to Ground (or via a high-value resistor) so the MNA matrix stays non-singular.
  • Impedance Reflection: A load resistance RLR_L on the secondary reflects to the primary as N2RLN^2 R_L.

Related Components

  • Inductor/docs.md" class="bw-link">Inductor
  • Diode/docs.md" class="bw-link">Diode
  • VoltageSource/docs.md" class="bw-link">VoltageSource