mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
DB: Some fixes for db update 0.1.0.
This commit is contained in:
1 parent
bc157fcde7
commit
ce8c4ebd91
5 files changed
+101
-62
No files matched your search
@@ -161,7 +161,7 @@ class BasicHS(SQLSubModel):
|
||||
|
||||
bhs.enabled = enabled
|
||||
|
||||
data['bhs_id'] = bhs_id
|
||||
data['bhs_id'] = bhs_pid
|
||||
bhs._data = BHSValue._db_load(
|
||||
execute, data
|
||||
)
|
||||
|
||||
@@ -47,9 +47,9 @@ class DischargeWeir(BasicHS):
|
||||
|
||||
self._type = "S1"
|
||||
self._data = [
|
||||
BHSValue("width", float, 1.0, status=status),
|
||||
BHSValue("elevation", float, 1.0, status=status),
|
||||
BHSValue("discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue(-1, "width", float, 1.0, status=status),
|
||||
BHSValue(-1, "elevation", float, 1.0, status=status),
|
||||
BHSValue(-1, "discharge_coefficient", float, 0.4, status=status),
|
||||
]
|
||||
|
||||
|
||||
@@ -63,11 +63,11 @@ class TrapezoidalWeir(BasicHS):
|
||||
|
||||
self._type = "S2"
|
||||
self._data = [
|
||||
BHSValue("width", float, 1.0, status=status),
|
||||
BHSValue("elevation", float, 1.0, status=status),
|
||||
BHSValue("loading_elevation", float, 9999.999, status=status),
|
||||
BHSValue("discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue("half-angle_tangent", float, 0.0, status=status),
|
||||
BHSValue(-1, "width", float, 1.0, status=status),
|
||||
BHSValue(-1, "elevation", float, 1.0, status=status),
|
||||
BHSValue(-1, "loading_elevation", float, 9999.999, status=status),
|
||||
BHSValue(-1, "discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue(-1, "half-angle_tangent", float, 0.0, status=status),
|
||||
]
|
||||
|
||||
|
||||
@@ -81,10 +81,10 @@ class TriangularWeir(BasicHS):
|
||||
|
||||
self._type = "S3"
|
||||
self._data = [
|
||||
BHSValue("elevation", float, 1.0, status=status),
|
||||
BHSValue("loading_elevation", float, 9999.999, status=status),
|
||||
BHSValue("discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue("half-angle_tangent", float, 0.0, status=status),
|
||||
BHSValue(-1, "elevation", float, 1.0, status=status),
|
||||
BHSValue(-1, "loading_elevation", float, 9999.999, status=status),
|
||||
BHSValue(-1, "discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue(-1, "half-angle_tangent", float, 0.0, status=status),
|
||||
]
|
||||
|
||||
|
||||
@@ -98,12 +98,12 @@ class RectangularOrifice(BasicHS):
|
||||
|
||||
self._type = "OR"
|
||||
self._data = [
|
||||
BHSValue("width", float, 0.0, status=status),
|
||||
BHSValue("elevation", float, 0.0, status=status),
|
||||
BHSValue("loading_elevation", float, 9999.999,
|
||||
BHSValue(-1, "width", float, 0.0, status=status),
|
||||
BHSValue(-1, "elevation", float, 0.0, status=status),
|
||||
BHSValue(-1, "loading_elevation", float, 9999.999,
|
||||
status=status),
|
||||
BHSValue("discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue("maximal_loading_elevation", float, 9999.999,
|
||||
BHSValue(-1, "discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue(-1, "maximal_loading_elevation", float, 9999.999,
|
||||
status=status),
|
||||
]
|
||||
|
||||
@@ -118,10 +118,10 @@ class CircularOrifice(BasicHS):
|
||||
|
||||
self._type = "OC"
|
||||
self._data = [
|
||||
BHSValue("diameter", float, 0.0, status=status),
|
||||
BHSValue("elevation", float, 0.0, status=status),
|
||||
BHSValue("siltation_height", float, 0.0, status=status),
|
||||
BHSValue("discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue(-1, "diameter", float, 0.0, status=status),
|
||||
BHSValue(-1, "elevation", float, 0.0, status=status),
|
||||
BHSValue(-1, "siltation_height", float, 0.0, status=status),
|
||||
BHSValue(-1, "discharge_coefficient", float, 0.4, status=status),
|
||||
]
|
||||
|
||||
|
||||
@@ -135,11 +135,11 @@ class VaultedOrifice(BasicHS):
|
||||
|
||||
self._type = "OV"
|
||||
self._data = [
|
||||
BHSValue("elevation", float, 1.0, status=status),
|
||||
BHSValue("width", float, 1.0, status=status),
|
||||
BHSValue("top_of_the_vault", float, 0.0, status=status),
|
||||
BHSValue("bottom_of_the_vault", float, 0.0, status=status),
|
||||
BHSValue("discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue(-1, "elevation", float, 1.0, status=status),
|
||||
BHSValue(-1, "width", float, 1.0, status=status),
|
||||
BHSValue(-1, "top_of_the_vault", float, 0.0, status=status),
|
||||
BHSValue(-1, "bottom_of_the_vault", float, 0.0, status=status),
|
||||
BHSValue(-1, "discharge_coefficient", float, 0.4, status=status),
|
||||
]
|
||||
|
||||
|
||||
@@ -153,11 +153,11 @@ class RectangularGate(BasicHS):
|
||||
|
||||
self._type = "V1"
|
||||
self._data = [
|
||||
BHSValue("width", float, 1.0, status=status),
|
||||
BHSValue("elevation", float, 0.0, status=status),
|
||||
BHSValue("discharge coefficient", float, 0.4, status=status),
|
||||
BHSValue("opening", float, 1.0, status=status),
|
||||
BHSValue("maximal_opening", float, 1.0, status=status),
|
||||
BHSValue(-1, "width", float, 1.0, status=status),
|
||||
BHSValue(-1, "elevation", float, 0.0, status=status),
|
||||
BHSValue(-1, "discharge coefficient", float, 0.4, status=status),
|
||||
BHSValue(-1, "opening", float, 1.0, status=status),
|
||||
BHSValue(-1, "maximal_opening", float, 1.0, status=status),
|
||||
]
|
||||
|
||||
|
||||
@@ -171,11 +171,11 @@ class SimplifiedRectangularGate(BasicHS):
|
||||
|
||||
self._type = "V2"
|
||||
self._data = [
|
||||
BHSValue("width", float, 1.0, status=status),
|
||||
BHSValue("elevation", float, 0.0, status=status),
|
||||
BHSValue("discharge coefficient", float, 0.4, status=status),
|
||||
BHSValue("opening", float, 1.0, status=status),
|
||||
BHSValue("maximal_opening", float, 1.0, status=status),
|
||||
BHSValue(-1, "width", float, 1.0, status=status),
|
||||
BHSValue(-1, "elevation", float, 0.0, status=status),
|
||||
BHSValue(-1, "discharge coefficient", float, 0.4, status=status),
|
||||
BHSValue(-1, "opening", float, 1.0, status=status),
|
||||
BHSValue(-1, "maximal_opening", float, 1.0, status=status),
|
||||
]
|
||||
|
||||
|
||||
@@ -189,9 +189,9 @@ class Borda(BasicHS):
|
||||
|
||||
self._type = "BO"
|
||||
self._data = [
|
||||
BHSValue("step_space", float, 0.1, status=status),
|
||||
BHSValue("weir", float, 0.15, status=status),
|
||||
BHSValue("coefficient", float, 0.4, status=status),
|
||||
BHSValue(-1, "step_space", float, 0.1, status=status),
|
||||
BHSValue(-1, "weir", float, 0.15, status=status),
|
||||
BHSValue(-1, "coefficient", float, 0.4, status=status),
|
||||
]
|
||||
|
||||
|
||||
@@ -205,12 +205,12 @@ class CheckValve(BasicHS):
|
||||
|
||||
self._type = "CV"
|
||||
self._data = [
|
||||
BHSValue("width", float, 0.0, status=status),
|
||||
BHSValue("elevation", float, 0.0, status=status),
|
||||
BHSValue("loading_elevation", float, 9999.999,
|
||||
BHSValue(-1, "width", float, 0.0, status=status),
|
||||
BHSValue(-1, "elevation", float, 0.0, status=status),
|
||||
BHSValue(-1, "loading_elevation", float, 9999.999,
|
||||
status=status),
|
||||
BHSValue("discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue("maximal_loading_elevation", float, 9999.999,
|
||||
BHSValue(-1, "discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue(-1, "maximal_loading_elevation", float, 9999.999,
|
||||
status=status),
|
||||
]
|
||||
|
||||
@@ -225,11 +225,11 @@ class UserDefined(BasicHS):
|
||||
|
||||
self._type = "UD"
|
||||
self._data = [
|
||||
BHSValue("parameter_1", float, 0.0, status=status),
|
||||
BHSValue("parameter_2", float, 0.0, status=status),
|
||||
BHSValue("parameter_3", float, 0.0, status=status),
|
||||
BHSValue("parameter_4", float, 0.0, status=status),
|
||||
BHSValue("parameter_5", float, 0.0, status=status),
|
||||
BHSValue(-1, "parameter_1", float, 0.0, status=status),
|
||||
BHSValue(-1, "parameter_2", float, 0.0, status=status),
|
||||
BHSValue(-1, "parameter_3", float, 0.0, status=status),
|
||||
BHSValue(-1, "parameter_4", float, 0.0, status=status),
|
||||
BHSValue(-1, "parameter_5", float, 0.0, status=status),
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user