So, code is working, this case reproduce a Diko's peak with Poisson equation by changing the boundary conditions over time.
18 lines
462 B
Python
18 lines
462 B
Python
import pandas
|
|
|
|
def read(filename):
|
|
# Get time
|
|
df = pandas.read_csv(filename,skiprows=0,nrows=1)
|
|
time = df['t (s)'].to_numpy()[0]
|
|
|
|
df = pandas.read_csv(filename,skiprows=2,nrows=1,header=None)
|
|
x = df.to_numpy()[0][1:]
|
|
df = pandas.read_csv(filename,skiprows=3,header=None)
|
|
f = []
|
|
for col in df:
|
|
if col == 0:
|
|
v = df[col].to_numpy()
|
|
else:
|
|
f.append(df[col].to_numpy())
|
|
|
|
return time, x, v, f
|