Git Product home page Git Product logo

butterfly's Introduction

Screenshot

Butterfly

A python API for OpenFoam which will be used to create a plugin to connect Grasshopper3D to OpenFoam for CFD simulation!

Usage

from butterfly import core
import butterfly.solvers as solvers

## initiate project
p = core.BFProject("test")

# boundary conditions in the model
bConditions = ["floor", "ceiling", "fixedWalls"]

# create the solver with default values
# you can create your own solver by using solvers.Solver > check solver.py for examples
p_rgh = solvers.P_RGH()
# add boundary field
for bc in bConditions: p_rgh.add_boundaryField(bc, other = {"rho":"rhok"})
p.add_solver(p_rgh) #add p_rgh to project

# add one more solver as an example
k = solvers.K()
for bc in bConditions: k.add_boundaryField(bc)
p.add_solver(k) # add to project

# TODO: create constant folder

# TODO: add constant object to project

# TODO: create system objects

# TODO: add system projects to object

# write project
p.createProject()

# TODO: run the analysis
#p.run()

WARNING

Work in progress! We're developing it live and open. It's not supposed to work until we remove this line!

Current Development Goal

Export a box room with two windows (inlet and outlet) to OpenFOAM and run the analysis.

Tentative Component List

Create Butterfly surfaces

Type > inlet, outlet, walls, outflow, ...
Boundary Condition > This will change based on the type - velocity - pressure -...
We may need to create several ones for each boundary condition type.

Set meshing parameters

Meshing density
Meshing type

Visualize test Grid

Import back the generated grid by OpenFOAM into Grasshopper3D for quality check

Set solver parameters

Run CFD analysis

Results visualization component

You need to have Ladybug and Honeybee installed in order to run Butterfly.

@license GPL-3.0+ http://spdx.org/licenses/GPL-3.0+

butterfly's People

Contributors

mostapharoudsari avatar stefan-buildsci avatar

Watchers

James Cloos avatar Manuel Muehlbauer avatar Ambrosinus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.