butterfly.fields module

OpenFOAM field values.

class butterfly.fields.AlphatJayatillekeWallFunction(value, is_uniform=True, Prt=None)[source]

Bases: butterfly.fields.FixedValue

alphatJayatillekeWallFunction.

value_dict

Get fields as a dictionary.

class butterfly.fields.AtmBoundary(Uref, Zref, z0, flowDir, zDir='(0 0 1)', zGround=0, from_values=True)[source]

Bases: butterfly.fields.Field

OpenFOAM AtmBoundaryLayerInletVelocity.

uref

Flow velocity as a float number.

Zref

Reference z value for flow velocity as a float number.

z0

Roughness (e.g. uniform 1).

flowDir

Velocity vector as a tuple.

zDir

Z direction (default:(0 0 1)).

zGround

Min z value of the bounding box (default: 0).

from_values

True.

classmethod from_ABLConditions(ABLConditions, value=None)[source]

Init class from a condition file.

value_dict

Get fields as a dictionary.

class butterfly.fields.AtmBoundaryLayerInletEpsilon(Uref, Zref, z0, flowDir, zDir='(0 0 1)', zGround=0, from_values=True)[source]

Bases: butterfly.fields.AtmBoundary

AtmBoundaryLayerInletEpsilon.

class butterfly.fields.AtmBoundaryLayerInletK(Uref, Zref, z0, flowDir, zDir='(0 0 1)', zGround=0, from_values=True)[source]

Bases: butterfly.fields.AtmBoundary

AtmBoundaryLayerInletK.

class butterfly.fields.AtmBoundaryLayerInletVelocity(Uref, Zref, z0, flowDir, zDir='(0 0 1)', zGround=0, from_values=True)[source]

Bases: butterfly.fields.AtmBoundary

AtmBoundaryLayerInletVelocity.

class butterfly.fields.Calculated(value=None, is_unifrom=True)[source]

Bases: butterfly.fields.Field

OpenFOAM calculated value.

Parameters:
  • value – value.
  • is_unifrom – A boolean that indicates if the values is uniform.
value_dict

Get fields as a dictionary.

class butterfly.fields.Empty[source]

Bases: butterfly.fields.Field

Empty boundary condition.

class butterfly.fields.EpsilonWallFunction(value, cmu=None, kappa=None, E=None, is_unifrom=True)[source]

Bases: butterfly.fields.WallFunction

EpsilonWallFunction.

Parameters:
  • value
  • cmu – (default: None)
  • kappa – (default: None)
  • E – (default: None)
value_dict

Get fields as a dictionary.

class butterfly.fields.Field[source]

Bases: object

OpenFOAM field values base class.

ToString()[source]

Overwrite .NET ToString method.

duplicate()[source]

Return a copy of this object.

classmethod from_dict(d)[source]

Create a field from a dictionary.

classmethod from_string(st)[source]

Create a field from a string.

value_dict

Get fields as a dictionary.

class butterfly.fields.FixedFluxPressure(value, is_uniform=True, rho=None)[source]

Bases: butterfly.fields.FixedValue

FixedFluxPressure.

value_dict

Get fields as a dictionary.

class butterfly.fields.FixedValue(value, is_unifrom=True)[source]

Bases: butterfly.fields.Field

OpenFOAM fixed value.

Parameters:
  • value – value.
  • is_unifrom – A boolean that indicates if the values is uniform.
value_dict

Get fields as a dictionary.

class butterfly.fields.FlowRateInletVelocity(volumetricFlowRate, value, is_uniform=True)[source]

Bases: butterfly.fields.FixedValue

FlowRateInletVelocity.

value_dict

Get fields as a dictionary.

class butterfly.fields.InletOutlet(inletValue, value)[source]

Bases: butterfly.fields.Field

OpenFOAM InletOutlet value.

http://www.cfd-online.com/Forums/openfoam-solving/60337-questions-about -inletoutlet-outletinlet-boundary-conditions.html

value_dict

Get fields as a dictionary.

class butterfly.fields.KqRWallFunction(value, is_unifrom=True)[source]

Bases: butterfly.fields.WallFunction

KqRWallFunction.

class butterfly.fields.NutkAtmRoughWallFunction(Uref, Zref, z0, flowDir, zDir='(0 0 1)', zGround=0, from_values=True)[source]

Bases: butterfly.fields.AtmBoundary

NutkAtmRoughWallFunction.

class butterfly.fields.NutkWallFunction(value, cmu=None, kappa=None, E=None, is_unifrom=True)[source]

Bases: butterfly.fields.EpsilonWallFunction

NutkWallFunction.

class butterfly.fields.OutletInlet(outletValue, value)[source]

Bases: butterfly.fields.Field

OpenFOAM OutletInlet value.

http://www.cfd-online.com/Forums/openfoam-solving/60337-questions-about -inletoutlet-outletinlet-boundary-conditions.html

value_dict

Get fields as a dictionary.

class butterfly.fields.PressureInletOutletVelocity(value, is_unifrom=True)[source]

Bases: butterfly.fields.FixedValue

PressureInletOutletVelocity.

class butterfly.fields.Slip[source]

Bases: butterfly.fields.Field

Slip boundary condition.

class butterfly.fields.WallFunction(value, is_unifrom=True)[source]

Bases: butterfly.fields.FixedValue

WallFunction.

class butterfly.fields.ZeroGradient[source]

Bases: butterfly.fields.Field

ZeroGradient boundary condition.