Commit d2a0ed54 authored by Michel Henry's avatar Michel Henry
Browse files

fix undefined parameters

parent 1f5a8b48
Pipeline #9476 passed with stages
in 3 minutes and 52 seconds
......@@ -84,6 +84,7 @@ v = 8 # shearing velocity
# Particles
r_max = 6e-4 # max particles size
n_chain = 100 # number of particles/polymer
start_free_surface = 1 # die lip
noise_force = 4e-2 # Brownian motion
noise_variance = 25*pi/180
......
......@@ -66,6 +66,7 @@ r_max = 1e-3 # particles max radius
# Numerical parameters
outf = 50 # number of iterations between output files
dt = 5e-5 # time step
dt = 5e-3 # time step
tEnd = 30 # final time
# Geometrical parameters
......@@ -243,7 +244,8 @@ try:
fluid.set_strong_boundary("Inner", 0, lambda x : (((x[:,1]-ic_position[1])/ic_r))*v)
fluid.set_strong_boundary("Inner", 1, lambda x : (-((x[:,0]-ic_position[0])/ic_r))*v)
time_integration.iterate(fluid, p, dt, min_nsub=5, external_particles_forces=Gp)
# time_integration.iterate(fluid, p, dt, min_nsub=5, external_particles_forces=Gp)
time_integration.iterate(fluid, None, dt, min_nsub=5, external_particles_forces=Gp)
t += dt
# Output files writting
......
......@@ -133,7 +133,7 @@ rm.mesh(0.0, 0.0, "mesh_circle.msh",lx, ly, 0.0)
#
# Initialise particles
p = scontact.ParticleProblem(2,False)
joints, n, polymers = genFenePolymer(outputdir, W, 0.2, r_max, rhop, 3*r_max, 10*r_max, 200, n, m=100) #300
joints, n, polymers = genFenePolymer(outputdir, 1, 0.2, r_max, rhop, 3*r_max, 10*r_max, 200, n, m=100) #300
p.read_vtk(outputdir,0)
t = 0
......@@ -184,7 +184,7 @@ try:
x1 = sx[int(j[0])]
x2 = sx[int(j[1])]
Hi = j[2]
Ri = x1-x2; Ri_norm = min(np.linalg.norm(Ri), j[3]-2*r_max); Ri_normer = Ri_norm/np.linalg.norm(Ri) # 2 ca semble marcher
Ri = x1-x2; Ri_norm = min(np.linalg.norm(Ri), j[3]-2*r_max); Ri_normer = Ri_norm/np.linalg.norm(Ri)
Gp[int(j[0]),:] -= Ri_normer*Ri*Hi/(1 - (Ri_norm/j[3])**2)
Gp[int(j[1]),:] += Ri_normer*Ri*Hi/(1 - (Ri_norm/j[3])**2)
......@@ -249,7 +249,7 @@ try:
#Inner distance computation
A = node-ic_position; A_norm = np.linalg.norm(A)
cos_gamma = np.dot(xr, A)/((lx/2)*A_norm)
if abs(cos_gamma) < abs(cos_ref): # Rectange
if abs(cos_gamma) < abs(cos_ref): # Rectangle
if np.linalg.norm(ic_position + yr - node) < np.linalg.norm(ic_position - yr - node): # Rect top
ic_dist[i] = np.linalg.norm(ic_position - line_intersection([ic_position+xr+yr, ic_position-xr+yr], [ic_position,node]))
else: # Rect bottom
......
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