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

how to use finite volume method to find out the heat distribution in a tapered cylind

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 28, 2018, 12:03
Default zzzzzzzzz
  #1
New Member
 
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0
rajan777 is on a distinguished road
zzzzzzzzzzz

Last edited by rajan777; January 14, 2019 at 14:44.
rajan777 is offline   Reply With Quote

Old   December 28, 2018, 13:00
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I think 25 degrees is the initial temperature. If 25 is not the initial temperature, then you need to go ask somebody (whoever assigned you this task) what is the initial temperature.

The coding part is probably the easiest part. The variable cross-sectional area is not that bad if you methodically apply the FVM principle.

1) On pen-and-paper, you need to sketch your grid and come up with all the little control volumes that you'll be applying. Set this aside for a little bit.
2) Write down the governing equation (the heat equation in this case)

3) Apply the finite volume method.
3a)That is, integrate the governing equation over the control volumes you drew. Do it for an interior cell (not a boundary adjacent one).
3b) Apply the Gauss-Divergence theorem to convert volume integrals of divergences into surface integrals of fluxes


4) Decide on and apply your temporal and spatial discretization to each term that needs to be discretized (anything that isn't a simple temperature). It's heat equation so forward Euler and central differencing is a good idea. Another hint is that the face fluxes need to be determined. Here is where your face areas will stick around and where it helps (but only a little bit) to have that picture from step 1.

5) Re-arrange terms, put everything at the new time on one side and everything at the old time on the other side. Up to here you have figured how to calculate the new temperature for the interior cells.

6) Repeat steps 4 and 5 for the boundary adjacent cells. The only difference is you have hard constraints on the face temperatures for the boundaries.

7) Hopefully, from doing steps 1-6 you notice a general pattern that allows it to be solved conveniently. Now you have an equation that looks like [Tnew]=[A][Told]. Code this in a matlab for or while loop and crank it out.

90% of the work is in steps 1-6.

Or you can cheat and beg someone for their code and skip the entire learning process.

How long to reach steady state? Mathematically this occurs at time = infinity. You need define steady state and the time can be determined from inspection of the solution that you cranked out with your code.
LuckyTran is offline   Reply With Quote

Old   December 28, 2018, 18:53
Default
  #3
New Member
 
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0
rajan777 is on a distinguished road
hello @luckytran,
Can you please explain steps 3 and 4 with more details?
can you explain how to convert volume integrals to surface integrals?
how to apply Temporal and spatial discretization?
how to calculate face flux ?
rajan777 is offline   Reply With Quote

Old   December 28, 2018, 19:38
Default
  #4
Senior Member
 
Lane Carasik
Join Date: Aug 2014
Posts: 692
Rep Power: 15
lcarasik is on a distinguished road
Is this a homework forum? rajan777 hasn't even made an attempt at this problem.
lcarasik is offline   Reply With Quote

Old   December 28, 2018, 22:44
Default
  #5
New Member
 
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0
rajan777 is on a distinguished road
hello @LuckyTran,
I have formed some equations by following your instructions which are shown in images below. Please review them and let me know if they are correct.
I still couldn't find a way to determine face fluxes.
Attached Images
File Type: jpg IMG_20181229_023051.jpg (33.4 KB, 31 views)
File Type: jpg IMG_20181229_023140.jpg (36.0 KB, 30 views)
File Type: jpg IMG_20181229_023201.jpg (35.8 KB, 27 views)
File Type: jpg IMG_20181229_023234.jpg (34.8 KB, 33 views)
rajan777 is offline   Reply With Quote

Old   January 1, 2019, 13:26
Default
  #6
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Good job. Yes you were supposed to use the divergence theorem. That's what makes FVM work. =)

Quote:
Originally Posted by rajan777 View Post
I still couldn't find a way to determine face fluxes.
The face fluxes you discretized apparently using a central difference scheme when you did (TL-T1) / deltax and so on. Notice that after you do this, you have only cell temperatures and boundary conditions. That's how you know you've done it right.

If this was a steady heat equation you would've been done. But you need to go back to step 2 and add the transient term dT/dt and also integrate it. And also discretize it. Hint: you are told to use an explicit time-stepping. Now when you discretize any temperatures you will have temperatures at old time steps and next time-steps. E.g. T1 at old time or T1 at new time (and T2 at old and new, and T3 at old and new and so on). This makes a lot more terms show up but just keep track of them.


Btw I noticed you did this in 1D. Is it 1D or 2D?
LuckyTran is offline   Reply With Quote

Old   January 2, 2019, 16:43
Default
  #7
New Member
 
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0
rajan777 is on a distinguished road
Hello LuckyTran,
It seems when I calculate temperatures for middle cells(not adjacent to boundary) I am getting the same temperature for each time increment. i.e. 25 degrees which is initial temperature.
I think i need to calculate all cell temperatures for 1st time increment and then use those temperatures to calculate new temperature again.(or is this where matlab comes into play??)
image shows dT/dt discretization is it correct??
IMG_20190102_203701.jpg
rajan777 is offline   Reply With Quote

