../_images/book_cover.jpg

This notebook contains an excerpt from the Python Programming and Numerical Methods - A Guide for Engineers and Scientists, the content is also available at Berkeley Python Numerical Methods.

The copyright of the book belongs to Elsevier. We also have this interactive book online for a better learning experience. The code is released under the MIT license. If you find this content useful, please consider supporting the work on Elsevier or Amazon!

< 23.5 Python ODE Solvers | Contents | CHAPTER 24. Fourier Transforms >

Summary

  1. Boundary value problems are a specific kind of ODE solving problem with boundary conditions specified at the start and end of the interval.

  2. The shooting method can transform the boundary value problems to initial value problems and use the root-finding method to solve it.

  3. The finite difference method uses the finite difference scheme to approximate the derivatives and turns the problem into a set of equations to solve.

  4. The accuracy and stability of the boundary value problems have both similarity and difference to the initial value problems.

Problems

  1. Describe the difference between boundary value problems and the initial value problems in ODE.

  2. Try to describe the intuition behind the shooting method and how it links to the initial value problems.

  3. What is the finite difference method for boundary value problems? How to solve it?

  4. Solve the following boundary value problems with y(0)=0 and y(π/2)=1 $y+(10.2x)y2=0$

  5. Solve the following ODE with y(0)=0 and y(π)=0 $y+siny+1=0$

  6. Given the ODE with the boundary conditions y(0)=0 and y(12)=0, $y+0.5x26x=0whatsthevalueofy’(0)$?

  7. Solve the following ODE with boundary conditions y(1)=0, y(1)=0 and y(2)=1 $y+1xy1x2y0.1(y)3=0$

  8. A flexible cable is suspended between two points as shown in the following figure. The density of the cable is uniform. The shape of the cable y(x) is governed by the differential equation: $d2yd2x=C1+(dydx)2whereCisaconstantthatequaltotheratiofotheweightperunitlengthofthecabletothemagnitudeofthehorizontalcomponentoftensioninthecableatitslowestpoint.Thecablehangsbetweentwopointsspecifiedbyy(0) = 8mandy(10) = 10 m,andC=0.039m^{-1}.Canyoudetermineandplottheshapeofthecablebetweenx = 0andx = 10$? Problem 8

  9. Fins are used in many applications to increase the heat transfer from surfaces. Usually the design of cooling pin fins is encountered in many applications, such as the pin fin used as a heat sink for cooling an object. We can model the temperature distribution in a pin fin as shown in the following figure, where the length of the fin is L, and the start and the end of the fin is x=0 as well as x=L. The temperature at the two ends are T0 and TL. Ts is the temperature of the surrounding environment. If we consider both convection and radiation, the steady-state temperature distribution of the pin fin T(x) between x=0 and x=L can be modeled with the following equation:

d2Tdx2α1(TTs)α2(T4T4)=0

with the boundary conditions: T(0)=T0 and T(L)=TL, and α1 and α2 are coefficients. And they are defined as α1=hcPkAc and α2=ϵσSBPkAc, where hc is the convective heat transfer coefficient, P is the perimeter bounding the cross section of the fin, ϵ is the radiative emissivity of the surface of the fin, k is the thermal conductivity of the fin material, Ac is the cross-sectional area of the fin, and σSB=5.67×108W/(m2K2) is the Stefan-Boltzmann constant.

Determine the temperature distribution if L=0.2 m, T(0)=475K, T(0.1)=290K, and Ts=290K. Use the following values for the parameters hc=40W/m2/K, P=0.015 m, ϵ=0.4, k=240W/m/K, and Ac=1.55×105m2

Pin Fin system
  1. The simply supported beam carries a uniform load of intensity q as shown in the following figure.

Problem 10

The deflection of the beam, y, is governed by the following ODE:

EId2ydx2=12ω0(Lxx2)[1+(dydx2)]32

where EI is the flexural rigidity.

If L=5 m, and the two boundary conditions are y(0)=0 and y(L)=0, EI=1.8×107Nm2, and ω0=15×103N/m, determine and plot the deflection of the beam as a function of x.

< 23.5 Python ODE Solvers | Contents | CHAPTER 24. Fourier Transforms >