casefoam.CaseFoamManipulator.updateParameter

CaseFoamManipulator.updateParameter(parameter, parameterUpdate)[source]

Update content of a parameter.

Parameters:
parameter : str

Parameter to update.

parameterUpdate : dict

Dictionary with parts to update.

Examples

>>> case.U.content
{'boundaryField': {'bottom': {'type': 'symmetryPlane'},
  'defaultFaces': {'type': 'empty'},
  'inlet': {'type': 'fixedValue', 'value': 'uniform (2 0 0)'},
  'obstacle': {'type': 'slip'},
  'outlet': {'inletValue': 'uniform (3 0 0)',
   'type': 'inletOutlet',
   'value': 'uniform (3 0 0)'},
  'top': {'type': 'symmetryPlane'}},
 'dimensions': '[ 0 1 -1 0 0 0 0 ]',
 'internalField': 'uniform (3 0 0)'}
>>> update = {'boundaryField': {
                'inlet': {'value': 'uniform (1 0 0)'}}}
>>> case.updateParameter('U', update)
>>> case.U.content
{'boundaryField': {'bottom': {'type': 'symmetryPlane'},
  'defaultFaces': {'type': 'empty'},
  'inlet': {'type': 'fixedValue', 'value': 'uniform (1 0 0)'},
  'obstacle': {'type': 'slip'},
  'outlet': {'inletValue': 'uniform (3 0 0)',
   'type': 'inletOutlet',
   'value': 'uniform (3 0 0)'},
  'top': {'type': 'symmetryPlane'}},
 'dimensions': '[ 0 1 -1 0 0 0 0 ]',
 'internalField': 'uniform (3 0 0)'}
Attributes:
parameter

Updated parameter