A design approach for determining the optimal flow pattern in a landscape lake is proposed based on FLUENT simulation, multiple objective optimization, and parallel computing. This paper formulates the design into a multi-objective optimization problem, with lake circulation effects and operation cost as two objectives, and solves the optimization problem with non-dominated sorting genetic algorithm II. The lake flow pattern is modelled in FLUENT. The parallelization aims at multiple FLUENT instance runs, which is different from the FLUENT internal parallel solver. This approach: (1) proposes lake flow pattern metrics, i.e. weighted average water flow velocity, water volume percentage of low flow velocity, and variance of flow velocity, (2) defines user defined functions for boundary setting, objective and constraints calculation, and (3) parallels the execution of multiple FLUENT instances runs to significantly reduce the optimization wall-clock time. The proposed approach is demonstrated through a case study for Meijiang Lake in Tianjin, China.

An urban landscape lake is an important component of an urban ecosystem, and there is increasing interest in maintaining and improving landscape lake water quality. The most prevalent lake water quality problem is eutrophication (Jensen & Andersen 1992; Carpenter et al. 1999; Arhonditsis & Brett 2005). Different from natural lakes, landscape lakes are enclosed water bodies and are almost not affected by exogenous pollution. Although forced by the wind-induced current, landscape lakes are mostly stagnant. Nutrients in the lake sediments are the predominant key eutrophication factors. Improving the hydrodynamic circulation pattern of the lake water can increase the dissolved oxygen content, which inhibits the release of phosphorus (P) and nitrogen (N) from the sediments (Wu et al. 2014; Müller et al. 2016). Improving circulation of the lake water using circulation channels and pumping systems is an effective technique for preventing eutrophication and has been successfully used in landscape lakes (Yin et al. 2007; Kang 2012). For an enclosed lake, the dissolved oxygen concentration of lake water can be increased through the circulation channel by creating a series of hydraulic drops. More oxygen is introduced into the lake through the aeration of the water in the circulation channels. This technique is costly especially for a large lake as the operation fee of circulation pumps is proportional to the total pump flow. A good flow pattern design should simultaneously optimize the circulation effects and operation costs.

Computational fluid dynamics (CFD) models utilize numerical methods to solve problems that involve fluid flows; they have been widely and successfully employed in lake hydrodynamic and water quality simulation (Phares et al. 2009; Gresch et al. 2011; Yang et al. 2011). An accurate and efficient lake hydrodynamic and/or water quality model based on CFD simulation is essential to control lake eutrophication. FLUENT is a state-of-the-art CFD program for modelling fluid flow and heat transfer within complex geometries. FLUENT provides complete mesh flexibility, including the ability to solve flow problems with unstructured meshes that can represent complex geometries (FLUENT 6.3 Getting Started Guide 2006), and is accordingly utilized herein for lake hydrodynamic simulation. To customize a FLUENT run, user defined functions (UDFs) can be defined. UDFs are widely utilized: for example, Chacon et al. (2007) adopted improved UDFs in a new methodology for the design and optimization of a low NOx-CO burner. Le & Zhou (2008) used UDFs to implement a general model of proton exchange membrane fuel. Ma et al. (2010) added UDFs to a compressible sub-model in the CFD model to predict the flow ripple of an axial piston pump. Herein UDFs are developed for use in optimization.

A multiple objective optimization problem is formulated to determine the optimal flow pattern design. The first objective is to get good circulation effects by increasing the overall flow velocity in the lake. Kang (2012) designed a local circulation system on the northwest of Meijiang Lake to investigate the impact of the hydrodynamic pattern on the improvement in lake water quality. The local circulation test showed that both phosphorus and ammonia nitrogen concentrations were reduced with increasing lake flow velocity. Therefore the average lake flow velocity is selected as the objective to represent good lake circulation effects. The second objective is to decrease the circulation costs, which are represented by total pump flow. The decision variables are inlet inflow velocities, and the two objectives are to maximize the lake average flow velocity and to minimize total pump flow by controlling the inflow through each lake inlet. Constraints are also formulated for the optimization problem. The non-dominated sorting genetic algorithm II (NSGA-II) is a multi-objective evolutionary algorithm based on the optimum concept of the Pareto front (Deb et al. 2002). This algorithm provides optimal solutions at the Pareto front, and does not require weighting the different objective functions to obtain a simple objective. For CFD modelling, it has been successfully applied in shape optimization of a micromixer (Hossain et al. 2011), aerodynamic optimization of turbomachinery (Wang et al. 2011), optimization of a radiant hydronic panel (Tye-Gingras & Gosselin 2012), and optimization of gas cyclone separator performance (Elsayed & Lacor 2012) and geometry (Elsayed & Lacor 2013).

FLUENT simulation is very computational intensive, and often requires long runtimes. To address this issue, FLUENT is equipped with a built-in parallel solver which enables partitioning the model domain mesh into multiple groups and allocates each group to a computational unit (either multi-core or super computer). This partition method can significantly speed up a single FLUENT instance run, and is required when the available memory limit is an issue. To parallel multiple FLUENT instances runs for NSGA-II, this paper proposes a parallelization scheme for multiple FLUENT runs in a multi-core computer; however, the scheme can be easily extended to super computers.

The proposed approach is demonstrated by a case study for Meijiang Lake located in Tianjin, China, and generates promising optimized designs.

Study area

Meijiang Lake is located in the south of Tianjin (as shown in Figure 1). The surface area of the lake is approximately 420,000 m2, and the depth ranges from 1.8 to 5.5 m, which means that it is a typical shallow lake.
Figure 1

Location map of Meijiang Lake.

Figure 1

Location map of Meijiang Lake.

Close modal
The surroundings of Meijiang Lake are illustrated in Figure 2(a). Around the lake, there is a residential area to the northeast of the lake, a convention centre to the southeast, and planning area to the west. The western shore is not suitable for setting up inlets due to potential damage to the future development in this area, while the northern, eastern and southern shores do not have buildings, thus determined to be suitable candidates for the inlets of the circulation system. Figure 2(b) shows the inlet and outlet locations around the lake. Two circulation channels are designed to divert flow from the lake outlets to inlets. A total number of 17 candidate inlets are distributed in the two channels, where inlets 1–4 and inlets 14–17 are surface inlets with entrance widths of 20 m, and inlets 5–13 are point inlets with entrance widths of 2 m. The outlets are two weirs with widths of 50 m. The overflow dam will be constructed in the surface inlet and valves will be set up in the point inlets. The flow pattern can be determined by the on/off state of inlets and total pump flow.
Figure 2

Surroundings (a) and inlet and outlet locations (b) of Meijiang Lake.

Figure 2

Surroundings (a) and inlet and outlet locations (b) of Meijiang Lake.

Close modal

Objectives

As Meijiang Lake is a shallow lake with a large surface and small depth, a 2D simulation was conducted in this study. Good circulation effects and low operation costs are two objectives of this landscape lake flow pattern design. This study focuses on the design for the inlet locations and inflow velocity. Accordingly a multiple objective optimization problem is formulated. The decision variables are trial inlet locations and flow velocity at each trial inlet. Two objectives are formulated to achieve maximum average flow velocity with minimum total pump flow. In this case study, Meijiang Lake was divided into a large amount of triangular unstructured meshes with different cell areas. Using the arithmetic average lake flow velocity to evaluate the entire lake flow regime will overestimate the average velocity. Therefore the weighted average of the velocity based on the cell volume is defined as objective f1. The total pump flow f2 is calculated as the summation of flow rates at the open inlets.

The weighted average lake flow velocity f1 is calculated with Equation (1), and is to be maximized.

formula
1
where Vi is the water volume in cell i (m3); vxi and vyi are the flow velocities of cell i in the X and Y directions, respectively.
The total pump flow f2 is calculated with Equation (2), and is to be minimized.
formula
2
where vi is the inflow velocity, and Ai is the flow area at inlet i.

Constraints

Four constraints are proposed, consisting of: (I) layout of inlets according to lake surrounding conditions, (II) total pump flow and inlet flow velocity, (III) lake water volume percentage below prescribed low flow velocity, and (IV) lake flow velocity variance. Constraints I and II can be obtained based on lake geometry and no FLUENT runs are needed, while III and IV can only be quantified with outputs from a successful FLUENT run. FLUENT simulation is time consuming; hence it is essential to limit the number of FLUENT runs to save clock time. Constraints I and II represent inlet layout and operational requirements, and FLUENT simulation is not performed for simulations that violated either constraint, and the objective f1 is set to infinity.

A reasonable inlet layout is necessary for reducing the stagnant water area; e.g. setting all inlets in a single direction would not likely achieve the best flow pattern. Accordingly constraint I requires that there are inlets from various directions, and is expressed with Equation (3):
formula
3
where Sk is the number of inlets in the k direction; in this case, k is one of four directions (south, southeast, northeast and north).
Constraint II is expressed with Equations (4) and (5):
formula
4
formula
5