Old   January 3, 2019, 02:26
Default
  #8
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You are too smart for your own good. Just slow down and do it systematically. Like I said, 90% of the work is in this analytical derivation. You are skipping steps in hopes that it gets you to an answer faster and here you are still...

You should have written down the complete governing equation first. Your governing equation is not dT/dt. That's just a term. dT/dt must be equal to something... That's why it's called a governing equation, not a governing term. You are integrating dT/dt and the laplacian without realizing how they all fit together. I.e. integrate dT/dt = dT^2/dx2. Or dT/dt = div(dT/dx). Don't just integrate dT/dt and then integrate div(dT/dx).

When you discretize dT/dt in time, you also need to discretize the face fluxes also in time. You are told to use an explicit time-stepping scheme so take the face fluxes at the old time (at time = j). And then you can apply your spatial discretization onto the fluxes at j.

Once you have the (analytical) equation for all the T's at all i's but only at j+1 written completely in terms of a bunch of T's at all i's but only at j's, then you go to matlab and march it forward in time.
LuckyTran is offline   Reply With Quote

Old   January 3, 2019, 11:12
Default
  #9
New Member
 
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0
rajan777 is on a distinguished road
Hello LuckTran Sir,
Please see my updated work for the cell 1 which is near the boundary


IMG_20190103_150546.jpg
IMG_20190103_150556.jpg
rajan777 is offline   Reply With Quote

Old   January 4, 2019, 11:35
Default
  #10
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,290
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
This book has a derivation in 1D for tappered cylinder:




Günter P. Merker  Christian Schwarz
Rüdiger Teichmann





Combustion Engines Development
arjun is offline   Reply With Quote

Old   January 4, 2019, 14:43
Default
  #11
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by rajan777 View Post
Hello LuckTran Sir,
Please see my updated work for the cell 1 which is near the boundary

Looking good. Now you've almost got it!


You almost found your own mistake for why there is a missing area... When you integrated the governing, you skipped a step or didn't show all your work. You were supposed to integrate over the control volume V, but you forgot to write the integrand differential dV. The dV on the RHS turned into a dA thanks to divergence theorem but the dV on the dT/dt stays. In your case the dV integrated over V becomes the area of trapezoidal shape (because your control volume is more like a control area). So first cell 1, your dV would be something like (A12+AL)/2*dx


Once you correct this, and do the same for the remaining cells, then you can crank it in matlab.

Last edited by LuckyTran; January 8, 2019 at 19:12.
LuckyTran is offline   Reply With Quote

Old   January 7, 2019, 17:47
Default
  #12
New Member
 
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0
rajan777 is on a distinguished road
Hello luckytran,
Please see my latest work.


IMG_20190105_002250.jpg

IMG_20190105_002307.jpg

IMG_20190105_002320.jpg

IMG_20190105_002330.jpg

IMG_20190105_022557.jpg
rajan777 is offline   Reply With Quote

Old   January 8, 2019, 19:25
Default
  #13
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I don't know what you're showing here that is different than before and what you hope me to do with it?

On the left-hand-side there is also the cell-volume (which is degenerated into an area) which is a trapezoidal shape. For the first cell for example: V1 = (AL+A12)/2*dx. You took V1 = A1*dx. Where did this come from...? Show your work... It looks like you just wanted to shove some symbols in there. You also need to clarify what A1 is. If A1 the line-area then you have chosen a somewhat poor estimate for the cell volume, you know exactly what that volume is, no need to discretize and estimate it.

Note: My A12 is the face-area between cells 1 and 2. Once the grid/mesh has been determined, you can calculate exactly what is A12, A23, A34, etc beforehand. E.g.: A12 = AL+(AR-AL)/L*dx, where L is 20 cm. This only needs to be calculated once, so you can presume it to be known beforehand. I.e. A12 is a known constant after you tell me what dx is.

Anyway, I don't really have more to contribute on this topic. Read everything again carefully if you're unsure.

I would have gotten really excited to see you cleanly derive the FVM system by multiplying both sides of the governing equation by dV and then integrating over V. But oh well... I guess it is pain in some parts of your body to do so.
LuckyTran is offline   Reply With Quote

Reply

Tags
finite volume method, tapered cylinder


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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 18:22
Vertex centred Finite Volume Method Jibran OpenFOAM Programming & Development 0 January 26, 2017 07:40
Control volume based finite difference method? mukut.medhi Main CFD Forum 3 August 24, 2012 11:01
ALE in finite volume method littlelz Main CFD Forum 5 June 21, 2003 13:50
tidal flow simulation using finite volume method Jason Qiu Main CFD Forum 0 October 20, 2002 03:34


All times are GMT -4. The time now is 11:40.