A method for modeling and energy consumption simulation of a multi-span glass greenhouse

By combining custom greenhouse model parameters and a parallel shrinking algorithm with Socket communication and SketchUp API, the problems of cumbersome process and low automation in modeling and energy consumption simulation of multi-span glass greenhouses are solved. This enables rapid model construction and real-time parameter synchronization, improving the efficiency and accuracy of modeling and simulation, adapting to diverse system configurations, and reducing operating costs.

CN122133322APending Publication Date: 2026-06-02SHANDONG AGRICULTURAL UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG AGRICULTURAL UNIVERSITY
Filing Date
2026-02-10
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

The existing modeling and energy consumption simulation process for multi-span glass greenhouses is cumbersome, has a low degree of automation, insufficient model accuracy, and modeling parameter adjustments cannot be quickly synchronized to the simulation process. The analysis of simulation results is inconvenient and it is difficult to adapt to the needs of diverse system configurations.

Method used

A custom greenhouse model with parameters is used, and a parallel shrinking algorithm is used to calculate window coordinates. Combined with Socket communication and SketchUp API, the model can be built quickly and parameters can be synchronized in real time. Weather files, IDF file generation and simulation results analysis are processed automatically, and matplotlib is used for visualization.

Benefits of technology

It achieves efficient collaboration between modeling and simulation, adapts to diverse configurations of large-scale greenhouses, quickly supports energy consumption optimization decisions, reduces operating costs, and improves facility energy efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122133322A_ABST
    Figure CN122133322A_ABST
Patent Text Reader

Abstract

This application discloses a modeling and energy consumption simulation method for multi-span glass greenhouses, belonging to the field of agricultural facility energy efficiency optimization technology. In the modeling stage, window coordinates are automatically calculated through custom parameters combined with a parallel shrinking algorithm. This is achieved through collaborative linkage using Socket communication and the SketchUp API, avoiding human error and enabling rapid model construction, real-time parameter synchronization, and 3D visualization. This solves the problems of time-consuming, labor-intensive, and highly biased traditional manual modeling. In the energy consumption simulation stage, the method automates the process from weather file import, IDF processing, simulation execution, to result analysis. IDF parameters are optimized using RDD files, and simulation results are visualized using matplotlib, reducing human intervention and errors. The overall process achieves efficient collaboration between modeling and simulation, adapting to the diverse configuration needs of large-scale greenhouses, and can quickly support energy consumption optimization decisions, providing technical support for the green and sustainable development of facility agriculture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of energy efficiency optimization technology for agricultural facilities, specifically to a modeling and energy consumption simulation method for multi-span glass greenhouses. Background Technology

[0002] With the rapid development of modern agricultural facilities towards large-scale and intelligent operations, multi-span glass greenhouses, with their advantages of excellent light transmission, high space utilization, and strong environmental control capabilities, have become the core carrier for high-yield and high-efficiency cultivation in facility agriculture, and are widely used in vegetable planting, flower cultivation, and seedling propagation. The energy consumption level of multi-span glass greenhouses directly determines their operating costs and environmental control efficiency. Accurate greenhouse modeling is a prerequisite for energy consumption simulation and energy efficiency optimization. Therefore, constructing scientific and efficient methods for modeling and simulating the energy consumption of multi-span glass greenhouses is of significant practical importance and application value for reducing greenhouse operating energy consumption, improving the energy efficiency of agricultural facilities, and promoting the green and sustainable development of facility agriculture. Currently, the modeling and energy consumption simulation of multi-span glass greenhouses has become one of the research hotspots in the field of agricultural facility energy efficiency optimization technology.

[0003] Existing modeling technologies for multi-span glass greenhouses suffer from problems such as cumbersome processes, low automation, and insufficient model accuracy. Traditional modeling methods often require users to manually input greenhouse dimensions, window positions, structural parameters, and other information into modeling software such as SketchUp, manually completing model construction and parameter adjustments. This is not only time-consuming and labor-intensive, but also prone to errors when manually calculating coordinates and determining window positions, resulting in significant deviations between the model and the actual greenhouse structure. Furthermore, existing modeling processes lack efficient collaborative mechanisms between 3D visualization viewing, model parameter transfer, and the SketchUp modeling process. Modified model data is difficult to synchronize quickly, affecting the accuracy and efficiency of subsequent energy consumption simulations and failing to meet the needs of precise modeling for large-scale multi-span glass greenhouses.

