py4design.py2radiance.write_rad module

py4design.py2radiance.write_rad.surface(name, material, points)

This function writes the surface information into Radiance readable string format.

Parameters:

name : str

The name of the surface.

material : str

The name of the material of the surface. The material name must be in the base.rad file.

points : pyptlist

List of points defining the surface. Pyptlist is a list of tuples of floats. A pypt is a tuple that documents the xyz coordinates of a pt e.g. (x,y,z), thus a pyptlist is a list of tuples e.g. [(x1,y1,z1), (x2,y2,z2), …]

Returns:

rad surface : str

The surface written into radiance readable string.

py4design.py2radiance.write_rad.glow(name, colour)

This function writes the glow function for Radiance.

Parameters:

name: str

The name of glow.

colour: tuple of floats

A tuple of floats describing the colour. e.g. (1,1,1) for a white sky.

Returns:

rad glow : str

The glow written into radiance readable string.

py4design.py2radiance.write_rad.source(name, material, direction)

This function writes the source function for Radiance.

Parameters:

name: str

The name of source.

material: str

The material of the source, can be either “sky_glow” or “ground_glow”.

direction: tuple of floats

A tuple of floats describing the direction of the source. e.g. (0,0,1) for point up.

Returns:

rad source : str

The source written into radiance readable string.

py4design.py2radiance.write_rad.brightfunc(cal_name)

This function writes the brightfunc function for Radiance.

Parameters:

cal_name: str

The name of cal.

Returns:

rad brightfunc : str

The brightfunc written into radiance readable string.

py4design.py2radiance.write_rad.material_glass(name, transmission)

This function writes the Radiance glass material.

Parameters:

name: str

The name of glass.

transmission: tuple of floats

A tuple of floats describing the transmission of the glass.

Returns:

rad glass : str

The glass written into radiance readable string.

py4design.py2radiance.write_rad.material_plastic(name, colour, spec, rough)

This function writes the Radiance plastic material.

Parameters:

name: str

The name of plastic.

colour: tuple of floats

A tuple of floats describing the colour of the glass.

spec: float

A float describing the specularity of the plastic.

rough: float

A float describing the roughness of the plastic.

Returns:

rad plastic : str

The plastic written into radiance readable string.

py4design.py2radiance.write_rad.sensor_file(positions, normals)

This function writes the sensor points and their normals for the Radiance/Daysim simulation.

Parameters:

positions: pyptlist

List of positions for sensing. Pyptlist is a list of tuples of floats. A pypt is a tuple that documents the xyz coordinates of a pt e.g. (x,y,z), thus a pyptlist is a list of tuples e.g. [(x1,y1,z1), (x2,y2,z2), …]

normals: pyveclist

List of normals of the points sensing. Pyveclist is a list of tuples of floats. A pyvec is a tuple that documents the xyz coordinates of a direction e.g. (x,y,z), thus a pyveclist is a list of tuples e.g. [(x1,y1,z1), (x2,y2,z2), …]

Returns:

rad sensors : str

The sensors written into radiance readable string.