DOC PREVIEW
TAMU PETE 301 - 301.505.Lab6_Situ_E

This preview shows page 1-2 out of 6 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Lab Assignment Coversheet This sheet must be included with your work submission Required Academic Integrity Statement Texas A M University Policy Statement Academic Integrity Statement All syllabi shall contain a section that states the Aggie Honor Code and refers the student to the Honor Council Rules and Procedures on the web Aggie Honor Code An Aggie does not lie cheat or steal or tolerate those who do Upon accepting admission to Texas A M University a student immediately assumes a commitment to uphold the Honor Code to accept responsibility for learning and to follow the philosophy and rules of the Honor System Students will be required to state their commitment on examinations research papers and other academic work Ignorance of the rules does not exclude any member of the Texas A M University community from the requirements or the processes of the Honor System For additional information please visit www tamu edu aggiehonor On all course work assignments and examinations at Texas A M University the following Honor Pledge shall be preprinted and signed by the student On my honor as an Aggie I have neither given nor received unauthorized aid on this academic work Aggie Code of Honor An Aggie does not lie cheat or steal or tolerate those who do Required Academic Integrity Statement On my honor as an Aggie I have neither given nor received unauthorized aid on this academic work Evan Situ Print your name Evan Situ Your signature Coursework Copyright Statement Texas A M University Policy Statement The handouts used in this course are copyrighted By handouts this means all materials generated for this class which include but are not limited to syllabi quizzes exams lab problems in class materials review sheets and additional problem sets Because these materials are copyrighted you do not have the right to copy them unless you are expressly granted permission As commonly defined plagiarism consists of passing off as one s own the ideas words writings etc that belong to another In accordance with this definition you are committing plagiarism if you copy the work of another person and turn it in as your own even if you should have the permission of that person Plagiarism is one of the worst academic sins for the plagiarist destroys the trust among colleagues without which research cannot be safely communicated If you have any questions about plagiarism and or copying please consult the latest issue of the Texas A M University Student Rules under the section Scholastic Dishonesty Lab Assignment Grading Rubric This sheet must be included with your work submission Criteria Points Adherence to the SPE Style Guide Petroleum Engineering Handbook 10 Grammar Professionalism 5 Completeness of Literature Review 15 Completeness of Introduction 10 Completeness of Methodology 15 Completeness of Discussion 15 Completeness of Conclusions 10 Completeness of References 10 Completeness of Nomenclature 10 Final Grade 100 Numerical methods concepts that are used during the lab are Central Difference Approximation and the Richardson Extrapolation Figure 1 shows the implementation process of the Central Difference Approximation In that particular figure the equation to calculate the Central Difference Approximation of the first order derivative of f x is at the right corner of the f x versus x plot Results from the Central Difference Approximation are later used for the implementation of the Richardson Extrapolation Approximation of the first order derivative of f x Figure 2 displays the equation of the Richardson Extrapolation Approximation of the first order derivative of f x Fig 1 Implementation of the Central Difference Approximation Fig 2 Richardson Extrapolation Approximation Equation Introduction The purpose of this lab is to understand how two sophisticated numerical methods called Central Difference Approximation and the Richardson Extrapolation Approximation are implemented This is accomplished by approximating the first order derivative of f x using both numerical methods at 18 different step sizes Methodology Here is the code executed during the lab Option Explicit Sub Lab 06 Dim x As Double h As Double Error1 As Double Error2 As Double dfx h1 As Double Dim dfx h2 As Double i As Double Fx central As Double Fx rich As Double x ThisWorkbook Worksheets Data Cells 2 3 Central Difference For i 1 To 18 h ThisWorkbook Worksheets Data Cells 3 i 2 Fx central f x x h f x x h 2 h Error1 Abs Fx central d fx x With ThisWorkbook Worksheets Results Cells 6 i 2 h Cells 6 i 3 Fx central Cells 6 i 4 Error1 End With Next i Richardson Extrapolation For i 1 To 17 With ThisWorkbook Worksheets Results dfx h1 Cells 6 i 3 dfx h2 Cells 7 i 3 Fx rich 4 3 dfx h2 1 3 dfx h1 Error2 Abs Fx rich d fx x Cells 7 i 5 Fx rich Cells 7 i 6 Error2 End With Next i End Sub Function f x x As Double As Double f x Exp 0 5 x End Function Function d fx x As Double As Double d fx 0 5 Exp 0 5 x End Function First an executable Sub using a For loop is created to generate the Central Difference Approximation and the Richardson Extrapolation results for all values of h For the Central Order approximation h is reduced by a factor of two until the effect of round off error is present in the log log plot of absolute true error versus h As Double are used for functions variables arguments and constants to store real non integer numbers Next the value of x is read from a cell in the Data worksheet and the cell is labeled in the worksheet The same is done for the values of h Furthermore a VBA function is concocted to evaluate the function f x In addition the approximate value of f x is outputted to the Results worksheet and the column for that approximate value of f x is labeled Later a table of the absolute true error in f x as a function of h for the Central Difference Approximation is built The Richardson Extrapolation was later applied to these results to obtain a much more accurate approximation Then a table of the absolute true error in f x as a function of h for the Richardson Extrapolation is built With all the necessary data the absolute true error on the fully labeled log log plot versus h for both the Central Difference Approximation and the Richardson is plotted Afterwards the equations of the lines using Power trend lines in Excel is utilized to verify the order of truncation using only data points that are dominated by truncation error Discussion Fig 3 Different Step Sizes at 18 Iterations Fig 4 F x Fig 5 True Value of F x When X is 1


View Full Document

TAMU PETE 301 - 301.505.Lab6_Situ_E

Documents in this Course
Load more
Download 301.505.Lab6_Situ_E
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view 301.505.Lab6_Situ_E and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view 301.505.Lab6_Situ_E and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?