Soil Materials

The rhdhv_geo package provides functions and objects to manage soils and their parameters. Each piece of software will have it's own parameter class. It will be possible to exchange between different software packages in the future. Currently rhdhv_geo package focuses on being able to send and receive materials for a specific software only, not supporting the exchanging yet.

Plaxis

For Plaxis we are currently working on exchanging soil parameters.

D-Stability

For D-Stability there is an exchange possible with the webapp PACE. We are exploring whether more exchange is needed.

Dfoundations

For DFoundations it is possible to define new materials, but there is also a predefined set from which you can choose. The materials can then be shared across project members, either through Speckle or DataFusr Originopen in new window. The software connectors take care of proper conversions, so the materials can be used in your calculations.

Create

To create a soil material from scratch:

from rhdhv_geo import SoilMaterial

material = SoilMaterial(
    name="Example Material",
    phi=20,
    c=0.1,
    gamma_d=17,
    gamma_sat=20
)

A limited set of standardized materials from the Eurocode (table 2b) is available for direct use. To see the available materials, use:

from rhdhv_geo.geo_material import show_available_soil_materials

show_available_soil_materials()

Specific soil materials with predefined parameters can be created by using the name:

from rhdhv_geo.geo_material import create_soil_material

sandy_clay = create_soil_material('clay_strongly_sandy')
print("Created material: ", sandy_clay)
# Access a parameter
print("Friction angle: ", sandy_clay.phi)

Exchange

As mentioned, there are two ways to exchange materials with your colleagues. Either by sending to Speckle, or by sending to DataFusr Origin. Both ways are described here.

Speckle

To send the materials to a Speckle stream, they should be present in the Model object. The Model has a list of soil materials, to which can be easily added:

from rhdhv_geo import Model, SoilMateriORIGIN_PROJECT_NAME, ORIGIN_API_KEYal
model = Model('example-to-speckle')
material = SoilMaterial('clay_strongly_sandy')
model.soil_materials.append(material)

Now the regular way to interact with Speckle can be used:

model.to_datafusr("https://rhdhv.speckle.xyz/streams/9fca0bf92c")

DataFusr Origin

Often it is desired to modify soil material parameters at different stages in the project. Keeping track of these changes, and making sure everyone uses the same values, can be challenging. In these situations it may be beneficial to use DataFusr Origin. This parameter management tool offers an online interface to view and modify parameters. There is also a version control system that tracks the changes.

To send a list of soil materials to Origin, use the following syntax:

from rhdhv_geo import create_soil_material
from rhdhv_geo.datafusr import soil_materials_to_origin

ORIGIN_PROJECT_NAME = ... # Insert your Origin project name here
ORIGIN_API_KEY = ... # Insert your Origin api key here

m_1 = create_soil_material('clay_strongly_sandy'), 
m_2 = create_soil_material('sand_slightly_silty_clayey')
soil_materials_to_origin([m_1, m_2], ORIGIN_PROJECT_NAME, ORIGIN_API_KEY)

To receive materials:

from rhdhv_geo.datafusr import soil_materials_from_origin

ORIGIN_PROJECT_NAME = ... # Insert your Origin project name here
ORIGIN_API_KEY = ... # Insert your Origin api key here
materials = soil_materials_from_origin(ORIGIN_PROJECT_NAME, ORIGIN_API_KEY)

Sometimes it may be useful to update a pre-existing list of materials in the Python memory. For this case there is the function soil_materials_from_origin_update. This function will match incoming materials based on their id attribute, which also allows for changing the names.

from rhdhv_geo import create_soil_material
from rhdhv_geo.datafusr import soil_materials_to_origin

ORIGIN_PROJECT_NAME = ... # Insert your Origin project name here
ORIGIN_API_KEY = ... # Insert your Origin api key here

m_1 = create_soil_material('clay_strongly_sandy'), 
m_2 = create_soil_material('sand_slightly_silty_clayey')
soil_materials_from_origin_update([m_1, m_2], ORIGIN_PROJECT_NAME, ORIGIN_API_KEY)
Last Updated:
Contributors: Jelle van der Zon