CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Solution converged differently (https://www.cfd-online.com/Forums/main/190708-solution-converged-differently.html)

aviral2000 July 20, 2017 08:19

Solution converged differently
 
Hi everyone,

I am beginner in field of development of CFD codes. I was trying out the example given in "A introduction to Computational Fluid Dynamic" by Versteeg and Malalasekra. I made a python code for a 2D heat transfer solver using TDMA approach. I started by directly entering the values given in the example ( will do the derivation of the coefficients from system parameters later). In the solution given in the book, my first iteration result is matching, however my converged solution is completely different. It would be great if someone could advise me on where I could have gone wrong or how to improve the solution?

FMDenaro July 20, 2017 11:15

Quote:

Originally Posted by aviral2000 (Post 657787)
Hi everyone,

I am beginner in field of development of CFD codes. I was trying out the example given in "A introduction to Computational Fluid Dynamic" by Versteeg and Malalasekra. I made a python code for a 2D heat transfer solver using TDMA approach. I started by directly entering the values given in the example ( will do the derivation of the coefficients from system parameters later). In the solution given in the book, my first iteration result is matching, however my converged solution is completely different. It would be great if someone could advise me on where I could have gone wrong or how to improve the solution?


Check you program, it is likely you have some error. Furthermore, I suggest to post the plot of you solution.

aviral2000 July 20, 2017 13:32

Thanks for your reply. I rechecked my program, and I found that I made a mistake while defining the coefficient matrix. The problem is solved, thank you. Can you tell me about some open source codes in python which I could consult to accelerate my learning process?

Thank you :D :D

mprinkey July 20, 2017 19:38

Quote:

Originally Posted by aviral2000 (Post 657827)
Thanks for your reply. I rechecked my program, and I found that I made a mistake while defining the coefficient matrix. The problem is solved, thank you. Can you tell me about some open source codes in python which I could consult to accelerate my learning process?

Thank you :D :D

I've posted this here many times before, but this is a great way to get started with CFD using Python:

http://lorenabarba.com/blog/cfd-pyth...navier-stokes/

aviral2000 July 21, 2017 01:23

Thanks for this link. I have gone through it earlier, it's too basic. I am able to code more complex codes by myself. I wanted to get hold any easy to understand 2-D navier stokes solver solving structured grid (not very simple geometry like in the link you posted) or with unstructured grid.
Thanks :)


All times are GMT -4. The time now is 13:20.