蜻蜓能量模拟扩展。
dragonfly-energ的Python项目详细描述
蜻蜓能量
蜻蜓能量模拟扩展。在
安装
pip install dragonfly-energy
如果还想包含命令行界面,请尝试:
pip install -U dragonfly-energy[cli]
快速启动
import dragonfly_energy
API Documentation
使用
因为蜻蜓的建筑几何基本上是二维的,所以创建一个 建筑和指定能量模型属性可以通过几行 代码。下面是一个例子:
^{pr2}$一旦一个蜻蜓模型被创造出来,它就可以被转换成蜜蜂模型, 然后可以转换为IDF格式,如下所示:
# create the dragonfly Model object
model = Model('NewDevelopment', [building])
# serialize the dragonfly Model to Honeybee Models and convert them to IDF
hb_models = model.to_honeybee('Building', use_multiplier=False, tolerance=0.01)
idfs = [hb_model.to.idf(hb_model) for hb_model in hb_models]
蜻蜓模型也可以序列化为geoJSON,用URBANopt进行模拟
from ladybug.location import Location
# create the dragonfly Model object
model = Model('NewDevelopment', [building])
# create a location for the geoJSON and write it to a folder
location = Location('Boston', 'MA', 'USA', 42.366151, -71.019357)
sim_folder = './tests/urbanopt_model'
geojson, hb_model_jsons, hb_models = model.to.urbanopt(model, location, folder=sim_folder)
地方发展
- 在本地克隆此repo
git clone git@github.com:ladybug-tools/dragonfly-energy
# or
git clone https://github.com/ladybug-tools/dragonfly-energy
- 安装依赖项:
cd dragonfly-energy
pip install -r dev-requirements.txt
pip install -r requirements.txt
- 运行测试:
python -m pytest tests/
- 生成文档:
sphinx-apidoc -f -e -d 4 -o ./docs ./dragonfly_energy
sphinx-build -b html ./docs ./docs/_build/docs
- 项目
标签: