Intro_Course_2_4 - nasa/gunns GitHub Wiki

Intro Course 2.4: Basic Components

When we use GUNNS to simulate a vehicle, we divide the vehicle’s systems up into separate GUNNS networks. Networks are systems that are more-or-less self-contained, with clear interfaces to other systems. For instance, the brake hydraulics in your car is a separate fluid system than the fuel system, so these would be in separate networks.

  • A network is a C++ class that contains all of the objects needed to model one system of equations of a single aspect. It has a simple interface to the Trick .sm or S_define for calls by Trick jobs.
  • Network classes are usually entirely auto-generated by GunnsDraw, so GunnsDraw is the tool you use to build your networks. However, you can still write networks by hand.
  • A network class can be instantiated multiple times in a Trick sim. This would be useful if you have redundant identical systems in your vehicle — you can instantiate the same network class twice as System1, System2, etc.

Networks contain:

  • Nodes and Links. These model the vehicle components and form the system of equations. Links can only attach to nodes, and nodes can only attach to links, so they go Node – Link – Node – Link, etc. In the picture below, the nodes are the numbered circle shapes, and the links are the connecting hardware components (pumps, resistors, etc).
  • A Solver that solves & propagates the system.
  • Optional Spotters, which are flexible objects that embed custom interfaces and capabilities.
  • Various other specialized objects associated with a particular aspect or type of link. For instance, a fluid chemical reactor link adds lists to the network that define which chemical compounds and reactions are in the network.
  • A network Config Data object, which is a collection of the Config Data objects for the solver, nodes, links & spotters that individually define their configuration data. These objects are all given their default values, which come from their GunnsDraw shapes, in the object constructor.
  • A network Input Data object, similar to the Config Data. The difference between Config & Input data is largely academic; they are treated the same way.

See Also

Run-Time Architecture.

Previous Page / Next Page

⚠️ **GitHub.com Fallback** ⚠️