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

wallHeatFlux and radiation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 22, 2013, 19:29
Default wallHeatFlux and radiation
  #1
New Member
 
Craig Tickle
Join Date: Jun 2013
Posts: 8
Rep Power: 12
craig.tickle is on a distinguished road
Does the wallHeatFlux utility include radiation?.

I've been looking at a heated body in a still room (basically a modification of the hotRadiationRoom tutorial) using both the buoyantSimpleFoam and buoyantSimpleradiationFoam solvers.
The total heat transfer from the body, as reported by wallHeatFlux is very similar for both solvers. However my back of the envelope calculations suggest there should be about 50%-75% difference for my case.


If the wallHeatFlux utility doesn't include radiation, is there a simple way of extracting the total heat transfer due to radiation for a given surface?
craig.tickle is offline   Reply With Quote

Old   June 23, 2013, 05:55
Default
  #2
New Member
 
Join Date: Sep 2012
Posts: 3
Rep Power: 13
Chaolei is on a distinguished road
The default version did not calculate radiation. Search the form to find a fixed version.
Chaolei is offline   Reply With Quote

Old   June 27, 2013, 22:15
Default
  #3
New Member
 
Craig Tickle
Join Date: Jun 2013
Posts: 8
Rep Power: 12
craig.tickle is on a distinguished road
Thank you - but do you have a link to the fixed version?. I've searched through the forum but can't seem to find anything relevant.
craig.tickle is offline   Reply With Quote

Old   March 29, 2015, 10:14
Default
  #4
New Member
 
mahtab
Join Date: Nov 2014
Posts: 11
Rep Power: 11
taban is on a distinguished road
Hi Foarmers,

I have the same problem.Is there the wallHeatFlux utility that include radiation heat flux?( I use buoyantBuossinesqSimpleFoam solver with radiation)

best regards
taban is offline   Reply With Quote

Old   April 17, 2017, 09:00
Default
  #5
Senior Member
 
Yuehan
Join Date: Nov 2012
Posts: 142
Rep Power: 13
wc34071209 is on a distinguished road
Hi,

I made a version of wallHeatFlux utility for OF2.3, which accounts for radiative heat flux, following https://github.com/OpenFOAM/OpenFOAM...eatFlux.C#L117
Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
     \\/     M anipulation  |
-------------------------------------------------------------------------------
License
    This file is part of OpenFOAM.

    OpenFOAM is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    for more details.

    You should have received a copy of the GNU General Public License
    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.

Application
    wallHeatFlux

Description
    Calculates and writes the heat flux for all patches as the boundary field
    of a volScalarField and also prints the integrated flux for all wall
    patches.

\*---------------------------------------------------------------------------*/

#include "fvCFD.H"
#include "turbulenceModel.H"
#include "solidThermo.H"
#include "wallFvPatch.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
{
    timeSelector::addOptions();
    #include "addRegionOption.H"
    #include "setRootCase.H"
    #include "createTime.H"
    instantList timeDirs = timeSelector::select0(runTime, args);
    #include "createNamedMesh.H"

    forAll(timeDirs, timeI)
    {
        runTime.setTime(timeDirs[timeI], timeI);
        Info<< "Time = " << runTime.timeName() << endl;
        mesh.readUpdate();

        #include "createFields.H"

        surfaceScalarField heatFlux
        (
            fvc::interpolate
            (
                (
                    turbulence.valid()
                  ? turbulence->alphaEff()()
                  : thermo->alpha()
                )
            )*fvc::snGrad(h)
        );
		
		// Read radiative heat-flux if available
		volScalarField Qr
		(
			IOobject
			(
				"Qr",
				runTime.timeName(),
				mesh,
				IOobject::READ_IF_PRESENT,
				IOobject::NO_WRITE
			),
			mesh,
			dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0)
		);		
	

        const surfaceScalarField::GeometricBoundaryField& patchHeatFlux =
            heatFlux.boundaryField();
		
        const volScalarField::GeometricBoundaryField& patchRadHeatFlux =
            Qr.boundaryField();

        const surfaceScalarField::GeometricBoundaryField& magSf =
            mesh.magSf().boundaryField();
		
		
        Info<< "\nWall heat fluxes  [W]" << endl;
        forAll(patchHeatFlux, patchi)
        {
            if (isA<wallFvPatch>(mesh.boundary()[patchi]))
            {
                scalar convFlux = gSum(magSf[patchi]*patchHeatFlux[patchi]);
                scalar radFlux = -gSum(magSf[patchi]*patchRadHeatFlux[patchi]);	// Be careful of the sign
				
                Info<< mesh.boundary()[patchi].name() << endl
                    << "    convective: " << convFlux << endl
                    << "    radiative:  " << radFlux << endl
                    << "    total:      " << convFlux + radFlux << endl;
            }
        }

		Info<< endl;

        volScalarField wallHeatFlux
        (
            IOobject
            (
                "wallHeatFlux",
                runTime.timeName(),
                mesh
            ),
            mesh,
            dimensionedScalar("wallHeatFlux", heatFlux.dimensions(), 0.0)
        );
  
        forAll(wallHeatFlux.boundaryField(), patchi)
        {
            wallHeatFlux.boundaryField()[patchi] = patchHeatFlux[patchi];
        }
      
		wallHeatFlux.write();
      
 
        // Write the total heat-flux including the radiative contribution
        // if available
        if (Qr.headerOk())
        {
            volScalarField totalWallHeatFlux
            (
				IOobject
				(
					"totalWallHeatFlux",
					runTime.timeName(),
					mesh
				),
				mesh,
				dimensionedScalar("totalWallHeatFlux", heatFlux.dimensions(), 0.0)
            );


            forAll(totalWallHeatFlux.boundaryField(), patchi)
            {
                totalWallHeatFlux.boundaryField()[patchi] =
                    patchHeatFlux[patchi] - patchRadHeatFlux[patchi];	// Be careful of the sign
            }

            totalWallHeatFlux.write();
        }

	}
		
    Info<< "End" << endl;

    return 0;
}

// ************************************************************************* //
wc34071209 is offline   Reply With Quote

Old   December 2, 2018, 08:00
Default
  #6
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
This is an old thread but I've a very relevant question and I'm hoping for an answer.


I see this in wallHeatFlux.: for OF v6
Code:
    if (foundObject<volScalarField>("qr"))
    {
        const volScalarField& qr = lookupObject<volScalarField>("qr");

        const volScalarField::Boundary& radHeatFluxBf =
            qr.boundaryField();

        forAll(wallHeatFluxBf, patchi)
        {
            if (!wallHeatFluxBf[patchi].coupled())
            {
                wallHeatFluxBf[patchi] -= radHeatFluxBf[patchi];
            }
        }
    }

    return twallHeatFlux;
}

This when compared to older versions e.g. 2.3.x is nonexistent. This means older versions calculated purely convection heat flux at wall (basic Fourier equation with calculated k for fluid).



So I'm wondering if there's a way to separate the two calculations. I want to know how much is convective heat flux and how much is the radiative heat flux along with the effective heat flux. How do I achieve this?


One way would be to turn off radiation calculation by some means (how?) and rerun the case with on to find out the difference. This is not a good idea though; twice the time used.


Any ideas? Need some clue.
deepbandivadekar 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



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