[0004] In the energy consumption simulation stage, existing technologies also have many limitations: On the one hand, after modeling is completed, many steps required for energy consumption simulation, such as generating IDF files, constructing underlying equipment selection, calling EP-Launch, and processing files, require manual intervention. The process lacks continuity and is prone to simulation failure or result deviation due to human error. On the other hand, the simulation process is divided into multiple stages, and existing methods struggle to achieve automatic connection between each stage. Furthermore, the extraction, analysis, and visualization of simulation results are not convenient enough, often requiring users to manually process CSV format data and plot analysis curves. This fails to provide users with quick and intuitive energy consumption analysis results, hindering timely optimization of greenhouse system configuration based on simulation data. In addition, the modeling and energy consumption simulation stages in existing technologies are disconnected. Adjustments to modeling parameters cannot be quickly synchronized to the simulation process, resulting in low efficiency throughout the entire modeling and energy consumption simulation process, making it difficult to adapt to the diverse system configurations and precise energy efficiency optimization needs of multi-span glass greenhouses. Summary of the Invention

[0005] In order to solve the above-mentioned technical problems, this application proposes the following technical solution: In a first aspect, embodiments of this application provide a modeling and energy consumption simulation method for multi-span glass greenhouses, including: The size of the greenhouse model is customized, including the specific model dimensions, key coordinates and derived parameters. The window positions and coordinate information of each face are calculated using the parallel shrinking algorithm, and the model information is saved to the model dictionary. The model is converted into an intuitive 3D image, and the model information is sent to SketchUp via Socket communication. Open Studio is then called to generate a Space in SketchUp, where the actual modeling is performed and corresponding modifications are made. Call the SketchUp API to traverse the model, calculate the area and volume, and obtain the vertex coordinates. Finally, send the data to overwrite the initial model information and synchronize the 3D model. Based on the various systems provided, a greenhouse model that meets the requirements can be constructed through optional configurations. Select a weather file and import it into EP-Launch. Call the preprocessor to process the IDF file. After completion, perform the initialization simulation and report the simulation progress in real time. Extract the generated RDD file, improve the IDF file based on the RDD file, and re-import the IDF file into EP-Launch for formal simulation; The simulation results are automatically extracted and analyzed. Different simulation structures in the CSV format file are plotted as curves using matplotlib functions for viewing the visualization results in the interface.

[0006] In one possible implementation, the size of the custom greenhouse model includes specific model dimensions, key coordinates, and derived parameters, including: The model dimensions define the greenhouse's single-span width, number of spans, length, eaves height, and ridge height; The key coordinates are defined for the ridge vertex and the eaves vertex, where: the X-coordinate of the ridge vertex is: in: For single span width, For the number of spans, The coordinates represent the height of the roof ridge. The X-coordinate of the eaves apex is 0. , … , The coordinates represent the height of the eaves. The derived parameters are defined as total width and roof slope angle, where: .

[0007] In one possible implementation, the window position and coordinate information of each face are calculated using a parallel indentation algorithm, and the model information is saved to a model dictionary, including: Obtain the geometric parameters of the outer frame, including: base_width, triangle_height, and frame_width; Calculate the inner base width: inner_base_width = base width - 2 × frame width; Calculate the scaling ratio: scale_ratio = inner bottom width / bottom width; Calculate the height of the inner triangle: inner_triangle_height = triangle height × scaling ratio; Calculate the final inner triangle height: final_triangle_height = inner triangle height - frame width.

[0008] In one possible implementation, the process of converting the model into an intuitive 3D diagram includes: When the user changes the parameters and clicks to update the preview or import a new model, the system views the current model dictionary and redraws the 3D model based on the model information therein. Group all faces of the model according to their respective types, and then render the model. The rendering order is set as follows: first render opaque objects: the ground, walls, roof, and frame; finally render the window surfaces as a semi-transparent sky blue.

