BGMod Documentation / v3

Dimensionless signals, MR and tank

Signal sources

Select Dimensionless Signal → Primitives. Signals carry one scalar with unit 1, no power. Connect out to a component’s u input. An output may feed several inputs; an input accepts exactly one source. Dashed pink wires have arrows but no power-bond causality strokes.

Block / typeParameters and behavior
Constant / SignalConstantFinite value; default 1.
Boolean Schedule / BooleanSchedule1–200 points; numeric values 0 or 1; default on.
Piecewise Constant / PiecewiseConstant1–200 points; finite scalar values; default 1.
Piecewise Linear / PiecewiseLinear2–200 points; interpolate between points; default ramp from 1 at 0 s to 0 at 1 s.

Schedule entries are {time, value}. First time is 0; times strictly increase. Step signals apply the new value at the change time. All sources hold the last value after the final point. Inspect the waveform preview before simulating. Signals can be simulated by themselves.

MR accepts 0…1; the 4/3 valve accepts −1…1; the pump accepts exactly 0 or 1. Invalid values are rejected, not clipped. A linear ramp between 0 and 1 cannot drive the binary pump.

These four sources are information blocks with no power ports or internal classic bond graph. They are not Se/Sf equivalents: Se/Sf exchange power with the physical network.

MR — one-power-port modulated resistance

Choose Hydraulics → Primitives. Ports: one hydraulic power port H, and one non-power control input u. Like primitive R, the pressure effort is defined by its bond-graph placement; MR has no H1/H2 ports.

f_local = u e / R_open; 0 ≤ u ≤ 1
P_loss = e f_local = u e²/R_open ≥ 0

R_open > 0 [Pa·s/m³], default 10⁷. At u = 1 it equals R_open; at u = 0 flow is exactly zero. Bidirectional flow is supported. Signals carry no actuation energy in this ideal model.

Classic bond graph

Classic bond graphOne hydraulic bond H feeds MR; a separate dashed signal u controls its conductance.HMRe, f_localu ∈ [0, 1]G(u) = u/R_open; f_local = G(u) e
A modulated one-port R, implemented directly. For u > 0, R_eff = R_open/u; at u = 0 the conductance is exactly zero. The signal is not a second power port. For a controlled pressure drop between two pressure nodes, place this MR on a 1-junction in the same pattern as line resistance. Half-arrows set positive power references; dashed pink arrows carry signals only. Causal strokes are omitted because they depend on the connected model.

MR2 — two-port modulated resistance

Choose Hydraulics → Advanced → Two-port modulated resistance. The hydraulic drawing shows a variable restriction. Ports IN and OUT carry hydraulic power; Signal is the dimensionless control input (saved as u). Connect a signal source's out to Signal.

Q_IN = u (p_IN − p_OUT)/R_open; Q_OUT = −Q_IN
P_loss = (p_IN − p_OUT) Q_IN = u (p_IN − p_OUT)²/R_open ≥ 0

R_open > 0 [Pa·s/m³], default 10⁷. Commands must satisfy 0 ≤ u ≤ 1. At u = 1, MR2 equals a two-port line resistance R_open. For u > 0, effective resistance is R_open/u; at u = 0 both flows are exactly zero. IN/OUT define positive through-flow; reverse pressure drop produces reverse flow.

Internal bond graph

IN → 1 → OUT
     ↓
     MR ← Signal

The common-flow 1-junction balances the pressure drop against a controlled one-port resistance. MR remains available as the original one-power-port component. MR2 stores no state and models no leakage, inertia or turbulent orifice law. Both pressures must remain determined when closed; incompatible imposed flow or floating pressure causes a solver diagnostic.

Results include pressure drop, through-flow, dissipated power and applied command. Example: p_IN = 200000 Pa, p_OUT = 100000 Pa, R_open = 10⁷ and u = 0.5 give Q_IN = 0.005 m³/s and loss = 500 W. Rotation changes only the drawing; saved ports, equations and results retain their meaning.

Open liquid tank

Choose Hydraulics → Advanced. One bottom power port H. The free surface is at reference pressure, and pressure at H is gauge pressure.

h = V/A; p = ρgh; dV/dt = Q_into_tank
E = ρgV²/(2A); g = 9.80665 m/s²

Parameters: A = 0.01 m², h_max = 1 m, h_init = 0.8 m, rho = 1000 kg/m³. All are positive; 0 < h_init < h_max. Empty or full boundaries stop the simulation with a valid partial trajectory. Outputs: volume, level, pressure, flow and gravitational energy.

For the smallest test, connect Tank.H directly to MR.H and a signal out to MR.u. MR drains toward the implicit zero-gauge-pressure reference: no separate pressure source or junction is needed. Four tank examples demonstrate the four waveforms. Linear gravity drainage approaches zero level asymptotically.

Classic bond graph

Classic bond graphOne hydraulic power port H connected to a C storage element.HC = A/(ρg)p_H, Q_Hq = V; p = V/C; V(0) = A h_init
Constitutive equivalent: a linear one-port C = A/(ρg) with q = V. The free surface is at the reference pressure, so no extra Se is needed. OpenTank adds level outputs and the physical limits 0 < V < A h_max; replacing it by plain C alone would lose those limits. Its equation is implemented directly. Half-arrows set positive power references; dashed pink arrows carry signals only. Causal strokes are omitted because they depend on the connected model.

Valve test and numerical behavior

The proportional valve example uses the existing pump–valve–cylinder circuit. It contains no added MR. Valve input sign selects passages, and magnitude scales conductance. See 4/3 valve.

The solver evaluates commands at the actual time, splitting integration at changes, interpolation knots and valve zero crossings. Storage states remain continuous. Signal values and applied commands appear in charts and CSV; step signals are drawn as steps. Parameter, schedule and connection changes invalidate results; geometry changes do not.

JSON v3 and compatibility

Elements and power bonds retain their existing representation. Signal sources have domain: "signal". Directed controls use a separate signal_connections list:

{"id":"s1","from":{"element":"Control","port":"out"},"to":{"element":"MR","port":"u"}}

v1/v2 imports migrate automatically. Pump schedules become Boolean Schedule blocks (false → 0, true → 1); valve schedules become Piecewise Constant blocks (retract → −1, hold → 0, extend → 1). Component IDs and physical wiring remain intact. New IDs avoid collisions; invalid old schedules remain errors. Save writes v3 without embedded pump/valve schedules. Incomplete drafts are allowed; analysis requires connected control inputs. Existing document limits apply, with power and signal connections counted together.

Feedback sensors, controllers, arithmetic blocks, variable storage parameters and turbulent orifices are outside this release.