Applying DeepONet to geotechnics #1669
Unanswered
dimasbetioli
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dear colleagues
I am trying to apply DeepONet to geotechnical problems. I am first trying a 2D cylindrical deep tunnel in a layered space using the Mohr-Coulomb failure model. The input function is the shear modulus of the layers (G1, G2, ..., G10).

I used the Antiderivative operator from an aligned dataset (https://deepxde.readthedocs.io/en/latest/demos/operator/antiderivative_aligned.html) as a model to produce the code:
"""Backend supported: tensorflow.compat.v1"""
import deepxde as dde
import matplotlib.pyplot as plt
import numpy as np
Load dataset
d = np.load(r"C:\Users\dimas\OneDrive\Área de Trabalho\Files_NO\train.npz", allow_pickle=True)
X_train = (d["X_0"].astype(np.float32), d["X_1"].astype(np.float32))
y_train = d["y"].astype(np.float32)
d = np.load(r"C:\Users\dimas\OneDrive\Área de Trabalho\Files_NO\test.npz", allow_pickle=True)
X_test = (d["X_0"].astype(np.float32), d["X_1"].astype(np.float32))
y_test = d["y"].astype(np.float32)
data = dde.data.TripleCartesianProd(
X_train=X_train, y_train=y_train, X_test=X_test, y_test=y_test
)
Choose a network
m = 10
dim_x = 2
net = dde.nn.DeepONetCartesianProd(
[m, 40, 40],
[dim_x, 40, 40],
"relu",
"Glorot normal",
)
Define a Model
model = dde.Model(data, net)
Compile and Train
model.compile("adam", lr=0.001, metrics=["mean l2 relative error"])
losshistory, train_state = model.train(iterations=10000)
Plot the loss trajectory
dde.utils.plot_loss_history(losshistory)
plt.show()
The load is an initial condition with sxx = 30 MPa and syy = 30 MPa. The shear modulus of the layers is randomly generated, and the output is the displacement field in the x direction.
The code is running, but I cannot reach convergence. Would you have any tips for me?
Beta Was this translation helpful? Give feedback.
All reactions