[0009] In one possible implementation, the step of sending model information to SketchUp via Socket communication and calling Open Studio to generate Space in SketchUp includes: First, verify that the OpenStudio plugin in SketchUp has been loaded correctly, and check whether the OpenStudio Model Manager and its model interface are available. Only after verification can subsequent operations be performed. Receive greenhouse structure parameters passed from the Python client via Socket communication, including single span width, number of spans, length, eaves height and ridge height. After validating the parameters, convert all length parameters from centimeters to inches used internally in SketchUp, and calculate the total width. Obtain the current OpenStudio model instance through the OpenStudio Model Manager, call the OpenStudio::Model::Space constructor to create a new Space object in the model, and name it with the greenhouse span number as the identifier; Call the OpenStudio::Model::ThermalZone constructor to create a hot zone object, and bind the Space object to the hot zone using the setThermalZone method, making the Space a subset element of the hot zone, thus providing a thermodynamic boundary for subsequent HVAC system configuration and energy consumption simulation; Call the OpenStudio::Model::SpaceType constructor to create a space type object and name it Greenhouse Type. Then, use the setSpaceType method to assign it to the Space object to carry the non-geometric thermal parameters within the space. The Space object is mapped to a visual component entity in SketchUp through the OpenStudio::Space interface, and the corresponding Space component container is generated in the SketchUp 3D scene by calling the draw_entity method; Within the internal entity set of the Space component entity, based on the converted greenhouse structure parameters, the complete three-dimensional geometry of the greenhouse is created sequentially in the order of ground, side wall frame, end wall frame, roof structure, and glass panel. The roof outline generates a multi-span roof shape with alternating sawtooth ridges and valleys according to the number of spans. Traverse all geometric faces within the Space, automatically determine the surface type based on the direction of the face's normal vector and its spatial position. Faces with the normal vector pointing upwards and at a lower position are identified as ground surfaces, faces with the normal vector pointing upwards and at a higher position are identified as roof surfaces, faces with the normal vector approximately horizontal are identified as wall surfaces, and faces with transparent or blue material characteristics are identified as glass sub-surfaces. Extract the vertex coordinates of each main surface and convert them to the OpenStudio coordinate system to create the corresponding OpenStudio::Model::Surface object. Associate it with the Space space and set the surface type and boundary conditions. Glass sub-surfaces are marked as fixed window types. Finally, submit the SketchUp operation transaction, refresh the 3D view and automatically zoom to the model range, allowing users to intuitively view the generated greenhouse space model with complete thermal properties.

[0010] In one possible implementation, the method for transmitting model information via Socket communication is as follows: Start the Socket server and Socket client respectively to establish a communication connection; The Socket client encapsulates the building parameter data into a JSON format message and sends it to the Socket server via the Socket connection. The Socket server receives JSON messages, parses them to obtain building parameter data, calls the modeling API to generate a 3D building model, and then uses a traversal algorithm to retrieve the vertex coordinates and categories of all faces in SketchUp. The Socket server encapsulates the geometric data of the new 3D building model into a JSON format message and sends it to the Socket client via the Socket connection; The Socket client receives geometric data and passes the model data into the model dictionary.

[0011] In one possible implementation, the step of constructing a greenhouse model that meets the requirements by selectively configuring various provided systems includes: Determine the available system configurations, including: material settings, design date settings, geographic location settings, time schedule settings, greenhouse boiler heating settings, time step settings, advanced parameter settings, and crop planting status. Each configuration contains several specific systems, all of which correspond to various modules in IDFEditor. Complex IDFEditor content editing can be accomplished by configuring each system module.

[0012] In one possible implementation, the process of selecting a weather file and importing it into EP-Launch, calling a preprocessor to process the IDF file, performing initialization simulation, and reporting simulation progress in real time includes: Generate IDF files to extract various system and model information set by the user; Fill in the IDF fragments according to different categories, and automatically configure various complex information in IDFEditor to make it suitable for various simulations of greenhouses; Before starting the simulation kernel, automatically detect whether there are high-level HVAC template objects in the simulation configuration file; If it exists, the object extension tool will be automatically invoked to parse the template object into the underlying simulation object and generate an extension configuration file as the input source for subsequent simulations.

[0013] In one possible implementation, the step of extracting and analyzing the generated RDD file, improving the IDF file based on the RDD file, and re-importing the IDF file into EP-Launch for formal simulation includes: The simulation engine is invoked to perform the first round of pre-calculation, generating a report data dictionary file (RDD) containing all available output variables of the model. The RDD file is parsed, target variables are automatically selected based on preset greenhouse energy consumption keywords, and the target variables are encapsulated as output instructions and appended to the simulation configuration IDF file; The simulation engine is invoked to load the modified IDF file and perform a second round of calculations, generating a simulation result file containing complete energy consumption data.

[0014] In one possible implementation, the automatic extraction and analysis of simulation results, and the plotting of different simulation structures from the CSV format file into curves using matplotlib functions for viewing visualization results on an interface, include: When the number of columns in a CSV file exceeds the system's default buffer size, the configured dynamic field size limit adjustment algorithm automatically increases the field size limit to fully read the wide table data. A fault-tolerant reading mechanism is adopted to automatically identify and remove null columns and abnormally truncated rows in the data rows, and convert unstructured text data into a structured floating-point number sequence.

[0015] In this embodiment, during the modeling stage, window coordinates are automatically calculated using custom parameters combined with a parallel shrinking algorithm. This, coupled with Socket communication and the SketchUp API, avoids human error and enables rapid model construction, real-time parameter synchronization, and 3D visualization, solving the problems of time-consuming, labor-intensive, and highly biased traditional manual modeling. In the energy consumption simulation stage, the process of importing weather files, processing IDF data, running simulations, and analyzing results is automated. IDF parameters are optimized using RDD files, and simulation results are visualized using matplotlib, reducing human intervention and errors. The overall process achieves efficient collaboration between modeling and simulation, adapting to the diverse configuration needs of large-scale greenhouses. It can quickly support energy consumption optimization decisions, helping to reduce greenhouse operating costs, improve facility energy efficiency, and provide technical support for the green and sustainable development of facility agriculture. This method effectively addresses the core pain points of existing multi-span glass greenhouse modeling processes, such as cumbersome processes, low automation, insufficient accuracy, and a disconnect between modeling and energy consumption simulation. It significantly improves the efficiency and accuracy of modeling and simulation, and has significant practical value. Attached Figure Description

[0016] Figure 1 System architecture diagram provided for embodiments of this application; Figure 2 This is a flowchart illustrating a modeling and energy consumption simulation method for multi-span glass greenhouses provided in an embodiment of this application. Detailed Implementation

[0017] The present solution will now be described in conjunction with the accompanying drawings and specific embodiments.

[0018] See Figure 1First, the system architecture for implementing this embodiment will be described.

[0019] Overall architecture design: The program adopts a hybrid architecture combining client / server mode with pipelined processing. The logic is divided into four layers from top to bottom: User Interaction Layer: The user interface layer, developed using Python (tkinter), includes: a) Main Control Interface: Responsible for inputting greenhouse geometric parameters (span, height, etc.), controlling function switches (timetable, boiler system, etc.), displaying status, showcasing the 3D model, and viewing simulation curves. b) Function Dialog Boxes: Contains independent windows for material settings, sub-window management, and geographical location settings, allowing users to customize the system structure. c) Interaction and Logic Checks: Responsible for validating input data (e.g., ridge height must be greater than eaves height) and providing user feedback.

[0020] Business Logic Layer: Responsible for data processing, instruction generation, and scheduling engine. Includes: a) Parametric Modeling Engine: Converts user-input dimensional parameters into SketchUp-recognizable geometric construction instructions. b) Material and Construction Manager: Manages a JSON-formatted material library and handles the mapping logic for surface materials (roof / walls / floor). c) System Configuration Module: Handles boiler heating system parameters, design day meteorological data, and operating schedule logic. d) IDF Generator: Packages the geometric model, thermal properties, HVAC system, and simulation settings to automatically generate an EnergyPlus standard input file (.idf).

[0021] Communication and Interface Layer: Based on the TCP / IP Socket protocol, it uses the JSON standard format for serialization / deserialization of commands and data. Commands are sent via Python, and the SketchUp Ruby client listens on the port to perform modeling operations. After modeling is complete, it calls the SketchUp API to traverse the model, calculates the area and volume, and obtains the vertex coordinates. Finally, it converts the data dictionary into a JSON string and sends it back. The program then restores the received JSON string to a Python dictionary for further operations.

[0022] Core Engine Layer: The underlying professional software called by the system, responsible for specific graphics rendering and physical calculations. This includes: a) Geometric Visualization Engine (SketchUp + OpenStudio Plugin): Responsible for generating 3D models, automatically assigning OpenStudio spatial attributes, and calculating geometric statistics. b) Energy Consumption Simulation Engine (EnergyPlus): Receives IDF files and EPW meteorological files, performs year-round thermal and energy consumption simulation calculations, and outputs CSV / HTML results.

[0023] Key data flow a) Input stage: Users set greenhouse parameters (e.g., 8-meter span, double-glazed windows) in the Python interface.

[0024] b) Modeling stage: Python packages the parameters into JSON -> sends it via Socket -> SketchUp plugin parses the JSON -> calls the API to draw the 3D model -> returns model statistics.

[0025] c) Configuration phase: Python reads the user-configured VAV system, geolocation, and design date data, and combines them with geometric information obtained from SketchUp.

[0026] d) Generation phase: The business logic layer integrates all information and writes the .idf file according to the EnergyPlus syntax rules.

[0027] e) Simulation phase: EnergyPlus reads the .idf file, performs calculations, and generates an energy consumption report.

[0028] Based on the above system architecture, see Figure 2 The modeling and energy consumption simulation method for multi-span glass greenhouses provided in this embodiment includes: S101, customize the size of the greenhouse model, including specific model dimensions, key coordinates and derived parameters, use the parallel shrinking algorithm to calculate the window positions and coordinate information of each face, and save the model information to the model dictionary.

