Implementation of dynamic working condition seawater desalination system optimization and simulation model

Freshwaterisanincreasinglyimportantresearchtopicinthe21stcentury,similartotheimportanceofcoal andoilinthe19thand20thcenturies,respectively.Toexpandexpertiseondesalinationsystems,thisstudy aims to design a set of seawater desalination systems with dynamic working conditions based on the visualized development platform LABVIEW. The optimization searched for the optimal working conditions and formed the seawater desalination re ﬁ nement process control technology and solution. A scaled dynamicloadworkingdevicesafetyandprotectionsolutionwasobtained,andanidealscenariocompared withtherealoperationenvironmentwasreproducedtoassistpeopleinoperatingandrunningthesystem.


INTRODUCTION
Freshwater is an increasingly important research topic in the 21st century, similar to the importance of coal and oil in the 19th and 20th centuries, respectively.With the development of incremental water resource technology, desalination has become the key solution to the global water crisis.Currently, desalination facilities are established in more than 120 countries and mostly used in the Middle East and America.Asian countries, such as Japan, Singapore, Korea, Indonesia, and China, also actively support this industry.Approximately 16,000 desalination plants are in use worldwide, and their daily output reaches 7 billion tons.Of this amount, 80% is used for drinkable water, which resolves the water supply problem for 10 billion people.Briefly, one out of 50 people worldwide depends on the desalination industry for potable water.
Recent optimization research has been conducted on the seawater reverse osmosis (SWRO) desalination system.

SYSTEM LAYOUT
The SWRO device first collects raw seawater and then performs initial processing to clean the seawater by preventing the growth of bacteria, algae, and other microbes.The device then increases the pressure by using a special high pressure booster pump and pushes the seawater into the RO membrane for desalination.The RO membrane is expected to exhibit a high desalination rate, corrosion resistance, high pressure, and anti-pollution characteristics.After desalination of the membrane, the seawater salinity significantly decreased.The total content of dissolved substances also decreased from 36,000 mg/L to around 200 mg/L.The water after processing was superior to running water and can be used for industry, commerce, citizens, and ships.
In recent years, domestic seawater desalination technology has increasingly developed.Thus, this paper focused on the improvement and refinement of the regular device.The system includes the raw seawater pre-processing phase, the RO desalination phase, the post-processing transportation phase, and the device-washing phase.
• The raw seawater pre-processing phase is composed of seawater tank, booster pumper, flocculation dosing device, multimedia filter, and inhibitor dosing device.
• The RO desalination phase is composed of safety filter device, high pressure booster pump, energy recovery device, pressure lift pump, pressure meter, and valve.
• The post-processing delivery phase is composed of pH dosing device, water production tank (same as the washing tank), and desalination pump.
• The device-washing phase includes a water tank and washing pump.

Raw seawater processing phase
To ensure that the RO desalination device can run safely and efficiently, the system needs to process the seawater until it meets the input seawater quality criterion of the device.Normally, seawater purification and seawater quality adjustment constitute the pre-processing phase.After this phase, the indicators of seawater quality should be presented as follows: • pH: 2-11.
• Chemical oxygen demand (COD)(Mn): <1.0 mg/L.• Seawater tank: Stores the raw seawater for the system, is monitored by volume meter, and reacts with the booster pump based on the seawater level range.• Booster pumper: Equipped with a dynamic frequency pressure output to adjust the pressure of the system to control the seawater input volume.
• Flocculation dosing device: Controls flocculate input from the multimedia filter, and removes suspended solids and colloidal debris more effectively.It can be monitored using a dosing meter.
• Multimedia filter: Decreases the seawater turbidity to meet the quality of seawater for the next phase.Its major indicator is the SDI: <5.The filter is made from a fiberglass body, and its internal water filter cap is made of acrylonitrile butadiene styrene (ABS) material.
It controls the overall filtering speed within 8-12 m/h.
• Inhibitor dosing device: As the RO process is used for con- centrating dissolved solids discharge and fresh water, inorganic salt crystals precipitate when the water is concentrated, forming carbonate scale (CaCO 3 , MgCO 3 ), sulfate scale, and occasionally even silica.Sulfate crystals (e.g.BaSO 4 , SrSO 4 ), as they are often sharp, will probably pierce the semi-permeable membrane, resulting in high concentration water slipping through the membrane surface, causing the desalination process to fail.This phenomenon is most likely to occur at the end of a membrane element at the high concentration water side because the high concentration of water is in the area of the highest multiples.When a scale inhibitor is added, a precise dosing metering pump is needed to prevent inhibitor overdose.Excess negative charge will synergistically inhibit the cationic polyelectrolyte membrane surface precipitation and pollution, thereby reducing the cationic polymerization concentration, as well as the risk.

RO desalination phase
RO is a means of selective transmission (semi-permeable) membrane function that forms membrane separation driven by pressure difference.When the system-applied pressure is greater than the osmotic pressure, water molecules constantly pass through the membrane via the water production channel flowing into the center channel.
Subsequently, the water flows out at the end with impurities, such as ions, organic matter, bacteria, and viruses.These impurities are retained in the water side of the membrane and then expelled from the high concentration water outlet end to achieve the purpose of separation and purification.RO is different from the simple screening separation process because it cannot be concentrated, given the limitations of ordinary filters.
1. Safety filters: Each RO system should be configured with safety filters.They protect the membrane and the high pressure pumps and prevent particulate impurities from blocking or damaging the high pressure pump and the membrane channel.
2. High pressure pump: RO desalination systems consume large amounts of energy.A high pressure pump for the RO element overcomes the osmotic pressure.To adapt to varying condition characteristics, this design chooses three efficient pistons, and each one is peer to a pressure container.The high pressure pump is configured to frequency conversion.Not only can it make the pressure rise slowly when its switch is on, which is beneficial for membrane protection, but also the frequency can be controlled by adjusting the high pressure pump performance to achieve energy efficiency and adapt to dynamic working conditions.In addition, it provides high and low pressure protection against damage to the pump by unexpected situations.

Energy recovery device:
The system discharges concentrated water with a pressure of up to 4.3 to 6.8 MPa.According to the 30% recovery rate, the discharged water still contains 70% of the pressure energy of the input seawater, which can significantly reduce the energy consumption of RO desalination if it can be reused in input.

Pressure lift pump:
The energy recovered through the energy recovery device desired pressure is insufficient to overcome the RO.Thus, it will increase the seawater pressure to meet operating pressure.
5. RO device: This is the core device in the RO desalination phase, and selects high rejection rate, low-power consumption devices.

Post-processing delivery phase
A production water tank is used to store the water after the RO phase and can ease the continuous supply, as well as ensure regular operation of the RO.This tank is equipped with a volume level meter.

Washing device phase
A better RO pre-processing indicates a longer cleaning cycle of the membrane element.Furthermore, the membrane becomes easier to clean.Unfortunately, ensuring that the RO membrane element is completely un-contaminated is impossible.When it occurs, the RO pressure difference increases, water production declines, and the desalination rate drops accordingly.To ensure long-term stable operation of RO, the film should be periodically cleaned.Thus, it also needs to be configured with a dual-purpose cleaning and flush pump.

Tank devices
Similarly to the operation mechanism of RO desalination systems tanks, the tanks and other equipment can be used to describe a mathematical model.Liquid storage devices typically include one or more feed channels and discharge channels.Thus, the level meter was used to monitor its operation.Set accumulator device level was h, the crosssectional area was A, the total feed flow was Q IN, and discharge flow was Q OUT .Following basic physical laws, the differential equations of dynamic equilibrium level can be obtained using Equation (1).
Pressure booster pump and lift pump The system pressure booster pump and lift pump are centrifugal.The performance of a centrifugal pump is expressed by the flow Q, the pumping head H, the energy consumption P, revolution speed N, and other parameters.
The flow rate Q and head H approximate linear relationship is calculated using Equation (2). Figure 2 shows an example of the HP 8503 PX BOOSTER PUMP running characteristic

