Upload
tim-wong
View
214
Download
0
Embed Size (px)
Citation preview
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
1/20
P a g e | 1
Department of Mechanical, Materials
& Manufacturing Engineering
3rd
Year Individual Project
MM3BPR
Tim Wong
4100673
Professor Henry Power
Proving The Solubility Of A Navier-Stokes Solution UsingA Modified Method Of Particular Solutions
BEng Mechanical Engineering2011/12
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
2/20
P a g e | 2
Abstract
This report contains details on the use of the Modified Method of Particular Solutions
(MAPS) scheme, with the ambition of developing a more accurate and time efficient method
for solving two dimensional problems with regards to the Navier-Stokes equation forincompressible fluid flow. The scenario examined is a lid-driven cavity flow problem, with
the assumption of a linear superposition of the Stokes particular solutions, and an assumption
of non-linearity for the convective terms of the full Navier-Stokes equation, considered as a
non-homogeneous Stokes system, with the equation's base term ad Multiquadratic (MQ)
Radial Basis Functions (RBF) as source terms. These equations are then solved by Picard
iteration, and the resultant general solutions are independent of boundary conditions. Two
solvers are compared in the report, firstly a simple Gauss direct solver is, which is compared
with a Single Value Decomposition (SVD) method. The SVD solver was found to be more
accurate than the original solver, but less efficient on computing power.
The scheme can be considered mass conservative, as although the continuity equation is notexpressly imposed in the formulation of the scheme, the Particular solutions satisfy the mass
conservation equation already. In addition, pressure-velocity coupling is not an issue, as the
pressure particular solutions are found from the velocity particular solutions. The scheme
outlined above is then compared with pre-obtained results, calculated using the numerical
solutions of the analytical Kovasnay flow problem at different Reynolds Numbers, Re. (1)
Convergence and its dependence on the Shape Parameter is analyzed by finding the Root
Mean Square (RMS) error for the uniform distributions of collocation points; i.e. for several
pairs of nodal points, and the MQ Shape Parameter. The correlations show that the MAPS
scheme for both solvers is, for a wide range of Shape Parameters, generally stable when
compared with the pre-obtained results up to a Reynolds number of 3200. solutions can be
found for a range of nodal distributions, and increasingly accurate results can be found using
an SVD solver, at the expense of computing efficiency.
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
3/20
P a g e | 3
Contents
Title Page .............................................................................................................................................. 1
Abstract................................................................................................................................................. 2
Nomenclature........................................................................................................................................ 4
Aims & Objectives ............................................................................................................................... 4
Introduction & Background .................................................................................................................. 4
The Modified Method Of Particular Solutions For Solving Navier-Stokes System Of Equations ........ 7
The Simple Gaussian Solver ......................................................................................................... 10
The Singular Value Decomposition Solver .................................................................................. 10
Pre-Estimated Solutions ............................................................................................................... 11
Lid Driven Cavity Flow Scenario Numerical Results ................................................................. 12
The Extension To, & Affects of Higher Reynolds Numbers ...................................................... 14
Computing Efficiency ................................................................................................................... 15
Conclusions ........................................................................................................................................ 16
Recommendations ............................................................................................................................... 16
Acknowledgements& References ....................................................................................................... 16
Bibliography ....................................................................................................................................... 17
Appendices ......................................................................................................................................... 18
Figures and Tables ...................................................................................................................... 18
MATLAB Code ............................................................................................................................. 18
Main Code .................................................................................................................................. 18
Memory Analysis Code .............................................................................................................. 20
Supervision Records ................................................................................................................... 20
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
4/20
P a g e | 4
Nomenclature1
SP= Shape Parameter
MQ= Multiquadratic
RBF=Radial Basis Function
SVD =Singular Value Decomposition
Re = Reynolds Number
Aims & Objectives
The main aim of the project is to assess the possible improvements to be implemented to the
MAPS, relating to the solving of a two dimensional Navier Stokes Flow Problem.
Specifically;
Coding, Implementing and Analyzing the use of different Solvers within the Picard
iterations scheme Assess the sensitivity of the numerical solutions with respect to the value of the Shape
parameter
Comparing the Solvers for efficiency and range up to higher Reynolds Numbers
Producing results in good agreement with existing numerical data
Introduction & Background
Within the field of Computational Dynamics, it can be said that the numerical solution of
Navier-Stokes systems of equations are the most challenging to solve. This is when assuming
an incompressible fluid, and in terms of the basic variables p, . Schemes such as theSIMPLE (2) and PISO (3) types can transform the p- coupled non-linear problem into asystem of linear problems, these techniques have been used with wide success when using
standard methods such as Finite Volume (FVM) and Finite Element (FEM). However these
pairings require a large amount of computing effort in terms of power and time to solve the
systems of equations.
One solution to this is to avoid the p- coupling in 2-D Navier-Stokes systems, by usingvorticity formulations to decouple the pressure field from the governing equations. This line
of research has still not been fully explored, and still suffers from problems. A large
drawback is that the continuity equation is not explicitly imposed in the formulation, and
hence mass-conservation cannot be guaranteed. Some schemes, such as the Velocity
Correction Method (4) purport to correct the mass imbalance; however it seems that if
improved coupling strategies for the primitive variables can be implemented, then the
numerical solutions in terms of p- will provide more accurate pressure fields.Opposing this increase in accuracy however, for such methods as FEM, FD etc. as mentioned
above, is their reliance upon a computational mesh (5), which takes up considerable time and
effort to generate a high quality, accurate Mesh. To decrease the amount of effort and time
associated with the mesh generation, meshless numerical schemes have been developed,
allowing non-connected nodal distributions to be used, instead of connected elements. These
schemes such as the global Radial Basis Function (RBF) (6), used in the final scheme for thisproject, which uses a direct meshless collocation method, has had considerable success in
solving boundary value problems governed by Partial Differential Equations (PDEs). RBF
1 All other terms will be explained within the working present below
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
5/20
P a g e | 5
collocation methods have an advantage in that they are completely meshless, and hence
dimensionally independent of the formulation, they also avoid the spectral convergence of
some of the RBF interpolants, e.g. MQ. Despite RBF global collocation methods inherent
advantages, they still suffer a fundamental problem in the form of the uncertainty relationship
(7). In essence this describes a relationship in which better conditioning is associated with
worse accuracy and vice-versa. System size is also a factor, as it is increased, the problem
becomes more troublesome. To combat this, approaches such as RBF-specific matrix
preconditioners (8) have been developed.
Despite the improvements in Global approaches, there are still many drawbacks to the
approach, matrix size is still a limiting factor, and ill conditioning still proves to a large issue.
Hence recent developments have suggested local RBF interpolation schemes to be more
efficient, and work for a greater range of shape parameter values. They also avoid many of
the ill conditioning problems at a local level. However, when using the local formulations,
the numerical scheme results in a looser meshless character as partial local connectivity is
need between the interpolation nodes, this results in additional, more complex programming.
Using an indirect approach, where RBFs can be used to approximate the complex high order
derivatives present in the PDE to be solved, provides more stability and reduces convergence
issues. This type of scheme integrates the approximated derivatives with respect to the
corresponding coordinates, (9) & (10) and only the collocation points along the line of
integration are considered to express a local formulation. This allows accurate solutions to be
obtained for a greater range of shape parameter values, as the integration process allows for
smoother behavior.
RBF meshless numerical solutions of Navier Stokes systems of equations use velocity or
stream function and vorticity formulations, to avoid the problem of the p- couplingformulation. Despite some success (11) in using a global approach, due to the aforementionedill conditioning problems, a local approach has been much more successful at predicting
viscous flow fields. The MQ Differential Quadrature method (MQDQ)(12) (13)has been
proposed for spatial discretization, and combined with the fractional step method, can be used
to couple the pressure and velocity in transient problems, obtaining good results. It was been
found however, that it is important to find an efficient way of finding the correct value of the
shape parameter (SP), as this is a highly critical value relating to the accuracy of the final
numerical solution. Work by Divo and Kassab(14) and Sanjasiraju and Chandhini(15) has
developed explicit locally based transient time stepping algorithms(16) for the p-formulation (14), overall combined with either the fractional step method, mentioned above,
or the Mark and Cell (MAC) method, and provided good results. The locally explicit
transient schemes allowed the results to be more stable and less affected by the SP. Workmentioned above into Global schemes (11) has been extended into a more local approach,
using a weighted time stepping algorithm, The Crank-Nicholson, which uses a simple Picard
iterative scheme. This proved more than enough to deal with the produces system of non-
linear equations. When compared with the Global scheme, results were similar, but required
far less computational time and effort. Added to these developments, a RBF interpolation
scheme (4), again working with a velocity-vorticity relationship, has used a velocity
correction method to solve many of the mass conservation problems inherent in this scheme.
Excellent results have been found up to Reynolds numbers of 10,000 using a nodal
configuration of 161x161.
Another recent development has been of an integrated RBF method (17) for use with linear
PDEs whose differential operator L(.()), can be wholly or partially expressed as a radialcomponent in polar or spherical coordinates;
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
6/20
P a g e | 6
Equation 1
= 1+ 2 =()
It was suggested to approximate the radial component of the PDE (1. ), in terms of anRBF interpolation, and to then integrate the produced non-homogenous ODE. So producing
an approximate field variable representation by superposition of the corresponding particular
solution, similar to the indirect scheme proposed (9). The difference being that rather than
only the higher order derivatives being approximated by integration by a Cartesian grid, the
complete integration of the L1r operator with no reference to any grid is found, resulting in;
Equation 2
1 = ()
=1
With corresponding field variables for use
with linear PDEs whose differential
operator L(.(), can be wholly or partiallyexpressed as a radial component in polar or
spherical coordinates;Equation 3
= (
=1).
In this way the particular solution
(
) is given by the solution of the non-homogeneous
equation (below, equation 4), using the RBF () as the non-homogeneous term;Equation 4
1 = ()By using substituting the () approximation into the full () and the boundaryconditions, taking into account equation 2, one can obtain a fully meshless integrated RBF
solution of the boundary value problem, with no relations to any form of Cartesian Grid. This
approach is the Method Of Approximated Particular Solutions (MAPS).
For the case of a linear boundary problem;
Equation 5
( =, where &
Equation 6
( = , where Again, as above, the PDEs L(u) operator is expressed only in terms of radial coordinates,
plus a boundary operator B. These are then reduced to find the solution of the produced linear
system of equations;
Figure 1: Showing the Proposed Solution Domain, and the
Internal () and Boundary () Nodes
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
7/20
P a g e | 7
Equation 7
This is valid for N points, (Nb + Ni = N, Boundary points and Internal points respectively), as
shown on Figure 1. The solution is found by solving for the values of. The solution
processes (or solvers) are discussed in a later section.
For this paper, the method proposed is a global approach, using a meshless collocation
method based on the MAPS. Intending to solve a two-dimensional system of Navier Stokesequations, for a p- formulation, this should allow the ability to predict flow fields for a goodrange of medium and high Reynolds numbers, whilst avoiding matrix ill conditioning
problems. Tor the approximations of the non-linear inertial terms, a simple Picard iteration
scheme is to be used, it is favored over more complex non-linear solvers as it is found to
provide an acceptable level of accuracy without having to further complicate the computing
efforts. To predict the approximate velocity and pressure fields, a Stoke Particular Solution is
found using Oseens decomposition formula (18). This fills the need to find a close form
expression for the particular solution.
A p-
coupling strategy is not needed in the proposed scheme, as the velocity particular
solution satisfies the continuity equation exactly, and as the particular solution for thepressure is found directly from the velocity solution, it is also satisfactory.
The Modified MAPS scheme proposed is compared for both solvers, against pre-existing
numerical results for the Kovasnay flow problem. Various Shape Parameter and nodal
distributions are assessed, and both solvers are used to find results up to Re = 3200
The Modified Method Of Particular Solutions For Solving Navier-StokesSystem Of Equations
This section describes the methods and techniques used in a global MAPS in order to solvean incompressible steady state Navier Stokes system of equations in terms of its primitive
variables (p-). Below in equations 8 and 9, are shown the mass and momentum conservationequations, with i and j representing 1 and 2 for the two dimensional problems described in
this paper.
Equation 8
= 0
Equation 9
= +
2
The natural boundary conditions are defined in terms of their given velocity and/or surface
traction values;
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
8/20
P a g e | 8
Equation 10
= , where Equation 11
=
=
+
+
=
, where
To express the velocity and pressure fields in terms of linear superposition of particular
solutions, ( , ), we can define the non-homogenous Stokes system of equations as;Equation 12
Equation 13
, the non-homogenous term in the momentum equation is defined as the MQ RBF or, = (2 + 2)12, this is only dependent on the Euclidean distance r, between the fieldpoint and the trial point . In order to find a close form expression of the particularsolution, Oseens decomposition formula is used to find the corresponding fundamental
solution of the Stokes system, the Stokeslet ( (19) & (20)).
Defining the velocity field () in terms of the auxiliary potential, ensures that thecontinuity equation is already satisfied;
Equation 14
By substituting equation 14 into equation 12, we can find a non-homogenous biharmonic
equation of the potential . Hence, using the RBF as the non-homogenous term, and therelationship between the pressure and the auxiliary potential , as follows;
Equation 15
Equation 16
By integrating equation 15, the resulting expression for is found. The WolframMathematica Online Integrator tool was used to perform the integration (21). All
corresponding singular components of the resulting expression have been omitted, as they are
regarded as complementary solutions of the biharmonic problem.
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
9/20
P a g e | 9
Equation 17
The corresponding expressions for the particular solutions velocity and pressure fields arefound by substituting the above expression into the potential into equations 14 and 16. (Theequations of velocity and its derivatives are given in the Appendices)
An important point to observe is that the obtained particular solution is not singular in a
bonded domain . (Again see appendices). Hence the approximated velocity and pressure
fields, , can be found and defined by a linear superposition of N particular solutions at Ntrial points ;
Equation 18
Equation 19
By substituting these equations with the approximation of the directional derivative of the
velocity into a linear version of the momentum equation (equation 9) shown below as;
Equation 20
Using as the guess value of the velocity given by the previous solution of the Picarditeration, we obtain the homogeneous linear superposition of the MQ functions. These
represent the approximate momentum equation;
Equation 21
=
Within equation 21, equation 9 has been used in reference to the last term on the left hand
side, as;
Where =
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
10/20
P a g e | 10
Equation 22
In order to find the complete set of equations necessary to complete the collocation process,
either equation 18 or 19 must be substituted into the corresponding boundary condition(equation 10 or 11). Collocating the resulting expression, at either the 1boundary for or2 for , for each of the k=1,2 components, enables the first rows of the matrix system(equation 23) to be found. Further collocation of equation 21 at the internal nodes Ni, for each
of the k=1,2 components allows the last two rows to be obtained, as shown below in equation
23;
Equation 23
The general form of the boundary condition is expressed as 1,2, = () where is the boundary operator and is the corresponding value of the boundary condition. Ifunidirectional flow has already developed, it is necessary to define a zero tangential velocity
at cross sections with prescribed pressure boundary conditions.
As mentioned before, the continuity equation does not need to be explicitly imposed in the
produced system of equations as the formulation is already mass conservative. The usedsuperposition particular solutions also exactly satisfy the continuity equation. It is also
important to note there is no need for a p-v coupling strategy as there is an already inherent
relationship between the respective particular solutions (as shown by equation 16). With
respect to the non-linearity of the Navier-Stokes system of equations, they can be solved by
using a direct Picards iteration method. Used to linearize the momentum equation, a guess at
the velocity field is found from the previous iteration (see equation 20), an initial value isset corresponding to the problem in consideration. The stopping criterion of the Picard
iterations is defined by the L2-norm of the difference between the variable = 1,2, inthe present iteration and the values in the previous one, i.e. 1.
The Simple Gaussian Solver
Within the simple Picard iterative scheme, one must choose a solver for the purpose of
solving a system of linear equations in the form = . In the simplest scheme we can use asimple Gauss Solver, in MATLAB this is defined as mldivide and signified by a simple
backslash. It is the simplest way of solving the system of equations (equation 23) for . Tosolve, the Galois array A is divided into b to produce the particular solution of the linear
equation = . The MATLAB code for this method is shown in lines 78 & 79 of theappendices. It is expected that improvements can be made upon this solver.
The Singular Value Decomposition Solver
SVD (22) & is a well established method of solving a linear system of non-homogeneous
equations. It is expected in this project to provide an improved method with which to solve
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
11/20
P a g e | 11
two-dimensional Navier-Stokes systems of equations, within a Picard iteration Scheme. It has
also been indicated to provide more stable results, with the scheme less likely to be sensitive
to changes in the SP value.
The equations to be solved can be considered to be in the form = , SVD allows matrix Ato be decomposed into;
Equation 24
= where the U and V
Tare unitary orthogonal matrices containing the eigenvectors of and
respectively and is the transpose of V. S is a diagonal matrix containing the squareroots of the eigenvectors of U and V
T. Each of the diagonal values of S are the (non-negative)
singular values of A.
To solve for x, the rank of matrix A is found, i.e. the number of singular values of A. The
Pseudoinverse of A, A+
is then found;
Equation 25
+ = +where the diagonal matrix S
+is calculated by finding the reciprocals of the singular values
present within diagonal of S. The solutions to x+
(or in the MAPS case, ) are found using;
Equation 26
+ =+ (= )The MATLAB code for this method is shown in lines 79-84 of Main Code section of the
appendices.
Pre-Estimated Solutions
One way in which the scheme can be made more efficient is with the use of pre-estimated
solutions, for example, as is done in this project, when starting the Picard for a higher
Reynolds number, we can pre insert the previous value of the previous, lower, Reynoldsnumber, that has been previously solved for the same nodal distribution. As mentioned above,
this use is the equivalent of setting an appropriate guess for . This reduces the number ofiterations needed, as the original estimate, is more accurate than when starting from zero. It
also helps produce a more stable result, and in some cases to converge at all. In this project,all results produced for Reynolds numbers over 1000 used this additional process. When
using Reynolds numbers lower than 1000, it is found that solving for both a lower and then a
higher Reynolds number took more time and computing power than just solving from a guess
of zero. It is also noted that there is very little difference between the qualities of results for
each method for = 1000
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
12/20
P a g e | 12
Lid Driven Cavity Flow Scenario Numerical Results
Figures 2 and 3 show the sensitivity displayed by the L2 Norm parameter, when the value of
the SP was changed. As we can see, both Solvers display broadly similar characteristics. The
data is based upon the lid driven cavity scenario with = 400 and a nodal distribution of31x31. From these graphs, they look broadly similar, both show the expected characteristic
shape, and numerically they are both within reasonable parameters.
Figure 4: Showing the RMS Error sensitivity with respect to the value of the Shape Parameter
2.00E-04
2.50E-04
3.00E-04
3.50E-04
4.00E-04
4.50E-04
5.00E-04
5.50E-04
6.00E-04
6.50E-04
3.E-04 5.E-04 1.E-03 5.E-03 1.E-021.E-02
RMSE
rror
Shape Parameter Values
SVD Gaussian
1.00E-02
1.00E-01
1.00E+00
1.00E+01
1.00E+02
1.00E+03
1.00E+04
1.E-05 1.E-04 1.E-03 1.E-02 1.E-01 1.E+00
L2Norm
Shape Parameter Value
Converging
Non-Converging
1.E-02
1.E-01
1.E+00
1.E+01
1.E+02
1.E+03
1.E+04
1.E-05 1.E-04 1.E-03 1.E-02 1.E-01 1.E+00
L2Norm
Shape Parameter
Converging
Non Converging
Figure 3: Chart to show the sensitivity of L2 Norm
with changes to the value of the Shape Parameter
when usin a Sin le Value Decom osition Solver
Figure 2: Chart to show the sensitivity of L2 Norm
with changes to the value of the Shape Parameter
using a Simple Gaussian Solver
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
13/20
P a g e | 13
It is only when we examine Figure 6, above, that we see the differences between the two
solvers. Figure 6 shows a clear advantage in the SVD solver. The RMS error is significantly
smaller for the larger values within the range of Shape Parameter values.
Results were also compared between the Pre-existing Ghia (1) values for 1 & 2, as shownin figures 5 and 6. Again, examination of the graphs above adds to the premise that the SVD
solver provides a more accurate method of solving the system of linear equations resident
within the Picard iteration scheme. Certainly at = 3200 as shown above, the results showonly a very slight improvement in their agreement with the pre-existing Ghia results. The
same has been found for all vales of Re up to 3200. The effect becomes more pronounced as
Re increases, this is a good argument for the implementation of an SVD solver at higher
values of Re.
Figure 5: Showing the obtained u1, u2 velocity profiles upon the lines x1=0.5, x2=0.5, using the SVD solver
Figure 6: Showing the obtained u1, u2 velocity profiles upon the lines x1=0.5, x2=0.5, using the Gaussian solver
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
14/20
P a g e | 14
Figure 7 shows the number of iterations needed to converge to within the tolerance set by the
L2 Norm for a range of SP values. Generally for both solvers, the sensitivity to the SP value
was remarkably consistent. It is however worth noting that the SVD approach seemed more
stable when using smaller shape parameters, most notable down to 1105. This in itself isnot particular significant, as better results are achieved with higher Shape Parameter values,
however it does represent a larger range of shape parameter values, which in turn results in
good stability, and hence convergence and good quality results.
Any results above the dotted line represent scenarios where the solutions did not converge,
generally the maximum number of iterations to try was set at 50, and some even exceeded
this number.
Figure 7: Showing the amount of iterations needed to converge on a solution for various Shape Parameters, based
upon a Reynolds number of 400
The Extension To, & Affects of Higher Reynolds Numbers
Figures 8 and 9 show the Flow lines of the lid driven cavity scenario for a Reynolds number
of 3200, and a nodal distribution of 51x51 for each solver. Both Solvers provide very good
results, however as shown below, again the SVD solver provides a more comprehensive
representation of the flow lines at a Reynolds number of 3200. The notoriously under-
resolved areas in the bottom corners are more detailed, as is the centre, and the flow lines
directly under the approach flow of the lid driven cavity flow scenario.
0
5
10
IterationsToConvergance
Shape Parameter
SVD
Gaussian
Did Not
Converge
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
15/20
P a g e | 15
Figure 8: Flow Lines Shown For Re=3200
Using a SVD Solver
Both solvers have been used to reach a Reynolds number of 3200, both showing good results
(figures 8 & 9). When reaching these higher Reynolds numbers, they were found using an
estimate for from the solutions for = 1000. The differences in terms of efficiencybetween the two solvers were as expected, with the SVD solver taking slightly longer. For
= 3200 the SVD solver took 19.6 hours, and 14.6 hours for the Gaussian solver (Table 1,Appendix).
It is also important to note that a smaller value of the Shape Parameter had to be used for the
extension to higher Reynolds numbers. This is due to the ill conditioning of the interpolating
matrix that occurs as Re increases. Although the author attempted to reach higher than 3200,i.e. = 5000, time constraints meant it was not possible to pursue this to a great extent,although promising work was done towards this goal. It is confidently predicted that higher
values of Re could be achieved with greater nodal distributions, and points within them, this
is mentioned further in the recommendations section below, but sadly time constraints did not
allow this to be pursued within the scope of the project.
Computing Efficiency
Figure 10: Showing the Time Taken to Converge for various values of the Shape Parameter, using variables of
Re=400 and a 31x31 Nodal Distribution
The computing efficiency of each solver
has also been investigated within the
project, shown to the left, figure 10 shows
the overall time to converge for the
various SP values. As we can see the
Gaussian method seems very slightly
quicker overall for the range of values,
which is as mentioned above. It is worth
mentioning that the multiple computers
used were not being used heedlessly. Due
to the fact that the majority of theuniversity computers were not up to the
job of processing the amount of data,
individual computers had to be used, and
Figure 9: Flow Lines Shown For Re=3200Using A Direct Gauss Solver
0
1
2
3
4
5
1.E-05 1.E-04 1.E-03 1.E-02 1.E-01 1.E+00TimeTakenToConverge(hrs)
Shape Parameter
Gaussian
SVD
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
16/20
P a g e | 16
as many of the scripts took 5+ hours to run, it was impossible to not use them for other work
during that time. Hence some of the processing and memory operations may have been
compromised from their optimum performances when running the scripts.
Conclusions
The aim of the project discussed in this report has brought to the fore a number of
conclusions, based upon the results discussed above. The overall method has as discussed has
not changed to a great extent, but by working with the scheme and corresponding code over
the past 6 months, small tweaks and additions have been added to further analyze and
improve the MATLAB code. Use of both solvers, Gaussian, and SVD, has raised further
possibilities and questions with respect to the MAPS. The SVD solver proved to be more
accurate, and have greater detail, as witnessed by the graphs above. For all converging values
of the SP, it averaged an RMS Error of 3.5395E-04, compared with the average for the
Gaussian Solver of 3.9620E-04, almost a 12% increase in accuracy.
The Gaussian Solver however, proved to take the least time, averaging 10% quicker than the
SVD Solver. As expected, it also took up less computing power, averaging for a relatively
low Reynolds number of 400 and a medium nodal distribution of 31x31, 30Mbs less needed
per iteration. At low Reynolds numbers and coarser nodal distributions then, where
computing power is at a premium, the Gaussian solver is more useful. In the instance where
computing power is not an issue, for instance in many of many now common medium to high
end computers, an SVD solver must be considered, as it provides an increase in both
accuracy and stability.
Recommendations
Other Solverso LU decompositiono Etc.
Higher Re testingo Re=5,000o Re=10,000
Refined Meshes
o 101x101o 161x161
Use of headless operating system, i.e. without the clutter of multiplexing, or otherprocessor or memory demands.
Acknowledgements& References
The current report is part of work currently ongoing by H. Power2, C. A. Bustamante
3and W.
F. Florez2. Thanks are given to Dr. Bustamante for the original version of the MATLAB
4
2 School of Mechanical, Materials and Manufacturing Engineering, University of Nottingham, University Park,
Nottingham, NG7 2RD, UK3Instituto de Energa, Materiales y Medio Ambiente, Universidad Pontificia Bolivariana, Circ. 1 No. 74-34,
Medelln, Colombia4 http://www.mathworks.co.uk/products/matlab/ 4 http://www.mathworks.co.uk/matlabcentral/
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
17/20
P a g e | 17
code and a very large thanks to Professor Power for his insights and advice on this project. I
also have to thank the MIT Open Courseware project (23) video for help with solving Linear
equations using SVD. I am also indebted to the good people at MATLAB Central5, whose
forums have been ever helpful when searching for the correct functions or operators to use.
Further thanks are due to Joshua Greenslade, for use of his computer when running high end
scripts.
Bibliography
1.High-re solutions for incompressible flow using the navier-stokes equations and a multigrid. U. Ghia, K.
N. Ghia, C. Shin. Journal of Computational Physics 48, 1982, Vols. 387411.
2.A calculation procedure for heat, mass and momentum transfer in three-dimensional. S. V. Patankar, D.B. Spalding. 1972, Int. J. Heat Mass Transfer 15, pp. 17871806.
3. Solution of the implicitly discretised fluid flow equations by operator-splitting. R. I. Issa. 1986, J.Comput. Phys. 62, pp. 40-65.
4.Numerical solution of non-isothermal fluid flows. G. C. Bourantas, E. D. Skouras, V. C. Loukopoulos,
G. C. Nikiforidis. 2010, J. Comput. Methods Eng. Sci., pp. 187-212.
5.Direct solution of navierstokes equations by radial basis functions. O. I. G. Demirkaya, C. Wafo Soh.2008, Engineering Analysis, pp. 1848-1858.
6.Multiquadrics -a scattered data approximation scheme with applications to computational fluid
dynamics-ii. Kansa, E. J. 1990, Comput. Math. Appl. 19, pp. 127-145.
7. Schaback, R. Multivariate interpolation and approximation by translates of basis functions. [book auth.]
L. L. Schumaker C. K. Chui.Approximation Theory VIII:Wavelets and Multilevel Approximation. College
Station : World Scientific Pub Co Inc, 1995, pp. 1-8.
8. On approximate cardinal preconditioning methods for solving pdes with radial basis functions. Brown,
D. 2005, Eng. Anal., pp. 343-353.9.Approximation of function and its derivatives using radial basis function networks. Mai-Duy, T. T.-C.
N. 2003, Appl. Math., pp. 197-220.10.Numerical solution of diferential equations using multiquadric radial basis function networks. N. Mai-
Duy, T. Tran-Cong. 2001, Neural Networks 14, pp. 185-199.
11.Radial basis function meshless method for the steady incompressible navier stokes equations. P. P.Chinchapatnam, K. Djidjeli, P. B. Nair. 2007, International Journal of Computer Mathematics 84 (10), pp.
1509-1526.
12.Numerical computation of three-dimensional incompressible viscous flows in the primitive. H. Ding, C.
Shu, K. Yeo, D. Xu. 2006, Comput. Methods Appl. Mech. Engrg. 195, pp. 197-220.
13.Local radial basis function-based differential quadrature method and its application to solve. C. Shu,H. Ding, K. Yeo. 2003, Comput. Methods Appl. Mech. Engrg. 192, pp. 941-954.
14.An efficient localized radial basis function meshless method for fluid flow and conjugate heat. E. Divo,A. J. Kassab. Journal of Heat Transfer 129 : 124-136, 2007.
15.Local radial basis function based gridfree scheme for unsteady incompressible viscous flows,. Y.
Sanyasiraju, G. Chandhini. Journal of Computational Physics 227 : s.n., 2008.
16.A radial basis function collocation approach in computational fluid dynamics,. B. Sarler. s.l. : CMESComput. Model Eng. Sci., 2005.
17. The method of approximated particular solutions for solving certain partial differential equations,. C.Chen, C. Fan, P.Wen. 2010, Vol. Numer. Meth. Part. D. E.
18.Boundary Integral Methods in Fluid Mechanics. H. Power, L. Wrobel. Comput. Mech : s.n., 1995.
19. J. Happel, H. Brenner.Low Reynolds Number Hydrodynamics. The Hague : Martinus Nijhoff
Publishers, 1983.20. Free vibration multiquadric boundary elements applied to plane elasticity,. M. F. Samaan, Y. F.
Rashed. 2009, Vol. Appl. Math.21. The Wolfram Mathematica Online Integrator. Wolfram Mathematica. [Online] 2012.
http://integrals.wolfram.com/index.jsp.22. Singular Value Decomposition (SVD) Tutorial.Massachusetts Institute of Technology. [Online]
http://web.mit.edu/be.400/www/SVD/Singular_Value_Decomposition.htm.
23.MIT Math Lecture - Linear Algebra - 29 - Singular Value Decomposition. http://ocw.mit.edu/index.htm,
2008.
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
18/20
P a g e | 18
Appendices
Figures and Tables
Table 1: Showing some of the numerical results for various Nodal Distributions, and Re and SP valuesModified Method Of Particular Solutions
'Gaussian (mldivide)' 'Single Value Decomposition (SVD)'
Node
Configuration
Reynolds
Number, Re
Shape
Parameter, cConverged? Iterations Time(hrs) L2 Norm Converged? Iterations Time (hrs) L2 Norm
21x21 100 1.00E-02 Y 5 0.1933 - Y 5 - -
41x41 100 1.00E-02 Y 5 5.3722 - - -
51x51 100 1.00E-02 Y 5 6.6408 - - - - -
41x41 400 1.00E-02 Y 5 2.9281 - - - - -
51x51 400 5.00E-03 Y 5 6.5808 - Y 5 - -
51x51 400 5.00E-02 N - - - - - - -
41x41 800 1.00E-02 Y 14 8.1303 - - - - -
51x51 400 2.50E-02 N - - - - - - -
51x51 400 1.25E-02 N - - - - - - -
51x51 400 7.50E-03 Y 6 8.1289 - - - - -
31x31 400 1.00E-06 N(Max) 25 - - - - -
31x31 400 1.00E-05 N (Max) 25 4.2380 8.9013E-01 N(Max) 25 5.1287 -
31x31 400 1.00E-04 N (Max) 25 4.0577 5.2321E-01 N(Max) 25 4.7108 8.9928E-02
31x31 400 1.25E-04 - - - - N(Max) 50 - 7.5300E-02
31x31 400 2.50E-04 0.9213 4.8898E-02 Y 5 0.9708 4.8899E-02
31x31 400 5.00E-04 - - - - Y 5 0.9601 4.9276E-02
31x31 400 1.00E-03 Y 5 0.8845 5.0909E-02 Y 5 0.9416 5.0900E-02
31x31 400 5.00E-03 - - - - Y 5 0.9693 8.7543E-02
31x31 400 1.00E-02 Y 5 0.9321 2.2272E-01 Y 5 1.2166 2.2271E-01
31x31 400 1.10E-02 Y 5 0.8485 - - - -
31x31 400 1.15E-02 Y 5 0.8577 - - - -
31x31 400 1.25E-02 Y 5 - 3.6517E-01 Y 5 0.9801 3.6524E-01
31x31 400 2.50E-02 Y 7 1.1973 Y 7 1.3196 4.8828E+00
31x31 400 3.75E-02 - - - - N(Max) - - 2.6225E+01
31x31 400 5.00E-02 N(Max) 25 4.1050 6.5739E+03 N(Max) 25 4.5353 1.0500E+03
31x31 400 5.00E-02 N (Max) 50 8.3614 - - - - -
31x31 400 1.00E-01 N (Max) 25 4.5099 - - - - -
51x51 1000 1.00E-02 Y 7 - - Y 7 - -
51x51 3200 1.00E-03 Y 11 14.6206 - Y 5 19.6580 -
MATLAB Code
Main Code
Included below is a copy of the main code, functions called are not included, however they
are explained within the existing comments;
1. % Code for the solution of the 2-D laminar flow problems (Lid Driven Cavity Flow) bythe Global Method of
2. % approximated Particular Solutions w/ refined mesh and pressure computation)3. tic; %start time measurement
4. clearall
5. loadnodes.dat %File containing node coordinate6. %load RENS.txt %File containing initial solution
7. x=nodes(:,2:3);8. s1=size(x);9. n=s1(1);10.[bp,ip,n1,n2,bk]=geosor2a(x,n); %bp(:,1:2) contains the coordinates of boundary points
and bp(:,3:4) the velocity values at boundary %ip(:,1:2) contains the coordinates ofinternal points
11.%Global system computing aa*al=bb12.den=400; %Assuming Density (Re=den*L*U/mu, if L=1,U=1,mu=1 then Re=density)13.sp=0.0125; %Shape Parameter (c)
14.aa=zeros(2*(n1+n2),2*(n1+n2));15.bb=zeros(2*(n1+n2),1);
16.tolp=0.01; %Tolerance17.k=1; %initialise count18.nmax=50; %Max Iterations19.up0=zeros(n1+n2,3);20.u1=zeros(n1+n2,n1+n2);
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
19/20
P a g e | 19
21.u2=zeros(n1+n2,n1+n2);22.pp=zeros(n1+n2,n1+n2);23.%up0=RENS(:,1:3); %Uncomment when a initial guess different to zero has to be set.
24.while (k
8/2/2019 Proving The Solubility Of A Navier-Stokes Solution Using A Modified Method Of Particular Solutions
20/20
P a g e | 20
88.up=zeros(n1+n2,3);89.xp(1:n1,1:2)=bp(1:n1,1:2);90.fori=1:n191.if (bk(i)==0)92.up(i,1)=bb(i,1);93.up(i,2)=bb(i+n1,1);94.up(i,3)=dot(pp(i,:),al(:));95.elseif (bk(i)==1)
96.up(i,1)=dot(u1(i,:),al(:));97.up(i,2)=bb(i+n1,1);98.up(i,3)=bb(i,1);99.end100. end101. up(n1+1:n1+n2,1)=u1(n1+1:n1+n2,:)*al;102. up(n1+1:n1+n2,2)=u2(n1+1:n1+n2,:)*al;103. up(n1+1:n1+n2,3)=pp(n1+1:n1+n2,:)*al;104. tol1(k)=abs(max(up(:,1)-up0(:,1))) %/abs(max(up0(:,1)))
105. %Saving results106. dlmwrite('RENS.txt',up, 'delimiter', '\t', 'precision', 6); %saving RENS data107. dlmwrite('RADNS.txt',xp, 'delimiter', '\t', 'precision', 6); %saving RADNS data
dlmwrite('toles.txt',tol1, 'delimiter', '\t', 'precision', 6); %savingtolerances data
108. if (tol1(k)