PyFoam.RunDictionary.BlockMesh module
Manipulate a C{blockMeshDict}
- class PyFoam.RunDictionary.BlockMesh.BlockMesh(name, backup=False)[source]
Bases:
FileBasisBackupRepresents a C{blockMeshDict}-file
- __annotations__ = {}
- __endProcess(newMesh, getContent=True)
- __init__(name, backup=False)[source]
- Parameters:
name – The name of the parameter file
backup – create a backup-copy of the file
- __module__ = 'PyFoam.RunDictionary.BlockMesh'
- __startProcess()
- _getVertexes()[source]
Get a dictionary with the 3 components of each vertex as keys and the ‘raw’ line as the value
- numberVertices(prefix='')[source]
Add comments with the number of the vertex after them :param prefix: a string to add before the number
- refineMesh(factors, offset=(0, 0, 0), getContent=False, addOld=True)[source]
Refine the Mesh by multiplying the number of cells in the blocks :param factors: either a scalar to scale in all directions or a tuple with the value for each direction :param offset: an optional tuple for an additionnal offset value for each direction :param getContent: Return the contents instead of writing a fil. Main purpose of this parameter is not to break compatibility with old versions