ThreePhaseMethod
frads.ThreePhaseMethod
Bases: PhaseMethod
Three phase method implementation.
Attributes:
Name | Type | Description |
---|---|---|
config |
A WorkflowConfig object |
|
octree |
A path to the octree file |
|
window_senders |
Dict[str, SurfaceSender]
|
A dictionary of window sender matrices |
window_receivers |
A dictionary of window receiver matrices |
|
window_bsdfs |
A dictionary of window BSDF matrices |
|
daylight_matrices |
A dictionary of daylight matrices |
|
view_window_matrices |
A dictionary of view window matrices |
|
sensor_window_matrices |
A dictionary of sensor window matrices |
calculate_edgps
Calculate enhanced simplified daylight glare probability (EDGPs) for a view.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
view
|
str
|
view name, must be in config.model.views |
required |
bsdf
|
Dict[str, str]
|
a dictionary of window name as key and bsdf matrix or matrix name as value |
required |
time
|
datetime
|
datetime object |
required |
dni
|
float
|
direct normal irradiance |
required |
dhi
|
float
|
diffuse horizontal irradiance |
required |
ambient_bounce
|
int
|
ambient bounce, default to 1. Could be set to zero for macroscopic non-scattering systems. |
0
|
Returns: EDGPs
calculate_sensor
Calculate illuminance for a sensor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sensor
|
str
|
The sensor name |
required |
bsdf
|
Dict[str, str]
|
A dictionary of window name as key and bsdf matrix or matrix name as value |
required |
time
|
datetime
|
The datetime object |
required |
dni
|
float
|
The direct normal irradiance |
required |
dhi
|
float
|
The diffuse horizontal irradiance |
required |
Returns: A float value of illuminance
calculate_sensor_from_wea
Calculates the sensor values from wea data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sensor
|
str
|
The specific sensor for which the calculation is to be performed. |
required |
Returns:
Type | Description |
---|---|
ndarray
|
numpy.ndarray: A matrix containing the calculated sensor values based on the Weather Attribute data, sensor configuration, and various matrices related to windows, daylight, and sky. |
Raises:
Type | Description |
---|---|
ValueError
|
If no wea data is available. |
Examples:
sensor_values = sensor_config.calculate_sensor_from_wea("sensor_name")
calculate_view
Calculate (render) a view.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
view
|
str
|
The view name |
required |
bsdf
|
ndarray
|
The BSDF matrix |
required |
time
|
datetime
|
The datetime object |
required |
dni
|
float
|
The direct normal irradiance |
required |
dhi
|
float
|
The diffuse horizontal irradiance |
required |
Returns: A image as numpy array
calculate_view_from_wea
Calculate(render) view from wea data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
view
|
str
|
The view name |
required |
Returns: A series of HDR images as a numpy array
generate_matrices
Generate all required matrices
Parameters:
Name | Type | Description | Default |
---|---|---|---|
view_matrices
|
bool
|
Toggle to generate view matrices. Toggle it off can be useful for not needing the view matrices but still need the view data for things like edgps calculation. |
True
|