## 4 Conclusions  
This work proposed a dynamic simulation model of a polygeneration system based on solar thermal collectors and biomasses to meet the energy demand of a farm including a residential user and a greenhouse. To analyze the performance of the system, an economic, environmental, and energy analysis of the polygeneration system was also proposed. This renewable-based polygeneration system integrates photovoltaic panels, solar thermal collectors, a biomass-fed pyrogasifier, and a biomass auxiliary boiler. Therefore, dynamic and thermo-economic analyses are fundamental to observe the dynamic matching of renewable energy produced with the users demand and to assess the economic feasibility of the solution proposed. To this scope, the model was developed in a TRNSYS environment, where a detailed model for the greenhouse was integrated. The greenhouse model was validated against data available from research works in the literature to accurately evaluate the power and heating demands of the greenhouse. The model was applied to a case study in Castel-volturno (Naples, South of Italy) where a greenhouse with a total heating demand of 246 MWh/year was considered. In addition to the greenhouse, a domestic user was considered, leading to an overall heating and power demand by the end user of 289 MWh/year and 122 MWh/year, respectively. The main results of the work can be summarized as follows: \begin{table}
\begin{tabular}{c c c} \hline \hline
**Adopted Purchasing Costs** & **Post Crisis** & **Pre Crisis** \\ \hline \(\Delta\)C & 122 k EUR/y & 31 k EUR/y \\ \hline SPB & 1.7 y & 6.7 y \\ \hline DPB & 1.8 y & 8.4 y \\ \hline NPV & 1317 k EUR & 177 k EUR \\ \hline PI & 6.4 & 0.86 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Economic results. \begin{table}
\begin{tabular}{c c} \hline \hline Primary energy RS & 587.04 MWh/y \\ \hline Primary energy PS & \(-\)124.67 MWh/y \\ \hline PES (primary energy saving) & 121\% \\ \hline CO\({}_{2}\) emissions RS & 122.93 t/y \\ \hline CO\({}_{2}\) emissions PS & \(-\)25.73 \\ \hline Avoided CO\({}_{2}\) emissions & 121\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Yearly energy and environmental results. * The thermal self-consumption is 63% of the total thermal energy demand (182 MWh/year)
* The electric production covers more than 65% of the electric consumption (79 MWh/year). * Considering the purchasing energy costs before and after the energy crisis, the performed economic analysis obtained substantially different simple payback values, decreasing from 6.7 to 1.7 years. * The energy and environmental analysis showed how much the implementation of green systems connected to a circular economy reduces the emissions, with \(-\)148.66 tons of CO\({}_{2}\)/year, and the exploitation of fossil fuels, with \(-\)711.7 MWh/year of primary energy. Future research topics regard the implementation of a suitable electric storage system in order to increase the grid-independency as well as the development of a detailed dynamic simulation model to simulate the performance of the pyrogasifier unit. In fact, in the current work, the assumption regarding the pyrogasifier unit operation expects that it constantly produces both heat and power, without taking into account a suitable dynamic simulation model. This limitation could be overcome in a future research study. Conceptualization, F.C. and M.V. ; methodology, F.L.C. and M.V. ; software, L.C. and F.L.C. ; validation, F.L.C. and M.V. ; formal analysis, L.C. ; investigation, L.C. and F.L.C. ; resources, L.C. and F.L.C. ; data curation, M.V. ; writing--original draft preparation, M.V. ; writing--review and editing, F.C. ; visualization, M.V. ; supervision, F.C. ; project administration, F.C. and M.V. ; funding acquisition, none. All authors have read and agreed to the published version of the manuscript. This research received no external funding. Informed Consent Statement: Informed consent was obtained from all subjects involved in the study. The data presented in this study are available on request from the corresponding author.