CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Access to wal temperature with turbulentHeatFluxTemperature bc (https://www.cfd-online.com/Forums/openfoam-programming-development/123098-access-wal-temperature-turbulentheatfluxtemperature-bc.html)

nailzee September 4, 2013 07:38

Access to wal temperature with turbulentHeatFluxTemperature bc
 
Hi Foamers,

I'm new to OpenFoam and have no idea about C++ but I was still able to put together a postprocessing tool that calculates the y+, u+ and T+ values in a channel stream for isothermal boundary conditions.

Now I'm trying to modify this tool so it can be used for isoflux boundary conditions but it failed to output the correct wall temperature.

The boundaryField for T in my final time folder looks like this

Quote:

wall
{
type turbulentHeatFluxTemperature;
gradient uniform 33490.6;
heatSource flux;
q uniform 1000;
alphaEff kappaEff;
value nonuniform List<scalar>
125
(
3535.19
3535.37
3535.5
3535.54
3535.55
3535.56
3535.56
(several similar values)
)
;
but when I try to access in it in my tool with T.boundaryField() it displays following results

Quote:

type turbulentHeatFluxTemperature;
gradient uniform 0;
heatSource flux;
q uniform 1000;
alphaEff kappaEff;
value nonuniform List<scalar>
125
(
3367.74
3367.92
3368.04
3368.09
3368.09
(several similar values)
I noticed that the 33xx values are the ones of the first cell near the wall. So I tried the sample tool with

Quote:

surfaceFormat raw;

surfaces
(
wall
{
type patch;
patches ("wall");
}
and it writes out the correct values for the wall. Then I tried to look up how the sample tool accesses the values of a surface but couldn't find anything with my non existing C++ knowledge.
Anyone has any idea how to do that?

Thanks in advance.

jherb January 21, 2014 12:40

I am not sure, but perhaps this helps: http://www.cfd-online.com/Forums/ope...hi-patchi.html

Are you really using always the surface values? Is your tool using boundary.correct() (or what happens if you add it)?


All times are GMT -4. The time now is 23:52.