Skip to main content
Version: 13

viktor.external.dfoundations

DFoundationsAnalysis

class viktor.external.dfoundations.DFoundationsAnalysis(input_file)

Bases: ExternalProgram

DFoundationsAnalysis can be used to perform an analysis using D-Foundations on a third-party worker. To start an analysis call the method execute(), with an appropriate timeout (in seconds). To retrieve the results call the method get_output_file(), after execute().

Note: the input for the BytesIO object should be of type bytes. You can convert a string to bytes by calling the method encode(). Default encoding is ‘utf-8’.

Usage:

input_file = BytesIO("dfoundations input file body".encode('utf-8'))
dfoundations_analysis = DFoundationsAnalysis(input_file=input_file)
dfoundations_analysis.execute(timeout=10)
output_file = dfoundations_analysis.get_output_file()

Exceptions which can be raised during calculation: - viktor.errors.ExecutionError: generic error. Error message provides more information

Parameters

input_file (Union[BytesIO, File]) – .foi input file.

get_output_file(extension='.fod', *, as_file=False)
Method can be used to retrieve the results generated by running an external analysis. Call method

execute() first and get_output_file() afterwards.

Parameters
  • extension (str) – extension of the file you want to return; one of: ‘.fos’, ‘.fod’, ‘.error.log’, ‘.err’

  • as_file (bool) – return as BytesIO (default) or File

Return type

Union[BytesIO, File, None]

Returns

  • File, if as_file = True

  • BytesIO, if as_file = False (default)

SoilType

class viktor.external.dfoundations.SoilType(value)

Bases: Enum

An enumeration.

GRAVEL: SoilType = 0
SAND: SoilType = 1
LOAM: SoilType = 2
CLAY: SoilType = 3
PEAT: SoilType = 4

MaxConeResistType

class viktor.external.dfoundations.MaxConeResistType(value)

Bases: Enum

An enumeration.

STANDARD: MaxConeResistType = 0
MANUAL: MaxConeResistType = 1

CPTRule

class viktor.external.dfoundations.CPTRule(value)

Bases: Enum

An enumeration.

NEN: CPTRule = 0
NEN_STRESS: CPTRule = 0
CUR: CPTRule = 1
TYPE_3: CPTRule = 2
QC_ONLY: CPTRule = 3

ConstructionSequence

class viktor.external.dfoundations.ConstructionSequence(value)

Bases: Enum

An enumeration.

CPT_EXCAVATION_INSTALL: ConstructionSequence = 1
INSTALL_CPT_EXCAVATION: ConstructionSequence = 2
EXCAVATION_CPT_INSTALL: ConstructionSequence = 3
EXCAVATION_INSTALL_CPT: ConstructionSequence = 4
INSTALL_EXCAVATION_CPT: ConstructionSequence = 5
CPT_INSTALL_EXCAVATION: ConstructionSequence = 6
EXCAVATION_CPT_BOTH_BEFORE_AND_AFTER_INSTALL: ConstructionSequence = 7

CalculationType

class viktor.external.dfoundations.CalculationType(value)

Bases: Enum

An enumeration.

DESIGN_CALCULATION: CalculationType = 0
COMPLETE_CALCULATION: CalculationType = 1
INDICATION_BEARING_CAPACITY: CalculationType = 2
BEARING_CAPACITY_AT_FIXED_PILE_TIP_LEVEL: CalculationType = 3
PILE_TIP_LEVEL_AND_NET_BEARING_CAPACITY: CalculationType = 4

PileType

class viktor.external.dfoundations.PileType(value)

Bases: Enum

An enumeration.

PREFAB_CONCRETE: PileType = 0
CLOSED_STEEL: PileType = 1
DRIVEN_TUBE_BACK_DRIVING: PileType = 2
DRIVEN_TUBE_BACK_VIBRATION: PileType = 3
TAPERED_TIMBER: PileType = 4
STRAIGHT_TIMBER: PileType = 5
SCREW_LOST_TIP: PileType = 6
SCREW_WITH_GROUT: PileType = 7
PREFAB_WITH_GROUT: PileType = 8
PREFAB_WITHOUT_GROUT: PileType = 9
STEEL: PileType = 10
CONTINUOUS_FLIGHT_AUGER: PileType = 11
BORED_DRILLING: PileType = 12
BORED_SHELLING: PileType = 13
OPEN_STEEL: PileType = 14
MV: PileType = 15
MICRO_DOUBLE_EXTORTED: PileType = 16
MICRO_DOUBLE_NOT_EXTORTED: PileType = 17
MICRO_SINGLE_EXTORTED: PileType = 18
MICRO_SINGLE_NOT_EXTORTED: PileType = 19
MICRO_ANCHOR_BORED: PileType = 20
MICRO_ANCHOR_SCREWED: PileType = 21
MICRO_VIBRATED: PileType = 22
GROUTED_STEEL_PROFILE: PileType = 23
GROUTED_STEEL_PIPE: PileType = 24
USER_DEFINED_VIBRATING: PileType = 25
USER_DEFINED_LOW_VIBRATING: PileType = 26
USER_DEFINED: PileType = 27

