Commit 8a0e98d0 authored by Matthieu Constant's avatar Matthieu Constant
Browse files

test cases wk bnd

parent ee14caa0
Pipeline #4615 passed with stage
in 22 seconds
......@@ -26,7 +26,7 @@
# This example shows how to set boundary conditions as a function of some parameters.
# A boolean parameter gives the possibility to use lmgc90 to solve contacts instead of scontact.
use_lmgc90 = 0
use_lmgc90 = True
from migflow import fluid
from migflow import scontact
......
......@@ -89,11 +89,8 @@ outf = 20 # number of iterations between o
fluid = fluid.FluidProblem(2,g,nu*rho,rho)
fluid.load_msh("mesh.msh")
fluid.set_strong_boundary("Box",0,0)
fluid.set_strong_boundary("Box",1,0)
fluid.set_strong_boundary("Box",0,0)
fluid.set_strong_boundary("Box",1,0)
fluid.set_strong_boundary("Box",2,0)
fluid.set_wall_boundary("Top", pressure=0)
fluid.set_wall_boundary("Box")
fluid.set_particles(p.mass(), p.volume(), p.position(), p.velocity())
fluid.export_vtk(outputdir,0,0)
......
......@@ -80,19 +80,11 @@ def outerBndV(x) :
fluid = fluid.FluidProblem(2,g,nu*rho,rho)
fluid.load_msh("mesh.msh")
fluid.set_strong_boundary("Top",2,0)
fluid.set_strong_boundary("TopOut",1,outerBndV)
fluid.set_strong_boundary("TopOut",0,0)
fluid.set_strong_boundary("Top",1,outerBndV)
fluid.set_strong_boundary("BottomOut",1,outerBndV)
fluid.set_strong_boundary("BottomOut",0,0)
fluid.set_strong_boundary("Bottom",1,outerBndV)
fluid.set_strong_boundary("Bottom",0,0)
fluid.set_strong_boundary("Lateral",0,0)
fluid.set_weak_boundary("Bottom","Inflow")
fluid.set_weak_boundary("BottomOut","Inflow")
fluid.set_weak_boundary("TopOut","Inflow")
fluid.set_weak_boundary("Top","Inflow")
fluid.set_wall_boundary("Lateral")
fluid.set_open_boundary("Bottom",velocity=[0, outerBndV])
fluid.set_open_boundary("BottomOut",velocity=[0, outerBndV])
fluid.set_open_boundary("TopOut",pressure=0)
fluid.set_open_boundary("Top",pressure=0)
fluid.set_particles(p.mass(), p.volume(), p.position(), p.velocity())
fluid.export_vtk(outputdir,0,0)
......
......@@ -87,28 +87,10 @@ def outerBndV(x) :
fluid = fluid.FluidProblem(3,g,[nu*rho],[rho])
fluid.load_msh("mesh.msh")
fluid.set_strong_boundary("XVel",0,0)
fluid.set_strong_boundary("ZVel",2,0)
fluid.set_strong_boundary("XVel",2,0)
#fluid.set_strong_boundary("XVel",1,0)
#fluid.set_strong_boundary("ZVel",1,0)
fluid.set_strong_boundary("ZVel",0,0)
fluid.set_strong_boundary("Bottom",1,outerBndV)
fluid.set_strong_boundary("Bottom",0,0)
fluid.set_strong_boundary("Bottom",2,0)
fluid.set_strong_boundary("Top",0,0)
fluid.set_strong_boundary("Top",2,0)
fluid.set_weak_boundary("Bottom","Inflow")
fluid.set_weak_boundary("ZVel","Wall")
fluid.set_weak_boundary("Top","Outflow")
fluid.set_weak_boundary("XVel","Wall")
fluid.set_open_boundary("Bottom",velocity=[0,outerBndV])
fluid.set_wall_boundary("ZVel")
fluid.set_open_boundary("Top",pressure=0)
fluid.set_wall_boundary("XVel")
L=.33/2
#fluid.solution()[:,:] = np.zeros_like(fluid.solution()[:,:])#0*1/L**4 *(fluid.coordinates()[:,0]-L)*(fluid.coordinates()[:,0]+L)*(fluid.coordinates()[:,2]-L)*(fluid.coordinates()[:,2]+L)*np.sin(np.pi*1/2*dt)
......
......@@ -100,10 +100,11 @@ fluid.set_strong_boundary("InnerLeft",0,lambda x : Bnd(x[:,1],yc,A,T,-1))
fluid.set_strong_boundary("InnerLeft",1,lambda x: Bnd(x[:,0],-xc,A,T,1))
fluid.set_strong_boundary("InnerRight",0,lambda x : Bnd(x[:,1],yc,A,T,1))
fluid.set_strong_boundary("InnerRight",1,lambda x : Bnd(x[:,0],xc,A,T,-1))
fluid.set_strong_boundary("Top",2,0.)
fluid.set_strong_boundary("Bottom",1,0.)
fluid.set_strong_boundary("Top",1,0)
fluid.set_strong_boundary("Vertical",0,0)
fluid.set_wall_boundary("InnerLeft")
fluid.set_wall_boundary("InnerRight")
fluid.set_wall_boundary("Top",pressure=0)
fluid.set_wall_boundary("Bottom")
fluid.set_wall_boundary("Vertical")
fluid.set_particles(p.mass(), p.volume(), p.position(), p.velocity())
fluid.export_vtk(outputdir,0,0)
......
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