PyFoam.RunDictionary.TimelineDirectory module

Working with a directory of timelines

Currently not optimal as it reads the files more often than necessary

class PyFoam.RunDictionary.TimelineDirectory.TimelineDirectory(case=None, dirName='probes', writeTime=None)[source]

Bases: object

A directory of sampled times

__contains__(value)[source]
__dict__ = dict_proxy({'__module__': 'PyFoam.RunDictionary.TimelineDirectory', '__getitem__': <function __getitem__>, '__contains__': <function __contains__>, 'positions': <function positions>, 'timeRange': <function timeRange>, '__iter__': <function __iter__>, '__len__': <function __len__>, '__init__': <function __init__>, '__dict__': <attribute '__dict__' of 'TimelineDirectory' objects>, 'getData': <function getData>, '__weakref__': <attribute '__weakref__' of 'TimelineDirectory' objects>, '__doc__': 'A directory of sampled times', 'getDataLocation': <function getDataLocation>})
__getitem__(value)[source]
__init__(case=None, dirName='probes', writeTime=None)[source]
Parameters:
  • case – The case directory
  • dirName – Name of the directory with the timelines
  • writeTime – The write time-directory where the data in question is to be plotted
__iter__()[source]
__len__()[source]
__module__ = 'PyFoam.RunDictionary.TimelineDirectory'
__weakref__

list of weak references to the object (if defined)

getData(times, value=None, position=None, vectorMode=None)[source]

Get data that mstches the given times most closely :param times: a list with times :param value: name of the value. All if unspecified :param position: name of the position of the value. All if unspecified :param vectorMode: which component of the vector to use

getDataLocation(value=None, position=None, vectorMode=None)[source]

Get Timeline sets :param value: name of the value. All if unspecified :param position: name of the position of the value. All if unspecified

positions()[source]

Returns all the found positions

timeRange()[source]

Return the range of possible times

class PyFoam.RunDictionary.TimelineDirectory.TimelineValue(sDir, val, time)[source]

Bases: object

A file with one timelined value

__call__(addTitle=True)[source]

Return the data as a SpreadsheetData-object

__dict__ = dict_proxy({'__module__': 'PyFoam.RunDictionary.TimelineDirectory', '__dict__': <attribute '__dict__' of 'TimelineValue' objects>, 'timeRange': <function timeRange>, 'isProbe': <function isProbe>, '__repr__': <function __repr__>, '__call__': <function __call__>, 'getData': <function getData>, '__weakref__': <attribute '__weakref__' of 'TimelineValue' objects>, '__doc__': 'A file with one timelined value', '__init__': <function __init__>})
__init__(sDir, val, time)[source]
Parameters:
  • sDir – The timeline-dir
  • val – the value
  • time – the timename
__module__ = 'PyFoam.RunDictionary.TimelineDirectory'
__repr__() <==> repr(x)[source]
__weakref__

list of weak references to the object (if defined)

getData(times, vectorMode=None)[source]

Get the data values that are nearest to the actual times

isProbe()[source]

Is this a probe-file

timeRange()[source]

Range of times