Civil Engineering Reference
In-Depth Information
there is no p variable. Thus, the second freedom (nodal freedoms are in the order u , p ,
v ) at all mid-side nodes is eliminated from the analysis through the “restrained freedom”
( nf ) data.
The first line of data reads the number of elements in each direction of the rectangular
mesh ( nxe and nye ), the tolerance ( tol ) and iteration ceiling ( limit ) for the non-linear
iterations, and the fluid properties given by the molecular viscosity ( visc ) and density
( rho ). The second and third lines give the coordinate data x coords and y coords ,
and this is followed by the node freedom data, which involves nr=81 restrained nodes in
this example. The final lines of data give the fixed velocity boundary condition of u =
1 . 0
along the 11 top nodes of the mesh.
The structure of the program is described by the structure chart in Figure 9.2. After the
data has been read in, various arrays must be initialised to zero. Note that the kay matrix
which, in the previous chapter, held coefficients of consolidation c x and so on, now holds
viscosity and density in the form µ/ρ , which represents the reciprocal of the Reynolds
number for this cavity size.
The iteration loop is then entered, controlled by the counter iters . System arrays pb
and work must be nulled together with the element “stiffness” matrix ke . Element matrix
Read data
Allocate arrays
Find problem size
For all iterations
Null global array
For all elements
Find nodal coordinates and steering vector
Set nodal velocities to average of old and new
Null [c ij ] submatrices and [k e ]
For all Gauss points
Form velocity contribution [c 11 ] using
8-node shape functions fun
Form coupled contributions
[c 12 ], [c 21 ], [c 32 ], [c 23 ]
using 4-node shape functions funf
Build [k e ] from [c ij ]
Assemble into unsymmetric band matrix pb
Insert prescribed boundary conditions of
velocity and/or pressure
Solve simultaneous equations and check convergence
Print the solution and number of iterations taken
Figure 9.2
Structure chart for Navier-Stokes analysis with global matrix assembly in
Program 9.1
Search WWH ::




Custom Search