butterfly.recipe module

Butterfly recipes.

class butterfly.recipe.HeatTransfer(turbulenceProperties=None, fvSolution=None, fvSchemes=None, residualControl=None, relaxationFactors=None, TRef=None)[source]

Bases: butterfly.recipe._SingleCommandRecipe

Recipe for heat transfer.

This recipe excutes buoyantBoussinesqSimpleFoam for the input case.

turbulenceProperties

Turbulence properties.

fvSolution

Optional input for fvSolution to overwrite default fvSolution.

fvSchemes

Optional input for fvSchemes to overwrite default fvSchemes.

residualControl

A dictionary of values for residualControl of quantities.

relaxationFactors

A list of values for relaxationFactors of quantities.

prepare_case(case, overwrite=False, remove=False)[source]

Prepare a case for this recipe.

This method sets up the application in control dict and double checks files under Zero folder for each quantities. It creates, overwrites or removes the files if needed. Solution class calls this method on initialization.

Parameters:
  • case – A Butterfly case.
  • overwrite – Set to True to overwrite current files.
  • remove – Set to True to remove extra files in the folder.
class butterfly.recipe.SteadyIncompressible(turbulenceProperties=None, fvSolution=None, fvSchemes=None, residualControl=None, relaxationFactors=None)[source]

Bases: butterfly.recipe._SingleCommandRecipe

Recipe for Steady Incompressible flows.

This recipe excutes simpleFoam for the input case.

turbulenceProperties

Turbulence properties.

fvSolution

Optional input for fvSolution to overwrite default fvSolution.

fvSchemes

Optional input for fvSchemes to overwrite default fvSchemes.

residualControl

A dictionary of values for residualControl of quantities.

relaxationFactors

A list of values for relaxationFactors of quantities.