Hybrid Software Commentary Standard - idaholab/HYBRID GitHub Wiki
Each folder has a Readme.md, 00Readme.txt, or Readme.rst file that explains the contents of each directory. The primary section of the hybrid repository is the physical modelica models. Therefore, an in-depth conversation on the Modelica documentation is necessary.
-
Add a description string to all parameters and variables, including protected ones.
-
Group similar variables using the
group
andtab
annotation. For example, useparameter Modelica.SIunits.Time tau = 60 "Time constant at nominal flow" annotation (Dialog(group="Nominal condition"));
or use
parameter Types.Dynamics substanceDynamics=energyDynamics "Formulation of substance balance" annotation(Evaluate=true, Dialog(tab = "Assumptions", group="Dynamics"));
-
Add model documentation to the
info
section. To document equations, use the format<p> The polynomial has the form </p> <p align=\"center\" style=\"font-style:italic;\"> y = a<sub>1</sub> + a<sub>2</sub> x + a<sub>3</sub> x<sup>2</sup> + ..., </p> <p> where <i>a<sub>1</sub></i> is ...
To denote time derivatives, such as mass flow rate, use
<code>ṁ</code>.
To refer to parameters of the model, use the format
To linearize the equation, set <code>linearize=true</code>.
To format tables, use
<p> <table summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\"> <tr><th>Header 1</th> <th>Header 2</th> </tr> <tr><td>Data 1</td> <td>Data 2</td> </tr> </table> </p>
To include figures, place the figure into a directory in Electrolysis/Resources/Images/ that has the same name as the full package. For example, use
</p> <p align=\"center\"> <img alt=\"Image\" src=\"modelica://Electrolysis/Resources/Images/Electrolyzers/Electrolyzer.png\"/> </p> <p>
To create new figures, put the source file for the figure, preferably in
svg
format, in the same directory as thepng
file.svg
files can be created with http://inkscape.org/, which works on any operating system. -
Add author information to the
revision
section. -
Run a spell check.
-
Start headings with
<h4>
. -
Add hyperlinks to other models using their full name. For example, use
See <a href =\"modelica://Modelica.Fluid.Vessels.BaseClasses.VesselPortsData\"> Fluid.Vessels.BaseClasses.VesselPortsData </a>.
-
To refer to names of parameters or variables in the documentation and revision sections, use the syntax
< code >...</ code >
. Do not use<tt>...</tt>
. -
Always use lower case html tags.