
[Sponsors] 
March 31, 2010, 13:09 
uniform heating of fluid region

#1 
Member
santhosh
Join Date: Apr 2009
Location: pune, India
Posts: 67
Rep Power: 8 
Hi,
I am using bousinesqBuoyantSimpleFoam to model a heat exchager. I would like to give uniform heating to whole fluid region as a source term (volumetric heating in W/m^3). Can anybody suggest me how to do this in OpenFOAM. Regards Santhosh. 

April 5, 2010, 06:29 
Doubt regd TEqn.H

#2 
Member
santhosh
Join Date: Apr 2009
Location: pune, India
Posts: 67
Rep Power: 8 
I am looking at the TEqn.H in boussinesqBuoyantSimepleFoam. following is snippet copied from the above file.
Code:
fvScalarMatrix TEqn ( fvm::div(phi, T)  fvm::Sp(fvc::div(phi), T)  fvm::laplacian(kappaEff, T) ); Code:
fvm::Sp(fvc::div(phi), T) Code:
div(sV) = sdiv(V)+V.grad(s) Combination of first two terms will results in the following, Code:
phi.gradT Regards Santhosh. 

April 6, 2010, 06:52 

#3 
Member
santhosh
Join Date: Apr 2009
Location: pune, India
Posts: 67
Rep Power: 8 
I have added the source term in the TEqn.H as below.
Code:
fvScalarMatrix TEqn ( fvm::div(phi, T)  fvm::Sp(fvc::div(phi), T)  fvm::laplacian(kappaEff, T)  Q/(rho0*cp0) ); I will post back if there is any other alternative. Regards Santhosh 

April 7, 2010, 11:09 

#4 
New Member
Oli
Join Date: Apr 2009
Posts: 27
Rep Power: 8 
That sounds interesting.
Please let us know, if you have some results. Regards. 

May 11, 2010, 01:10 

#5 
Member
santhosh
Join Date: Apr 2009
Location: pune, India
Posts: 67
Rep Power: 8 
Hi Oli,
That seems to be working, I am solving very big heat exchanged problem, As for as residuals and priliminary results I am not facing any major problem (Compared to the one without source terms). The only thing I am worried about is Eugene's following post.. http://www.cfdonline.com/Forums/ope...newpost.html I am also finding many problems with these set of solvers, especially convergence of Temperature is very very slow. forget about second order results (Remember I am a novice user still, and I think I am continue to be novice as long as openfoam does not provide documentation) I am doing lot of parametric study (Thanks to my organization for proving me the infinite compute power on world's faster super computer, EKA) Regards Santhosh 

May 11, 2010, 01:50 
Sensitivity of Turbulent prandtl number

#6 
Member
santhosh
Join Date: Apr 2009
Location: pune, India
Posts: 67
Rep Power: 8 
Hi,
Please look at the residual file attached here, Unknowingly I initially used the turbulent Prandtl number (Prt) equals 5. After reading the documentation I came to know Prt is used as a contribution to production term in turbulent kinetic energy equation. Also for ke model it has to be aroung 0.85. So I changed the value of Prt to 0.8 from 5. I observed lot of variation in residue plots. In the attached plot, sensitivity with viscosity (which I changed matching experimental) and Prt. The results are similar in case of variation of viscosity (although very little change). But with variation of Prt I found completely different residual. I am using upwind numerical schemes for interpolation. Please can anybody through a light on the use of Prt. Is it okey to use Prt=5 if not can you suggest chages to get residual down. I have observed simular variation in residual for other parameteers also. Thanks Santhosh 

June 28, 2010, 10:58 

#7 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12 
Hi Santhos,
I am new on heat transfer problems using cfd and I would like to model a constant volume heat generation, following the approach you proposed, since it seems to me that there is no already implemented function to model it in OF. Before starting, I would like to know it you have some results showing that this is a good approach, i.e. cfd matches with experimental results. regards, mad 

June 29, 2010, 06:14 

#8 
Member
santhosh
Join Date: Apr 2009
Location: pune, India
Posts: 67
Rep Power: 8 
Hi,
I have added source term as I have mentioned above. I have even completed one test case with the modified solver. But unfortunately, I have not compared the results with the any benchmark case. Qualitatively It seemed OK to me. If you find any benchmark cases to test it, please let me know, and I am happy to test it for you. Regards, Santhosh 

July 16, 2010, 11:17 

