Commit 967535bb authored by Nathan Coppin's avatar Nathan Coppin
Browse files

Updating in order to merge master into friction

parent ce5c4863
Pipeline #4680 passed with stage
in 36 seconds
......@@ -69,7 +69,7 @@ def genInitialPosition(filename, r, rout, rin, rhop) :
for i in range(x.shape[0]) :
if y[i]<0:
rhop1 = random.choice([rhop*.9,1.1*rhop,rhop])
p.add_particle((x[i], y[i]), r, r**2 * np.pi * rhop1)
p.add_particle((x[i], y[i]), r, r**2 * np.pi * rhop1,0)
p.write_vtk(filename,0,0)
......
......@@ -58,7 +58,7 @@ def genInitialPosition(filename, r, H, ly, lx, rhop) :
y = y.flat
# Add a grain at each centre position
for i in range(len(x)) :
p.add_particle((x[i], y[i]), r, r**2 * np.pi * rhop)
p.add_particle((x[i], y[i]), r, r**2 * np.pi * rhop,0)
p.write_vtk(filename,0,0)
# Define output directory
......@@ -108,9 +108,9 @@ fluid.set_strong_boundary("Top",2,0)
fluid.set_strong_boundary("Top",1,0)
fluid.set_strong_boundary("Bottom",1,0)
fluid.set_strong_boundary("Lateral",0,0)
fluid.set_weak_boundary("Bottom","Wall")
fluid.set_weak_boundary("Lateral","Wall")
fluid.set_weak_boundary("Top","Wall")
fluid.set_wall_boundary("Bottom")
fluid.set_wall_boundary("Lateral")
fluid.set_wall_boundary("Top")
# Set location of the particles in the mesh and compute the porosity in each computation cell
fluid.set_particles(p.mass(), p.volume(), p.position(), p.velocity())
fluid.export_vtk(outputdir,0,0)
......
......@@ -60,12 +60,12 @@ ii = 0
#physical parameters
g = -9.81 # gravity
rhop = 2450 # grains density
tEnd = 0.2 # final time
tEnd = 25 # final time
#numerical parameters
dt = 1e-3 # time step
#geometry parameters
rout = 0.2 # outer radius
rout = 2000 # outer radius
r = 5e-3 # grains radius
shutil.copy("mesh.msh", outputdir +"/mesh.msh")
......@@ -75,7 +75,7 @@ p = scontact.ParticleProblem(2)
p.read_vtk(outputdir,0)
outf = 1 # number of iterations between output files
#Taking friction into account
p.add_friction([0.3090, 1.0],[0.1545, 0.5])
p.add_friction([0.3090, 1.0])
#Computation loop
forces = np.zeros_like(p.velocity())
k = 0
......
......@@ -62,16 +62,16 @@ t = 0
ii = 0
#physical parameters
g = -9.81 # gravity
rhop = 2300 # grains density
tEnd = 1.15 # final time
rhop = 2500 # grains density
tEnd = 10 # final time
#numerical parameters
dt = 1e-3 # time step
#geometry parameters
rout = 0.11 # outer radius
r = 0.1e-3 # grains radius
Fr = 0 #Froude number
r = 1.5e-3 # grains radius
Fr = 1.5 #Froude number
shutil.copy("mesh.msh", outputdir +"/mesh.msh")
v = rout*np.sqrt(Fr*(-g)/rout)
print('v = %s\n'%(v))
......@@ -88,8 +88,8 @@ else :
outf = 5 # number of iterations between output files
#Taking friction into account
p.add_friction([.0, .0])
#p.set_friction_relaxation(0.9)
p.add_friction([1.0, 1.0])
p.set_friction_relaxation(0.9)
p.set_tangent_boundary_velocity("",v)
print(p.velocity().shape[0])
#Computation loop
......
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