update building radiation utils for external radiative heat transfer#170
Open
ecosang wants to merge 1 commit into
Open
update building radiation utils for external radiative heat transfer#170ecosang wants to merge 1 commit into
ecosang wants to merge 1 commit into
Conversation
Contributor
Author
|
@s2t2 |
Collaborator
|
Nice @ecosang , thank you! There is a lot of code - I will work on reviewing by later this week / early next week. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding several external radiative heat transfer-related utils.
New functions in
building_radiation_utils.py:_ensure_irradiance_components()— Normalizes irradiance input (dict or dataclass) to a guaranteedIrradianceComponentsinstance with validation of required keys (ghi, dni, dhi, solar_zenith, solar_azimuth)validate_fenestration_connectivity()— Validates that fenestration nodes in a floor plan properly bridge exterior space to interior air (checks air adjacency, exterior exposure, surrounded-by-air detection, and chain connectivity)_validate_fenestration_chain_connectivity()— Ensures each fenestration node can reach both exterior and interior air through the fenestration chain via BFS, and validates interior-facing direction is not blocked_determine_interior_direction()— Infers the direction vector pointing from exterior toward interior air based on node positions relative to grid boundaries or adjacent exterior space_find_connected_groups()— Finds all 4-connected groups of cells with a given value in the floor plan using BFSmark_fenestration_positions()— Classifies fenestration nodes into exterior, interior, or in-between categories based on adjacencygroup_fenestrations()— Groups adjacent fenestration nodes and computes surface properties (azimuth, tilt, view factors F_sky/F_gnd/F_air, beta)_determine_fenestration_azimuth()— Determines fenestration azimuth from exterior adjacency using atan2, with floor_plan_orientation offset supportgroup_air_nodes()— Groups connected interior air nodes and annotates which fenestration groups are adjacent to each air groupcalculate_solar_absorbed_for_fenestration_group()— Computes absorbed solar flux per node for a fenestration group using POA irradiancenet_solar_absorbed_heatflux_fenestration()— Returns array of absorbed solar heat flux at each fenestration node across all groupscalculate_solar_transmitted_for_fenestration_group()— Computes total transmitted solar radiation for a fenestration groupnet_solar_transmitted_heatflux_fenestration()— Distributes transmitted solar heat flux to air nodes connected to windowsmark_interior_surface_adjacent_to_air()— Marks interior surfaces (walls + fenestration) adjacent to air with boolean maskcalculate_exterior_lwr_for_fenestration_group()— Computes net exterior longwave radiative heat flux for a fenestration group (sky + ground + air exchange)net_exterior_radiative_heatflux()— Computes net exterior LWR heat flux array for all fenestration nodesget_exterior_wall_boundary_mask()— Identifies exterior wall nodes forming the building boundary (excluding walls facing enclosed interior air)determine_exterior_wall_azimuth_array()— Determines azimuth for each exterior wall boundary node based on adjacent exterior space directionNew tests in
building_radiation_utils_test.py:_validate_fenestration_chain_connectivity()— Testing valid chains, blocked-from-exterior, blocked-from-air, interior-direction blockage, thick fenestration, and L-shaped fenestrationCode cleanup:
interior_wall_valueparameter from_validate_fenestration_chain_connectivity()and all callers