geolib.models.dgeoflow.dgeoflow_model

Classes

DGeoFlowModel(*args, **data)

D-Geoflow is software for soft soil piping calculations.

DGeoFlowObject(**data)

param data:

class geolib.models.dgeoflow.dgeoflow_model.DGeoFlowModel(*args, **data)

D-Geoflow is software for soft soil piping calculations.

This model can read, modify and create .flox files

add_boundary_condition(points, head_level, label='', notes='', scenario_id=None)

Add boundary conditions to the model

Parameters:
  • points (List[Point]) – list of Point classes, in clockwise order (non closed simple polygon)

  • head_level (float) – level of the hydraulic head for the boundary condition

  • label (str) – label defaults to empty string

  • notes (str) – notes defaults to empty string

  • scenario_id (int) – scenario to add to, defaults to 0

Returns:

id of the boundary conditions collection

Return type:

int

add_calculation(scenario_index=None, label='Calculation', notes='', set_current=True)

Add a new calculation to the model.

Parameters:
  • scenario_index (Optional[int]) – The scenario index to add the calculation to, defaults to the current scenario.

  • label (str) – Label for the calculation.

  • notes (str) – Notes for the calculation.

  • set_current (bool) – Whether to make the new calculation the current calculation.

Return type:

int

Returns:

the id of the new stage

add_layer(points, soil_code, label='', notes='', scenario_id=None)

Add a soil layer to the model

Parameters:
  • points (List[Point]) – list of Point classes, in clockwise order (non closed simple polygon)

  • soil_code (str) – code of the soil for this layer

  • label (str) – label defaults to empty string

  • notes (str) – notes defaults to empty string

  • scenario_id (int) – scenario to add to, defaults to 0

Returns:

id of the added layer

Return type:

int

add_meshproperties(element_size=1.0, label='', scenario_id=None, layer_id=None)

Add a mesh properties to the model

Parameters:
  • element_size (float) – size of the mesh elements for the discretization, defaults to 1.0

  • scenario_id (int) – scenario to add to, defaults to 0

  • layer_id (int) – layer to add to

  • label (str) –

Returns:

id of the added meshproperties collection

Return type:

int

add_scenario(label='Scenario', notes='', set_current=True)

Add a new scenario to the model.

Parameters:
  • label (str) – Label for the scenario.

  • notes (str) – Notes for the scenario.

  • set_current (bool) – Whether to make the new scenario the current scenario.

Return type:

int

Returns:

the id of the new stage

add_soil(soil)

Add a new soil to the model. The code must be unique, the id will be generated

Parameters:

soil (Soil) – a new soil

Returns:

id of the added soil

Return type:

int

add_stage(scenario_index=None, label='Stage', notes='', set_current=True)

Add a new stage to the model at the given scenario index.

Parameters:
  • scenario_index (Optional[int]) – The scenario index to add the stage to, defaults to the current scenario.

  • label (str) – Label for the stage.

  • notes (str) – Notes for the stage.

  • set_current – Whether to make the new stage the current stage.

Return type:

int

Returns:

the id of the new stage

property console_flags_post: List[str]
current_calculation_index: int
current_id: int
current_scenario: int
current_scenario_index: int
current_stage_index: int
property custom_console_path: Path
datastructure: DGeoFlowStructure
property default_console_path: Path
edit_soil(code, **kwargs)

Edit an existing soil with parameter names based on the soil class members

Parameters:
  • code (str) – the code of the soil

  • kwargs (dict) – the parameters and new values for example ‘cohesion=2.0, friction_angle=25.0’

Returns:

the edited soil

Return type:

PersistableSoil

edit_soil_by_name(name, **kwargs)

Edit an existing soil with parameter names based on the soil class members

Parameters:
  • name (str) – the name of the soil

  • kwargs (dict) – the parameters and new values for example ‘cohesion=2.0, friction_angle=25.0’

Returns:

the edited soil

Return type:

PersistableSoil

get_layer(scenario_id, layer_id)

Enables easy access to the soil in the internal dict-like datastructure. Also enables edit/delete for individual soils.

Parameters:
  • scenario_id (int) –

  • layer_id (int) –

Return type:

PersistableSoilLayer

get_result(scenario_index, calculation_index)

Returns the results of a scenario. Calculation results are based on analysis type and calculation type.

Parameters:
  • scenario_index (int) – Index of a scenario.

  • calculation_index (int) – Index of a calculation.

Returns:

Dictionary containing the analysis results of the scenario.

Return type:

dict

Raises:

ValueError – No results or calculationsettings available

property output: GroundwaterFlowResult | PipeLengthResult | CriticalHeadResult

Access internal dict-like datastructure of the output.

Requires a successful execute.

parse(*args, **kwargs)

Parse input or outputfile to Model, depending on extension.

property parser_provider_type: Type[DGeoFlowParserProvider]

Returns the parser provider type of the current concrete class.

Raises:

NotImplementedError – If not implemented in the concrete class.

Returns:

Type[BaseParserProvider] – Concrete parser provider.

property points

Enables easy access to the points in the internal dict-like datastructure. Also enables edit/delete for individual points.

property scenarios: List[Scenario]
serialize(location)

Support serializing to directory while developing for debugging purposes.

Parameters:

location (Union[FilePath, DirectoryPath, BinaryIO]) –

set_calculation_type(scenario_index=0, calculation_index=0, calculation_type=CalculationTypeEnum.GROUNDWATER_FLOW)

Sets the calculation type of a calculation.

Parameters:
  • scenario_index (int) – The scenario index to add to, defaults to 0.

  • calculation_index (int) – The calculation index to add to, defaults to 0.

  • calculation_type (CalculationTypeEnum) – The calculation type, defaults to GROUNDWATER_FLOW.

Return type:

None

set_critical_head_boundary_condition(scenario_index=0, calculation_index=0, boundary_condition_id=None)

Sets the critical head boundary condition for a calculation.

Parameters:
  • scenario_index (int) – The scenario index to add to, defaults to 0.

  • calculation_index (int) – The calculation index to add to, defaults to 0.

  • boundary_condition_id (int) – The id of the critical head boundary condition.

Return type:

None

set_critical_head_search_parameters(scenario_index=0, calculation_index=0, minimum_head_level=0, maximum_head_level=1, step_size=0.1)

Sets the critical head search parameters condition for a calculation.

Parameters:
  • scenario_index (int) – The scenario index to add to, defaults to 0.

  • calculation_index (int) – The calculation index to add to, defaults to 0.

  • minimum_head_level (float) – The minimum head level to search at, defaults to 0.

  • maximum_head_level (float) – The maximum head level to search at, defaults to 1.

  • step_size (float) – The step size to search with, defaults to 0.1.

Return type:

None

set_pipe_trajectory(scenario_index=0, calculation_index=0, pipe_trajectory=None)

Sets the pipe trajectory for a calculation.

Parameters:
  • scenario_index (int) – The scenario index to add to, defaults to 0.

  • calculation_index (int) – The calculation index to add to, defaults to 0.

  • pipe_trajectory (PipeTrajectory) – The pipe trajectory.

Return type:

None

property soils: SoilCollection

Enables easy access to the soil in the internal dict-like datastructure. Also enables edit/delete for individual soils.

class geolib.models.dgeoflow.dgeoflow_model.DGeoFlowObject(**data)
Parameters:

data (Any) –