Click or drag to resize

XSCircularPreprocessed Class

Closed Circular Cross Section with preprocessed data. There are several different types of circular cross sections: - Circular. - Egg-shaped circular. - O-shaped circular. For the O-shaped cross section the Height is 9/8*diameter The preprocessed data contains a slot up to a height of 1.5 times the diameter. Hence, the TopLevel does not equal BottomLevel plus the diameter/height.
Inheritance Hierarchy
SystemObject
  DHI.Mike1D.CrossSectionModuleXSBase
    DHI.Mike1D.CrossSectionModuleXSCircularPreprocessed

Namespace:  DHI.Mike1D.CrossSectionModule
Assembly:  DHI.Mike1D.CrossSectionModule (in DHI.Mike1D.CrossSectionModule.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class XSCircularPreprocessed : XSBase

The XSCircularPreprocessed type exposes the following members.

Constructors
  NameDescription
Public methodXSCircularPreprocessed
Constructs a circular CrossSection and sets the diameter
Top
Properties
  NameDescription
Public propertyAutoProcess
Automatically calculate processed data if 1) They are missing 2) They are not up-to-date (ProcessedDataStatus is NotUpdated)
(Inherited from XSBase.)
Public propertyBottomLevel
Lowest level of the processed data.
(Overrides XSBaseBottomLevel.)
Public propertyCoefficientsType
Gets or sets the type of coefficents to use
Public propertyCrossSectionType
Type of cross section
(Inherited from XSBase.)
Public propertyDiameter
Gets and sets the diameter of the pipe
Public propertyEquidistantLevels
Flag to indicate whether equidistant levels are used.
(Inherited from XSBase.)
Public propertyFlowResistance
Flow resistance. Contains information on flow resistance type (ManningM or Chezy, Z dependence etc) and flow resistence values.
(Inherited from XSBase.)
Public propertyHasProcessedData (Inherited from XSBase.)
Public propertyHeight
Height of the cross section
(Overrides XSBaseHeight.)
Public propertyInterpolated
Returns true if the CrossSection is interpolated from other cross sections
(Inherited from XSBase.)
Public propertyIsOpen
Return true if cross section is open
(Inherited from XSBase.)
Public propertyMaximumStorageWidth
Maximum storage width of the cross section
(Overrides XSBaseMaximumStorageWidth.)
Public propertyModifiedFormulation
Gets the Resistance Formulation that matches the GetResistanceFactor(Int32, Double) value.

This is not necessarily the same as in FlowResistance. but can be different for several reasons: a) The raw and processed data differ, as for DarcyWeisbach. b) The resistance factors have been modified, and values used are those in ModifiedResistanceFactors.

(Inherited from XSBase.)
Public propertyModifiedResistanceFactors
Modified resistance factors. These will be different than ProcessedResistanceFactors if one of the Multiply functions has been executed. This is matching the ModifiedFormulation
(Inherited from XSBase.)
Public propertyMorphologicalDivision
When MorphologicalDivisionType is Level, specifies the level of morphological division

For ST modeling only.

Level is relative to raw data, and must not include any datum offset

(Inherited from XSBase.)
Public propertyMorphologicalDivisionType
Specifies the type of morphological division that is applied.

For ST modeling only.

