Asme Imece2013 66458

You might also like

You are on page 1of 11

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/267597038

Teaching Computational Fluid Dynamics Using MATLAB

Conference Paper · November 2013


DOI: 10.1115/IMECE2013-66458

CITATION READS
1 11,082

2 authors, including:

Amitabha Ghosh
Rochester Institute of Technology
28 PUBLICATIONS   201 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Curriculum Improvement View project

All content following this page was uploaded by Amitabha Ghosh on 18 August 2015.

The user has requested enhancement of the downloaded file.


Proceedings of IMECE2013
2013 ASME International Mechanical Engineering Congress and Exposition
November 15-21, San Diego, California, USA

IMECE2013-66458

TEACHING COMPUTATIONAL FLUID DYNAMICS USING MATLAB


* +
Amitabha Ghosh and Carlos Pantaleón
Rochester Institute of Technology
Rochester, NY 14623

ABSTRACT mechanics but they can still generate a grid on GAMBIT and
A set of MATLAB modules has been developed for an run flow calculations using FLUENT. In this paper these
introductory graduate course on computational fluid dynamics approaches will be called the conventional or layman's
(CFD) at Rochester Institute of Technology (RIT). These approaches to CFD. Without the analytical rigor required to
modules can provide a breakthrough in CFD education because understand the underlying theory of CFD the final user of CFD
they can assist both learning and comprehension, while software does not necessarily understand the mathematical
avoiding analytical mistakes by the CFD learner. With behavior of fluid dynamics, the numerical procedures for
advances in CFD and availability of software, students in upper solving partial differential equations (PDEs), the different
level fluid mechanics classes have less incentive to learn theory discretization schemes behind the codes, or the necessary
and the tools for abstract thinking. This paper proposes for the stability analysis. For this reason, incorrectly computed results –
first time an alternate approach to teaching and learning of CFD which at first sight might seem reasonable– may be accepted by
through the use of symbolic computation in MATLAB, while students as valid. In order to reduce this possibility, students
preserving the accuracy and content of abstract analyses. should be taught to properly select a physical model, understand
applicable governing equations, initial and boundary conditions
INTRODUCTION plus the domain discretization used for the simulation. But with
In the past 30 years, advances in computer technology have the current abundance of software in the marketplace how is
brought significant breakthroughs in engineering and science. this possible? In fact, the engineering advancement has made
Side by side engineering computations were assisted by the students lazy or, disinterested to learn the hard way that our
expansion of both memory and data storage. Most conventional forefathers had to practice. Innovation in educational research
engineering problems in fluid mechanics have been solved and assisted development of software technology to provide clarity
an abundance of flow software is available in the market at in thinking and assist visualization.
nominal costs. Most of the engineering graduate schools have Computer animation is a powerful tool which can enhance
introduced CFD in their curriculum. Student thesis and project student understanding significantly when properly designed.
work are routinely solved using FLUENT or CFX where Traditionally, this is where computers could assist advancing
students need not learn the theory of CFD. As a result CFD has education in a major way. Historically, campus-wide animation
become a buzzword where many people do not even know what driven courseware were developed as early as 1988 under the
it is really about. It is true that the field of CFD is fairly broad project Athena at MIT [1]. All modules developed under that
beginning with formulations and ending with data analysis and project were designed by students with supporting staff experts
display. Most of all, today results can be achieved by pressing in X-windowing software and overseen by faculty mentors. The
one button on the computer keyboard, or a mouse-click. first author was a faculty evaluator, and has since used these
In the past, many educators have used CFD to solve tools (e.g., the TODOR courseware) successfully in teaching of
engineering questions themselves and taught students the fruit aerodynamics and fluid mechanics. Although such tools are
of their learning. Or they have assisted students to find their very user friendly and stand-alone computational marvels, they
own answers, while they have not been trained in the theory of require close monitoring of a seasoned instructor for enhanced
CFD. In the graduate programs this approach is the most student learning in complex topics. Moreover they could not
prevalent. A student may not have a working knowledge of fluid

*
Professor, Member ASME. +Graduate Student, Department of Mechanical Engineering.

1 Copyright © 2013 by ASME


