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

Cell-wise heatFlux?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 26, 2015, 13:04
Question Cell-wise heatFlux?
  #1
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Magdeburg/Geneva
Posts: 179
Blog Entries: 1
Rep Power: 8
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, 05:31
Default
  #2
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 198
Rep Power: 4
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, 11:09
Default
  #3
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Magdeburg/Geneva
Posts: 179
Blog Entries: 1
Rep Power: 8
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, 11:11
Default
  #4
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 198
Rep Power: 4
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, 11:34
Default
  #5
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Magdeburg/Geneva
Posts: 179
Blog Entries: 1
Rep Power: 8
Linse is on a distinguished road
Simple testcase in preparation...
Linse is offline   Reply With Quote

Old   March 13, 2015, 08:31
Default Testcase and Solver
  #6
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Magdeburg/Geneva
Posts: 179
Blog Entries: 1
Rep Power: 8
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

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
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 CD-adapco 2 May 31, 2010 21:58
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15
Warning 097- AB CD-adapco 6 November 15, 2004 05:41


All times are GMT -4. The time now is 23:41.