CrossSectionLocated Class

A cross section with a location (ZLocation). Has a pointer to an BaseCrossSection. The BaseCrossSection can be reused by many CrossSectionLocated.

Contains ZLocation, Coordinates, Info, MinWaterDepth, DHI_ID. Rest is extracted from the BaseCrossSection.

Buffering of previous water level is handled here.

Also does translation from water level to depth (BaseCrossSection can be depth based.). The levels in the BaseCrossSection uses Location.Z as zero level.

Definition

Namespace: DHI.Mike1D.CrossSectionModule
Assembly: DHI.Mike1D.CrossSectionModule (in DHI.Mike1D.CrossSectionModule.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public class CrossSectionLocated : ICrossSection, 
	IComparable, ICloneable, INetworkCrossSection
Inheritance
Object    CrossSectionLocated
Implements
ICrossSection, INetworkCrossSection, ICloneable, IComparable

Constructors

CrossSectionLocatedInitializes a new instance of the CrossSectionLocated class

Properties

ApplyCoordinates Flag specifying whether the Coordinates is to be applied or ´not
BaseCrossSection Get cross section which this location points to
BottomLevel The minimum value of Z in the cross section (bottom level)
Coordinates Gets or sets the cross section coordinates, i.e., the geographical coordinates of line that the cross section follows.
DHI_ID a unique ID allowing tracing of ICrossSection objects' histories in code flow. Persistent in xns11 files only through a hack, by prepending it to the Info (name) field. The xns11 bridge will filter this out, but not other xns11 readers.
Height Height of the cross section
Info Generel info on this cross section, user specified. Can be empty. In Mike11 XNS editor called cross section ID (though it does not identify the cross section)
Interpolated Returns true if the CrossSection is interpolated from other cross sections
Obsolete
InterpolationType Flag indicating if the CrossSection is interpolated by the engine from other cross sections.
IsOpen Return true if the cross section is open
Location Defines the location of the current cross section. The Z-coordinate is the bottom level of the cross section (unless defined by the raw data (the open cross sections)).
MaximumWidth Maximum width of the cross section
MinWaterDepth Minimum water depth of the cross section This can be negative
ResistanceFactorProportionality A proportionality factor that is always multiplied to the tabulated or constant resistance factor. The ProportionalityFactor is used by the resistance factor boundaries to adjust the resistance factor during the simulation. This is not a state variable. Default value: 1.0
ResistanceFormulation The ResistanceFormulation that is used for this crossSection and stored in the processed data.

This may differ from the ones specified in the Formulation, which is the formulation for the raw data.

TopoID The TopoID set that this cross section belongs to. TODO: See where for details?
ZMax The maximum value of Z in the cross section.
ZMin The minimum value of Z in the cross section.

It can differ from the BottomLevel when sediments are present and added in the bottom of the cross section.

Methods

Clone Creates a new object that is a copy of the current instance.
CompareBy(ILocation, String) Predicate to find ICrossSection by Location and topo_id.
CompareBy(ILocationSpan, String) Predicate to find ICrossSection by LocationSpan and Topo_ID. Uses StrictlyContains
CompareBy(String, String) Predicate to find ICrossSection by ID/BranchName and Topo_ID
CompareTo IComparable implementation. Calls IComparable on the members, if that returns 0, if that returns 0 calls CompareTo on the Topo_ID, calls CompareTo on the DHI_ID members,.
DeepClone Creates a new object that is a copy of the current instance.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Extrapolate Returns an extrapolated CrossSection, i.e., a copy of this cross section at the new location.
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetAdditionalSurfaceArea Additional storage area is a surface area that the mass equation takes into account, but it does not influence the momentum equation. It could be a small pond next to the river that is filled/emptied as the water level in the river raises/falss.
GetArea Return the cross sectional geometric area
GetBuffer Get buffer, for use in CrossSectionSlotDecorator
GetChild Returns a Clone of the CrossSection, where the parent keeps a reference to the child. If a property is changed on the parent it will reflect in the child.
GetConveyance Get the conveyance at the specified water level
GetCriticalDepthOld Gets the Critical depth for a given discharge - [m3/s] The critical depth is the depth where the flow changes from supercritical to subcritical flow.
GetCriticalDischarge Gets the Critical discharge for a given water level The critical discharge is the discharge where the flow changes from supercritical to subcritical flow.
GetFlowArea Return the cross sectional flow area, which may differ from the geometrical area due to water not being part of the flow
GetFlowAreaDerivative Get storagewidth as dA/dh from neighboring values in processed XS areas at waterLevel This is how M11 does it - ONLY USED IN M11 SCHEME WHEN COMPARING DIRECTLY WITH M11 RESULTS Only implemented in XSOpen for now
GetFrictionValues(Double, CrossSectionBufferLevel) Values required to calculate friction factor for higher order friction term
GetFrictionValues(Double, CrossSectionBufferLevel, Double, Double, Double, Double) Values required to calculate friction factor for higher order friction term
GetGeoReferencedCoords If cross section coordinates are valid, returns the geographic (in the landscape's plane) coordinates of all points, otherwise null. Raw data must be present.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetHydraulicRadius Returns the hydraulic radius for the given water level. The radius is calculated as one of: Resistance radius, effective area hydraulic radius, or total area hydraulic radius
GetHydraulicRadiusDerivative Get the derivative of the hydraulic radius at the given water level.
GetNaturalDepthOld Gets the Natural depth for a given discharge [m3/s] and slope [dimensionless] The natural depth is the depth where the flow resistance and velocity balances, i.e., the Manning formula is fullfilled: Q = M*A*R^(2/3)*sqrt(I)
Obsolete
GetResistanceFactor(Double) Resistance factor for the given water level. This will always return absolute resistance values.
GetResistanceFactor(Double, CrossSectionBufferLevel) Resistance factor for the given water level. This will always return absolute resistance values.
GetResistanceFactorDerivative(Double) Get the derivative of the resistance factor at the given water level
GetResistanceFactorDerivative(Double, CrossSectionBufferLevel) Get the derivative of the resistance factor at the given water level
GetStorageWidth Returns the width from left bank to right bank at the given water level.
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetVolumeFromAdditionalSurfaceArea Return the integrated additional surface area from the bottom of the top slot to waterLevel
Initialize Initialize cross section. Calculates processed data if needed.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Prepare Ensures that the resistance formulation is not relative. If the resistance formulation is Mannings n it is changed to Mannings M and the data are changed accordingly if the resistance formulation is Darcy Weisbach formulation and data are changed to Chezy.
ToStringReturns a string that represents the current object.
(Inherited from Object)
UpdateBuffer Update buffer, for use in CrossSectionSlotDecorator
UpdateDatum Update datum for cross section
Validate Validates that this cross sections is set up correctly.
ZMinFromCenter The minimum value of Z in the cross section (bottom level)

Fields

_interpolationType Flag indicating if the CrossSection is interpolated by the engine from other cross sections.

Extension Methods

CalculateNaturalDepth Gets the Natural depth for a given discharge [m3/s] and slope [dimensionless] The natural depth is the depth where the flow resistance and velocity balances, i.e., for Manning resistance formulation when Manning formula is fullfilled: Q = M*A*R^(2/3)*sqrt(I)
(Defined by CrossSectionExtensions)
GetCapacity Get the capacity=conveyance*sqrt(slope) at the specified water level and slope.
(Defined by CrossSectionExtensions)
GetConveyance Get the conveyance at the specified water level and slope.

The slope must be positive


(Defined by CrossSectionExtensions)
GetDelh Return delh for the cross section.
(Defined by CrossSectionExtensions)
GetNaturalDepth Gets the Natural depth for a given discharge [m3/s] and slope [dimensionless] The natural depth is the depth where the flow resistance and velocity balances, i.e., for the Manning formula: Q = M*A*R^(2/3)*sqrt(I)
(Defined by CrossSectionExtensions)
GetNaturalDepth Gets the Natural depth for a given discharge [m3/s] and slope [dimensionless] The natural depth is the depth where the flow resistance and velocity balances, i.e., for the Manning formula: Q = M*A*R^(2/3)*sqrt(I)
(Defined by CrossSectionExtensions)
GetNaturalFlow Get the open channel natural flow at specified water level and slope

The slope must be positive


(Defined by CrossSectionExtensions)
GetWettedPerimeterGeometric Get geometric wetted perimeter.

The geometric wetted perimeter is the sum of all cross-section line segments below a given water level. It can be limited to be not smaller than storage width by using doLimit flag. A hydraulic wetted perimeter is returned in case a cross section has no raw cross section points.


(Defined by CrossSectionExtensions)
GetWettedPerimeterHydraulic Get hydraulic wetted perimeter.

The hydraulic wetted perimeter is defined as geometric cross section area divided by hydraulic radius. It can be limited to be not smaller than storage width by using doLimit flag.


(Defined by CrossSectionExtensions)

See Also