CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   How to get wall heat flux from reactingFoam? (https://www.cfd-online.com/Forums/openfoam-post-processing/244708-how-get-wall-heat-flux-reactingfoam.html)

mactone August 24, 2022 04:58

How to get wall heat flux from reactingFoam?
 
Dear OpenFomers,

I build a fluid domain for combustion simulation using reactingFoam.
When I tried to use
Code:

postProcess -func wallHeatFlux
I can't get the heat flux from the wall.

Code:

--> FOAM FATAL ERROR: (openfoam-2206)
Unable to find compressible turbulence model in the database

  From virtual bool Foam::functionObjects::wallHeatFlux::execute()
  in file wallHeatFlux/wallHeatFlux.C at line 255.

FOAM exiting

Is it the reactingFoam issue? or my boundary condition issue?

By the way, I've tested the wall boundary set at contant temperature or externalWallHeatFluxTemperature. Both boundary can't postProcess wallHeatFlux.

Thank you formers! :)

dlahaye August 24, 2022 07:44

1/ Suggestion 1

Place wallHeatFlux computation in system/controlDict as in

Code:

<existing controlDict>
functions
{
    #includeFunc wallHeatFlux
}

Motivation: this approach uses a default wallHeatFlux file (details missing) that provide the path to the correct shared object library.

2/ Suggestion 2

Add to Suggestion 1 your own wallHeatFlux file (thus overriding the default). Example is in the squareBend tutorial of rhoSimpleFoam. Observe that libs is set to fieldFunctionObjects.

3/ Suggestion 3 (requiring more witchcraft)

Verify that the wallHeatFlux function is indeed provided by the shared object file as the wallHeatFlux tells us.

fieldFunctionObjects is in the directory openfoam2012/platforms/linux64GccDPInt32Opt/lib .

To verify that wallHeatFlux is indeed provided, use

nm -g libfieldFunctionObjects.so | grep -I wallheatflux

Let us know what you learn.

Yann August 24, 2022 09:04

Hi,

In addition to Domenico's points, try running:

Code:

reactingFoam -postProcess -func wallHeatFlux
the postProcess utility loads the mesh and variables, but not the models related to your case. This is why it fails to execute functions objects which need to access model-related data.

In your case, postProcess utility does not load the turbulence model, but the wallHeatFlux function object needs it. When using reactingFoam -postProcess, the solver starts, loads all the models it needs, and then execute the function called by the -postProcess option.

I don't have experience with reactingFoam so other problems might arise, but this is worth trying.

Cheers,
Yann

mactone August 24, 2022 20:33

Thank you @dlahaye and @Yann for such thorough procedures to solve my question.

I've tried using Yann's recommendation. It works. It will output a wallHeatFlux_step.dat in the postProcessing/wallHeatFlux folder.

The suggestion1 of dlahaye is also working. The wall heat flux will be output to another file wallHeatFlux.dat in the same directory with the same output frequency as the result file.

In the file, there are columns of time, patch, min, max, integral, it looks like below.

Code:

# Wall heat-flux 
# Time                    patch                    min                      max                      integral         
73605                    air        -1.0249754810e-01        2.2350346338e+00        4.4728118225e-02
73605                    fuel        -2.1019176497e+01        6.6393800060e+01        5.3537524375e-02
73605                    outlet1        0.0000000000e+00        0.0000000000e+00        0.0000000000e+00
73605                    outlet2        0.0000000000e+00        0.0000000000e+00        0.0000000000e+00
73605                    wall_burner        -9.8068755227e+04        6.0199488781e+02        -3.4648932558e+00
73605                    wall_chamber        -1.2467911377e+06        2.4665724705e+04        -3.0640880412e+05

The first 4 columns are descriptive. But I am not sure about the last column.
Does the 'integral' means the total heat flux through the path in unit of kW?
For the minus sign (-), it mean the heat is going out through the patch.
It makes me wonder, why there is plus (+) heat flux through wall_chamber (see the max)?


One other thing which might not related to the postProcessing.
I've asked reactingFoam with boundary heat transfer?
to know if the OpenFOAM can have thin wall heat transfer as that in fluent. If any former can share, it will be appreciated.

dlahaye August 25, 2022 02:57

Yes on integral.

Yes on sign.

No idea on wall_chamber patch. Requires seeing details.

See other post for other question.


All times are GMT -4. The time now is 04:39.