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

fixedGradient BC w/ non-uniform wall spacing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 17
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,907
Rep Power: 33
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: 17
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, 10:40
Default
  #4
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
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, 14:13
Default
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
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, 13:12
Default fixedgradient BC
  #6
New Member
 
anonymous
Join Date: Sep 2012
Location: Miami, USA
Posts: 7
Rep Power: 14
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


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
[mesh manipulation] mergeMeshes problem Attesz OpenFOAM Meshing & Mesh Conversion 3 July 29, 2015 05:15
[Commercial meshers] tmerge utility creates unwanted interface/walls comes in the final mesh Shoonya OpenFOAM Meshing & Mesh Conversion 11 January 20, 2012 07:23
convergence and off wall spacing issue josip76 FLUENT 0 June 4, 2011 19: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 01:06.