Commit d9667408 authored by Nathan Coppin's avatar Nathan Coppin
Browse files

adapting valid

parent e4b05067
Pipeline #7806 failed with stages
in 2 minutes and 55 seconds
......@@ -65,11 +65,11 @@ def genInitialPosition(filename, rmin, rmax, H, lx, ly, rhop) :
p.add_particle((x[i], y[i]), r[i], r[i]**2 * np.pi * rhop)
p.write_vtk(filename,0,0)
def total_boundary_impulsion(p):
fn, ft = p.get_boundary_impulsion("left")
fn2, ft2 = p.get_boundary_impulsion("right")
fn3, ft3 = p.get_boundary_impulsion("bottom")
fn4, ft4 = p.get_boundary_impulsion("top")
def total_boundary_force(p):
fn, ft = p.get_boundary_force("left")
fn2, ft2 = p.get_boundary_force("right")
fn3, ft3 = p.get_boundary_force("bottom")
fn4, ft4 = p.get_boundary_force("top")
return fn + fn2 + fn3 + fn4 + ft + ft2 + ft3 + ft4
class Weight(unittest.TestCase) :
......@@ -114,7 +114,7 @@ class Weight(unittest.TestCase) :
#
forces = g*p.mass()
def accumulate(bnd_forces) :
bnd_forces += total_boundary_impulsion(p)
bnd_forces += total_boundary_force(p)
while t < tEnd :
bnd_forces = np.zeros((2,))
time_integration.iterate(None,p,dt,min_nsub=1,external_particles_forces=forces,
......
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