1.3 greenhouse_geometry

Detailed Explanation of GreenhouseGeometry Class

The GreenhouseGeometry class is a core component of the GreenLightPlus project responsible for creating and managing greenhouse geometric structures. It uses the OpenStudio library to build the physical model of the greenhouse, including walls, roof, windows, and ventilation systems.

Class Overview

This class defines the physical structure of the greenhouse, including dimensions, material properties, roof type, and ventilation systems. It is also responsible for creating the OpenStudio model, setting simulation parameters, and generating corresponding EnergyPlus input files.

Main Attributes

  • roof_type: Type of roof (e.g., triangular, semicircular)
  • wall_height, wall_width, wall_length: Wall dimensions
  • number_width, number_length: Number of units in width and length directions
  • slope: Roof slope
  • num_segments: Number of roof segments
  • frame_width: Frame width
  • floor_area: Ground area
  • roof_ventilation_area_left, roof_ventilation_area_right: Roof ventilation areas
  • model: OpenStudio model instance

Main Methods

__init__

Initializes a GreenhouseGeometry instance, setting basic parameters and creating an OpenStudio model.

calculate_roof_height_relative_to_wall

Calculates the height of the roof relative to the wall.

calculate_trapezoidal_prism_volume

Calculates the volume of a trapezoidal prism.

calculate_window_area

Calculates the area of roof windows.

create_default_construction_set

Creates a default construction set.

create_space_and_type

Creates space and space type.

create_thermal_zone

Creates a thermal zone.

create_construction

Creates a construction.

create_material

Creates a material.

z_value_half_circle, z_value_triangle, z_value_flat_arch, z_value_gothic_arch, z_value_sawtooth, z_value_sawtooth_arch

Calculate z values for different roof types.

calculate_total_window_area

Calculates the total window area.

create_schedule_type_limits

Creates schedule type limits.

create_default_day_schedule

Creates a default day schedule.

write_window_schedule_to_csv

Writes window schedules to a CSV file.

create_window_schedule

Creates a window opening schedule.

create_house_model

Creates a model for a single greenhouse unit.

create_houses

Creates the entire greenhouse model.

calculate_surface_area_slope

Calculates surface area and slope.

Core Functionality Analysis

  1. Flexible Geometric Structure Definition:

    • Supports multiple roof types (triangular, semicircular, flat arch, etc.).
    • Customizable wall and roof dimensions.
  2. Detailed Material and Construction Definition:

    • Defines material properties for ground, walls, windows, and shading systems.
    • Creates corresponding OpenStudio material and construction objects.
  3. Complex Roof Structure Simulation:

    • Segments the roof for more accurate simulation of curved surfaces.
    • Calculates volume and geometric characteristics for each roof segment.
  4. Natural Ventilation Simulation:

    • Creates operable roof windows.
    • Defines ventilation schedules and control parameters.
  5. Model Generation and Output:

    • Generates complete OpenStudio models.
    • Exports to EnergyPlus-compatible IDF files.
  6. Multi-Unit Greenhouse Support:

    • Supports creation of large greenhouses composed of multiple identical units.
  7. Detailed Geometric Calculations:

    • Calculates key parameters such as roof slope and surface area.

Considerations

  • Ensure correct initial parameter settings, such as wall dimensions and roof type, as these directly affect simulation results.
  • Roof type selection influences natural ventilation and energy transfer, choose carefully based on actual conditions.
  • Window schedule creation involves randomness, may require multiple runs to obtain ideal schedules.
  • Model generation may take considerable time for large or complex greenhouse structures.
  • Ensure compatibility between OpenStudio and EnergyPlus versions.