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

Fixed heat flux BC in buoyantPimpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree30Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2011, 10:10
Default Fixed heat flux BC in buoyantPimpleFoam
  #1
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
Hi,

I am running buoyantPimpleFoam with a built-in boundary condition for heat transfer based on heat transfer coefficient (aphaWall) and outside temperature (Tinf) like this:

window
{
type wallHeatTransfer;
alphaWall uniform 1.5;
Tinf uniform 263;
value uniform 293.;
}

This work perfectly.

Now I want to impose a fixed heat flux ( eg 50 W/sq m) on a patch (radiator). How do I do this in the solver? Is there a built-in BC condition for this. I know that the solver demands boundary conditions for temperature but the enthalpy is used for solving the energy equation.

Can anybody give me a hint?

Regards
Bjorn
Ramzy1990 likes this.

Last edited by bhh; March 31, 2011 at 23:06.
bhh is offline   Reply With Quote

Old   March 31, 2011, 11:26
Default
  #2
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
Hi!

Check out this BC (for RAS turbulence models): src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature. It applies for the heated boundary patch as a temperature boundary condition like that:

Code:
heatedPatch
{
    type              compressible::turbulentHeatFluxTemperature;
    heatSource    power;
    q                   uniform 65.0;
    value             uniform 293.0;
}
cheers,
Aram
vishal, bhh, yossi and 8 others like this.
mabinty is offline   Reply With Quote

Old   March 31, 2011, 12:18
Default
  #3
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
Hi Aram!

It works like a charm! Thank you very much

rgds
Bjorn
bhh is offline   Reply With Quote

Old   March 31, 2011, 22:54
Default
  #4
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
Hi Aram,

One thing that is unclear about the BC: is power q given in Watts or Watts per sq m for the patch in question?

rgds

Bjorn
bhh is offline   Reply With Quote

Old   April 1, 2011, 04:28
Default
  #5
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
hi bjorn!

see src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C lines 176 - 202. if you set

Code:
heatSource  power;
q stands for power (W); in case of

Code:
heatSource  flux;
q is taken as power density (W/m2).

cheers!
aram
vishal, bhh, Mojtaba.a and 5 others like this.
mabinty is offline   Reply With Quote

Old   April 1, 2011, 05:52
Default
  #6
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
Hi Aram,

Thanks again! This clarified the situation
rgds
Bjorn
bhh is offline   Reply With Quote

Old   April 1, 2011, 23:41
Default
  #7
Member
 
MSR CHANDRA MURTHY
Join Date: Mar 2009
Posts: 33
Rep Power: 17
chandramurthy is on a distinguished road
Dear Aram,
In the calculation of gradient() [ turbulentHeatFluxTemperatureFvPatchScalarField.C, lines 180 and 185 ], effective thermal conductivity is calculated as (Cp*alphaEff). I guess it should have been (Cp*alphaEff.Rho).
mgg likes this.
chandramurthy is offline   Reply With Quote

Old   April 1, 2011, 23:44
Default
  #8
Member
 
MSR CHANDRA MURTHY
Join Date: Mar 2009
Posts: 33
Rep Power: 17
chandramurthy is on a distinguished road
Please read (Cp*alphaEff.Rho) as (Cp*alphaEff*Rho)
chandramurthy is offline   Reply With Quote

Old   April 4, 2011, 05:02
Default
  #9
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
hi!

alpha = a*rho = k/cp (kg/s/m) denotes the effective enthalpy (energy) diffusivity, whereas "a" (m^2/s) stands for the thermal diffusivity. hence, conductivity k = cp*alpha.

cheers,
aram
mabinty is offline   Reply With Quote

Old   June 7, 2011, 01:36
Default
  #10
Member
 
Kevin
Join Date: May 2011
Posts: 33
Rep Power: 15
murrdpirate is on a distinguished road
Code:
heatedPatch
{
    type              compressible::turbulentHeatFluxTemperature;
    heatSource    power;
    q                   uniform 65.0;
    value             uniform 293.0;
}
What exactly is the temperature value for? Does it change the flux value? I implemented this bc into one of my projects, but I forgot to change the temperature and I ended up with a wall that was at a lower temperature than the internal field. Is it still transferring 65 W to the internal field?
murrdpirate is offline   Reply With Quote

Old   June 7, 2011, 03:51
Default
  #11
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
Quote:
Originally Posted by murrdpirate View Post
Code:
heatedPatch
{
    type              compressible::turbulentHeatFluxTemperature;
    heatSource    power;
    q                   uniform 65.0;
    value             uniform 293.0;
}
What exactly is the temperature value for? Does it change the flux value? I implemented this bc into one of my projects, but I forgot to change the temperature and I ended up with a wall that was at a lower temperature than the internal field. Is it still transferring 65 W to the internal field?
Hi,

Code:
value             uniform 293.0;
is used as initial value at the respective patch. To check wall heat fluxes use the "wallHeatFlux" utility.

Aram
murrdpirate likes this.
mabinty is offline   Reply With Quote

Old   June 10, 2011, 06:24
Default Setting a variable heat flux for laminar flow
  #12
Member
 
Matthias Hettel
Join Date: Apr 2011
Location: Karlsruhe, Germany
Posts: 31
Rep Power: 15
matthi is on a distinguished road
Hello,

I´m relatively new in applying OpenFoam.

