Problem

You've applied the finite element method to a nonlinear problem and must now iteratively find a solution.

Solution

Use Solver to find a solution to the resulting nonlinear equation or system of equations. See Chapter 9 for recipes showing how to use Solver.

Discussion

The finite element method is a very popular method for numerically solving differential equations. The method involves discretizing the problem domain and governing equations, resulting in an algebraic system of equations that must be solved to arrive at an approximate solution to the problem. In some cases, the problem is nonlinear, which results in a nonlinear equation, or system of equations, that must be solved. As discussed in Chapter 9, Excel's built-in Solver tool is very adept at finding solutions to such equations.

By way of example, consider a heat conduction problem presented by Kythe and Wei in their Introduction to Linear and Nonlinear Finite Element Analysis.[*] The governing partial differential equation, with boundary conditions, is as follows:

[*] Prem Kythe and Dongming Wei, An Introduction to Linear and Nonlinear Finite Element Analysis (Boston: Birkhauser, 2004). See pages 244 and 245 for a complete derivation using the Galerkin method .

This equation represents steady state heat conduction in a laterally insulated rod with constant temperature maintained at one end (x = 0) and with radiation heat transfer at the other end (x = L). k is the thermal conductivity of the rod material. s is the Stefan-Boltzman constant. images/U220A.jpg border=0> is the emissivity constant. Kythe and Wei apply the Galerkin method with linear shape functions to derive a solution for this problem. The resulting nonlinear equation to be solved is:

TL represents the unknown temperature at the end of the rod. All other parameters in this equation are given. The solution to this equation was actually assigned as a homework problem in a graduate course I took with Dr. Wei. I used Excel's Solver tool to find a solution to this problem. Figure 12-11 shows the spreadsheet I prepared.

Cells C3 through C10 contain all of the given data for this problem. Cell C11 contains the unknown temperature at the end of the rod that must be found iteratively. Cell C12 contains the righthand side of the nonlinear equation shown earlier. In Figure 12-11, cell C12 is selected so that you can see the cell formula in Excel's formula bar. The formula is `=-(C9*C10)/C6*(C11^4 - C8^4)*C5+C7-C11`.

Figure 12-11. Solving for TL using Solver

Figure 12-11 also shows the Solver window overlaid on the spreadsheet. The Solver model for this problem is relatively simple. Basically, you want to set the value of cell C12the one containing the nonlinear equationto 0 by changing the value in cell C11, which contains the temperature at the end of the rod. Setting up this model and pressing the Solve button in Solver yields the solution shown in Figure 12-11. That is, the temperature at the end of the rod is approximately 373.09 K.

See Also

Some approaches to formulating finite element solutions, for example the *Rayleigh-Ritz* approach, result in a minimization problem to find an approximate solution. In these cases, once the minimization problem has been formulated, you can use Excel's Solver tool. See Chapter 9 for more information on using Solver.

Solutions to many problems formulated using the finite element approach (particularly linear ones) result in an algebraic system of equations that must be solved. Here again, you can use techniques discussed in Chapter 9 to solve these systems.

Some finite element solution formulations require you to solve a system of ordinary differential equations in order to find an approximate solution to the original partial differential equation. Such systems can be solved in Excel. See Recipe 11.3 for an example.

Using Excel

- Introduction
- Navigating the Interface
- Entering Data
- Setting Cell Data Types
- Selecting More Than a Single Cell
- Entering Formulas
- Exploring the R1C1 Cell Reference Style
- Referring to More Than a Single Cell
- Understanding Operator Precedence
- Using Exponents in Formulas
- Exploring Functions
- Formatting Your Spreadsheets
- Defining Custom Format Styles
- Leveraging Copy, Cut, Paste, and Paste Special
- Using Cell Names (Like Programming Variables)
- Validating Data
- Taking Advantage of Macros
- Adding Comments and Equation Notes
- Getting Help

Getting Acquainted with Visual Basic for Applications

- Introduction
- Navigating the VBA Editor
- Writing Functions and Subroutines
- Working with Data Types
- Defining Variables
- Defining Constants
- Using Arrays
- Commenting Code
- Spanning Long Statements over Multiple Lines
- Using Conditional Statements
- Using Loops
- Debugging VBA Code
- Exploring VBAs Built-in Functions
- Exploring Excel Objects
- Creating Your Own Objects in VBA
- VBA Help

Collecting and Cleaning Up Data

- Introduction
- Importing Data from Text Files
- Importing Data from Delimited Text Files
- Importing Data Using Drag-and-Drop
- Importing Data from Access Databases
- Importing Data from Web Pages
- Parsing Data
- Removing Weird Characters from Imported Text
- Converting Units
- Sorting Data
- Filtering Data
- Looking Up Values in Tables
- Retrieving Data from XML Files

