recipe.input_value_by_name('additional-idf', add_str_) recipe.input_value_by_name('air-speed', _air_speed_) recipe.input_value_by_name('comfort-parameters', comfort_par_) recipe.input_value_by_name('solarcal-parameters', solar_body_par_) recipe.input_value_by_name('radiance-parameters', radiance_par_) # run the recipe silent = True if _run > 1 else False project_folder = recipe.run(run_settings_, radiance_check=True, openstudio_check=True, silent=silent) # load the results try: env_conds = recipe_result( recipe.output_value_by_name('environmental-conditions', project_folder)) op_temp = recipe_result( recipe.output_value_by_name('temperature', project_folder)) condition = recipe_result( recipe.output_value_by_name('condition', project_folder)) deg_neut = recipe_result( recipe.output_value_by_name('degrees-from-neutral', project_folder)) TCP = recipe_result(recipe.output_value_by_name('tcp', project_folder)) HSP = recipe_result(recipe.output_value_by_name('hsp', project_folder)) CSP = recipe_result(recipe.output_value_by_name('csp', project_folder)) except Exception: raise Exception(recipe.failure_message(project_folder))
recipe.input_value_by_name('air-speed-matrices', _wind_speed_) else: recipe.input_value_by_name('wind-speed', _wind_speed_) recipe.input_value_by_name('schedule', schedule_) recipe.input_value_by_name('solarcal-parameters', solar_body_par_) recipe.input_value_by_name('radiance-parameters', radiance_par_) # run the recipe silent = True if _run > 1 else False project_folder = recipe.run(run_settings_, radiance_check=True, openstudio_check=True, silent=silent) # load the results try: env_conds = recipe_result( recipe.output_value_by_name('environmental-conditions', project_folder)) utci = recipe_result( recipe.output_value_by_name('utci', project_folder)) condition = recipe_result( recipe.output_value_by_name('condition', project_folder)) category = recipe_result( recipe.output_value_by_name('category', project_folder)) TCP = recipe_result(recipe.output_value_by_name('tcp', project_folder)) HSP = recipe_result(recipe.output_value_by_name('hsp', project_folder)) CSP = recipe_result(recipe.output_value_by_name('csp', project_folder)) except Exception: raise Exception(recipe.failure_message(project_folder))
try: from ladybug_rhino.grasshopper import all_required_inputs, recipe_result except ImportError as e: raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e)) if all_required_inputs(ghenv.Component) and _run: # create the recipe and set the input arguments recipe = Recipe('annual-daylight') recipe.input_value_by_name('model', _model) recipe.input_value_by_name('wea', _wea) recipe.input_value_by_name('north', north_) recipe.input_value_by_name('thresholds', _thresholds_) recipe.input_value_by_name('schedule', _schedule_) recipe.input_value_by_name('grid-filter', grid_filter_) recipe.input_value_by_name('sensor-count', sensor_count_) recipe.input_value_by_name('radiance-parameters', radiance_par_) # run the recipe project_folder = recipe.run(run_settings_, radiance_check=True) # load the results results = recipe_result( recipe.output_value_by_name('results', project_folder)) DA = recipe_result(recipe.output_value_by_name('da', project_folder)) cDA = recipe_result(recipe.output_value_by_name('cda', project_folder)) UDI = recipe_result(recipe.output_value_by_name('udi', project_folder)) UDI_low = recipe_result( recipe.output_value_by_name('udi-lower', project_folder)) UDI_up = recipe_result( recipe.output_value_by_name('udi-upper', project_folder))
ghenv.Component.Category = 'HB-Radiance' ghenv.Component.SubCategory = '3 :: Recipes' ghenv.Component.AdditionalHelpFromDocStrings = '2' try: from lbt_recipes.recipe import Recipe except ImportError as e: raise ImportError('\nFailed to import lbt_recipes:\n\t{}'.format(e)) try: from ladybug_rhino.grasshopper import all_required_inputs, recipe_result except ImportError as e: raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e)) if all_required_inputs(ghenv.Component) and _run: # create the recipe and set the input arguments recipe = Recipe('point-in-time-grid') recipe.input_value_by_name('model', _model) recipe.input_value_by_name('sky', _sky) recipe.input_value_by_name('metric', _metric_) recipe.input_value_by_name('grid-filter', grid_filter_) recipe.input_value_by_name('sensor-count', sensor_count_) recipe.input_value_by_name('radiance-parameters', radiance_par_) # run the recipe project_folder = recipe.run(run_settings_, radiance_check=True) # load the results results = recipe_result(recipe.output_value_by_name('results', project_folder))
try: from lbt_recipes.recipe import Recipe except ImportError as e: raise ImportError('\nFailed to import lbt_recipes:\n\t{}'.format(e)) try: from ladybug_rhino.grasshopper import all_required_inputs, recipe_result except ImportError as e: raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e)) if all_required_inputs(ghenv.Component) and _run: # create the recipe and set the input arguments recipe = Recipe('annual-irradiance') recipe.input_value_by_name('model', _model) recipe.input_value_by_name('wea', _wea) recipe.input_value_by_name('north', north_) recipe.input_value_by_name('grid-filter', grid_filter_) recipe.input_value_by_name('sensor-count', sensor_count_) recipe.input_value_by_name('radiance-parameters', radiance_par_) # run the recipe project_folder = recipe.run(run_settings_, radiance_check=True) # load the results results = recipe_result(recipe.output_value_by_name('results', project_folder)) avg_irr = recipe_result(recipe.output_value_by_name('average-irradiance', project_folder)) peak_irr = recipe_result(recipe.output_value_by_name('peak-irradiance', project_folder)) radiation = recipe_result(recipe.output_value_by_name('cumulative-radiation', project_folder))
# create the recipe and set the input arguments recipe = Recipe('pmv_comfort_map') recipe.input_value_by_name('model', _model) recipe.input_value_by_name('epw', _epw) recipe.input_value_by_name('ddy', _ddy) recipe.input_value_by_name('north', north_) recipe.input_value_by_name('run-period', run_period_) recipe.input_value_by_name('sensor-count', sensor_count_) recipe.input_value_by_name('write-set-map', write_set_map_) recipe.input_value_by_name('air-speed', _air_speed_) recipe.input_value_by_name('met-rate', _met_rate_) recipe.input_value_by_name('clo-value', _clo_value_) recipe.input_value_by_name('comfort-parameters', comfort_par_) recipe.input_value_by_name('solarcal-parameters', solar_body_par_) recipe.input_value_by_name('radiance-parameters', radiance_par_) # run the recipe project_folder = recipe.run(run_settings_, radiance_check=True, openstudio_check=True) # load the results temperature = recipe_result( recipe.output_value_by_name('temperature', project_folder)) condition = recipe_result( recipe.output_value_by_name('condition', project_folder)) pmv = recipe_result(recipe.output_value_by_name('pmv', project_folder)) TCP = recipe_result(recipe.output_value_by_name('tcp', project_folder)) HSP = recipe_result(recipe.output_value_by_name('hsp', project_folder)) CSP = recipe_result(recipe.output_value_by_name('csp', project_folder))
ghenv.Component.AdditionalHelpFromDocStrings = '3' try: from lbt_recipes.recipe import Recipe except ImportError as e: raise ImportError('\nFailed to import lbt_recipes:\n\t{}'.format(e)) try: from ladybug_rhino.grasshopper import all_required_inputs, recipe_result except ImportError as e: raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e)) if all_required_inputs(ghenv.Component) and _run: # create the recipe and set the input arguments recipe = Recipe('direct-sun-hours') recipe.input_value_by_name('model', _model) recipe.input_value_by_name('wea', _wea) recipe.input_value_by_name('timestep', _timestep_) recipe.input_value_by_name('north', north_) recipe.input_value_by_name('grid-filter', grid_filter_) recipe.input_value_by_name('sensor-count', sensor_count_) # run the recipe project_folder = recipe.run(run_settings_, radiance_check=True) # load the results results = recipe_result( recipe.output_value_by_name('direct-sun-hours', project_folder)) hours = recipe_result( recipe.output_value_by_name('cumulative-sun-hours', project_folder))