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

buoyantSimpleFoam check wall heat flux

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jherb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 19, 2022, 08:50
Default buoyantSimpleFoam check wall heat flux
  #1
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Hello all,

I try to set-up a case in buoyantSimpleFoam using the "externalWallHeatFluxTemperature" BC. In my 0/T I have:

Code:
Cooler_wall_heat_in
{
    type            externalWallHeatFluxTemperature;
    mode          flux;
    q                uniform 1; // 1W/m2
    kappaMethod     fluidThermo;
    value           $internalField;
}
I expect to get 1W/m2 in the model. The patch has a size of 0.42m2, so I expect a total heat power of 0.42W going into the system.

I want to check this and came across the "wallHeatFlux" function object. I added the following in my system/controlDict:

Code:
wallHeatFlux
{
    type            wallHeatFlux;
    libs            ("libfieldFunctionObjects.so");
    patches     (Cooler_wall_heat_in); // (wall1 "(wall2|wall3)");
    qr          qr;

    writePrecision  8;
    writeToFile     false;
    useUserTime     true;
    region          region0;
    enabled         true;
    log             true;
    timeStart       0;
    timeEnd         1000;
    executeControl  timeStep;
    executeInterval 1;
    writeControl    timeStep;
    writeInterval   1;
}
Two questions about that:
  1. I basically want the wall heat flux sum in the log. Therefore I turned "writeToFile" to false. Nevertheless, I am getting a folder for each time step containing the whole wallHeatFlux results per patch face. Why so? How to turn this off?
  1. In the log-file I get the following line:
    Code:
    min/max/integ(Cooler_wall_heat_in) = 0.770455625, 0.832415145, 0.0326535893
    min/max seems to be minimum and maximum heat flux on one face? What is integ, it is lower than min? How to get the sum of the heat flow over all faces in the given patch?
bastil is offline   Reply With Quote

Old   August 28, 2022, 11:43
Default
  #2
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22
jherb is on a distinguished road
Quote:
Originally Posted by bastil View Post
DE]
  1. I basically want the wall heat flux sum in the log. Therefore I turned "writeToFile" to false. Nevertheless, I am getting a folder for each time step containing the whole wallHeatFlux results per patch face. Why so? How to turn this off?
Have you tried adding writeField off;

Quote:
Originally Posted by bastil View Post
DE]
  1. In the log-file I get the following line:
    Code:
    min/max/integ(Cooler_wall_heat_in) = 0.770455625, 0.832415145, 0.0326535893
    min/max seems to be minimum and maximum heat flux on one face? What is integ, it is lower than min? How to get the sum of the heat flow over all faces in the given patch?
The last value should be the spacial integral of the heat flux, so the power flowing into the fluid.
jherb is offline   Reply With Quote

Old   August 29, 2022, 03:01
Default
  #3
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Quote:
Originally Posted by jherb View Post
The last value should be the spacial integral of the heat flux, so the power flowing into the fluid.
Then my expectation would be 0.42W instead of the given 0.0326... Also I checked the global temperature increase and using P = cP*m*delta(T) gives me a added heat power of 0.42W. So I know case-setup is correct, but wallHeatFlux is strange.
Furthermore, how comes that min and max values are both larger than integral (=sum?).
bastil is offline   Reply With Quote

Old   August 30, 2022, 18:10
Default
  #4
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22
jherb is on a distinguished road
Here is the source code for the wallHeatFlux function object in the current version, where the integral value is calculated: https://github.com/OpenFOAM/OpenFOAM...eatFlux.C#L266

It is in fact the integral, meaning the sum over all faces of a patch of heat flux * face area. So if your face is small enough, the integral of the heat flux = power [W] can be smaller than the miniumum of the heat flux [W/mē].

Regarding the difference between between the boundary condition and the output of the function object: You might have to compare really the source code, how both are calculating it.

By the way, as you wrote the whole heat flux field. What is the integral using paraview?
saidc. likes this.
jherb is offline   Reply With Quote

Old   September 6, 2022, 11:29
Default
  #5
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Thanks for the feedback so far. I checked a few things and made some progress:

1. I am using Openfoam v1906. The wallFUnction integral is the overall integral heat given in (in W). This now is reasonable and fine for me.
2. I am still getting the whole field written for all time-steps even though I have "writeField off" in my controlDict:

Code:
    wallHeatFlux_coolant
    {
        // Mandatory entries (unmodifiable)
        type            wallHeatFlux;
        libs            ("libfieldFunctionObjects.so");
        // Optional entries (runtime modifiable)
        patches         (Cooler_wall_heat_in); // (wall1 "(wall2|wall3)");
        qr          qr;
        // Optional (inherited) entries
        writePrecision  8;
        writeToFile     false;
        writeField      false;
        useUserTime     true;
        region          coolant-fluid;
        enabled         true;
        log             true;
        timeStart       0;
        timeEnd         1000;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    timeStep;
        writeInterval   1;
    }
bastil is offline   Reply With Quote

Old   September 8, 2022, 21:07
Default
  #6
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22
jherb is on a distinguished road
I looked at the source code and it seems that you can not turn off writing the field into the time directories. Also, I missed an "s" above. The options for other function objects is called writeFields.
jherb is offline   Reply With Quote

Old   September 9, 2022, 09:18
Default
  #7
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi,

Even if you cannot turn off the field writing, you can probably play with the executeControl and writeControl parameters to have all the data in your .dat file but to write the fields only at writeTime, or at the end of the simulation.

https://www.openfoam.com/documentati...n-objects.html

Yann
Yann 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conjugate Heat Transfer: Wall Heat Flux at Coupled Walls? MaxHeat FLUENT 4 September 14, 2017 11:44
Radiation interface hinca CFX 15 January 26, 2014 18:11
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 08:21
Wall heat flux cujo CFX 3 November 6, 2002 04:43


All times are GMT -4. The time now is 01:33.