.BondLib.UsersGuide.Overview.Wrapping

Information

Although bond graphs can be used to describe arbitrarily complex physical systems, they offer a fairly low-level interface and are therefore not always easily readable. Furthermore, different modelers may prefer different modeling formalisms, because they are more familiar with them.

Since bond graphs offer a low-level interface, it is always possible to wrap bond graphs inside other modeling metaphors. For example, the electrical resistor model:

can easily be reimplemented as follows:

The El2BG and BG2El blocks are wrappers that convert the electrical connectors to bond graph connectors, and vice versa.

BondLib features wrapped electrical (analog), mechanical 1D (translational, rotational), and thermal 1D (heat transfer) libraries that are analogous to the corresponding sub-libraries of the Modelica standard library. The wrapped electrical analog library contains a complete wrapped Spice implementation for DC analysis, AC analysis, transient analysis, and thermal analysis.

Wrapped mechanical 2D and 3D libraries are also available, but they were included in the MultiBondLib library, as they are based on multi-bond graphs rather than on regular bond graphs.

The wrapped (internal) bond graph variables are not visible from the outside. They were protected in order to make the wrapped models look externally more similar to the corresponding models of the Modelica standard library.

Also in the case of capacitors and inductors, Modelica's stateSelect feature has been used to make the wrapped models use the same state variables as the corresponding non-wrapped models of the Modelica standard library, i.e. C.v instead of C.C1.e in the case of a capacitor.

A Boolean flag enforceStates is by default set to true, but can be set to false if the internal bond graph variables are to be used as state variables.


Generated at 2024-04-24T18:15:52Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos