-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(altweather): Add components for the UWG
- Loading branch information
1 parent
21e77d3
commit a1ef0d6
Showing
65 changed files
with
1,211 additions
and
41 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions
78
dragonfly_grasshopper/json/DF_Assign_Building_UWG_Properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"version": "1.1.0", | ||
"nickname": "BuildingUWG", | ||
"outputs": [ | ||
[ | ||
{ | ||
"access": "None", | ||
"name": "building", | ||
"description": "The input Dragonfly Building with its UWG properties re-assigned based\non the input.", | ||
"type": null, | ||
"default": null | ||
} | ||
] | ||
], | ||
"inputs": [ | ||
{ | ||
"access": "item", | ||
"name": "_building", | ||
"description": "A Dragonfly Building which is to have its Urban Weather Generator (UWG)\nproperties assigned.", | ||
"type": "System.Object", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "program_", | ||
"description": "Text for the name of the building program. Must be one of the\noptions below. (Default: LargeOffice).\n* LargeOffice\n* MediumOffice\n* SmallOffice\n* MidriseApartment\n* Retail\n* StripMall\n* PrimarySchool\n* SecondarySchool\n* SmallHotel\n* LargeHotel\n* Hospital\n* Outpatient\n* Warehouse\n* SuperMarket\n* FullServiceRestaurant\n* QuickServiceRestaurant", | ||
"type": "string", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "vintage_", | ||
"description": "Text for the vintage of the building. This will be used to set\ndefault constructions. Must be one of the options below or one of\nthe options from the \"HB Building Vintages\" component, which will\nbe mapped to one of the options below. (Default: New).\n* New\n* 1980_Present\n* Pre1980", | ||
"type": "string", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "fr_canyon_", | ||
"description": "A number from 0 to 1 that represents the fraction of the building's\nwaste heat from air conditioning that gets rejected into the urban\ncanyon. (Default: 0.5).", | ||
"type": "System.Object", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "shgc_", | ||
"description": "A number from 0 to 1 that represents the SHGC of the building's windows.\nThis is used to evaluate the amount of solar heat reflected into the\nstreet canyon. By default, it will be set by the building vintage\nand the Model climate zone.", | ||
"type": "double", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "wall_alb_", | ||
"description": "A number from 0 to 1 that represents the exterior wall albedo\nof the building. By default, it will be set by the building program\nand the DoE commercial reference buildings.", | ||
"type": "double", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "roof_alb_", | ||
"description": "A number from 0 to 1 that represents the exterior roof albedo of\nthe building. By default, it will be set by the vintage, meaning 0.7\nfor New and 0.2 for 1980_Present and Pre1980.", | ||
"type": "double", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "roof_veg_", | ||
"description": "A number from 0 to 1 that represents the fraction of the building's\nroofs covered in vegetation. (Default: 0).", | ||
"type": "double", | ||
"default": null | ||
} | ||
], | ||
"subcategory": "4 :: AlternativeWeather", | ||
"code": "\ntry: # import the dragonfly dependencies\n from dragonfly.building import Building\nexcept ImportError as e:\n raise ImportError('\\nFailed to import dragonfly:\\n\\t{}'.format(e))\n\ntry:\n from ladybug_{{cad}}.{{plugin}} import all_required_inputs\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\n\n# dictionary to map vintages to acceptable UWG ones\nVINTAGE_MAP = {\n 'New': 'New',\n '1980_Present': '1980_Present',\n 'Pre1980': 'Pre1980',\n '2013': '1980_Present',\n '2010': '1980_Present',\n '2007': '1980_Present',\n '2004': '1980_Present',\n '1980_2004': '1980_Present',\n 'pre_1980': 'Pre1980'\n}\n\n\nif all_required_inputs(ghenv.Component):\n # check and duplicate the input\n assert isinstance(_building, Building), \\\n 'Expected Dragonfly Building. Got {}.'.format(type(_building))\n building = _building.duplicate()\n\n # assign all of the properties to the building\n if program_ is not None:\n building.properties.uwg.program = program_\n if vintage_ is not None:\n building.properties.uwg.vintage = VINTAGE_MAP[vintage_]\n if fr_canyon_ is not None:\n building.properties.uwg.fract_heat_to_canyon = fr_canyon_\n if shgc_ is not None:\n building.properties.uwg.shgc = shgc_\n if wall_alb_ is not None:\n building.properties.uwg.wall_albedo = wall_alb_\n if roof_alb_ is not None:\n building.properties.uwg.roof_albedo = roof_alb_\n if roof_veg_ is not None:\n building.properties.uwg.roof_veg_fraction = roof_veg_\n", | ||
"category": "Dragonfly", | ||
"name": "DF Assign Building UWG Properties", | ||
"description": "Edit the properties of a Dragonfly Building that affect simulation with to the Urban\nWeather Generator (UWG).\n-" | ||
} |
57 changes: 57 additions & 0 deletions
57
dragonfly_grasshopper/json/DF_Assign_Model_UWG_Properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"version": "1.1.0", | ||
"nickname": "ModelUWG", | ||
"outputs": [ | ||
[ | ||
{ | ||
"access": "None", | ||
"name": "model", | ||
"description": "The input Dragonfly Model with its UWG properties re-assigned based\non the input.", | ||
"type": null, | ||
"default": null | ||
} | ||
] | ||
], | ||
"inputs": [ | ||
{ | ||
"access": "item", | ||
"name": "_model", | ||
"description": "A Dragonfly Model which is to have its Urban Weather Generator (UWG)\nproperties assigned.", | ||
"type": "System.Object", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "_terrain_", | ||
"description": "A Terrain object that dictates the properties of the street and\nground beneath the buildings. If None, a default terrain object will be\ngenerated by analysing all of the buildings in the Model and drawing\na bounding rectangle in the XY plane around them.", | ||
"type": "System.Object", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "_traffic_", | ||
"description": "A TrafficPararameter object that defines the activity and intensity\nof traffic within the urban street canyons. If None, traffic\nintensity will be approximated using the average building\nstory count along with a generic traffic schedule.", | ||
"type": "System.Object", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "tree_cover_", | ||
"description": "A number from 0 to 1 that defines the fraction of the exposed\nterrain covered by trees. If None, it will be determined by\nevaluating the horizontal area of all ContextShade geometry\nthat has a true is_vegetation property.", | ||
"type": "double", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "grass_cover_", | ||
"description": "A number from 0 to 1 that defines the fraction of the exposed\nterrain that is covered by grass or shrubs. If None, no grass will\nbe assumed for the urban area.", | ||
"type": "double", | ||
"default": null | ||
} | ||
], | ||
"subcategory": "4 :: AlternativeWeather", | ||
"code": "\ntry: # import the dragonfly dependencies\n from dragonfly.model import Model\nexcept ImportError as e:\n raise ImportError('\\nFailed to import dragonfly:\\n\\t{}'.format(e))\n\ntry:\n from ladybug_{{cad}}.{{plugin}} import all_required_inputs\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\n\n\nif all_required_inputs(ghenv.Component):\n # check and duplicate the input\n assert isinstance(_model, Model), \\\n 'Expected Dragonfly Model. Got {}.'.format(type(_model))\n model = _model.duplicate()\n\n # assign any of the input properties\n if _terrain_ is not None:\n model.properties.uwg.terrain = _terrain_\n if _traffic_ is not None:\n model.properties.uwg.traffic = _traffic_\n if tree_cover_ is not None:\n model.properties.uwg.tree_coverage_fraction = tree_cover_\n if grass_cover_ is not None:\n model.properties.uwg.grass_coverage_fraction = grass_cover_\n\n # print some useful information about the model\n print('{} m - average height'.format(\n round(model.average_height_above_ground, 1)))\n print('{} - footprint density'.format(\n round(model.properties.uwg.footprint_density, 2)))\n print('{} - facade to site'.format(\n round(model.properties.uwg.facade_to_site, 2)))\n print('{} - tree cover'.format(\n round(model.properties.uwg.tree_coverage_fraction, 2)))\n print('{} - grass cover'.format(\n round(model.properties.uwg.grass_coverage_fraction, 2)))\n", | ||
"category": "Dragonfly", | ||
"name": "DF Assign Model UWG Properties", | ||
"description": "Edit the properties of a Dragonfly Model that affect simulation with to the Urban\nWeather Generator (UWG).\n-" | ||
} |
57 changes: 57 additions & 0 deletions
57
dragonfly_grasshopper/json/DF_Boundary_Layer_Parameters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"version": "1.1.0", | ||
"nickname": "BoundaryLayer", | ||
"outputs": [ | ||
[ | ||
{ | ||
"access": "None", | ||
"name": "bnd_layer", | ||
"description": "Boundary layer parameters that can be plugged into the \"DF Run\nUrban Weather Generator\" component to specify the properties of\nthe urban boundary layer.", | ||
"type": null, | ||
"default": null | ||
} | ||
] | ||
], | ||
"inputs": [ | ||
{ | ||
"access": "item", | ||
"name": "_day_hght_", | ||
"description": "A number that represents the height in meters of the urban boundary\nlayer during the daytime. This is the height to which the urban\nmeteorological conditions are stable and representative of the\noverall urban area. Typically, this boundary layer height increases\nwith the height of the buildings. (Default: 1000 meters).", | ||
"type": "double", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "_night_hght_", | ||
"description": "A number that represents the height in meters of the urban\nboundary layer during the nighttime. This is the height to which the\nurban meteorological conditions are stable and representative of\nthe overall urban area. Typically, this boundary layer height\nincreases with the height of the buildings. (Default: 80 meters).", | ||
"type": "double", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "_inversion_hght_", | ||
"description": "A number that represents the height in meters at which\nthe vertical profile of potential temperature becomes stable.\nCan be determined by flying helium balloons equipped\nwith temperature sensors and recording the air temperatures\nat different heights. (Default: 150 meters).", | ||
"type": "double", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "_circ_coeff_", | ||
"description": "A number representing the circulation coefficient. (Default: 1.2,\nper Bueno (2012)).", | ||
"type": "double", | ||
"default": null | ||
}, | ||
{ | ||
"access": "item", | ||
"name": "_exch_coeff_", | ||
"description": "A number representing the exchange coefficient. (Default: 1.0,\nper Bueno (2014)).", | ||
"type": "double", | ||
"default": null | ||
} | ||
], | ||
"subcategory": "4 :: AlternativeWeather", | ||
"code": "\ntry: # import the dragonfly_uwg dependencies\n from dragonfly_uwg.simulation.boundary import BoundaryLayerParameter\nexcept ImportError as e:\n raise ImportError('\\nFailed to import dragonfly_uwg:\\n\\t{}'.format(e))\n\n\n# process default values\n_day_hght_ = _day_hght_ if _day_hght_ is not None else 1000\n_night_hght_ = _night_hght_ if _night_hght_ is not None else 80\n_inversion_hght_ = _inversion_hght_ if _inversion_hght_ is not None else 150\n_circ_coeff_ = _circ_coeff_ if _circ_coeff_ is not None else 1.2\n_exch_coeff_ = _exch_coeff_ if _exch_coeff_ is not None else 1.0\n\n# create the traffic parameters\nbnd_layer = BoundaryLayerParameter(\n _day_hght_, _night_hght_, _inversion_hght_, _circ_coeff_, _exch_coeff_)\n", | ||
"category": "Dragonfly", | ||
"name": "DF Boundary Layer Parameters", | ||
"description": "Create BoundaryLayerParameters representing the properties of the urban boundary\nlayer in an Urban Weather Genrator (UWG) simulation.\n-" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"nickname": "ConstrDesignDay", | ||
"outputs": [ | ||
[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"nickname": "CreateEPW", | ||
"outputs": [ | ||
[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"nickname": "HorizInfr", | ||
"outputs": [ | ||
[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"nickname": "ImportNOAA", | ||
"outputs": [ | ||
[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"nickname": "LumEff", | ||
"outputs": [ | ||
[ | ||
|
Oops, something went wrong.