CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

uniform heating of fluid region

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2010, 14:09
Default uniform heating of fluid region
  #1
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 17
santoo_cfd is on a distinguished road
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.
santoo_cfd is offline   Reply With Quote

Old   April 5, 2010, 07:29
Default Doubt regd TEqn.H
  #2
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 17
santoo_cfd is on a distinguished road
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)
    );
Can anybody tell me what is the need of second term
Code:
fvm::Sp(fvc::div(phi), T)
according to following relation
Code:
div(sV) = sdiv(V)+V.grad(s)
(s is scalar and V is vector).

Combination of first two terms will results in the following,
Code:
phi.gradT
Can anybody help me understanding these equations. I am finally trying to find heat source term in the equation so that I can specify uniform heating thoughout the fluid region.

Regards
Santhosh.
santoo_cfd is offline   Reply With Quote

Old   April 6, 2010, 07:52
Default
  #3
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 17
santoo_cfd is on a distinguished road
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 have compiled and run the some simple test case. I have not yet seen the results just run completed successfully.

I will post back if there is any other alternative.

Regards
Santhosh
santoo_cfd is offline   Reply With Quote

Old   April 7, 2010, 12:09
Default
  #4
New Member
 
Oli
Join Date: Apr 2009
Posts: 27
Rep Power: 17
olhe0002 is on a distinguished road
That sounds interesting.

Please let us know, if you have some results.

Regards.
olhe0002 is offline   Reply With Quote

Old   May 11, 2010, 02:10
Default
  #5
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 17
santoo_cfd is on a distinguished road
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.cfd-online.com/Forums/ope...-new-post.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
santoo_cfd is offline   Reply With Quote

Old   May 11, 2010, 02:50
Default Sensitivity of Turbulent prandtl number
  #6
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 17
santoo_cfd is on a distinguished road
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 k-e 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
Attached Images
File Type: jpg Prt_sensitivity_residual.jpg (82.1 KB, 113 views)
santoo_cfd is offline   Reply With Quote

Old   June 28, 2010, 11:58
Default
  #7
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
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
maddalena is offline   Reply With Quote

Old   June 29, 2010, 07:14
Default
  #8
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 17
santoo_cfd is on a distinguished road
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
santoo_cfd is offline   Reply With Quote

Old   July 16, 2010, 12:17
Default
  #9
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
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
maddalena is offline   Reply With Quote

Old   July 19, 2010, 11:53
Default adding term in solidWallMixedTemperatureCoupled
  #10
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
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;
        }
    }
while in OF 1.7 (code)
Code:
    this->refValue() = nbrIntFld;
    this->refGrad() = 0.0;
    this->valueFraction() = nbrKDelta / (nbrKDelta + myKDelta());
In any case, the two approach gives equal results for chtMultiRegionFoam so that is fine.
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
maddalena is offline   Reply With Quote

Old   September 12, 2011, 11:41
Default
  #11
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey Santhosh,


Quote:
Originally Posted by santoo_cfd View Post
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)
    );
Can anybody tell me what is the need of second term
Code:
fvm::Sp(fvc::div(phi), T)
according to following relation
Code:
div(sV) = sdiv(V)+V.grad(s)
(s is scalar and V is vector).

Combination of first two terms will results in the following,
Code:
phi.gradT
Can anybody help me understanding these equations. I am finally trying to find heat source term in the equation so that I can specify uniform heating thoughout the fluid region.

Regards
Santhosh.
I just read your post and asked myself the same question a while ago.
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)
The second term includes the derivative of the densitiy, rho.
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)
as everything is divided by density.
The additional term is zero for incompressible flows.
Anne Lincke is offline   Reply With Quote

Old   September 13, 2011, 00:44
Default
  #12
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 17
santoo_cfd is on a distinguished road
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
santoo_cfd is offline   Reply With Quote

Old   September 18, 2013, 05:02
Default some error
  #13
Senior Member
 
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 14
himanshu28 is on a distinguished road
Quote:
Originally Posted by santoo_cfd View Post
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 have compiled and run the some simple test case. I have not yet seen the results just run completed successfully.

I will post back if there is any other alternative.

Regards
Santhosh
Hi,

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.
Thank you.
himanshu28 is offline   Reply With Quote

Old   June 5, 2014, 09:18
Default
  #14
New Member
 
ashwin
Join Date: Jul 2012
Location: erlangen
Posts: 26
Rep Power: 14
ashghan is on a distinguished road
Can any of you tell me How to implement the volumetric source term in 'buoyantSimpleFoam'?
ashghan is offline   Reply With Quote

Old   March 17, 2016, 23:18
Default
  #15
New Member
 
Dasein
Join Date: Mar 2015
Posts: 21
Rep Power: 11
Tellur is on a distinguished road
Hello,

I am reviving an old thread but I was wondering if anyone has any insights on this one.

I am trying to do exactly what the above posters intended, adding a volumetric heat source term to buoyantboussinesq solver.

Unfortunately, adding the source term in the Teqn file does not work, as the solver does not recognize the Q term (I also had to change rho to rhok, hope that is correct).

I realize that the field Q is not recognized, do I also need to add it in the createFields dictionary?

Forgive my ignorance, new at adjusting solvers

Thank you so much in advance.

Kind regards,
Theodore.

----

Hello,

Reviving an old thread in the hope of people still being around. i'm trying to add the heat source term in the same solver without much success.

Anyone has a more detailed approach as to how this was implemented (i.e. the Q/(rho*cp) term).

Thanks in advance.

Theodore.

Last edited by wyldckat; March 20, 2016 at 15:58. Reason: merged posts that were a few minutes apart
Tellur is offline   Reply With Quote

Old   March 18, 2016, 04:32
Default
  #16
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Dear Theodore,

you need to declare it in createFields.H. You should do it accordingly to the other fields which are declared in there.

It would be easier, though, to understand your problem if you could post your code and the error message.

Kind Regards
Anne
Anne Lincke is offline   Reply With Quote

Reply

Tags
source term


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
Convection discretization schemes for LES sek OpenFOAM Running, Solving & CFD 38 July 31, 2017 15:30
rhoSimpleFoam claco OpenFOAM 7 April 20, 2010 05: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 08:34
What is the total energy for incompressible fluid? Harry Dong Main CFD Forum 12 February 4, 2006 01:55


All times are GMT -4. The time now is 18:16.