offer new exploration of core thoughts analytically because of enough engaging efforts to succeed in a highly competitive
their limited scope. engineering curriculum. Pressure of modern hectic lifestyle has
In a way, courseware such as TODOR can excite students further created piecemeal or, segmented approach with narrow
about fluid mechanics, and make them learn flow concepts by focus and shrinking attention spans in school age children. All
interacting on fundamental levels, but cannot make them strong this has made upper level fluid mechanics classes and
in carrying out analyses necessary for CFD formulations. traditional CFD courses even harder to teach at advanced levels.
TODOR was an excellent exposure to undergraduate fluid To prepare a sound curriculum, connectivity with past
flows, and students did not need to master calculus or fluid courses and upcoming classes must be established to
mechanics to execute it. In fact, the developers' goals were to demonstrate the value of comprehensive learning. This would
relieve students of the "dirty work" that goes behind the screen enable students truly appreciate the seamless learning
to plan, code and debug the solvers. The users could focus on environment offered by a well-designed curriculum. For
the engineering theories only. So the experience could be called example, a typical 3 course sequence of Thermodynamics 
“computational experiments” complementary to the subject Fluid Dynamics  Heat Transfer should not be perceived as
once basic theory was learned. disjoint subjects. Students should be helped to see the
Though X-windowing enjoyed its benefits in early nineties, connections from subject to subject by a “compare and
its days were limited. By the late nineties, RIT retired the VAX contrast” approach. Students today fail to connect with this
and UNIX platforms, together with several host programs such process approach to learning [9].
as FORTRAN. Now most universities use MATLAB as the In the following sections, topics in an Introductory CFD
scientific platform for computational work. But MATLAB had course (EMEM 830) will be discussed with their respective
not developed enough to do exactly what the authors proposed instructional challenges. Then the changes proposed in this
in this paper. MATLAB based programs are excellent paper will be discussed, benefits of the present approach will be
computational tools for analyzing flows, but may not have the presented, and concluded with the future goals of this project.
user friendliness of TODOR. The search for a solution was
intensified by some new impediments to learning from an PRELUDE
instructional viewpoint.
Educational research on undergraduate engineering “Finally I point to the following unwelcome truth: much as we
education in the past two decades has focused mainly on might dislike the implications, research is showing that didactic
Cooperative Learning approach. This emphasis has a sound exposition of abstract ideas and lines of reasoning (however
basis. It creates the most excitement among faculty when the engaging and lucid we might try to make them) to passive
positive results are presented. However, major limitations exist listeners yields pathetically thin results in learning and
in practice in the area of time management. The first author understanding – except in the very small percentage of students
prescribed the team learning approach to students in upper level who are specially gifted in the field” – A. B. Arons (1990)
fluid mechanics courses [2, 3] and still encourages students to
form study teams because engineers function best with this This was a strong remark made by Arons [10] about the
approach. It can nudge weak students to take ownership of amount of success one may achieve while trying to deliver
engineering problems, but cannot make them strong to function topics in an introductory physics course. There are two points
alone by themselves. In educational research, the support from stressed by the above statement – there are only a few handfuls
an experienced mentor is called the scaffolding. When the of gifted students that can understand abstract ideas, and that
scaffolding is removed, often a cognitive apprentice falters. most students cannot be actively engaged while attending
Therefore, unless there is a way to encourage self learning [4, 5] classes. Earlier papers [2, 3] by the first author addressed the
and acceptance of ownership in analytical problems, one cannot latter point, while in this paper we address the first point and
expect to create lifelong learners. Often the lone survivorship in furnish evidence toward a very powerful learning process. For
the analytical arena makes lifelong learners over any other several years the every attempt was geared toward providing
approach to education. instructional clarity, better visualization and comprehension
Even experts disagree on what is the magic prescription to tools. The course has been taught for the last 25 years with
teach applied mathematics. But one can spend considerable many modifications. But over the same period, student appetite
amount of time learning to motivate students to become self- to complete analytical tasks has constantly diminished. After the
learners [6, 7, 8]. Historically, great scientists and retirement of the UNIX and VAX platforms at RIT, the first
mathematicians all emerged from great schools of thoughts author converted all his old FORTRAN codes which were
headed by great scholars, and cognitive apprenticeship has been developed following the earlier edition of reference [11] into
the prescribed technique. In today's world these schools are MATLAB modules, so that all students had FORTRAN type
rare, and learning has thus been altered greatly from traditions. computational experience. But the assignments were kept
Modernization and rapid advances in computer technology simple because of reasons mentioned before. Finally with the
have made man the ultimate end user of most of the amenities. discovery of symbolic programming in MATLAB, the authors
This trend has created more students who do not wish to make developed an educational tool that did not have any previous

2 Copyright © 2013 by ASME


comparisons in the published MATLAB literature. In addition the graduate thermal fluids area must take Ideal Flows. This
to calculating flow results and producing exciting graphics, why class teaches inviscid flow formulations and solutions in low
not let the computer train and correct the students’ coding subsonic and supersonic speeds. There is no coverage of
efforts in developing an understanding in CFD? For limited viscous flows or boundary layer theory. The second class in
space, only a select set of examples will be discussed below. Convective Phenomena focuses on viscous fluid flow solutions,
But the approach developed here also has excellent support plus velocity and thermal boundary layers. This course
through MATLAB graphics and animation. Ultimately one may reinforces the analytical formulations in viscous flows. This is
finally expect to be taught by the computers [12, 13]. followed by the Introduction to CFD Analysis, which actually
teaches them how to formulate flow solvers using finite
APPROACH difference methods, what is the difference between the calculus
Appendix A presents the topics taught in Introduction to based analytical formulation and the discretized mathematical
CFD Analysis (EMEM 830) class in a short period of 10 weeks. formulation, how and why are solutions are different, and how
This class is taught once a year during the spring quarter. For to plan and execute different solution techniques. In addition
graduate ME students the course is preceded by Ideal flows the class teaches them what to look for when solutions do not
(EMEM 838) during the fall quarter and Convective behave exactly what they were intended for. The students who
Phenomena (EMEM 851) during the winter quarter. These two can completely master the topics taught in this course can
classes together with the present course constitute the graduate proceed to obtain a Ph.D. in fluid mechanics, or, conduct flow
core classes in Thermal Fluid Sciences offered by the research in a future career. This area of knowledge is quite
department of Mechanical Engineering at RIT. Since time is specialized, and most students upon completion will find
limited in a single quarter, fluids syllabus in the graduate core is gainful employment in well-established research programs.
taught utilizing all 3 courses. The new proposed CFD course Target Students: This class is a senior/graduate level class
will also offer students the benefits of a synthesized approach in the ME curriculum. Most students that enroll have all taken
[9], and work well with the transition to semesters at RIT next the previous two graduate courses in Ideal Flows (EMEM 838)
year. and Convective Phenomena (EMEM 851). Undergraduates are
allowed only when they have taken an upper level fluids course
Computational Fluid Dynamics consists of 5 steps of such as Transport Phenomena (EMEM 550). Occasionally
solving a real life problem: students from mathematics or physics also enroll in it. Students
1) Mathematical formulation of the physical problem, are expected to be familiar with graduate level mathematics,
2) Numerical formulation of the mathematical problem, coding in MATLAB, and fluid mechanics level equivalent to
3) Solution of the numerical problem using digital EMEM 550. The current paper opens possibilities of offering a
new graduate level elective course in CFD.
computers,
Progress Points: Several methods were chosen to measure
4) Display of results using graphs, tables, video, etc., performance. A standard course evaluation was collected on
5) Interpretations of results obtained. RIT forms at the end of the quarter. One comprehensive final
examination and two midterm examinations were given. A 2-
Depending on the nature of the formulations and the desirability week long short project was collected to offer students some
of solutions, a CFD engineer will go through several iterations coding experience. Weekly conceptual quizzes were given as a
of the above steps. It is important to understand that the quick feedback mechanism. In the final survey, some interesting
conventional computational fluid dynamics courses mostly connections were observed among a student’s own preparation
followed by undergraduate universities only emphasize the step levels and learning habits, self assessment, and assessment by
3 using commercially available software. At the RIT ME the instructor. These are further discussed below.
department, two courses with similar sounding names are
offered. The first course which is the topic of discussion here DISCUSSIONS
emphasizes all five steps, and elaborates much more in steps 2 Benefits of analytical and/or abstract thinking are enormous.
and 3 than the CFD Applications course which teaches how to It can strengthen comprehension and thus engineering
solve flow problems with the help of the FLUENT code. Many formulations, avoid common misconceptions, strengthen
students confuse the CFD Applications class with the analysis and synthesis (two important steps in Bloom’s
Introduction to CFD class, and later withdraw from this course taxonomy [7]), foster lifelong learning in students, and extend
after realizing their mistakes. CFD applications class may be the solution process of engineering problems to new and
attended by students with a working knowledge of fluid unexplored areas. There is no shortcut for students to learn
mechanics, wherein they are not called upon to scrutinize abstract thinking unless they take ownership of engineering
formulations or solutions, and explain reasons a priori why they problems.
would expect an ill-formulated computational method to fail. This section discusses examples of the historical approaches
After students take the remedial math courses Math I and first. In the past, the course Ideal Flows which teaches students
Math II offered by the ME department, students interested in the theory of inviscid flows in low and high speeds had no