(Inherited from XSBase.)
Public propertyNumberOfProcessedLevels
returns the number of processed levels (same as dimension of all processed data arrays). Returns 0 if processed data have not been calculated, yet.
(Inherited from XSBase.)
Public propertyProcessedAdditionalSurfaceAreas
Processed additional storage area
(Inherited from XSBase.)
Public propertyProcessedAreas
Processed geometric areas
(Inherited from XSBase.)
Public propertyProcessedDataProtected
false: data are not protected and will be recomputed. true: processed data are protected, data has been manually updated and will not be recomputed.
(Inherited from XSBase.)
Public propertyProcessedDataStatus
ProcessingStatus defines the status of the processed data of this cross section. Whenever the user updates raw data of the cross section, its state must be changed to NotUpdated.
(Inherited from XSBase.)
Public propertyProcessedDerivatives
Flag specifying whether processed derivatives are stored as processed data arrays, or calculated directly. If true, processed data arrays for the derivatives are created (most accurate, smooth interpolation)
(Inherited from XSBase.)
Public propertyProcessedFlowAreas
Processed flow areas
(Inherited from XSBase.)
Public propertyProcessedLevels
Processed levels
(Inherited from XSBase.)
Public propertyProcessedRadii
Processed radii
(Inherited from XSBase.)
Public propertyProcessedRadiiDerivatives
Processed radii
(Inherited from XSBase.)
Public propertyProcessedResistanceFactors
Processed resistance factors. Their type corresponds to the Resistance formulation specified in FlowResistance.
(Inherited from XSBase.)
Public propertyProcessedStorageWidths
Processed storage widths
(Inherited from XSBase.)
Public propertyProcessingLevelsSpecs
Access to all level-related specifications for pre-processing of cross section data
(Inherited from XSBase.)
Public propertyRelativeConveyanceCutoff
If processed data has been modified to assure that conveyance never decrease with increasing water levels, this value indicates at which level (relative to height) that the change started.

Only relevant for closed cross sections. Default value is 1.

(Overrides XSBaseRelativeConveyanceCutoff.)
Public propertyTopLevel
Highest level/depth of the processed data.
(Overrides XSBaseTopLevel.)
Public propertyTopoID
The TopoID set that this cross section belongs to. TODO: See where for details?
(Inherited from XSBase.)
Top
Methods
  NameDescription