Pre-processing system
Figure 3 shows the simplified RO desalination pre-processing system-operating model.
The simplified desalination pre-processing system mathematical model starts from the pump outlet; passes through multimedia filters, dosing/dechlorination systems, and safety filters; and finally reaches the RO membrane unit.
Following basic physical laws, pre-processing systems flow and pressure are presented in Equations ( 3) and ( 4).
High-pressure pump The high-pressure pump system of choice is the Danfoss APP1.8.The APP pump is a fixed displacement pump, and its flow is proportional to the number of revolutions of the input shaft and the pump displacement.Flow may affect pump revolution speed changes.The ratio between flow and revolution speed is fixed, and the required flow rate can be obtained by changing the revolution speed as shown in Equation ( 5) (Wang ).
where n is the required revolution speed, Q is the required flow, n r is the rated revolution speed, and Q r is the rated flow.
The energy consumption of the pump is determined by the flow rate and pressure difference of the feed and discharge outlet.Assuming flow Q, the energy consumption is P, the pressure difference is Δp, efficiency η, the following relationship is satisfied as Equation (6) (Yanyue ).

RO membrane
The performances of RO membrane elements are affected by water supply conditions and operating conditions.Therefore, establishing a reliable RO membrane element model is important for system design and operation to establish a  7) and (8).
where J w is the water flux, m=h, J s is the salt flux where p is membrane element feed water side average pressure, MPa, and π is membrane element feed water side average permeable pressure, MPa.
After derivation calculus, a quadratic Equation ( 10) about the concentrated water flow of membrane elements can be obtained as follows: 2 where the water-infiltrated coefficient, salt-infiltrated coefficient, flow resistance coefficient, and infiltration pressure coefficient are calculated from the experiment.Meanwhile, the feed water temperature, feed water flow, feed water pressure, feed water molar concentration, and membrane element area are known conditions.Thus, Q c can be calculated by the above equation.Equations ( 11)-( 13) can calculate the result of the membrane element's produced water flow, concentrated water pressure, and molar concentration, respectively.
For instances in which multiple membrane element series are connected in a single membrane shell, the first element's Q c is the second element's Q f , the first element's M c is the second element's M f , and the first element's p c is the second element's p f .The above equation is used to obtain the second membrane element's Q p , Q c , M c , and p c ; thus, the parameters of the series connected membrane elements will be calculated within the single membrane shell.

Salt-infiltrated calculation
First, membrane element desalination rate R is calculated as Equation ( 14) (Jing ).
where M f is the feed water molar average concentration in mole=L.
After derivation calculus, the new equation form of the membrane element's salt-infiltrated rate R can be obtained as shown below: Concentration polarization is calculated as follows: The salt-infiltrated rate R can be obtained.Finally, the produced water molar concentration can be calculated as follows: and Q co , low pressure concentrated water flow.Figure 4 shows the energy recovery device model.
Based on the energy recovery device's actual performance, its flow and pressure characteristic should meet the following equations ( Jing ): flow Q, maximum flow Q max , the valve opening is l, the maximum opening of L, R is the valve characteristic factor.
Linear flow characteristics of the valve can be expressed as Equation ( 21).
Equal percentage valve flow characteristics satisfy the following relationship:

RESULTS AND DISCUSSION 5 t/h RO desalination system overall layout
Using the flow chart in Figure 1, this study designed and implemented a 5 t/h desalination system.The LABVIEW software platform was used for simulation.
Using the membrane shell feed water pressure p 4 and flow Q 4 as the starting point for the calculation, a system static mathematical model was established (Figure 5).
Each traffic node equation and pressure equation is established.All operation parameters can be solved through the known parameters and pressure p 4 and flow Q 4 .

Boost pump
Boost pump input pressure was relevant to the seawater tank level: To provide the proper pressure and flow to the seawater pre-processing system, the boost pump outlet pressure was fixed by the experience data: Boost pump flow was equal to the membrane shell feed water flow: Boost pump energy consumption was relevant to its feed and outlet's pressure difference and flow: Pre-treatment system (pre-process system) The system included the dosing device, multimedia filter device, and safety filter.Seawater flow was stable, and pressure declined slightly when it passed through the system.
After the tests, the seawater pressure loss was approximate to constant: Subsequently, the system outlet's pressure was: Finally, the system outlet's flow was: High-pressure pump The high-pressure pump feed was the pretreatment system outlet seawater pressure: The high-pressure pump was the piston proportional to the flow rate and the operating frequency: where k h is the scaling factor calculated by the field test.
The high-pressure pump energy consumption was relevant to its feed and pressure difference and flow of the outlet:

RO membrane
On the basis of the dynamic working condition RO membrane equation, the given membrane shell feed water pressure p 4 and flow Q 4 , as well as the membrane shell operating parameters, can be obtained as follows: membrane shell concentrated water flow Q 6 , pressure p 6 , and produced water flow Q 5 .

Energy recovery device
The low pressure concentrated water flow of the energy recovery device depended on the concentrated water control valve (manually).The membrane shell feed water pressure and flow determined the concentrated water flow, which needed to match the low pressure concentrated water flow of the energy recovery device.
The energy recovery device's high pressure seawater outlet pressure depended on the high pressure concentrated water pressure, low pressure concentrated water pressure, high pressure concentrated water flow, and high pressure seawater flow: The energy recovery device low pressure seawater flow met the following relationship:

Pressure lift pump
The pressure lift pump increased the seawater pressure to the level of membrane shell operating, and its flow was: The pressure lift pump energy consumption was related to its feed and outlet's pressure difference and flow:

System energy consumption
The energy consumption of the desalination system depended on the pressure lift pump, boost pump, and high pressure pump together.The pressure pump played a major role in energy consumption: The water in tons of energy consumption was divided by the produced water flow:

System optimization
The system adopted a simulated wind power with a 50 kW motor (efficiency of roughly 90%) and drive (efficiency of roughly 75%) of 30 KW generators.For the 5 t/h variable condition operating RO desalination system, its input variable was wind power output PO, and the power consumption unit includes booster pumps, high-pressure pumps, and pressure lift pump.When the wind power output was unstable, the operating frequency of the switching pumps, membrane working groups, and working pumps needed to achieve the system variable condition operating to ensure the production of water.
Therefore, the system variable condition operating optimization object was to make the system produce the lowest energy consumption and maximum recovery of reverse osmosis membranes by tons of water during wind power output fluctuations, with in the constraints of the system, limits constraints, and basis of conditions.System constraints mainly occurred in the components and characteristic equations of the system.Limit constraints mainly occurred in the degree of concentration of the polarization limit, insoluble salt saturation limit, average flux ratio limit, the upper limit of the feed water flow, the lower limit of the concentration water flow, working pressure upper limit, the system recyclable rate limits, produced water flow limits, and other restrictions.The operating status under a power input value can be achieved.
For the 5 t/h system, a multi-objective mathematical programming model was established to achieve optimal operating conditions by the multi-objective optimization method.Table 1 shows the offline optimization input parameter values under the variable operating condition of the desalination system.
Optimization objective: Minimize the system energy consumption for producing 1 ton of fresh water, Pa; Reciprocal of the system recovery rate, 1=Y.Table 2 shows the offline optimization Inequality constraints.

Optimized results
Figure 6 shows the optimization objective function index change status with the input power change after optimizing the system.When one group of membranes was switched on, the power input threshold was 2 kW.
When switched to two operating groups of membranes, the power input threshold was 6.533 kW.Finally, when switched to three operating groups of membrane, the power input threshold was 10.947 kW.
where P a is tons of water energy consumption in kW=m 3 , and Y is system recovery rate (%).Both P a and Y are considered to be minimized by ignoring the units in this optimization.This is the result of considering both cost and efficiency.
The optimization results showed that with the increase in the number of membrane, the optimal input power increased.The system produced tons of water, and the average consumption was about 2.74 kW/t with an average recovery system of around 28%.The results of this calculation can provide the optimal scheduling policy for the 5 t/h system.3 shows the calculation results as follows.recovery rate result from simplified model calculation change trend was consistent, and the general error was within 5%.Thus, the result can help optimize the design of the RO system and provide better practical and theoretical values for engineering studies.

CONCLUSIONS
The previous desalination systems mainly emphasized the optimization of equipment cost and operation cost.For the RO, only an optimal operation area could be achieved instead of the operating point, because the flow and pressure have significant effects on the systems.To solve the problem, the new desalination system in this paper has access to power adjustment instead of flow and pressure variation in the dynamic working condition, which could guarantee the cost of water production and recovery rate.The optimization for the variable-load desalination system with the system device parameter adjustment can obtain the desalination system static optimal result with the given power limitation.Briefly, if given input power, the running membrane shell quantity and optimal membrane shell operating pressure and flow can be obtained.This optimized system can provide optimal operational control strategies for future large-scale RO desalination system design and improvement.This system provides relatively broad engineering practical value and reliable guidance.Moreover, large-scale implementation of the simulation platform can reduce operational risk in desalination systems and can assist technicians and operators in improving their design and operation of the system.
Bourouni et al. () from Tunisia advocated the design and optimization of desalination reverse osmosis (RO) plants driven by renewable energies by using genetic algorithms.Sassi & Mujtaba () from Great Britain used the super-structure method to reduce the production cost.El-Halwagi () and Zhu et al. () proposed a status space method to describe the RO network structure, which expresses all possible RO working processes, and then transfers the design issue to a mixed integral nonlinear programming issue, finally obtaining the optimal working process with device setting and operation status by resolving this programming issue.Voros et al. () and Voros et al. () optimized El-Halwagi's method by simplifying the structure figure to logistic connection nodes and transferred the design issue to a simple nonlinear programming issue without considering the device type, thereby decreasing the design complexity.Malek et al. () combined the established theoretical model and the experimental data, which led to a para-experienced mathematical model.Malek et al. () further advocated an economical model of investment and operation cost by providing an economical evaluation on RO desalination.Wilf & Klinko () and Wilf & Bartels () discussed the influence of output water expense on the parameters of reuse rate, operation pressure, seawater temperature, and concentration.Avlonitis et al. () investigated various membranes and multiple RO factory running parameters to build a unified mathematical model and develop software that can predict membrane running status.However, the models and systems above have high requirements for the technicians and operators because of the complicated operation environment, which is difficult to use and maintain.What's more, few studies have reported the latest status of the dynamic working condition based on seawater desalination.Current trends are identified in the design of SWRO desalination experiments conducted on the Spanish Canary Islands and Utsira Island by the company German Enercon.Spanish researchers used a multiple SWRO subsystem to balance the load fluctuation, and the German case showed that an energy recovery system can also refine the load of the single SWRO module (Miranda & Infield ; Pestana et al. ; Carta et al. ; Spang ).Nevertheless, the above-mentioned literature could only get an optimal operation area instead of obtaining a best operating point due to the interaction between flow and pressure.To widely use and easily build this system, the current work designed and implemented a simulation system at a 5 t/h scale based on LABVIEW, which is a graphical user interface-based development platform.The optimization searched for the most feasible working condition and formed the seawater desalination refinement process control technology and solution.A considerable scaled dynamic load working device safety and protection solution was obtained, and it can reproduce the ideal scenario similar to the real operation environment, thereby helping people operate and run the system (Oh et al. ; Verhuelsdonk et al. ).

A
mathematical model is built to analyze and study the actual problem from a quantitative point of view.The model is used for in-depth research to understand object information, simplify assumptions, and analyze inherent laws, making use of mathematical symbols and language as expression, and calculating the result to answer the questions posed by the actual problem.Normally, the mathematical modeling method includes mechanism analysis and experiment modeling.These two methods are generally used in conjunction with a mechanism analysis model structure to test methods and determine model parameters, thereby establishing whether the mathematical model can qualitatively reflect the actual process for complex object models and devices.
B is the salt-infiltrated coefficient, L=h, p f is the supply water pressure, MPa, p p is the production water pressure, MPa, π f is the water-infiltrated pressure, MPa, π p is the salt-infiltrated pressure, MPa, M f is the molar concentration of the water, mmole=L, M p is the molar concentration of water production in mmole=L, and β is the membrane element concentration polarization degree.The classic expression of the operating characteristics of the membrane elements should comprise differential equations and boundary conditions.The simple approximate method is applied in engineering.The performance of the RO desalination system device is susceptible to the quality of the supply water and the working condition of the equipment.Therefore, seeking a reliable RO model is necessary to implement an optimal design and operation of desalination systems.However, the system is affected by the recyclable rate of membrane devices, feed water flow, water temperature, concentration polarization, membrane contamination, and other factors.Hence, establishing a precise mathematical model is extremely difficult.Fixed conditions denote that feed water pressure, flow and recovery, and other operating parameters are stable, which are normally set as the operating mode by the RO systems.However, another dynamic input condition is contrary to the fixed conditions, in which feed water pressure and flow are considered.Given the feed water pressure and flow, it predicts the specific system (given the membrane element model, the number of single membrane shell series connected, and the number of membrane shell parallel connected) of water production and water quality.As the recyclable rate of membrane devices and water production are unknown, the average flux and average osmotic pressure are also unknown.A simplified approximation method is applied in water-infiltrated and saltinfiltrated calculations.1.Water-infiltrated calculationIgnoring the impact that can be caused by RO membrane elements producing water pressure, water production osmotic pressure, and concentration polarization to the produced water volume, we make the average value between the two sets of parameters located in the two ends of membrane element to approximate the entire one's parameter.The simplified flux equation of the membrane element is shown as Equation (9) ( Jing ).
Figure 4 | Energy recovery device mathematical model.
main constraint was based on conditions, including feed water quality and produced water requirements.System optimization variables included the design parameters, such as the membrane type, quantity, combination, membrane shell quantity, and operating parameters, including the working pump and membrane group quantity, pump working frequency, and the concentrated water control valve opening.When optimizing, three conditions were analyzed: switching on one group of pumps and membranes; switching on two groups of pumps and membranes; and switching on three groups of pumps and membranes.When these three cases were applied, adjustment to high pressure pump operating frequencies f1, f2, and f3 can achieve RO membrane water production water regulation and change the concentrated water valve opening to affect the concentrated water flow and systems pressure regulation.After calculating the corresponding power change range, the point of optimal system 5 t/h RO seawater desalination simulation system design Based on the desalination system modeling, we built a desalination system simulation model with LABVIEW.The design concept included two parts: one was the manmachine interface (HMI) design, and the other was the daemon.A daemon includes logon and the two main procedures.The main program included a variable condition RO desalination simulation system main control panel, real-time system data trends display, simulation system operating variables monitoring and parameter setting, data storage and analysis, and a RO membrane system of five sub-systems.The HMI included a corresponding simulation system login screen.The system monitored the main

Figure 6 |
Figure 6 | Optimization objective function index change status.

Figure 8 |
Figure 8 | Main interface of the simulation system.

Figure 9
Figure 9 shows the data comparison between the produced water flow of RO membrane operating simplified model and DOW ROSA 9.1.

Figure 10
Figure 10 shows the comparison between the produced water quality of RO membrane operating simplified model and DOW ROSA 9.1.

Figure 11
Figure 11 shows the comparison between the membrane recovery rate of RO membrane operating simplified model and DOW ROSA 9.1.After verification by DOW ROSA 9.1, the result of the produced water flow, quality, and membrane element

Figure 9 |
Figure 9 | The produced water flow result comparison.

Figure 10 |
Figure 10 | The produced water quality result comparison.

Figure 11 |
Figure 11 | The membrane recovery rate result comparison. 17) bi , low pressure seawater flow; Q bo , pressurized seawater flow; Q ci , high pressure concentrated water flow;

Table 1 |
The offline optimization input parameter values single membrane elements produced water flow limits, Q pe 1m 3 =h; and produced water quality limits, c p 500 mg=L.

Table 2 |
The offline optimization input parameter values

Table 3 |
Calculation results