Coding for Lid Driven Cavity Flow Simulation in C (Part 2) | 04 | Implementing the CFD Basics

  Рет қаралды 43,970

Tanmay Agrawal

Tanmay Agrawal

Күн бұрын

Пікірлер: 149
@edwardferdian6032
@edwardferdian6032 5 жыл бұрын
Amazing video. As a dev, this really helps me in understanding how CFD is calculated. Thanks a lot! Keep up the good work.
@yqgao6195
@yqgao6195 3 жыл бұрын
The shortest video can explain CFD clearly. Thank you!
@iloveno3
@iloveno3 6 жыл бұрын
Best cfd tutorial ever! Thank you so much for your effort. Excellent presentation. Learned so much in so little time.
@TanmayAgrawal7
@TanmayAgrawal7 6 жыл бұрын
Thanks a lot buddy!
@MahmoudOuf
@MahmoudOuf 8 жыл бұрын
Thanks so much for your tutorial , this video actually has summarized many books bout CFD and partial differential equations to me in a very good way, so I have to thank you so much I will be grateful if you make more videos about such topics. Regards.
@AdityaKadamMechanical
@AdityaKadamMechanical 6 жыл бұрын
Thank you so much Bro, there are very few lectures that show proper coding in CFD🙏
@shivabarpete
@shivabarpete 7 жыл бұрын
thank you very much brother. you have solved this problem very beautifully ...keep doing this thanks a lot...
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
Thank you for the lovely comment bro!
@mariamargareta86
@mariamargareta86 5 жыл бұрын
thank you so much, its help me to finish my home work about CFD
@sumeetlulekar914
@sumeetlulekar914 6 жыл бұрын
Elegantly written and well explained !!
@manunayak91
@manunayak91 5 жыл бұрын
Sincerely I thank you. Very nice explanation. I'm going to try with your code and write my own..
@TanmayAgrawal7
@TanmayAgrawal7 5 жыл бұрын
Let us know how it turns out.
@duongtung4858
@duongtung4858 8 жыл бұрын
thank you very much for your video. It is very useful for me when i start learning CFD. Could you please make some tutorials like this (Coding and explaining about the basic CFD problems) in the next time.
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
Please check the newly published video. It may answer some of your questions, thanks!
@mehdiriahi6258
@mehdiriahi6258 4 жыл бұрын
excellent video but I think you should give much attention to the nonlinear convectif terms in the nonlinear NS equation where u(du/dx) is different to (du*u/dx)
@Alukard55
@Alukard55 5 жыл бұрын
Brilliant explanation! Bravo!
@biswajyotibaishya9753
@biswajyotibaishya9753 3 жыл бұрын
Thank you, it has helped a lot
@haveanicetime
@haveanicetime 7 жыл бұрын
Hello, thank you very much! Do you have any pdf contains cfd tutorials using c language? Thanks
@JehanSaren
@JehanSaren Жыл бұрын
Can you also show how to solve y-momentum?
@vikash9094
@vikash9094 8 жыл бұрын
Thank You so much for the Tutorial...Could you please make a tutorial for flow over a flat plate involving heat transfer.
@mechdevus
@mechdevus 6 жыл бұрын
Haie tanmay can u help on what can be done to post process a c++ code in tecplot i have done a 2d transient simulation of heat diffusion equations and i want to post process the results..what should ido do i need to to include any library in my exting code so that i can do the post processing in tec plot.Is there any documentation available for the same can u help me in this regard. thank u in advance
@miteshthakor9780
@miteshthakor9780 6 жыл бұрын
Can you explain to me why were you taking delta value 4.5?
@geoklavaris
@geoklavaris 6 жыл бұрын
Hello, when you explaining the code regarding the x-momentum equation.. the duv/dx part does not correspond to the real equation. For example the ν3+ν4 shouldn't be v[i+1][j+1] + v[i-1][j+1] instead of what you have in line 60 in the code? Similar for ν1+ν2
@ankitjaiswal8496
@ankitjaiswal8496 3 жыл бұрын
Thank you so much sir. Helped me a lot. Can you help me how to find benchmark file so that i can verify
@TanmayAgrawal7
@TanmayAgrawal7 3 жыл бұрын
gerris.dalembert.upmc.fr/gerris/tests/tests/lid.html
@chandanmukherjee3082
@chandanmukherjee3082 4 жыл бұрын
Hello, Many thanks for your awesome tute. I am beginner CFD coder. I wish to write a code for heat flow in-between concentric circle with inner circle as hot and outer circle cold. How should I approach ?
@sumairamehmood3743
@sumairamehmood3743 7 жыл бұрын
sir i write matlab code of staggered grid using pressure correction method but how to plot 3 central velocities lines by varying Reynolds number in one graph figure .i need your help
@cheikhbrahimabed4319
@cheikhbrahimabed4319 4 жыл бұрын
Amazing video. Do you have a code for 1D compressible flow navier-stokes?
@AshokKBarik
@AshokKBarik 3 жыл бұрын
Thank you for your effort.
@Amogh130997
@Amogh130997 7 жыл бұрын
Great video! But I have a doubt... Why do we take error to be the divergence of velocity? Shouldn't it be the difference between the updated velocity and the old velocity?
@lintangnuswantoro4598
@lintangnuswantoro4598 7 жыл бұрын
Good Morning, Mr. Tanmay Agrawal, I wanna ask you about your video related to CFD programming that implementing Coding for Lid Driven Cavity. I am still confused till right now, how could you obtain the equation of pressure correction please give me an idea how to acquire it. Second question is do you implement SIMPLE Method or MAC (Marker and Cell) Method when you are trying to resolve your Lid Driven Cavity problem? Thank you, Sincerely, Bintang A.S.W.A.M
@MK-hw4td
@MK-hw4td 4 жыл бұрын
Thank you very much!! I have a question, by means of this method also can solve convection-diffusion problems? As I know, this method to solve variant velocity. So I'm curious how to apply to convection-diffusion problem.
@TanmayAgrawal7
@TanmayAgrawal7 4 жыл бұрын
Navier Stokes equation is indeed a type of convection diffusion equation with an added pressure difference term. The basic stencil/scheme that I have used is finite difference based, so it should work just fine.
@iamzed2009
@iamzed2009 7 жыл бұрын
dear tanmay i have given an assignment in which i have to write a c code for a expansion pipe. could u plz help me to how i decide the boundary conditions in this type of conditions. and thanks for this video too..
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
For cases such as pipes, you should have pressure conditions at the inlet and outlet and no-slip condition at walls, if I am not wrong.
@dineshkumarjain9644
@dineshkumarjain9644 4 жыл бұрын
Very nice Explaination...
@NizarPM
@NizarPM 4 жыл бұрын
Thank you for the video :) Do you have a C code for the projection method used in SOLA? or what all changes I have to make from the artificial compressibility method?
@TanmayAgrawal7
@TanmayAgrawal7 4 жыл бұрын
Sorry, no.
@mechdevus
@mechdevus 7 жыл бұрын
Thanks a lot for giving a clear explanation in coding , what are the parameters that i need to consider while iam going for a 3 d analysis of the same problem.
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
Nothing much should change, I have used the same parameters for a 3D solution as well.
@mechdevus
@mechdevus 7 жыл бұрын
Thank u..for reply sorry i just didnt get your second question..
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
I am sorry. That was in reply to another comment, not yours.
@mechdevus
@mechdevus 7 жыл бұрын
Is it possible for you to share a 3d code..
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
There you go: 1drv.ms/u/s!Ap1As21yR8unlrUovWt_8zgqT3Ms2g
@AhmedElsayed-ef3nl
@AhmedElsayed-ef3nl 7 жыл бұрын
Dear Tanmay, many thanks for sharing this excellent video. I wonder if there is a possibilty on making a video on coding turbulence models such as k -epsilon. many thanks
@rayenzanned8619
@rayenzanned8619 4 жыл бұрын
Hey, how can I display your code via matlab ?
@TanmayAgrawal7
@TanmayAgrawal7 4 жыл бұрын
If you mean writing the code in MATLAB, please go through my recent uploads where I cover this problem using two different methods/solvers in MATLAB.
@rayenzanned8619
@rayenzanned8619 4 жыл бұрын
@@TanmayAgrawal7 thank you for your fast answer. yes that i mean ok i I will look for it . Thank you for your Videos they are so useful to learn so many things about CFD
@farkachyounes2894
@farkachyounes2894 5 жыл бұрын
thank you so much Can I know the expression of stream function please , I am working on lid driven cavity, I found it in a fortran code that's equal psi(i,j)=psi(i,j-1)+rho*0.5*(u(i,j-1)+u(i,j)) but I don't know how the author find it ? and thank you again
@abdel-gq9po
@abdel-gq9po 4 жыл бұрын
I think this formula was taken from a Lattice-Boltzmann code where dx=dy=dt=1 and rho__0 =1. (1) u=d(psi)/dy & (2) v=-d(psi)/dx Applying (1) at y-dy/2 : d(psi)/dy = (psi(i,j)-psi(i,j-1))/dy and the u-velocity is averaged at this point u=0.5*(u(i,j-1)+u(i,j))
@prabirsikdar1901
@prabirsikdar1901 6 жыл бұрын
Thank you ,Tanmoy. Can you write a C coding for solving the lid driven cavity problem by using Lattice Boltzmann Method (LBM)?
@TanmayAgrawal7
@TanmayAgrawal7 6 жыл бұрын
Sorry I haven't done it with C. But with CUDA-C which is nothing but a parallel version of C but using GPUs instead of CPU. I can help you with that if you send it over to tanmayagrawal7@gmail.com
@hichamzakaria8620
@hichamzakaria8620 4 жыл бұрын
This is a very interesting tutorial, however I wonder why: (i) it becomes unstable when the grid size is increased for example 800 x 800 nodes ; (ii) what are the parameters that should be reset to keep it stable; (iii) and how to determine their values? Thank you for your great job, and best regards
@TanmayAgrawal7
@TanmayAgrawal7 4 жыл бұрын
Please read about CFL number, that is the key. For finer grids, you have to reduce the time step as well in order to get stable computations. How much to reduce? Again, CFL should be less than 1.
@hichamzakaria8620
@hichamzakaria8620 4 жыл бұрын
Thank you very much for the suggestion, and kind regards.
@rahulpushkarna2493
@rahulpushkarna2493 7 жыл бұрын
Hey, I've written a MATLAB code for pipe flow. But I'm getting v=0 everywhere. Can you help me with that? I can send you the code and you can have a look.
@haripriyanaidu7558
@haripriyanaidu7558 7 жыл бұрын
Hi, Nice and detailed video Tanmay. I am trying to implement your code in matlab. But, I am making some mistake somewhere. It is giving me a U matrix with very high values 10^139 or so range and the boundary values for the side with value of 1 are giving infinite and NaN values. Any comments on this? Thank you.
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
You need to debug your code. Probably some mistake somewhere. You can try mailing your code to me. Also, you can run your code with lid-velocity being zero and see what happens (if everything is fine, nothing would happen), but if you have something wrong, you'd still get NaN somewhere
@haripriyanaidu7558
@haripriyanaidu7558 7 жыл бұрын
thanks for the reply. I have mailed you the code. Even after changing it is still giving NaN, or it is not converging.
@jar1678
@jar1678 5 жыл бұрын
Great work !!
@nsd6297
@nsd6297 3 жыл бұрын
Where to run this code?
@manunamboo
@manunamboo 6 жыл бұрын
Thank you very much sir The document is not available on onedrive. Can you share once more.
@maxk4324
@maxk4324 6 жыл бұрын
Hi, a few quick questions, how did you determine the value of delta and what's it derived from? Also, are the values for pressure non dimensionalized here? How about velocity? If so how can I get them back into Pa and m/s respectively? Thanks in advance.
@TanmayAgrawal7
@TanmayAgrawal7 6 жыл бұрын
Delta in my opinion affects your convergence rate. There is some paper (I forgot the name) that talks a lot about the value of delta. Yes, I am solving the non-dim form of Navier-Stokes equations and therefore there has to be a velocity and pressure against which I am normalizing everything. Usually it is the lid-velocity and dynamic pressure therein.
@maxk4324
@maxk4324 6 жыл бұрын
@@TanmayAgrawal7 thank you for the reply. You did an excellent job explaining the staggered grid approach and the set up of this problem, it helped a lot in understanding CFD basics. I was wondering if you could do a follow up video where you apply the same staggered grid approach to something like a backwards facing step to demonstrate a wider variety of boundary conditions. Specifically inlet and outlet boundary conditions. Thank you and keep up the good work
@abdulganiyusalaudeen7640
@abdulganiyusalaudeen7640 4 жыл бұрын
Good day. Thanks alot .I used this method to validate a journal (mixed convection in a lid driven cavity) by R iwatsu et al. The contours look alike but my nusselt number were off .. could you the vid for me or share me some tips thanks in advance
@TanmayAgrawal7
@TanmayAgrawal7 4 жыл бұрын
I'll try, can you please send the paper to tanmayagrawal7@gmail.com
@abdulganiyusalaudeen7640
@abdulganiyusalaudeen7640 4 жыл бұрын
@@TanmayAgrawal7 thanks I have sent it .. salaudeen10@ymail.com
@abdulganiyusalaudeen7640
@abdulganiyusalaudeen7640 4 жыл бұрын
Any feedback
@muhammadusman7502
@muhammadusman7502 6 жыл бұрын
Hello How did you replace the kinematic viscosity "v" with 1/Re. in the code.
@TanmayAgrawal7
@TanmayAgrawal7 6 жыл бұрын
When we use normalised NS equations, the length and velocity scales are then unity.
@jinlaizhang312
@jinlaizhang312 6 жыл бұрын
what software are you used for solve acm.c?
@TanmayAgrawal7
@TanmayAgrawal7 6 жыл бұрын
You can use any C complier. I mostly used code blocks if I have a personal computer.
@8daudiolyrics576
@8daudiolyrics576 3 жыл бұрын
I'm a newbie in CFD coding....so I was facing some questions. First of all, I know Python and matlab better than C, so In that case, should I use, python or matlab? And if yes, then according to you, which one will be helpful in long run?? Idk if you will see my question, but if yes, pls reply as I'm in deep confusion!🙏
@TanmayAgrawal7
@TanmayAgrawal7 3 жыл бұрын
I would suggest Python since it's an open-source platform and have been growing rapidly with more versatility.
@8daudiolyrics576
@8daudiolyrics576 3 жыл бұрын
@@TanmayAgrawal7 thank u very much for the help!!
@varunbandreddy7961
@varunbandreddy7961 7 жыл бұрын
Hi Tanmay, thanks for this amazing video. Could you please describe on which numerical solving method you used to solve your discretized momentum equations, to get the new velocities. Thanks :)
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
It's a finite-difference based discretization of artificial compressibility equations.
@varunbandreddy7961
@varunbandreddy7961 7 жыл бұрын
Tanmay Agrawal I meant which methods are we using to solve the discretized equations, like in SIMPLE algorithm I used alternating direction implicit method for solving the equations, did you use something similar? like macCormack scheme?
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
I am using a second order accurate central differentiating for space and first order forward differencing in time. You can try to play around with different schemes. I have also used MacCormack scheme, it also works just fine.
@varunbandreddy7961
@varunbandreddy7961 7 жыл бұрын
Thanks a ton bro!! I have sent a few doubts of my to your LinkedIn profile, Could you please check them out and see if you could help me with those?
@muhammadusman7502
@muhammadusman7502 5 жыл бұрын
Can you any reference for the artificial compressibility equation used here.
@TanmayAgrawal7
@TanmayAgrawal7 5 жыл бұрын
www.sciencedirect.com/science/article/pii/002199916790037X
@muhammadusman7502
@muhammadusman7502 5 жыл бұрын
@@TanmayAgrawal7 Thank you dear,. finally can you give detail of du(square)/dx term using central difference scheme (2nd order accurate)
@TanmayAgrawal7
@TanmayAgrawal7 5 жыл бұрын
It’s given in the video :)
@riyaz677
@riyaz677 4 жыл бұрын
which tool did you used to compile the code ?, can You suggest me which one shall i use to run simple codes
@TanmayAgrawal7
@TanmayAgrawal7 4 жыл бұрын
I think you can use a compiler used to use called CodeBlocks.
@riyaz677
@riyaz677 4 жыл бұрын
@@TanmayAgrawal7 I used the code shared by you drive.google.com/file/d/1ApzJcjmLnecnrWRsFu5rcxLPyjQSaBjP/view, I am not abe to compile in codeblock, it is giving error while running it, D:\CFD code\Assignment3ACMTwoDim.exe Executing: '"C:\Program Files\CodeBlocks/cb_console_runner.exe" "D:\CFD code\Assignment3ACMTwoDim.exe"' (in 'D:\CFD code') Set variable: PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Softwares\Fortran95\g95\bin Process terminated with status 0 (1 minute(s), 25 second(s)) please help me to compile the code and check the results as you shown in your video. Thanks
@ahsannawaz3546
@ahsannawaz3546 6 жыл бұрын
For a channel flow past over a square obstacle, how this code would be. I don't know much about coding too but I have an assignment to do this. Could anyone of you help me? How boundary conditions should be changed for that?
@TanmayAgrawal7
@TanmayAgrawal7 6 жыл бұрын
If the grid points of obstacle boundary coincide with that of channel, it should be done with a no slip BC on those points. Otherwise you need to use interpolation to enforce that BC. Points inside the obstacle need not to be computed.
@sanjuprasad7967
@sanjuprasad7967 5 жыл бұрын
@@TanmayAgrawal7 please send me c code for the same. I have tried this problem a lot but I failed everytime. Hope that you will help me in overcoming this problem
@Sam-fy1nf
@Sam-fy1nf 7 жыл бұрын
Thank you very much for your videos. They are very very helpful. :) Instead of using artificial compressibility equation, can you make a tutorial on pressure correction method on this similar problem? Thanks!
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
Thank you for the comment. Yes, there are different methods you can use for the solution of incompressible NSE. Please visit the following github site for a variety of codes including pressure corrective SIMPLE method (in FORTRAN) github.com/xuaoxiqi/Computational-Fluid-Dynamics/tree/master/21.Lid%20Driven%20Cavity%20Flow I have used SIMPLE method (in C) a long time ago, I hope this is the working code: 1drv.ms/u/s!Ap1As21yR8unk5QuvtGYzUaQ69LpQw For more info, please refer to the book by Patankar, it is wonderful.
@Sam-fy1nf
@Sam-fy1nf 7 жыл бұрын
Thanks! I appreciate it. :)
@nonimek1781
@nonimek1781 8 жыл бұрын
HI Tanmay, AM RANA MECHANICAL ENG. M.SC CAN U HELP ME ABUT MY SEARCH NON-NEWTONIAN FLUID IN SIDE DUCT (SHAPE T) AM USING COMPAQ FORTRAN VISUAL AND F.V.M CFD MODEL PLEASE PLEASE HELP ME!THANX FOR U
@dhruvinshah5141
@dhruvinshah5141 5 жыл бұрын
@Tanmay Can you please provide MATLAB code for the same?
@TanmayAgrawal7
@TanmayAgrawal7 5 жыл бұрын
Sorry I have no MATLAB code. Please use the same logic or try to find on MATLAB file exchange.
@lelouch2076
@lelouch2076 8 жыл бұрын
Hi, one question on validation. If I were to do validation, how do i extract the results from the papers in the internet? Do i have to input the data 1 by 1 ?
@TanmayAgrawal7
@TanmayAgrawal7 8 жыл бұрын
Yeah, usually we make a separate data file for the exact result. Since we have already done that in our lab, you can simply grab them from here onedrive.live.com/redir?resid=A7CB47726DB3409D!313765&authkey=!AE30qncgAI8prAM&ithint=folder%2cdat
@lelouch2076
@lelouch2076 8 жыл бұрын
Thanks. I've open your files with MS Words. I'm not sure how to read them,There's 2 columns of values or I have to open with some software? May I ask if u're familiar with SIMPLE algorithm on the same problem in MATLAB?
@TanmayAgrawal7
@TanmayAgrawal7 8 жыл бұрын
I usually use Tecplot for reading the files. You can use Notepad++ to see the files. The two columns are the values of position along centerline and velocities. I don't use MATLAB much but I am sure this can help you math.mit.edu/~gs/cse/codes/mit18086_navierstokes.pdf
@lelouch2076
@lelouch2076 8 жыл бұрын
can you elaborate more on the values of position along centerline? what is it? thanks for the help :)
@TanmayAgrawal7
@TanmayAgrawal7 8 жыл бұрын
Usually, the data against which we validate is velocity vs position. That means for example, we will have the exact (or almost exact) values of u-velocity along the center-line (it could be x = 0.5 or y = 0.5). If our velocity profile along this line matches with that of benchmarks, we are good.
@souravsarkar8432
@souravsarkar8432 7 жыл бұрын
Hi Tanmoy.. It is a great work. Thank you. Can you please extend this tutorial for laminar pipe flow problem ?
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
+SOURAV SARKAR why don't you try it? It's simply change of boundary conditions. You can let pressure BC at inlet and outlet and no slip condition at walls. Should be fairly easy IMO :)
@souravsarkar8432
@souravsarkar8432 7 жыл бұрын
Thank you Tanmoy!! I am currently struggling with that. I am having problem with implementing boundary conditions. I am specifying inlet velocity at inlet and outlet pressure at outlet. I am also giving no slip condition at the walls. Still It is not working. I have some specific doubts. 1. What will the B.C for v velocity? 2. What will be the pressure B.C for those top and bottom ghost pressure nodes ? Can you please comment and suggest what further can be done. Thank you for responding..
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
1. V-velocity is zero at all the walls. Saying that, it means that pressure across top and bottom ghost pressure nodes would be the same (therefore ensuring no flow). I will recommend you to define pressure at the inlet rather than the velocity because it is pressure driven flow and defining velocity at the inlet beforehand is a bit ambiguous. And my name is spelled as Tanmay.
@b.mallick5905
@b.mallick5905 4 жыл бұрын
Is it possible to generate a semi-circular region using finite difference method? What will be the coding for solving NS Equation in that region. I will be thankful to you if you can help.
@TanmayAgrawal7
@TanmayAgrawal7 4 жыл бұрын
You'll need an understanding of writing NS equations in cylindrical co-ordinate and then solve them using FD
@guilhermemenezes3185
@guilhermemenezes3185 4 жыл бұрын
Very useful video. Can you share your code?
@AmrendraBittuKumar
@AmrendraBittuKumar 5 жыл бұрын
Hello Tanmay sir. Thank you for this nice video. I learned a lot from this. By changing delta and dt, I was able to validate upto Re 5000. But when I applied the same for Natural conversation. My solution is diverging. Could you please help?? Or tell me about the delta and dt values for Ra 10^3- 10^6 range. Thank you.
@TanmayAgrawal7
@TanmayAgrawal7 5 жыл бұрын
I haven't used it for such case, unfortunately. Please see if there is any work using this scheme in the existing literature.
@yashwantmoharil5892
@yashwantmoharil5892 3 жыл бұрын
@amarendra kumar what we're the values of dt and delta you took?
@MsDeepaknigam
@MsDeepaknigam 7 жыл бұрын
thanks a lot
@gauravsinghal1320
@gauravsinghal1320 6 жыл бұрын
a code is expired. can you provide fresh link for your code, please?
@TanmayAgrawal7
@TanmayAgrawal7 6 жыл бұрын
Hi, in the meantime you can use this. This is more general (for a rectagular cavity). If you wish to use it for square, set gridheight as the same value as grid. Hope that would help drive.google.com/file/d/1ApzJcjmLnecnrWRsFu5rcxLPyjQSaBjP/view?usp=sharing
@mayurpatil6249
@mayurpatil6249 3 жыл бұрын
Hello, Thnks for the video...i try to solve laplace equation using iterative method... AX=B.......X is the output which is 1D....single colomn vector how should i plot ouput for ??
@TanmayAgrawal7
@TanmayAgrawal7 3 жыл бұрын
Shouldn't you simply use the plot command for a 1D data, if you're working in MATLAB? That should work fine.
@mayurpatil6249
@mayurpatil6249 3 жыл бұрын
@@TanmayAgrawal7 thanks for reply...I am writing in C. In fprintf command what should i put....xpos, ypos, X(j) is enough?
@TanmayAgrawal7
@TanmayAgrawal7 3 жыл бұрын
@@mayurpatil6249 I don't think you would have both xpos and ypos for a 1D case.
@mayurpatil6249
@mayurpatil6249 3 жыл бұрын
@@TanmayAgrawal7 actually problem 2D Laplace equation, but in AX=B .... X is row vector....for result plotting which parameters to be considered in fprintf cammand?
@TanmayAgrawal7
@TanmayAgrawal7 3 жыл бұрын
@@mayurpatil6249 Then you should plot 2D data. Convery your 1D data into 2D by the same kind of conversion you have done to create that X vector. Hope that helps, good luck.
@AshokKBarik
@AshokKBarik 3 жыл бұрын
Code is not clearly visible.
@yogeshnalam1950
@yogeshnalam1950 3 жыл бұрын
A very basic question. You have defined u[7][8]. Should it not be u[8][7]. because in C, it is [rows][columns]. Please clarify this. TIA
@yogeshnalam1950
@yogeshnalam1950 3 жыл бұрын
Anyone? Are the arrays defined correctly? Ii think it works here since it is a square domain.
@hyperactivenaruto
@hyperactivenaruto 4 жыл бұрын
Tanmay can u send me the pdf of this paper. i can't access this pdf.
@TanmayAgrawal7
@TanmayAgrawal7 4 жыл бұрын
Please look up Ghia Lid Driven Cavity on Google. I think the paper was published in 1982.
@hyperactivenaruto
@hyperactivenaruto 4 жыл бұрын
@@TanmayAgrawal7 thank you i got the paper and can u please explain how to do the validation it will help me a lot.
@TanmayAgrawal7
@TanmayAgrawal7 4 жыл бұрын
There's a data in tabular format for u(y) and v(x). You need to use that.
@hyperactivenaruto
@hyperactivenaruto 4 жыл бұрын
@@TanmayAgrawal7 do we need to change u or mu for Re?
@TanmayAgrawal7
@TanmayAgrawal7 4 жыл бұрын
The properties are non dimensionalised. As long as you have same Re, no need change anything.
@axpact
@axpact 7 жыл бұрын
how did you get delta is 4.5?
@TanmayAgrawal7
@TanmayAgrawal7 7 жыл бұрын
Just some number I have chosen. Mainly, it affects the convergence.
@nsd6297
@nsd6297 3 жыл бұрын
Plz help me to run this code ....,
@TanmayAgrawal7
@TanmayAgrawal7 3 жыл бұрын
Can you email me the code on tanmayagrawal7@gmail.com
@nsd6297
@nsd6297 3 жыл бұрын
@@TanmayAgrawal7 sir it's my first code and I written same code in c++.
@Master-sq2xp
@Master-sq2xp 5 жыл бұрын
Hey, here how the error is being calculated
@TanmayAgrawal7
@TanmayAgrawal7 4 жыл бұрын
It's based on different kind of residuals i.e. continuity equation, momentum equation etc.
$1 vs $500,000 Plane Ticket!
12:20
MrBeast
Рет қаралды 122 МЛН
Жездуха 42-серия
29:26
Million Show
Рет қаралды 2,6 МЛН
Ozoda - Alamlar (Official Video 2023)
6:22
Ozoda Official
Рет қаралды 10 МЛН
$1 vs $500,000 Plane Ticket!
12:20
MrBeast
Рет қаралды 122 МЛН