PileTypeClayLoamPeat

class viktor.external.dfoundations.PileTypeClayLoamPeat(value)

Bases: Enum

An enumeration.

ACCORDING_TO_STANDARD: PileTypeClayLoamPeat = 0
USER_DEFINED: PileTypeClayLoamPeat = 1

PileLoadSettlementCurve

class viktor.external.dfoundations.PileLoadSettlementCurve(value)

Bases: Enum

An enumeration.

ONE: PileLoadSettlementCurve = 0
TWO: PileLoadSettlementCurve = 1
THREE: PileLoadSettlementCurve = 2

PileMaterial

class viktor.external.dfoundations.PileMaterial(value)

Bases: Enum

An enumeration.

CONCRETE: PileMaterial = 0
STEEL: PileMaterial = 1
TIMBER: PileMaterial = 2
WOOD: PileMaterial = 2
USER_DEFINED: PileMaterial = 3

PileSlipLayer

class viktor.external.dfoundations.PileSlipLayer(value)

Bases: Enum

An enumeration.

NONE: PileSlipLayer = 0
SYNTHETIC: PileSlipLayer = 1
BENTONITE: PileSlipLayer = 2
BITUMEN: PileSlipLayer = 3
USER_DEFINED: PileSlipLayer = 4

Metadata

class viktor.external.dfoundations.Metadata(file_name='-', company='-', title_1='-', title_2='-', geotechnical_consultant='', design_engineer='', principal='', project_id='', location='', current_date=False, current_time=False)

Data container for metadata to be added to the D-Foundations input file.

Parameters
  • file_name (str) – file name, as shown in the input file header

  • company (str) – company name, as shown in the input file header

  • title_1 (str) –

  • title_2 (str) –

  • geotechnical_consultant (str) –

  • design_engineer (str) –

  • principal (str) –

  • project_id (str) –

  • location (str) –

  • current_date (bool) – date, as shown in the input file header

  • current_time (bool) – time, as shown in the input file header

BearingPilesCalculationOptions

class viktor.external.dfoundations.BearingPilesCalculationOptions(calculation_type, rigid, max_allowed_settlement_str_geo=150, max_allowed_settlement_sls=150, max_allowed_relative_rotation_str_geo=100, max_allowed_relative_rotation_sls=300, *, xi3=None, xi4=None, gamma_b=None, gamma_s=None, gamma_fnk=None, area=None, e_ea_gem=None, write_intermediate_results=False, use_pile_group=True, overrule_excavation=False, suppress_qciii_reduction=False, use_almere_rules=False, use_extra_almere_rules=False, trajectory_begin_end_interval=None, net_bearing_capacity=None, cpt_test_level=None)

Bases: _CalculationOptions

Parameters
  • calculation_type (CalculationType) –

  • rigid (bool) – True for rigid, False for non-rigid

  • max_allowed_settlement_str_geo (int) – [mm]

  • max_allowed_relative_rotation_str_geo (int) – 1 : [-]

  • max_allowed_settlement_sls (int) – [mm]

  • max_allowed_relative_rotation_sls (int) – 1 : [-]

  • xi3 (Optional[float]) – ξ_3 [-]

  • xi4 (Optional[float]) – ξ_4 [-]

  • gamma_b (Optional[float]) – γ_b [-]

  • gamma_s (Optional[float]) – γ_s [-]

  • gamma_fnk (Optional[float]) – γ_f;nk [-]

  • area (Optional[float]) – [m²]

  • e_ea_gem (Optional[float]) – E_ea;gem [kN/m2]

  • write_intermediate_results (bool) –

  • use_pile_group (bool) –

  • overrule_excavation (bool) –

  • suppress_qciii_reduction (bool) –

  • use_almere_rules (bool) –

  • use_extra_almere_rules (bool) –

  • trajectory_begin_end_interval (Optional[Tuple[float, float, float]]) – tuple([m], [m], [m])

  • net_bearing_capacity (Optional[int]) – [kN]

  • cpt_test_level (Optional[float]) – [m]

Raises

ModelError

  • if ‘calculation_type’ is DESIGN_CALCULATION or INDICATION_BEARING_CAPACITY or PILE_TIP_LEVEL_AND_NET_BEARING_CAPACITY and trajectory_begin_end_interval’ is not set.

  • if the number of iterations > 151, based on the provided ‘trajectory_begin_end_interval’.

  • if ‘calculation_type’ is PILE_TIP_LEVEL_AND_NET_BEARING_CAPACITY and ‘net_bearing_capacity’ is not set.

  • if ‘calculation_type’ is DESIGN_CALCULATION or COMPLETE_CALCULATION and ‘cpt_test_level’ is not set.