[0029] Users set various greenhouse parameters such as single-span width, span, length, eaves height, and ridge height in the Python interface according to the actual project requirements. The system generates the coordinates of each point on the greenhouse outline based on the user-input parameters and calculates the window coordinates on each wall surface based on the window-to-wall ratio of mainstream glass greenhouses both domestically and internationally. The model information is then sent to SketchUp via Socket communication for modeling, generating the specific window-to-wall relationships in the model. Users can make secondary modifications to the model within SketchUp, and finally, the model's surface information is sent back to the program. For intuitive display, the system also features a 3D real-time preview function on the interface, allowing users to visually see the shape of the constructed greenhouse and the positions of the windows and walls.

[0030] In this embodiment, the specific model dimensions include single-span width, number of spans, length, eaves height, and ridge height. The key vertices include the ridge vertices and eaves vertices, where the X-coordinate of the ridge vertices is W / 2, 3W / 2, ..., (2N-1)W / 2, the Z-coordinate is the ridge height, W is the single-span width, and N is the number of spans; the X-coordinate of the eaves vertices is 0, W, 2W, ..., NW, and the Z-coordinate is the eaves height; the derived parameters include the total width and the roof tilt angle, where the total width = single-span width × number of spans, and the roof tilt angle = arctan((ridge height - eaves height) / (single-span width / 2)).

[0031] The parallel indentation algorithm includes the following steps: Obtain the geometric parameters of the outer frame, including the base width (base_width), triangle height (triangle_height), and frame width (frame_width). Calculate the inner base width (inner_base_width) = base width - 2 × frame width. Calculate the scaling ratio (scale_ratio) = base width / base width. Calculate the inner triangle height (inner_triangle_height) = triangle height × scaling ratio. Calculate the final inner triangle height (final_triangle_height) = inner triangle height - frame width.

[0032] The internal window vertex coordinates include: bottom left vertex (left_x + frame_width, bottom_z), bottom right vertex (right_x - frame_width, bottom_z), and peak (peak_x, bottom_z + final_triangle_height).

[0033] S102 transforms the model into an intuitive 3D image, sends the model information to SketchUp via Socket communication, and calls Open Studio to generate a Space in SketchUp. The actual modeling is then performed in the Space, and corresponding modifications are made.

[0034] The method for real-time model preview on a 3D monitor is a Matplotlib canvas embedded in a Tkinter window. When the user changes parameters and clicks "Update Preview" or imports a new model, the program checks the current model dictionary and redraws the 3D model based on the model information. The drawing method is as follows: all faces of the model are grouped according to their respective types (glass, frame, wall, roof, floor), and then the model is rendered. The rendering order is: first render opaque objects (ground, walls, roof, frame), and finally render window faces (semi-transparent sky blue).

[0035] In this embodiment, the specific method for generating the Space includes the following steps: 1) Environment verification: First, verify whether the OpenStudio plugin in SketchUp has been loaded correctly, and check whether the OpenStudio Model Manager and its model interface are available. Only after verification can subsequent operations be performed.

[0036] 2) Parameter verification and unit conversion: Receive greenhouse structure parameters passed from the Python side via Socket communication, including single span width, number of spans, length, eaves height and ridge height. After validating the parameters, convert all length parameters from centimeters to inches used internally in SketchUp, and calculate the total width = single span width × number of spans.

[0037] 3) Create an OpenStudio Space object: Obtain the current OpenStudio model instance through the OpenStudio Model Manager, call the OpenStudio::Model::Space constructor to create a new Space object in the model, and name it with the number of greenhouse spans as the identifier.

[0038] 4) Create and bind a hot zone: Call the OpenStudio::Model::ThermalZone constructor to create a hot zone object, and bind the Space object to the hot zone using the setThermalZone method, making the Space a subset element of the hot zone, thus providing a thermodynamic boundary for subsequent HVAC system configuration and energy consumption simulation.

[0039] 5) Create a space type: Call the OpenStudio::Model::SpaceType constructor to create a space type object and name it Greenhouse Type. Assign it to the Space object using the setSpaceType method to carry the non-geometric thermal parameters within the space.

[0040] 6) Generate SketchUp visual entities: Map the Space object to a visual component entity in SketchUp through the OpenStudio::Space interface, and call the draw_entity method to generate the corresponding Space component container in the SketchUp 3D scene.

[0041] 7) Create greenhouse geometry within Space: In the internal entity set of the Space component entity, based on the converted greenhouse structure parameters, create the complete three-dimensional geometry of the greenhouse in the order of ground, side wall frame, end wall frame, roof structure, and glass panel. The roof outline is generated into a multi-span roof shape with alternating sawtooth ridges and valleys according to the number of spans.

[0042] 8) Set OpenStudio surface properties: Traverse all geometric faces within the Space, automatically determine the surface type based on the direction of the face's normal vector and its spatial position. Faces with the normal vector pointing upwards and at a lower position are identified as Floor, faces with the normal vector pointing upwards and at a higher position are identified as RoofCeiling, faces with the normal vector approximately horizontal are identified as Wall, and faces with transparent or blue material characteristics are identified as SubSurface. Extract the vertex coordinates of each main surface and convert them to the OpenStudio coordinate system to create the corresponding OpenStudio::Model::Surface object. Associate it with the Space and set the surface type and boundary conditions. SubSurface is marked as FixedWindow type.

[0043] 9) Complete creation and view refresh: Submit the SketchUp operation transaction, refresh the 3D view and automatically scale to the model range, so that users can intuitively view the generated greenhouse space model with complete thermal properties.

[0044] In this embodiment, the method for transmitting model information via Socket communication involves starting a server and a client on a first platform (server) and a second platform (client) respectively to establish a communication connection. The Socket client encapsulates the building parameter data into a JSON format message and sends it to the Socket server via the Socket connection. The Socket server receives the JSON message, parses it to obtain the building parameter data, and calls the modeling API of the first platform to generate a 3D building model. Users can then perform secondary development based on this model. After completion, a traversal algorithm is used to retrieve the vertex coordinates and classifications of all faces in SketchUp. The Socket server encapsulates the geometric data of the new 3D building model into a JSON format message and sends it to the Socket client via the Socket connection. The Socket client receives the geometric data and imports the model data into the model dictionary.

[0045] S103 calls the SketchUp API to traverse the model, calculate the area and volume, and obtain the vertex coordinates. Finally, the data is sent to overwrite the initial model information and the 3D model is synchronized.

[0046] Open SketchUp and transfer the corresponding greenhouse parameters to it for modeling. You can then modify the model in SketchUp. After modification, click the "Synchronize Greenhouse Model" function on the system interface. The system will read the building model in SketchUp and assign attribute tags to each face according to the face inheritance relationship such as roof - roof sub-window, east wall - east wall sub-window. This facilitates future operations on each wall and synchronizes the model in the 3D display area.

[0047] S104 allows for optional configurations based on various provided systems to build a greenhouse model that meets the requirements.

[0048] In this embodiment, the optional system configurations include material settings, design date settings, geographical location settings, time schedule settings, greenhouse boiler heating settings, time step settings, and advanced parameter settings. Each configuration contains several specific systems, all of which correspond to various modules in IDFEditor. By configuring the various system modules of this program, complex IDFEditor content editing can be completed.

[0049] S105: Select a weather file and import it into EP-Launch. Call the preprocessor to process the IDF file. After completion, perform initialization simulation and report the simulation progress in real time.

[0050] Generating IDF files extracts various system and model information set by the user, fills them into their respective IDF fragments according to different categories, and automatically configures various complex information in the IDFEditor to make it suitable for various simulations of greenhouses.

[0051] Before starting the simulation kernel, the system automatically checks whether a high-level HVAC template object (HVACT) exists in the simulation configuration file. If it does, the system automatically calls the object extension tool to parse the template object into a low-level simulation object and generates an extended configuration file as the input source for subsequent simulations.

[0052] S106. Extract the generated RDD file from the analysis, improve the IDF file based on the RDD file, and re-import the IDF file into EP-Launch for formal simulation.

[0053] This embodiment employs a two-stage simulation execution mechanism, including: Exploration phase: The simulation engine is invoked to perform the first round of pre-calculation, generating a report data dictionary file (RDD) containing all available output variables of the model.

[0054] Injection phase: The data dictionary file is parsed, target variables are automatically selected based on preset greenhouse energy consumption keywords, and the target variables are encapsulated as output instructions and appended to the simulation configuration file (IDF).

[0055] Production phase: The simulation engine is invoked to load the modified simulation configuration file and execute the second round of calculations, generating a simulation result file containing complete energy consumption data.

[0056] S107 automatically extracts and analyzes simulation results, plotting different simulation structures from CSV format files into curves using matplotlib functions for viewing visualization results in the interface.

[0057] When the number of columns in a CSV file exceeds the system's default buffer size, the configured dynamic field size limit adjustment algorithm automatically increases the field size limit to fully read the wide table data. A fault-tolerant reading mechanism is employed to automatically identify and remove null columns and abnormally truncated rows, converting unstructured text data into a structured floating-point sequence.

