HydPy-SW1D-Weir-Out (submodel for calculating free weir flow at a channel outlet)¶
The HydPy-SW1D model family member sw1d_weir_out is a routing submodel,
which calculates the free flow over a weir out of a channel after Poleni.
Please refer to the documentation of the “user model” sw1d_channel and the
“composite model” sw1d_network, where we demonstrate and discuss sw1d_weir_out in
more detail (see, for example, :ref:`sw1d_channel_weir_outflow).
- class hydpy.models.sw1d_weir_out.Model[source]¶
Bases:
AdHocModel,RoutingModel_V3HydPy-SW1D-Weir-Out (submodel for calculating free weir flow at a channel outlet).
- The following interface methods are available to main models using the defined model as a submodel:
Perform_Preprocessing_V2Routing model interface method for preprocessing data that is invariant within each external simulation step.Determine_MaxTimeStep_V3Interface method for determining the highest possible computation time step at an outflow weir.Determine_Discharge_V3Interface method for determining the discharge at an outflow weir.Get_MaxTimeStep_V1Interface method for querying the highest possible computation time step in s.Get_Discharge_V1Interface method for querying the discharge in m³/s.Get_PartialDischargeDownstream_V1Return a partial discharge estimate suitable for an upstream model.Get_DischargeVolume_V1Interface method for querying the discharge in m³.Set_TimeStep_V1Interface method for setting the actual computation time step in s.Perform_Postprocessing_V2Routing model interface method for executing all tasks necessary at the end of each external simulation step.
- The following “additional methods” might be called by one or more of the other methods or are meant to be directly called by the user:
Reset_DischargeVolume_V1Reset the discharge volume to zero (at the beginning of an external simulation step).Calc_WaterLevelUpstream_V1Query the water level from an upstream submodel that follows theStorageModel_V1interface.Calc_WaterLevel_V3Take the water level from the upstream channel segment.Calc_MaxTimeStep_V3Estimate the highest possible computation time step for which we can expect stability for a weir-like routing model.Calc_Discharge_V2Calculate the free weir flow after Poleni.Update_DischargeVolume_V1Update the total discharge volume of the current external simulation step.Pass_Discharge_V1Pass the calculated average discharge of the current simulation step to an arbitrary number of inlet or outlet sequences.
- Users can hook submodels into the defined main model if they satisfy one of the following interfaces:
RoutingModel_V1Interface for calculating the inflow into a channel.RoutingModel_V2Interface for calculating the discharge between two channel segments.StorageModel_V1Interface for calculating the water amount stored in a single channel segment.
- DOCNAME: DocName = ('SW1D-Weir-Out', 'submodel for calculating free weir flow at a channel outlet')¶
- storagemodelupstream: modeltools.SubmodelProperty[StorageModel_V1]¶
Required reference to the neighbour storage model upstream.
- storagemodelupstream_is_mainmodel¶
- storagemodelupstream_typeid¶
- routingmodelsupstream: modeltools.SubmodelsProperty[RoutingModel_V1 | RoutingModel_V2]¶
References to the neighbour routing models lying upstream.
- REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
- class hydpy.models.sw1d_weir_out.ControlParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersControl parameters of model sw1d_weir_out.
- The following classes are selected:
LengthUpstream()The upstream channel segment’s length [km].TimeStepFactor()A factor for reducing the estimated computation time step to increase numerical stability [-].CrestHeight()The weir crest height [m].CrestWidth()The weir crest width [m].FlowCoefficient()The weir flow coefficient [-].
- class hydpy.models.sw1d_weir_out.DerivedParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersDerived parameters of model sw1d_weir_out.
- The following classes are selected:
Seconds()The length of the actual simulation step size in seconds [s].
- class hydpy.models.sw1d_weir_out.FactorSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FactorSequencesFactor sequences of model sw1d_weir_out.
- The following classes are selected:
MaxTimeStep()The highest possible computation time step according to local stability considerations [s].TimeStep()The actual computation step according to global stability considerations [s].WaterLevel()Water level [m].WaterLevelUpstream()The upstream channel segment’s water level [m].
- class hydpy.models.sw1d_weir_out.FixedParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersFixed parameters of model sw1d_weir_out.
- The following classes are selected:
GravitationalAcceleration()Gravitational acceleration [m/s²].
- class hydpy.models.sw1d_weir_out.FluxSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FluxSequencesFlux sequences of model sw1d_weir_out.
- The following classes are selected:
DischargeVolume()The total amount of discharge of a simulation step [m³/T].
- class hydpy.models.sw1d_weir_out.InletSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
InletSequencesInlet sequences of model sw1d_weir_out.
- The following classes are selected:
LongQ()The longitudinal inflow into the first channel segment [m³/s].
- class hydpy.models.sw1d_weir_out.OutletSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
OutletSequencesOutlet sequences of model sw1d_weir_out.
- The following classes are selected:
LongQ()The longitudinal outflow of the last channel segment [m³/s].
- class hydpy.models.sw1d_weir_out.StateSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
StateSequencesState sequences of model sw1d_weir_out.
- The following classes are selected:
Discharge()Discharge [m³/s].