3 Copyright © 2013 by ASME


counterpart of CFD. The primary outcome of the current discussion of the method of images. At this point in time, it is
Introduction to CFD Analysis class is to prepare students for a appropriate to give students a copy of the panel method
career in CFD research (see Appendix A- Course Objectives). depicted in Figure 3. The same flow resulting from the
In this process, the conventional CFD approach of finite superposition of a uniform flow and a doublet at origin can now
difference techniques is emphasized. Although the connection be reproduced by the source panel method where students must
between other approaches (finite volume, finite element, etc.) learn additional importance of boundary conditions and issues
were provided the class focused on the finite difference that the singularities pose computationally. Similarly the vortex
methods only. The evolution of Marker and Cell (MAC) panel method used to solve the lift characteristics for flow over
techniques got introduced with the classic 1965 paper by a cambered airfoil offers the same extended example.
Harlow and Welch and completed with the connection to Figure 4 shows the use of vortex panel method. The thin
FLUENT. However a single 10 week long class had too rapid a airfoil theory by the classical approach is currently a very
pace establishing all the objectives. Under the proposed difficult area for students to understand because they do not
structure, some user friendly MATLAB based software will be have an exposure to complex analysis before the Ideal Flows
imbedded into both Ideal Flows and Convective Phenomena class. Thus the derivation of airfoil characteristics cannot be
courses for students to have an overview of the CFD class explored by the use of residue theorem after the thin airfoil
coming later in the sequence. They will also benefit the students results are derived. Therefore cambered airfoil results are
who simply take these classes as electives because they can sketchy using formulas of Fourier coefficients presented in the
solve much more difficult problems using these modules which textbook. Now the module represented in Figure 4 can provide
were not possible before with a solely theoretical exposure. much more interest in this area for the learner.
With this blended approach, all three courses can benefit to The next example (see Figure 5) shows the solution of the
create interest in students and appropriate students will succeed monoplane equation over finite wings obtained by the panel
in choosing CFD as a career. The presented examples were method. This area of Ideal flows is also currently limited by the
carefully chosen from homework assignments and quizzes deriving results for the elliptic wing, and using charts and tables
which serve the purpose of synthesizing learning. All figures for for the non-elliptic wings. Now students can seek many of their
discussions are presented in Appendix B. own solutions using this user friendly module.
Figure 1 shows a question from the take home test 2 in the After the low speed aerodynamics some quick examples
Convective Phenomena class which had been solved by from the wind tunnel testing theory are discussed including wall
students using analytical means, and then brought back in this interference correction schemes. Next the compressible flows
class to demonstrate the simplicity of computational solution are presented. For brevity, the modules in wall interference
over the complex analytical approach. correction schemes and thermodynamic contents will not be
Problem formulations are of utmost importance, and presented here.
considerable amount of time is spent in that area. Finally the last example (Figure 6) will be given from the
Undergraduate classes do not emphasize enough the need for last topic in the Ideal Flows class. This program is simple to
writing proper analytic expressions, and symbolism needed to write, but may not be assigned to students because of limited
write correct boundary conditions suffers [3]. For example, time to cover the whole theory. In this way, all applications in
many students would write the boundary conditions on the the Ideal Flows class would lead students to a future exposure
lower wall of the plate shown in Figure 2 as qout = q. They in CFD.
have to be taught the context of solvability of differential With the previous examples, introduction and exposure to
problems in terms of independent and dependent variables, plus CFD were established. Now we present some real issues in
how to properly construct a boundary condition using location learning the theory of discrete mathematics. The CFD class
of boundaries and sign conventions. Figures 2 and 3 were starts with the classification of PDE’s. Next it develops the
chosen to show the transfer of learning in these topics from the formulation of CFD by using different approaches. The course
Convective Phenomena class to this class with the help of a quiz is primarily based on the finite difference methods, although
and a programming assignment. other methods are discussed at this stage to show the
Figures 3 through 6 represent courseware examples given connectivity of the Taylor Series approach. Taylor series is
from Ideal Flows class. Each of these modules was developed conceptually fairly straight forward for students to apply
to create a user friendly environment similar to the TODOR consistently in all of CFD. But the real issue is the carelessness
courseware mentioned before. The theory behind the to write expressions. As a result, algebraic errors can change the
POTFLOW module in TODOR [1] was the primary motivation analytical simplifications. So, order analysis or consistency
to develop the solution presented in Figure 4. Although students checks may be done incorrectly.
could learn to solve the superposition principle with simple After the discussion of the types of errors in CFD, the
singularities, distributed singularities in the 8 panels are not course quickly revisits ordinary differential equations, and the
solvable by hand. associated numerical techniques. This is to establish a proper
After students learn the superposition of placed singularities connection with previous coursework familiar to our students.
at arbitrary locations in the coordinate system, the course brings Since many undergraduates take this class as an elective, these

