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

polyline

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 24, 2005, 10:06
Default polyline
  #1
ag
Guest
 
Posts: n/a
I was trying to generate polylines using the following .cse session file. I am using this on CFX to simulate flow through a T piece pipe. At every cross-section i am taking 15 points to get the velocities.

The program runs fine for the negative x axis value but doesnt produce any results in the positive x axis. Results are good in the y aix also.

The orientation is like a inverted T along positive X and Y axes with one half of the T in the -ve xaxis.

# A CFX-Post session file for output of Values along Polylines defined by a file #

################################################## ############################# # # Creating a Polyline # ################################################## #############################

! sub PLineOut { ! ($XStart, $YStart, $ZStart, $XEnd, $YEnd, $ZEnd, $NrPts, $VarString, $OutFileName) = @_;

! $DeltaX = ($XEnd - $XStart)/$NrPts; ! $DeltaY = ($YEnd - $YStart)/$NrPts; ! $DeltaZ = ($ZEnd - $ZStart)/$NrPts;

! open(LPOINTSFH,">LinePts.txt"); ! for($Pcnt=0; $Pcnt<=$NrPts; $Pcnt++){ ! $XAct = $XStart + $DeltaX * $Pcnt; ! $YAct = $YStart + $DeltaY * $Pcnt; ! $ZAct = $ZStart + $DeltaZ * $Pcnt; ! print LPOINTSFH "$XAct $YAct $ZAct\n"; ! } ! close(LPOINTSFH);

POLYLINE:PolyPoints Apply Instancing Transform = On Boundary List = Default Colour = 1, 1, 1 Colour Mode = Constant Colour Variable = Pressure Domain List = All Domains Input File = LinePts.txt Instancing Transform = Default Transform Line Width = 1 Location = IsoCylinder Max = 0 [kg m^-1 s^-2] Min = 0 [kg m^-1 s^-2] Option = From File Range = Global Visibility = On END

> forceupdate PolyPoints

EXPORT: Include Header = On Null Token = <null> Precision = 8 Separator = " " Vector Brackets = () Vector Display = Components Export File = $OutFileName Location List = PolyPoints Overwrite = On Variable List = $VarString END
:export

! return 0; ! }

# ####program inputs #

! $NrOfPoints = 15; ! $Diameter = 0.03; ! $SF = 0.99;

! @XList = (-10.5, -1.5, -1, -0.75, -0.5, -0.25, 0, 0.5, 1.5, 2.5, 4.5);

! @YList = (1, 1.1, 1.25, 1.5, 2.1, 2.5, 3, 3.5,6);

! $R2 = $Diameter * $SF * 0.5;

! foreach $XC(@XList){ ! $FName = "out_" . $XC . ".dat"; ! $XDim = $XC * $Diameter; ! PLineOut($XDim, 0.0, 0, $XDim, $Diameter, 0, $NrOfPoints, "Y, Velo\ city u, Velocity v", $FName); ! }

! foreach $YC(@YList){ ! $FName = "out_b_" . $YC . ".dat"; ! $YDim = $YC * $Diameter; ! PLineOut(-$R2, $YDim, 0, $R2, $YDim, 0, $NrOfPoints, "X, Velo\ city u, Velocity v", $FName); ! }
  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
CFD-Post: Polyline Export at Integration Points minger ANSYS 4 February 22, 2014 10:23
Polyline at intersection of two planes Francesco CFX 2 July 29, 2009 09:03
Help Needed: Polyline intersection in Post PHabib CFX 4 July 13, 2009 05:04
about polyline and the coordinates Eric CFX 1 July 12, 2006 23:01
plot variable against length of polyline Francesco CFX 0 April 4, 2006 12:49


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