[0058] It is also equipped with a multi-dimensional time-series statistics engine (the system supports serializing the following statistical results into JSON format data packets for front-end interface chart rendering): Monthly statistical algorithm: Based on the monthly hourly distribution characteristics of a standard meteorological year, time slices are made on hourly simulation data to calculate the monthly cumulative value, average value and extreme value of each energy consumption variable.

[0059] Annual statistical algorithm: Statistical analysis is performed on 8760 hours of data throughout the year to calculate the total energy consumption, average power, and standard deviation of the greenhouse.

[0060] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0061] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A modeling and energy consumption simulation method for multi-span glass greenhouses, characterized in that, include: The size of the greenhouse model is customized, including the specific model dimensions, key coordinates and derived parameters. The window positions and coordinate information of each face are calculated using the parallel shrinking algorithm, and the model information is saved to the model dictionary. The model is converted into an intuitive 3D image, and the model information is sent to SketchUp via Socket communication. Open Studio is then called to generate a Space in SketchUp, where the actual modeling is performed and corresponding modifications are made. Call the SketchUp API to traverse the model, calculate the area and volume, and obtain the vertex coordinates. Finally, send the data to overwrite the initial model information and synchronize the 3D model. Based on the various systems provided, a greenhouse model that meets the requirements can be constructed through optional configurations. Select a weather file and import it into EP-Launch. Call the preprocessor to process the IDF file. After completion, perform the initialization simulation and report the simulation progress in real time. Extract the generated RDD file, improve the IDF file based on the RDD file, and re-import the IDF file into EP-Launch for formal simulation; The simulation results are automatically extracted and analyzed. Different simulation structures in the CSV format file are plotted as curves using matplotlib functions for viewing the visualization results in the interface.

2. The modeling and energy consumption simulation method for multi-span glass greenhouses according to claim 1, characterized in that, The size of the custom greenhouse model includes the specific model dimensions, key coordinates, and derived parameters, including: The model dimensions define the greenhouse's single-span width, number of spans, length, eaves height, and ridge height; The key coordinates are defined for the ridge vertex and the eaves vertex, where: the X-coordinate of the ridge vertex is: in: For single span width, For the number of spans, The coordinates represent the height of the roof ridge. The X-coordinate of the eaves apex is 0. , … , The coordinates represent the height of the eaves. The derived parameters are defined as total width and roof slope angle, where: 。 3. The modeling and energy consumption simulation method for multi-span glass greenhouses according to claim 2, characterized in that, The parallel shrinking algorithm is used to calculate the window position and coordinate information of each face, and the model information is saved to the model dictionary, including: Obtain the geometric parameters of the outer frame, including: base_width, triangle_height, and frame_width; Calculate the inner base width: inner_base_width = base width - 2 × frame width; Calculate the scaling ratio: scale_ratio = inner bottom width / bottom width; Calculate the height of the inner triangle: inner_triangle_height = triangle height × scaling ratio; Calculate the final inner triangle height: final_triangle_height = inner triangle height - frame width.

4. The modeling and energy consumption simulation method for multi-span glass greenhouses according to claim 1, characterized in that, The process of converting the model into an intuitive 3D diagram includes: When the user changes the parameters and clicks to update the preview or import a new model, the system views the current model dictionary and redraws the 3D model based on the model information therein. Group all faces of the model according to their respective types, and then render the model. The rendering order is set as follows: first render opaque objects: the ground, walls, roof, and frame; finally render the window surfaces as a semi-transparent sky blue.