My question is if anyone can give me an advice where I have to search if I want to apply a heat flux to walls in case of laminar flows (solver rhoSimpleFoam). I`d like to have access to all wall cells and want to set a different heat flux for every cell according to values which I get from somewhere else (measured or calculated data).

I think an approach like using
src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature

would be right. But I can use this only for turbulent flows ?
Or do you think that I could use a RAS-code for laminar flow and replace the values Ap, Cpp, alphaEffp in such a manner that I get the desired heat flux?

Thanks in advance for any information

Matthias
matthi is offline   Reply With Quote

Old   June 10, 2011, 09:44
Default
  #13
Member
 
MSR CHANDRA MURTHY
Join Date: Mar 2009
Posts: 33
Rep Power: 17
chandramurthy is on a distinguished road
Nearest matching BC for your requirement is timeVaryingMappedFixedValue. You have to tweak around slightly to make it timeVaryingMappedFixedHeatFlux. in base class inherit fixedGradient instead fixedValue.
Quote:
Originally Posted by matthi View Post
Hello,
I`d like to have access to all wall cells and want to set a different heat flux for every cell according to values which I get from somewhere else (measured or calculated data).
Matthias
chandramurthy is offline   Reply With Quote

Old   June 10, 2011, 10:38
Default
  #14
Member
 
Matthias Hettel
Join Date: Apr 2011
Location: Karlsruhe, Germany
Posts: 31
Rep Power: 15
matthi is on a distinguished road
Hi Chandramurthy,

many thanks for your reply. I got also an other advice from Aran (see above). He wrote me, that I should govern the laminar heat flux with the temperature gradient (Fourier's law) on the respective patch (fixedGradient).
I`ll search in both ways ... but ... as I`m a beginner it will take a lot of time to succeed. If I will be successful I will post the result in the forum.

Greetings Matthias
matthi is offline   Reply With Quote

Old   June 14, 2011, 18:11
Default
  #15
Member
 
Kevin
Join Date: May 2011
Posts: 33
Rep Power: 15
murrdpirate is on a distinguished road
It appears that the turbulentHeatFluxTemperature only works for heat gains and not heat losses, is that correct? Or am I doing something wrong? I just tried making the "q" value a negative number, but I get a heat gain. Is there a way to make this work or am I stuck with temperature gradients?
murrdpirate is offline   Reply With Quote

Old   June 15, 2011, 10:48
Default
  #16
Member
 
Matthias Hettel
Join Date: Apr 2011
Location: Karlsruhe, Germany
Posts: 31
Rep Power: 15
matthi is on a distinguished road
Hi Kevin,

it should work in both ways (for positive and negative gradient). This would be physically and numerically right. Maybe, the code uses somewhere only the absolute value of and nobody tried it before, or you made something wrong. The flux is not independent from your coordinate system ! Be sure that you "think" in the right direction.

Greetings Matthias
murrdpirate likes this.
matthi is offline   Reply With Quote

Old   June 30, 2011, 00:14
Default
  #17
Member
 
Kevin
Join Date: May 2011
Posts: 33
Rep Power: 15
murrdpirate is on a distinguished road
Matthais,

Sorry, I forgot that I never got back to you. You are correct that this BC handles negative heat transfer. At one point, I did see what appeared to be heat gain, but I think somehow my turbulence model was causing it to create pockets of heat (and a heat loss overall). Thanks for your help.
murrdpirate is offline   Reply With Quote

Old   June 30, 2011, 01:18
Default
  #18
Member
 
Kevin
Join Date: May 2011
Posts: 33
Rep Power: 15
murrdpirate is on a distinguished road
It looks like this boundary condition has changed in ver 2.0. I now get the error "Keyword K is undefined in [my boundary condition]" Anyone know what that means?
murrdpirate is offline   Reply With Quote

Old   June 30, 2011, 02:18
Default
  #19
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
Quote:
Originally Posted by murrdpirate View Post
It looks like this boundary condition has changed in ver 2.0. I now get the error "Keyword K is undefined in [my boundary condition]" Anyone know what that means?
That means you did not specify how the conductivity fied "K" shoud be calculated. Look at the top of src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H:

Code:
hotWall
        {
            type            compressible::turbulentHeatFluxTemperature;
            heatSource      flux;        // power [W]; flux [W/m2]
            q               uniform 10;  // heat power or flux
            K               basicThermo; // calculate K by alphaEff*thermo.Cp
            value           uniform 300; // initial temperature value
        }
Cheers,
Aram
murrdpirate, socrates and JR22 like this.
mabinty is offline   Reply With Quote

Old   June 30, 2011, 03:00
Default
  #20
Member
 
Kevin
Join Date: May 2011
Posts: 33
Rep Power: 15
murrdpirate is on a distinguished road
Thanks. I didn't realize there were examples in the code for these things.

Issue now is that it's saying "KName is undefined." As you showed, that's not listed in the example. I see somewhere online that it's "CHARACTER*(*) array of species names," but I don't know what that means
murrdpirate is offline   Reply With Quote

Reply


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
Total heat transf. rate vs Total surface heat flux Renato Sousa FLUENT 1 April 14, 2020 04:27
Sign of Heat Flux at wall Kyung FLUENT 2 February 26, 2016 17:25
Variable name for heat flux peterle CFX 4 February 13, 2014 03:21
Heat Flux Wall Boundary Confusion. Joee FLUENT 1 August 21, 2010 13:20
Heat flux in ansys cfx juliom OpenFOAM Running, Solving & CFD 2 April 14, 2009 15:30


All times are GMT -4. The time now is 22:04.