Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomised properties along shaft #36

Open
Michael-P-Crisp opened this issue Dec 2, 2024 · 1 comment
Open

Randomised properties along shaft #36

Michael-P-Crisp opened this issue Dec 2, 2024 · 1 comment

Comments

@Michael-P-Crisp
Copy link

Greetings,

It would be useful for research purposes, if soil layers can be represented by random fields, such as those generated by the GSTools package https://gstools.readthedocs.io/.

Would that be easy to do in the upcoming 1.0 version, for example to set soil strength on a per-spring basis? I gather it would be inefficient to define layers at say 0.2m intervals.

@TchilDill
Copy link
Owner

TchilDill commented Dec 16, 2024

@Michael-P-Crisp, thank you very much for getting me introduced to GSTools.

I suggest we first wait for v1.0, since I have delayed the release of this version quite a lot already due to other things. Then, depending on your response and maybe others interested in this, we could look further into it.

I agree that creating a layer every 0.2m is not that fun for user experience, but the ugliness is very much dependent on your implementation, for instance you could do something like this, which would randomise the undrained shear strength property along the pile:

#imports
from openpile.soilmodels import API_clay
from openpile.construct import SoilProfile, Layer
import numpy as np

#define soil discretisation
nodes = np.linspace(0.,-30.,50)
top = nodes[:-1]
bottom = nodes[1:]

# a random undrained shear strength, very much 'attracted' to 30kPa though :)
random_params = 30+np.random.randn(nodes.size)

# a nice list comprehension to define all your layers
layers = [
    Layer(name='',top=t, bottom=b, weight=17, lateral_model=API_clay(Su=x, eps50=0.01)) 
    for t,b, x in zip(top, bottom, random_params)
    ]

# visualise what it looks like
sp = SoilProfile(name='Randomised properties along shaft #36', top_elevation=0,water_line=-5,layers=layers)
sp.plot()

resulting in:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants