modelGreenhouse_1

Simulation of a Venlo-type greenhouse for tomato crop cultivated from 10Dec-22Nov (weather data from TMY)

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

Simulation of greenhouse climate

This example intends to illustrate the simulation of a greenhouse climate. The greenhouse is built by interconnecting all of the energy and mass Flows presents in a greenhouse to their related Components. As it can be distinguished, the greenhouse modeled in this example consists of two levels of heating circuits, roof windows (but not side vents), natural ventilation (no forced ventilation) and a movable thermal screen. It should be noted that, when the screen is drawn, the air of the greenhouse is divided in two zones, i.e. below and above the screen. These zones are modeled separately (models air and air_Top) and their climate is assumed to be homogeneous. The models parameters have been set to typical values for Venlo-type greenhouse construction design dedicated to tomato crop cultivation. The greenhouse floor area and the mean greenhouse height are set in two individual block sources.

The simulated greenhouse is located in Belgium and the simulation period is from December 10th to November 22nd. Two data files are required:

  • Weather data: The input weather data for the simulation period is extracted from a TMY for Brussels and can be found in ‘Greenhouses/Resources/Data/10Dec-22Nov.txt’. The file contains data for the outside air temperature, air pressure, wind speed and global irradiation. The sky temperature, previously computed in a Python script, is also included in this file.
  • Climate control set-points: The temperature and CO2 set-points for the simulation period are calculated according to the strategy presented in the online documentation and can be found in ‘Greenhouses/Resources/Data/SP_10Dec-22Nov.txt’.

These '.txt' files are accessed by means of TMY_and_control and SP_new, which are two CombiTimeTables models from the Modelica Standard Library.

The goal of this example is to show the energy flows interacting in a greenhouse. Thus, no generation units are included. Instead, the heating pipes are connected to a water source and sink model. The model includes the following controls:

  • PID_Mdot: A PI controller adjusts the output mass flow rate of the water source connected to the heating pipes by comparing the air temperature set-point and present value.
  • PID_CO2: A PI controller adjusts the output of the CO2 external source by comparing the actual CO2 concentration of the air to its set-point.
  • Ctrl_SC: A state graph adjusts the screen closure (SC) according to the strategy presented in Control_ThScreen. The real inputs must be connected to the air relative humidity, the outdoor temperature, the indoor air temperature set-point and the usable hours of the screen. The usable hours are 1h30 before dusk, 1h30 after dawn and during night.
  • vents: A PI controller adjusts the opening of the windows according to the strategy presented in Uvents_RH_T_Mdot. The opening depends mainly on the indoor air relative humidity and temperature.
  • OnOff: controls the ON/OFF operation of the supplementary lighting according to the strategy presented in Control Systems. The control output, previously computed in a Python script, is input as a .txt file by means of the TMY_and_control CombiTimeTable.

Components

TypeNameDefaultDescription
Modelica.Units.SI.HeatFluxq_low
Modelica.Units.SI.HeatFluxq_up
Modelica.Units.SI.HeatFluxq_tot
RealE_th_tot_kWhm2
RealE_th_tot
RealDM_HarAccumulated harvested tomato dry matter
RealW_el_illu
RealE_el_tot_kWhm2
RealE_el_tot
Components.Greenhouse.Covercover
Components.Greenhouse.Airair
Components.Greenhouse.Canopycanopy
Flows.HeatTransfer.Radiation_T4Q_rad_CanCov
Components.Greenhouse.Floorfloor
Flows.HeatTransfer.Radiation_T4Q_rad_FlrCan
Flows.HeatTransfer.CanopyFreeConvectionQ_cnv_CanAir
Flows.HeatTransfer.FreeConvectionQ_cnv_FlrAir
Flows.HeatTransfer.Radiation_T4Q_rad_CovSky
Modelica.Thermal.HeatTransfer.Celsius.PrescribedTemperatureout
Flows.HeatTransfer.OutsideAirConvectionQ_cnv_CovOut
Components.Greenhouse.Illuminationillu
Flows.HeatTransfer.Radiation_T4Q_rad_FlrCov
Modelica.Blocks.Sources.Constantsurface
Flows.Sources.Vapour.PrescribedPressureprescribedVPout
Flows.VapourMassTransfer.MV_CanopyTranspirationMV_CanAir
Flows.HeatTransfer.SoilConductionQ_cd_Soil
Flows.HeatTransfer.Radiation_T4Q_rad_CanScr
Flows.HeatTransfer.Radiation_T4Q_rad_FlrScr
Components.Greenhouse.ThermalScreenthScreen
Flows.HeatTransfer.Radiation_T4Q_rad_ScrCov
Components.Greenhouse.Air_Topair_Top
Components.Greenhouse.Solar_modelsolar_model
Components.Greenhouse.HeatingPipepipe_low
Flows.HeatTransfer.Radiation_NQ_rad_LowFlr
Flows.HeatTransfer.Radiation_NQ_rad_LowCan
Flows.HeatTransfer.Radiation_NQ_rad_LowCov
Flows.HeatTransfer.PipeFreeConvection_NQ_cnv_LowAir
Flows.HeatTransfer.Radiation_NQ_rad_LowScr
Components.Greenhouse.HeatingPipepipe_up
Flows.HeatTransfer.Radiation_NQ_rad_UpFlr
Flows.HeatTransfer.Radiation_NQ_rad_UpCan
Flows.HeatTransfer.Radiation_NQ_rad_UpCov
Flows.HeatTransfer.PipeFreeConvection_NQ_cnv_UpAir
Flows.HeatTransfer.Radiation_NQ_rad_UpScr
Flows.HeatAndVapourTransfer.Convection_CondensationQ_cnv_AirScr
Flows.HeatAndVapourTransfer.Convection_CondensationQ_cnv_AirCov
Flows.HeatAndVapourTransfer.Convection_CondensationQ_cnv_TopCov
Flows.HeatAndVapourTransfer.VentilationQ_ven_AirOut
Flows.HeatAndVapourTransfer.VentilationQ_ven_TopOut
Flows.HeatAndVapourTransfer.AirThroughScreenQ_ven_AirTop
Flows.HeatAndVapourTransfer.Convection_EvaporationQ_cnv_ScrTop
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensorTair_sensor
ControlSystems.PIDPID_Mdot
Modelica.Blocks.Sources.ConstantTsoil7
Flows.Sensors.RHSensorRH_out_sensor
Modelica.Blocks.Sources.RealExpressionTout
Modelica.Blocks.Sources.RealExpressionI_glob
Modelica.Blocks.Sources.RealExpressionu_wind
Modelica.Blocks.Sources.RealExpressionVPout
Modelica.Blocks.Sources.RealExpressionOnOff
Modelica.Thermal.HeatTransfer.Celsius.PrescribedTemperaturesky
Modelica.Blocks.Sources.RealExpressionTsky
Modelica.Blocks.Sources.RealExpressionTair_setpoint
Components.CropYield.TomatoYieldModelTYM
Flows.CO2MassTransfer.CO2_AirCO2_air
Flows.CO2MassTransfer.CO2_AirCO2_top
Flows.CO2MassTransfer.MC_ventilation2MC_AirTop
Flows.CO2MassTransfer.MC_ventilation2MC_AirOut
Flows.CO2MassTransfer.MC_ventilation2MC_TopOut
Flows.Sources.CO2.PrescribedConcentrationCO2out
Modelica.Blocks.Sources.RealExpressionCO2out_ppm_to_mgm3
Flows.CO2MassTransfer.MC_AirCanMC_AirCan
Flows.Sources.CO2.PrescribedCO2FlowMC_ExtAir
ControlSystems.PIDPID_CO2
Modelica.Blocks.Sources.RealExpressionCO2_air_PV
Flows.FluidFlow.Reservoirs.SourceMdotsourceMdot_1ry
Flows.FluidFlow.Reservoirs.SinkPsinkP_2ry
Modelica.Fluid.Sensors.TemperatureT_ex_2ry
Modelica.Fluid.Sensors.TemperatureT_su_1ry
Modelica.Fluid.Sensors.TemperatureT_ex_1ry
Flows.Sensors.RHSensorRH_air_sensor
Modelica.Blocks.Sources.CombiTimeTableTMY_and_controlSet-points for the climate
Modelica.Blocks.Sources.RealExpressionCO2_SP_var
Modelica.Blocks.Sources.CombiTimeTableSC_usable
ControlSystems.Climate.Control_ThScreenSC
Modelica.Blocks.Sources.RealExpressionTout_Kelvin
ControlSystems.Climate.Uvents_RH_T_MdotU_vents
Modelica.Blocks.Sources.RealExpressionh_AirHeight of main zone
Modelica.Blocks.Sources.CombiTimeTableSP_newClimate set points 10Dec-22Nov: daily setpoints based on maximizing photosynthesis rate, minimum night temperature of 16, 24h mean temperature of 20