|
[Sponsors] |
how to use finite volume method to find out the heat distribution in a tapered cylind |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 28, 2018, 12:03 |
zzzzzzzzz
|
#1 |
New Member
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0 |
zzzzzzzzzzz
Last edited by rajan777; January 14, 2019 at 14:44. |
|
December 28, 2018, 13:00 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,747
Rep Power: 66 |
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. |
|
December 28, 2018, 18:53 |
|
#3 |
New Member
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0 |
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 ? |
|
December 28, 2018, 19:38 |
|
#4 |
Senior Member
Lane Carasik
Join Date: Aug 2014
Posts: 692
Rep Power: 15 |
Is this a homework forum? rajan777 hasn't even made an attempt at this problem.
|
|
December 28, 2018, 22:44 |
|
#5 |
New Member
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0 |
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. |
|
January 1, 2019, 13:26 |
|
#6 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,747
Rep Power: 66 |
Good job. Yes you were supposed to use the divergence theorem. That's what makes FVM work. =)
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? |
|
January 2, 2019, 16:43 |
|
#7 |
New Member
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0 |
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 |
|
January 3, 2019, 02:26 |
|
#8 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,747
Rep Power: 66 |
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. |
|
January 3, 2019, 11:12 |
|
#9 |
New Member
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0 |
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 |
|
January 4, 2019, 11:35 |
|
#10 |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 |
This book has a derivation in 1D for tappered cylinder:
Günter P. Merker Christian Schwarz Rüdiger Teichmann Combustion Engines Development |
|
January 4, 2019, 14:43 |
|
#11 | |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,747
Rep Power: 66 |
Quote:
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. |
||
January 7, 2019, 17:47 |
|
#12 |
New Member
Pikachu
Join Date: Dec 2018
Posts: 6
Rep Power: 0 |
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 |
|
January 8, 2019, 19:25 |
|
#13 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,747
Rep Power: 66 |
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. |
|
Tags |
finite volume method, tapered cylinder |
|
|
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 |