Skip to content

Commit

Permalink
#634: Added research keywords from the Sediment section.
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-vd-aardweg committed May 17, 2024
1 parent 2e267c0 commit 11ce476
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion hydrolib/core/dflowfm/research/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pydantic.v1 import Field

from hydrolib.core.basemodel import DiskOnlyFileModel
from hydrolib.core.dflowfm import Geometry, FMModel, General, Numerics, Physics
from hydrolib.core.dflowfm import Geometry, FMModel, General, Numerics, Physics, Sediment
from hydrolib.core.dflowfm.ini.models import INIBasedModel


Expand Down Expand Up @@ -454,6 +454,33 @@ class Comments(Physics.Comments):
soiltempthick: Optional[float] = Field(None, alias="soilTempThick")
selfattractionloading: Optional[int] = Field(None, alias="selfAttractionLoading")


class ResearchSediment(Sediment):
class Comments(Sediment.Comments):
mxgrkrone: Optional[str] = Field(
"Highest fraction index treated by Krone.",
alias="mxgrkrone"
)
seddenscoupling: Optional[str] = Field(
"Sed rho coupling (0=no, 1=yes).",
alias="seddensCoupling"
)
implicitfallvelocity: Optional[str] = Field(
"1=Impl., 0 = Expl.",
alias="implicitFallVelocity"
)
nr_of_sedfractions: Optional[str] = Field(
"Nr of sediment fractions, (specify the next parameters for each fraction).",
alias="nr_of_sedfractions"
)

comments: Comments = Comments()

mxgrkrone: Optional[int] = Field(None, alias="mxgrkrone")
seddenscoupling: Optional[bool] = Field(None, alias="seddensCoupling")
implicitfallvelocity: Optional[int] = Field(None, alias="implicitFallVelocity")
nr_of_sedfractions: Optional[int] = Field(None, alias="nr_of_sedfractions")

class ResearchSedtrails(INIBasedModel):
class Comments(INIBasedModel.Comments):
sedtrailsoutputfile: Optional[str] = Field(
Expand All @@ -473,5 +500,6 @@ class ResearchFMModel(FMModel):
geometry: ResearchGeometry = Field(default_factory=ResearchGeometry)
numerics: ResearchNumerics = Field(default_factory=ResearchNumerics)
physics: ResearchPhysics = Field(default_factory=ResearchPhysics)
sediment = ResearchSediment = Field(default_factory=ResearchSediment)
sedtrails: Optional[ResearchSedtrails] = Field(None)

0 comments on commit 11ce476

Please sign in to comment.