TensionPilesCalculationOptions

class viktor.external.dfoundations.TensionPilesCalculationOptions(calculation_type, rigid, unit_weight_water=9.81, surcharge=0.0, *, xi3=None, xi4=None, gamma_m_var_qc=None, gamma_st=None, gamma_gamma=None, use_compaction=False, overrule_excavation=False, overrule_excess_pore_pressure=True, trajectory_begin_end_interval=None, net_bearing_capacity=None)

Bases: _CalculationOptions

Data container for the calculation options for a Tension Piles (EC7-NL) model.

Parameters
  • calculation_type (CalculationType) –

    valid types:

    • CalculationType.INDICATION_BEARING_CAPACITY

    • CalculationType.BEARING_CAPACITY_AT_FIXED_PILE_TIP_LEVEL

    • CalculationType.PILE_TIP_LEVEL_AND_NET_BEARING_CAPACITY

  • rigid (bool) – True for rigid, False for non-rigid

  • unit_weight_water (float) – [kN/m3]

  • surcharge (float) – [kN/m2]

  • xi3 (Optional[float]) – ξ_3 [-]

  • xi4 (Optional[float]) – ξ_4 [-]

  • gamma_m_var_qc (Optional[float]) – γ_m;var;qc [-]

  • gamma_st (Optional[float]) – γ_st [-]

  • gamma_gamma (Optional[float]) – γ_γ [-]

  • overrule_excavation (bool) –

  • use_compaction (bool) –

  • overrule_excess_pore_pressure (bool) –

  • trajectory_begin_end_interval (Optional[Tuple[float, float, float]]) – tuple([m], [m], [m])

  • net_bearing_capacity (Optional[int]) – [kN]

Raises

ModelError

  • if ‘calculation_type’ is not one of the valid types.

  • if ‘calculation_type’ is INDICATION_BEARING_CAPACITY or PILE_TIP_LEVEL_AND_NET_BEARING_CAPACITY and ‘trajectory_begin_end_interval’ is not set.

  • if the number of iterations > 151, based on the provided ‘trajectory_begin_end_interval’.

  • if ‘calculation_type’ is PILE_TIP_LEVEL_AND_NET_BEARING_CAPACITY and ‘net_bearing_capacity’ is not set.

ProfileLayer

class viktor.external.dfoundations.ProfileLayer(top_level, material, ad_pore_pressure_at_top=0.0, ad_pore_pressure_at_bottom=0.0, ocr=1.0)

Data container for a single layer within a profile.

Parameters
  • top_level (float) – [m]

  • material (str) – name of the material.

  • ad_pore_pressure_at_top (float) – [kN/m2]. Tensions Piles (EC7-NL) model only. Ignored for other model types.

  • ad_pore_pressure_at_bottom (float) – [kN/m2]. Tensions Piles (EC7-NL) model only. Ignored for other model types.

  • ocr (float) – [-]. Tensions Piles (EC7-NL) model only. Ignored for other model types.

property material: str
Return type

str

RectPile

class viktor.external.dfoundations.RectPile(width, length)

Bases: _PileShape

Rectangular pile.

Parameters
  • width (float) – [m]

  • length (float) – [m]

RectEnlPile

class viktor.external.dfoundations.RectEnlPile(base_width, base_length, base_height, shaft_width, shaft_length)

Bases: _PileShape

Round pile with enlarged base.

Parameters
  • base_width (float) – [m]

  • base_length (float) – [m]

  • base_height (float) – [m]

  • shaft_width (float) – [m]. Must be smaller than ‘base_width’.

  • shaft_length (float) – [m]. Must be smaller than ‘base_length’.

Raises

ModelError

  • if ‘shaft_width’ is not smaller than ‘base_width’.

  • if ‘shaft_length’ is not smaller than ‘base_length’.

SectionPile

class viktor.external.dfoundations.SectionPile(width, length)

Bases: RectPile

Section pile.

Rectangular pile.

Parameters
  • width (float) – [m]

  • length (float) – [m]

UserPile

class viktor.external.dfoundations.UserPile(circumference, cross_section)

Bases: _PileShape

User defined pile.

Parameters
  • circumference (float) – [m]

  • cross_section (float) – [m2]

RoundPile

class viktor.external.dfoundations.RoundPile(diameter)

Bases: _PileShape

Round pile.

Parameters

diameter (float) – [m]

TaperPile

class viktor.external.dfoundations.TaperPile(diameter_tip, increase)

Bases: _PileShape

Round tapered pile.

Parameters
  • diameter_tip (float) – [m]

  • increase (float) – [m/m’]

HollowPile

class viktor.external.dfoundations.HollowPile(external_diameter, wall_thickness)

Bases: _PileShape

Round hollow pile with closed base.

Parameters
  • external_diameter (float) – [m]

  • wall_thickness (float) – [mm]. Must be smaller than half of ‘external_diameter’.

Raises

