CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

plot bulk mean temperature in cfd-post

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 20, 2011, 10:03
Default plot bulk mean temperature in cfd-post
  #1
New Member
 
mamad
Join Date: Aug 2010
Posts: 15
Rep Power: 6
m.salemi is on a distinguished road
Hi
I want to calculate nusselt number for turbulent flow in a pipe with constant temperature in wall and i need to plot bulk mean temperature.
how can i plot the change of bulk mean temperture along lenght of tube in cfd-post???
m.salemi is offline   Reply With Quote

Old   July 20, 2011, 19:35
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,805
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
The easiest way I can think of is to use a session file to generate lots of cross section planes and calculate the average temperature on each plane, then assemble the average temperatures into a graph or data file. I suspect this needs to be scripted.
ghorrocks is offline   Reply With Quote

Old   July 21, 2011, 04:49
Default
  #3
New Member
 
mamad
Join Date: Aug 2010
Posts: 15
Rep Power: 6
m.salemi is on a distinguished road
thanks a lot...
but how can i use this method???
m.salemi is offline   Reply With Quote

Old   July 21, 2011, 07:56
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,805
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Record a session file in CFD-Post and edit it. Do the CFD-Post tutorials on session files.
ghorrocks is offline   Reply With Quote

Old   July 21, 2011, 08:03
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,805
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Record a session file in CFD-Post and edit it. Do the CFD-Post tutorials on session files.
ghorrocks is offline   Reply With Quote

Old   July 21, 2011, 20:21
Default
  #6
Member
 
Ali Torbaty
Join Date: Jul 2009
Location: Sydney, Australia
Posts: 71
Rep Power: 8
AliTr is on a distinguished road
#you can use below eample to create an array of planes in your preffered offsets
# you have to change the $PlotVariable and $CalcFunction according to your model, this example is made to calculate average velocity for a multiphase model
# this example shall be run on CFX-POST Command Editor


!CreateSectionPlanes();
! sub CreateSectionPlanes{
# Data
! $PlanePreName = "Plane YZ ";
! $PlotVariable = "Water.Superficial Velocity";
! $CalcFunction = "areaAve($PlotVariable)";

# Set the Min and Max plot variables for new planes
! $MinVal = 0;
! $MaxVal = 2.25;

# First plane coordinates
! $startX = -27;
! $startY = 0;
! $startZ = 13;

# new plane offsets
! $dX = 2;
! $dY = 0;
! $dZ = 0;

# Total num,ber of planes to be created
! $TotalPlanesNo = 14;

# Create a CSV file in C:\ to export the results
! open(SwRes,">C:/Results.csv") || die "Can't open file $!\n";
! print SwRes "Plane , X , Y , Z , ",$CalcFunction ,"\n";


! for ($j=0; $j<$TotalPlanesNo ;$j++) {

! $PlaneName = $PlanePreName . ($j+1);
! $NewX = $startX + $dX * $j;
! $NewY = $startY + $dY * $j;
! $NewZ = $startZ + $dZ * $j;
! $CalcString = $CalcFunction . "@" . $PlaneName;

PLANE: $PlaneName
Apply Instancing Transform = On
Apply Texture = Off
Blend Texture = On
Bound Radius = 0.5 [m]
Colour = 0.75, 0.75, 0.75
Colour Map = Default Colour Map
Colour Mode = Variable
Colour Scale = Linear
Colour Variable = $PlotVariable
Colour Variable Boundary Values = Hybrid
Culling Mode = No Culling
Direction 1 Bound = 1.0 [m]
Direction 1 Orientation = 0 [degree]
Direction 1 Points = 10
Direction 2 Bound = 1.0 [m]
Direction 2 Points = 10
Domain List = /DOMAIN GROUP:All Domains
Draw Faces = On
Draw Lines = Off
Instancing Transform = /DEFAULT INSTANCE TRANSFORMefault Transform
Invert Plane Bound = Off
Lighting = Off
Line Colour = 0, 0, 0
Line Colour Mode = Default
Line Width = 1
Max = $MaxVal
Min = $MinVal
Normal = 1 , 0 , 0
Option = YZ Plane
Plane Bound = None
Plane Type = Slice
Point = 0 [m], 0 [m], 0 [m]
Point 1 = 0 [m], 0 [m], 0 [m]
Point 2 = 1 [m], 0 [m], 0 [m]
Point 3 = 0 [m], 1 [m], 0 [m]
Range = User Specified
Render Edge Angle = 0 [degree]
Specular Lighting = On
Surface Drawing = Smooth Shading
Texture Angle = 0
Texture Direction = 0 , 1 , 0
Texture File =
Texture Material = Metal
Texture Position = 0 , 0
Texture Scale = 1
Texture Type = Predefined
Tile Texture = Off
Transform Texture = Off
Transparency = 0.0
Visibility = On
X = $NewX
Y = $NewY
Z = $NewZ
OBJECT VIEW TRANSFORM:
Apply Reflection = Off
Apply Rotation = Off
Apply Scale = Off
Apply Translation = Off
Principal Axis = Z
Reflection Plane Option = XY Plane
Rotation Angle = 0.0 [degree]
Rotation Axis From = 0 [m], 0 [m], 0 [m]
Rotation Axis To = 0 [m], 0 [m], 0 [m]
Rotation Axis Type = Principal Axis
Scale Vector = 1 , 1 , 1
Translation Vector = 0 [m], 0 [m], 0 [m]
X = 0.0 [m]
Y = 0.0 [m]
Z = 0.0 [m]
END
END

! $CalcVal = getExprVal($CalcString);
! print SwRes $PlaneName," , ",$NewX," , ",$NewY," , ",$NewZ," , ", $CalcVal,"\n";

! };

! close SwRes;
!};
Attached Files
File Type: txt Creates an array of planes with specific offset.txt (4.1 KB, 25 views)