where Q, Qmax, Qmin are total, maximum, and minimum pump flow (m3/s), respectively; vkmin is the lowest flow velocity (m/s) at the inlet i.

Constraints III and IV are presented to assure that the flow velocity distribution in the lake is as even as possible. Generally, water is regarded as stagnant when its flow velocity is under a certain limit, which is likely to cause water quality issues in the lake. Based on the flow velocity distribution histogram, constraint III is defined by Equation (6):

formula
6
where is the total cell volume with velocity lower than vlimit. For the case study, vlimit is set to 0.002 m/s and P is set to 5% for the case study.
Constraint IV represents the variance of the flow velocity at each cell, and is proposed to ensure that the lake flow velocities are distributed evenly. It is expressed with Equation (7):
formula
7
where D is set to 1.0e−2 for the case study.

Parallel computing in NSGA-II

Figure 3 shows the flowchart of the parallel FLUENT simulation for the two objective calculations in NSGA-II, using a four-core computer as example.
Figure 3

Flowchart of the automated simulation and optimization procedure.

Figure 3

Flowchart of the automated simulation and optimization procedure.

Close modal

Four folders are created for each core, with each containing four files: velocity.txt, mj.jou, mj.cas, and result.txt. The velocity.txt file includes the flow velocities of the number of inlets, which is updated according to each individual within the current NSGA-II population. The file is input to a FLUENT instance, and is read in by a customized UDF; the mj.jou consists of a sequence of FLUENT operation commands; the mj.cas compiles two UDFs that are developed to calculate the lake average flow velocity, lake flow velocity variance and lake water volume under a specified flow velocity, and to write these values into the result.txt; the result.txt is subsequently parsed to set the objective f1 and the constraints III and IV.

The individuals in the first generation of NSGA-II are randomly generated, and each individual contains the inlet flow velocities for the number of trial inlets. Each one is examined against the constraints I and II. The objective f1 is set to infinity for the individual violating either constraint I or II, and no FLUENT simulation will be run. The individuals that satisfy both constraints I and II are scattered to each of the four cores for FLUENT parallel simulation. While launching each FLUENT run, a transcript file is generated through switch/file/start-transcript outputfile.trn to contain all model warning and error messages, and the number of iterations to achieve specified convergence criteria. After each FLUENT run, the transcript file is parsed by the program to ensure the model is numerically stable and its outputs are reliable. Subsequently, the ranks and crowding distances of the individuals in the current population are calculated, and the genetic operations of crossover and mutation are performed on the population individuals.

For an NSGA-II run, the numbers of FLUENT runs and generation are applied as a terminal condition. The individuals in the final population are stored in the file solution.txt, and read as the initial population for the next NSGA-II run in the case that optimization is required to be resumed.

Case study

The volume of the Meijiang Lake ranges from 731,500 m3 (during dry season) to 1,463,000 m3 (during wet season). The lake retention time for the circulation system is designed to be 20 to 40 days, and the pump operation time is specified at 8 h. Thus Qmax is calculated as 1,463,000 m3/(20 days × 8 h), which is 2.54 m3/s; and Qmin is calculated as 731,500 m3/(40 days × 8 h), which is 0.635 m3/s. The vkmin is computed when the inlets are open for the Qmin, which is 0.0178 m/s.

Kang (2012) built a FLUENT model, and calibrated it to monitored lake flow velocities. The relative error between simulated and measured flow velocities was smaller than 10%, which proved the feasibility of the FLUENT model. The same mesh and model setup was also adopted in this case study. To construct the FLUENT mesh for the lake, the original lake boundary drawing of DWG format is saved as a SAT format file with AutoCAD, and then the SAT file is imported into the Gambit package for mesh generation. A 2D mesh is generated for FLUENT simulation. The mesh near the inlets and outlets is denser and gradually becomes coarser by moving into the centre of the lake, for the purpose of accurately capturing the flow regime near inlet and outlet boundaries and achieving numerical stability. The lake is divided into 146,556 triangular unstructured meshes and 74,059 nodes, with cell areas ranging from 0.2452 m2 to 5.3368 m2. A mesh file (mj.msh) is generated by FLUENT after a check operation.

For the FLUENT simulation, the state of each inlet (on or off) is controlled by the NSGA-II individual. An inlet is on if its flow velocity from the corresponding element of an individual of the NSGA-II population is above the minimum inlet flow velocity 0.0178 m/s, and off for a value below 0.0178 m/s.

Two UDFs, DEFINE_PROFINE and DEFINE_EXECUTE_AT_END, are implemented to calculate cell statistics, switch inlet states (on/off), assign flow velocities for inlets with state on, and write cell statistics into result.txt file. Subsequently the mesh file and the two UDFs are compiled to generate the CASE file (mj.case).

For a complete FLUENT simulation, a journal file (mj.jou) is created listing the sequential FLUENT commands: operate FLUENT, read in CASE file, initialize CASE file, set iteration number, and exit FLUENT without prompt. Herein for every FLUENT run, the convergence criterion is set as 0.001 (scaled residual). The iteration number was set to 1,500, which was shown to be sufficient for all FLUENT models for different inlet configurations to converge below the specified criterion.

The parallel NSGA-II parameters are summarized in Table 1.

Table 1

NSGA-II parallel computing parameter values

Optimization parametersValue
Number of cores 
Number of decision variables (the number of inlets) 17 
Number of objectives 
Population size of every generation 200 
Evolutionary generation 50 
Number of individuals distributed to every core 25 (100/4) 
Maximum simulation number of FLUENT simulation in NSGA-II 500 
Simulation binary cross distribution index 20 
Polynomial variation distribution index 20 
Optimization parametersValue
Number of cores 
Number of decision variables (the number of inlets) 17 
Number of objectives 
Population size of every generation 200 
Evolutionary generation 50 
Number of individuals distributed to every core 25 (100/4) 
Maximum simulation number of FLUENT simulation in NSGA-II 500 
Simulation binary cross distribution index 20 
Polynomial variation distribution index 20 

Eight NSGA-II runs are performed. Each run uses the previous run's final population as its initial population, with the exception of the first run, which applies a randomly generated population. Such a configuration allows each run of the NSGA-II to restart from a better initial population than a randomly generated one.

The parallel computing in NSGA-II significantly decreases wall-clock time. For example, a total number of 4,000 FLUENT instances are run. With serial computing, the wall-clock time would be 4,000 × 9 min (600 h), while the parallel computing with a four-core computer drops the runtime to around 150 h.

Figure 4 shows the fronts of each of the eight runs. At a given total pump flow, the fronts move upwards, meaning larger average lake flow. There is a minimal difference in the fronts of solutions 7 and 8, suggesting good convergence of the NSGA-II optimization. Given total pump flow of 0.637 m3/s, the weighted average lake flow velocity can reach 0.0168 m/s (the left bottom point in solution 8), and to achieve a weighted average lake flow velocity of 0.0511 m/s a total pump flow of 2.51 m3/s is required (the right top point in solution 8). The total pump flow ranges from 0.637 m3/s to 2.51 m3/s, and spreads between 0.635 m3/s and 2.54 m3/s within the constraint II, suggesting good spreading of final individuals.
Figure 4

Fronts of different generations.

Figure 4

Fronts of different generations.

Close modal

To validate the effectiveness of the proposed optimization procedure, two scenarios, namely optimized scenarios I and II (selected from solutions 1 and 8, respectively), are compared. The design total pump flow for both scenarios is the same, 1.57 m3/s.

Figure 5 depicts the lake flow velocity spatial distributions for the optimized scenarios I(a) and II(b), respectively. Both scenarios meet all four constraints set in this optimization and generate good lake flow distribution in the middle areas. Compared to scenario I, scenario II has improved the flow distribution in the southern areas. For scenario II, there is almost no stagnant zone except for some areas along the boundary without open inlets.
Figure 5

Flow velocity (m/s) distributions for optimized scenarios I (a) and II (b).

Figure 5

Flow velocity (m/s) distributions for optimized scenarios I (a) and II (b).

Close modal
Scenario I generates an average lake flow velocity of 0.0285 m/s. However, scenario II increases average flow velocity to 0.0333 m/s, by 16.8%. Although flow velocities at inlets 1 and 11 are high comparing to interior lake flow velocities, the velocities at the two inlets are just about 0.2 m/s. As can be seen from the velocity distribution histogram (Figure 6), the configuration for scenario II drops the volume percentage in the low velocity bin (<0.02, which is likely to cause a water quality issue) by 11.9 percentage points from 48.9% to 37.0%. The volume percentage in all the other bins are increased, suggesting the potential for better water quality. The volume percentage of ‘jet flow’ (velocities between 0.18 to 0.20 m/s) is only 2.11%, a very small portion of the lake flow velocity span. In addition, the variances of flow velocity of scenarios I and II are 3.4992 × 105 and 4.6448 × 106, respectively. Therefore, scenario II corresponds to a more even distribution of lake flows. To conclude, for the same total pump flow of 1.57 m3/s, scenario II produces a better lake flow pattern.
Figure 6

