Neumann BC in Python | Steady Diffusion Problem | Lecture 9 | Simulating Fluid Flows Using Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

ความคิดเห็น • 9

  • @MichaelJamesActually
    @MichaelJamesActually 6 หลายเดือนก่อน

    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!

  • @carlosterre1991
    @carlosterre1991 3 ปีที่แล้ว +2

    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()

  • @mohamedelmalah6716
    @mohamedelmalah6716 9 หลายเดือนก่อน

    Thanks for the course, please could you download the python code??

  • @shubhamkumarvishwakarma8250
    @shubhamkumarvishwakarma8250 ปีที่แล้ว

    Dear, Thanks for your excellent explanation.
    Please suggest how to tackle periodic, nonaxisymmetric boundaries in cylindrical coordinates.

  • @sarthak_k_patel
    @sarthak_k_patel 3 ปีที่แล้ว

    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.

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 ปีที่แล้ว

      Can you download my code and run it for verification?

  • @subhajitmitra7512
    @subhajitmitra7512 3 ปีที่แล้ว

    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

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 ปีที่แล้ว

      Are other boundary conditions and value same?

    • @MichaelJamesActually
      @MichaelJamesActually 6 หลายเดือนก่อน

      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.