CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

CFD(FVM) Code of the problem

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 1 Post By ramakant
  • 1 Post By mprinkey
  • 3 Post By arjun
  • 2 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2016, 02:25
Default CFD(FVM) Code of the problem
  #1
Senior Member
 
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 130
Rep Power: 16
ramakant is on a distinguished road
Dear all

I need this CFD code of the given problem.If anybody CFD code of the problem please try to share with me.
my e-mail id:ramakantgadhewal@gmail.com
Thank you

With Best Regards

Ramakant Garhewal
Attached Images
File Type: jpg Problem.jpg (176.8 KB, 28 views)
thickglass likes this.
ramakant is offline   Reply With Quote

Old   November 7, 2016, 07:31
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
We don't do homework problems? Most of us already have done them--all of them. Several of us *assign* them to students. If you have a specific question about how to write your own code, please ask. But there are no shortcuts to learning this topic--you have to do it yourself.
FMDenaro likes this.
mprinkey is offline   Reply With Quote

Old   November 7, 2016, 10:19
Default
  #3
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by mprinkey View Post
We don't do homework problems? Most of us already have done them--all of them. Several of us *assign* them to students. If you have a specific question about how to write your own code, please ask. But there are no shortcuts to learning this topic--you have to do it yourself.

What he said plus if you want hint look into patankar's book or malalasekera's book. They have worked example all you need to do is code it.

Try it is not difficult and plus what you will learn will stay with you a long time. There is no learning like learning by doing.
mprinkey, ramakant and FMDenaro like this.
arjun is offline   Reply With Quote

Old   November 7, 2016, 13:52
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I echo the sentiments above.

This isn't even a Fluent problem. If done in Fluent you would be solving the heat diffusion equation and not the fin equation. It's also a really simple problem and is really great for learning the FVM technique. I admit I did not appreciate how FVM works until I did it myself. This is a really simple problem! 1D steady fin equation. It can hardly get much easier than this. This is also a very robust problem, it's extremely well-behaved and numerically stable.

It doesn't even require a complicated code.

Just discretize the governing equation in the FVM sense. Integrate the governing equation over a control volume, use the Divergence Theorem to convert the volume integral of a divergence term into a surface integral of fluxes. Then discretize the temperature gradient at the faces using your favorite discretization scheme (backward differencing, forward differencing, central differencing). Do this for all cells~

Notice the pattern! All the interior cells will have the same structure. The boundary cells will have slightly different terms. i.e. you only need to do the left, right, and one interior cell to recognize the pattern. If you are not imaginative, then you might need to do it for all cells.

Setup the linear system of equations (writing it in matrix form can help the pattern fall out). If you use central differencing, you'll get a tri-diagonal system. Then it's just a matter of solving the system of linear equations (inverting the matrix). Tri-diagonal algorithm works wonders. Matrix form just helps to visualize, if you can solve it without going into matrices, then kudos.

This final step, solving the system of linear equations is what needs to be coded. You basically need to write a code that systematically assembles the coefficient matrix and then solve it.

If you have trouble, just do it on the simplest case with only 3 cells (the left boundary, 1 interior cell, and the right boundary cell). Hopefully you can invert a 3x3 matrix (or can solve a linear system of 3 equations with constant coefficients). You just need to codifiy this procedure for however many cells you need.
ramakant and fresty like this.
LuckyTran is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
code for SIMPLE algorithm - 2D Lid driven cavity flow problem - Collocated grid h_amooie OpenFOAM Programming & Development 1 January 22, 2022 11:33
custom code compilation error: library linking problem nadine OpenFOAM Programming & Development 5 October 10, 2014 09:58
Problem in k-eps turbulence code in complex geometry sontukaku Main CFD Forum 2 December 28, 2010 00:44
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 15:56
What is the Better Way to Do CFD? John C. Chien Main CFD Forum 54 April 23, 2001 08:10


All times are GMT -4. The time now is 06:03.