Skip to content

Commit

Permalink
deploy: ffb0bf9
Browse files Browse the repository at this point in the history
  • Loading branch information
visr committed Feb 28, 2024
1 parent af8a8a4 commit be00f7e
Show file tree
Hide file tree
Showing 9 changed files with 215 additions and 216 deletions.
356 changes: 178 additions & 178 deletions build/index.html

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions core/allocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ <h1 data-number="5"><span class="header-section-number">5</span> Solving the all
<section id="example" class="level2" data-number="5.1">
<h2 data-number="5.1" class="anchored" data-anchor-id="example"><span class="header-section-number">5.1</span> Example</h2>
<p>The following is an example of an optimization problem for the example shown <a href="../python/examples.html#model-with-allocation">here</a>:</p>
<div id="bfabb395" class="cell" data-execution_count="1">
<div id="fbbcaf0a" class="cell" data-execution_count="1">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">using</span> <span class="bu">Ribasim</span></span>
Expand All @@ -648,45 +648,45 @@ <h2 data-number="5.1" class="anchored" data-anchor-id="example"><span class="hea
<span id="cb1-20"><a href="#cb1-20" aria-hidden="true" tabindex="-1"></a><span class="fu">println</span>(p.allocation.allocation_models[<span class="fl">1</span>].problem)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output cell-output-stdout">
<pre><code>Min F_abs_user_demand[UserDemand #3] + F_abs_user_demand[UserDemand #13] + F_abs_user_demand[UserDemand #6] + F_abs_basin[Basin #12] + F_abs_basin[Basin #5] + F_abs_basin[Basin #2]
<pre><code>Min F_abs_user_demand[UserDemand #13] + F_abs_user_demand[UserDemand #3] + F_abs_user_demand[UserDemand #6] + F_abs_basin[Basin #2] + F_abs_basin[Basin #5] + F_abs_basin[Basin #12]
Subject to
flow_conservation[Basin #12] : F[(Basin #12, UserDemand #13)] - F[(TabulatedRatingCurve #7, Basin #12)] + F_basin_in[Basin #12] - F_basin_out[Basin #12] = 0
flow_conservation[Basin #5] : F[(Basin #5, Basin #2)] - F[(Basin #2, Basin #5)] + F[(Basin #5, UserDemand #6)] + F[(Basin #5, TabulatedRatingCurve #7)] + F_basin_in[Basin #5] - F_basin_out[Basin #5] = 0
flow_conservation[Basin #2] : -F[(Basin #5, Basin #2)] + F[(Basin #2, Basin #5)] + F[(Basin #2, UserDemand #3)] - F[(FlowBoundary #1, Basin #2)] + F_basin_in[Basin #2] - F_basin_out[Basin #2] = 0
abs_positive_user_demand[UserDemand #3] : -F[(Basin #2, UserDemand #3)] + F_abs_user_demand[UserDemand #3] ≥ 0
flow_conservation[Basin #2] : F[(Basin #2, Basin #5)] + F[(Basin #2, UserDemand #3)] - F[(FlowBoundary #1, Basin #2)] - F[(Basin #5, Basin #2)] + F_basin_in[Basin #2] - F_basin_out[Basin #2] = 0
flow_conservation[Basin #5] : F[(Basin #5, UserDemand #6)] - F[(Basin #2, Basin #5)] + F[(Basin #5, TabulatedRatingCurve #7)] + F[(Basin #5, Basin #2)] + F_basin_in[Basin #5] - F_basin_out[Basin #5] = 0
flow_conservation[Basin #12] : -F[(TabulatedRatingCurve #7, Basin #12)] + F[(Basin #12, UserDemand #13)] + F_basin_in[Basin #12] - F_basin_out[Basin #12] = 0
abs_positive_user_demand[UserDemand #13] : -F[(Basin #12, UserDemand #13)] + F_abs_user_demand[UserDemand #13] ≥ 0
abs_positive_user_demand[UserDemand #3] : -F[(Basin #2, UserDemand #3)] + F_abs_user_demand[UserDemand #3] ≥ 0
abs_positive_user_demand[UserDemand #6] : -F[(Basin #5, UserDemand #6)] + F_abs_user_demand[UserDemand #6] ≥ -1.5
abs_negative_user_demand[UserDemand #3] : F[(Basin #2, UserDemand #3)] + F_abs_user_demand[UserDemand #3] ≥ 0
abs_negative_user_demand[UserDemand #13] : F[(Basin #12, UserDemand #13)] + F_abs_user_demand[UserDemand #13] ≥ 0
abs_negative_user_demand[UserDemand #3] : F[(Basin #2, UserDemand #3)] + F_abs_user_demand[UserDemand #3] ≥ 0
abs_negative_user_demand[UserDemand #6] : F[(Basin #5, UserDemand #6)] + F_abs_user_demand[UserDemand #6] ≥ 1.5
abs_positive_basin[Basin #12] : -F_basin_in[Basin #12] + F_abs_basin[Basin #12] ≥ 0
abs_positive_basin[Basin #5] : -F_basin_in[Basin #5] + F_abs_basin[Basin #5] ≥ 0
abs_positive_basin[Basin #2] : -F_basin_in[Basin #2] + F_abs_basin[Basin #2] ≥ 0
abs_negative_basin[Basin #12] : F_basin_in[Basin #12] + F_abs_basin[Basin #12] ≥ 0
abs_negative_basin[Basin #5] : F_basin_in[Basin #5] + F_abs_basin[Basin #5] ≥ 0
abs_positive_basin[Basin #5] : -F_basin_in[Basin #5] + F_abs_basin[Basin #5] ≥ 0
abs_positive_basin[Basin #12] : -F_basin_in[Basin #12] + F_abs_basin[Basin #12] ≥ 0
abs_negative_basin[Basin #2] : F_basin_in[Basin #2] + F_abs_basin[Basin #2] ≥ 0
abs_negative_basin[Basin #5] : F_basin_in[Basin #5] + F_abs_basin[Basin #5] ≥ 0
abs_negative_basin[Basin #12] : F_basin_in[Basin #12] + F_abs_basin[Basin #12] ≥ 0
source[(FlowBoundary #1, Basin #2)] : F[(FlowBoundary #1, Basin #2)] ≤ 1
return_flow[UserDemand #13] : F[(UserDemand #13, Terminal #10)] ≤ 0
fractional_flow[(TabulatedRatingCurve #7, Basin #12)] : -0.4 F[(Basin #5, TabulatedRatingCurve #7)] + F[(TabulatedRatingCurve #7, Basin #12)] ≤ 0
basin_outflow[Basin #12] : F_basin_out[Basin #12] ≤ 0
basin_outflow[Basin #5] : F_basin_out[Basin #5] ≤ 0
fractional_flow[(TabulatedRatingCurve #7, Basin #12)] : F[(TabulatedRatingCurve #7, Basin #12)] - 0.4 F[(Basin #5, TabulatedRatingCurve #7)] ≤ 0
basin_outflow[Basin #2] : F_basin_out[Basin #2] ≤ 0
F[(Basin #5, Basin #2)] ≥ 0
basin_outflow[Basin #5] : F_basin_out[Basin #5] ≤ 0
basin_outflow[Basin #12] : F_basin_out[Basin #12] ≤ 0
F[(UserDemand #13, Terminal #10)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(Basin #2, Basin #5)] ≥ 0
F[(Basin #2, UserDemand #3)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(Basin #12, UserDemand #13)] ≥ 0
F[(FlowBoundary #1, Basin #2)] ≥ 0
F[(TabulatedRatingCurve #7, Terminal #10)] ≥ 0
F[(UserDemand #13, Terminal #10)] ≥ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(TabulatedRatingCurve #7, Basin #12)] ≥ 0
F_basin_in[Basin #12] ≥ 0
F_basin_in[Basin #5] ≥ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(Basin #12, UserDemand #13)] ≥ 0
F[(Basin #5, Basin #2)] ≥ 0
F_basin_in[Basin #2] ≥ 0
F_basin_out[Basin #12] ≥ 0
F_basin_out[Basin #5] ≥ 0
F_basin_in[Basin #5] ≥ 0
F_basin_in[Basin #12] ≥ 0
F_basin_out[Basin #2] ≥ 0
F_basin_out[Basin #5] ≥ 0
F_basin_out[Basin #12] ≥ 0
</code></pre>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions core/equations.html
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ <h2 data-number="2.1" class="anchored" data-anchor-id="sec-reduction_factor"><sp
\end{cases}
\end{align}\]</span></p>
<p>Here <span class="math inline">\(p &gt; 0\)</span> is the threshold value which determines the interval <span class="math inline">\([0,p]\)</span> of the smooth transition between <span class="math inline">\(0\)</span> and <span class="math inline">\(1\)</span>, see the plot below.</p>
<div id="964b675f" class="cell" data-execution_count="1">
<div id="03a3aa19" class="cell" data-execution_count="1">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> numpy <span class="im">as</span> np</span>
Expand Down Expand Up @@ -511,7 +511,7 @@ <h2 data-number="2.4" class="anchored" data-anchor-id="infiltration-and-drainage
<p><span id="eq-drn"><span class="math display">\[
Q_\text{drn} = \sum_{i=1}^{n} \sum_{j=1}^{m} \left| \min(Q_{\mathrm{mf6}_{i,j}}, 0.0) \right|
\tag{5}\]</span></span></p>
<p>The interaction with MODFLOW 6 boundary conditions is explained in greater detail in the <a href="../couple/modflow.qmd">the MODFLOW coupling section</a> of the documentation.</p>
<p>The interaction with MODFLOW 6 boundary conditions is explained in greater detail in the <a href="https://deltares.github.io/iMOD-Documentation/coupler.html">the iMOD Coupler docs</a>.</p>
</section>
<section id="upstream-and-downstream-flow" class="level2" data-number="2.5">
<h2 data-number="2.5" class="anchored" data-anchor-id="upstream-and-downstream-flow"><span class="header-section-number">2.5</span> Upstream and downstream flow</h2>
Expand Down
12 changes: 6 additions & 6 deletions core/modelconcept.html
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@ <h2 data-number="1.3" class="anchored" data-anchor-id="sec-space"><span class="h
<h2 data-number="1.4" class="anchored" data-anchor-id="structures-in-a-water-system"><span class="header-section-number">1.4</span> Structures in a water system</h2>
<p>In addition to free flowing waterbodies, a watersystem typically has structures to control the flow of water. Ribasim uses connector nodes which simplify the hydraulic behaviour for the free flowing conditions or structures. The following type of connector nodes are available for this purpose:</p>
<ul>
<li><a href=".\usage.qmd#sec-tabulated-rating-curve">TabulatedRatingCurve</a>: one-directional flow based on upstream head. Node type typically used for gravity flow conditions either free flowing open water channels or over a fixed structure.</li>
<li><a href=".\usage.qmd#sec-linear-resistance">LinearResistance</a>: bi-directional flow based on head difference and linear resistance. Node type typically used for bi-directional flow situations or situations where head difference over a structure determines its actual flow capacity.</li>
<li><a href=".\usage.qmd#sec-manning-resistance">ManningResistance</a>: bi-directional flow based on head difference and resistance using Manning-Gauckler formula. Same usage as LinearResistance, providing a better hydrological meaning to the resistance parameterization.</li>
<li><a href=".\usage.qmd#sec-pump">Pump</a>: one-directional structure with a set flow rate. Node type typically used in combination with control to force water over the edge.</li>
<li><a href=".\usage.qmd#sec-outlet">Outlet</a>: one-directional gravity structure with a set flow rate. Node type typically used in combination with control to force water over the edge, even if their is a mismatch in actual hydraulic capacity. The node type has an automated mechanism to stop the flow when the head difference is zero.</li>
<li><a href=".\usage.qmd#sec-fractional-flow">FractionalFlow</a>: to split an outflow over multiple edges based on a flow fraction. Node type is typically used for diversions or bifurcations with a known and fixed ratio.</li>
<li><a href="../core/usage.html#sec-tabulated-rating-curve">TabulatedRatingCurve</a>: one-directional flow based on upstream head. Node type typically used for gravity flow conditions either free flowing open water channels or over a fixed structure.</li>
<li><a href="../core/usage.html#sec-linear-resistance">LinearResistance</a>: bi-directional flow based on head difference and linear resistance. Node type typically used for bi-directional flow situations or situations where head difference over a structure determines its actual flow capacity.</li>
<li><a href="../core/usage.html#sec-manning-resistance">ManningResistance</a>: bi-directional flow based on head difference and resistance using Manning-Gauckler formula. Same usage as LinearResistance, providing a better hydrological meaning to the resistance parameterization.</li>
<li><a href="../core/usage.html#sec-pump">Pump</a>: one-directional structure with a set flow rate. Node type typically used in combination with control to force water over the edge.</li>
<li><a href="../core/usage.html#sec-outlet">Outlet</a>: one-directional gravity structure with a set flow rate. Node type typically used in combination with control to force water over the edge, even if their is a mismatch in actual hydraulic capacity. The node type has an automated mechanism to stop the flow when the head difference is zero.</li>
<li><a href="../core/usage.html#sec-fractional-flow">FractionalFlow</a>: to split an outflow over multiple edges based on a flow fraction. Node type is typically used for diversions or bifurcations with a known and fixed ratio.</li>
</ul>
<p>The control layer can activate or deactivate nodes, set flow rates for the Pump and Outlet, or choose different parameterizations for TabulatedRatingCurve, LinearResistance, ManningResistance or FractionalFlow.</p>
<p>Connector nodes are required within a Ribasim network to determine the flow exchange between basins.</p>
Expand Down
1 change: 0 additions & 1 deletion core/usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,6 @@ <h2 data-number="2.1" class="anchored" data-anchor-id="table-requirements"><span
<section id="custom-metadata" class="level2" data-number="2.2">
<h2 data-number="2.2" class="anchored" data-anchor-id="custom-metadata"><span class="header-section-number">2.2</span> Custom metadata</h2>
<p>It may be advantageous to add metadata to rows. For example, basin areas might have names and objects such as weirs might have specific identification codes. Additional columns can be freely added to tables. The column names should be prefixed with <code>meta_</code>. They will not be used in computations or validated by the Julia core.</p>
<p>The Ribasim Python library will automatically add the <code>meta_</code> prefix to non-standard columns. Column names already prefixed with <code>meta_</code> will not be updated.</p>
</section>
</section>
<section id="sec-node" class="level1" data-number="3">
Expand Down
4 changes: 2 additions & 2 deletions core/validation.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ <h1 class="title">Validation</h1>
<section id="connectivity" class="level1" data-number="1">
<h1 data-number="1"><span class="header-section-number">1</span> Connectivity</h1>
<p>In the table below, each column shows which node types are allowed to be downstream (or ‘down-control’) of the node type at the top of the column.</p>
<div id="dd9a860a" class="cell" data-execution_count="1">
<div id="5617225e" class="cell" data-execution_count="1">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">using</span> <span class="bu">Ribasim</span></span>
Expand Down Expand Up @@ -546,7 +546,7 @@ <h1 data-number="1"><span class="header-section-number">1</span> Connectivity</h
<section id="neighbor-amounts" class="level1" data-number="2">
<h1 data-number="2"><span class="header-section-number">2</span> Neighbor amounts</h1>
<p>The table below shows for each node type between which bounds the amount of in- and outneighbors must be, for both flow and control edges.</p>
<div id="000227b3" class="cell" data-execution_count="2">
<div id="1323571a" class="cell" data-execution_count="2">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>flow_in_min <span class="op">=</span> <span class="fu">Vector</span><span class="dt">{String}</span>()</span>
Expand Down
Binary file modified python/examples_files/figure-html/cell-71-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion python/test-models.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ <h1 class="title">Test models</h1>


<p>Ribasim developers use the following models in their testbench and in order to test new features.</p>
<div id="3429104d" class="cell" data-execution_count="1">
<div id="fca7147d" class="cell" data-execution_count="1">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> ribasim_testmodels</span>
Expand Down
Loading

0 comments on commit be00f7e

Please sign in to comment.