# 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 = 12.0
END

# MonitorFileNo is an INPUT PARAMETER defined in CFD-Post which
# the user will need to setup and provide the value in the WB
# Design Points table:
# !($val,$valUnits)=evaluate("MonitorFileNo");

# This gets the path of the results file:
!$repPath = getValue( "/DATA READER", "Current Results File" );

# This changes all backslashes to slashes to ensure the following split is
# consistent.  CFD-Post sometimes works with either or both in file paths:
!$repPath =~ s/\\/\//g;

# This splits the path name into an array that holds the path items:
!@pathItems = split(/\//, $repPath);

# This removes the last item on the path, which is the results file name, 
# which we don't care about in this context:
!pop(@pathItems);
!pop(@pathItems);
!pop(@pathItems);
# This adds the volume monitor file name to the path array:
!push(@pathItems, "FFF");
!push(@pathItems, "Fluent");
!push(@pathItems, "residuals.jpg");

# This changes the path array back into a string which can be used in the
# CHART object CCL below to define which file to use (look for the
# "Chart Line Filename" parameter in the CHART CCL below, you will see it
# is assigned a value of "$filename" (no quotes)):
#!$fname = join('/', @pathItems);
!$filename = join('/', @pathItems);

COMMENT:Comment 1
  Comment Exists = True
END

# Comment CCL:
COMMENT:Comment 1
  Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
www.w3.org/TR/REC-html40/strict.dtd"><p style=" margin-top:0px; margin-\
bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-\
indent:0px;"><img src="$filename" title="$filename" ></p>  
  Comment Heading = Simulation Residuals
  Heading Level = 1
END

# Comment to clear Prepend cache. 
# COMMENT:Comment 1
# Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
# END



!pop(@pathItems);
!push(@pathItems, "cm-history.jpg");
!$filename = join('/', @pathItems);
# Comment to clear Prepend cache.

COMMENT:Comment 2
  Comment Exists = True
END

# Comment CCL:
COMMENT:Comment 2
  Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
www.w3.org/TR/REC-html40/strict.dtd"><p style=" margin-top:0px; margin-\
bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-\
indent:0px;"><img src="$filename" title="$filename" ></p>
  Comment Heading = Simulation Moment Monitor
  Heading Level = 1
END

# COMMENT:Comment 5
  # Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
# END

COMMENT:Comment 3
  Comment Exists = True
END

# Comment CCL:
COMMENT:Comment 3
  Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
www.w3.org/TR/REC-html40/strict.dtd"><p style="-qt-paragraph-type:empty; margin-\
top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-\
indent:0; text-indent:0px;"></p>
  Comment Heading = Kla-hr Monitor
  Heading Level = 1
END

# Comment to clear Prepend cache.

!pop(@pathItems);
!pop(@pathItems);
!pop(@pathItems);
# This adds the mon-x.out file names to the path array:
!push(@pathItems, "FLU");
!push(@pathItems, "Fluent");
!push(@pathItems, "vol-mon-1.out");
!$filename = join('/', @pathItems);


CHART:Chart 2
  Chart Axes Font = Tahoma, 10, False, False, False, False
  Chart Axes Titles Font = Tahoma, 10, True, False, False, False
  Chart Grid Line Width = 1
  Chart Horizontal Grid = On
  Chart Legend = On
  Chart Legend Font = Tahoma, 8, False, False, False, False
  Chart Legend Inside = Outside Chart
  Chart Legend Justification = Center
  Chart Legend Position = Bottom
  Chart Legend Width Height = 0.2 , 0.4
  Chart Legend X Justification = Right
  Chart Legend XY Position = 0.73 , 0.275
  Chart Legend Y Justification = Center
  Chart Line Width = 2
  Chart Lines Order = Series 1,Chart Line 1
  Chart Minor Grid = Off
  Chart Minor Grid Line Width = 1
  Chart Symbol Size = 4
  Chart Title = Kla-hr Monitor
  Chart Title Font = Tahoma, 12, True, False, False, False
  Chart Type = XY
  Chart Vertical Grid = On
  Chart X Axis Automatic Number Formatting = On
  Chart X Axis Label = Flow Time (sec)
  Chart X Axis Number Format = %10.3e
  Chart Y Axis Automatic Number Formatting = On
  Chart Y Axis Label = Kla-hr
  Chart Y Axis Number Format = %10.3e
  Default Chart X Variable = Chart Count
  Default Histogram Y Axis Weighting = None
  Default Time Chart X Expression = Time
  Default Time Variable Absolute Value = Off
  Default Time Variable Boundary Values = Conservative
  Default X Variable Absolute Value = Off
  Default X Variable Boundary Values = Conservative
  Default Y Variable Absolute Value = Off
  Default Y Variable Boundary Values = Conservative
  FFT Full Input Range = On
  FFT Max = 0.0
  FFT Min = 0.0
  FFT Subtract Mean = Off
  FFT Window Type = Hanning
  FFT X Function = Frequency
  FFT Y Function = Power Spectral Density
  Histogram Automatic Divisions = Automatic
  Histogram Divisions = -1.0,1.0
  Histogram Divisions Count = 10
  Histogram Y Axis Value = Count
  Is FFT Chart = Off
  Max X = 1.0
  Max Y = 1.0
  Min X = -1.0
  Min Y = -1.0
  Time Chart Keep Single Case = Off
  Use Data For X Axis Labels = Off
  Use Data For Y Axis Labels = Off
  X Axis Automatic Range = On
  X Axis Inverted = Off
  X Axis Logarithmic Scaling = Off
  Y Axis Automatic Range = On
  Y Axis Inverted = Off
  Y Axis Logarithmic Scaling = Off
  CHART SERIES:Series 1
    Chart Line Custom Data Selection = Off
    Chart Line Filename = $filename
    Chart Series Type = From File
    Series Name = Monitor-1
    Time Chart Expression = Time
    Time Chart Type = Point
    CHART LINE:Chart Line 1
      Auto Chart Line Colour = On
      Case Name =
      Chart Line Colour = 1.0, 0.0, 0.0
      Chart Line Style = Automatic
      Chart Line Visibility = On
      Chart Symbol Colour = 0.0, 1.0, 0.0
      Chart Symbol Style = None
      Fill Area = On
      Fill Area Options = Automatic
      Is Valid = True
      Line Name = Monitor-1
      Use Automatic Line Naming = On
    END
  END
END

COMMENT:Comment 4
  Comment Exists = True
END

# Comment CCL:
COMMENT:Comment 4
  Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
www.w3.org/TR/REC-html40/strict.dtd"><p style="-qt-paragraph-type:empty; margin-\
top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-\
indent:0; text-indent:0px;"></p>
  Comment Heading = Blend Time Monitors
  Heading Level = 1
  
END
!pop(@pathItems);
!pop(@pathItems);
!pop(@pathItems);
# This adds the mon-x.out file names to the path array:
!push(@pathItems, "FLU-1");
!push(@pathItems, "Fluent");
!push(@pathItems, "mon-1.out");
!$filename = join('/', @pathItems);
!pop(@pathItems);
!push(@pathItems, "mon-2.out");
!$fname2 = join('/', @pathItems);
!pop(@pathItems);
!push(@pathItems, "mon-3.out");
!$fname3 = join('/', @pathItems);
!pop(@pathItems);
!push(@pathItems, "mon-4.out");
!$fname4 = join('/', @pathItems);

CHART:Chart 3
  Chart Axes Font = Tahoma, 10, False, False, False, False
  Chart Axes Titles Font = Tahoma, 10, True, False, False, False
  Chart Grid Line Width = 1
  Chart Horizontal Grid = On
  Chart Legend = On
  Chart Legend Font = Tahoma, 8, False, False, False, False
  Chart Legend Inside = Outside Chart
  Chart Legend Justification = Center
  Chart Legend Position = Bottom
  Chart Legend Width Height = 0.2 , 0.4
  Chart Legend X Justification = Right
  Chart Legend XY Position = 0.73 , 0.275
  Chart Legend Y Justification = Center
  Chart Line Width = 2
  Chart Lines Order = Series 1,Chart Line 1,Series 2,Chart Line 2,Series 3,Chart Line 3,Series 4,Chart Line 4
  Chart Minor Grid = Off
  Chart Minor Grid Line Width = 1
  Chart Symbol Size = 4
  Chart Title = Blend Time Monitors
  Chart Title Font = Tahoma, 12, True, False, False, False
  Chart Type = XY
  Chart Vertical Grid = On
  Chart X Axis Automatic Number Formatting = On
  Chart X Axis Label = Flow Time (sec)
  Chart X Axis Number Format = %10.3e
  Chart Y Axis Automatic Number Formatting = On
  Chart Y Axis Label = Mass fraction of tracer
  Chart Y Axis Number Format = %10.3e
  Default Chart X Variable = Chart Count
  Default Histogram Y Axis Weighting = None
  Default Time Chart X Expression = Time
  Default Time Variable Absolute Value = Off
  Default Time Variable Boundary Values = Conservative
  Default X Variable Absolute Value = Off
  Default X Variable Boundary Values = Conservative
  Default Y Variable Absolute Value = Off
  Default Y Variable Boundary Values = Conservative
  FFT Full Input Range = On
  FFT Max = 0.0
  FFT Min = 0.0
  FFT Subtract Mean = Off
  FFT Window Type = Hanning
  FFT X Function = Frequency
  FFT Y Function = Power Spectral Density
  Histogram Automatic Divisions = Automatic
  Histogram Divisions = -1.0,1.0
  Histogram Divisions Count = 10
  Histogram Y Axis Value = Count
  Is FFT Chart = Off
  Max X = 1.0
  Max Y = 1.0
  Min X = -1.0
  Min Y = -1.0
  Time Chart Keep Single Case = Off
  Use Data For X Axis Labels = Off
  Use Data For Y Axis Labels = Off
  X Axis Automatic Range = On
  X Axis Inverted = Off
  X Axis Logarithmic Scaling = Off
  Y Axis Automatic Range = On
  Y Axis Inverted = Off
  Y Axis Logarithmic Scaling = Off
  CHART SERIES:Series 1
    Chart Line Custom Data Selection = Off
    Chart Line Filename = $filename
    Chart Series Type = From File
    Series Name = Monitor-1
    Time Chart Expression = Time
    Time Chart Type = Point
    CHART LINE:Chart Line 1
      Auto Chart Line Colour = On
      Case Name =
      Chart Line Colour = 1.0, 0.0, 0.0
      Chart Line Style = Automatic
      Chart Line Visibility = On
      Chart Symbol Colour = 0.0, 1.0, 0.0
      Chart Symbol Style = None
      Fill Area = On
      Fill Area Options = Automatic
      Is Valid = True
      Line Name = Monitor-1
      Use Automatic Line Naming = On
    END
  END
  CHART SERIES:Series 2
    Chart Line Custom Data Selection = Off
    Chart Line Filename = $fname2
    Chart Series Type = From File
    Series Name = Monitor-2
    Time Chart Expression = Time
    Time Chart Type = Point
    CHART LINE:Chart Line 2
      Auto Chart Line Colour = On
      Case Name =
      Chart Line Colour = 1.0, 0.0, 0.0
      Chart Line Style = Automatic
      Chart Line Visibility = On
      Chart Symbol Colour = 0.0, 1.0, 0.0
      Chart Symbol Style = None
      Fill Area = On
      Fill Area Options = Automatic
      Is Valid = True
      Line Name = Monitor-2
      Use Automatic Line Naming = On
    END
  END
  CHART SERIES:Series 3
    Chart Line Custom Data Selection = Off
    Chart Line Filename = $fname3
    Chart Series Type = From File
    Series Name = Monitor-3
    Time Chart Expression = Time
    Time Chart Type = Point
    CHART LINE:Chart Line 3
      Auto Chart Line Colour = On
      Chart Line Colour = 1.0, 0.0, 0.0
      Chart Line Style = Automatic
      Chart Line Visibility = On
      Chart Symbol Colour = 0.0, 1.0, 0.0
      Chart Symbol Style = None
      Fill Area = On
      Fill Area Options = Automatic
      Is Valid = True
      Line Name = Monitor-3
      Use Automatic Line Naming = On
    END
  END
  CHART SERIES:Series 4
    Chart Line Custom Data Selection = Off
    Chart Line Filename = $fname4
    Chart Series Type = From File
    Series Name = Monitor-4
    Time Chart Expression = Time
    Time Chart Type = Point
    CHART LINE:Chart Line 4
      Auto Chart Line Colour = On
      Chart Line Colour = 1.0, 0.0, 0.0
      Chart Line Style = Automatic
      Chart Line Visibility = On
      Chart Symbol Colour = 0.0, 1.0, 0.0
      Chart Symbol Style = None
      Fill Area = On
      Fill Area Options = Automatic
      Is Valid = True
      Line Name = Monitor-4
      Use Automatic Line Naming = On
    END
  END
END

!pop(@pathItems);
!push(@pathItems, "animation.gif");
!$filename = join('/', @pathItems);
# Comment to clear Prepend cache.

COMMENT:Comment 5
  Comment Exists = True
END

# Comment CCL:
COMMENT:Comment 5
  Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
www.w3.org/TR/REC-html40/strict.dtd"><p style=" margin-top:0px; margin-\
bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-\
indent:0px;"><img src="$filename" title="$filename" ></p>
  Comment Heading = Animation of Tracer Blending
  Heading Level = 1
END

# COMMENT:Comment 5
  # Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
# END

!pop(@pathItems);
!pop(@pathItems);
!pop(@pathItems);
# This adds the exposure histogram files name to the path array:
!push(@pathItems, "FLU-2");
!push(@pathItems, "Fluent");
!push(@pathItems, "kol-histogram.jpg");
!$filename = join('/', @pathItems);

COMMENT:Comment 6
  Comment Exists = True
END

# Comment to clear Prepend cache.
# Comment CCL:
COMMENT:Comment 6
  Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
www.w3.org/TR/REC-html40/strict.dtd"><p style=" margin-top:0px; margin-\
bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-\
indent:0px;"><img src="$filename" title="$filename" ></p>
  Comment Heading = Kolmogorov Mixing Length Histogram
  Heading Level = 1
END

# COMMENT:Comment 5
  # Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
# END


!pop(@pathItems);
# This adds the exposure histogram files name to the path array:
!push(@pathItems, "strain-histogram.jpg");
!$filename = join('/', @pathItems);

# Comment to clear Prepend cache.
# Comment CCL:

COMMENT:Comment 7
  Comment Exists = True
END

COMMENT:Comment 7
  Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
www.w3.org/TR/REC-html40/strict.dtd"><p style=" margin-top:0px; margin-\
bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-\
indent:0px;"><img src="$filename" title="$filename" ></p>
  Comment Heading = Strain Rate Histogram
  Heading Level = 1
END

# COMMENT:Comment 5
  # Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
# END



!pop(@pathItems);
# This adds the exposure histogram files name to the path array:
!push(@pathItems, "diss-histogram.jpg");
!$filename = join('/', @pathItems);

# Comment to clear Prepend cache.
# Comment CCL:

COMMENT:Comment 8
  Comment Exists = True
END

COMMENT:Comment 8
  Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
www.w3.org/TR/REC-html40/strict.dtd"><p style=" margin-top:0px; margin-\
bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-\
indent:0px;"><img src="$filename" title="$filename" ></p>
  Comment Heading = Turbulent Dissipation Rate Histogram
  Heading Level = 1
END

# COMMENT:Comment 5
  # Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
# END

!pop(@pathItems);
# This adds the exposure histogram files name to the path array:
!push(@pathItems, "tke-histogram.jpg");
!$filename = join('/', @pathItems);

# Comment to clear Prepend cache.
# Comment CCL:

COMMENT:Comment 9
  Comment Exists = True
END

COMMENT:Comment 9
  Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
www.w3.org/TR/REC-html40/strict.dtd"><p style=" margin-top:0px; margin-\
bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-\
indent:0px;"><img src="$filename" title="$filename" ></p>
  Comment Heading = Turbulent Kinetic Energy Histogram
  Heading Level = 1
END

# COMMENT:Comment 5
  # Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
# END

!pop(@pathItems);
# This adds the exposure histogram files name to the path array:
!push(@pathItems, "zbyt-histogram.jpg");
!$filename = join('/', @pathItems);

# Comment to clear Prepend cache.
# Comment CCL:
COMMENT:Comment 10
  Comment Exists = True
END

COMMENT:Comment 10
  Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
www.w3.org/TR/REC-html40/strict.dtd"><p style=" margin-top:0px; margin-\
bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-\
indent:0px;"><img src="$filename" title="$filename" ></p>
  Comment Heading = Dimensionless Z-coordinate Histogram
  Heading Level = 1
END

# COMMENT:Comment 5
  # Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
# END

!pop(@pathItems);
# This adds the exposure histogram files name to the path array:
!push(@pathItems, "zonal-rtd.jpg");
!$filename = join('/', @pathItems);

# Comment to clear Prepend cache.
# Comment CCL:
COMMENT:Comment 11
  Comment Exists = True
END

COMMENT:Comment 11
  Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
www.w3.org/TR/REC-html40/strict.dtd"><p style=" margin-top:0px; margin-\
bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-\
indent:0px;"><img src="$filename" title="$filename" ></p>
  Comment Heading = Zonal RTD Histogram
  Heading Level = 1
END

# COMMENT:Comment 10
  # Comment Text = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://\
# END

!pop(@pathItems);
!push(@pathItems, "data-table.csv");
!$filename = join('/', @pathItems);
>table load=$filename, name =Zonal RTD Statistics

TABLE:Zonal RTD Statistics
  OBJECT REPORT OPTIONS:
    Report Caption = Zonal RTD Statistics
  END
END
