**1. Introduction**

To prevent environmental issues caused by the use of fossil fuels, research on renewable sources of energy has increased. In this regard, biodiesel, bioethanol, and biogas are among the promising alternatives [1]. Biodiesel—the monoalkyl ester of vegetable, algal, and animal oils—is nowadays employed as a replacement to diesel. It is produced from edible oils and non-edible oils, while non-edible oils are more sustainable and promising resources [2–5]. Among the renewable liquid biofuels, ethanol currently plays a major role as a blend for the improvement of gasoline properties. Ethanol production

from lignocelluloses has received significant attention due to its low price and availability in large quantities without food and energy conflict [6,7].

Energy crops that are specifically cultivated for energy production are among the most important sources of energy. These plants are divided into three groups of oily, cellulosic, and sugar-rich plants. These plants, e.g., castor plant, are suggested to supply a major part of future energy in the form of liquid and gaseous biofuels [8].

The castor plant is among the oily crops, containing seeds with 47–49% (*w*/*w*) non-edible oil, mainly include ricinoleic acid [9]. The castor plant can be cultivated under different climate conditions and in wastewater. The cultivation cost of this plant is lower than the other oily plants, such as jatropha and rapeseed. Moreover, castor seeds and seed cake are restricted to be used as human and animal feeds, as they are highly poisonous [10]. The castor plant's residues, including stem, leaves, and seed processing residues (seed cake), are potential sources for bioethanol and biogas production and its oil is suitable for biodiesel production with high efficiency [9].

Biofuel production from lignocellulosic feedstocks and energy crops has different technical and economic bottlenecks. The biorefinery concept is suggested to address the process's drawbacks and make the bioenergy from lignocelluloses competitive with the current forms of energy. Biorefineries are referred to as facilities to produce biofuels, energy, and biochemicals from renewable feedstocks. Recently, the biorefinery based on using energy crops as feedstock received significant attention. This has been predicted to have a significant role in addressing climate change and decreasing dependence on fossil fuels in economically feasible pathways [11,12].

An essential factor in biorefinery development is the consumption versus produced energy. The energy produced in the form of heat, power, and liquid or gaseous fuels through the biorefinery should be higher than the energy consumption in different units of processes. Therefore, the energy analysis for these processes is very important. To predict the feasibility of the biorefinery, technical and economic studies are necessary. The technical and economic analyses are methods that identify the strengths and weaknesses of each process and show future plans and perspectives of biorefinery development [13].

In recent years, techno-economic analyses were used as a tool to evaluate the feasibility of biodiesel, bioethanol, and biogas production from lignocellulosic materials. The economics of biodiesel production from edible, non-edible, and waste oil by different plants showed that the most effective factors on biodiesel price and economic parameters are raw oil cost and plant scale [14–22]. The techno-economic analyses showed that the raw material cost, type of byproducts, plant scales, and tax policies in the varied area have the greatest effect on economic factors of ethanol production from lignocelluloses. In addition, these studies showed that bioethanol production in a biorefinery in large scales is a profitable state [13,23–25]. In another study, we evaluated the potential of biodiesel, biogas, and heat production from the castor plant. The results showed that biogas production from the lignocellulosic part is not economically feasible [26]. The experimental results also showed that ethanol with high efficiency could be obtained from the lignocellulosic residues of castor plant. This lignoethanol was then successfully used for the transesterification process for biodiesel production [9,27]. This biodiesel is produced from two renewable feedstocks, i.e., castor oil and bioethanol, and thus is much more eco-friendly compared with the biodiesel produced from the fossil-based methanol [28,29]. To our knowledge, no references were detected for techno-economic study for the biorefinery based on castor plant for the production of bioethanol and biodiesel from lignoethanol.

The potential of castor plant for biofuel production is approved experimentally [9,27]. Based on experimental data, the economy of biorefinery for biodiesel and bioethanol production based on castor plant was investigated for the first time in this study. Two different processes, i.e., biodiesel production using lignoethanol (scenario 1) and methanol (scenario 2), were studied. Aspen Plus was used for the simulation of processes, Aspen Process Economic Analyzer (APEA) was employed to evaluate the economic parameters, and sensitivity analyses were conducted to determine the effective factors.
