3.2 Description equations in Navier-Stokes equations

• Equations describing the water level

$$\frac{\partial \rho \mathbf{z}\_{\mathbf{w}}}{\partial \mathbf{t}} + \frac{\partial \rho q\_{\mathbf{x}}}{\partial \mathbf{x}} + \frac{\partial \rho q\_{\mathbf{y}}}{\partial \mathbf{y}} = \rho q\_{A} \tag{9}$$

Assume that the height of water is taken from the bottom of the flow, which is regarded as the origin of the coordinate system, so zw has no negative values.

• Momentum equations in x-direction:

$$\frac{\partial \rho \mathbf{q\_{x}}}{\partial t} + \frac{\partial}{\partial \mathbf{x}} \left( \rho \theta \frac{q\_{x}^{2}}{d} \right) + \frac{\partial}{\partial \mathbf{y}} \left( \rho \theta \frac{q\_{x} \mathbf{q\_{f}}}{d} \right) + \rho \mathbf{g} d \frac{\partial \mathbf{z\_{w}}}{\partial \mathbf{x}} + \rho \mathbf{g} d \mathbf{S}\_{f\_{\mathbf{x}}} - \boldsymbol{\tau}\_{\mathbf{wx}} - \frac{\partial}{\partial \mathbf{x}} \left( \rho K\_{L} \frac{d q\_{x}}{d \mathbf{x}} \right) - \frac{\partial}{\partial \mathbf{y}} \left( \rho K\_{T} \frac{d q\_{x}}{d \mathbf{y}} \right) = \mathbf{0} \tag{10}$$

• Momentum equations in y-direction:

$$\frac{\partial \rho \mathbf{q}\_y}{\partial t} + \frac{\partial}{\partial y} \left( \rho \beta \frac{q\_y^2}{d} \right) + \frac{\partial}{\partial t} \left( \rho \beta \frac{q\_y q\_x}{d} \right) + \rho g d \frac{\partial \mathbf{z}\_w}{\partial y} + \rho g d \mathbf{S}\_{f\mathbf{y}} - \mathbf{t}\_{\mathbf{w}\mathbf{y}} - \frac{\partial}{\partial y} \left( \rho \mathbf{K}\_L \frac{\partial q\_y}{\partial y} \right) - \frac{\partial}{\partial t} \left( \rho \mathbf{K}\_T \frac{\partial q\_y}{\partial \mathbf{x}} \right) = \mathbf{0} \tag{11}$$

Explain the meanings of quantities in the equations:


$$\mathbb{S}\_{f\mathbf{x}} = q\_{\mathbf{x}} \frac{n^2 \left(q\_{\mathbf{x}}^2 + q\_{\mathbf{y}}^2\right)^{1/2}}{d^{1/3}};\\\mathbb{S}\_{\mathbf{f}\mathbf{y}} = q\_{\mathbf{y}} \frac{n^2 \left(q\_{\mathbf{y}}^2 + q\_{\mathbf{x}}^2\right)^{1/2}}{d^{1/3}} \text{ (n is Manning coefficient)}$$

• τwx and τwy: wind pressure on free surface of hydraulic flow in x-and y-directions are calculated as follows:

$$
\tau\_{\rm wx} = \mathfrak{c}\_{\mathfrak{s}} \rho\_a \mathbf{W}^2 \text{cos}(\Psi); \\
\tau\_{\rm wy} = \mathfrak{c}\_{\mathfrak{s}} \rho\_a \mathbf{W}^2 \text{sin}(\Psi),
$$

where:

$$\mathcal{c}\_{\mathbf{x}} = \left\{ \begin{aligned} \mathbf{10}^{-3}; &khi \text{ W} \le \mathbf{W}\_{\text{min}} \\\\ \left[ \mathbf{c}\_{\mathbf{s}1} + \mathbf{c}\_{\mathbf{s}2} (\mathbf{W} \text{-W}\_{\text{min}}) \right] \mathbf{10}^{-3}; &khi \text{ W} > \mathbf{W}\_{\text{min}} \end{aligned} \right\};$$