4 Copyright © 2013 by ASME


students had a class each in numerical methods (NUMOD), and phase errors closely related to stability and accuracy of
advanced computational techniques (ACT). They have calculations. This is probably the biggest contribution so far of
familiarity with the trapezoidal rule or Runge-Kutta method for this MATLAB based approach. In the past every attempt to
integration. An interesting example showing the instability in generate such tables by hand failed in some fashion because of
Runge-Kutta method and compared with the Milne’s method errors committed by average students. This development can
[14] illustrates clearly to the students the need for a stability correct that obstacle using symbolic computations in MATLAB.
analysis. Then the formal theory of linear multistep methods Also the software is very user friendly. So students can learn
with some simple examples of consistency and zero-stability are CFD confidently and even research into development of new
introduced. Here also, to develop the concepts of optimal methods without actually doing the "dirty work" themselves.
methods and design of a numerical scheme by allowing free In the past, some students were asked to hand calculate
parameters in truncation error expressions, Taylor Series use programming solutions on a small grid because it was difficult
must be correctly rendered. to determine analytical errors while writing programming steps.
Fortunately MATLAB’s symbolic programming can come Usually this poses a formidable task for the self-learner because
to rescue. MATLAB was originally designed for computations, the only way to check errors in expressions written manually is
and the authors wished to use it like Mathematica for this CFD to let someone else catch it. This paper has shown how to
class. Some modules were developed to write Taylor series overcome this using the computers in the subject of CFD. The
symbolically rather than evaluating it. Now one could generate authors will keep on adding and developing new MATLAB
Taylor series expansions through any number of terms using modules for this purpose and will publish relevant methodology
any one or two variables by specifying 4 arguments in a newly in forthcoming papers.
created function Tay. It prints out a table containing desired
number of terms from the Taylor series. Using these, the CONCLUSION
development of linear multistep methods can be learnt. Finally In this paper a MATLAB based new CFD course structure
when hyperbolic equations are discussed, learning the modified has been proposed. The fundamental difference between this
equation approach could benefit student comprehension paper and earlier approaches is that the current approach is
enormously. based upon symbolic computation which can teach students
Table 1 shows the application of Taylor series to determine analytical CFD concepts in addition to doing conventional
consistency and zero-stability of a linear multistep method. This computations, display of data and presentations. This furnishes
table shows some one, two, three and 4 step methods. The one of the biggest needs in CFD education, as the future lies in
symbolism is adopted from the textbook by Lambert [14]. The enhancing CFD research more effectively. MATLAB examples
table shows the determination of order (and thus consistency) were presented where CFD has been used to both teach and
for the given choices of α and, and also if the method is zero- simultaneously retain accuracy of analytical work, thereby
stable. Simplifying algebraic expressions and solving opening a new instructional technique to teach fluid mechanics
simultaneous equations by hand is a typical area of weakness in at upper levels. Although the modules were developed with the
our students today. This demonstrates how students can attempt student in mind, researchers will also find them useful to check
to solve analytical work based on Taylor series to an advantage accuracy in their formulations.
by using the proposed courseware.
Table 2 shows the results for von-Neumann stability ACKNOWLEDGMENTS
analysis performed on 2 partial differential equations of The authors are thankful to Mr. William Tierney who
hyperbolic and parabolic type. The table was prepared with the developed the MATLAB modules for Ideal Flows last spring
same symbol r used in the MATLAB code for two different quarter as part of a graduate independent study course guided
expressions. In the hyperbolic case, r = c t/x, whereas, r = by the first author.
αt/(x)2 for the parabolic case. Also the numerical schemes
shown on the table represent the forms on the left hand side of REFERENCES
the equation = 0. In each case, the limits on r as obtained from [1] McCune, J., Wachman, H. and Murman, E, 1990, “A
the stability analysis were indicated in the last column of the Workshop on Teaching Fluid Mechanics with Workstation
table. Based Software”, Final Report, National Science Foundation.
Table 3 shows how to obtain the modified equation of the [2] Ghosh, A., 2009, “Development of Analytical Skills through
first order upwind method to solve the wave equation given in Cooperative Learning”, Paper No. IMECE2009-12947,
Table 2. For comparison, the textbook's [reference 15] Table ASME International Mechanical Engineering Congress and
4.1 is reproduced through the 3rd order terms. The MATLAB Exposition, November 13 – 19, Lake Buena Vista, Florida.
program can print out any order terms, but the size was chosen [3] Ghosh, A, 2011, "Teaching Formulation Skills in an Upper
to be able to fit the table in a standard 8.5 x 11 sheet. The Level Fluid Mechanics Course", Paper No. IMECE 2011-
benefit of correctly generating the modified equation for a 63989, ASME International Mechanical Engineering Congress
numerical scheme is that students can study both amplitude and and Exposition, November 11 – 17, Denver, Colorado.

