Skip to content

Commit 45c9d68

Browse files
authored
Add LaTeX rendering config for OpenModelica (#77)
For OpenModelica we need: ``` annotation(Documentation(__OpenModelica_infoHeader = "<script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS_CHTML\"></script>")); ``` Mind MathJax 3 is not supported.
1 parent 16813e9 commit 45c9d68

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

OpenHPL/Waterway/Gate.mo

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ Equation numbers and figure numbers given below are in sync with the numbers of
7474
<p>
7575
The free flow can be calculated with:
7676
77-
$$Q_A = \\mu_A \\cdot A \\cdot \\sqrt{2g\\cdot h_0} \\tag{8.24} $$
77+
$$ Q_A = \\mu_A \\cdot A \\cdot \\sqrt{2g\\cdot h_0} \\tag{8.24} $$
78+
7879
(valid for gate opening higher than the downstream water level)
7980
</p>
8081
<p>
@@ -86,17 +87,17 @@ With
8687
<dt> $$ \\mu_A = \\frac{\\psi}{\\sqrt{1+\\frac{\\psi\\cdot a}{h_0}}} \\tag{8.23}$$ </dt>
8788
<dd>Contraction coefficient sluice gate (\\(\\alpha=90^\\circ\\))</dd>
8889
<dt> $$ \\psi_{90^\\circ}= \\frac{1}{1+0.64\\cdot \\sqrt{1-(a/h_0)^2}} \\tag{8.25}$$ </dt>
89-
<dd>Contraction coefficient radial gate (for \\(a/h_0 \\rightarrow 0\\))</dd>
90+
<dd>Contraction coefficient radial gate (for \(a/h_0 \\rightarrow 0\))</dd>
9091
<dt> $$ \\psi_0(\\alpha)= 1.3 -0.8\\cdot\\sqrt{1-\\left(\\frac{\\alpha -205^\\circ}{220^\\circ}\\right)^2} \\tag{8.25a}$$ </dt>
91-
<dd> The edge angle \\(\\alpha\\) of the gate </dd>
92+
<dd> The edge angle \(\\alpha\) of the gate </dd>
9293
<dt> $$ \\alpha = \\left( \\frac{\\pi}{2} - \\arcsin(\\frac{h_h-a}{r})\\right) \\cdot \\frac{180^\\circ}{\\pi} $$ </dt>
9394
</dl>
9495
<blockquote>
9596
With:
9697
<ul>
97-
<li> \\(a \\ldots\\) Vertical gate opening </li>
98-
<li> \\(h_h \\ldots\\) Height of the hinge above gate bottom\"</li>
99-
<li> \\(r \\ldots\\) Radius of the gate arm </li>
98+
<li> \(a \\ldots\) Vertical gate opening </li>
99+
<li> \(h_h \\ldots\) Height of the hinge above gate bottom</li>
100+
<li> \(r \\ldots\) Radius of the gate arm </li>
100101
</ul>
101102
</blockquote>
102103
@@ -148,11 +149,12 @@ With
148149
149150
<h5>Boundary between free and backed-up flow</h5>
150151
<p>
151-
The boundary of the height of the water level \\(h_2\\) behind the gate from which on the calculation switches to the backed-up flow (8.29) can be derived from:
152+
The boundary of the height of the water level \(h_2\) behind the gate from which on the calculation switches to the backed-up flow (8.29) can be derived from:
152153
153154
$$ \\frac{h_2^*}{a} = \\frac{\\psi}{2} \\cdot \\left( \\sqrt{ 1 + \\frac{16}{\\psi\\cdot\\left(1+\\frac{\\psi\\cdot a}{h_0}\\right)}\\cdot\\frac{h_0}{a}} - 1 \\right) \\tag{8.26}$$
154155
155-
So when \\(\\frac{h_2}{a} \\geq \\frac{h_2^*}{a}\\) then we have back-up flow.
156+
So when \(\\frac{h_2}{a} \\geq \\frac{h_2^*}{a}\) then we have back-up flow.
156157
</p>
157-
</html>"));
158-
end Gate;
158+
</html>",
159+
__OpenModelica_infoHeader = "<script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS_CHTML\"></script>"));
160+
end Gate;

OpenHPL/Waterway/Gate_HR.mo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,6 @@ $$Q = C_{dx} A \\sqrt{2gH} \\tag{3}$$
8888
<strong>Note:</strong>
8989
The use of <code>Cdx</code> is different to the implementaion as done in HEC-RAS. This was done in order to have a smoother transition from the partially to fully submerged region.
9090
</p>
91-
</html>"));
91+
</html>",
92+
__OpenModelica_infoHeader = "<script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS_CHTML\"></script>"));
9293
end Gate_HR;

0 commit comments

Comments
 (0)