C1, … , C4 are the coefficients as shown in Figure 7, (C1= <sup>1</sup>

Boundary Layer Flows - Theory, Applications and Numerical Methods

3.1 Physico-mathematical model of Navier-Stokes equations

If each cell is uses a pipeline mechanism shown in Figure 7. With the length of a pipeline is 6, the first calculation pays 6 clock pulse (clk), and each calculation after

In hydraulics, many flow models have been researched, such as flows in channels, streams, or rivers, for controlling the flow for preventing disasters, saving water, and exploiting energy of the flow as well. Most of mathematical models of those phenomena are partial differential equations like Saint venant equations and Navier-Stokes equations [8, 9]. Some types of Navier-Stokes equations have various parameters and constraints. Using CNN technology, we could solve some of them which have clear values of boundary conditions; it means we do not research boundary problems deeply. The effectiveness of the CNN technology is making a physical parallel computing chip to increase the computing speed for satisfying a

Navier-Stokes equations here consist of three partial differential equations, with

y-directions. The empirical model is a flow through a small port, which diffuses in

Solving Navier-Stokes equations by using CNN requires the discretion of continuity model by difference method, the smaller difference intervals the higher accuracy. However, if difference intervals are too small, then it leads to increasing the calculation complexity and time. The CNN chip with parallel physically

functional variables representing water height, and flow velocity in x- and

processing abilities, the above difficulties will be overcome.

gb Ið Þ � <sup>J</sup> <sup>Δ</sup>t; C4= <sup>q</sup>

Figure 8.

real-time system.

200

two directions Ox and Oy.

that only needs 1 clk.

A core architecture for CNN chip.

<sup>b</sup> Δt).

3. Solving Navier-Stokes equations

<sup>2</sup>bΔ<sup>x</sup>Δt; C2= gb

<sup>2</sup>Δ<sup>x</sup>Δt; C3=

With cs1; cs2; Wmin are values get from practical, for example: Wmin = 4 m/s; wind speed is 10 m/s, then cs1 = 1.0; cs2 = 0.067;

• ρ<sup>a</sup> is the air density at free surface (kgm�<sup>3</sup> ); W is wind speed at free surface; and Ψ is the angle between wind direction and x-axis.

∂vi, <sup>j</sup> <sup>∂</sup><sup>t</sup> ¼ � <sup>β</sup> d

• Layer h:

• Layer u:

Auv <sup>¼</sup>

Au <sup>¼</sup>

Avh <sup>¼</sup>

equations

203

vi, jþ<sup>1</sup> 2Δy

DOI: http://dx.doi.org/10.5772/intechopen.84588

�gd hi, <sup>j</sup>þ<sup>1</sup> � hi, <sup>j</sup>�<sup>1</sup>

Step 2: Designing a sample of CNN

Ahu <sup>¼</sup>

0

0

0 00

n<sup>2</sup> u<sup>2</sup>

0 00

; <sup>A</sup>vu <sup>¼</sup>

<sup>0</sup> <sup>β</sup>vi, <sup>j</sup>þ<sup>1</sup> 2dΔ y þ KL

<sup>0</sup> �βvi, <sup>j</sup>þ<sup>1</sup>

KL <sup>Δ</sup> <sup>y</sup><sup>2</sup> <sup>g</sup><sup>d</sup>

ij <sup>þ</sup> <sup>v</sup><sup>2</sup> ij � �<sup>1</sup>=<sup>2</sup>

<sup>d</sup><sup>1</sup>=<sup>3</sup> <sup>þ</sup>

(19) • Layer v:

<sup>2</sup>dΔ<sup>x</sup> <sup>0</sup> �βui�1, <sup>j</sup>

2dΔx

<sup>Δ</sup> <sup>y</sup><sup>2</sup> <sup>0</sup>

1 R<sup>v</sup> þ

<sup>Δ</sup> <sup>y</sup><sup>2</sup> <sup>0</sup>

; <sup>B</sup><sup>v</sup> <sup>¼</sup> <sup>1</sup> ρ τwy

KL Δ y<sup>2</sup> �KL Δ y<sup>2</sup>

00 0

00 0

<sup>i</sup>, <sup>j</sup> <sup>þ</sup> <sup>v</sup><sup>2</sup> i, j � �<sup>2</sup>

<sup>d</sup><sup>1</sup>=<sup>3</sup> <sup>þ</sup>

βui�1, <sup>j</sup>

n<sup>2</sup> u<sup>2</sup>

<sup>2</sup>d<sup>Δ</sup> <sup>y</sup> � KL

Step 3: Designing hardware architecture of CNN to solve Navier-Stokes

CNN templates for layers h, u, v:

<sup>0</sup> <sup>β</sup>ui, <sup>j</sup>�<sup>1</sup> 2dΔ y

