butterfly.fvSchemes module

Finite Volume Schemes class.

class butterfly.fvSchemes.FvSchemes(values=None)[source]

Bases: butterfly.foamfile.FoamFile

Finite Volume Schemes class.

divSchemesCollector = {0: '// first order\ndivSchemes\n{\n default none;\n div(phi,epsilon) bounded Gauss upwind default;\n div(phi,U) bounded Gauss upwind grad(U);\n div((nuEff*dev2(T(grad(U))))) Gauss linear;\n div(phi,k) bounded Gauss upwind grad(k);\n}\n', 1: '// second order\ndivSchemes\n{\n default none;\n div(phi,epsilon) bounded Gauss linearUpwind grad(epsilon);\n div(phi,U) bounded Gauss linearUpwind grad(U);\n div((nuEff*dev2(T(grad(U))))) Gauss linear;\n div(phi,k) bounded Gauss linearUpwind grad(k);\n}'}
classmethod from_file(filepath)[source]

Create a FoamFile from a file.

Parameters:filepath – Full file path to dictionary.
classmethod from_mesh_orthogonality(average_orthogonality=45)[source]

Init fvSchemes based on mesh orthogonality.

Check pp. 45-50 of this document: http://www.dicat.unige.it/guerrero/oftraining/9tipsandtricks.pdf

classmethod from_recipe(recipe=0)[source]

Create an fvSchemes from recipe id.

0 > SteadyIncompressible 1 > HeatTransfer

static get_values_from_mesh_orthogonality(average_orthogonality=45)[source]

Get scheme values from orthogonality.