Commit 6b6ae965 authored by Maud Schauss's avatar Maud Schauss
Browse files

correction validation

parent 2002b453
Pipeline #7302 passed with stage
in 2 minutes and 21 seconds
......@@ -48,14 +48,14 @@ def get_h(fluid,nodes,dt,newx,vbox = 0):
u = fluid.solution()[nodes,:2]/fluid.porosity()[nodes]
dx = x[1:] - x[:-1]
dhdx = (y[1:]- y[:-1])/dx
ux = (u[1:,0] + u[:-1,0])/2
uy = (u[1:,1] + u[:-1,1])/2
# ux = (u[1:,0] + u[:-1,0])/2
ux = u[:-1,0]
# uy = (u[1:,1] + u[:-1,1])/2
uy = u[:-1,1]
rhs = uy - ux*dhdx
print(f"dhdx = {dhdx[0]}\t v/u = {uy[0]/ux[0]}")
print(f"angle = {np.rad2deg(np.arctan(uy[0]/ux[0]))}")
# print(f"dhdx = {dhdx[0]}\t v/u = {uy[0]/ux[0]}")
# print(f"angle = {np.rad2deg(np.arctan(uy[0]/ux[0]))}")
newx[nodes[1:],1] += rhs*dt
return(abs(dhdx[0] - uy[0]/ux[0]))
def get_inside_nodes(top_nodes, h, nodes,newx):
......
......@@ -46,9 +46,9 @@ fluid.load_msh("mesh.msh")
#fluid.set_strong_boundary("Left",2,1)
fluid.set_open_boundary("Left", velocity = [0.0001,0.0001])
fluid.set_strong_boundary("Left",1,0.0001)
fluid.set_strong_boundary("Left",0,0.0001)
fluid.set_open_boundary("Left", velocity = [0.001,0.001])
fluid.set_strong_boundary("Left",1,0.001)
fluid.set_strong_boundary("Left",0,0.001)
fluid.set_open_boundary("Up", pressure = 0)
fluid.set_wall_boundary("Down")
......@@ -93,6 +93,9 @@ while t < tEnd :
fluid.mesh_velocity()[:] = (newx[:,:2] - fluid.coordinates()[:,:2])*fluid.porosity()[:]/dt
fluid.set_coordinates(newx)
gonflement = (newx[fs_nodes[1],1] - newx[fs_nodes[0],1])/(newx[fs_nodes[1],0] - newx[fs_nodes[0],0])
angle = np.rad2deg(np.arctan(gonflement))
print(f"\n\tTaux de gonflement = {gonflement}\n\tAngle de gonflement = {angle}")
t += dt
# Output files writting
......
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