Examples
Choose a named example in the editor and click Open example. Values are illustrative.
Reference diagrams support visual comparison of schematic structure and notation. This does not establish model equivalence or numerical agreement. The automated checks described below apply to the implemented models with the stated parameters and assumptions.
| Example ID | Purpose |
|---|---|
Hydraulics: two compliances and an inertancearticle | Original hydraulic example with two C elements and one I; linear model, automatically migrated to document v3 in the editor. |
Electrical: RLC ladder circuitelectrical_rlc | Electrical: RLC ladder circuit. Voltage source → R1 → C1 node → L → C2/R2 node, with an implicit common return. Uses the supplied 1–0–1–0 junction chain. Illustrative values: Vi = 10 V, R1 = 10 Ω, R2 = 20 Ω, C1 = 0.01 F, C2 = 0.02 F, L = 0.5 H. Zero initial states; 3 s simulation. Default charts show the two capacitor voltages. |
Translational mechanics: two masses, spring and dampersmechanical_two_mass | Two masses connected by a spring and damper, with an applied force on M1 and a grounded damper on M2. Uses force as effort, velocity as flow, Se for force, 1-junctions for mass velocities, and C = 1/k for the spring. Illustrative parameters: M1 = 1 kg, M2 = 2 kg, k = 20 N/m, B1 = 2 N·s/m, B2 = 3 N·s/m, force = 1 N. The source diagrams use the dual convention, so their 0/1 junctions and force-source notation differ. This example models the original system without the optional K0/B0 contact compliance. |
Hydraulics: 7A pump curvepump_7a_characteristic | Pump between prescribed suction and delivery pressures. Change backpressure to sample its curve; the delivery Se is an ideal pressure boundary. |
Hydraulics: 7A bench with cylinder and accumulatorpump_7a_cylinder_accumulator | 7A pump, main compliance, accumulator and its line, 4/3 valve, chamber compliances, cylinder and mechanical load. |
Hydraulics: 7A bench without accumulatorpump_7a_without_accumulator | The same bench with the entire accumulator branch removed. Other storage can still support brief motion after pump shutdown. |
signal_tank_constant | Tank connected directly to one-power-port MR; external signal: constant |
signal_tank_boolean | Tank connected directly to one-power-port MR; external signal: boolean |
signal_tank_piecewise_constant | Tank connected directly to one-power-port MR; external signal: piecewise constant |
signal_tank_piecewise_linear | Tank connected directly to one-power-port MR; external signal: piecewise linear |
pump_7a_proportional | Proportional valve signal in the existing cylinder circuit, without adding MR. |
Rotational mechanics: geared elastic shaftrotational_geared_system | Geared elastic shaft |
hydraulic_transformer | Ideal pressure transformer |
mechanical_transformer | Four-strand polyspast lift |
Frozen bench schedule
| Interval [s] | Pump | Valve | Phase |
|---|---|---|---|
| 0–3 | On | hold | Charge |
| 3–3.5 | On | extend | Extend |
| 3.5–4 | On | hold | Closed center |
| 4–4.5 | On | retract | Retract |
| 4.5–6 | On | hold | Recharge |
| 6–6.3 | Off | extend | Stored-energy motion |
| 6.3–7 | Off | hold | Closed center |
At a switch, states remain continuous and algebraic outputs use the new command. A source step follows the same rule. The solver adds switching times to the output grid when needed.
Electrical domain
Effort is voltage in volts (V); flow is current in amperes (A). The palette offers common voltage (0), common current (1), resistor R (Ω), capacitor C (F), inductor I (H), voltage source Se and current source Sf. I is the bond-graph symbol; L is its inductance. Electrical ports use E and violet bonds. Advanced currently has no electrical components.
Capacitor state is charge q in coulombs (C): v = q/C and q₀ = C·v₀. Inductor state is flux linkage λ in webers (Wb): i = λ/L and λ₀ = L·i₀. Enter SI values, not mF or mH. The common return conductor is the implicit zero-voltage reference; no hydraulic reference pressure applies.
C1 dv1/dt = (vi − v1)/R1 − iL L diL/dt = v1 − v2 C2 dv2/dt = iL − v2/R2
For the RLC example, v1 = b4.e, v2 = b9.e, i1 = b1.f, i2 = b4.f, i3 = b6.f, i4 = b9.f, i5 = b8.f. At DC, both voltages tend to 6.667 V and inductor current to 0.333 A. Parameters are illustrative because the supplied schematic has no numerical values.
Electrical circuit with an ideal transformer
electrical_transformer. Electrical circuit with an ideal transformer TF, resistors R1, R2, R3, capacitors C1, C2, and inductor L. Numerical values are chosen for demonstration and implementation checks. Select Electrical: ideal transformer in the example list.
Vi = 10 V; R1 = 10 Ω; R3 = 5 Ω; R2 = 20 Ω; C1 = 0.01 F; C2 = 0.02 F; L = 0.5 H; n = 2. Zero initial states; duration 5 s.
Se → 1 → 0 → 1 → TF → 1
R1 C1 R3,L R2,C2
n = N1/N2
C1 du1/dt = (vi − u1)/R1 − i1
L di1/dt = u1 − (R3 + n² R2) i1 − n u2
C2 du2/dt = n i1u1 = b4.e; u2 = b11.e; i1 = b8.f; i2 = b9.f. Steady state: u1 = 10 V, u2 = 5 V, i1 = i2 = 0 A.
Verification checks: independent Kirchhoff equations, energy balance, the circuit referred to the primary winding, causality, and reversal of bond references.
E = C1 u1²/2 + L i1²/2 + C2 u2²/2 dE/dt = vi i_in − R1 i_in² − R3 i1² − R2 i2² R2_referred = n² R2; C2_referred = C2/n²
Geared elastic shaft
Open Rotational mechanics: geared elastic shaft. Torque source Se drives inertia Jm through a common angular-velocity junction, with damping Bm to the support. Ideal gear TF connects to a common-torque junction that splits angular velocity into load speed and relative shaft speed. Spring K and damper B act in parallel on that relative motion. The load contains JL and damping BL.
Illustrative SI values, not measured data: Jm = 1 kg·m², JL = 2 kg·m², Bm = 1, B = 2, BL = 3 N·m·s/rad, K = 20 N·m/rad, n = 0.5, Tm = 1 N·m. All initial states are zero. Duration: 10 s; 1,001 points; rtol = 1e-7. The spring stores C = 0.05 rad/(N·m) in JSON.
τ = K·δ + B·(n·ωm − ωL)
Jm·dωm/dt = Tm − Bm·ωm − n·τ
JL·dωL/dt = τ − BL·ωL
dδ/dt = n·ωm − ωL
dE/dt = Tm·ωm − Bm·ωm² − BL·ωL² − B·(n·ωm − ωL)²
Effort is torque, flow is angular velocity, and the applied torque uses Se. The dual representation with exchanged variables is not used. Shaft axes are chosen so ωT = n·ωm, although external gears physically rotate in opposite directions. Gear losses, backlash, dry friction and tooth inertia are omitted. Absolute shaft angles are not integrated; spring twist δ is available.
Verification compares independent integration of the shaft equations at n = 0.5, 1 and 2, with nonzero initial states and a torque step. Tests cover gear power conservation, energy balance with all three dampers, integral causality, excitation from either TF port and bond-reference reversal. A mixed-domain model is checked separately.
Ideal hydraulic pressure transformer
Choose Hydraulics: ideal pressure transformer (hydraulic_transformer). Two pistons on a common rod illustrate ideal conversion: Aₛ/Aₚ = n = 0.5. The piston backs are at reference pressure. This is a power-conversion sketch; piston dynamics and stroke limits are excluded.
Pressure:Se ──b1──→ P [TF: n=0.5] S ──b2──→ Resistance:R
Source pressure is zero before 1 s and 100000 Pa afterward. R = 10⁹ Pa·s/m³. No stored states; duration 3 s, 301 points. All quantities change immediately at the step.
QS,out = pS/R = 0.0002 m³/s
QP,in = QS,out/n = 0.0004 m³/s
pP·QP,in = pS·QS,out = 40 W
Default charts show pressures b1.e and b2.e. Select flows b1.f, b2.f and powers b1.power, b2.power to compare. All are zero before 1 s. See the TF reference.
Four-strand polyspast lift
Choose Translational mechanics: four-strand polyspast lift (mechanical_transformer). Four parallel rope strands support the moving block; the final fixed pulley redirects the pulled end. P represents the pulled rope and S the lifted load. n = 1/4 gives four times the pulling force and one-quarter of the rope speed at the load.
Pull:Se ──b1──→ P [TF: n=0.25] S ──b2──→ 1:Load
├──b3──→ I:Mass
└──b4──→ Se:Gravity
m = 10 kg; g = 9.80665 m/s²; weight = 98.0665 N; initial momentum is zero. Pull = 24.516625 N before 1 s and 30 N afterward. Gravity is a constant effort source on an outgoing junction bond, opposing the lift. Duration 3 s, 301 points. Force excitation preserves integral causality for the mass.
m·dvload/dt = Fpull/n − m·g
t < 1: vload = 0
t ≥ 1: Fload = 120 N; a = 2.19335 m/s²
vload = 2.19335·(t−1); vrope = 4·vload
Fpull·vrope = d(½m·vload²)/dt + m·g·vload
Default charts show b1.f (rope speed) and b2.f (load speed). At 3 s these are 17.5468 and 4.3867 m/s. b2.e is the lifting force; b3.e is the net force on the mass after subtracting weight. Mass.state is momentum, not height. Powers b1 and b2 agree.
Assumes a taut, inextensible rope and frictionless, massless pulleys. The positive input axis follows the rope pull; the positive output axis points upward. Height, travel limits and slack-rope behavior are not modeled. The same TF primitive also models an ideal lever with a constant motion ratio.