Empower Your Research

Introducing a useful tool

Review of the Xarsed web app, a web app based on the Python programming language and aimed at facilitating the design process of home power plants

Abstract

Two years ago, I published an article in the prestigious journal Scientific Reports titled "Hydrogen mini-factory for domestic purposes (wind version)". The main goal of this article was to create an algorithm to simplify the process of producing hydrogen from wind energy. Now here I introduce a tool that has a similar goal to the idea of ​​this article. But this tool has implemented the concept of idea to action step by step. This tool is named Xarsed. Xarsed is made of several different parts, including a Python package and a web app based on the Django framework. The main goal of Xarsed is to create a simple environment for designing a solar panel-battery-based power plant for small and domestic uses. With the help of Xarsed, anyone with any level of knowledge in the field of energy can design and implement a solar power plant for their home or office.

The many features of Xarsed prevent me from fully introducing it in one article, so I will introduce each of its parts separately. In this section, I will focus on its Python package.

Xarsed Python Package, a Scientific Toolkit for Solar Power Plant Design

The Xarsed Python package is available in a public repository on GitHub at https://github.com/xarsed/xarsed-pp-v0.0.0 . The package includes common functions, solar part functions, and functions related to the final power plant design and reporting. In this article, I will give an overview of all three parts of the package and examine its functions, leaving the details to future articles.

Common Functions Section

To access the common functions, you must go to the common folder at the link https://github.com/xarsed/xarsed-pp-v0.0.0/tree/main/src/xarsed/common . This folder contains four Python script files, of which I will skip the first one, __init__.py, and move on to the second file.

The common.py script contains several functions. These functions pursue various goals, including: determining the necessary parameters for calculating solar energy and designing the system, determining the average values ​​of the parameters for a year in hourly time resolution, creating a list of the annual hourly consumption of the desired variable.

Among these functions, the function to create a time series of consumption of the desired parameter is one of the most interesting functions of this module, which aims to create a continuous annual time series with hourly resolution from the user's hourly, daily, weekly, monthly, and seasonal selections for the desired parameter, which I will discuss in more detail in future articles.

The plotting.py script includes a function to display energy consumption versus production, giving the user an overview of the situation. Finally, the last file in this section, statistical_process.py, contains a function to generate an annual hourly average from time series data.

Solar Functions Section

This section, located at the link https://github.com/xarsed/xarsed-pp-v0.0.0/tree/main/src/xarsed/solar , contains 5 files including __init__.py and 4 modules for designing a solar system. If you are working in the field of designing solar systems, this section may be of interest to you.

The photovoltaics.py script contains functions for determining the amount of solar radiation. One of the functions called radiation_calculation is responsible for calculating two widely used types of solar radiation, namely global tilted irradiance and global tracker irradiance. Another function called modified_radiation is responsible for correcting the high values ​​calculated by radiation_calculation. Finally, the photovoltaics_flux function is used to design the dimensions of the solar panel. I will explain all three of these functions in detail in another article.

If you are researching the position of the sun in the sky, for example, designing solar tracker systems, the solar_common.py script can help you. A function called solar_position can be used to determine the position of the sun in the sky at any place and time using latitude and longitude.

The solar_graphing.py script is also responsible for drawing images of the direction and angle of the solar panel and the overall scheme of the photovoltaics_electricity_battery triple system in two separate functions.

To design a complete system, it is necessary to create a logical relationship between inputs and outputs. For this purpose, the solar_scenario.py script has a function in itself to create this logical relationship. This function can calculate the power and area of ​​the photovoltaic panel, battery capacity, and other necessary values, using the values ​​of radiation and air temperature, electricity consumption, and technical details of the photovoltaic module in question.

Summary and Reporting Section

This section, which is available via the link https://github.com/xarsed/xarsed-pp-v0.0.0/tree/main/src/xarsed/solution , contains 5 Python scripts like the previous section.

The reporting.py script, as its name suggests, is responsible for preparing the final report to be presented to the user.

The next two scripts, solution_details.py and solution_overview.py, are responsible for writing the final report, which are active in the reporting.py script.

Finally, the warning_recommendation.py script is an interesting part of Xarsed because it is responsible for guiding the user to the situation, she/he is in. For example, if production is low or consumption is high, it prepares messages for the user so that he can find the root of his problem.

Conclusion

Xarsed is an interesting tool but at the same time simple to understand and use. If you want to use it, you can visit the link https://xarsed.pythonanywhere.com . I will introduce more details about Xarsed in the next posts.