Skip to content

Commit

Permalink
Merge pull request #216 from Deltares/feature/DGeoFlow2024.02
Browse files Browse the repository at this point in the history
Feature/d geo flow2024.02
  • Loading branch information
zantDelta authored Jan 20, 2025
2 parents 2d77419 + ce36801 commit 2fb75b4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/user/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Setting the console paths per application
In the *geolib.env* file, you can set the paths to the console applications, for example::

DSTABILITY_CONSOLE_PATH="C:\\Program Files (x86)\\Deltares\\D-GEO Suite\\D-Stability 2023.01\\bin\\D-Stability Console.exe"
DGEOFLOW_CONSOLE_PATH="C:\\Program Files\\Deltares\\D-GEO Suite\\D-Geo Flow 2023.01\\bin\\DGeoFlow Console.exe"
DGEOFLOW_CONSOLE_PATH="C:\\Program Files\\Deltares\\D-GEO Suite\\D-Geo Flow 2024.02\\bin\\D-GeoFlow Console.exe"
DSHEETPILING_CONSOLE_PATH="C:\\Program Files (x86)\\Deltares\\D-Sheet Piling 23.1.1\\DSheetPiling.exe"
DFOUNDATIONS_CONSOLE_PATH="C:\\Program Files (x86)\\Deltares\\D-Foundations 23.1.1\\DFoundations.exe"
DSETTLEMENT_CONSOLE_PATH="C:\\Program Files (x86)\\Deltares\\D-Settlement 23.1.1\\DSettlement.exe"
Expand All @@ -41,7 +41,7 @@ otherwise GEOLib will not start. The executables are expected in the following l
- *CONSOLE_FOLDER*/"DSettlement/DSettlement.exe"
- *CONSOLE_FOLDER*/"DSheetPiling/DSheetPiling.exe"
- *CONSOLE_FOLDER*/"DStabilityConsole/D-Stability Console.exe"
- *CONSOLE_FOLDER*/"DGeoFlowConsole/DGeoFlow Console.exe"
- *CONSOLE_FOLDER*/"DGeoFlowConsole/D-GeoFlow Console.exe"

It can also be set by a **CONSOLE_FOLDER** environment variable. The environment variable will
overrule the .env file, which in its turn, overrides the defaults set in Python.
Expand Down
2 changes: 1 addition & 1 deletion geolib.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# can be customized by client
CONSOLE_FOLDER="tests" # path has to exist!
# DSTABILITY_CONSOLE_PATH="C:\\Program Files (x86)\\Deltares\\D-GEO Suite\\D-Stability 2023.01\\bin\\D-Stability Console.exe"
# DGEOFLOW_CONSOLE_PATH="C:\\Program Files\\Deltares\\D-GEO Suite\\D-Geo Flow 2023.01\\bin\\DGeoFlow Console.exe"
# DGEOFLOW_CONSOLE_PATH="C:\\Program Files\\Deltares\\D-GEO Suite\\D-Geo Flow 2023.01\\bin\\D-GeoFlow Console.exe"
# DSHEETPILING_CONSOLE_PATH="C:\\Program Files (x86)\\Deltares\\D-Sheet Piling 23.1.1\\DSheetPiling.exe"
# DFOUNDATIONS_CONSOLE_PATH="C:\\Program Files (x86)\\Deltares\\D-Foundations 23.1.1\\DFoundations.exe"
# DSETTLEMENT_CONSOLE_PATH="C:\\Program Files (x86)\\Deltares\\D-Settlement 23.1.1\\DSettlement.exe"
Expand Down
2 changes: 1 addition & 1 deletion geolib/models/dgeoflow/dgeoflow_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def parser_provider_type(self) -> Type[DGeoFlowParserProvider]:

@property
def default_console_path(self) -> Path:
return Path("DGeoFlowConsole/DGeoFlow Console.exe")
return Path("DGeoFlowConsole/D-GeoFlow Console.exe")

@property
def custom_console_path(self) -> Path:
Expand Down
14 changes: 11 additions & 3 deletions geolib/models/dgeoflow/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@ class PersistableCalculation(DGeoFlowBaseModelStructure):
Notes: Optional[str] = None
CalculationType: Optional[CalculationTypeEnum] = CalculationTypeEnum.GROUNDWATER_FLOW
CriticalHeadId: Optional[str] = None
CriticalHeadSearchSpace: Optional[
PersistableCriticalHeadSearchSpace
] = PersistableCriticalHeadSearchSpace()
CriticalHeadSearchSpace: Optional[PersistableCriticalHeadSearchSpace] = (
PersistableCriticalHeadSearchSpace()
)
PipeTrajectory: Optional[InternalPipeTrajectory] = None
MeshPropertiesId: Optional[str] = None
ResultsId: Optional[str] = None
Expand All @@ -606,6 +606,11 @@ class ElementResult(DGeoFlowBaseModelStructure):
NodeResults: Optional[List[NodeResult]] = []


class PersistablePhreaticLineSegment(DGeoFlowBaseModelStructure):
Start: Optional[PersistablePoint] = None
End: Optional[PersistablePoint] = None


class PipeElementResult(DGeoFlowBaseModelStructure):
Nodes: Optional[List[PersistablePoint]] = []
IsActive: Optional[bool] = None
Expand All @@ -615,6 +620,7 @@ class PipeElementResult(DGeoFlowBaseModelStructure):
class GroundwaterFlowResult(DGeoFlowSubStructure):
Id: Optional[str] = None
Elements: Optional[List[ElementResult]] = []
PhreaticLineSegments: Optional[List[PersistablePhreaticLineSegment]] = []
ContentVersion: Optional[str] = "2"

id_validator = field_validator("Id", mode="before")(transform_id_to_str)
Expand All @@ -628,6 +634,7 @@ class PipeLengthResult(DGeoFlowSubStructure):
Id: Optional[str] = None
PipeLength: Optional[float] = None
Elements: Optional[List[ElementResult]] = []
PhreaticLineSegments: Optional[List[PersistablePhreaticLineSegment]] = []
PipeElements: Optional[List[PipeElementResult]] = []
ContentVersion: Optional[str] = "2"

Expand All @@ -643,6 +650,7 @@ class CriticalHeadResult(DGeoFlowSubStructure):
PipeLength: Optional[float] = None
CriticalHead: Optional[float] = None
Elements: Optional[List[ElementResult]] = []
PhreaticLineSegments: Optional[List[PersistablePhreaticLineSegment]] = []
PipeElements: Optional[List[PipeElementResult]] = []
ContentVersion: Optional[str] = "2"

Expand Down

0 comments on commit 2fb75b4

Please sign in to comment.