BGMod Documentation / v3
BGMod handbook

Using the editor

From physical system to connected model

  1. Find equal-pressure regions. Represent each hydraulic pressure node by a 0-junction. Use a 1-junction for a common-flow balance, such as a series pressure drop.
  2. Choose the physical laws. Use R for dissipation, C for compliance, I for inertia, and Se/Sf for prescribed inputs. Use compound blocks where their assumptions match the device.
  3. Connect named ports. Press B, then select the first and second ports. Each fixed port accepts one bond. Branch at a 0/1-junction, which receives stable port IDs p1, p2, … . Complete models require at least two connections per junction.
  4. Keep domains consistent. Connect ports only within the same physical domain: hydraulic, mechanical or electrical. CylinderDA performs the hydraulic/mechanical conversion through separate A, B and M ports.
  5. Set parameters and initial conditions in SI. Check pressure reference, accumulator absolute pressures, C stored volume, cylinder position and load velocity. Set source waveforms and connect external signal blocks to pump/valve inputs.
  6. Analyze, then simulate. Follow diagnostics to the named block, bond or port. Inspect equations and internal graphs before interpreting results.
One-port R versus a two-port line. A primitive R describes one pressure-drop/flow pair. To model a resistor between two pressure nodes with primitives, use a 1-junction and the appropriate signs. HydraulicResistance packages this construction as H1/H2 and directly uses p1 − p2. A bond alone has no resistance, compliance or inertia.

A small working starting point

Connect Sf.H → J0.p1, J0.p2 → C.H and J0.p3 → R.H, all with direction +1 and hydraulic domain. Choose positive R and C and a flow input Qin. The model gives C·dp/dt = Q_in − p/R, with p(0) = q0/C. Here the primitive R drains to the pressure reference; it is not a second pressure node.

Escape cancels connection mode. Delete removes the selected object and, for a block, its incident bonds. Save unfinished diagrams as JSON; full topology is checked during analysis. Dragging blocks and changing zoom affect layout only.

Examples, schedules and results

The editor uses English labels, diagnostics and SI unit symbols. Documentation ↗ opens this guide; use the language switch above for the Russian version.

Choose Hydraulics, Translational mechanics or Electrical in the Elements domain selector, then use Primitives or Advanced. Primitives share the bond-graph types 0, 1, R, C, I, Se, Sf, with domain-specific names, SI units and defaults. Translational mechanics offers common force, common velocity, damper, spring compliance, mass, force source and velocity source. Advanced lists components with a port in the selected domain; the cylinder appears in both domains. Switching the library changes only what you add next. Use Up/Down, Home or End to navigate category tabs. An unconnected primitive’s domain can also be changed in Properties.

Choose an example from the top selector and click Open example. Start with the article model to study primitives, then inspect the 7A bench to see named ports and mixed domains.

Examples

Read results with their status

Equations shows states, constraints and, for compound components, read-only internal graphs. Linear models expose constant A/B matrices. Nonlinear models report the implicit system G(t,x,w)=0 and algebraic groups. Both use Radau integration.

Charts separates quantities by dimension. Select the series you need; use the result-time control to inspect the pump operating point on its curve.

StatusInterpretation
completedReached the requested end time successfully.
stopped_at_limitStopped at a modeled physical boundary, such as cylinder stroke, accumulator volume or admissible pressure. The trajectory is partial.
failedA runtime algebraic/numerical failure prevented continuation. Only valid points preceding the failure are returned.

Inspect the termination time and diagnostics before comparing runs. Partial CSV exports include status, termination time and diagnostic-code metadata and use a partial-result filename. Initial document/compatibility errors prevent simulation.

Save and edit safely

Save saves JSON v3 with parameters, ports, initial states, schedules, pressure reference and pump data snapshot. Results are not embedded. Existing JSON files remain compatible; user labels and imported data are preserved in their original language. There is no server autosave. Mathematical edits invalidate results; geometry changes do not. A delayed response from an older model cannot replace current results.