Click or drag to resize

FlowResistance Class

Holds information about cross section resistance.

It contains information on the formulation used, ResistanceFormulation, and also the resistance values unless they are tabulated.

If resistance values are tabulated, DepthDependence == Tabulated, they should be looked up in the processed data of the cross sections.

If the DepthDependence == Exponent the following formula is used:

r(d,h) = r_b + (r_t - r_b) * Math.Pow(d / h, c);
with depth derivative
r'(d,h) = (c/h)(r_t - r_b) * Math.Pow(d / h, c-1);
where r_b is ResistanceValue r_t is ResistanceTopValue and c is ExpDepExponent

During simulation the engine works on Mannings M or Chezy, and converts the other resistance formulations to one of those. The converted/modified values and formulations are stored in the XSBase.

Inheritance Hierarchy
SystemObject
  DHI.Mike1D.CrossSectionModuleFlowResistance

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 FlowResistance : IExtensibleDataObject, 
	ICloneable

The FlowResistance type exposes the following members.

Constructors
  NameDescription
Public methodFlowResistance
Initializes a new instance of the FlowResistance class
Top
Properties
  NameDescription
Public propertyDepthDependence
Gets the resistance depth dependence, which is derived from the ResistanceDistribution
Public propertyExpDepExponent
Exponent value, used when DepthDependence == Exponent. A value of 1 (default) means linear variation between bottom and top value, a value less than one gives a value below the linear variation, and above one gives a value above the linear variation. Typical values are in the range of [0.1,5].
Public propertyExtensionData
Holds data from an extended DataContract
Public propertyFormulation
Gets and sets the resistance formulation.

This is the formulation stored in the cross section database (xns11 file). During calculations, use the ModifiedFormulation which will match the GetResistanceFactor(Int32, Double) methods.

Public propertyResistanceDistribution
Distribution of resistance.
Public propertyResistanceTopValue
Top value, used when DepthDependence == Exponent
Public propertyResistanceValue
Gets and sets the constant/uniform resistance value. The meaning of its value depends on Formulation.

When the exponential depth dependent formulation is used, this is used as the bottom value.

Public propertyResistanceVegetationValue
Gets and sets the resistance value in the vegetation zones. The meaning of its value depends on Formulation. Only applicable when vegetation is enabled and raw data is available.
Top
Methods
  NameDescription
Public methodClone
Creates a new object that is a copy of the current instance.
Public methodControl
Setter for controllable entity. Used by the control module. Can safely be called multiple times with the same timeN.
Public methodStatic memberConvertResistances
Convert resistances from current formulation to new formalation To make inplace conversion, give the resistance array to both of the currentResistances and newResistances arguments. Not all type of conversions are supported. Currently only : - Mannings n to Mannings M
Public methodStatic memberConvertToStandardResistances
Convert from the current formulation to the new/standard formulation. To make inplace conversion, give the resistance array to both of the currentResistances and newResistances arguments. Not all type of conversions are supported. Currently only : - Mannings n is converted to Mannings M
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 methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetNonTabulatedResistanceDerivative
Return the resistance derivative value for a non-tabulated depth dependence.
Public methodGetNonTabulatedResistanceValue
Return the resistance value for a non-tabulated depth dependence.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberInterp
Interpolate FlowResistance parameters by the given ratio. If either before or after FlowResistance are null, null is returned. It fails if the resistance formulation or the depth dependence differs. Interpolation is like: v = (1-ratio)*v_us + ratio*v_ds
Public methodIsTabulated
True if the resistance depth dependence is tabulated.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodResetControlledState
Reset controlled state
Public methodSetExponentValues
Set exponent values, used when DepthDependence == Exponent The bottomValue and topValue follows the Formulation.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodValidate
Validate data consistency
Top
Fields
  NameDescription
Public fieldResistanceLeftHighFlow
resistance value in the left high flow zone
Public fieldResistanceLowFlow
resistance value in the low flow zone
Public fieldResistanceRightHighFlow
resistance value in the right high flow zone
Top
Remarks
Remember to set as well the resistance value as the type.
See Also