Commit f13e54b9 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

fix #6

parent a46c6dab
Pipeline #4067 passed with stage
in 1 minute and 27 seconds
......@@ -70,32 +70,30 @@ class Poiseuille(unittest.TestCase) :
u0,v0,q0 = 0,1,2
u1,v1,q1 = 3,4,5
p = 6
strong_boundaries = [
("Bottom",u0,u0,0),
("Bottom",v0,v0,0.),
("Bottom",u1,u1,0),
("Bottom",v1,v1,0.),
("Top",u0,u0,0),
("Top",v0,v0,0.),
("Top",u1,u1,0),
("Top",v1,v1,0.),
("LeftUp",u0,u0,lambda x : x[:,1]/(20*nu0*rho)*x[:,1]*(1-x[:, 1])),
("LeftUp",v0,v0,0),
("LeftUp",q0,q0,lambda x : x[:,1]),
("LeftUp",u1,u1,lambda x : (1-x[:,1])/(20*nu1*rho)*x[:,1]*(1-x[:, 1])),
("LeftUp",v1,v1,0),
("LeftDown",u0,u0,lambda x : (x[:,1])/(20*nu0*rho)*x[:,1]*(1-x[:, 1])),
("LeftDown",v0,v0,0),
("LeftDown",q0,q0,lambda x : x[:,1]),
("LeftDown",u1,u1,lambda x : (1-x[:,1])/(20*nu1*rho)*x[:,1]*(1-x[:, 1])),
("LeftDown",v1,v1,0),
("RightDown",v0,v0,0),
("RightDown",v1,v1,0),
("RightUp",v0,v0,0),
("RightUp",v1,v1,0),
]
fluid = mbfluid.fluid_problem(g,[nu0*rho,nu1*rho],[rho,rho],epsilon,strong_boundaries)
fluid = mbfluid.fluid_problem(g,[nu0*rho,nu1*rho],[rho,rho])
fluid.set_strong_boundary("Bottom",u0,0)
fluid.set_strong_boundary("Bottom",v0,0.)
fluid.set_strong_boundary("Bottom",u1,0)
fluid.set_strong_boundary("Bottom",v1,0.)
fluid.set_strong_boundary("Top",u0,0)
fluid.set_strong_boundary("Top",v0,0.)
fluid.set_strong_boundary("Top",u1,0)
fluid.set_strong_boundary("Top",v1,0.)
fluid.set_strong_boundary("LeftUp",u0,lambda x : x[:,1]/(20*nu0*rho)*x[:,1]*(1-x[:, 1]))
fluid.set_strong_boundary("LeftUp",v0,0)
fluid.set_strong_boundary("LeftUp",q0,lambda x : x[:,1])
fluid.set_strong_boundary("LeftUp",u1,lambda x : (1-x[:,1])/(20*nu1*rho)*x[:,1]*(1-x[:, 1]))
fluid.set_strong_boundary("LeftUp",v1,0)
fluid.set_strong_boundary("LeftDown",u0,lambda x : (x[:,1])/(20*nu0*rho)*x[:,1]*(1-x[:, 1]))
fluid.set_strong_boundary("LeftDown",v0,0)
fluid.set_strong_boundary("LeftDown",q0,lambda x : x[:,1])
fluid.set_strong_boundary("LeftDown",u1,lambda x : (1-x[:,1])/(20*nu1*rho)*x[:,1]*(1-x[:, 1]))
fluid.set_strong_boundary("LeftDown",v1,0)
fluid.set_strong_boundary("RightDown",v0,0)
fluid.set_strong_boundary("RightDown",v1,0)
fluid.set_strong_boundary("RightUp",v0,0)
fluid.set_strong_boundary("RightUp",v1,0)
fluid.load_mesh("mesh.msh")
ii = 0
t = 0
......
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