CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

fixedGradient BC w/ non-uniform wall spacing

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 16, 2012, 17:26
Default fixedGradient BC w/ non-uniform wall spacing
  #1
New Member
 
Brent Craven
Join Date: Mar 2009
Location: University Park, PA, USA
Posts: 21
Rep Power: 9
brent_craven is on a distinguished road
Hi All,

I am currently running a simple heat conduction problem on a plate, where one side is given a uniform heat flux via the "fixedGradient" BC and all other sides are insulated. So, theoretically the plate should *uniformly* heat up over time.

The test case that I put together to illustrate the problem includes a non-uniform structured mesh, where the wall spacing next to the fixedGradient patch varies as shown below:

mesh.jpg

If I use "laplacianFoam" to solve for transient conduction in the plate, because the near-wall mesh spacing is non-uniform, I get a highly non-uniform temperature distribution along the fixedGradient patch and in the plate, which is non-physical - as shown below:

Tcontours.jpg

As you can see. There is a problem, especially since this non-uniform temperature distribution leads to a non-physical heat flux in the other directions.

Looking at the source code for the "fixedGradient" BC, in the "evaluate" member function, the cause of this is obvious. As shown below, this first-order implementation leads to boundary patch values that depend on the near-wall spacing.


Code:
    
Field<Type>::operator=
    (
        this->patchInternalField() + gradient_/this->patch().deltaCoeffs()
    );
So, my questions are:
1. Is this just to be expected given the first order nature of the boundary condition? I.e., is this just a result of non-uniform discretization error?

2. If I require a heat flux BC on a mesh that has non-uniform near-wall spacing (e.g., a very complex unstructured mesh), how can this be accomplished? Is there another approach to implementing a fixedGradient/heat flux boundary condition that will be much less dependent on the near-wall mesh spacing?


If you are interested, here is a link to this test case that can be run with "laplacianFoam":

http://dl.dropbox.com/u/2969338/fixe...ntTestCase.tgz


Thanks for your input. I appreciate any thoughts people have.

Thanks!

Brent
brent_craven is offline   Reply With Quote

Old   March 17, 2012, 07:19
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,781
Rep Power: 22
hjasak will become famous soon enough
Hi Brent,

This code is so simple there is almost nothing that can go wrong. The gradient value you specify is multiplied by face diffusivity at the boundary and added into the source. There is no non-orthogonal correction. Boundary temperature evaluation code that you quote basically extrapolates the face T from the inside and it does not feature in the energy balance - but I guess this isthe number you're after, right?

If you want accurate surface T, add a prismatic layer and all will be well. If this is not an option please let me know and we will cook up something fancy for you.

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

Old   March 17, 2012, 10:28
Default
  #3
New Member
 
Brent Craven
Join Date: Mar 2009
Location: University Park, PA, USA
Posts: 21
Rep Power: 9
brent_craven is on a distinguished road
Thanks, Hrv.

Yes. I am interested in an accurate surface T and, unfortunately, I cannot add prismatic layers.

The current problem of interest (and there are more of this type to come) is an electronics cooling application with very complex components (printed circuit boards, EMI shields, etc.), which prevent generation of prismatic/hex layers on the walls. Really, the only way we are able to get meshes on some of these components is using all tet meshes, which is not a problem since we are dealing with conduction in these components. So, because these tet meshes can have very disparate near-wall cell sizes (i.e., deltaCoeffs()), the boundary T evaluation in fixedGradient leads to highly nonuniform boundary T values. This is a problem since we are interested in the surface temperature distribution on these components.

So, I would definitely be interested in a better recipe for accurately extrapolating the surface T on such non-uniform near-wall meshes.

Thanks!

Brent
brent_craven is offline   Reply With Quote

Old   August 2, 2012, 09:40
Default
  #4
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 14
maddalena is on a distinguished road
Quote:
Originally Posted by brent_craven View Post
I would definitely be interested in a better recipe for accurately extrapolating the surface T on such non-uniform near-wall meshes.
Hey,
is there any news on the subject?

mad
maddalena is offline   Reply With Quote

Old   August 2, 2012, 13:13
Default
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,781
Rep Power: 22
hjasak will become famous soon enough
Well, we have done it but I don't think it made enough difference. I guess Brent or Eric can provide a more meaningful update.

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

Old   September 19, 2012, 12:12
Default fixedgradient BC
  #6
New Member
 
anonymous
Join Date: Sep 2012
Location: Miami, USA
Posts: 7
Rep Power: 5
socrates is on a distinguished road
I am trying to apply a constant BC on micro-tubes surfaces inside a substrate. I have tried these:
1.

{
type fixedGradient;
gradient uniform -10000;
}

2.

{
type groovyBC;
gradientExpression "-10000";
fractionExpression "0";
}

3.

{
type groovyBC;
value uniform 300;
gradientExpression "gradT";
variables "htot=15000.00;Tinf=293.00;k=130;gradT=htot/(k)*(Tinf-T);";
}

The results show different gradient values on the walls, gradTx, gradTy and gradTz are so much more that the input values. I should mention that when I apply this BC for top surface which is horizontal I get perfect results. Here it says ( http://www.foamcfd.org/Nabla/guides/...Guidese11.html) that by "fixedgradient" we define
. I need to define only the magnitude of temperature gradient on the tubes.

Could you help me please?

Thank you

aa
socrates is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mergeMeshes problem Attesz OpenFOAM Mesh Utilities 3 July 29, 2015 04:15
tmerge utility creates unwanted interface/walls comes in the final mesh dinesh2n@gmail.com OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 11 January 20, 2012 07:23
convergence and off wall spacing issue josip76 FLUENT 0 June 4, 2011 18:13
Problem with rhoSimpleFoam : exploding enthalpy and density at the walls david39 OpenFOAM Running, Solving & CFD 6 January 18, 2011 12:49
Wall functions Abhijit Tilak Main CFD Forum 6 February 5, 1999 02:16


All times are GMT -4. The time now is 14:43.