ModelError – if ‘wall_thickness’ is not smaller than half of ‘external_diameter’.

property internal_diameter: float
Return type

float

HollowOpenPile

class viktor.external.dfoundations.HollowOpenPile(external_diameter, wall_thickness)

Bases: _PileShape

Round open-ended hollow pile.

Parameters
  • external_diameter (float) – [m]

  • wall_thickness (float) – [mm]. Must be smaller than half of ‘external_diameter’.

Raises

ModelError – if ‘wall_thickness’ is not smaller than half of ‘external_diameter’.

property internal_diameter: float
Return type

float

LostTipPile

class viktor.external.dfoundations.LostTipPile(base_diameter, pile_diameter)

Bases: _PileShape

Round pile with lost tip.

Parameters
  • base_diameter (float) – [m]

  • pile_diameter (float) – [m]. Must be smaller than ‘base_diameter’.

Raises

ModelError – if ‘pile_diameter’ is not smaller than ‘base_diameter’.

RoundEnlPile

class viktor.external.dfoundations.RoundEnlPile(base_diameter, pile_diameter, base_height)

Bases: LostTipPile

Round pile with enlarged base.

Parameters
  • base_diameter (float) – [m]

  • pile_diameter (float) – [m]. Must be smaller than ‘base_diameter’.

  • base_height (float) – [m]

Raises

ModelError – if ‘pile_diameter’ is not smaller than ‘base_diameter’.

DrivenBasePile

class viktor.external.dfoundations.DrivenBasePile(base_diameter, pile_diameter, base_height)

Bases: RoundEnlPile

Round pile with in situ formed base.

Round pile with enlarged base.

Parameters
  • base_diameter (float) – [m]

  • pile_diameter (float) – [m]. Must be smaller than ‘base_diameter’.

  • base_height (float) – [m]

Raises

ModelError – if ‘pile_diameter’ is not smaller than ‘base_diameter’.

HShapedPile

class viktor.external.dfoundations.HShapedPile(height, width, thickness_web, thickness_flange)

Bases: _PileShape

H-shaped profile.

Parameters
  • height (float) – [m]

  • width (float) – [m]

  • thickness_web (float) – [mm]. Must be smaller than ‘width’.

  • thickness_flange (float) – [mm]. Must be smaller than half of ‘height’.

Raises

ModelError

  • if ‘thickness_web’ is not smaller than ‘width’.

  • if ‘thickness_flange’ is not smaller than half of ‘height’.

BearingPilesModel

class viktor.external.dfoundations.BearingPilesModel(construction_sequence, calculation_options, excavation_level, reduction_cone_resistance=None, *, create_default_materials=True)

Bases: _Model

Create a Bearing Piles (EC7-NL) model.

Parameters
  • construction_sequence (ConstructionSequence) –

  • calculation_options (BearingPilesCalculationOptions) –

  • excavation_level (float) – [m]

  • reduction_cone_resistance (Optional[float]) – Distance edge pile to excavation boundary [m] to implement ‘Begemann’. ‘None’ to implement ‘Safe (NEN)’.

  • create_default_materials (bool) – whether to start with the default D-Foundations materials.

The default materials are:

  • BClay, clean, moderate

  • BClay, clean, modstiff

  • BClay, clean, stiff

  • BClay, clean, weak

  • BClay, sl san, moderate

  • BClay, sl san, modstiff

  • BClay, sl san, stiff

  • BClay, sl san, weak

  • BGravel, clean, moderate

  • BGravel, clean, stiff

  • BGravel, ve sil, moderate

  • BGravel, ve sil, stiff

  • BLoam, clean, moderate

  • BLoam, clean, modstiff

  • BLoam, clean, stiff

  • BLoam, clean, weak

  • BLoam, sl san, moderate

  • BLoam, sl san, modstiff

  • BLoam, sl san, stiff

  • BLoam, sl san, weak

  • BPeat, sl san, moderate

  • BPeat, sl san, stiff

  • BPeat, sl san, weak

  • BSand, clean, loose

  • BSand, clean, moderate

  • BSand, clean, stiff

  • BSand, ve sil, loose

  • BSand, ve sil, moderate

  • BSand, ve sil, stiff

  • Clay, clean, moderate

  • Clay, clean, stiff

  • Clay, clean, weak

  • Clay, organ, moderate

  • Clay, organ, weak

  • Clay, sl san, moderate

  • Clay, sl san, stiff

  • Clay, sl san, weak

  • Clay, ve san, stiff

  • Gravel, sl sil, loose

  • Gravel, sl sil, moderate

  • Gravel, sl sil, stiff

  • Gravel, ve sil, loose

  • Gravel, ve sil, moderate

  • Gravel, ve sil, stiff

  • Loam, sl san, moderate

  • Loam, sl san, stiff

  • Loam, sl san, weak

  • Loam, ve san, stiff

  • Peat, mod pl, moderate

  • Peat, not pl, weak

  • Sand, clean, loose

  • Sand, clean, moderate

  • Sand, clean, stiff

  • Sand, sl sil, moderate

  • Sand, ve sil, loose

