hey there, one more question for you. at 8:30, you show the code, and identify the equation for T_new[i] = (a_E*T[i-1] + a_W*T[i+1]) / a_P. I'm confused because the generalized finite volume discretization formula was given as a_p = a_e * T_e + a_w * T_w. The T_w should be the lower index as the west face is to the left. Edit - looks like it's set back to normal later in the video. thanks and quick feedback!
In order to plot the result as it appears in your lecture, I added the following: plt.axis([None, None, 0, 1]) # Plotting the results plt.figure() # Defining the position from indexes x_dom = np.arange(N) * h # Plotting the variation with customization plt.plot(x_dom, T, 'gx--', linewidth=2, markersize=10) # Displaying the gridlines plt.grid(True, color='k') # Labelling and providing a title to the plot plt.xlabel('Position', size=10) plt.ylabel('Temperature', size=10) plt.title('T(x)') plt.axis([None, None, 0, 1]) # Showing the plot on screen plt.show()
Hello sir, I did exactly same conding and also checked twice and thrice, but the getting the approximate quadratic kind of curve in between 8.8*10^(-1) to 10*10^(-1). And I also checked the values of T it is around 0.999999999999 for around 70 points and 1 for others. What is going wrong i didn't not understand. Thanks.
Hi from the future. similar problem. I think it's a limitation in using this numerical method with the step sizes, etc. when you increase the epsilon, results look more reasonable. 1e-5 works ok.
hey there, one more question for you. at 8:30, you show the code, and identify the equation for T_new[i] = (a_E*T[i-1] + a_W*T[i+1]) / a_P.
I'm confused because the generalized finite volume discretization formula was given as a_p = a_e * T_e + a_w * T_w. The T_w should be the lower index as the west face is to the left.
Edit - looks like it's set back to normal later in the video. thanks and quick feedback!
In order to plot the result as it appears in your lecture, I added the following: plt.axis([None, None, 0, 1])
# Plotting the results
plt.figure()
# Defining the position from indexes
x_dom = np.arange(N) * h
# Plotting the variation with customization
plt.plot(x_dom, T, 'gx--', linewidth=2, markersize=10)
# Displaying the gridlines
plt.grid(True, color='k')
# Labelling and providing a title to the plot
plt.xlabel('Position', size=10)
plt.ylabel('Temperature', size=10)
plt.title('T(x)')
plt.axis([None, None, 0, 1])
# Showing the plot on screen
plt.show()
Thanks for the course, please could you download the python code??
Dear, Thanks for your excellent explanation.
Please suggest how to tackle periodic, nonaxisymmetric boundaries in cylindrical coordinates.
Hello sir,
I did exactly same conding and also checked twice and thrice, but the getting the approximate quadratic kind of curve in between 8.8*10^(-1) to 10*10^(-1). And I also checked the values of T it is around 0.999999999999 for around 70 points and 1 for others. What is going wrong i didn't not understand.
Thanks.
Can you download my code and run it for verification?
I did the exact , what u did for insulated boundary condition but got a quadratic curve with an ending temperature of 0
Please help me out
Are other boundary conditions and value same?
Hi from the future. similar problem. I think it's a limitation in using this numerical method with the step sizes, etc. when you increase the epsilon, results look more reasonable. 1e-5 works ok.