Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Session file started: 2019/02/02 21:38:00
- # CFX-19.1
- # To avoid unnecessary file pre-processing and modifications, include
- # COMMAND FILE at the top of your session file.
- # If it is not included, the file is assumed to be older and will be
- # modified for backward compatibility.
- COMMAND FILE:
- CFX Post Version = 19.1
- END
- #### Load extra perl functions
- ! use strict;
- ! use warnings;
- ! use File::Copy;
- ! use List::Util;
- #### Manual inputs:
- #### Input the directory location, Name of CSV file to collect information,
- #### ANSYS CFX .res file batch name
- ! my $CFXdir='E:/Upstream Study/';
- ! my $CSVfilename='UpstreamMeshStudy4';
- ! my $CFDbatchName='MeshStudy4_Case_';
- !
- ! my $AxialOffset=2;
- ! my $InletAxial=13.75;
- !
- #### Predeclare Variables
- ! our @splitline ;
- ! my $NumCols ;
- ! my $CasesStart;
- ! my $CasesEnd;
- ! my $RadiusIndex;
- ! my $LengthIndex;
- ! my $ClearanceIndex;
- ! my $UpAxialIndex;
- ! my $UpRadialIndex;
- ! my $InletRadialIndex;
- ! my $InletLocIndex;
- ! my $SealLocIndex;
- ! my $RotorSpeedIndex;
- ! my $LeakageIndex;
- ! my @OutArray;
- #### Navigate to working directory
- ! chdir($CFXdir);
- #### Make backup of .csv file and label with date and time
- ! my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
- ! $year=$year-100;
- ! $mon=$mon+1;
- ! copy "$CFXdir$CSVfilename.csv", "$CFXdir$CSVfilename\_backup\_$mon-$mday-$year\_$hour\_$min.csv";
- #### For each .res file that matches the CFDbatchName post process in CFX
- #### to get relevent output information and slot it into the column associated
- #### with the number in the .res file name in the relevent arrays
- # Read .res file list in the directory
- ! our @ResultList = grep ( -f , <$CFDbatchName*.res> );
- ! @ResultList = grep ( !/_old/ , @ResultList );
- # Count matching .res files in the res file list
- ! my $NumRes = scalar(@ResultList);
- #### Open the .csv output file and process relevent geometric and operating
- #### condition information
- # Load the file
- ! open our $InHandle, '<', "$CSVfilename.csv" or die "Can't read old file: $!";
- ! open our $OutHandle, '>', "$CSVfilename-output.csv" or die "Can't write new file: $!";
- # Read file line by line
- ! my $linenum=0;
- ! my $ReadDataAtLine=1000;
- ! while(my $line = <$InHandle>) {
- # Advance line number by one
- ! $linenum++;
- # Grab a line from the input file
- # Remove line return from the line that was grabbed
- ! chomp($line);
- # Split the line by commas
- ! @splitline = split(/\s*,\s*/,$line);
- # find how many elements are in the split line array
- ! $NumCols = scalar(@splitline);
- #### Begin parsing each line for relevent information
- # First few lines contain meta information about which cases to process
- ! if ($splitline[0] eq 'Import Cases') {
- ! $CasesStart=$splitline[1];
- ! $CasesEnd=$splitline[2];
- ! }
- # Check first array term and parse values
- # Import the geometry information
- # Import Variable Names as array from file
- ! elsif ($splitline[0] eq 'Variable Name') {
- ! my $indicesFound=0;
- ! my @q = (1..scalar(@splitline));
- ! for(@q){
- ! if ((defined $ResultList[$_]) && $splitline[$_] eq 'Radius (R)'){
- ! $RadiusIndex=$_;
- ! }
- ! elsif ((defined $ResultList[$_]) && $splitline[$_] eq 'Length (L)'){
- ! $LengthIndex=$_;
- ! }
- ! elsif ((defined $ResultList[$_]) && $splitline[$_] eq 'Clearance (H)'){
- ! $ClearanceIndex=$_;
- ! }
- ! elsif ((defined $ResultList[$_]) && $splitline[$_] eq 'Cavity Axial Width (W)'){
- ! $UpAxialIndex=$_;
- ! }
- ! elsif ((defined $ResultList[$_]) && $splitline[$_] eq 'Cavity Radial Depth (D)'){
- ! $UpRadialIndex=$_;
- ! }
- ! elsif ((defined $ResultList[$_]) && $splitline[$_] eq 'Inlet Radial Depth (Dinlet)'){
- ! $InletRadialIndex=$_;
- ! }
- ! elsif ((defined $ResultList[$_]) && $splitline[$_] eq 'Inlet Location (di)'){
- ! $InletLocIndex=$_;
- ! }
- ! elsif ((defined $ResultList[$_]) && $splitline[$_] eq 'Seal Location (dS)'){
- ! $SealLocIndex=$_;
- ! }
- ! elsif ((defined $ResultList[$_]) && $splitline[$_] eq 'Rotor Speed (omega)'){
- ! $RotorSpeedIndex=$_;
- ! }
- ! elsif ((defined $ResultList[$_]) && $splitline[$_] eq 'Leakage [kg/s]'){
- ! $LeakageIndex=$_;
- ! }
- ! }
- ! }
- # Identify when to start reading numbers in
- ! elsif ($splitline[0] eq 'Case Number') {
- ! $ReadDataAtLine=$linenum;
- ! }
- # Read numbers in
- ! elsif ( ($linenum - $ReadDataAtLine >= $CasesStart) && (($linenum - $ReadDataAtLine <= $CasesEnd)) ) {
- ! my @DataArrayIn = @splitline;
- !
- ! my $SealRadius=$splitline[$RadiusIndex];
- ! my $SealLength=$splitline[$LengthIndex];
- ! my $Clearance=$splitline[$ClearanceIndex];
- ! my $UpAxial=$splitline[$UpAxialIndex];
- ! my $UpRadial=$splitline[$UpRadialIndex];
- ! my $InletRadial=$splitline[$InletRadialIndex];
- ! my $InletLoc=$splitline[$InletLocIndex];
- ! my $SealLoc=$splitline[$SealLocIndex];
- ! my $RotorSpeed=$splitline[$RotorSpeedIndex];
- !
- ! my $p1x = $AxialOffset-$UpAxial-$InletAxial; # Axial location of P1 in [mm]
- ! my $p1y = $SealRadius + 0.5*$Clearance + $UpRadial * ($InletLoc-$SealLoc); # Radial location of P1 in [mm]
- ! my $p2x = $AxialOffset-$UpAxial; # Axial location of P2 in [mm]
- ! my $p2y = $SealRadius + 0.5*$Clearance + $UpRadial * ($InletLoc-$SealLoc); # Radial location of P2 in [mm]
- ! my $p3x = -$AxialOffset; # Axial location of P3 in [mm]
- ! my $p3y = $SealRadius + 0.5*$Clearance; # Radial location of P3 in [mm]
- ! my $p4x = $AxialOffset; # Axial location of P4 in [mm]
- ! my $p4y = $SealRadius + 0.5*$Clearance; # Radial location of P4 in [mm]
- ! my $p5x = $SealLength-$AxialOffset; # Axial location of P5 in [mm]
- ! my $p5y = $SealRadius + 0.5*$Clearance; # Radial location of P5 in [mm]
- !
- ! my $CaseNum = $splitline[0];
- ! my $CFXfilename = "$CFDbatchName$CaseNum.res";
- ! my $StreamExportName = "$CFXdir$CFDbatchName$CaseNum-Streamlines.csv";
- !
- ! my $ResFound=0;
- ! my @a = (1..scalar(@ResultList));
- ! for(@a){
- ! if ((defined $ResultList[$_]) && $ResultList[$_] eq $CFXfilename){
- ! $ResFound=1;
- ! }
- ! }
- ! if ( $ResFound == 1 ) {
- #### If the .res file exists in the directory then
- #### Start the CFX Post processing
- > load filename=$CFXfilename, force_reload=true
- > update
- # Initialize Turbomachinery Variables in CFX Post
- > update
- VIEW:Turbo Initialisation View
- Object Visibility List = /WIREFRAME:Wireframe, /COMPHIGHLIGHT:Default Domain
- Is A Figure = false
- END
- # Setting Single View: /VIEW:Turbo Initialisation View
- VIEWPORT MANAGER:
- Viewport Layout = No Split
- Maximized Viewport = -1
- END
- >setViewportView cmd=set, view=/VIEW:Turbo Initialisation View, viewport=1
- VIEWPORT MANAGER:
- Synchronize Visibility = false
- END
- > turbo init
- > turbo more_vars
- > update
- # Create Plane on Inlet Upstream at Point 1
- PLANE:PlanePt1
- 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 = Constant
- Colour Scale = Linear
- Colour Variable = Pressure
- 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 TRANSFORM:Default Transform
- Invert Plane Bound = Off
- Lighting = On
- Line Colour = 0, 0, 0
- Line Colour Mode = Default
- Line Width = 1
- Max = 0.0 [Pa]
- Min = 0.0 [Pa]
- Normal = 1 , 0 , 0
- Option = Point and Normal
- Plane Bound = None
- Plane Type = Slice
- Point = $p1x [mm], $p1y [mm], 0 [mm]
- 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 = Global
- 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
- X = 0.0 [m]
- Y = 0.0 [m]
- Z = 0.0 [m]
- 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
- # Create Plane on Inlet Upstream at Point 2
- PLANE:PlanePt2
- 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 = Constant
- Colour Scale = Linear
- Colour Variable = Pressure
- 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 TRANSFORM:Default Transform
- Invert Plane Bound = Off
- Lighting = On
- Line Colour = 0, 0, 0
- Line Colour Mode = Default
- Line Width = 1
- Max = 0.0 [Pa]
- Min = 0.0 [Pa]
- Normal = 1 , 0 , 0
- Option = Point and Normal
- Plane Bound = None
- Plane Type = Slice
- Point = $p2x [mm], $p2y [mm], 0 [mm]
- 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 = Global
- 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
- X = 0.0 [m]
- Y = 0.0 [m]
- Z = 0.0 [m]
- 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
- POINT:PointLoc3
- Apply Instancing Transform = On
- Colour = 1, 1, 0
- Colour Map = Default Colour Map
- Colour Mode = Constant
- Colour Scale = Linear
- Colour Variable = Pressure
- Colour Variable Boundary Values = Hybrid
- Culling Mode = No Culling
- Domain List = /DOMAIN GROUP:All Domains
- Draw Faces = On
- Draw Lines = Off
- Instancing Transform = /DEFAULT INSTANCE TRANSFORM:Default Transform
- Lighting = On
- Line Width = 2
- Max = 0.0 [Pa]
- Min = 0.0 [Pa]
- Node Number = 1
- Option = XYZ
- Point = $p3x [mm], $p3y [mm], 0 [mm]
- Point Symbol = Crosshair
- Range = Global
- Specular Lighting = On
- Surface Drawing = Smooth Shading
- Symbol Size = 1.0
- Transparency = 0.0
- Variable = Pressure
- Variable Boundary Values = Hybrid
- 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
- # Create Plane on Inlet Upstream at Point 4
- PLANE:PlanePt4
- 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 = Constant
- Colour Scale = Linear
- Colour Variable = Pressure
- 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 TRANSFORM:Default Transform
- Invert Plane Bound = Off
- Lighting = On
- Line Colour = 0, 0, 0
- Line Colour Mode = Default
- Line Width = 1
- Max = 0.0 [Pa]
- Min = 0.0 [Pa]
- Normal = 1 , 0 , 0
- Option = Point and Normal
- Plane Bound = None
- Plane Type = Slice
- Point = $p4x [mm], $p4y [mm], 0 [mm]
- 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 = Global
- 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
- X = 0.0 [m]
- Y = 0.0 [m]
- Z = 0.0 [m]
- 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
- # Create Plane on Inlet Upstream at Point 5
- PLANE:PlanePt5
- 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 = Constant
- Colour Scale = Linear
- Colour Variable = Pressure
- 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 TRANSFORM:Default Transform
- Invert Plane Bound = Off
- Lighting = On
- Line Colour = 0, 0, 0
- Line Colour Mode = Default
- Line Width = 1
- Max = 0.0 [Pa]
- Min = 0.0 [Pa]
- Normal = 1 , 0 , 0
- Option = Point and Normal
- Plane Bound = None
- Plane Type = Slice
- Point = $p5x [mm], $p5y [mm], 0 [mm]
- 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 = Global
- 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
- X = 0.0 [m]
- Y = 0.0 [m]
- Z = 0.0 [m]
- 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
- > update
- # Create Library expressions in CFX POST
- LIBRARY:
- CEL:
- EXPRESSIONS:
- TotalLeakage = 360 * massFlow()@Outlet * 1 [s/kg]
- RotorTorque = 360 * torque_x()@Rotor * 1 [N^-1 m^-1]
- MinRotorYplus = minVal(Yplus)@Rotor
- MaxRotorYplus = maxVal(Yplus)@Rotor
- AvgRotorYplus = ave(Yplus)@Rotor
- MinStatorYplus = minVal(Yplus)@Stator
- MaxStatorYplus = maxVal(Yplus)@Stator
- AvgStatorYplus = ave(Yplus)@Stator
- EmaxResid = maxVal(E Diss K.Residual)@Default Domain
- KmaxResid = maxVal(K TurbKE.Residual)@Default Domain
- PmaxResid = maxVal(P Mass.Residual)@Default Domain
- UmaxResid = maxVal(U Mom.Residual)@Default Domain
- VmaxResid = maxVal(V Mom.Residual)@Default Domain
- WmaxResid = maxVal(W Mom.Residual)@Default Domain
- EavgResid = ave(E Diss K.Residual)@Default Domain
- KavgResid = ave(K TurbKE.Residual)@Default Domain
- PavgResid = ave(P Mass.Residual)@Default Domain
- UavgResid = ave(U Mom.Residual)@Default Domain
- VavgResid = ave(V Mom.Residual)@Default Domain
- WavgResid = ave(W Mom.Residual)@Default Domain
- p1Vax = areaAve_x(Velocity Axial)@PlanePt1 * 1 [s/m]
- p1Vrad = areaAve_x(Velocity Radial)@PlanePt1 * 1 [s/m]
- p1Vcirc = areaAve_x(Velocity in Stn Frame Circumferential)@PlanePt1 * 1 [s/m]
- p1Press = areaAve_x(Pressure)@PlanePt1 * 1 [Pa^-1]
- p2Vax = areaAve_x(Velocity Axial)@PlanePt2 * 1 [s/m]
- p2Vrad = areaAve_x(Velocity Radial)@PlanePt2 * 1 [s/m]
- p2Vcirc = areaAve_x(Velocity in Stn Frame Circumferential)@PlanePt2 * 1 [s/m]
- p2Press = areaAve_x(Pressure)@PlanePt1 * 1 [Pa^-1]
- p3Vax = probe(Velocity Axial)@PointLoc3 * 1 [s/m]
- p3Vrad = probe(Velocity Radial)@PointLoc3 * 1 [s/m]
- p3Vcirc = probe(Velocity in Stn Frame Circumferential)@PointLoc3 * 1 [s/m]
- p3Press = probe(Pressure)@PointLoc3 * 1 [Pa^-1]
- p4Vax = areaAve_x(Velocity Axial)@PlanePt4 * 1 [s/m]
- p4Vrad = areaAve_x(Velocity Radial)@PlanePt4 * 1 [s/m]
- p4Vcirc = areaAve_x(Velocity in Stn Frame Circumferential)@PlanePt4 * 1 [s/m]
- p4Press = areaAve_x(Pressure)@PlanePt1 * 1 [Pa^-1]
- p5Vax = areaAve_x(Velocity Axial)@PlanePt5 * 1 [s/m]
- p5Vrad = areaAve_x(Velocity Radial)@PlanePt5 * 1 [s/m]
- p5Vcirc = areaAve_x(Velocity in Stn Frame Circumferential)@PlanePt5 * 1 [s/m]
- p5Press = areaAve_x(Pressure)@PlanePt1 * 1 [Pa^-1]
- END
- END
- END
- > update
- ! @MaxResids=(getExprString(EmaxResid),getExprString(KmaxResid)
- ! ,getExprString(PmaxResid),getExprString(UmaxResid)
- ! ,getExprString(VmaxResid),getExprString(WmaxResid));
- ! for( @MaxResids ) {
- ! $MaxRes = $_ if !$MaxRes || $_ > $MaxRes;
- ! }
- ! @AveResids=(getExprString(EavgResid),getExprString(KavgResid)
- ! ,getExprString(PavgResid),getExprString(UavgResid)
- ! ,getExprString(VavgResid),getExprString(WavgResid));
- ! for( @AveResids ) {
- ! $AveRes = $_ if !$AveRes || $_ > $AveRes;
- ! }
- !
- ! @OutArray = ( getExprString(TotalLeakage),getExprString(RotorTorque),
- ! getExprString(MinRotorYplus),getExprString(MaxRotorYplus),
- ! getExprString(AvgRotorYplus),getExprString(MinStatorYplus),
- ! getExprString(MaxStatorYplus),getExprString(AvgStatorYplus),
- ! getExprString(p4Vcirc)/($RotorSpeed/60*2*3.14159*$SealRadius/1000),
- ! $MaxRes,$AveRes,getExprString(p1Vax),
- ! getExprString(p1Vrad),getExprString(p1Vcirc),
- ! getExprString(p1Press),getExprString(p2Vax),
- ! getExprString(p2Vrad),getExprString(p2Vcirc),
- ! getExprString(p2Press),getExprString(p3Vax),
- ! getExprString(p3Vrad),getExprString(p3Vcirc),
- ! getExprString(p3Press),getExprString(p4Vax),
- ! getExprString(p4Vrad),getExprString(p4Vcirc),
- ! getExprString(p4Press),getExprString(p5Vax),
- ! getExprString(p5Vrad),getExprString(p5Vcirc),
- ! getExprString(p5Press));
- !my $NumElOut=scalar(@OutArray);
- !splice @splitline, $LeakageIndex, $NumElOut, @OutArray;
- STREAMLINE:TheStreamLines
- Absolute Tolerance = 0.0 [m]
- Apply Instancing Transform = On
- Colour = 0.75, 0.75, 0.75
- Colour Map = Default Colour Map
- Colour Mode = Use Plot Variable
- Colour Scale = Linear
- Colour Variable = Velocity
- Colour Variable Boundary Values = Conservative
- Cross Periodics = On
- Culling Mode = No Culling
- Domain List = /DOMAIN GROUP:All Domains
- Draw Faces = On
- Draw Lines = Off
- Draw Streams = On
- Draw Symbols = Off
- Grid Tolerance = 0.01
- Instancing Transform = /DEFAULT INSTANCE TRANSFORM:Default Transform
- Lighting = On
- Line Width = 1
- Location List = Domain Interface 1 Side 2
- Locator Sampling Method = Equally Spaced
- Max = 0.0 [m s^-1]
- Maximum Number of Items = 25
- Min = 0.0 [m s^-1]
- Number of Samples = 25
- Number of Sides = 8
- Range = Global
- Reduction Factor = 1.0
- Reduction or Max Number = Max Number
- Sample Spacing = 0.1
- Sampling Aspect Ratio = 1
- Sampling Grid Angle = 0 [degree]
- Seed Location List = Inlet
- Seed Point Type = Locations
- Simplify Geometry = Off
- Specular Lighting = On
- Stream Drawing Mode = Line
- Stream Initial Direction = 0 , 0 , 0
- Stream Size = 1.0
- Stream Symbol = Ball
- Streamline Direction = Forward
- Streamline Maximum Periods = 20
- Streamline Maximum Segments = 10000
- Streamline Maximum Time = 0.0 [s]
- Streamline Type = Surface Streamline
- Streamline Width = 2
- Surface Drawing = Smooth Shading
- Surface Streamline Direction = Forward and Backward
- Symbol Size = 1.0
- Symbol Start Time = 10.0 [s]
- Symbol Stop Time = -10.0 [s]
- Symbol Time Interval = 1.0 [s]
- Tolerance Mode = Grid Relative
- Transparency = 0.0
- Variable = Velocity
- Variable Boundary Values = Conservative
- 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
- EXPORT:
- ANSYS Export Data = Element Heat Flux
- ANSYS File Format = ANSYS
- ANSYS Reference Temperature = 0.0 [K]
- ANSYS Specify Reference Temperature = Off
- ANSYS Supplemental HTC = 0.0 [W m^-2 K^-1]
- Additional Variable List =
- BC Profile Type = Inlet Velocity
- Export Connectivity = Off
- Export Coord Frame = Global
- Export File = $StreamExportName
- Export Geometry = On
- Export Location Aliases =
- Export Node Numbers = On
- Export Null Data = On
- Export Type = Generic
- Export Units System = Current
- Export Variable Type = Current
- External Export Data = None
- Include File Information = Off
- Include Header = On
- Location = Domain Interface 1 Side 2
- Location List = /STREAMLINE:TheStreamLines
- Null Token = null
- Overwrite = On
- Precision = 8
- Separator = ", "
- Spatial Variables = X,Y,Z
- Variable List = Axial Distance, Pressure, Radius, Rotation Velocity, \
- Rotation Velocity X, Rotation Velocity Y, Rotation Velocity Z, Streamline Number \
- on TheStreamLines, Time on TheStreamLines, Total Pressure in Rel Frame, Total Pressure \
- in Stn Frame, Velocity Axial, Velocity Circumferential, Velocity in Stn Frame \
- Circumferential, Velocity Radial, X, Y, Z
- Vector Brackets = ()
- Vector Display = Scalar
- END
- >export
- > update
- > setcamera viewport=1, camera=+Z
- >centerview 1
- # Sending visibility action from ViewUtilities
- >show /STREAMLINE:TheStreamLines, view=/VIEW:Turbo Initialisation View
- LEGEND:StreamLegend
- Colour = 0, 0, 0
- Font = Sans Serif
- Legend Aspect = 0.07
- Legend Format = %10.3e
- Legend Orientation = Vertical
- Legend Plot = /STREAMLINE:TheStreamLines
- Legend Position = 0.02 , 0.15
- Legend Size = 0.6
- Legend Ticks = 5
- Legend Title = Legend
- Legend Title Mode = Variable and Location
- Legend X Justification = Right
- Legend Y Justification = Top
- Show Legend Units = On
- Text Colour Mode = Default
- Text Height = 0.024
- Text Rotation = 0
- END
- # Sending visibility action from ViewUtilities
- >show /LEGEND:Legend 1, view=/VIEW:Turbo Initialisation View
- ! my $StreamPicFile = "$CFXdir$CFDbatchName$CaseNum\_Streamlines.png";
- HARDCOPY:
- Antialiasing = On
- Hardcopy Filename = $StreamPicFile
- Hardcopy Format = png
- Hardcopy Tolerance = 0.0001
- Image Height = 600
- Image Scale = 100
- Image Width = 600
- JPEG Image Quality = 80
- Screen Capture = Off
- Use Screen Size = On
- White Background = Off
- END
- >print
- CONTOUR:PressureContour
- Apply Instancing Transform = On
- Clip Contour = Off
- Colour Map = Default Colour Map
- Colour Scale = Linear
- Colour Variable = Pressure
- Colour Variable Boundary Values = Hybrid
- Constant Contour Colour = Off
- Contour Range = Local
- Culling Mode = No Culling
- Domain List = /DOMAIN GROUP:All Domains
- Draw Contours = On
- Font = Sans Serif
- Fringe Fill = On
- Instancing Transform = /DEFAULT INSTANCE TRANSFORM:Default Transform
- Lighting = On
- Line Colour = 0, 0, 0
- Line Colour Mode = Default
- Line Width = 1
- Location List = Domain Interface 1 Side 2
- Max = 0.0 [Pa]
- Min = 0.0 [Pa]
- Number of Contours = 11
- Show Numbers = Off
- Specular Lighting = On
- Surface Drawing = Smooth Shading
- Text Colour = 0, 0, 0
- Text Colour Mode = Default
- Text Height = 0.024
- Transparency = 0.0
- Use Face Values = Off
- Value List = 0 [Pa],1 [Pa]
- 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
- # Sending visibility action from ViewUtilities
- >show /CONTOUR:PressureContour, view=/VIEW:Turbo Initialisation View
- # Sending visibility action from ViewUtilities
- >hide /LEGEND:StreamLegend, view=/VIEW:Turbo Initialisation View
- # Sending visibility action from ViewUtilities
- >hide /STREAMLINE:TheStreamLines, view=/VIEW:Turbo Initialisation View
- LEGEND:Pressure Legend
- Colour = 0, 0, 0
- Font = Sans Serif
- Legend Aspect = 0.07
- Legend Format = %10.3e
- Legend Orientation = Vertical
- Legend Plot = /CONTOUR:PressureContour
- Legend Position = 0.02 , 0.15
- Legend Size = 0.6
- Legend Ticks = 5
- Legend Title = Legend
- Legend Title Mode = Variable and Location
- Legend X Justification = Right
- Legend Y Justification = Top
- Show Legend Units = On
- Text Colour Mode = Default
- Text Height = 0.024
- Text Rotation = 0
- END
- # Sending visibility action from ViewUtilities
- >show /LEGEND:Pressure Legend, view=/VIEW:Turbo Initialisation View
- ! my $PressPicName = "$CFXdir$CFDbatchName$CaseNum\Pressure.png";
- HARDCOPY:
- Antialiasing = On
- Hardcopy Filename = $PressPicName
- Hardcopy Format = png
- Hardcopy Tolerance = 0.0001
- Image Height = 600
- Image Scale = 100
- Image Width = 600
- JPEG Image Quality = 80
- Screen Capture = Off
- Use Screen Size = On
- White Background = Off
- END
- >print
- >close
- ! } #End if statement to check if file exists in directory
- !
- ! } #End if statement for reading input
- ! my $OutString = join(",", @splitline)."\n";
- ! print $OutHandle $OutString;
- !
- ! } # End while loop for line reading
- ! close $InHandle;
- ! close $OutHandle;
- #### cfx5post -batch "E:\Upstream Study\UpstreamStudyResReader.cse"
Advertisement
Add Comment
Please, Sign In to add comment