materials

Lists all materials currently in de model.

Return type

Dict[str, Dict[str, Any]]

profiles

Lists all profiles currently in de model.

Return type

List[Dict[str, Any]]

pile_types

Lists all pile types currently in de model.

Return type

List[Dict[str, Any]]

piles

Lists all piles currently in de model.

Return type

List[Dict[str, Any]]

generate_input_file(metadata=None, *, as_file=False)

Generate a D-Foundations input file.

Note

This method needs to be mocked in (automated) unit and integration tests.

Parameters
  • metadata (Optional[Metadata]) – Metadata which will be written to the input file. If no metadata is provided, default data will be used.

  • as_file (bool) – return as BytesIO (default) or File

Return type

Union[File, BytesIO]

create_material(name, soil_type, gamma_unsat, gamma_sat, friction_angle, diameter_d50=0.2, color=None)

Create a material with the given name and properties.

Parameters
  • name (str) – name of the material to create (max. 25 characters)

  • soil_type (SoilType) – [-]

  • gamma_unsat (float) – gamma-unsaturated, dry [kN/m³]

  • gamma_sat (float) – gamma-saturated, wet [kN/m³]

  • friction_angle (float) – phi [degree]

  • diameter_d50 (float) – median [mm]

  • color (Optional[Color]) – color for visualization in deltares software (None for default color ‘white’)

Raises

ModelError

  • if material with given name already exists in the model

  • if name is longer than 25 characters

Return type

None

create_profile(name, layers, x, y, measurements, phreatic_level, pile_tip_level, overconsolidation_ratio, top_positive_skin_friction, bottom_negative_skin_friction, expected_ground_level_settlement, *, cpt_rule=CPTRule.NEN, min_layer_thickness=0.1)

Create a profile manually.

Parameters
  • name (str) – name of the profile (must be unique).

  • layers (List[ProfileLayer]) – list of layers.

  • x (float) – [m]

  • y (float) – [m]

  • measurements (List[Tuple[float, float]]) – list of measurement data (level [m], qc-value [MPa]).

  • phreatic_level (float) – [m]

  • pile_tip_level (float) – [m]

  • overconsolidation_ratio (float) – overconsolidation ratio of bearing zone [-]

  • top_positive_skin_friction (float) – top of positive skin friction [m]

  • bottom_negative_skin_friction (float) – bottom of negative skin friction [m]

  • expected_ground_level_settlement (float) – [m]

  • cpt_rule (CPTRule) –

  • min_layer_thickness (float) – [m]

Raises

ModelError

  • if max. number of profiles (350) was reached.

  • if profile with the given name already exists.

  • if a material exists within one of the layers of which the name does not exist in the model.

  • if measurements exceeds max. number of rows (5000).

  • if layers exceeds max. number for a single profile (100).

Return type

None

import_profile(cpt, layers, x, y, phreatic_level, pile_tip_level, overconsolidation_ratio, top_positive_skin_friction, bottom_negative_skin_friction, expected_ground_level_settlement, name=None, manual_ground_level=None, *, cpt_rule=CPTRule.NEN, min_layer_thickness=0.1)

Create a profile by importing a CPT-file.

Parameters
  • cpt (GEFData) – CPT file to import.

  • layers (List[ProfileLayer]) – list of layers.

  • x (float) – [m]

  • y (float) – [m]

  • phreatic_level (float) – [m]

  • pile_tip_level (float) – [m]

  • overconsolidation_ratio (float) – overconsolidation ratio of bearing zone [-]

  • top_positive_skin_friction (float) – top of positive skin friction [m]

  • bottom_negative_skin_friction (float) – bottom of negative skin friction [m]

  • expected_ground_level_settlement (float) – [m]

  • name (Optional[str]) – name of the profile (must be unique). None for default (name of the cpt).

  • manual_ground_level (Optional[float]) – set to override the ground level [m] from the cpt.

  • cpt_rule (CPTRule) –

  • min_layer_thickness (float) – [m]

Raises

ModelError

  • if max. number of profiles (350) was reached.

  • if profile with the given name already exists.

  • if a material exists within one of the layers of which the name does not exist in the model.

  • if measurements exceeds max. number of rows (5000).

  • if layers exceeds max. number for a single profile (100).

  • if ground level could not be read from cpt file.

Return type

None

create_pile_type(name, shape, pile_type, slip_layer, type_sand_gravel=None, type_clay_loam_peat=None, type_p=None, load_settlement_curve=None, material=None, factor_sand_gravel=None, factor_clay_loam_peat=None, factor_pile_class=None, e_modulus=None, slip_layer_adhesion=None, *, use_pre_2016=False, as_prefab=False, qciii_reduction=None, overrule_tip_section_factor=None, overrule_tip_shape_factor=None)

