Sample Problems Numerical Differentiation
Sample Problems Numerical Differentiation
Sample Problems Numerical Differentiation
Numerical differentiation
Gauss-Seidel method:
Newton’s method for one and multiple nonlinear functions
y x x 0 .5
2
y 5 xy x
2
x 5 y
2 2
y 1 x
2
Solve this problem using the shooting method and the odesolvers available in MATLAB, e.g., ode45.
A biofilm with a thickness Lf (cm), grows on the surface of a solid (see Figure below). After traversing a
diffusion layer of thickness L (cm), a chemical compound A diffuses into the biofilm where it is subject to
an irreversible first order reaction that converts it to a product B. Steady-state mass balances can be
used to derive the following ordinary differential equations for compound A:
2
d ca
D 2
0 0 x L
dx
2
d ca
Df 2
kc a 0 L x L Lf
dx
where D=diffusion coefficient in the diffusion layer=0.8cm2/d, Df=the diffusion coefficient in the
biofilm=0.64cm2/d, and k=the first-order rate for the conversion of A to B=0.1/d. The following
boundary conditions hold:
ca ca 0 @x0
dc a
0 @ x L Lf
dx
Where ca0 =concentration of A in the bulk liquid= 100 mol/L. Use the finite-difference method to
compute the steady-state distribution of A from x=0 to x=L+Lf, where L=0.008cm and Lf=0.004cm.
Employ centered finite differences with Δx=0.001cm.
Diffusion Solid
Bulk liquid Biofilm
layer surface
L Lf
0 x
Numerical methods for PDEs.
Over a rectangular region of size 10”x12” using Δx=5” and Δy=6” with the following boundary
conditions:
1)
2)
3)
4)
Derive the equations governing the temperature distribution in the rod using the method of lines.
Assume Δx=0.2 and use a centered finite difference approximation to discretize the spatial domain.
The problem of transient radial heat flow in a circular rod in nondimensional form is described by:
̅ ̅ ̅ ̅
̅ ̅
̅
An initial condition:
̅ ̅
Derive the equations governing the nondimensional temperature distribution for this problem using
second-order accurate finite-difference analogues for the derivates with a Crank-Nicolson formulation.
Solve in COMSOL the steady-state distribution of concentration for the tank shown in the figure below.
The PDE governing this system is
( )
And the boundary conditions as shown. The numerical values for parameters D and k are 0.5 and 0.1
respectively.
Use Finite element analysis to solve the steady-state heat equation in 1D for a 15-cm rod with boundary
conditions of T(x=0)=75 and T(x=10)=150 and a uniform heat source of 15. Assume 5 nodes and 4
elements along the rod. Use the method of weighted residuals to solve your approximation function in
an optimal fashion. The analytical solution to this problem is as follows: T 7 .5 x 2 82 .5 x 75 .
2
d T
2
f ( x)
dx
Develop an expression that can be used to obtain the oxygen concentration profile at steady-state.
Develop an expression that determines the steady-state concentration profile of A in the fluid.