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.

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

Remarks

Remember to set as well the resistance value as the type.

Constructors

FlowResistanceInitializes a new instance of the FlowResistance class

Properties

DepthDependence Gets the resistance depth dependence, which is derived from the ResistanceDistribution
ExpDepExponent 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].
ExtensionData Holds data from an extended DataContract
Formulation 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.

ResistanceDistribution Distribution of resistance.
ResistanceTopValue Top value, used when DepthDependence == Exponent
ResistanceValue 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.

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

Methods

Clone Creates a new object that is a copy of the current instance.
Control Setter for controllable entity. Used by the control module. Can safely be called multiple times with the same timeN.
ConvertResistances 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
ConvertToStandardResistances 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
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)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetNonTabulatedResistanceDerivative Return the resistance derivative value for a non-tabulated depth dependence.
GetNonTabulatedResistanceValue Return the resistance value for a non-tabulated depth dependence.
GetTypeGets the Type of the current instance.
(Inherited from Object)
Interp 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
IsTabulated True if the resistance depth dependence is tabulated.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ResetControlledState Reset controlled state
SetExponentValues Set exponent values, used when DepthDependence == Exponent The bottomValue and topValue follows the Formulation.
ToStringReturns a string that represents the current object.
(Inherited from Object)
Validate Validate data consistency

Fields

ResistanceLeftHighFlow resistance value in the left high flow zone
ResistanceLowFlow resistance value in the low flow zone
ResistanceRightHighFlow resistance value in the right high flow zone

See Also