File_Structure - nasa/gunns GitHub Wiki

File Structure

Here are the locations & folders of the major GUNNS source code pieces. Unless otherwise noted, a test/ folder contains unit tests for the classes in its parent folder.

  • gunns/
    • aspects/ – Intended to hold all aspect-specific link & spotter classes.
      • dynamics/ – Dynamics aspect models and math utilities.
      • electrical/ – All electrical aspect hardware models. These are generally arranged by device type, i.e. Converter/, Diode/, etc.
      • fluid/ – All fluid aspect hardware models. These are arranged by their primary GUNNS effect (conductance, capacitance, etc).
        • capacitor/ – Tank-like models: tanks, accumulators, etc.
        • conductor/ – Most valves, pipes, heat exchangers.
        • fluid/ – Fluid object classes.
        • hi-fi/ – High-fidelity fluid links, such as the more accurate orifice theory-implementing valves.
        • potential/ – Pressure-producing pumps & fans.
        • source/ – Displacement pumps & things that tend to act on specific constituents in a fluid mixture, such as reactors, adsorbers, etc.
        • tuning/ – Various fluid tuning aids & spreadsheets that we want to source control.
      • thermal/ – Thermal aspect models.
        • network/ – This contains the generic thermal network class and utilities for compatibility with Thermal Desktop. These are not used for GunnsDraw-generated thermal networks.
    • bin/ – General utility & set-up scripts.
      • utils/ – More utility scripts.
    • core/ – All generic GUNNS core run-time classes such as the solver, base link & node classes, generic utility links & spotters, etc.
      • network/ – GUNNS network and super-network base classes.
    • draw/ – All files for the GunnsDraw Draw.io-based network design tool.
      • drawings/ – Examples and test drawings.
      • libraries/ – Shape libraries.
      • modules/ – Utility functions for the Python scripts in draw/.
      • templates/ – Network code auto-generation export templates.
      • utils/ – Various utility scripts.
    • gunns-ts-models/ – Source code for signal aspect models, such as sensors & effectors.
      • aspects/signal/effectors/thermostat/ – Thermostat & heater controller models.
      • bin/ – General utility & setup scripts, thermal aspect network generation scripts (not supported).
      • common/ – Sensor & effector models.
        • controllers/ – Valve controllers, pump/fan motor controllers, valve controller/sensor assemblies.
        • effectors/mechanical/motor – Dynamic motor models.
        • sensors – Sensors & noise models.
    • lib/ – Compiled libraries.
      • no_trick/ – Compiled lib without Trick dependencies, for use in non-Trick sims, and with sim optimization (no debug, no test coverage hooks, etc.)
      • test/ – Compiled lib for unit tests: no Trick dependencies, added hooks for test coverage.
      • trick/ – Compiled lib with Trick dependencies for use in Trick sims (uses Trick’s memory manager).
      • trick_if/ – Trickified lib, including the SWIG wrappers for objects in the trick/ library, for us in Trick sims.
    • ms-utils/ – Generic simulation utilities.
      • math/ – General math utilities like curve fits, look-up tables, numerical methods, units conversions, etc.
      • properties/ – Fluid properties, chemical compounds & reaction properties. These are intended to be non-specific to GUNNS so that they could be re-used by other non-GUNNS models, which is why they’re here instead of in more GUNNS fluid-specific folders. However since GUNNS so far has been the only real user of these, they have become somewhat optimized for GUNNS.
      • simulation/ – Health & Status utilities.
      • software/ – Sim Bus, exceptions, Trick compatibility macro’s, etc.
    • sims/ – Example, test & sandbox simulations. These are mostly Trick simulations but this folder could be used for non-Trick sims as well.
      • Modified_data/ – This is a traditional Trick folder for containing model-specific input files.
      • networks/ – GUNNS networks for various sims. Some are GunnsDraw networks, others are written by hand.
      • S_modules/ – This is a traditional Trick folder for containing Trick sim module files & sim object class definitions.
      • SIM_test/ – This is a Trick simulation used in our Continuous Integration testing.
    • test/ – Makefiles, scripts & utilities for unit & integration testing.
⚠️ **GitHub.com Fallback** ⚠️