Create a pile type with the given properties.

Parameters
  • name (str) – name of the pile type. Must be unique. Max. 10 characters.

  • shape (_PileShape) – pile type shape class instance. See below for possible shapes.

  • pile_type (PileType) – predefined/user-defined pile type. Only certain types are valid in combination with the provided ‘shape’. For more information on valid combinations, please refer to the D-Foundations software.

  • slip_layer (PileSlipLayer) –

  • type_sand_gravel (Optional[PileType]) – pile type for α_s sand/gravel

  • type_clay_loam_peat (Optional[PileTypeClayLoamPeat]) – pile type for α_s clay/loam/peat

  • type_p (Optional[PileType]) – pile type for α_p

  • load_settlement_curve (Optional[PileLoadSettlementCurve]) –

  • material (Optional[PileMaterial]) –

  • factor_sand_gravel (Optional[float]) – α_s [-]. Only required if ‘type_sand_gravel’ is of type user-defined.

  • factor_clay_loam_peat (Optional[float]) – α_s [-]. Only required if ‘type_clay_loam_peat’ is of type user-defined.

  • factor_pile_class (Optional[float]) – α_p [-]. Only required if ‘type_p’ is of type user-defined.

  • e_modulus (Optional[float]) – Young’s modulus [kN/m2]. Only required if ‘material’ is of type user-defined.

  • slip_layer_adhesion (Optional[float]) – Representative cohesion [kN/m2]. Only required if ‘slip_layer’ is of type user-defined.

  • use_pre_2016 (bool) –

  • as_prefab (bool) –

  • qciii_reduction (Optional[float]) – [%]

  • overrule_tip_section_factor (Optional[float]) – Pile top cross section factor (s) [-]

  • overrule_tip_shape_factor (Optional[float]) – Pile tip shape factor (β) [-]

Raises

ModelError

  • if ‘pile_type’ is of type user-defined and ‘type_sand_gravel’ is not set.

  • if ‘pile_type’ is of type user-defined and ‘type_clay_loam_peat’ is not set.

  • if ‘pile_type’ is of type user-defined and ‘material’ is not set.

  • if ‘pile_type’ is of type user-defined and ‘type_p’ is not set.

  • if ‘pile_type’ is of type user-defined and ‘load_settlement_curve’ is not set.

  • if ‘type_sand_gravel’ is of type user-defined and ‘factor_sand_gravel’ is not set.

  • if ‘type_clay_loam_peat’ is of type user-defined and ‘factor_clay_loam_peat’ is not set.

  • if ‘material’ is of type user-defined and ‘e_modulus’ is not set.

  • if ‘type_p’ is of type user-defined and ‘factor_pile_class’ is not set.

  • if ‘slip_layer’ is of type user-defined and ‘slip_layer_adhesion’ is not set.

  • if an invalid ‘shape’ is provided.

  • if a ‘pile_type’ is provided that is invalid in combination with the given ‘shape’.

  • if one of the types PileType.USER_DEFINED_VIBRATING or PileType.USER_DEFINED_LOW_VIBRATING is selected for ‘type_sand_gravel’ or ‘type_p’ (no valid options).

  • if a pile type with the give name already exists.

  • if ‘factor_sand_gravel’, ‘factor_clay_loam_peat’ or ‘factor_pile_class’ is outside valid range 0-9.

  • if ‘overrule_tip_section_factor’ or ‘overrule_tip_shape_factor’ is outside valid range 0-10.

Possible shapes are:

  • RectPile

  • RectEnlPile

  • SectionPile

  • RoundPile

  • TaperPile

  • HollowPile

  • HollowOpenPile

  • RoundEnlPile

  • LostTipPile

  • DrivenBasePile

  • HShapedPile

Return type

None

create_pile(name, x, y, pile_head_level, surcharge, limit_state_str_geo, serviceability_limit_state)

Create a pile with given properties.

Parameters
  • name (str) – name of the pile. Must be unique. Max. 10 characters.

  • x (float) – [m]

  • y (float) – [m]

  • pile_head_level (float) – [m R.L.]

  • surcharge (float) – [kN/m2]

  • limit_state_str_geo (float) – Limit state STR/GEO [kN]

  • serviceability_limit_state (float) – [kN]

Raises

ModelError

  • if pile with given name already exists.

  • if name exceeds the max. number of characters (10).

Return type

None

TensionPilesModel

class viktor.external.dfoundations.TensionPilesModel(construction_sequence, calculation_options, excavation_level, reduction_cone_resistance=None, *, create_default_materials=True)

Bases: _Model

Create a Tension Piles (EC7-NL) model.

Parameters
  • construction_sequence (ConstructionSequence) –

  • calculation_options (TensionPilesCalculationOptions) –

  • excavation_level (float) – [m]

  • reduction_cone_resistance (Optional[float]) – Distance edge pile to excavation boundary [m] to implement ‘Begemann’. ‘None’ to implement ‘Safe (NEN)’.

  • create_default_materials (bool) – whether to start with the default D-Foundations materials.

