From 279e07115c5fe7bb15ce1efae625c9488b8e7226 Mon Sep 17 00:00:00 2001 From: Quarto GHA Workflow Runner Date: Thu, 17 Aug 2023 07:09:30 +0000 Subject: [PATCH] Built site for gh-pages --- .nojekyll | 2 +- build/index.html | 186 +++++++++--------- contribute/addnode.html | 2 +- core/equations.html | 54 ++--- core/usage.html | 12 +- python/examples.html | 14 +- .../figure-html/cell-52-output-2.png | Bin 52370 -> 52782 bytes python/reference/Model.html | 6 +- ...c.schema.json => OutletStatic.schema.json} | 6 +- schema/root.schema.json | 6 +- search.json | 24 +-- 11 files changed, 156 insertions(+), 156 deletions(-) rename schema/{WeirStatic.schema.json => OutletStatic.schema.json} (87%) diff --git a/.nojekyll b/.nojekyll index 0caf43f6f..31cce8a77 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -8517287e \ No newline at end of file +235bed38 \ No newline at end of file diff --git a/build/index.html b/build/index.html index 90e0a9aaf..5a0ad3240 100644 --- a/build/index.html +++ b/build/index.html @@ -236,54 +236,54 @@

1 API Reference1.1 Functions

# Ribasim.basin_bottomMethod.

Return the bottom elevation of the basin with index i, or nothing if it doesn’t exist

-

source

+

source

# Ribasim.basin_bottomsMethod.

Get the bottom on both ends of a node. If only one has a bottom, use that for both.

-

source

+

source

# Ribasim.create_callbacksMethod.

Create the different callbacks that are used to store output and feed the simulation with new data. The different callbacks are combined to a CallbackSet that goes to the integrator. Returns the CallbackSet and the SavedValues for flow.

-

source

+

source

# Ribasim.create_graphMethod.

Return a directed graph, and a mapping from source and target nodes to edge fid.

-

source

+

source

# Ribasim.create_storage_tablesMethod.

Read the Basin / profile table and return all area and level and computed storage values

-

source

+

source

# Ribasim.datetime_sinceMethod.

datetime_since(t::Real, t0::DateTime)::DateTime

Convert a Real that represents the seconds passed since the simulation start to the nearest DateTime. This is used to convert between the solver’s inner float time, and the calendar.

-

source

+

source

# Ribasim.discrete_control_affect!Method.

Change parameters based on the control logic.

-

source

+

source

# Ribasim.discrete_control_affect_downcrossing!Method.

An downcrossing means that a condition (always greater than) becomes false.

-

source

+

source

# Ribasim.discrete_control_affect_upcrossing!Method.

An upcrossing means that a condition (always greater than) becomes true.

-

source

+

source

# Ribasim.discrete_control_conditionMethod.

Listens for changes in condition truths.

-

source

+

source

# Ribasim.expand_logic_mappingMethod.

Replace the truth states in the logic mapping which contain wildcards with all possible explicit truth states.

-

source

+

source

# Ribasim.findlastgroupMethod.

For an element id and a vector of elements ids, get the range of indices of the last consecutive block of id. Returns the empty range 1:0 if id is not in ids.

#                         1 2 3 4 5 6 7 8 9
 Ribasim.findlastgroup(2, [5,4,2,2,5,2,2,2,1])
 # output
 6:8
-

source

+

source

# Ribasim.findsortedMethod.

Find the index of element x in a sorted collection a. Returns the index of x if it exists, or nothing if it doesn’t. If x occurs more than once, throw an error.

-

source

+

source

# Ribasim.formulate!Method.

Linearize the evaporation flux when at small water depths Currently at less than 0.1 m.

-

source

+

source

# Ribasim.formulate!Method.

Directed graph: outflow is positive!

-

source

+

source

# Ribasim.formulate!Method.

Conservation of energy for two basins, a and b:

h_a + v_a^2 / (2 * g) = h_b + v_b^2 / (2 * g) + S_f * L + C / 2 * g * (v_b^2 - v_a^2)
@@ -311,164 +311,164 @@

source

+

source

# Ribasim.formulate!Method.

Directed graph: outflow is positive!

-

source

+

source

# Ribasim.formulate_jac!Method.

Method for nodes that do not contribute to the Jacobian

-

source

+

source

# Ribasim.formulate_jac!Method.

The contributions of LinearResistance nodes to the Jacobian.

-

source

+

source

# Ribasim.formulate_jac!Method.

The contributions of ManningResistance nodes to the Jacobian.

-

source

+

source

# Ribasim.formulate_jac!Method.

The contributions of PidControl nodes to the Jacobian.

