CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   How is the Heat Flux calculated in CFD? (https://www.cfd-online.com/Forums/main/206797-how-heat-flux-calculated-cfd.html)

CellZone September 13, 2018 12:27

How is the Heat Flux calculated in CFD?
 
Hi,

I am working with StarCCM and I am wondering, how the boundary heat flux at a wall is calculated:

So I know that in the background I have an energy equation which needs to be fullfilled for each cell.

To calculate the heat flux for convection, I need a heat transfer coefficient, which I can more or less define random, depending on the reference temperature with htc=q/(T_Wall - T_Ref) .

So StarCCM let's me calculate the htc by this. But I am wondering, how StarCCM is calculating q and T_Wall .

According to my understanding, to fullfill the energy equation at a wall, the energy equation must work with some pre-defined htc, which is a term of definition (Nusselt, Prandtl - number) ?

So all in all, I don't know how I can calculate the convective heat flux (and htc) because it's all about of my own definition?

I always thought the energy equation works without assumptions fot htc and could generate me real heat fluxes

Does anyone understand my problem?

Thank you!

agd September 13, 2018 14:08

It's going to depend on your boundary conditions and whether you have conjugate heat transfer between the fluid and the body. Simple case - adiabatic wall, no heat flux. Next boundary condition would be a constant temperature wall, in which case I can compute a temperature gradient at the wall and determine the heat flux knowing the fluid properties. This also applies if I have known temperature distribution on the wall, since the constant distribution is just a special case of this. Another boundary condition is where the heat flux through the wall is specified - then the temperature gradient is known and this is a Neumann BC (of which the adiabatic wall is a special case). Finally, you can have coupled heat transfer between the fluid and the body and you will have other equations in your simulation, with the heat flux conducted in/out of the body by conduction being equal to the heat flux in/out of the fluid.


Somewhere in your problem setup you are specifying a boundary condition on temperature/energy equation. Go back and understand how that BC is driving your solution, and see if that doesn't help to clarify the situation.

gbope7 November 30, 2023 19:42

Calculating incident heat flux on a block
 
1 Attachment(s)
I have a question on the process of calculating heat flux in OpenFOAM. In my case, I am using laplacianFoam to calculate the 1D heat equation in the z-direction (see image). Based on the codedFixedValue boundary condition I am using, the surface temperatures are fixed in the y-direction and vary in the x-direction over time.


The image attached depicts the internal mesh in paraview. See that there are ~30 cells in the z-direction.


I want to know the work flow to calculate the heat flux by taking the gradient of the scalar field T please. In particular, I only want to calculate the heat flux incident on the first cell, meaning that the gradient (dT/dz) would only consider the uppermost cells. I am certain that I will need to include the grad() function in my controlDict file, but I how do I specify the region of interest? It will not be the same as my boundary patch from my codedFixedValue BC? Please advise, thank you!


Code:

functions
{
    grad1
    {
        // Mandatory entries (unmodifiable)
        type            grad;
        libs            (fieldFunctionObjects);

        // Mandatory (inherited) entries (runtime modifiable)
        field          <T>;

        // Optional (inherited) entries
        result          <fieldResult>;
        region          ???? //region0;
        enabled        true;
        log            true;
        timeStart      0;
        timeEnd        1000;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    timeStep;
        writeInterval  1;
    }
}



All times are GMT -4. The time now is 03:15.