mermaid_generator ================= .. py:module:: mermaid_generator .. autoapi-nested-parse:: Mermaid flowchart generator for OpenMDAO models. This module provides utilities for generating Mermaid flowchart diagrams from OpenMDAO problems, showing model connectivity and data flow. Attributes ---------- .. autoapisummary:: mermaid_generator.params Functions --------- .. autoapisummary:: mermaid_generator.generate_problem_graph mermaid_generator.generate_model_graph mermaid_generator.generate_simple_graph Module Contents --------------- .. py:function:: generate_problem_graph(prob, output_path='problem_diagram.mmd', show_intermediates=True, title='Problem Architecture') Generate Mermaid flowchart from OpenMDAO problem with full introspection. This function introspects the OpenMDAO problem structure to create an accurate visualization of parameters, models, intermediate variables, and constraints. :param prob: OpenMDAO problem instance (must be setup) :type prob: :py:class:`om.Problem` :param output_path: Path to save .mmd file :type output_path: :py:class:`str` :param show_intermediates: Whether to show intermediate variables between models :type show_intermediates: :py:class:`bool` :param title: Diagram title :type title: :py:class:`str` :returns: Path to generated file :rtype: :py:class:`str` .. py:function:: generate_model_graph(prob, output_path='model_diagram.mmd', title='Model Connectivity') Generate Mermaid flowchart from OpenMDAO problem. :param prob: OpenMDAO problem instance (must be setup) :type prob: :py:class:`om.Problem` :param output_path: Path to save .mmd file :type output_path: :py:class:`str` :param title: Diagram title :type title: :py:class:`str` :returns: Path to generated file :rtype: :py:class:`str` .. py:function:: generate_simple_graph(parameters, models, constraints, output_path='model_diagram.mmd') Generate Mermaid flowchart from simple lists. :param parameters: List of parameter names :type parameters: :py:class:`list` of :py:class:`str` :param models: List of model names :type models: :py:class:`list` of :py:class:`str` :param constraints: List of constraint names :type constraints: :py:class:`list` of :py:class:`str` :param output_path: Path to save .mmd file :type output_path: :py:class:`str` :returns: Path to generated file :rtype: :py:class:`str` .. py:data:: params :value: ['V (kV)', 'e (mm)', 'd_t (mm)', 'f (kHz)', 'E_p (mJ)']