Skip to content

Usage within a BHoM UI

Thomas Edward Kingstone edited this page May 3, 2024 · 1 revision

Some simulations can also be run through the LadybugToolsAdapter in a BHoM UI rather than explicitly running them through a virtual environment in Jupyter. This is done through the use of an Execute component connected to the adapter, and an Execute Command that can be searched for in the UI.

image

Commands

Plots

  • DiurnalPlotCommand - Used to produce daily, weekly or monthly diurnal plots using the data in an EPW file.

  • HeatPlotCommand - Used to produce heatmaps of data found in an EPW file.

  • SunPathPlotCommand - Used to produce sun path plots using the location data in an EPW file.

  • SolarPanelTiltOptimisationCommand - Uses the Solar ladybugtools_toolkit object to query the amount of sunlight given a range of angles that a PV panel could be angled at, and plots a contoured heatmap of the amount of energy the panel would produce in that range.

  • UTCIHeatPlotCommand - Utilises the external comfort section of the ladybugtools_toolkit package to run a simulation, and then plot a UTCI heatmap from the results of that simulation.

  • WindroseCommand - Produces a wind rose using the wind data from an EPW file.

Data

  • GetMaterialCommand - Used to get the list of BHoM default materials from the ladybugtools_toolkit python package.

  • GetTypologyCommand - Used to get the list of BHoM default typologies from the ladybugtools_toolkit python package.

Simulation

  • RunExternalComfortCommand - Utilises the external comfort section of the ladybugtools_toolkit package to calculate external comfort on a simulation result, and output the results in an ExternalComfort object.

  • RunSimulationCommand - Utilises the external comfort section of the ladybugtools_toolkit package to run a simulation, and output the results in a SimulationResult object.

Example usage: UTCIHeatPlotCommand

The UTCIHeatPlotCommand essentially runs an external comfort simulation using a ground material, shade material and a typology, with some other modifiers. You will also need an EPW file for the method to get solar, wind and temperature data from.

For the ground material, shade material and typology, you can either use the GetMaterialCommand and GetTypologyCommand to use the ladybugtools_toolkit python package defaults, or create one yourself. This example shows creating a custom material and getting a typology:

Creating a custom material

image

Getting a typology

this workflow is identical to getting materials

image

You also may provide a wind speed multiplier. This will multiply the wind speed data by a specific value through the whole year of data in the EPW file.

The BinColours input determines the colour scheme of the resultant plot. By default they are set to UTCI heat band colours, but they can be replaced with any colour scheme desired. Either input nothing, or 10 colours

The final result

By default if you do not provide an output location (with file name specified), the command will output a base64 string representation of the resultant image. Otherwise, it will place the plot in the location provided.

image

The method itself takes a few seconds to run, and will output plots that look like this:

image