Open DmStrkIndstrs opened 2 years ago
h = np.ones(N_x)0.2 drop = np.exp(-((x-L_x(0.7))*2/(2(0.05E+2)*2)))1.5 h = h+ drop
slope = lambda x,b,L: (x>=b)(x-b)(L/(L_x-b)) dam = lambda x,a,b,L: ((x>=a)&(x<=b))*L
u = np.zeros(N_x) z = np.ones(Nx)*0.1 s = slope(x,0,1.5) d = dam(x,10,30,2) z = z + s z = np.zeros(N_x)
h = np.where(h>=z,h-z,0) plt.plot(h) plt.show()
fig, (axh,axu) = plt.subplots(2, 1,facecolor ='white') line_u,=axu.plot(x,u) lineh,=axh.plot(x,h+z) fill=axh.fillbetween(x,z,z,color ='tab:orange')
[try1] - droplet이가운데에 위치한 모습
h = np.ones(N_x)0.8 drop = np.exp(-((x-L_x(0.55))*2/(2(0.05E+2)**2))) h = h+ drop
h[:300]= 2
slope = lambda x,b,L: (x>=b)(x-b)(L/(L_x-b)) dam = lambda x,a,b,L: ((x>=a)&(x<=b))*L
u = np.zeros(N_x) z = np.ones(Nx)*0.5 s = slope(x,0,1) d = dam(x,10,30,3) z = z + s z = np.zeros(N_x)
h = np.where(h>=z,h-z,0) plt.plot(h) plt.show()
z[150:200]=0
fig, (axh,axu) = plt.subplots(2, 1,facecolor ='white') line_u,=axu.plot(x,u) lineh,=axh.plot(x,h+z) fill=axh.fillbetween(x,z,z,color ='tab:orange')