How nasa/t-mats works
Main components
• Simulation Environment: Represent the primary Simulink environment where models are built and simulated. This is where users “wire up” the various simulation blocks.
• Core T‑MATS Library: Include the extensive library (found under “Trunk/TMATS_Library”) which contains the modular Simulink blocks for thermodynamics, turbomachinery (e.g., compressor, turbine, burner, nozzle, duct, inlet, etc.), numerical solvers (Newton‐Raphson, iterative methods, Jacobian calculations), and control modules.
• Example/Test Beds: Show that the package includes numerous simulation examples and test beds (as seen under “Resources” and “Resources/Testing/TestBeds”). These illustrate how the library modules are composed into specific simulation scenarios (steady state, dynamic, linear, etc.).
• MEX and MATLAB Scripts: Highlight the performance-enhancing MEX components and MATLAB helper scripts (found in “Trunk/TMATS_Library/MEX” and “Trunk/TMATS_Library/MATLAB_Scripts”). These provide optimized numerical computation and additional processing support.
• Documentation and Support: While not part of the runtime simulation per se, the user guides and online support (README, User guide files, and the developer’s website links) can be shown as peripheral yet essential support components.
Relationships and interactions
• The Simulation Environment uses the Core Library to assemble models. Modules representing different physical systems (turbo components, control loops, heat transfer blocks) are assembled and interact through defined ports and signal flows.
• The numerical solvers and control modules serve as the “engine” inside these models, iteratively solving state and control equations.
• The Auxiliary Tools interface with the core simulation – for example, the Gas Table Builder prepares maps and properties that are fed into the simulation blocks, and visualization tools (like DViewer) take simulation outputs to display results.
• MEX files operate behind the scenes within simulation blocks to improve performance, linking directly with the Simulink execution engine.
• Test Beds and Examples provide both validation and demonstration; they tie together the simulation blocks and tools to form complete system applications (e.g., gas turbine dynamic and steady-state models).
Architectural patterns/design principles
• Modular Design: Each component (thermodynamic block, control module, solver, visualization tool) is self-contained and interacts through well-defined interfaces.
• Layered/Hierarchical Architecture: The system can be visualized with layers – from low-level numerical methods (MEX, MATLAB helper functions) to mid-level simulation blocks, up to high-level system assemblies in Simulink.
• Reusability and Extensibility: Components (especially in the “TMATS_Library”) are intended to be reused across different engine models and simulation scenarios. Emphasize the separation between core simulation logic and user-interface / auxiliary functionality.
• Clearly labeled components:
• “Simulation Environment (Simulink)”
• “T‑MATS Core Library Blocks” (with subcomponents like Turbomachinery Blocks, Control Modules, Solver Modules, Thermodynamic Calculators)
• “Auxiliary Tools & Maps”
• “MEX/Performance Modules”
• “Test Beds / Example Models”
• Data flow from user inputs through simulation blocks to numerical solvers.
• How outputs propagate toward visualization and logging tools.
• Interaction pathways between auxiliary tools (e.g., map generation) and the simulation core.
• Simulation blocks (for example, rounded rectangles),
• Support libraries (e.g., squares),
• External tools and user interfaces (e.g., parallelograms),
• And the MEX components as low-level optimized modules (e.g., hexagons).
• Provide annotations where necessary to note that the toolbox supports both dynamic and steady-state simulations and incorporates open‐source components tailored for thermodynamic and aero-thermal applications.