00 0

<sup>0</sup> �βui, <sup>j</sup>þ<sup>1</sup> 2dΔ y

> þ KL <sup>Δ</sup>x<sup>2</sup> gd

> > 0

0

Av <sup>¼</sup>

βui�1, <sup>j</sup> 2dΔx

<sup>0</sup> <sup>g</sup><sup>d</sup> 2Δ y

<sup>0</sup> �g<sup>d</sup> 2Δ y

00 0

vi, <sup>j</sup>þ<sup>1</sup> � <sup>v</sup>i, j‐<sup>1</sup> 2Δy

<sup>2</sup>Δ<sup>x</sup> � <sup>g</sup>dSfy <sup>þ</sup>

0 00

; Auh <sup>¼</sup>

<sup>0</sup> �<sup>1</sup> 2Δx

gd 2Δx

� �

Solving Partial Differential Equation Using FPGA Technology

vi, <sup>j</sup>�<sup>1</sup>

� β d

1 ρ τwyKL

Based on CNN state equations and difference equations (15)–(17), we can have

Ahv <sup>¼</sup>

00 0

00 0

1 Ru þ 4KL Δx<sup>2</sup>

<sup>0</sup> �gd 2Δx

0

uiþ1, j 2Δx

vi, <sup>j</sup>þ<sup>1</sup> � <sup>u</sup>i‐1, j 2Δx

vi, <sup>j</sup>þ<sup>1</sup> � 2vi, <sup>j</sup> þ vi, <sup>j</sup>�<sup>1</sup>

1 2Δ y

0 00

<sup>0</sup> �<sup>1</sup> 2Δ y

Δ y<sup>2</sup> �

0

0

; Bu <sup>¼</sup> <sup>1</sup> ρ τwx

�βuiþ1, <sup>j</sup> 2dΔx

h i

vi, <sup>j</sup>�<sup>1</sup>

(17)

(18)

000 010 000

<sup>z</sup><sup>u</sup> <sup>¼</sup> <sup>0</sup>

<sup>þ</sup> �KL Δx<sup>2</sup>

; <sup>z</sup><sup>v</sup> <sup>¼</sup> <sup>0</sup>

(20)

• Expressions, <sup>∂</sup> <sup>∂</sup><sup>x</sup> ρKL ∂qx ∂x � � � <sup>∂</sup> <sup>∂</sup> <sup>y</sup> ρKT ∂qx ∂ y � � and <sup>∂</sup> <sup>∂</sup> <sup>y</sup> ρKL <sup>∂</sup><sup>q</sup> <sup>y</sup> ∂ y � � � <sup>∂</sup> <sup>∂</sup><sup>x</sup> ρKT <sup>∂</sup><sup>q</sup> <sup>y</sup> ∂x � �, are the impact of turbulence in hydraulic flow caused between x- and y-directions, where: KL <sup>¼</sup> qxl pe with Pe as the Peclet coefficient with the value of 15–40; l as the length of flow; KL as coefficient varying according to locations along flow; and KT = 0.3–0.7 KL.

#### 3.3 Analyzing and designing CNN to solve the equations

To simplify, change parameters as: the water level zw = h; and the velocity in xaxis qx = u, in y-axis qy = v. Assume that qA = 0; the kinetic influence of turbulent values between velocity in the direction from 0y to 0x (or 0x to 0y) is trivial since horizontal velocity is small enough to be considered as zero; then (9)–(11) are rewritten:

$$\frac{\partial h}{\partial \mathbf{t}} + \frac{\partial u}{\partial \mathbf{x}} + \frac{\partial v}{\partial y} = \mathbf{0} \Leftrightarrow \frac{\partial h}{\partial \mathbf{t}} = -\frac{\partial u}{\partial \mathbf{x}} - \frac{\partial v}{\partial y} \tag{12}$$

∂v ∂t þ ∂ ∂ y β v2 d � � þ ∂ ∂x <sup>β</sup> vu d � � <sup>þ</sup> gd <sup>∂</sup><sup>h</sup> ∂ y <sup>þ</sup> gdSfy � <sup>τ</sup>wy <sup>ρ</sup> � <sup>∂</sup> ∂ y KL ∂v ∂ y � � ¼ 0 ⇔ ∂v ∂t ¼ ∂ ∂ y KL ∂v ∂ y � � � ∂ ∂ y β v2 d � � � ∂ ∂x <sup>β</sup> vu d � � � gd <sup>∂</sup><sup>h</sup> ∂ y <sup>þ</sup> <sup>τ</sup>wy <sup>ρ</sup> � gdSfy � � (13) ∂u <sup>∂</sup><sup>t</sup> <sup>¼</sup> <sup>∂</sup> ∂x β u2 d � � þ ∂ ∂ y β uv d � � <sup>þ</sup> gd <sup>∂</sup><sup>h</sup> <sup>∂</sup><sup>x</sup> <sup>þ</sup> gdS <sup>f</sup> <sup>x</sup> � <sup>τ</sup>wx <sup>ρ</sup> � <sup>∂</sup> ∂x KL ∂u ∂x � � ⇔ ∂u <sup>∂</sup><sup>t</sup> <sup>¼</sup> <sup>∂</sup> ∂x KL ∂u ∂x � � � ∂ ∂x β u2 d � � � ∂ ∂ y <sup>β</sup> uv d � � � gd <sup>∂</sup><sup>h</sup> <sup>∂</sup><sup>x</sup> <sup>þ</sup> <sup>τ</sup>wx <sup>ρ</sup> � gdS <sup>f</sup> <sup>x</sup> � � (14)

Step 1: Differencing equations following Taylor formula

Using finite difference grid with difference interval in x-axis as Δx and in y-axis as Δ y and apply Taylor difference formulas for Eqs. (12)–(14); we have difference equations corresponding to the equations:

$$\frac{\partial h\_{ij}}{\partial t} = \frac{u\_{i+1,j} - u\_{i-1,j}}{2\Delta x} - \frac{v\_{i,j+1} - v\_{i,j-1}}{2\Delta y} \tag{15}$$

$$\begin{split} \frac{\partial u\_{i,j}}{\partial t} &= -\frac{\beta}{d} \left[ \frac{u\_{i+1,j}}{2\Delta x} u\_{i+1,j} - \frac{u\_{i-1,j}}{2\Delta x} u\_{i-1,j} \right] - \frac{\beta}{d} \left[ \frac{v\_{i,j+1}}{2\Delta y} u\_{i+1,j} - \frac{v\_{i,j-1}}{2\Delta y} u\_{i-1,j} \right] \\ &- \text{gd} \frac{h\_{i+1,j} - h\_{i-1,j}}{2\Delta x} \text{gdS}\_{\text{fix}} + \frac{1}{\rho} \tau\_{\text{wx}} K\_L \frac{u\_{i+1,j} - 2u\_{i,j} + u\_{i-1,j}}{\Delta x^2} \end{split} \tag{16}$$

Solving Partial Differential Equation Using FPGA Technology DOI: http://dx.doi.org/10.5772/intechopen.84588

$$\begin{split} \frac{d\boldsymbol{v}\_{i,j}}{dt} &= -\frac{\beta}{d} \left[ \frac{\boldsymbol{v}\_{i,j+1}}{2\Delta y} \boldsymbol{v}\_{i,j+1} - \frac{\boldsymbol{v}\_{i,j+1}}{2\Delta y} \boldsymbol{v}\_{i,j-1} \right] - \frac{\beta}{d} \left[ \frac{\boldsymbol{u}\_{i+1,j}}{2\Delta x} \boldsymbol{v}\_{i,j+1} - \frac{\boldsymbol{u}\_{i+1,j}}{2\Delta x} \boldsymbol{v}\_{i,j-1} \right] \\ &- \text{gd} \frac{h\_{i,j+1} - h\_{i,j-1}}{2\Delta x} - \text{gd} \mathbf{S}\_{\text{fy}} + \frac{1}{\rho} \boldsymbol{\tau}\_{\text{wy}} \mathbf{K}\_{L} \frac{v\_{i,j+1} - 2v\_{i,j} + v\_{i,j-1}}{\Delta y^{2}} \end{split} \tag{17}$$

Step 2: Designing a sample of CNN

Based on CNN state equations and difference equations (15)–(17), we can have CNN templates for layers h, u, v:

• Layer h:

With cs1; cs2; Wmin are values get from practical, for example: Wmin = 4 m/s;

∂qx ∂ y � �

impact of turbulence in hydraulic flow caused between x- and y-directions,

the length of flow; KL as coefficient varying according to locations along flow;

To simplify, change parameters as: the water level zw = h; and the velocity in xaxis qx = u, in y-axis qy = v. Assume that qA = 0; the kinetic influence of turbulent values between velocity in the direction from 0y to 0x (or 0x to 0y) is trivial since horizontal velocity is small enough to be considered as zero; then (9)–(11) are

> ∂h <sup>∂</sup><sup>t</sup> ¼ � <sup>∂</sup><sup>u</sup>

<sup>þ</sup> gdSfy � <sup>τ</sup>wy

<sup>β</sup> vu d � �

<sup>∂</sup><sup>x</sup> <sup>þ</sup> gdS <sup>f</sup> <sup>x</sup> � <sup>τ</sup>wx

<sup>β</sup> uv d � �

Using finite difference grid with difference interval in x-axis as Δx and in y-axis as Δ y and apply Taylor difference formulas for Eqs. (12)–(14); we have difference

<sup>2</sup>Δ<sup>x</sup> � vi, <sup>j</sup>þ<sup>1</sup> � vi, <sup>j</sup>�<sup>1</sup>

vi, <sup>j</sup>þ<sup>1</sup> 2Δ y

� β d 2Δy

uiþ1, <sup>j</sup> � 2ui, <sup>j</sup> þ ui�1, <sup>j</sup>

uiþ1, <sup>j</sup> � vi, <sup>j</sup>�<sup>1</sup> 2Δ y

Δx2 �

� �

<sup>∂</sup><sup>x</sup> � <sup>∂</sup><sup>v</sup> ∂ y

> KL ∂v ∂ y � �

<sup>þ</sup> <sup>τ</sup>wy

KL ∂u ∂x � �

<sup>∂</sup><sup>x</sup> <sup>þ</sup> <sup>τ</sup>wx

¼ 0

<sup>ρ</sup> � gdSfy � �

<sup>ρ</sup> � gdS <sup>f</sup> <sup>x</sup> � �

ui�1, <sup>j</sup>

<sup>ρ</sup> � <sup>∂</sup> ∂ y

� gd <sup>∂</sup><sup>h</sup> ∂ y

> <sup>ρ</sup> � <sup>∂</sup> ∂x

� gd <sup>∂</sup><sup>h</sup>

and <sup>∂</sup>

<sup>∂</sup> <sup>y</sup> ρKL

with Pe as the Peclet coefficient with the value of 15–40; l as

<sup>∂</sup><sup>q</sup> <sup>y</sup> ∂ y � �

); W is wind speed at free surface;

<sup>∂</sup><sup>q</sup> <sup>y</sup> ∂x � �

, are the

(12)

(13)

(14)

(15)

(16)

� ∂ <sup>∂</sup><sup>x</sup> ρKT

wind speed is 10 m/s, then cs1 = 1.0; cs2 = 0.067;

