CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Nonsensical results with wall heat flux boundary condition (https://www.cfd-online.com/Forums/openfoam-solving/223068-nonsensical-results-wall-heat-flux-boundary-condition.html)

jtipton2 December 20, 2019 14:29

Nonsensical results with wall heat flux boundary condition
 
1 Attachment(s)
I am befuddled with heat transfer in OpenFOAM and would very much appreciate someone's insight.

My test case is a 2D parallel channel that's 50-mm tall and 1000-mm long. The Reynolds number is 40,000 and the fluid is air. I'm using OF6 and the rhoSimpleFoam solver with RANS turbulence modeled with kOmegaSST.

I first ran my solution with a uniform temperature of 293K. Everything checks out fine. My mesh is resolved to provide y+ ~ 0.3 at the walls. The fluid velocity profile develops nicely.

Next, I changed my top and bottom wall to have a fixed temperature of 353K. Again, everything checks out fine. I can post-process the wall heat flux and see about 1000 W/m^2 being delivered to the walls. In paraView, the temperature profile looks normal, and I can see the thermal boundary layer develop.

Finally, I changed my top and bottom wall to externalWallHeatFluxTemperature. I've tried to set a flux of 1000 W/m^2. The solution still progresses to convergence, however, the results now show cryogenic temperatures at the wall and negative heat flux. Changing the heat flux to -1000 W/m^2 doesn't appear to change the results either. Here's how I'm trying to set the BC:

Code:

    upperWall
    {
        type            externalWallHeatFluxTemperature;
        mode            flux;
        q              1000;
        relaxation      0.9;
        kappaMethod    fluidThermo;
        value          uniform 353;
    }

As you can see, I am at a complete loss how to apply a heat flux boundary condition. I'm attaching the example setup described above. Does anyone understand what's happening here?

Many thanks,

~ Joseph

jtipton2 December 20, 2019 16:03

Solution found - setting a fixed heat flux boundary condition
 
All,

Well, after some more digging, I believe I found the answer. For archival, here's the helpful post:

Defining Heat Flux to wall

The solution is to use the fixedGradient boundary type and set the value to q"/K where q" is the desired heat flux and K is the thermal conductivity of the fluid.

Code:

    lowerWall
    {
        type            fixedGradient;
        gradient        uniform 39770.9;
    }

I'm still very confused why the externalWallHeatFluxTemperature boundary condition is not working. Any insight into that would be most appreciated.

tas38 December 22, 2019 13:43

You may want to re-run with some of the debug switches turned-on. I see that the bc will print additional info.

This may provide more insight into what is going on at bc.


However, I am not 100% on which debug flag to turn on.

You could add the following to your controlDict file (setting the values to 1 turns the debug flags on) ...


Code:

DebugSwitches {   

wallHeatTransfer    1;   

 HeatTransferModel  1;   

heatTransferModel  1;

}



All times are GMT -4. The time now is 05:27.