CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Wall with fixed heatFlux boundary condition (https://www.cfd-online.com/Forums/openfoam-solving/58243-wall-fixed-heatflux-boundary-condition.html)

Martin Lorenz (Lorenz) February 16, 2005 07:55

Hello, for a heat transpor
 
Hello,

for a heat transport problem I would like to use a fixed heatFlux boundary condition, where 120 W/m^2 flux of heat are imposed on a patch named "inner".

Therefore I created the following T file in the 0 directory using FoamX:

...
boundaryField
{
inner
{
type heatFlux;
// Field value
value uniform 400;
// Heat flux
flux uniform 120;
}

outer
{
type fixedValue;
// Field Value
value uniform 300;
}

}
...

UNfortunately, this doesn't work: this simply sets the temperature on the boudary to 400K. Removing the Field Value results in an error message.

I don't know why one has to specify both temperature and flux since this would result into an over-determination! Any hints?

Another question concerns external boundaries with a heat transfer constant k, i.e. the heat flux is given by k*(T-Tenv), where T is the surface temperature and Tenv is the temperature of the environment. I suppose that one has to use the "mixed" or even the "computed" boundary type, but I could not find any examples in the tutorials. Any help is appreciated.

Thanks, Martin

Hrvoje Jasak (Hjasak) February 16, 2005 08:28

That's because there's no suc
 
That's because there's no such thing as a heatFlux boundary condition - only a fixedGradient b.c. Somewhere in the documentation there should be a section on this.

Currently, you are falling into a new-ish gap in the design: if a b.c. is not recognised, it will look for a value and use that; this will NOT allow you to do what you wish.

Hrv

Martin Lorenz (Lorenz) February 16, 2005 09:11

Hi Hrv, I know that the he
 
Hi Hrv,

I know that the heat flux is connected with the gradient by J_th = lambda * grad T.
But the strange thing is that FoamX allows one to choose "wallFixedHeatFlux" as boundary type for a patch of the mesh! This sets the patch field type to "heatFlux" for the field T!

What about the boundaries with a heat transfer constant to the environment?

Martin

Hrvoje Jasak (Hjasak) February 16, 2005 11:59

Well, grep heatFlux lnInclude
 
Well, grep heatFlux lnInclude/* in the main library says nothing, which means the bug is in FoamX. use fixedGradient on the T field with the gradient of J_th/lambda and all will be well.

Don't understand the second question... If you mean that lambda is a function of something else, that's no problem either, but you'll need a new top-level code.

Enjoy,

Hrv

newbee March 3, 2006 06:13

Hi, could anybode explein to m
 
Hi, could anybode explein to me how the fixedGradient works.

I'm running buoyantSimpleFoam on a case with a channel with airflow thru it. The airflow is supposed to be heated by one of the walls which is increasing in temperature thru the channel.

I have tried running the case with different gradients of fixedGradient on the specified wall patch. But unfortunetly all I get is air flow with the same temperature as the intital setting of the internal field.

ccless June 7, 2006 21:01

I am getting the same effect,
 
I am getting the same effect, any luck on this. It seems to only heat up the cells in the proximity to the walls. Basically, not providing any advection of thermal energy into cells next to the ones on the wall. Any ideas on this one?

christian_hausmann October 10, 2006 06:32

Hi, how can I set a boundar
 
Hi,

how can I set a boundary condition to fixedGradient?

I want to set heat flux as boundary condition at a wall, but FoamX sets the patch field type to zeroGradient, if I set the boundary type to wall. Any suggestions?

gschaider October 10, 2006 06:53

Hi Christian! This is the p
 
Hi Christian!

This is the point where one abandons FoamX and uses a text-editor for editing the boundar conditions. Or rewrites the config-files for FoamX (with a text-editor). First route is easier.

Not the answer you wanted, I know, maybe someone else knows something that doesn't involve a text-editor.

christian_hausmann October 10, 2006 07:20

Hi Bernhard, it doesn't bot
 
Hi Bernhard,

it doesn't bother me to use a text-editor. I simply use FoamX, because the tutorials of the documentation are made with FoamX.

Do I only have to edit the boundary-file and the T-file of my case? Replace fixedValue by fixedGradient? Can/must I edit a estimated Start-temperature?

gschaider October 10, 2006 09:49

Hi Christian! I didn't want
 
Hi Christian!

I didn't want to imply you were afraid of text-editors. There is just a point in a man's life where he wants more than FoamX can offer him and you seem to have reached that point quite early (right after the tutorials).

Your questions: Yes. Yes. No

I think the neccesary field that replaces "value" is called "gradientValue"

christian_hausmann October 12, 2006 04:46

Hi, thanks Bernhard for you
 
Hi,

thanks Bernhard for you help.

I am now able to set boundary condition to fixed Gradient. But how do I treat the dimensions? I have heatflux over walls and airflow through an inlet. The dimension of the heatflux boundary condition is [K/m] and for the Temperature of the Inlet is [K].

eugene October 12, 2006 05:08

q = alphaEff * snGrad(T) Th
 
q = alphaEff * snGrad(T)

Thus

snGrad(T) = q/alphaEff

Your BC needs to look up the turbulence model in the database and then it needs to ask the turbulence model for the near-weall heat transfer coefficient. I might still have some code that does this for another purpose, so let me know if you would like a snippet.

christian_hausmann October 12, 2006 10:00

Hi Eugene, For some boundar
 
Hi Eugene,

For some boundaries I have an airflow with a fix temperature and for others I have a fix heat flux density. Since I know the heat conductivity of the wall my intention was to specify snGrad(T) directly in the T-file. The problem is I don't know how to specify different dimensions in the T file. One dimension for gradient and one for value.

If I am totally wrong, I will appreciate it to get a snippet of your code, to solve this problem.

gschaider October 12, 2006 10:29

You don't have to. Gradient is
 
You don't have to. Gradient is implicitly "original dimension per meter". Or the more practical view: the dimension of the gradientValue isn't checked anyway.

eugene October 12, 2006 10:45

? Specifying the gradient of T
 
? Specifying the gradient of T at the boundary will not fix the heat flux.

Anyway, you do not need to specify the dimensions for the gradient, in the boundary section of the field file:

someboundary
{
type fixedGradient;
gradient 2000;
}

To really have a fixed heat flux, you need to know the heat transfer coefficient between the wall and the fluid:

In the evaluate function of your new boundary (drived from the fixedGradient type) put:

const compressible::turbulenceModel& rasModel = db().lookupObject<compressible::turbulencemodel>(" turbulenceProperties");

scalarField alphaEffWall = rasModel.alphaEff()().boundaryField()[patch().patch().index()];

gradient() == q/alphaEffWall;

There are some details that have to be sorted regarding dictionary inputs, the face size and direction of the flux, but I'll leave this to you.

oscar_j July 10, 2007 02:58

Hello to all, I'd want to
 
Hello to all,

I'd want to realize my own heat transfer application but I haven't found specific information about it.

Thanks,
Oscar

emilianyassenov November 10, 2008 04:29

hi to all.. I want to simulat
 
hi to all..
I want to simulate Heat flux increasing till in the middle of the pipe than decrease it..which solver I should use?and how to include heat flux in the boundary conditions.

best regards,

Emo

emilianyassenov November 14, 2008 11:09

Hello Hrvoje, Could you exp
 
Hello Hrvoje,

Could you explain in details how to include heat flux? what is J_th there?


thanks in advance

Emo

emilianyassenov November 17, 2008 08:26

hello I want to have fixed
 
hello

I want to have fixed heat flux in boundary I am using icoFoam and turbFoam I have included energy equation in them I am using Water in a pipe...
how to get that fixed flux on the boundary..

thanks in advance

Emo

emilianyassenov November 17, 2008 10:11

can anyone help me? thanks
 
can anyone help me?

thanks

EMo

ep4 November 17, 2008 10:49

Imposing a heat flux on a surf
 
Imposing a heat flux on a surface is equivalent to impose the normal temperature gradient. (q=dT/dn)

Example:

wall{
type fixedGradient;
gradient 2;
}

braennstroem November 17, 2008 15:06

Hi, there is a bc on the wi
 
Hi,

there is a bc on the wiki:

http://www.cfd-online.com/OpenFOAM_D...ges/1/815.html

Fabian

emilianyassenov November 18, 2008 03:34

Hello Eric, -> FOAM Warning :
 
Hello Eric,
-> FOAM Warning :
From function Field<type>::Field(const word& keyword, const dictionary& dict, const label s)
in file /home/rkahraman/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/Field.C at line 252
Reading "/home/rkahraman/OpenFOAM/rkahraman-1.5/run/tutorials/my_icoFoam/tube_1/0/T::fix edWalls" from line 25 to line 26
expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0.


keyword outlet is undefined in dictionary "/home/rkahraman/OpenFOAM/rkahraman-1.5/run/tutorials/my_icoFoam/tube_1/0/T::bou ndaryField"

file: /home/rkahraman/OpenFOAM/rkahraman-1.5/run/tutorials/my_icoFoam/tube_1/0/T::boun daryField from line 25 to line 39.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 271.

FOAM exiting
I have put the BC like your example but it gives me that message...

emilianyassenov November 18, 2008 03:47

hi to all someone could hel
 
hi to all

someone could help me to how to use that fixedGradient BC?

Best regards

Emo

villet November 19, 2008 07:08

Emo: Read the error message. Y
 
Emo: Read the error message. You need to add word "uniform" after "gradient" and before the uniform value.

nandiganavishal December 5, 2008 13:08

Hi All, I am new to Openfoa
 
Hi All,

I am new to Openfoam. I have a case where I need to set B.cs given by the equation

-D1*dC1/dn - K1*C1*dPhi/dn = 0 where n is the normal direction.

I am solving a 2d system hence I want to set the flux in the y direction as zero. i.e
-D1*dC1/dy - K1*C1*dPhi/dy = 0
where C1 and Phi are my variables. I am solving coupled equations.

I hope i will get some response.

Can anyone suggest how exactly I have to go about incorporating this boundary condition.

Kindly do the needful.

Thanks

Regards

Vishal

thomasduerr February 25, 2010 03:38

fixed wall heat flux BC
 
Hi,

are there any news or hints how to impose a boundary condition of fixed heat flux to walls in OF 1.6?

Thanks!!!!!!!

vitor.geraldes@ist.utl.pt March 5, 2010 19:33

Fast and Dirty Boundary Condition
 
One simple way to implement a mixed/Robin boundary condition consists in adding a source term to the scalar transport equation that is zero everywere, except in the control volumes adjacent do the selected patch. This is not a clean approach, but it works quite well.

nygbook March 21, 2011 02:11

Quote:

Originally Posted by vitor.geraldes@ist.utl.pt (Post 248782)
One simple way to implement a mixed/Robin boundary condition consists in adding a source term to the scalar transport equation that is zero everywere, except in the control volumes adjacent do the selected patch. This is not a clean approach, but it works quite well.

Maybe this is a good idea. But if this is multiphase flow in pipe. How do I add the source to energy equation?

vitor.geraldes@ist.utl.pt March 21, 2011 06:22

groovyBC.
 
The best way to deal with this problem is to use the boundary-condition groovyBC. I have tried it in this type of BC and it works quite well. ( please see http://openfoamwiki.net/index.php/Contrib_groovyBC)

jorkolino April 12, 2013 16:55

Quote:

Originally Posted by vitor.geraldes@ist.utl.pt (Post 248782)
One simple way to implement a mixed/Robin boundary condition consists in adding a source term to the scalar transport equation that is zero everywere, except in the control volumes adjacent do the selected patch. This is not a clean approach, but it works quite well.

How do I identify the control volumes adjacent to a given patch in order to assign source term to them?

palmerlee December 31, 2013 05:35

try something like this:
Quote:

wall
{
type fixedGradient;
gradient uniform 10;
}

ben_ August 29, 2017 18:36

Quote:

Originally Posted by ccless (Post 196153)
I am getting the same effect, any luck on this. It seems to only heat up the cells in the proximity to the walls. Basically, not providing any advection of thermal energy into cells next to the ones on the wall. Any ideas on this one?

Hi, Did you ever get a response for this? I realize this is coming pretty late

ttsurvase December 21, 2020 05:59

Use externalWallHeatFluxTemperature in file T of 0 folder.
<patchName>
{ type externalWallHeatFluxTemperature;
mode coefficient;
Ta constant 300.0;

h constant 10.0;

thicknessLayers (0.1 0.2 0.3 0.4);
kappaLayers (1 2 3 4);

kappaMethod fluidThermo;

value $internalField; }


This is for convective heat transfer.

Conductive heat transfer example is described below
wall
{
type externalWallHeatFluxTemperature;
mode flux;
q uniform 1000;
kappaMethod fluidThermo;
value uniform 300.0;
}
I am using OF-v2006 version.


All times are GMT -4. The time now is 06:05.