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

Cell-wise heatFlux?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2015, 12:04
Question Cell-wise heatFlux?
  #1
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
Dear all,

I would like to analyse the integral heatflux into or from cells within flow domains within rhoReactingBuoyantFoam. This would allow to find out if and where the flow is surpassing a certain activation energy.

While this seems well possible for walls (wallHeatFlux-condition), I did not yet find a way to implement it for internal cells...

I guess the problem is divided in two:
1. How does one read the heatflux across an internal face?
2. How does one sum up all of the heatfluxes across the faces of one cell?

Thanks for any answers already in advance!

Cheers,
Bernhard
Linse is offline   Reply With Quote

Old   February 27, 2015, 04:31
Default
  #2
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 12
ssss is on a distinguished road
You can access each cell faces, and then calculate the heatFlux as in the wallHeatFlux app, with some modifications :

Code:
surfaceScalarField heatFlux
(
     fvc::interpolate
     (
         (
             turbulence.valid()
             ? turbulence->alphaEff()()
             : thermo->alpha()
          )
      )*fvc::snGrad(h)
);


        forAll (mesh.cells(),cellI)
        {
            const cell& faces = mesh.cells()[cellI];
            scalar sumHeatFlux=0;
            forAll( faces, i )        // loop over all faces in cellI
            {
               sumHeatFlux+=mesh.magSf()[i]*heatFlux[i];
            }
        }
Let me know if it works I'm not sure of how you want to calculate the heatFlux
ssss is offline   Reply With Quote

Old   February 27, 2015, 10:09
Default
  #3
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
Dear ssss,

Thanks a lot for that quick reply!
I just tried to implement that. While compilation works, it does not provide anything different from 0 - which is kind of unrealistic in a flow where - just for test purposes - I put a temperature gradient of over 200 Kelvin.

So it seems somehow the value is not computed correctly - if at all.
Although I had to drop out the alphaEff for turbulence-model reasons, there should be a heat flux nevertheless.

At the moment I am trying to get a grasp on the different geometric fields in use via the Programmers' Guide, but any hints are welcome!

Cheers,
Bernhard
Linse is offline   Reply With Quote

Old   February 27, 2015, 10:11
Default
  #4
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 12
ssss is on a distinguished road
Could you provide me a testcase to try it?

It may be 0 every where because I initizalized the variable inside a for-loop and thus it will be 0 outside.
ssss is offline   Reply With Quote

Old   February 27, 2015, 10:34
Default
  #5
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
Simple testcase in preparation...
Linse is offline   Reply With Quote

Old   March 13, 2015, 07:31
Default Testcase and Solver
  #6
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
Okay, it took longer than expected (the flu didn't help, either), but now there are a minimal testcase for the question as well as a minimal solver based on rhoReactingBuoyantFoam. Unfortunately the file is too big, so you will have to download it from
http://blinseis.web.cern.ch/blinseis...luxFoam.tar.gz (approx. 3.3 Mb)
Afterwards just compile from within reactingFoam/rhoReactingBuoyantFoam and the solver should be available as rhoReactingBuoyantFoam_heatFlux_1 .

The strange thing for the moment:
Different heatFluxes are computed for the different cells. Too big to be negligible/numerical noise. This is expected.
Nevertheless the heatFluxes are in places where they are not expected at all, while other places with a definite heatFlux are very lowlevel.

Any Ideas? Thanks for your thoughts in advance!
Linse is offline   Reply With Quote

Reply

Tags
heatflux, rhoreactingfoam


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
interFoam running blowing up sandy13 OpenFOAM Running, Solving & CFD 2 May 5, 2015 07:16
Journal file error magicalmarshmallow FLUENT 3 April 4, 2014 12:25
Cells with t below lower limit Purushothama Siemens 2 May 31, 2010 21:58
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15
Warning 097- AB Siemens 6 November 15, 2004 04:41


All times are GMT -4. The time now is 09:47.