Notebook 4 - Solar outside
The following script is used to edit the solar access lattice to have values based on the number of facades each voxel has. First, a check for neighbours is done for each voxel. Where no neighbour is found a facade is needed. After this step, we remove any facades counted for voxels with z=0 that found facades where the ground is expected. Then the solar access values are scaled by the facade count and the new data is exported as a CSV.
Flowchart
The flowchart as shown in Figure 38 is in the first (purple) section of the fundamental flowchart as shown in the Planning - products.
Additional diagrams
Figure 39 shows the solar outside system, inner voxels have no value and the value of the outer voxels is influenced by its amount of facades.
Pseudo code
This is the Pseudo code for Notebook 4.
#Load the complete lattice and complete solar access
#Initialize a coordinates list
for each voxel
add [x, y, z] to coordinates
#Find neighbouring voxels
base result = 6 (faces)
for each coordinate
for each direction (x, y, z)(-1, +1)
check if [x, y, z] are in coordinates
if True
#no facade here
result -= 1
Establish result list as [x, y, z, result]
#Disregarding the ground as a facade
for each voxel in result list
if z == 0
#remove earlier found ground facade
result -= 1
#scale result so max = 1.0
result /= 6
#Scaling the solar access list
for each voxel in result list
solar access value at [x, y, z] *= val
#Export the solar access lattice
Export solar acces to 'solar_access_outside_3_6.csv'