-

source

+

source

# Ribasim.formulate_jac!Method.

The contributions of TabulatedRatingCurve nodes to the Jacobian.

-

source

-

# Ribasim.formulate_jac!Method.

-

The contributions of Pump and Weir nodes to the Jacobian.

-

source

+

source

+

# Ribasim.formulate_jac!Method.

+

The contributions of Pump and Outlet nodes to the Jacobian.

+

source

# Ribasim.get_area_and_levelMethod.

Compute the area and level of a basin given its storage. Also returns darea/dlevel as it is needed for the Jacobian.

-

source

+

source

# Ribasim.get_compressorMethod.

Get the compressor based on the Config

-

source

+

source

# Ribasim.get_fractional_flow_connected_basinsMethod.

Get the node type specific indices of the fractional flows and basins, that are consecutively connected to a node of given id.

-

source

+

source

# Ribasim.get_jac_prototypeMethod.

Get a sparse matrix whose sparsity matches the sparsity of the Jacobian of the ODE problem. All nodes are taken into consideration, also the ones that are inactive.

Note: the name ‘prototype’ does not mean this code is a prototype, it comes from the naming convention of this sparsity structure in the differentialequations.jl docs.

-

source

+

source

# Ribasim.get_levelMethod.

Get the current water level of a node ID. The ID can belong to either a Basin or a LevelBoundary.

-

source

+

source

# Ribasim.get_storage_from_levelMethod.

Get the storage of a basin from its level.

-

source

+

source

# Ribasim.get_storages_and_levelsMethod.

Get the storage and level of all basins as matrices of nbasin × ntime

-

source

+

source

# Ribasim.get_storages_from_levelsMethod.

Compute the storages of the basins based on the water level of the basins.

-

source

+

source

# Ribasim.get_tstopsMethod.

From an iterable of DateTimes, find the times the solver needs to stop

-

source

+

source

# Ribasim.get_valueMethod.

Get a value for a condition. Currently supports getting levels from basins and flows from flow boundaries.

-

source

+

source

# Ribasim.id_indexMethod.

Get the index of an ID in a set of indices.

-

source

+

source

# Ribasim.input_pathMethod.

Construct a path relative to both the TOML directory and the optional input_dir

-

source

+

source

# Ribasim.load_dataMethod.

load_data(db::DB, config::Config, nodetype::Symbol, kind::Symbol)::Union{Table, Query, Nothing}

Load data from Arrow files if available, otherwise the GeoPackage. Returns either an Arrow.Table, SQLite.Query or nothing if the data is not present.

-

source

+

source

# Ribasim.load_structvectorMethod.

load_structvector(db::DB, config::Config, ::Type{T})::StructVector{T}

Load data from Arrow files if available, otherwise the GeoPackage. Always returns a StructVector of the given struct type T, which is empty if the table is not found. This function validates the schema, and enforces the required sort order.

-

source

+

source

# Ribasim.nodefieldsMethod.

Get all node fieldnames of the parameter object.

-

source

+

source

# Ribasim.nodetypeMethod.

From a SchemaVersion(“ribasim.flowboundary.static”, 1) return (:FlowBoundary, :static)

-

source

+

source

# Ribasim.output_pathMethod.

Construct a path relative to both the TOML directory and the optional output_dir

-

source

+

source

# Ribasim.parsefileMethod.

Parse a TOML file to a Config

-

source

+

source

# Ribasim.profile_storageMethod.

Calculate a profile storage by integrating the areas over the levels

-

source

+

source

# Ribasim.qh_interpolationMethod.

From a table with columns nodeid, discharge (Q) and level (h), create a LinearInterpolation from level to discharge for a given nodeid.

-

source

+

source

# Ribasim.save_flowMethod.

Copy the current flow to the SavedValues

-

source

+

source

# Ribasim.seconds_sinceMethod.

seconds_since(t::DateTime, t0::DateTime)::Float64

Convert a DateTime to a float that is the number of seconds since the start of the simulation. This is used to convert between the solver’s inner float time, and the calendar.

-

source

+

source

# Ribasim.set_current_value!Method.

From a timeseries table time, load the most recent applicable data into table. table must be a NamedTuple of vectors with all variables that must be loaded. The most recent applicable data is non-NaN data for a given ID that is on or before t.

-

source

+

source

# Ribasim.set_static_value!Method.

Load data from a source table static into a destination table. Data is matched based on the node_id, which is sorted.

-

source

+

source

# Ribasim.set_table_row!Method.

Update table at row index i, with the values of a given row. table must be a NamedTuple of vectors with all variables that must be loaded. The row must contain all the column names that are present in the table. If a value is NaN, it is not set.