Charting

- Introduction
- Creating Simple Charts
- Exploring Chart Styles
- Formatting Charts
- Customizing Chart Axes
- Setting Log or Semilog Scales
- Using Multiple Axes
- Changing the Type of an Existing Chart
- Combining Chart Types
- Building 3D Surface Plots
- Preparing Contour Plots
- Annotating Charts
- Saving Custom Chart Types
- Copying Charts to Word
- Recipe 4-14. Displaying Error Bars

Statistical Analysis

- Introduction
- Computing Summary Statistics
- Plotting Frequency Distributions
- Calculating Confidence Intervals
- Correlating Data
- Ranking and Percentiles
- Performing Statistical Tests
- Conducting ANOVA
- Generating Random Numbers
- Sampling Data

Time Series Analysis

- Introduction
- Plotting Time Series Data
- Adding Trendlines
- Computing Moving Averages
- Smoothing Data Using Weighted Averages
- Centering Data
- Detrending a Time Series
- Estimating Seasonal Indices
- Deseasonalization of a Time Series
- Forecasting
- Applying Discrete Fourier Transforms

Mathematical Functions

- Introduction
- Using Summation Functions
- Delving into Division
- Mastering Multiplication
- Exploring Exponential and Logarithmic Functions
- Using Trigonometry Functions
- Seeing Signs
- Getting to the Root of Things
- Rounding and Truncating Numbers
- Converting Between Number Systems
- Manipulating Matrices
- Building Support for Vectors
- Using Spreadsheet Functions in VBA Code
- Dealing with Complex Numbers

Curve Fitting and Regression

- Introduction
- Performing Linear Curve Fitting Using Excel Charts
- Constructing Your Own Linear Fit Using Spreadsheet Functions
- Using a Single Spreadsheet Function for Linear Curve Fitting
- Performing Multiple Linear Regression
- Generating Nonlinear Curve Fits Using Excel Charts
- Fitting Nonlinear Curves Using Solver
- Assessing Goodness of Fit
- Computing Confidence Intervals

Solving Equations

- Introduction
- Finding Roots Graphically
- Solving Nonlinear Equations Iteratively
- Automating Tedious Problems with VBA
- Solving Linear Systems
- Tackling Nonlinear Systems of Equations
- Using Classical Methods for Solving Equations

Numerical Integration and Differentiation

- Introduction
- Integrating a Definite Integral
- Implementing the Trapezoidal Rule in VBA
- Computing the Center of an Area Using Numerical Integration
- Calculating the Second Moment of an Area
- Dealing with Double Integrals
- Numerical Differentiation

Solving Ordinary Differential Equations

- Introduction
- Solving First-Order Initial Value Problems
- Applying the Runge-Kutta Method to Second-Order Initial Value Problems
- Tackling Coupled Equations
- Shooting Boundary Value Problems

Solving Partial Differential Equations

- Introduction
- Leveraging Excel to Directly Solve Finite Difference Equations
- Recruiting Solver to Iteratively Solve Finite Difference Equations
- Solving Initial Value Problems
- Using Excel to Help Solve Problems Formulated Using the Finite Element Method

Performing Optimization Analyses in Excel

- Introduction
- Using Excel for Traditional Linear Programming
- Exploring Resource Allocation Optimization Problems
- Getting More Realistic Results with Integer Constraints
- Tackling Troublesome Problems
- Optimizing Engineering Design Problems
- Understanding Solver Reports
- Programming a Genetic Algorithm for Optimization

Introduction to Financial Calculations

- Introduction
- Computing Present Value
- Calculating Future Value
- Figuring Out Required Rate of Return
- Doubling Your Money
- Determining Monthly Payments
- Considering Cash Flow Alternatives
- Achieving a Certain Future Value
- Assessing Net Present Worth
- Estimating Rate of Return
- Solving Inverse Problems
- Figuring a Break-Even Point

Index

Excel Scientific and Engineering Cookbook (Cookbooks (OReilly))

ISBN: 0596008791

EAN: 2147483647

EAN: 2147483647

Year: N/A

Pages: 206

Pages: 206

Authors: David M Bourg

- Challenging the Unpredictable: Changeable Order Management Systems
- The Second Wave ERP Market: An Australian Viewpoint
- Intrinsic and Contextual Data Quality: The Effect of Media and Personal Involvement
- Relevance and Micro-Relevance for the Professional as Determinants of IT-Diffusion and IT-Use in Healthcare
- Development of Interactive Web Sites to Enhance Police/Community Relations

Flylib.com © 2008-2020.

If you may any questions please contact us: flylib@qtcs.net

If you may any questions please contact us: flylib@qtcs.net