Flow velocity distribution histograms for optimized scenarios.

Figure 6

Flow velocity distribution histograms for optimized scenarios.

Close modal

The urban landscape lake water flow pattern design is formulated as a multiple objective optimization problem with inlet velocity as the decision variable, the minimization of total pump flow and the maximization of average lake flow velocity as the two objectives, and four constraints: (I) layout of trial inlets; (II) total pump flow/inlet flow velocity; (III) water volume with low flow velocity; and (IV) velocity uniformity.

A 2D FLUENT model is utilized to simulate the flow pattern in the lake. UDFs are implemented to (1) set inlet state (on/off) and inflow velocity based on the optimization individual, and (2) calculate the lake average flow velocity and the constraints III and IV.

The parallel runs of FLUENT simulations in NSGA-II scatter and gather data to and from multiple cores. This parallel scheme further expands the FLUENT internal parallel solver (which parallels a single FLUENT simulation by partitioning the mesh to different units, and each unit simulates for the scattered mesh data). The computational speedup of the proposed parallel scheme will depend on the number of cores available.

The landscape flow pattern design approach successfully generates a series of optimized flow pattern schemes, i.e. Pareto front between total pump flow and lake average flow velocity. The Pareto front provides a base for decision making on the total pump flow to achieve desired lake average flow rate.

This research was supported by the Major Science and Technology Program for Water Pollution Control and Treatment (No. 2014ZX07203-009-002) and Major Science and Technology Program for Water Pollution Control and Treatment (No. 2008ZX07314-004-002).

Carpenter
S. R.
Ludwig
D.
Brock
W. A.
1999
Management of eutrophication for lakes subject to potential irreversible change
.
Ecological Applications
9
(
3
),
751
771
.
Deb
K.
Pratap
A.
Agarwal
S.
Meyarivan
T.
2002
A fast and elitist multiobjective genetic algorithm: NSGA-II
.
IEEE Transactions on Evolutionary Computation
6
(
2
),
182
197
.
FLUENT 6.3 Getting Started Guide
2006
Fluent Incorporated
,
Lebanon, New Hampshire, USA
.
Gresch
M.
Armbruster
M.
Braun
D.
Gujer
W.
2011
Effects of aeration patterns on the flow field in wastewater aeration tanks
.
Water Research
45
(
2
),
810
818
.
Hossain
S.
Husain
A.
Kim
K. Y.
2011
Optimization of micromixer with staggered herringbone grooves on top and bottom walls
.
Engineering Applications of Computational Fluid Mechanics
5
(
4
),
506
516
.
Kang
M.
2012
The Water Circulation System of Large Slow Urban Landscape Water and Water Quality Simulation
.
Master Thesis
,
School of Environmental Science and Engineering, Tianjin University
,
Tianjin
,
China
.
Le
A. D.
Zhou
B.
2008
A general model of proton exchange membrane fuel cell
.
Journal of Power Sources
182
(
1
),
197
222
.
Ma
J.
Xu
B.
Zhang
B.
Yang
H. Y.
2010
Flow ripple of axial piston pump with computational fluid dynamic simulation using compressible hydraulic oil
.
Chinese Journal of Mechanical Engineering
23
(
1
),
45
52
.
Müller
S.
Mitrovic
S. M.
Baldwin
D. S.
2016
Oxygen and dissolved organic carbon control release of N, P and Fe from the sediments of a shallow, polymictic lake
.
Journal of Soils & Sediments
16
(
3
),
1109
1120
.
Wang
X. D.
Hirsch
C.
Kang
S.
Lacor
C.
2011
Multi-objective optimization of turbomachinery using improved NSGA-II and approximation model
.
Computer Methods in Applied Mechanics & Engineering
200
(
9
),
883
895
.
Wu
Y.
Wen
Y.
Zhou
J.
Wu
Y.
2014
Phosphorus release from lake sediments: Effects of pH, temperature and dissolved oxygen
.
KSCE Journal of Civil Engineering
18
(
1
):
323
329
.