PyFoam.RunDictionary.SolutionFile module

Working with solutions

class PyFoam.RunDictionary.SolutionFile.SolutionFile(directory, name)[source]

Bases: PyFoam.RunDictionary.FileBasis.FileBasis

Solution data file

Represents a file with the solution data for one OpenFOAM-field at one point of time

Currently this can only handle uniform field values (and never will handle more because the ParsedParameterFile-class does a much better job)

dimensionPattern()[source]

pattern for the dimension string

getContent(treatBinaryAsASCII=False, listLengthUnparsed=None, doMacroExpansion=False)[source]

Returns the parsed content of the file

getDimensionString()[source]

builds a dimension string from the dimension information in the file

internalPattern()[source]

pattern for internal fields

internalPatternGeneral()[source]

general pattern for internal fields

internalPatternUniform()[source]

pattern for internal fields

readBoundary(name)[source]

read the value at a boundary

name - the name of the boundary patch

readDimension()[source]

read the dimension of the field

readInternal()[source]

read the value of the internal field

readInternalUniform()[source]

read the value of the internal field

replaceBoundary(name, newval)[source]

write the value at a boundary

Parameters:
  • name – the name of the boundary patch
  • newval – the new value
replaceInternal(newval)[source]

overwrite the value of the internal field

newval - the new value

stopPattern()[source]

pattern that ends a boundary

valuePattern()[source]

pattern for values