Convection-diffusion energy equation with specified heat transfer
1 Attachment(s)
Dear colleagues.
I've been struggling with this problem for quite some time. I appreciate any help! I'm trying to find the temperature distribution between two parallel plates. The heat transfer in the plates is specified and known. I'm showing the version solved for 0<x<L, 0<y<H I'm using the turbulent expression: U(y)dT/dx=d/dy[(alfa+alfa_t(y))dT/dy] Where U(y) and alfa_t(y) are known functions. I'm using the Van Driest Eq. for the alfa_t(y). The BC's are for T(x,y): T(0,y)=T_0; dT/dy(x,0)=0; dT/dy(x,H)=q_0/k; I wrote a code on MATLAB as follows. Code:
%SS Temperature profile with convection in the x-direction Does anyone spot a mistake? Or any suggestions of what I should do? I really appreciate any help. |
Try smaller dt than what you are using, it may happen that you time step size is much larger than what shall be.
|
What scheme are you using?
Also, how did you get the "ANSYS" reference solution? I'm pretty sure it's not straightforward at all, given the velocity profile you are using. Finally, with prescribed velocity you could just solve a single linear system once, instead of iterating. |
Error limit
Hello, have you tried to take the error limit like err=10^-10, sometimes, even though the error is so small you can encounter an nonconvergent solution when you check a property such as temperature in your case. In my study I am working on my CFD code (which is very simplific). I check the residuals (sum of the errors in each cell), and I can see even 10^-4 residual can cause my flow field change as the number of iterations incerases.
Regards |
Not directly related to the issue but, if you don't want to go implicit, at least precompute the whole alfa, no need to do that in a loop.
|
Quote:
Yeah, you are right, I can solve for the alfa's outside of the loop. Thanks man! |
Quote:
|
Quote:
|
Also, I'm pretty sure that there is no turbulence model similar to the VanDriest one in any ANSYS CFD product (yet, SA might sometime resemble it). So, you are definitely not solving the same problem as in ANSYS.
So, before attempting this, I would definitely first try an equivalent laminar problem, with parabolic velocity profile and no alpha_t |
Quote:
I was wondering if I should have included the alfa*dT^2/dx^2 in the PDE. But that would require one more BC and I don't think I can provide one more. |
Without knowing, exactly, which scheme you are using and how the case was setup in Fluent, it's impossible to help.
For example, I now seem to understand that you used the x direction as a sort of (pseudo)time? If this is the case, and you're not really interested in the x evolution, you are doing this all wrong. You would just need a single TDMA solve (1D). So, may I ask what you want to achieve and from what input (what started you doing this in the first place)? |
Quote:
I'm looking for the temperature profile between two parallel plates T(x,y). This is basically simulating the test section of a 2D wind tunnel which is being heated, where I know what are the conditions at the inlet (velocity and temperature). Do you think I might be solving the wrong eq.? I'm not interested in the transient, only in the steady-state. I really appreciate your time, thanks for trying to understand. |
I don't understand your case, if T=T(y) the the LHS of your equation is simply zero and you have a standard tridiagonal system to solve in an exact way.
|
Quote:
Answering your questions: I'm using finite volume method. I'm doing exactly as you said. By using your approach another boundary condition is needed (as you mentioned). I tried saying that dT/dx=0 at x=L but it turned out that the maximum temperature was higher than expected. By using the conservation of energy, the average temperature at the exit must be: T(L, AVERAGE)=T_0+q_0*L/mC_p. Where m is the mass flow rate. I'm getting an average temperature much higher than that at the outlet. I guess it's because of the BC at the exit. You said I could also extrapolate it. How could I do that?? Thanks a lot for your help. |
Well, as you actually have velocity and temperature profiles, the definition is not exactly that one for the average temlerature at outlet. You have that the difference between the mass averaged temperatures is q/Cp, but the velocity has to be included in the integrals of T.
Besides this, a FV approach simply requires: 1) U and T at inlet, that you know from the profiles. These enter directly in the convective term and T can be used for the diffusion term with dT/dx = [T(1,j)-Tinlet]/(dx/2) 2) Set 0 (don't set it at all) for the diffusion term at outlet. This is the extrapolation (to 1st order), assuming that Toutlet(j) = T(nx,j) so that the strramwise diffusion term turns out to be 0 |
All times are GMT -4. The time now is 16:47. |