Professional Documents
Culture Documents
Finite Element For Tunnel Excavation
Finite Element For Tunnel Excavation
Finite Element For Tunnel Excavation
# Input Parameters
length = 20 # Length of the tunnel (in meters)
width = 5.0 # Width of the tunnel (in meters)
depth = 3.0 # Depth of the tunnel (in meters)
num_elements = 10 # Number of finite elements
material_properties = {'E': 1e6, 'nu': 0.3} # Elastic modulus and Poisson's ratio
# Derived Parameters
element_length = length / num_elements
# Assembling Global Stiffness Matrix
K = lil_matrix((num_elements+1, num_elements+1))
# Assemble the element stiffness matrix into the global stiffness matrix
for i in range(2):
for j in range(2):
K[element_nodes[i], element_nodes[j]] += Ke[i, j]
# Applying Load
# Assuming a distributed load along the tunnel
load = np.ones(num_elements+1) * 100.0 # Load magnitude (in Newtons)
Displacements:
[ 100. 108.77193216 63.15788491 -14.03511813 -84.21057544
-112.28075836 -84.21057544 -14.03511813 63.15788491 108.77193216
100. ]
Stresses:
[ 4385966.08187134 -22807023.62573099 -38596501.52046783
-35087728.65497075 -14035091.46198831 14035091.46198829
35087728.65497075 38596501.52046783 22807023.625731
-4385966.08187133]
The code uses special tools to analyze a tunnel's structure and understand how it behaves. It considers things like
the tunnel's length, width, and depth, as well as the properties of the materials it's made of. The code divides the
tunnel into smaller parts and calculates how stiff each part is. It then combines all these stiffness values to gure
out how the whole tunnel behaves.
The code also looks at the ends of the tunnel and makes sure they don't move. It applies a load to the tunnel, like a
force acting on it. By solving a set of equations, the code can nd out how much the tunnel displaces at different
points and how much stress it experiences.
At the end, the code shows the displacements (how much the tunnel moves) and stresses (how much force it
feels) as the nal results. These results help us understand how the tunnel behaves and if it can withstand the
forces acting upon it.
Overall, this code helps engineers study and analyze tunnels to ensure they are safe and can handle different
conditions.
#plotting stresses
x_elements = np.linspace(0, length, num_elements)
import jovian
jovian.commit()