5 Copyright © 2013 by ASME


[4] Rimer, S, 2009, “At M.I.T., Large Lectures Are Going the Moran, John Wiley & Sons, (iii)Computational Fluid Mechanics -
Way of the Blackboard, NY Times Report, January 12. John D. Anderson, McGraw Hill, (iv)Computational Fluid Dynamics -
[5] Mazur, E, 1997, "Peer Instruction: A User's Manual", P. J. Roache, Hermosa Publishers, (v)An Introduction to
Computational Fluid Mechanics - C.Y. Chow, Seminole Publishing.
Prentice Hall.
[6] Felder, R. M. and Brent, R., 2002, “Designing and Teaching
Course Objectives: On successful completion of the course, students
Courses to Satisfy Engineering Criteria 2000”, Contract Report will be able to
EEC-9727411, Southeastern University and College Coalition  Formulate and analyze external inviscid flow techniques at low
for Engineering Education. and high speeds
[7] Anderson, L.W., and D. Krathwohl (Eds.), 2001, “A  Formulate and analyze external and internal flow techniques for
Taxonomy for Learning, Teaching and Assessing: a Revision of viscous flows
Bloom's Taxonomy of Educational Objectives”, Longman, New  Formulate and analyze steady and unsteady heat conduction
York. problems
[8] Love, P. G., Guthrie, V. L., 1999, “Perry’s Intellectual  Understand the basis of solution methodology of finite difference
Scheme”, Chapter from Understanding and Applying Cognitive methods
Development Theory: New Directions for Student Services, No.  Understand the fundamental concepts of Elliptic Grid Generation
Technique
88, Jossey-Bass Publishers, San Francisco.
 Conduct further research on topics in computational fluid
[9] Schneck, D. J, 2001, “Integrated Learning: Paradigm for a dynamics
Unified Approach”, Journal of Engineering Education, Volume Course Content: The following topics will be covered
90, Number 2.  Review and Fundamentals – Flow kinematics and kinetics,
[10] Arons, A. B., 1990, “A Guide to Introductory Physics Integral and differential formulations of fluid flows and heat
Teaching”, John Wiley and Sons, New York. transfer
[11] Biringen, S., and Chow, C. Y., 2011, "An Introduction to  Classification of Partial Differential Equations
Computational Fluid Dynamics by Example", John Wiley and  Parabolic, Hyperbolic and Elliptic Systems
Sons.  Well Posed Problems
[12] Topp, G., 2011, "Flipped classrooms take advantage of  Initial and Boundary Conditions
 System of Equations
