First commit
parent
7988cc048e
commit
4fd9efa17d
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,82 @@
|
|||
import pandas as pd
|
||||
import numpy as np
|
||||
from scipy.interpolate import griddata
|
||||
import matplotlib.pyplot as plt
|
||||
from mpl_toolkits.mplot3d import Axes3D
|
||||
|
||||
|
||||
# Set name of Excel file to read
|
||||
file_known = 'known_sections_plaxis.xlsx'
|
||||
|
||||
# Set name of sheet to read from Excel file
|
||||
sheet_known = 'known_sections_plaxis'
|
||||
|
||||
# Read data from Excel sheet into a dataframe
|
||||
df = pd.read_excel(file_known, sheet_name=sheet_known, skiprows=7)
|
||||
|
||||
# Extract columns whose names starts with a 'Y' into new dataframe of Y-coordinates
|
||||
df_y = df[df.columns[df.columns.str.startswith('Y')]]
|
||||
|
||||
# Extract columns whose names starts with 'Z' into new dataframe of settlements
|
||||
df_settlements_known = df[df.columns[df.columns.str.startswith('Z')]]
|
||||
|
||||
# Flatten dataframe values into 1D array
|
||||
y_known = df_y.values.flatten()
|
||||
settlements_known = df_settlements_known.values.flatten()
|
||||
|
||||
# Extract known x-values
|
||||
x_known = df['X']
|
||||
|
||||
# Create X-array by repeating itself as many times as there are Y-columns
|
||||
# This will create matching(x, y)-points between arrays x and y
|
||||
x_known = np.repeat(x_known, len(df_y.columns))
|
||||
|
||||
# Set names and read Excel file with base slab nodes
|
||||
file_nodes = 'base_slab_nodes.xlsx'
|
||||
sheet_nodes = 'XLSX-Export'
|
||||
df_nodes = pd.read_excel(file_nodes, sheet_name=sheet_nodes)
|
||||
|
||||
# Extract x- and y-coordinates of nodes
|
||||
x_nodes = df_nodes['X [m]']
|
||||
y_nodes = df_nodes['Y [m]']
|
||||
|
||||
# Extract node numbers
|
||||
node_no = df_nodes['NR']
|
||||
|
||||
# Mirror known y-values and add corresponding x-values and settlements
|
||||
x_known = np.append(x_known, x_known)
|
||||
y_known = np.append(y_known, -y_known)
|
||||
settlements_known = np.append(settlements_known, settlements_known)
|
||||
|
||||
# Arrange known (x, y) points to fit input for interpolation
|
||||
xy_known = np.array(list(zip(x_known, y_known)))
|
||||
|
||||
# Perform interpolation calculation
|
||||
settlements_interpolated = griddata(xy_known, settlements_known, (x_nodes, y_nodes), method='cubic')
|
||||
|
||||
|
||||
####################
|
||||
### Exercise 1.2 ###
|
||||
####################
|
||||
# Create figure object
|
||||
fig = plt.figure()
|
||||
|
||||
# Create axis object for 3D plot
|
||||
ax = fig.add_subplot(111, projection='3d')
|
||||
|
||||
# Plot known settlement points as 3D scatter plot (ax.scatter(...))
|
||||
# <Put plotting code here!>
|
||||
|
||||
# Plot interpolated field as 3D scatter plot
|
||||
# <Put plotting code here!>
|
||||
|
||||
# Show figure
|
||||
# <Put plotting code here!>
|
||||
|
||||
|
||||
####################
|
||||
### Exercise 1.3 ###
|
||||
####################
|
||||
# Write Sofistik input code to .dat-file for applying settlements as imposed displacements
|
||||
# <Put plotting code here!>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,7 @@
|
|||
Pile_type,Profile
|
||||
P01,HE200A
|
||||
P20,HE220A
|
||||
P05,HE240B
|
||||
P23,NaN
|
||||
P04,HE200A
|
||||
P01,HE300B
|
|
|
@ -0,0 +1,23 @@
|
|||
Profile,h[mm],b[mm],Iy[mm4],Wel_y[mm3],g[kg/m]
|
||||
HE100A,96,100,3490000,72.8,16.7
|
||||
HE120A,114,120,6060000,106,19.9
|
||||
HE140A,133,140,10300000,155,24.7
|
||||
HE160A,152,160,16700000,220,30.4
|
||||
HE180A,171,180,25100000,294,35.5
|
||||
HE200A,190,200,36900000,389,42.3
|
||||
HE220A,210,220,54100000,515,50.5
|
||||
HE240A,230,240,77600000,675,60.3
|
||||
HE260A,250,260,104500000,836,68.2
|
||||
HE280A,270,280,136700000,1010,76.4
|
||||
HE300A,290,300,182600000,1260,88.3
|
||||
HE100B,100,100,4500000,89.9,20.4
|
||||
HE120B,120,120,8640000,144,26.7
|
||||
HE140B,140,140,15100000,216,33.7
|
||||
HE160B,160,160,24900000,311,42.6
|
||||
HE180B,180,180,38300000,426,51.2
|
||||
HE200B,200,200,57000000,570,61.3
|
||||
HE220B,220,220,80900000,736,71.5
|
||||
HE240B,240,240,112600000,938,83.2
|
||||
HE260B,260,260,149200000,1150,93.0
|
||||
HE280B,280,280,192700000,1380,103.0
|
||||
HE300B,300,300,251700000,1680,117.0
|
|
Loading…
Reference in New Issue