Commit 1d5e3609 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

jon move

parent 4721733a
Pipeline #5439 passed with stage
in 26 seconds
......@@ -207,15 +207,15 @@ g = -9.81 # gravity
# particles radius
rhop = 1500 # particles density
rho = 1000 # fluid density
nu = 1e-6 # kinematic viscosity
nu = 1e-3 # kinematic viscosity
# Numerical parameters
outf = 2 # number of iterations between output files
dt = 0.5e-2 # time step
tEnd = 5
dt = 100*0.5e-2 # time step
tEnd = 500
# final time
nbtot = int(tEnd/dt)
#PARTICLE PROBLEM
......@@ -232,6 +232,10 @@ def genInitialPosition(filename,r,L,H,para,rhop):
#p = scontact.ParticleProblem(2)
#p.read_vtk(outputdir,0)
def grains_v_x(x) :
return cl_vitesse[0]
def grains_v_y(x) :
return cl_vitesse[1]
#
# FLUID PROBLEM
......@@ -242,10 +246,11 @@ fluid.load_msh("mesh.msh")
fluid.set_wall_boundary("Bottom")
fluid.set_wall_boundary("Lateral")
#fluid.set_wall_boundary("Grains", velocity = [10., 0.])
fluid.set_open_boundary("Grains",velocity=[10,0.])
#fluid.set_open_boundary("Grains",velocity=[10,0.])
#fluid.set_strong_boundary("Grains",0,10.)
#fluid.set_strong_boundary("Grains",1,0.)
fluid.set_wall_boundary("Top",pressure=0)
fluid.set_open_boundary("Grains", velocity=[grains_v_x,grains_v_y])
fluid.export_vtk(outputdir,0,0)
......@@ -267,13 +272,13 @@ N = len(fluid.coordinates())
pos_centre = [0.,0.,r]
depl = copy.deepcopy(pos_centre)
#
# COMPUTATION LOOP
#
k = 0
t = 0
ii = 0
'''
pos0= copy.deepcopy(fluid.coordinates())
cl_vitesse = [0.,0.]
for k in range(n):
......@@ -285,10 +290,10 @@ for k in range(n):
cl_vitesse[0] = liste_depl[k][0]/dt
cl_vitesse[1] = liste_depl[k][1]/dt
print("***************" , np.max(np.abs(fluid.velocity_mesh())))
print(cl_vitesse)
#fluid.set_open_boundary("Grains", velocity=cl_vitesse)
fluid.set_strong_boundary("Grains",0,cl_vitesse[0])
fluid.set_strong_boundary("Grains",1,cl_vitesse[1])
#fluid.set_strong_boundary("Grains",0,cl_vitesse[0])
#fluid.set_strong_boundary("Grains",1,cl_vitesse[1])
fluid.implicit_euler(dt,newton_max_it=10)
fluid.export_vtk(outputdir, (k+1), (k+1))
depl[0] += liste_depl[k][0]
......@@ -297,9 +302,7 @@ for k in range(n):
cl_vitesse[0] = 0
cl_vitesse[1] = 0
fluid.set_open_boundary("Grains", velocity=cl_vitesse)
'''
for k in range(n):
fluid.implicit_euler(dt,newton_max_it=10)
fluid.export_vtk(outputdir, (n+k+1), (n+k+1))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment