mirror of https://gitlab.com/pamhyr/pamhyr2
River: Add a default sediment layers.
parent
e6c08cb4e4
commit
4cec45131e
|
|
@ -378,6 +378,7 @@ class River(Graph, SQLSubModel):
|
|||
|
||||
def init_default(self):
|
||||
self.init_default_network()
|
||||
self.init_default_sediment()
|
||||
self.init_default_additional_files()
|
||||
|
||||
def init_default_network(self):
|
||||
|
|
@ -386,6 +387,20 @@ class River(Graph, SQLSubModel):
|
|||
|
||||
e = self.add_edge(n1, n2)
|
||||
|
||||
def init_default_sediment(self):
|
||||
sediment = self._sediment_layers
|
||||
default = sediment.new(0)
|
||||
default_0 = default.new(0)
|
||||
|
||||
default.name = "default"
|
||||
default.comment = "Default sediment layers"
|
||||
|
||||
default_0.name = "L0"
|
||||
default_0.height = 1.0
|
||||
default_0.d50 = 0.002
|
||||
default_0.sigma = 1.0
|
||||
default_0.critical_constraint = 0.047
|
||||
|
||||
def init_default_additional_files(self):
|
||||
add_file = self._additional_files.new(0)
|
||||
add_file.name = "Pamhyr2 stamp file"
|
||||
|
|
|
|||
Loading…
Reference in New Issue