diff --git a/.nojekyll b/.nojekyll index d34be3ae0..91f754602 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -593ddbaa \ No newline at end of file +5dd3f495 \ No newline at end of file diff --git a/build/index.html b/build/index.html index b8e3e15fb..dffe8c73b 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,136 +311,136 @@

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

+

source

# Ribasim.formulate_jac!Method.

The contributions of Pump and Outlet nodes to the Jacobian.

-

source

+

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.

In Ribasim the Jacobian is typically sparse because each state only depends on a small number of other states.

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_scalar_interpolationMethod.

Linear interpolation of a scalar with constant extrapolation.

-

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.parse_static_and_timeMethod.

Process the data in the static and time tables for a given node type. The ‘defaults’ named tuple dictates how missing data is filled in. ‘time_interpolatables’ is a vector of Symbols of parameter names for which a time interpolation (linear) object must be constructed. The control mapping for DiscreteControl is also constructed in this function. This function currently does not support node states that are defined by more than one row in a table, as is the case for TabulatedRatingCurve.

-

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.scalar_interpolation_derivativeMethod.

Derivative of scalar interpolation.

-

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

+

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: