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

Temperaturedependent flux boundary condition

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 9, 2005, 13:06
Default That's because you're in the c
  #1
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
That's because you're in the code you are setting the patch value of the fixedGradientFvPatchScalar field:

fixedGradientFvPatchScalarField& buffer=
refCast<fixedgradientfvpatchscalarfield>(T.boundar yField()[patchI]);
forAll (buffer, faceI)
{
buffer[faceI] = 0.1*(293.-T.boundaryField()[patchI][faceI]);
}

and you should be setting the gradient() instead. Have a look at fixedGradientFvPatchField.H.

So:

fixedGradientFvPatchScalarField& buffer=
refCast<fixedgradientfvpatchscalarfield>(T.boundar yField()[patchI]);
scalarField& grad = buffer.gradient();

forAll (grad, faceI)
{
grad[faceI] = 0.1*(293.-T.boundaryField()[patchI][faceI]);

}

(if that is what you want).

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

 


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
what specified flux mean in boundary condition? lucy FLUENT 0 January 5, 2009 04:13
ask a question about Fixed Flux Boundary Condition mahe Phoenics 1 July 15, 2008 04:21
Boundary condition for species flux Leverkin FLUENT 0 June 9, 2008 02:19
constant heat flux boundary condition Andrew Hayes Main CFD Forum 4 February 19, 2006 13:54
scalar flux boundary condition Murali Siemens 4 May 23, 2003 11:50


All times are GMT -4. The time now is 15:55.