technology", USA Today, 6 Oct 2011.
 Computational Methods
[13] Mazur, E., 1991, "Can We Teach Computers to Teach?",  Discrete Approximation of Derivatives
Computers in Physics, Vol. 31, No. 5, 1991.  Linear Multi-step Methods
[14] Lambert, J. D., 1974, “Computational Methods in Ordinary  Control Volume Approach
Differential Equations”, John Wiley & Sons.  Integral Method
[15] Pletcher, Tannehill and Anderson, 2013, "Computational  Polynomial Fitting Approach
Fluid Mechanics and Heat Transfer", 3rd Edition, CRC Press.  Errors in Computation
 Irregular Meshes
APPENDIX A: COURSE HANDOUT  Solutions of Algebraic Equations
 Direct Methods – Gaussian Elimination, Tri-diagonal
EMEM 830 Solvers, Gauss-Jordan Method
Introduction to CFD Analysis  Iterative Methods – Jacobi, Gauss-Seidel, Successive Over-
Relaxation Technique
 One-Dimensional Steady State Systems
Spring 2012-2013
 Diffusive System – Cartesian, Cylindrical, Spherical
Instructor: Dr. Amitabha Ghosh, Department of Mechanical Geometry
Engineering, Rochester Institute of Technology  Diffusive-Convective System
 Diffusive-Convective System with Flow
Introduction: This course introduces the theory of Computational  Critical Considerations for Computational Schemes
Fluid Dynamics (CFD) to students of engineering and science. CFD is  The Well-Posed Problem
an essential tool to solve fluid flow equations in the modern era. There  Consistency, Convergence, Stability, Lax’s Theorem
are several solution methods which will be discussed in CFD. The  Conservative and Transportive property
emphasis in the course will be on finite difference techniques. Some  Heuristic, Von-Neumann, and Matrix Stability Analysis
software tools will be overviewed if time permits.  Solution of One-Dimensional Parabolic Systems
 Explicit Scheme
Prerequisites: EMEM 838, EMEM 851 (or, equivalent)  Implicit Scheme
 Crank-Nicolson Scheme
Textbook: Computational Fluid Mechanics and Heat Transfer –  Three-Time Level Method
Pletcher, Tannehill and Anderson, 3rd Edition, CRC Press, 2013.  Cylindrical and Spherical Symmetry
 Solution of Multidimensional Parabolic Systems
References: (i)Introduction to Fluid Mechanics - Fox & McDonald, J.  Explicit and Implicit Schemes
Wiley & Sons,(ii)Theoretical and Computational Aerodynamics –J.  Crank-Nicolson Scheme

6 Copyright © 2013 by ASME


 Fractional Time Step Methods – A.D.I, A.D.E, L.O.D, Connectivity Example B:
Hopscotch scheme
 Upwind Schemes – First Order, Donor Cell Differencing
 Solution of Hyperbolic Systems
 Euler Implicit and Upwind Schemes
 Modified Equations Approach
 Lax, Lax-Wendroff and MacCormack schemes
 Solution of Incompressible Navier Stokes Equations
 Stream Function-Vorticity Formulation
 Primitive Variable Formulations
 Numerical Grid Generation
 Body-fitted Coordinate Systems – Algebraic Method
 Elliptic Grid Generation Scheme
 Relations in Physical and Transformed Planes
 Grid Quality and Convergence

Syllabus: (Refer to your textbook)


Chapters 1 – 4, 9, 10 (some parts will be omitted to maintain the
theme, see detailed schedule)

APPENDIX B: MATLAB COURSEWARE ON CFD

PART 1 – THE CONVENTIONAL APPROACH Figure 2. Quiz Question from Convective Phenomena

Connectivity Example A:

Figure 3. Home Assignment 6 from CFD Analysis class

Courseware Examples:
Figure 1. Test Question from Convective Phenomena to
Home Work in Introduction to CFD Analysis A. Superposition in Ideal Flows using Panel Method