-

source

+

source

# Ribasim.sorted_table!Method.

Depending on if a table can be sorted, either sort it or assert that it is sorted.

Tables loaded from GeoPackage into memory can be sorted. Tables loaded from Arrow files are memory mapped and can therefore not be sorted.

-

source

+

source

# Ribasim.update_basinMethod.

Load updates from ‘Basin / time’ into the parameters

-

source

+

source

# Ribasim.update_jac_prototype!Method.

Method for nodes that do not contribute to the Jacobian

-

source

+

source

# Ribasim.update_jac_prototype!Method.

The controlled basin affects itself and the basins upstream and downstream of the controlled pump affect eachother if there is a basin upstream of the pump. The state for the integral term and the controlled basin affect eachother, and the same for the integral state and the basin upstream of the pump if it is indeed a basin.

-

source

+

source

# Ribasim.update_jac_prototype!Method.

If both the unique node upstream and the unique node downstream of these nodes are basins, then these directly depend on eachother and affect the Jacobian 2x Basins always depend on themselves.

-

source

-

# Ribasim.update_jac_prototype!Method.

+

source

+

# Ribasim.update_jac_prototype!Method.

If both the unique node upstream and the nodes down stream (or one node further if a fractional flow is in between) are basins, then the downstream basin depends on the upstream basin(s) and affect the Jacobian as many times as there are downstream basins Upstream basins always depend on themselves.

-

source

+

source

# Ribasim.update_tabulated_rating_curve!Method.

Load updates from ‘TabulatedRatingCurve / time’ into the parameters

-

source

+

source

# Ribasim.valid_discrete_controlMethod.

Check whether control states are defined for discrete controlled nodes.

-

source

+

source

# Ribasim.valid_edge_typesMethod.

Check that only supported edge types are declared.

-

source

+

source

# Ribasim.valid_edgesMethod.

Test for each node given its node type whether the nodes that

are downstream (‘down-edge’) of this node are of an allowed type

-

source

+

source

# Ribasim.valid_flow_ratesMethod.

Test whether static or discrete controlled flow rates are indeed non-negative.

-

source

+

source

# Ribasim.valid_fractional_flowMethod.

Check that nodes that have fractional flow outneighbors do not have any other type of outneighbor, that the fractions leaving a node add up to ≈1 and that the fractions are non-negative.

-

source

+

source

# Ribasim.valid_n_neighborsMethod.

Test for each node given its node type whether it has an allowed number of flow inneighbors and flow outneighbors

-

source

+

source

# Ribasim.valid_profilesMethod.

Check whether the profile data has no repeats in the levels and the areas start positive.

-

source

+

source

# Ribasim.water_balance!Method.

The right hand side function of the system of ODEs set up by Ribasim.

-

source

+

source

# Ribasim.water_balance_jac!Method.

The Jacobian is a n x n sparse matrix where n is the number of basins plus the number of PidControl nodes. Each basin has a storage state, and each PidControl node has an error integral state. If we write waterbalance! as f(u, p(t), t) where u is the vector of all states, then J[i,j] = ∂fj/∂ui. fj dictates the time derivative of state j.

J is very sparse because each state only depends on a small number of other states. For more on the sparsity see getjacprototype.

-

source

+

source

# Ribasim.config.algorithmMethod.

Create an OrdinaryDiffEqAlgorithm from solver config

-

source

+

source

# Ribasim.config.snake_caseMethod.

Convert a string from CamelCase to snake_case.

-

source

+

source

@@ -482,17 +482,17 @@

source

+

source

# Ribasim.ConnectivityType.

Store the connectivity information

graphflow, graphcontrol: directed graph with vertices equal to ids flow: store the flow on every flow edge edgeidsflow, edgeidscontrol: get the external edge id from (src, dst) edgeconnectiontypeflow, edgeconnectiontypescontrol: get (srcnodetype, dstnodetype) from edge id

-

source

+

source

# Ribasim.DiscreteControlType.

nodeid: node ID of the DiscreteControl node listenfeatureid: the ID of the node/edge being condition on variable: the name of the variable in the condition greaterthan: The threshold value in the condition conditionvalue: The current value of each condition controlstate: Dictionary: node ID => (control state, control state start) logic_mapping: Dictionary: (control node ID, truth state) => control state record: Namedtuple with discrete control information for output

-

source

+

source

# Ribasim.FlowBoundaryType.

nodeid: node ID of the FlowBoundary node active: whether this node is active and thus contributes flow flowrate: target flow rate

-

source

+

source

# Ribasim.FractionalFlowType.

Requirements: