Skip to main content

D-Foundations

VIKTOR's D-Foundations integration requires a specific D-Foundations worker which can be downloaded here.

note

The D-Foundations binding is created to work with D-Foundations version v17. Other versions of D-Foundations might not be able to read the generated input files properly.

A D-Foundations binding has been developed by VIKTOR to simplify the process of creating a D-Foundations model, running an analysis (worker required) and parsing the results. The process consists of the following steps:

  1. Create the 'empty' model (optionally with default materials), applying the desired settings.
  2. (Optional) Create material(s). Also possible to only use the default materials.
  3. Create or import profile(s).
  4. Create pile type(s).
  5. Create pile(s).
  6. Let VIKTOR generate the input file for you.
  7. Run the D-Foundations analysis (worker required) with the input file.
  8. Obtain and parse the results, and process them as desired.

Supported model types

D-Foundations supports 4 type of models. The following types are currently (un)supported in the D-Foundations binding:

  • Bearing Piles (EC7-NL): supported
  • Bearing Piles (EC7-B): not supported
  • Tension Piles (EC7-NL): supported
  • Shallow Foundations (EC7-NL): not supported

Creating the model (example: Bearing Piles (EC7-NL) model)

The class BearingPilesModel represents the Bearing Piles (EC7-NL) model in D-Foundations. The following code shows how a (minimal) bearing piles model can be created in Python using the binding. The Tension Piles (EC7-NL) model can be created in a similar way, using the TensionPilesModel class.

from viktor.external.dfoundations import BearingPilesCalculationOptionsfrom viktor.external.dfoundations import CalculationTypefrom viktor.external.dfoundations import BearingPilesModelfrom viktor.external.dfoundations import ConstructionSequencefrom viktor.external.dfoundations import SoilTypefrom viktor.external.dfoundations import ProfileLayerfrom viktor.external.dfoundations import RectPilefrom viktor.external.dfoundations import PileTypefrom viktor.external.dfoundations import PileSlipLayerfrom viktor.external.dfoundations import Metadatafrom viktor.external.dfoundations import DFoundationsAnalysis# Create the model with misc. options.options = BearingPilesCalculationOptions(CalculationType.BEARING_CAPACITY_AT_FIXED_PILE_TIP_LEVEL, False)model = BearingPilesModel(ConstructionSequence.CPT_INSTALL_EXCAVATION, options, -5.0)# Create material (optional), or use one of the default material names.model.create_material("my_material", SoilType.SAND, 19.0, 19.0, 3.0)# Create profile(s).layers = [ProfileLayer(0.0, "my_material"), ProfileLayer(-20.0, "my_material")]measurements = [(0.0, 10.0), (-20.0, 20.0)]model.create_profile('my_profile', layers, 0.0, 0.0, measurements, -5.0, -15.0, 1.0, -10.0, -12.0, -0.11)# Create pile type(s).shape = RectPile(1.0, 1.0)model.create_pile_type("my_pile_type", shape, PileType.PREFAB_CONCRETE, PileSlipLayer.NONE)# Create pile(s).model.create_pile("my_pile", 0.0, 0.0, -1.0, 1.0, 0.0, 0.0)# Generate the input file for the model as if it was generated by D-Foundations.# Metadata can be used (not required) to update data such as titles, company, etc.metadata = Metadata(title_1='Example Model', company='VIKTOR')foi_file = model.generate_input_file(metadata)# Run the analysis with the generated input file (requires worker).analysis = DFoundationsAnalysis(foi_file)analysis.execute(300)# Obtain the result file.fod_file = analysis.get_output_file()
caution

BearingPilesModel.generate_input_file, TensionPilesModel.generate_input_file and DFoundationsAnalysis.execute need to be mocked within the context of (automated) testing.

Parsing output using OutputFileParser

After running a DFoundationsAnalysis, the fod file can be obtained and results can be extracted. The class OutputFileParser makes the parsing more convenient and return Python objects that can be further processed:

from viktor.external.dfoundations import OutputFileParserparser = OutputFileParser(fod_file)# Calculation parameters.calculation_parameters = parser.calculation_parameters# Parsed results in the form of a dictionary.results = parser.results(False)  # True (default) for returning pandas DataFrame(s).# Raw, unparsed results in the form of a string.# Manual parsing required. Useful, if parser.results is not sufficient.raw_results = parser.raw_results

Supported D-Foundation versions

Currently, the parser supports the following versions (completely or partially) of D-Foundations:

  • v17:

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

    • Tension Piles model
    • Bearing Piles model - Verification