CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Mapping bulk temperature of channel and moutend cylinder flow cases into field

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2019, 14:05
Default Mapping bulk temperature of channel and moutend cylinder flow cases into field
  #1
New Member
 
Join Date: Jan 2019
Posts: 2
Rep Power: 0
focus111 is on a distinguished road
Hi fellow foamers,

Problem description:
I'm trying to represent the non-dimensional temperature


\theta = \frac{T(x,y) - T_{wall}}{\overline{T}(x) - T_{wall}} ,


throughout a 2D channel in Paraview, in which \overline{T}(x) is the bulk temperature for the transverse surface positioned in the x longitudinal coordinate. T_{wall} in the present case is constant.
The bulk temperature for a section, A, in a given longitudinal coordinate is given by


\overline{T} = \frac{\int_A \rho u T \, dA}{\int_A \rho u \, dA} ,


where \rho is the fluid density and u the velocity component normal to section A.

Achievements so far:
So far I've been using swak4foam's funkyDoCalc coupled with a bash script to cycle through the longitudinal coordinate in order to create an array of the bulk temperature along the channel.
The swak4foam script:
Code:
s1
{
type swakExpression;
valueType surface;
verbose true;
expression "sum(T*rho*Sf()&U)/sum(rho*Sf()&U)";
accumulations (
  average
);
surfaceName x1; 
surface {
  type plane;
  source cells;
  surfaceTupe searchablePlate;
  planeType pointAndNormal;
  pointAndNormalDict {
    basePoint (0 1e-6 1e-6);//the bash script uses sed to change the x coordinate of the basepoint
    normalVector (1 0 0); 
    interpolate true;
    }   
  }
}
After running the funkyDoCalc in the cycle the output is then appended to a file.
Up to this point I have an array of the bulk temperature throughout the longitudinal coordinate.


Current obstacle/issue:
I want to map this bulk temperature array to a scalar field, in which T(y)|_x=\overline{T}|_x, i.e., for a given longitudinal position, x, the transverse temperature is set to the correspondent bulk temperature for any transverse position.
After obtaining this bulk temperature field I could then use the Calculator function in Paraview to determine the non-dimensional temperature field \theta.



All help is welcomed.
Thank you.
focus111 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



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