7 Copyright © 2013 by ASME


1.5

0.5

Figure 4: Streamlines and Source Distribution


-0.5

-1

-1.5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
B. Vortex Panel Method to Calculate Airfoil Results

Figure 7: Nozzle walls calculated by MATLAB code

Figure 5: Airfoil & Lift Calculations (shown on right panel)

C. Wing Theory (Solutions of the Monoplane Equation)

Figure 6: Lift Characteristics & the Drag Polar

D. Supersonic Nozzle Design using Theory of


Characteristics

8 Copyright © 2013 by ASME


PART 2 – THE NEW PROPOSED APPROACH

Linear Multistep Method Coefficients Zero Stability Order


θ-method, k=1  j  1,1       1    1   12  p  1
yn 1  yn  h  f n 1  1    f n   j  1   ,  Strongly stable   12  p  2
Implicit, k=2, free factor d      2  1  d    1, d d  1  p  3
 j  d ,1 ,1
yn  2  1 yn 1  dyn  d 1 p  4
 j   0 , 1 ,  2 
h   2 f n  2  1 f n 1  0 f n  Strongly stable for d  1
Adams-Moulton, k=2  j  0, 1,1      2      0,1
p3
yn  2  yn 1  h
12 5 f n  2  8 f n 1  f n   j  121 1,8,5 Strongly stable
 j  0,0, 1,1
Adams-Bashforth, k=3      3   2    0,0,1
 j  121 5, 16, 23,0 p3
yn1  yn  h
12  23 fn 16 fn1  5 fn2  Strongly stable

Milne’s Method, k=4  j  1,0,0,0,1      4  1    1, i


p4
yn 1  yn 3  h  2 f n  f n 1  2 f n  2 
4
3 j  4
0,2, 1,2,0 Weakly stable
3

Quade’s Method, k=4  j  191 19,8, 8,19      4  198  3     1


yn  4  8
19  yn  3  yn 1   yn   j  196 1, 4,0, 4,1   1,0.2105  0.9776i p6
6h
19  f n  4  4 f n 3  4 f n 1  f n  Weakly stable
Table 1: Checking Consistency and Zero-Stability of Linear Multistep Methods

PDE Numerical scheme Amplification factor, G r


explicit u n 1
j
 u  12 r u
n
j  n
j 1
u n
j 1  1  i  r sin  
r u  1 1  i  r sin   0, 
FTCS
1-D linear convection
implicit
u nj 1  u nj  12 n1
j 1
 u nj 11
u u
c 0
t
c0
x explicit 
u nj 1  u nj  r u nj  u nj 1  1  r  rei {0,1]
 r u    0, 
FTBS
implicit
u nj 1  u nj n1
j
 u nj 11 1 r  re i  1

1-D diffusion explicit 


u nj 1  u nj  r u nj 1  2u nj  u nj 1  1  4r sin 2  12   {0, 12 ]
u  2u
 2  r u  
1 1  4r sin 2  12    0, 
FTCS
u nj 1  u nj n1
 2u nj 1  u nj 11
t x implicit j 1

Table 2: Performing von-Neumann Stability Analysis of Finite Difference Equations

9 Copyright © 2013 by ASME


Derivatives ut ux utt utx u xx uttt uttx utxx u xxx
t x t 2
x 2
FTBS wave equation 1 c 0 c 0 0 c
2 2 6 6
t  t t t 2 t x
 0 0  c 0  0 c 0
2 t 2 2 4 4
t  t t t 2 t x
c 0 0 0 c c2 0 c 0 c 2
2 x 2 2 4 4
t 2  2 t 2 t 2
0 0 0 0 0 c 0 0
12 t 2 12 12
t 2  2 t 2 t 2
c 0 0 0 0 0 0 c c 2 0
3 xt 3 3
t 2 t  4ct  3x  t  4ct  3x 
c  4ct  3x  2 0 0 0 0 0 0 0 c c2
12 x 12 12
x x2
Sum of coefficients 1 c 0 0 c   1 0 0 0 c   1 2  1
2 6

Table 3: Comparison of Analytical Modified Equation [Ref. 15] with MATLAB generated table through u xxx term

10 Copyright © 2013 by ASME

View publication stats

You might also like