butterfly.conditions module

ABL Conditions and initialConditions class.

class butterfly.conditions.ABLConditions(values=None)[source]

Bases: butterfly.foamfile.Condition

ABL Conditions.

Uref

Get flow speed as a float.

Zref

Get reference z value for input wind speed- usually 10 meters

flowDir

Get flow dir as tuple (x, y, z).

flow_speed

Get flow speed as a float.

classmethod from_file(filepath)[source]

Create a FoamFile from a file.

Parameters:filepath – Full file path to dictionary.
classmethod from_input_values(flow_speed, z0, flowDir, zGround)[source]

Get ABLCondition.

classmethod from_wind_tunnel(wind_tunnel)[source]

Init class from wind tunnel.

z0

roughness - default is set to 1 for urban environment

zDir

z direction. (0 0 1) for wind tunnel

zGround

uniform 0)

Type:Min z value of the bounding box (default
class butterfly.conditions.InitialConditions(values=None, Uref=0, Zref=10, z0=1, cm=0.09, k=0.41)[source]

Bases: butterfly.foamfile.Condition

Initial conditions.

Uref

Input velocity in m/s.

Zref

Input height reference for input velocity in meters.

calculate_k_epsilon(init=False)[source]

Calculate turbulentKE and turbulentEpsilon.

Parameters:init – True if the method is called when the class is initiated (default: False).
cm

default: 0.09

classmethod from_file(filepath)[source]

Create a FoamFile from a file.

Parameters:filepath – Full file path to dictionary.
k

default: 0.41

z0

Roughness.