Commit 8a72a9e8 authored by Michel Henry's avatar Michel Henry
Browse files

fix darcy

parent aea6b0d5
Pipeline #8793 passed with stages
in 5 minutes and 18 seconds
......@@ -116,7 +116,7 @@ while t < tEnd:
vTop += (fTop[0] + Fext(xTop))*dt/mTop
xTop += vTop*dt
p.set_boundary_velocity("Top", vTop)
# p.set_boundary_velocity("Top", vTop)
#Ensure particle teleportation
p.position()[:,0] = np.fmod(p.position()[:,0] + L/2,L) - L/2
......
......@@ -107,8 +107,9 @@ class Darcy(unittest.TestCase) :
ii = 0
fluid = mbfluid.FluidProblem(2,g,mu,rho,drag_in_stab=True,petsc_solver_type="-pc_type ilu")
fluid.load_msh("mesh.msh")
V = 0.00001
fluid.solution()[:,0] = V
U = 0.00001 # averaged fluid velocity
V = U/(1-compacity) # fluid velocity
fluid.solution()[:,0] = U
fluid.set_open_boundary("Left",velocity=[V,0])
fluid.set_open_boundary("Right",pressure=0)
fluid.set_wall_boundary("Bottom",velocity=[0,0])
......@@ -133,10 +134,10 @@ class Darcy(unittest.TestCase) :
ii += 1
print("%i : %.2g/%.2g (cpu %.6g)" % (ii, t, tEnd, time.time() - tic))
gamma = (0.63*V/(1-compacity)+4.8*(mu/((1-compacity)*rho*2*r))**0.5)**2*(1-compacity)**-1.8*rho*r
gamma = (0.63*U/(1-compacity)+4.8*(mu/((1-compacity)*rho*2*r))**0.5)**2*(1-compacity)**-1.8*rho*r
vol = (np.pi*r**2)
N = compacity/vol
Dp_drag[j] = gamma*N*V/(1-compacity)**2
Dp_drag[j] = gamma*N*U/(1-compacity)**2
pressure = fluid.solution()[:,2]
pM[j] = np.mean(fluid.solution()[fluid.coordinates()[:,0]<-.99,2])
......
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