IN229/Simulation: Lecture 6 Knut–Andreas Lie Department of Informatics University of Oslo

advertisement
'
$
IN229/Simulation: Lecture 6
Knut–Andreas Lie
Department of Informatics
University of Oslo
April 2003
&
%
&
-Q
x
• Interesting question in geology and geophysics – and for those nations
exploring oil resources...
• Knowing the temperature at the earth’s surface and the heat flow from the
mantle, what is the temperature distribution through the continental crust?
x=b
x=0
Ts
Steady 1D heat conduction
'
$
IN229/Simulation: Lecture 6
1
%
&
+ boundary conditions
In multidimensions: −∆u = f , which is the Poisson equation, an example of
an elliptic equation.
- heat conduction
- strength analysis of beams
- deflection of electric cables
- fluid flow in channels
• Very simple equation, but it has applications to
Here u is the temperature.
−u00(x) = f (x)
• Our prototype differential equation:
Physical and mathematical model
'
$
IN229/Simulation: Lecture 6
2
%
'
$
IN229/Simulation: Lecture 6
Heat conduction in the continental crust
Ts
x=0
x
x=b
-Q
Physical assumptions:
• Crust of infinite area
• Steady state heat flow
• Heat generated by radioactive elements
Physical quantities:
• u(x) : temperature
• q(x) : heat flux (velocity of heat)
• s(x) : heat release per unit time and mass
&
3
%
'
$
IN229/Simulation: Lecture 6
Derivation of the model
x=0
inflow
s(x)=R exp(-x/L)
x
outflow
x=b
Physical principles:
• First law of thermodynamics:
net outflow of heat = total generated heat
• Fourier’s law: heat flows from hot to cold regions
(i.e. heat velocity is poportional to changes in
temperature)
q(x) = −λu0(x)
• Heat generation due to radioactive decay:
s(x) = R exp(−x/L)
&
4
%
'
$
IN229/Simulation: Lecture 6
Derivation of the model...
x=0
q(x-h/2)
h
s(x)
x
q(x+h/2)
x=b
From the first law of thermodynamics:
q(x + h/2) − q(x − h/2)
= s(x)
h
Using a Taylor expansion:
q(x + h/2) − q(x − h/2)
1
= q 0(x) + q 000(x)h2 + . . .
h
24
Hence, as h → 0 we have
q 0(x) = s(x)
&
5
%
'
$
IN229/Simulation: Lecture 6
Derivation of the model...
x=0
Ts
x
x=b
-Q
Combining the 1st law of thermodynamics (q 0 = s) with
Fourier’s law (q = −λu), we get
du
d
−
λ
= s(x)
dx
dx
Boundary conditions:
• u(0) = Ts (at the surface of the earth)
• q(b) = −Q (at the bottom of the crust)
&
6
%
&
Using scaling we can reduce the six physical parameters λ, R, L, b, Ts, Q to
only two!
Suppose that we want to investigate the influence of the different parameters.
Assume (modestly) three values of each parameter:
−→ Number of possible combinations: 36 = 729.
d du −
λ
= Re−x/L, u(0) = Ts, λ(b)u0(b) = −Q
dx dx
Observe that u depends upon seven parameters: u = u(x; λ, R, L, b, Ts, Q)!
Mathematical model
'
$
IN229/Simulation: Lecture 6
7
%
&
u = Ts + Qbū/λ,
γ = bR/Q
−u00(x) = f (x), x ∈ (0, 1),
u(0) = 0,
u0(1) = 1
dū
(1) = 1
dx̄
s(bx̄) = Rs̄(x̄)
Dropping the bars, we get an equation on the form
β = b/L,
d2ū
− 2 = γe−x̄/β ,
ū = 0,
dx̄
where we have two dimensionless quantities
This gives
x = x̄b,
We introduce dimensionless quantities (and assume that λ is constant):
Scaling
'
$
IN229/Simulation: Lecture 6
8
%
'
$
IN229/Simulation: Lecture 6
Discretization of our equation
• Introduce a grid xi = (i − 1)h and compute the
unknown at grid points ui = u(xi)
u2
u1
u3
u5
u4
x
x=0
x=1
• Differential equation fulfilled at each node
−u00(xi) = f (xi)
• Approximate by standard finite differences
ui+1 − 2ui + ui−1 = −h2fi,
i = 1, . . . , n − 1
As opposed to the ODEs we have seen earlier, this is a
linear system of unknowns
&
9
%
'
$
IN229/Simulation: Lecture 6
Discretizing boundary conditions
• u(0) = 0 simply becomes u1 = 0
• u0(1) = 1 can be approximated as
un+1 − un−1
=1
2h
• Problem: un+1 is not in the mesh!
• Solution: Use the discrete differential equation for
i = n:
un−1 − 2un + ui+1 = −h2fn
and the discrete boundary condition to eliminate un+1
• The result is
2un−1 − 2un = −2h − h2fn
&
10
%
&
u1
u1 −2u2 +u3
u2 −2u3 +u4
... ... ...
... ... ...
... ...
...
...
un−2 −2un−1 +un
2un−1 −2un
...
...
=0
= −h2f2
= −h2f3
...
...
...
...
= −h2fn−1
= −2h − h2fn
Linear system of equations
'
$
IN229/Simulation: Lecture 6
11
%
Download