5. The modeling and energy consumption simulation method for multi-span glass greenhouses according to claim 4, characterized in that, The process of sending model information to SketchUp via Socket communication and then calling Open Studio to generate Space in SketchUp includes: First, verify that the OpenStudio plugin in SketchUp has been loaded correctly, and check whether the OpenStudio Model Manager and its model interface are available. Only after verification can subsequent operations be performed. Receive greenhouse structure parameters passed from the Python client via Socket communication, including single span width, number of spans, length, eaves height and ridge height. After validating the parameters, convert all length parameters from centimeters to inches used internally in SketchUp, and calculate the total width. Obtain the current OpenStudio model instance through the OpenStudio Model Manager, call the OpenStudio::Model::Space constructor to create a new Space object in the model, and name it with the greenhouse span number as the identifier; Call the OpenStudio::Model::ThermalZone constructor to create a hot zone object, and bind the Space object to the hot zone using the setThermalZone method, making the Space a subset element of the hot zone, thus providing a thermodynamic boundary for subsequent HVAC system configuration and energy consumption simulation; Call the OpenStudio::Model::SpaceType constructor to create a space type object and name it Greenhouse Type. Then, use the setSpaceType method to assign it to the Space object to carry the non-geometric thermal parameters within the space. The Space object is mapped to a visual component entity in SketchUp through the OpenStudio::Space interface, and the corresponding Space component container is generated in the SketchUp 3D scene by calling the draw_entity method; Within the internal entity set of the Space component entity, based on the converted greenhouse structure parameters, the complete three-dimensional geometry of the greenhouse is created sequentially in the order of ground, side wall frame, end wall frame, roof structure, and glass panel. The roof outline generates a multi-span roof shape with alternating sawtooth ridges and valleys according to the number of spans. Traverse all geometric faces within the Space, automatically determine the surface type based on the direction of the face's normal vector and its spatial position. Faces with the normal vector pointing upwards and at a lower position are identified as ground surfaces, faces with the normal vector pointing upwards and at a higher position are identified as roof surfaces, faces with the normal vector approximately horizontal are identified as wall surfaces, and faces with transparent or blue material characteristics are identified as glass sub-surfaces. Extract the vertex coordinates of each main surface and convert them to the OpenStudio coordinate system to create the corresponding OpenStudio::Model::Surface object. Associate it with the Space space and set the surface type and boundary conditions. Glass sub-surfaces are marked as fixed window types. Finally, submit the SketchUp operation transaction, refresh the 3D view and automatically zoom to the model range, allowing users to intuitively view the generated greenhouse space model with complete thermal properties.

6. The modeling and energy consumption simulation method for multi-span glass greenhouses according to claim 5, characterized in that, The method for transmitting model information via Socket communication is as follows: Start the Socket server and Socket client respectively to establish a communication connection; The Socket client encapsulates the building parameter data into a JSON format message and sends it to the Socket server via the Socket connection. The Socket server receives JSON messages, parses them to obtain building parameter data, calls the modeling API to generate a 3D building model, and then uses a traversal algorithm to retrieve the vertex coordinates and categories of all faces in SketchUp. The Socket server encapsulates the geometric data of the new 3D building model into a JSON format message and sends it to the Socket client via the Socket connection; The Socket client receives geometric data and passes the model data into the model dictionary.

7. The modeling and energy consumption simulation method for multi-span glass greenhouses according to claim 1, characterized in that, The process of constructing a greenhouse model that meets the requirements by providing optional configurations based on various systems includes: Determine the available system configurations, including: material settings, design date settings, geographic location settings, time schedule settings, greenhouse boiler heating settings, time step settings, advanced parameter settings, and crop planting status. Each configuration contains several specific systems, all of which correspond to various modules in IDFEditor. Complex IDFEditor content editing can be accomplished by configuring each system module.

8. The modeling and energy consumption simulation method for multi-span glass greenhouses according to claim 1, characterized in that, The process involves selecting a weather file and importing it into EP-Launch, calling the preprocessor to process the IDF file, performing initialization simulation, and reporting the simulation progress in real time, including: Generate IDF files to extract various system and model information set by the user; Fill in the IDF fragments according to different categories, and automatically configure various complex information in IDFEditor to make it suitable for various simulations of greenhouses; Before starting the simulation kernel, automatically detect whether there are high-level HVAC template objects in the simulation configuration file; If it exists, the object extension tool will be automatically invoked to parse the template object into the underlying simulation object and generate an extension configuration file as the input source for subsequent simulations.

9. The modeling and energy consumption simulation method for multi-span glass greenhouses according to claim 1, characterized in that, The process of extracting and analyzing the generated RDD file, improving the IDF file based on the RDD file, and then re-importing the IDF file into EP-Launch for formal simulation includes: The simulation engine is invoked to perform the first round of pre-calculation, generating a report data dictionary file (RDD) containing all available output variables of the model. The RDD file is parsed, target variables are automatically selected based on preset greenhouse energy consumption keywords, and the target variables are encapsulated as output instructions and appended to the simulation configuration IDF file; The simulation engine is invoked to load the modified IDF file and perform a second round of calculations, generating a simulation result file containing complete energy consumption data.

10. The modeling and energy consumption simulation method for multi-span glass greenhouses according to claim 1, characterized in that, The automatic extraction and analysis of simulation results, including plotting different simulation structures from the CSV file into curves using matplotlib functions for visualization on the interface, includes: When the number of columns in a CSV file exceeds the system's default buffer size, the configured dynamic field size limit adjustment algorithm automatically increases the field size limit to fully read the wide table data. A fault-tolerant reading mechanism is adopted to automatically identify and remove null columns and abnormally truncated rows in the data rows, and convert unstructured text data into a structured floating-point number sequence.