Public methodAdjustProcessedLevels(Double)
Adjust the processed levels. Used to ensure that _processedLevels[0] has a certain value
(Inherited from XSBase.)
Public methodAdjustProcessedLevelSpecs
Adjust the processed level specification.
(Inherited from XSBase.)
Public methodBottomLevelFromCenter
Return the bottom level of the cross section at a distance dx from the center of the cross section. Throws an exception if dx is larger than half the cross section width.
(Overrides XSBaseBottomLevelFromCenter(Double).)
Public methodCalculateProcessedData
Calculate processed data
(Inherited from XSBase.)
Public methodCalculateProcessedDataIfNeeded
Calculate the processed levels, storage areas, radii, etc, ie, fill in all ProcessedXXX properties if they are not up to date. Also called by getters for these properties if needed, so usually, this method doesn't have to be called explicitly.
(Inherited from XSBase.)
Public methodCheckProcessedData
Validates that this cross sections is set up correctly.
(Inherited from XSBase.)
Public methodClearOriginalProcessedData
Clear any stored processed data arrays
(Inherited from XSBase.)
Public methodClone
Returns a deep clone. Note: Does not clone any children
(Overrides XSBaseClone.)
Protected methodConvertModifiedResistanceFactorsIfNecessary
Converts the modified resistance data to another formulation. Returns false if the conversion could be performed. Note: so far only few conversions are supported: - from Manningsn to ManningsM;
(Inherited from XSBase.)
Public methodConvertRelativeResistanceMultiZones
Converts the ProcessedResistanceFactors according to a multizone set of absolute resistance values. Each input factor is applied between each level seperator, the first factor from -infinity to the first level, the second factor from the first level to the second level, and the last factor from the last level to infinity, i.e., the levelSeperators defines where one factor takes over from the previous. The factors array must be one longer than the levelSeperators array. The relative resistance factor is taken into account also. Results are stored in the ModifiedResistanceFactors and those are used in the calculation.
(Inherited from XSBase.)
Public methodCreateAllProcessedArrays
Creates all processed data arrays with the given number of levels.
(Inherited from XSBase.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetActualMorphologicalDivision
Get actual morphological division or top of cross section if not defined.
(Inherited from XSBase.)
Public methodGetAdditionalSurfaceArea
Additional storage area is a volume 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.
(Inherited from XSBase.)
Public methodGetArea
Gets the flow area, calculated so that the area derivative is smooth
(Overrides XSBaseGetArea(Int32, Double).)
Public methodGetAreaByIntegratingWidths
Return the cross sectional geometric area, integrating the storage widths
(Inherited from XSBase.)
Public methodGetCriticalDepth
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.
(Overrides XSBaseGetCriticalDepth(Double).)
Public methodGetCriticalDischarge
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.
(Overrides XSBaseGetCriticalDischarge(Double).)
Public methodGetFlowArea(Int32)
Gets the flow area
(Overrides XSBaseGetFlowArea(Int32).)
Public methodGetFlowArea(Int32, Double)
Gets the flow area
(Overrides XSBaseGetFlowArea(Int32, Double).)
Public methodGetFlowAreaDerivative
Get storagewidth as dA/dh from neighboring values in processed XS areas at waterLevel.
(Inherited from XSBase.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetHydraulicRadius(Int32)
Gets the radius;
(Overrides XSBaseGetHydraulicRadius(Int32).)
Public methodGetHydraulicRadius(Int32, Double)
Gets the radius;
(Overrides XSBaseGetHydraulicRadius(Int32, Double).)
Public methodGetHydraulicRadiusDerivative
Get the derivate of the hydraulic radius for index and fraction into the processed data.
(Inherited from XSBase.)
Public methodGetLevelFromArea
For a given area, find the level.
(Overrides XSBaseGetLevelFromArea(Double).)
Public methodGetMaximumValues
Set maximum area, maximum hydraulic radius and maximum storage width.
(Overrides XSBaseGetMaximumValues(Double, Double, Double).)
Public methodGetNaturalDepthBase
Same results as GetNaturalDepthOld(Double, Double, HDParameterData), when manning is uniform (no depth dependence). Otherwise results will differ slightly. This version is more "correct", since calculate the max conveyance based on MAR23 and limits the value of MAR23, while the GetNaturalDepthOld(Double, Double, HDParameterData) does it only on AR23. Hence results will differ when manning varies with depth. However, with the _relativeAR23 table it is possible to do binary search (currently linear search)
Public methodGetNaturalDepthOld
Get the natural depth at a given discharge and slope
(Overrides XSBaseGetNaturalDepthOld(Double, Double, HDParameterData).)
Public methodGetResistanceFactor
Returns the resistance factor.
(Inherited from XSBase.)
Public methodGetResistanceFactorsDerivative
Get the derivative of the resistance factor at the given water level
(Overrides XSBaseGetResistanceFactorsDerivative(Int32, Double).)
Public methodGetStorageWidth(Int32)
Returns the storage width
(Overrides XSBaseGetStorageWidth(Int32).)
Public methodGetStorageWidth(Int32, Double)
Returns the storage width
(Overrides XSBaseGetStorageWidth(Int32, Double).)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVolumeFromAdditionalSurfaceArea
Return the integrated additional surface area from the bottom of the top slot to waterLevel
(Inherited from XSBase.)
Public methodInheritProcessedDataFrom
Makes all processed data arrays point to the same arrays as in the other. (reference copy, not value copy)
(Inherited from XSBase.)
Public methodInitialize
Calculate processed data if needed
(Inherited from XSBase.)
Public methodLevel (Overrides XSBaseLevel(Int32).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPrepare
Public methodProcessedLevel
Get the raw processed level at the given index. Works regardless of the _equidistantLevels flag, i.e., also when ProcessedLevels are not present. Index must be between 0 and NumberOfProcessedLevels-1 otherwise it will fail or give incorrect results
(Inherited from XSBase.)
Public methodRestoreModifiedResistanceFactors
if Multiply... or Convert... or similar was called earlier, reset the modified resistance factors to the original processed resistance factors
(Inherited from XSBase.)
Public methodRestoreOriginalProcessedData
Restores any stored processed data arrays previously stored.
(Inherited from XSBase.)
Public methodSaveOriginalProcessedData
Store the current processed data arrays (shallow copy). If a set of original processed data already exists, the original set is kept and not overwritten.

Updating the ProcessedLevels will still update the original processed data, unless new processed data has been provided, i.e. by using CreateAllProcessedArrays(Int32) or SetAllProcessedValues(Double, Double, Double, Double, Double, Double), due to the shallow copy.

The original processed data arrays are kept when setting new processed data, using e.g. SetAllProcessedValues(Double, Double, Double, Double, Double, Double)

(Inherited from XSBase.)
Public methodSetAllProcessedValues
set all the processed data (references to the member array). All values are in SI.
(Inherited from XSBase.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodValidate
Validates that this cross sections is set up correctly.
(Overrides XSBaseValidate.)
Top
Fields
  NameDescription
Protected field_bAutoProcess
Allow CalculateProcessedDataIfNeeded. Set to false to disable
(Inherited from XSBase.)
Protected field_bProcessedDataProtected
false: data are not protected and will be recomputed. true: processed data are protected, data has been manually updated and will not be recomputed.
(Inherited from XSBase.)
Protected field_crossSectionType
Type of cross section.
(Inherited from XSBase.)
Protected field_distanceBetweenLevels
The distance between levels if equidistant levels are ued. If equidistant levels are used, then getIndex and getFraction are faster.
(Inherited from XSBase.)
Protected field_equidistantLevels
Flag to indicate whether equidistant levels are used. If equidistant levels are used, then getIndex and getFraction are faster. Each derived cross section must set this flag to true (during construction), if it does not store levels in the _processedLevels array.
(Inherited from XSBase.)
Protected field_flowResistance
Flow resistance
(Inherited from XSBase.)
Protected field_height (Inherited from XSBase.)
Protected field_isInitialized (Inherited from XSBase.)
Protected field_isPrepared
Flag defining whether Prepare(Diagnostics, HDParameterData, ILocation) has been called.
(Inherited from XSBase.)
Protected field_modifiedFormulation
Flow resistance formulation
(Inherited from XSBase.)
Protected field_modifiedResistanceFactors
Modified resistance factors. As default points to _processedResistanceFactors, but during simulation contains resistance factors that are supported by the engine, which may differ from the original values.
(Inherited from XSBase.)
Protected field_modifiedResistanceFactorsDerivatives
Processed resistance factor derivatives for the modified resistance factors.
(Inherited from XSBase.)
Protected field_numberOfProcessedLevels
The number of processed levels
(Inherited from XSBase.)
Protected field_originalProcessedData
A copy of original processed data, in case they have been modified by the engine during the simulation.
(Inherited from XSBase.)
Protected field_processedAdditionalSurfaceAreas
Processed additional storage areas
(Inherited from XSBase.)
Protected field_processedAreas
Processed geometric areas
(Inherited from XSBase.)
Protected field_processedCriticalDischarges
Table with processed critical discharges, created automatically when required.
(Inherited from XSBase.)
Protected field_processedDataStatus
ProcessingStatus defines the status of the processed data of this cross section. Whenever the user updates raw data of the cross section, its state must be changed to NotUpdated.
(Inherited from XSBase.)
Protected field_processedDerivatives
Flag specifying whether processed derivatives are stored as processed data arrays, or calculated directly. If true, processed data arrays for the derivatives are created (most accurate, smooth interpolation)
(Inherited from XSBase.)
Protected field_processedFlowAreas
Processed flow ares
(Inherited from XSBase.)
Protected field_processedLevels
Processed depths
(Inherited from XSBase.)
Protected field_processedRadii
Processed radii
(Inherited from XSBase.)
Protected field_processedRadiiDerivatives
Processed radius derivatives
(Inherited from XSBase.)
Protected field_processedResistanceFactors
Processed resistance factors
(Inherited from XSBase.)
Protected field_processedStorageWidths
Processed storage widths
(Inherited from XSBase.)
Protected field_resistenceDistri
Resistance distribution
(Inherited from XSBase.)
Top
Extension Methods
  NameDescription
Public Extension MethodGetConveyance
Get the conveyance at the specified processed level
(Defined by CrossSectionExtensions.)
Top
Remarks
The (pre)processed data are scaled with the diameter, i.e., the ProcessedStorageWidths are storage widths for a circular cross section with diameter 1. Do not update in the processed data, since that will change the processed data for all cross sections of this type.
See Also