Jun-17-2017, 07:21 AM
Hi,
I m trying to solve PDE with finite elements method. Problem is, when I put the part, which has ln(x) in it, I get error. I tried np.log() and math.log() but no luck. Can someone help me?
I m trying to solve PDE with finite elements method. Problem is, when I put the part, which has ln(x) in it, I get error. I tried np.log() and math.log() but no luck. Can someone help me?
T[0,:] = T_ok T[:,0] = T_in for t in range(Nt): for z in range(1,Nz+1): T[t+1,z] = T[t,z]-(v_avg*dt/dz)*(T[t,z]-T[t,z-1])-(U*2*dt*L/(r_1*dz))*(((T_in-T_h)-(T[t,z]-T_h))/(np.log((T_in-T_h)/(T[t,z]-T_h)))) T[t+1,Nz+1] = T[t+1,Nz]