The default materials are:

  • BClay, clean, moderate

  • BClay, clean, modstiff

  • BClay, clean, stiff

  • BClay, clean, weak

  • BClay, sl san, moderate

  • BClay, sl san, modstiff

  • BClay, sl san, stiff

  • BClay, sl san, weak

  • BGravel, clean, moderate

  • BGravel, clean, stiff

  • BGravel, ve sil, moderate

  • BGravel, ve sil, stiff

  • BLoam, clean, moderate

  • BLoam, clean, modstiff

  • BLoam, clean, stiff

  • BLoam, clean, weak

  • BLoam, sl san, moderate

  • BLoam, sl san, modstiff

  • BLoam, sl san, stiff

  • BLoam, sl san, weak

  • BPeat, sl san, moderate

  • BPeat, sl san, stiff

  • BPeat, sl san, weak

  • BSand, clean, loose

  • BSand, clean, moderate

  • BSand, clean, stiff

  • BSand, ve sil, loose

  • BSand, ve sil, moderate

  • BSand, ve sil, stiff

  • Clay, clean, moderate

  • Clay, clean, stiff

  • Clay, clean, weak

  • Clay, organ, moderate

  • Clay, organ, weak

  • Clay, sl san, moderate

  • Clay, sl san, stiff

  • Clay, sl san, weak

  • Clay, ve san, stiff

  • Gravel, sl sil, loose

  • Gravel, sl sil, moderate

  • Gravel, sl sil, stiff

  • Gravel, ve sil, loose

  • Gravel, ve sil, moderate

  • Gravel, ve sil, stiff

  • Loam, sl san, moderate

  • Loam, sl san, stiff

  • Loam, sl san, weak

  • Loam, ve san, stiff

  • Peat, mod pl, moderate

  • Peat, not pl, weak

  • Sand, clean, loose

  • Sand, clean, moderate

  • Sand, clean, stiff

  • Sand, sl sil, moderate

  • Sand, ve sil, loose

materials

Lists all materials currently in de model.

Return type

Dict[str, Dict[str, Any]]

profiles

Lists all profiles currently in de model.

Return type

List[Dict[str, Any]]

pile_types

Lists all pile types currently in de model.

Return type

List[Dict[str, Any]]

piles

Lists all piles currently in de model.

Return type

List[Dict[str, Any]]

generate_input_file(metadata=None, *, as_file=False)

Generate a D-Foundations input file.

Note

This method needs to be mocked in (automated) unit and integration tests.

Parameters
  • metadata (Optional[Metadata]) – Metadata which will be written to the input file. If no metadata is provided, default data will be used.

  • as_file (bool) – return as BytesIO (default) or File

Return type

Union[File, BytesIO]

create_material(name, soil_type, gamma_unsat, gamma_sat, friction_angle, diameter_d50=0.2, max_cone_resist_type=MaxConeResistType.STANDARD, max_cone_resist=0.0, apply_tension=True, min_void_ratio=0.4, max_void_ratio=0.8, color=None)

Create a material with the given name and properties.

Parameters
  • name (str) – name of the material to create (max. 25 characters)

  • color (Optional[Color]) – color for visualization in deltares software (None for default color ‘white’)

  • soil_type (SoilType) – [-]

  • gamma_unsat (float) – gamma-unsaturated, dry [kN/m³]

  • gamma_sat (float) – gamma-saturated, wet [kN/m³]

  • friction_angle (float) – phi [degree]

  • diameter_d50 (float) – median [mm]

  • max_cone_resist_type (MaxConeResistType) – [-]

  • max_cone_resist (float) – [MPa]

  • apply_tension (bool) – True (default) / False

  • min_void_ratio (float) – [-]

  • max_void_ratio (float) – [-]

Raises

ModelError

  • if material with given name already exists in the model

  • if name is longer than 25 characters

Return type

None

create_profile(name, layers, x, y, measurements, phreatic_level, pile_tip_level, top_tension_zone, *, cpt_rule=CPTRule.NEN, min_layer_thickness=0.1)

Create a profile manually.

Parameters
  • name (str) – name of the profile (must be unique).

  • layers (List[ProfileLayer]) – list of layers.

  • x (float) – [m]

  • y (float) – [m]

  • measurements (List[Tuple[float, float]]) – list of measurement data (level [m], qc-value [MPa]).

  • phreatic_level (float) – [m]

  • pile_tip_level (float) – [m]

  • top_tension_zone (float) – Top of tension zone [m]

  • cpt_rule (CPTRule) –

  • min_layer_thickness (float) – [m]

Raises

ModelError

  • if max. number of profiles (350) was reached.

  • if profile with the given name already exists.

  • if a material exists within one of the layers of which the name does not exist in the model.

  • if measurements exceeds max. number of rows (5000).

  • if layers exceeds max. number for a single profile (100).

