HDModule Class

HDModule solves the HD equations on a EngineNet, and keeps track of state for the HDModule.

The HDModule also implements the IGraph interface, defining only the part of the HD network in the graph.

Definition

Namespace: DHI.Mike1D.Engine.ModuleHD
Assembly: DHI.Mike1D.Engine (in DHI.Mike1D.Engine.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public class HDModule : IFlowModule, IModule, 
	IModelStateReadWrite, IModuleNetwork, IModuleNetwork<IHDNode, IHDReach>, 
	IProxyProvider, IDoubleNetworkProxy, ISourcePointProxyProvider, IGraph
Inheritance
Object    HDModule
Implements
IModule, IModuleNetwork, IModuleNetworkIHDNode, IHDReach, IProxyProvider, ISourcePointProxyProvider, IFlowModule, IGraph, IDoubleNetworkProxy, IModelStateReadWrite

Properties

DataItems Data items for the HD module that can be reused.
EngineNet 
EngineTime 
HDParameters HDParameters
Id Id of module
IsInitialized Returns true if the moduel is initialized (the constructor does so currently)
IsPrepared Returns true if the moduel is prepared (Prepare(Diagnostics) has been called)
IterationNumber Iteration number. Access to the iteration number is needed in the control module (via a sensor)
Nodes List of all HD nodes in network.

Need not include all Engine nodes, use the GetNode(EngineNode) to check if a given engine node also has a corresponding HD node.

NumericalWater Added numerical water = Added numerical water in nodes + Added numerical water in grid points
Obsolete
Order Order of module. Modules are processed in order.
Reaches List of all HD reaches in network.

Need not include all Engine reaches, use the GetReach(EngineReach) to check if a given engine reach also has a corresponding HD reach.

RuntimeDiagnostics Diagnostics instance for the HD module. Used during runtime.

Methods

AddBoundaryToAdaptiveTimeStepCheck Add a boundary source to the adaptive time series check
AddToAdaptiveTimeStepCheck Add a boundary source to the adaptive time series check
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
FinalizeTimestep FinalizeTimeStep allows the modules to do operations required when a time step has successfully completed
Finish Release any license and clean up
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetImplicitSourcePoint(EngineNode) Get an implicit source point proxy for the node.

This can only be called after the Prepare(Diagnostics) function has been called.

GetImplicitSourcePoint(EngineReach, Int32) Get an implicit source point proxy for the gridpoint in the reach.

This can only be called after the Prepare(Diagnostics) function has been called.

GetNode Maps an EngineNode to the corresponding HD Node
GetProxy Get a proxy for generic/global data
GetProxy(EngineNode) Get a proxy for the node
GetProxy(EngineReach) Get a proxy for the reach, covering a number of gridpoints
GetProxy(INetworkNode) Get a proxy for the node
GetProxy(INetworkReach) Get a proxy for the reach, covering a number of gridpoints
GetProxy(EngineReach, Int32) Get a proxy for the gridpoint in the reach
GetProxy(INetworkReach, Int32) Get a proxy for the gridpoint in the reach
GetProxyReachGeneric(EngineReach) Get a proxy for the reach, generic data (not gridpoint associated)
GetProxyReachGeneric(INetworkReach) Get a proxy for the reach, generic data (not gridpoint associated)
GetReach Maps an EngineReach to the corresponding HD Reach
GetSourcePoint(EngineReach, Int32) Get a source point for the gridpoint in the reach. Usually this can only be called after the Prepare(Diagnostics) function has been called.
Obsolete
GetSourcePoint(EngineReach, Type) Get a source point covering all gridpoints in the reach of the specified type Usually this can only be called after the Prepare(Diagnostics) function has been called.
Obsolete
GetSourcePoint(EngineReach, Type, ILocationSpan) Get a source point covering all gridpoints in the span of the specified type Usually this can only be called after the Prepare(Diagnostics) function has been called.
Obsolete
GetSourcePointProxy(EngineNode) Get a source point proxy for the node.

Usually this can only be called after the Prepare(Diagnostics) function has been called.

GetSourcePointProxy(EngineReach, Int32) Get a source point proxy for the gridpoint in the reach.

Usually this can only be called after the Prepare(Diagnostics) function has been called.

GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
PerformTimestep Perform one time step. Return true if time step succeeded, or false if it failed.
PreferredTimeStep 
Prepare Prepare HDModule for first time step.
PrepareForTimeStep Prepare nodes and reaches for next time step. - first time: Updates states, n to n+1 and nph. Derived variables depending on only local state at n, n+1 and nph may also be updated - Subsequent times: Resets the external source contributions.
ReadState Read state and apply to module. Returns true if state was successfully read.
Reset Resets some of the HD module variables to initial values.
SetInitialValues Set initial conditions, the water levels and discharges in all grid points and nodes to prepare for the first iteration.
ToStringReturns a string that represents the current object.
(Inherited from Object)
WriteState Write current state of module

Events

ExternalIntervalSources Event for applying external sources in interval. Called once for each time step.
ExternalSources Event for applying external sources. Called once for each time step.
PreIterationEvent An event that is called everytime a timestep was successfully performed.

Extension Methods

See Also