#9 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12 
Hi Santhosh,
finally I included the heat source contribution on chtMRFoam, as you suggested above. However, as explained here, the new solver gives acceptable values only if I use a single region. In the case of multiple region, of which only one is heated, the solver does not perform well. I am thinking that this may be due to the coupling between the regions. Have you any experience in that? Any suggestion is welcome. Regards, mad 

July 19, 2010, 10:53 
adding term in solidWallMixedTemperatureCoupled

#10 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12 
Hi all,
trying to find an explanation on the strange results of my cht simulation including heat source, I ended up with the following: solidWallMixedTemperatureCoupled in OF 1.6.x and 1.7 implements a coupling that differs from OF 1.6 and previous. In OF 1.6 (code): Code:
forAll(*this, i) { // if outgoing flux use fixed value. if (normalGradient()[i] < 0.0) { this>refValue()[i] = operator[](i); this>refGrad()[i] = 0.0; // not used this>valueFraction()[i] = 1.0; nFixed++; } else { this>refValue()[i] = 0.0; // not used this>refGrad()[i] = normalGradient()[i]; this>valueFraction()[i] = 0.0; } } Code:
this>refValue() = nbrIntFld; this>refGrad() = 0.0; this>valueFraction() = nbrKDelta / (nbrKDelta + myKDelta()); My doubts raise when applying a heat source. The 1D steady state conduction equation + heat source says that: dT2/dx2 + H/K = 0. Integrating once gives dT/dx  H/K*x = 0. It means that, in the case of an heat source refGrad is not equal to zero, but it is proportional to the heat souce itself. For this reason, I am thinking to modify the solidWallMixedTemperatureCoupled to include this contribution as well. K is already read into solidWallMixedTemperatureCoupled.C, and I can easily modify the solver to read H as well. What I am missing is how to get the size of the cell normally to the coupling interface. Is there anyone that can confirm my approach? anyone that can help me to understand how to get the cell size? thanks in advance from any suggestion I may get. cheers, mad 

September 12, 2011, 10:41 

#11  
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 152
Rep Power: 6 
Hey Santhosh,
Quote:
I think I am now able to answer the question. Basically we have the term d/dxj (rho * u_j * T) which includes the density. This term goes to d/dxj (rho * u_j * T) = rho * d/d_xj ( u_j * T) + u_j* T * d rho /dxj The first term equals to HTML Code:
fvm::div(phi, T) From the continuity equation we know d/dxj (rho * uj)=0 According to product rule d/dxj (rho * uj ) = uj * d rho/dxj + rho * duj/dxj =0 and therefore uj * d rho / dxj =  rho * duj/dxj Therefore the second term becomes u_j* T * d rho /dxj =  T * rho * duj/dxj Which is in OF the term HTML Code:
fvm::SuSp(fvc::div(phi), T) The additional term is zero for incompressible flows. 

September 12, 2011, 23:44 

#12 
Member
santhosh
Join Date: Apr 2009
Location: pune, India
Posts: 67
Rep Power: 8 
Thanks for your effort in neatly explaining. Actually a while ago, My professor cleared my doubt about post. Sorry I forgot to post it back to forum. The explanation was similar to the one you explained.
Thanks again Santhosh 

September 18, 2013, 04:02 
some error

#13  
Member
Himanshu Sharma
Join Date: Jul 2012
Posts: 81
Rep Power: 4 
Quote:
I used user idea for building the source term in my solver and i specify Q as volumetric heat source dimension my solver is compiling properly but when i am using the solver it is giving me some kind of dimension error i am not able to debug it if you can help. Code:
Different dimensions for = dimensions : [0 2 1 0 0 0 0] = [0 4 3 0 0 0 0] From function dimensionSet::operator=(const dimensionSet&) const in file dimensionSet/dimensionSet.C at line 165. 

June 5, 2014, 08:18 

#14 
New Member
ashwin
Join Date: Jul 2012
Location: erlangen
Posts: 25
Rep Power: 4 
Can any of you tell me How to implement the volumetric source term in 'buoyantSimpleFoam'?


Tags 
source term 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Convection discretization schemes for LES  sek  OpenFOAM Running, Solving & CFD  36  May 18, 2015 11:55 
rhoSimpleFoam  claco  OpenFOAM  7  April 20, 2010 04:32 
RasInterFoam STRANGE RESULTS AT BOUNDARY  kumar2  OpenFOAM Running, Solving & CFD  8  March 24, 2008 19:38 
Diffusion from fluid region into porous tissue.  Lindz  FLUENT  0  August 3, 2007 07:34 
What is the total energy for incompressible fluid?  Harry Dong  Main CFD Forum  12  February 4, 2006 01:55 