XY plots (plots)

Basic post-processing plots

Module allows the user to create convergence plots, plots of radial distributions, and performance maps for one or more testcases.

For user-specific plots the user may specify test cases, speedlines, operating points, and rowLists and/or set limits for specific variables.

To develop into generic turbo-machinery specific plotting later on.

Associated Modules

plotOptions

plotOptions

selectedItemsByNameOrId

selectedItemsByNameOrId - list of items selected by name and/or index

setLimitsForVariables

setLimitsForVariables - set minimum and maximum plot values for specified variable

plotConvergence

plotConvergence - convergence behavior

plotPerformance

plotPerformance - performance data

plotRadialDistributions

plotRadialDistributions - radial distributions

Usage


  File "<stdin>", line 3
    print arguments
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(arguments)?

Modules

plotOptions

Parser for analyse options (used in plotdata.py)

required classes and methods:

from plots.selectedItemsByNameOrId import selectedItemsByNameOrId
from plots.setLimitsForVariables import setLimitsForVariables
plotOptionParser(allPaperSizes=('a4', 'a5', 'a6', 'presentation'), allPaperOrientations=('portrait', 'landscape'), allAverageTypes=('flux', 'area', 'mass'))[source]

Contains all settings regarding post-processing plots

Parameters
  • allPaperSizes (list of strings) – all allowed paper sizes

  • allPaperOrientations (list of strings) – all possible paper orientations

  • allAverageTypes (list of strings) – all available average types

Returns

command line options, list of remaining arguments

Return type

OptionParser.parse_args()

The returned option class contains the following settings

Options:
  • inputfile (str) - read data from CGNS file or TTCML/XML file

  • inputPath (str) - base path to access test cases

  • outputPath (str) - output directory where the information is stored (default: ‘./analysis’)

  • papersize (str) - paper size of pictures: ‘a4’, ‘a5’, ‘a6’, ‘presentation’ (default: ‘a4’)

  • paperorientation (str) - orientation of pictures: ‘portrait’, ‘landscape’ (default: ‘portrait’)

  • showTraceLogo (str) - file path to TRACE logo

  • showAll (bool) - show all plots (default: False)

  • showConv (bool) - show convergence plot (default: False)

  • showResBlocks (list of integers) - set residual blocks by index

  • showPerformance (bool) - create performance map (default: False)

  • showRadialDistribution (bool) - show radial distributions (default: False)

  • plotLimits - set min and max values for specified variables

  • showTestcase - specify test cases by name or index

  • showSpeedlines (list of integers) - specify speedlines

  • showOperatingPoint (list of integers) - specify operating points by index

  • showRowList (list of integers) - specify row list by index

  • averageType (str) - specify average type: ‘flux’, ‘area’, ‘mass’, None (default: ‘flux’)

  • verbose (int) - print output level

  • devHelp (bool) - print class information

Options (not yet in proper use):
  • reference - set reference

  • experiment - use experimental data

  • writeErrors - error handling

selectedItemsByNameOrId - list of items selected by name and/or index

class SelectedItemsByNameOrId(idTags=None, nameTags=None)[source]

List of items selected by name and/or index

idTags — indices of selected test cases nameTags — names of selected test cases noOfAllTags — overall number of selected test cases

findItems(itemList=None, verbose=0)[source]

returns a list of the specified items. itemList must be a list of structures containing the variable name

setLimitsForVariables - set minimum and maximum plot values for specified variable

class SetLimitsForVariables(name='', minimum=0.0, maximum=0.0)[source]

Set minimum and maximum plot values for specified variable

idTags — indices of selected test cases nameTags — names of selected test cases noOfAllTags — overall number of selected test cases

plotConvergence - convergence behavior

plots for convergence behavior (residual, mass flow rate)

createConvergenceMap(tcList, analysisOptions, averageType='', speedline=0, rowListIndex=0, resBlocks=None, operatingPoints=None, logoFile=None, writeErrors=None, verbose=0)[source]

Create data to show mass flow convergence for all specified operating points and specified test cases for specific speed line The images contain plots of the L1 residual and the maximum residual as well as the inlet and outlet mass flow over the overall time step.

Parameters: tcList - list of testcase objects (required) analysisOptions - optionParser object (required) speedline - speed line index operatingPoints - list of operating point indices writeErrors - error handle verbose - print output level

processResidualData(testcase, averageType='', opList=None, op=None, plotId=0, rowListIndex=0, resBlocks=None, resMax=False, writeErrors=None, verbose=0)[source]

Collects the data for the convergence plot from residual and boundary files

Parameters: testcase - testcase object (required) opList - index of oplist op - list of op indices plotId - index for plot style rowListIndex - index of row list writeErrors - error handle verbose - print output level

plotPerformance - performance data

plots for performance data

required classes and methods:

from tecplotData import tecplotDataset
from plotting import plotData, speedlinePlot, plotStyle
createPerformanceMap(tcList, analysisOptions, averageType='', speedlines=None, operatingPoints=None, reference=None, logoFile=None, verbose=0)[source]

Create performance map for all specified operating points, speedlines, and test cases Performance map is suited only for compressors. The image contains plots for efficiency and total pressure ratio over the mass flow rate.

Parameters: tcList - list of testcase objects (required) analysisOptions - optionParser object (required) speedlines - list of speed line indices operatingPoints - list of operating point indices reference - reference solution (specify version number as string) verbose - print output level

processSingleSpeedline(testcase, averageType='', opList=None, operatingPoints=None, plotId=0, reference=None, verbose=0)[source]

Generate a single speed line from opList data. Performance map is suited only for COMPRESSORS.

Parameters: tcList - list of testcase objects (required) opList - optionParser object (required) operatingPoints - list of operating point indices plotId - list of operating point indices reference - reference solution (specify version number as string) verbose - print output level

plotRadialDistributions - radial distributions

required classes and methods:

from tecplotData import tecplotDataset

from plotting import plotData, radialPlot, plotStyle

from traceControl.traceIO import inControlFile
createRadialDistributionPlots(tcList, analysisOptions, averageType='', speedline=0, operatingPoints=None, rowListIndex=0, showInOut=0, logoFile=None, verbose=0)[source]

Create individual radial distribution images for all specified operating points containing the specified test cases The images contain 9 radial plots of relative Mach number, absolute total pressure, absolute total temperature, absolute circumferential velocity angle, relative circumferential velocity angle, radial velocity angle, axial velocity component, relative/absolute circumferential velocity component, radial velocity component.

Parameters: tcList - list of testcase objects (required) analysisOptions - optionParser object (required) speedline - specified index of speed line operatingPoints - list of operating point indices rowListIndex - index of rowList showInOut - position of plotted lines (0 - inlet, 1 - outlet, 2 - inlet/outlet) verbose - print output level

processRadialDistributions(testcase, averageType='', opList=None, operatingPoints=None, indexRow=0, rowListIndex=0, showInOut=0, plotId=0, verbose=0)[source]

Collect plot data for radial distributions

Arguments: testcase - testcase object (required) opList - index of opList operatingPoints - list of operating point inidces indexRow - index of blade row rowListIndex - index of rowList showInOut - position of plotted lines (0 - inlet, 1 - outlet, 2 - inlet/outlet) plotId - index of plot style settings verbose - print output level