Commit 48d2a92b authored by Matthieu Constant's avatar Matthieu Constant
Browse files

update testcase

parent 0e32d2ca
Pipeline #4642 passed with stage
in 21 seconds
......@@ -64,15 +64,11 @@ def outerBndV(x) :
print(.4*max(np.sin(t*np.pi*2./1),0))
return 0.4*max(np.sin(t*np.pi*2./1),0)
fluid = fluid.FluidProblem(2,g,[num*rhom,nuf*rhof],[rhom,rhof])
fluid = fluid.FluidProblem(2,g,[num*rhom,nuf*rhof],[rhom,rhof],coeff_stab=1e-6)
fluid.load_msh("mesh.msh")
fluid.set_strong_boundary("Top",2,0)
fluid.set_strong_boundary("Top",1,0)
fluid.set_strong_boundary("Bottom",1,0)
fluid.set_strong_boundary("Lateral",0,0)
fluid.set_weak_boundary("Bottom","Wall")
fluid.set_weak_boundary("Lateral","Wall")
fluid.set_weak_boundary("Top","Wall")
fluid.set_wall_boundary("Bottom")
fluid.set_wall_boundary("Lateral")
fluid.set_wall_boundary("Top",pressure=0)
ii = 0
t = 0
......@@ -80,10 +76,10 @@ s = fluid.solution()
x = fluid.coordinates()
for i in range(len(x[:,0])):
if (x[i,0])**2+(x[i,1]-.52)**2<R**2:
s[i,3] = 1
else:
s[i,3] = 0
z = (x[i,0])**2+(x[i,1]-.52)**2
R1 = (0.9*R)**2
R2 = (1.1*R)**2
s[i,3] = min(max(0,1/(R1-R2)*z-R2/(R1-R2)),1)
#set initial_condition
......@@ -96,7 +92,7 @@ while t < tEnd :
#Fluid solver
fluid.implicit_euler(dt)
if (ii%11==0 and ii != 0):
fluid.adapt_mesh(1e-3,1e-4,10000)
fluid.adapt_mesh(1e-2,1e-4,5000)
t += dt
#Output files writting
if ii %outf == 0 :
......
......@@ -29,10 +29,11 @@ Field[2] = Threshold;
Field[2].DistMax = 0.08;
Field[2].DistMin = 0.02;
Field[2].LcMax = 0.008;
Field[2].LcMin = 0.001;
Field[2].LcMin = 0.0005;
Field[2].IField = 1;
Background Field = 2;
Mesh.CharacteristicLengthFromPoints = 0;
Mesh.CharacteristicLengthExtendFromBoundary = 0;
Mesh.MshFileVersion = 2;
\ No newline at end of file
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