Commit 66bcbaba authored by Michel Henry's avatar Michel Henry
Browse files

granula collapse

parent 67fb6938
Pipeline #8786 passed with stages
in 5 minutes and 53 seconds
......@@ -61,6 +61,8 @@ genInitialPosition(outputdir,r,H,L,rhop)
p = scontact.ParticleProblem(2)
p.read_vtk(outputdir,0)
print(f"Polydispersity : {np.max(p.r())/np.min(p.r())}")
G = np.zeros((p.n_particles(),p.dim()))
G[:,1] = g[1]*p.mass()[:,0]
t = 0
......@@ -78,4 +80,5 @@ while t < tEnd :
ioutput = int(ii/outf) + 1
p.write_vtk(outputdir, ioutput, t)
ii += 1
print("%i : %.2g/%.2g (cpu %.6g)" % (ii, t, tEnd, time.time() - tic))
\ No newline at end of file
print("%i : %.2g/%.2g (cpu %.6g)" % (ii, t, tEnd, time.time() - tic))
print(f"Polydispersity : {np.max(p.r())/np.min(p.r())}")
......@@ -35,7 +35,7 @@ import time
import shutil
import random
outputdir = "outputCollapse"
outputdir = "outputCollapse2"
outputdirDepot = "outputDepot"
if not os.path.isdir(outputdir) :
os.makedirs(outputdir)
......@@ -54,7 +54,7 @@ L = 0.3
# Numerical parameters
outf = 10 # number of iterations between output files
dt = 1e-3 # time step
tEnd = 10 # final time
tEnd = 1 # final time
#
# PARTICLES PROBLEM
......@@ -77,12 +77,11 @@ fluid.set_wall_boundary("Bottom", velocity=[0,0])
fluid.set_wall_boundary("Lateral", velocity=[0,0])
fluid.set_wall_boundary("Top", velocity=[0,0], pressure=0)
fluid.set_strong_boundary("Bottom",1,0)
fluid.set_strong_boundary("Lateral",0,0)
fluid.set_strong_boundary("Top",1,0)
fluid.set_particles(p.mass(), p.volume(), p.position(), p.velocity(), p.contact_forces())
fluid.solution()[:,2] = (H-fluid.coordinates()[:,1])*(-g[1])*rho
fluid.read_vtk(outputdir,0)
fluid.write_vtk(outputdir,0,0)
# Initial time and iteration.
t = 0
......
L = 0.3;
L = 0.6;
H = 0.15;
y = 0;
lc = 0.01;
......
Markdown is supported
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