Return type

None

import_profile(cpt, layers, x, y, phreatic_level, pile_tip_level, top_tension_zone, name=None, manual_ground_level=None, *, cpt_rule=CPTRule.NEN, min_layer_thickness=0.1)

Create a profile by importing a CPT-file.

Parameters
  • cpt (GEFData) – CPT file to import.

  • layers (List[ProfileLayer]) – list of layers.

  • x (float) – [m]

  • y (float) – [m]

  • phreatic_level (float) – [m]

  • pile_tip_level (float) – [m]

  • top_tension_zone (float) – Top of tension zone [m]

  • name (Optional[str]) – name of the profile (must be unique). None for default (name of the cpt).

  • manual_ground_level (Optional[float]) – set to override the ground level [m] from the cpt.

  • cpt_rule (CPTRule) –

  • min_layer_thickness (float) – [m]

Raises

ModelError

  • if max. number of profiles (350) was reached.

  • if profile with the given name already exists.

  • if a material exists within one of the layers of which the name does not exist in the model.

  • if measurements exceeds max. number of rows (5000).

  • if layers exceeds max. number for a single profile (100).

  • if ground level could not be read from cpt file.

Return type

None

create_pile_type(name, shape, type_sand_gravel, type_clay_loam_peat, material, factor_sand_gravel=None, factor_clay_loam_peat=None, unit_weight_material=None)

Create a pile type with the given properties.

Parameters
  • name (str) – name of the pile type. Must be unique. Max. 10 characters.

  • shape (_PileShape) – pile type shape class instance. See below for possible shapes.

  • type_sand_gravel (PileType) – pile type for α_t sand/gravel. predefined/user-defined pile type. Only certain types are valid in combination with the provided ‘shape’. For more information on valid combinations, please refer to the D-Foundations software.

  • type_clay_loam_peat (PileTypeClayLoamPeat) – pile type for α_t clay/loam/peat.

  • material (PileMaterial) –

  • factor_sand_gravel (Optional[float]) – α_t [-]. Only required if ‘type_sand_gravel’ is of type user-defined.

  • factor_clay_loam_peat (Optional[float]) – α_t [-]. Only required if ‘type_sand_gravel’ is of type user-defined.

  • unit_weight_material (Optional[float]) – unit weight pile material [kN/m3]. Only required if ‘material’ is of type ser-defined.

Raises

ModelError

  • if ‘type_sand_gravel’ is of type user-defined and ‘factor_sand_gravel’ is not set.

  • if ‘type_clay_loam_peat’ is of type user-defined and ‘factor_clay_loam_peat’ is not set.

  • if ‘material’ is of type user-defined and ‘unit_weight_material’ is not set.

  • if an invalid ‘shape’ is provided.

  • if a ‘type_sand_gravel’ is provided that is invalid in combination with the given ‘shape’.

  • if a pile type with the give name already exists.

  • if ‘factor_sand_gravel’ or ‘factor_clay_loam_peat’ is outside valid range 0-9.

Possible shapes are:

  • RectPile

  • RectEnlPile

  • UserPile

  • RoundPile

  • TaperPile

  • HollowPile

  • HollowOpenPile

  • RoundEnlPile

  • LostTipPile

  • DrivenBasePile

  • HShapedPile

Return type

None

create_pile(name, x, y, pile_head_level, load_max_min=None)

Create a pile with given properties.

Parameters
  • name (str) – name of the pile. Must be unique. Max. 10 characters.

  • x (float) – [m]

  • y (float) – [m]

  • pile_head_level (float) – [m R.L.]

  • load_max_min (Optional[Tuple[float, float]]) – (max. load [kN], min. load [kN]). None for ‘No’ use of alternating loads.

Raises

ModelError

  • if pile with given name already exists.

  • if name exceeds the max. number of characters (10).

Return type

None

OutputFileParser

class viktor.external.dfoundations.OutputFileParser(fod_file)

Helper class to extract results from a D-Foundations output file (.fod).

Currently the following versions are (partly) supported:

  • v17:
    • Tension Piles model

    • Bearing Piles model - Preliminary Design (calculation options only)

  • v19:
    • Tension Piles model

    • Bearing Piles model - Verification

Example usage:

parser = OutputFileParser(fod_file)
calculation_parameters = parser.calculation_parameters
results = parser.results(False)
Parameters

fod_file (StringIO) – D-Foundations output file (.fod)

property raw_results: str
Return type

str

abstract property calculation_parameters: Dict[str, Union[float, bool]]

Calculation parameters.

Return type

Dict[str, Union[float, bool]]

abstract results(as_pandas=True)

All result data.

Parameters

as_pandas (bool) – True to return the results as a dictionary of pandas DataFrame objects. False for dicts.

Return type

Dict[str, Union[DataFrame, Dict[str, Any]]]