Last edited by AliTr; July 21, 2011 at 21:07.
AliTr is offline   Reply With Quote

Old   July 22, 2011, 05:57
Default
  #7
New Member
 
mamad
Join Date: Aug 2010
Posts: 15
Rep Power: 6
m.salemi is on a distinguished road
tahnks a lot AliTr but can you explain more about geometry of your problem for better understanding or give me a tutorial that explain the use of command editor???
m.salemi is offline   Reply With Quote

Old   July 23, 2011, 02:28
Default
  #8
Member
 
Ali Torbaty
Join Date: Jul 2009
Location: Sydney, Australia
Posts: 71
Rep Power: 8
AliTr is on a distinguished road
check the CFX-POST help, it has all you need.

to use the code, you need to define the start coordinate in mentioned section (# First plane coordinates ) and also provide dx,dy,dz for new planes.
AliTr is offline   Reply With Quote

Old   July 23, 2011, 04:36
Default
  #9
New Member
 
mamad
Join Date: Aug 2010
Posts: 15
Rep Power: 6
m.salemi is on a distinguished road
thanks AliTr
i need to define new variable as "Temperature*Velocity" and use areaAve(Temperature*Velocity)@plane to determine bulk temperature but when i run this,have some error as "Temperature*Velocity does not exist"...
do you know reason of error?
m.salemi is offline   Reply With Quote

Old   July 24, 2011, 04:31
Default
  #10
Member
 
Ali Torbaty
Join Date: Jul 2009
Location: Sydney, Australia
Posts: 71
Rep Power: 8
AliTr is on a distinguished road
you need to define a new variable in CFX-Post and use it instead of "Temperature*Velocity". PLEASE READ CFX help, these are basics. however below expression will create a new variable as "TmprVelocity"

LIBRARY:
CEL:
EXPRESSIONS:
TmprVel = Temperature * Velocity
END
END
END

USER SCALAR VARIABLE: TmprVelocity
Boundary Values = Conservative
Calculate Global Range = Off
Expression = TmprVel
Recipe = Expression
Variable to Copy = Pressure
Variable to Gradient = Pressure
END
AliTr is offline   Reply With Quote

Old   July 24, 2011, 05:41
Default
  #11
New Member
 
mamad
Join Date: Aug 2010
Posts: 15
Rep Power: 6
m.salemi is on a distinguished road
thanks a lot...
m.salemi is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Face in CFD Post and export Values as Boundary Conditions flow87 CFX 2 June 4, 2011 04:06
Plotting recirculation zone in CFD Post ashtonJ CFX 0 April 30, 2011 20:31
CFD post processing techniques & streamlining klk Main CFD Forum 0 October 19, 2010 07:37
how to find bulk temperature plot and results in fluent cadcamvijay Main CFD Forum 2 March 21, 2009 01:36
Plot temperature vs time for a defined point FREDERIK FLUENT 0 August 26, 2005 05:49


All times are GMT -4. The time now is 21:00.