• ρ<sup>a</sup> is the air density at free surface (kgm�<sup>3</sup>

∂qx ∂x � �

<sup>∂</sup><sup>x</sup> ρKL

pe

• Expressions, <sup>∂</sup>

where: KL <sup>¼</sup> qxl

rewritten:

∂v ∂t þ ∂ ∂ y

⇔ ∂v ∂t ¼ ∂ ∂ y

∂u <sup>∂</sup><sup>t</sup> <sup>¼</sup> <sup>∂</sup> ∂x

⇔ ∂u <sup>∂</sup><sup>t</sup> <sup>¼</sup> <sup>∂</sup> ∂x

∂ui, <sup>j</sup> <sup>∂</sup><sup>t</sup> ¼ � <sup>β</sup> d

202

and KT = 0.3–0.7 KL.

β v2 d � �

β u2 d � �

> KL ∂u ∂x � �

þ ∂ ∂x

þ ∂ ∂ y β uv d � �

equations corresponding to the equations:

uiþ1, <sup>j</sup> 2Δx

�gd hiþ1, <sup>j</sup> � hi�1, <sup>j</sup>

KL ∂v ∂ y � �

and Ψ is the angle between wind direction and x-axis.

Boundary Layer Flows - Theory, Applications and Numerical Methods

� ∂ <sup>∂</sup> <sup>y</sup> ρKT

3.3 Analyzing and designing CNN to solve the equations

∂h ∂t þ ∂u ∂x þ ∂v <sup>∂</sup> <sup>y</sup> <sup>¼</sup> <sup>0</sup> <sup>⇔</sup>

<sup>β</sup> vu d � �

� ∂ ∂ y

� ∂ ∂x

∂hij

uiþ1, <sup>j</sup> � ui�1, <sup>j</sup> 2Δx

<sup>2</sup>Δ<sup>x</sup> <sup>g</sup>dSfx <sup>þ</sup>

h i

<sup>þ</sup> gd <sup>∂</sup><sup>h</sup> ∂ y

<sup>þ</sup> gd <sup>∂</sup><sup>h</sup>

� ∂ ∂x

� ∂ ∂ y

β v2 d � �

β u2 d � �

Step 1: Differencing equations following Taylor formula

<sup>∂</sup><sup>t</sup> <sup>¼</sup> uiþ1, <sup>j</sup> � ui�1, <sup>j</sup>

ui�1, <sup>j</sup>

1 ρ τwxKL

$$A^{hu} = \begin{bmatrix} 0 & 0 & 0 \\ \frac{1}{2\Delta x} & 0 & \frac{-1}{2\Delta x} \\ 0 & 0 & 0 \end{bmatrix} \quad A^{hv} = \begin{bmatrix} 0 & \frac{1}{2\Delta y} & 0 \\ 0 & 0 & 0 \\ 0 & \frac{-1}{2\Delta y} & 0 \end{bmatrix} \tag{18}$$

• Layer u:

$$A^{uv} = \begin{bmatrix} 0 & \frac{\beta u\_{i,j-1}}{2d\Delta y} & 0\\ 0 & 0 & 0\\ 0 & \frac{-\beta u\_{i,j+1}}{2d\Delta y} & 0 \end{bmatrix}; A^{uh} = \begin{bmatrix} 0 & 0 & 0\\ \frac{gd}{2\Delta x} & 0 & \frac{-gd}{2\Delta x}\\ 0 & 0 & 0 \end{bmatrix}; B^u = \frac{1}{\rho} \mathbf{r}\_{uv} \begin{bmatrix} 0 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 0 \end{bmatrix}.$$

$$A^{u} = \begin{bmatrix} 0 & 0 & 0\\ \frac{\beta u\_{i-1,j}}{2d\Delta x} + \frac{K\_L}{\Delta x^2} & gd\frac{n^2 \left(u\_{\vec{\eta}}^2 + v\_{\vec{\eta}}^2\right)^{1/2}}{d^{1/3}} + \frac{1}{R\_u} + \frac{4K\_L}{\Delta x^2} & \frac{-\beta u\_{i+1,j}}{2d\Delta x} + \frac{-K\_L}{\Delta x^2} \\ 0 & 0 & 0 \end{bmatrix}\_{:} z^u = 0$$

(19) • Layer v:

$$A^{nh} = \begin{bmatrix} 0 & \frac{\text{gd}}{2\Delta y} & 0\\ 0 & 0 & 0\\ 0 & 0 & 0\\ 0 & \frac{-\text{gd}}{2\Delta y} & 0 \end{bmatrix}; A^{uu} = \begin{bmatrix} 0 & 0 & 0\\ \frac{\partial u\_{i-1,j}}{2d\Delta x} & 0 & \frac{-\partial u\_{i-1,j}}{2d\Delta x}\\ 0 & 0 & 0 \end{bmatrix}; B^{v} = \frac{1}{\rho}\mathbf{r}\_{\text{wy}} \begin{bmatrix} 0 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 0 \end{bmatrix}; x^{v} = \mathbf{0}$$

$$A^{v} = \begin{bmatrix} 0 & \frac{\partial v\_{i,j+1}}{2d\Delta y} + \frac{K\_L}{\Delta y^2} & \mathbf{0}\\\\ \frac{K\_L}{\Delta y^2} & \text{gd}\frac{\mathbf{u}^2 \left(u\_{i,j}^2 + v\_{i,j}^2\right)^2}{d^{1/3}} + \frac{\mathbf{1}}{R^p} + \frac{K\_L}{\Delta y^2} & \frac{-K\_L}{\Delta y^2}\\\\ \mathbf{0} & \frac{-\rho\eta\_{i,j+1}}{2d\Delta y} - \frac{K\_L}{\Delta y^2} & \mathbf{0} \end{bmatrix} \tag{20}$$

Step 3: Designing hardware architecture of CNN to solve Navier-Stokes equations

Based on templates found in (18)–(20), we can design an architecture for circuit for CNN chip. It is a three-layered CNN 2D. Then, the arithmetic unit for each layer and links to perform parallel calculation on chip can be made. Figure 9 shows the architecture of layer h and layer u (the layer v is similar to u).
