Solving 2D Convection Diffusion using MATLAB | Lecture 13 | ICFDM

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 47

  • @fawazbukhtmajmader4860
    @fawazbukhtmajmader4860 Рік тому +1

    I think there is a slight mistake in the theory part.. Pardon me if its not. If the diffusion coefficient D, is considered D= gamma then the equation matches with the one done in matlab but if D= (gamma/h) is considered, there seems to be error which comes out during the upwind scheme calculation.

  • @free2learn886
    @free2learn886 3 роки тому +1

    Thanks for your explanation, it's very understandable and helpful. if you can continue uploading new videos, it will be good news

  • @ayeletulu4596
    @ayeletulu4596 Рік тому

    Hi Tanmay, thank you for the vedios. I have benefited from your lecture. Please, can you give us an example of solving 2D unsteady convection diffusion problem with Matlab?

  • @evanfleming5136
    @evanfleming5136 2 роки тому

    Hi Tanmay, do you have any videos on using a hybrid differencing scheme?

  • @nikolasmario8679
    @nikolasmario8679 2 роки тому

    Hello Mr. Tanmay!
    Thank you for the explanation, I am currently working on a heat exchanger problem that uses 2 dimension convection-diffusion. I notice from your video that you already input the boundary condition of the first and final properties.
    In my case, I want to see the cooling capacity of my heat exchanger so I want to find the final properties (in my case temperature) of the system. Can I use the central differencing method for that or do I need to use another method?
    Thank you!

  • @yu-chiwang5171
    @yu-chiwang5171 2 роки тому

    Dear Tanmay,
    I am amazed this your tutorial video. However, could you also explain how to discretize the 2D r-z Steady State "Axis Symmetry" Diffusion and Convection case by FVM?
    That would be greatly appreciated.
    Best regards,
    Yu-Chi

  • @dhirendusomani
    @dhirendusomani 3 роки тому

    Hello Tanmay,
    First of all, thank you for doing this lecture series.
    06:33 you have mentioned that there is a reason for defining Peclet no. based on grid spacing('h')...could you please explain why? ...Did I miss somewhere if you have explained it later?

  • @hadiyogatjitro6616
    @hadiyogatjitro6616 3 роки тому

    Hi, thank you for the information!
    Right now I am trying to simulate the carbonation in concrete column, but I don't have any clue how to set the boundary condition

  • @rohitsvarma3562
    @rohitsvarma3562 5 місяців тому

    also are we taking the assumption that ue=uw and vn=vs. because when we calculate the a_p the coefficient get cancelled out

  • @munavarafarah4754
    @munavarafarah4754 3 роки тому

    Hello Tanmay!
    Really good lectures! :D
    I have a doubt regarding the coding. I seem to getting different trends for both Central Differencing and Upwind schemes. I have attached the code used. Kindly have a look into it.
    %% Defining the problem domain
    n_points=101;
    dom_length=1;
    h=dom_length/(n_points-1);
    x=0:h:dom_length;
    y=0:h:dom_length;
    %% Initialising the problem
    T(1,1:n_points)=1;
    T(1:n_points,1)=1;
    T_new(1,1:n_points)=1;
    T_new(1:n_points,1)=1;
    rho=1;
    u=1;
    v=1;
    gamma=0.01;
    Pe=rho*u*h/gamma %
    %% Upwind Scheme
    error=1;
    iterations=0;
    while error>1e-7
    for i=2:n_points-1
    for j=2:n_points-1
    a_E=gamma;
    a_W=gamma + rho*u*h;
    a_N=gamma;
    a_S=gamma + rho*v*h;
    a_P= rho*u*h + rho*v*h + gamma + gamma + gamma + gamma;
    T_new(i,j)=(a_E*T(i+1,j)+a_W*T(i-1,j)+a_N*T(i,j-1)+a_S*T(i,j+1))/a_P;
    end
    iterations=iterations+1;
    error=0;
    for i=2:n_points-1
    for j=2:n_points-1
    error=error+abs(T(i,j)-T_new(i,j));
    end
    end
    T=T_new;
    end
    end
    %% Plotting
    x_dom=((1:n_points)-1).*h;
    y_dom=1-((1:n_points)-1).*h;
    [X,Y]=meshgrid(x_dom,y_dom);
    contourf(X,Y,T,50);
    colorbar
    %% Centerline temperature
    figure;
    plot(1-y,T(:,(n_points+1)/2), '--o')

  • @danialassarian6695
    @danialassarian6695 3 роки тому

    Hi Tanmay. Great speech, thank you !!
    Can I have a two-dimensional Quick Scheme code?

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 роки тому

      Hello, thanks for watching. I don't think I have a 2D QUICK scheme code. But if you are facing bugs, please contact me.

  • @rohitsvarma3562
    @rohitsvarma3562 5 місяців тому

    hello can you explain the code for the QUICK scheme, please?

  • @brucelee4904
    @brucelee4904 2 роки тому

    Hi sir
    While solving the convection diffusion equation, what should we initialize the 2nd value with? From my understanding quick scheme requires 2 terms before and 1 next term, we need to initialize the 2nd term too and then iterate from 3rd right
    Could you help me with this?

  • @SS-tx3kq
    @SS-tx3kq 3 роки тому

    Hi Tanmay, thank you for your video.It's very helpful for me! I have a question:why a_E=gamma-rho*u*h/2 without delta x? In the previous video, you said D=gamma/delta x?

  • @muhammedea6777
    @muhammedea6777 3 роки тому +1

    I have a doubt about indexing according to matlab
    9:14 it will be (i, j+1) and 9:17 (I,j-1) { i th row and j+1 and j-1 column} and
    south as (i+1,j)
    north as (i-1,j)
    is the above thing correct

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 роки тому +2

      Correct. Indexing in MATLAB and Cartesian system are not consistent. Therefore, the notes contain a slightly different indexing as that of code, apologies for that.

  • @wisdomhezekiah868
    @wisdomhezekiah868 3 роки тому

    please can you prepare a code on shooting method both linear and non linear together with rk4

  • @Braboried
    @Braboried 3 роки тому

    which parameter of the code is the thermal conductivity ?

  • @sonalisawant6420
    @sonalisawant6420 8 місяців тому

    Hello sir, I am trying to solve a 1D transient heat conduction problem with convection boundary conditions but I am unable to obtain the temperature profile as there is error in the looping of the temperatures. Request you to kindly provide some guidance in this regards and help me with the matlab code for this particular problem

  • @madhusmitaray4199
    @madhusmitaray4199 3 роки тому

    Sir I am facing a problem with Quick scheme. In this scheme we need to insert the i-2 th term(NN for face n when v0) which is causing problem in computation as the compuation is done for i=2:n-1 . Can you suggest me how to rectify the problem?

  • @mobinrasoulpour8127
    @mobinrasoulpour8127 2 роки тому

    hello dear friend
    i need upwind - lax wendroff and mac cormack matlab code for 2d advection equation,. how can i get that? and boundry condition is not important plz help me

  • @anna1233shvjsnd
    @anna1233shvjsnd Рік тому

    I have a doubt related to the central differencing scheme. Can you pls share your number so that I can ask?

  • @thatsound7057
    @thatsound7057 3 роки тому

    in the while loop, we should write gamma/h while calculating a_E, a_W, a_N, a_S and a_P am I right or missed something about theory ?

    • @bhgomes
      @bhgomes 3 роки тому +1

      Instead of divide 'gamma' for 'h', Tamnay multiplies this 'h' into 'rho*u ' , resulting in: 'gamma + rho*u*h ' == 'gamma/h + rho*u'

  • @vkpatel1986
    @vkpatel1986 3 роки тому

    Can we solve this 2D Convection Diffusion by Non Standard finite difference method using Matlab

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 роки тому

      Non standard such as?

    • @vkpatel1986
      @vkpatel1986 3 роки тому

      @@TanmayAgrawal7 Nonstandard Finite Difference Schemes
      given by Ronald E. Mickens
      Definition. A nonstandard finite difference scheme is any discrete representation of a system of differential equations that is constructed based on the
      below rules.
      Rule 1. The orders of the discrete derivatives should be equal to the orders
      of the corresponding derivatives appearing in the differential equations.
      Rule 2. Discrete representations for derivatives must, in general, have nontrivial denominator functions.
      Rule 3. Nonlinear terms should, in general, be replaced by nonlocal discrete represent.
      Rule 4. Special conditions that hold for either the differential equation
      and/or its solutions should also hold for the difference equation model
      and/or its solutions.

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 роки тому +1

      I'm not aware of these, but if they are applicable to CFD problems and satisfies basic principles e.g. conservativeness, they should be valid. You can try, is what I can recommend.

  • @soumyaroy229
    @soumyaroy229 3 роки тому

    The contourf command works very well for a square domain(n_points = m_points) but what can I use for a rectangular domain plot in MATLAB? Please help.

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 роки тому +1

      It should be for a rectangular grid as well. Can you please let me know what's going wrong? Is your meshgrid command correctly executed?

    • @soumyaroy229
      @soumyaroy229 3 роки тому

      @@TanmayAgrawal7
      Thanks for the reply.
      Yes, the meshgrid command is okay. In fact everything works fine when I set my domain as a unit length in both x and y directions and discretize it in equal number of points in both directions (just like the way u hv shown). Great video series bdw.
      But the problem comes when I try to discetize the domain with different number of nodes in x and y directions.
      e.g instead of 51×51 nodes... Say I want the same domain to be 51×101 nodes. Then it's not working. It says :
      "Error using contourf:
      The size of X must match the size of z or the number of columns of z".....

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 роки тому

      Can you email your code to tanmayagrawal7@gmail.com?

    • @soumyaroy229
      @soumyaroy229 3 роки тому

      @@TanmayAgrawal7 Done.

  • @nawesqamar1574
    @nawesqamar1574 3 роки тому

    T_new(i,j)=(a_E*T(i+1,j)+a_W*T(i-1,j)+a_N*T(i,j-1)+a_S*T(i,j+1))/a_p;
    you have taken a_N*T(i,j-1) but it should be (i,j+1) and in south a_S*T(i,j-1).
    i have big confusion on this please reply

    • @bhgomes
      @bhgomes 3 роки тому +1

      In fact, Tanmay writes this way because MATLAB considers as positivethe downward direction. You are correct, but, in MATLAB, the matrix index starts at (1,1) and goes positive in the 'x' to right and in the 'y' to downward, so , it is better to follow this shape.

  • @abidshah1346
    @abidshah1346 3 роки тому

    Dear Sir!
    I hope that you are doing well.
    I am doing simulation of polymer heating i injection moulding machine.
    I have a problem in the simulation. When I keep velocity positive, the simulation is perfect but if i keep it negative, the simulation is very strange. I am using forward difference method.
    Can I have a meeting with you some time?. I would be grateful.
    Thanks and Regards
    Sincerely
    Abid Shah

  • @高上雅-w1j
    @高上雅-w1j 3 роки тому

    Hello Tanmay,
    Thank you for your videos and they are very helpful:)
    But Now I also have some questions..Can I have your email? I want to send the questions with pictures so that I can better explain the questions and you can better understand. Thank you again!
    Kind regards,
    Shangya

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 роки тому

      Please email me on tanmayagrawal7@gmail.com

  • @benyettoukamel5283
    @benyettoukamel5283 3 роки тому

    thank you Tanmay Agrawal, can you send this code matlab by gmail .??

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 роки тому +3

      drive.google.com/folderview?id=1Hhoh8U2CsbPa4bTT8Vnlg3dM5G6KnUZ3
      You can access it here.

    • @benyettoukamel5283
      @benyettoukamel5283 3 роки тому

      @@TanmayAgrawal7 Thank you very much