0% found this document useful (0 votes)
39 views25 pages

GeoEngineering Math Essentials

This document provides an overview of various math fundamentals relevant to geoengineering, including logarithms, linear systems of equations, derivatives using the product rule and chain rule, integrals, differential equations, vectors, tensors, gradients, and divergence. It includes examples and explanations of each concept.

Uploaded by

A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views25 pages

GeoEngineering Math Essentials

This document provides an overview of various math fundamentals relevant to geoengineering, including logarithms, linear systems of equations, derivatives using the product rule and chain rule, integrals, differential equations, vectors, tensors, gradients, and divergence. It includes examples and explanations of each concept.

Uploaded by

A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

IGE Math fundamentals for GeoEngineering

Florian Doster
Rink van Dijke
Karl Stephen

1
Philosophy of the course
• In GeoEngineering we want to exploit physical and chemical
processes
• The language of physics and chemistry is math.
• Some of you have a more numerate background. Some less.
• In the exam of your MSc you do not have to do more than basic
algebraic reformulations.
• However: Math is a very efficient way of expressing physical and
chemical processes.
• We therefore will quickly go through some basic concepts of linear
algebra and calculus and highlight the intuitive implications.
• Hopefully, this will empower you to benefit from expressing
processes in equations.

2
In this lecture we briefly cover
• Logarithms
• Linear systems of equations
• Derivatives
– Chain rule
– Product rule
– Partial derivatives
• Integrals
• Differential equations
• Vectors
• Tensors
• Gradient
• Divergence

3
Linear systems of equations
What are 𝑥1 and 𝑥2 for
𝑥1 + 𝑥2 = 1?
What are 𝑥1 and 𝑥2 for
𝑥1 + 𝑥2 = 1,
𝑥1 − 𝑥2 = 0?
We need as many equations as variables.
How did you solve it?
There are many ways to solve them. Efficient ways of doing that
is well established but still active research.
Why is that?
Solving linear systems is all that computers can do.
4
Basic Trigonometry and

(x,y) or (r,)
y Co-ordinates:

x = r cos 
r a
y = r sin 
Vector, r (r, ):

0 b x
r = x 2 + y2 (Pythagoras)

−1 y
 = tan
x
Applications: co-ordinate change
• Flow into a well
– pressure (and saturation)
• Radial coordinates:
– E.g. velocity same at equal
distance r from well
r

 r
Pressure at (x,y,z)
or (r,θ)
Logarithm
• It is the inverse of exponentiation.
• That means the logarithm of a given number x is the exponent to which another
fixed number, the base b, must be raised, to produce that number x.
• log 𝑏 𝑥 = 𝑦 ⇔ 𝑏 𝑦 = 𝑥
Example: b = 10, x = 100 ⇒ 𝑦 = 2 because 102 = 100
• Why do we care?
Logarithms were introduced by John Napier in 1614 as a means of simplifying calculations
• log 𝑏 𝑥𝑦 = log 𝑏 𝑥 + log 𝑏 𝑦
– Because: log 𝑏 (𝑥) = 𝑠, log 𝑏 (𝑦) = t ⇔ 𝑏 𝑠 = 𝑥, 𝑏𝑡 = 𝑦,⇒ x𝑦 = 𝑏 𝑠 𝑏𝑡 = 𝑏 𝑠+𝑡 ⇒ log 𝑏 𝑥𝑦 = 𝑠 + 𝑡 =
log 𝑏 𝑥 + log 𝑏 𝑦
– Example: log10 100 ⋅ 1000 = log10 100 + log10 1000 = 2 + 3 = 5
• log 𝑏 𝑥 𝑦 = 𝑦 log 𝑥
– Example: 𝑦 = 2, log 𝑏 𝑥 2 = log 𝑏 𝑥𝑥 = log 𝑏 𝑥 + log 𝑏 𝑥 = 2 log 𝑏 𝑥
• log 𝑏 𝑥/𝑦 = log 𝑏 𝑥 − log 𝑏 𝑦
– Reason and example see previous points

7
Logarithm to visualize data

5000
behaviour for small y
y=exp(2x) “invisible”,
4000 y=10x
large y “off the scale”

3000
y

2000

1000

0
-4 -2 0 2 4 6
x
Converting data – log 10

100000
4 10000 y=exp(2x)
1000 y=10x

2 100
10
y

log10 𝑦 0 1
0.1
-2 0.01
0.001
-4 0.0001
-4 -2 0 2 4 6 e.g. 𝐾(𝜙)
x
𝑑𝑓 𝑑𝑓
Derivatives 𝑓 ′ 𝑥 = , 𝑓ሶ 𝑡 =
𝑑𝑥 𝑑𝑡
The derivative of a function with respect to a quantity tells how this function changes with
respect to this quantity.
Do you know examples?
𝑑𝑥
• Velocity of a car is how the position of the car changes with time: 𝑣 = = 𝑥(𝑡)

𝑑𝑡
Position 𝑥 at 𝑡 = 0 𝑠: 𝑥 𝑡 = 0 𝑠 = 0 𝑚, position 𝑥 at 𝑡 = 10 𝑠: 𝑥 𝑡 = 10 𝑠 = 100 𝑚
• What is the average velocity?
• What is the velocity in 𝑘𝑚/ℎ𝑟 ?
𝑑ℎ
• Slope of a road is how the elevation of the road changes with distance: 𝑚 = 𝑑𝑥 = ℎ′(𝑥)
Height above sea-level ℎ at home 𝑥 = 0 𝑘𝑚 in your beach house: ℎ 𝑥 = 0 𝑘𝑚 = 0 𝑚. Height above sea-level in
town at 𝑥 = 1 𝑘𝑚 away is ℎ 𝑥 = 1 𝑘𝑚 = 50 𝑚.
• What is the average slope?
• What is the slope in percent?
• Note:
– Units and unit conversion!
– For 𝑓 𝑥 = 𝑎 𝑥 𝑏 + 𝑐 the derivative is 𝑓 ′ 𝑥 = 𝑎 𝑏 𝑥 𝑏−1 . What is the derivative for 𝑥 𝑡 = 𝑣 𝑡 + 𝑥0 ?
– For 𝑓 𝑥 = 𝐴 exp(𝐵 𝑥) the derivative is 𝑓 ′ 𝑥 = 𝐴 𝐵 exp 𝐵 𝑥 = 𝐵 𝑓(𝑥)

10
𝑑𝑓 𝑔 𝑥 𝑑𝑓 𝑑𝑔
Chain rule =
𝑑𝑥 𝑑𝑔 𝑑𝑥
• We are drilling a well. The temperature depends on the
depth 𝑇 𝑧 = 𝑇0 + 𝐺 𝑧 with surface temperature 𝑇 = 25∘ 𝐶
30∘ 𝐶
and a geothermal gradient 𝐺 =
𝑘𝑚
• The depth of the drill bit changes with time according to
the drilling velocity 𝑧 𝑡 = 𝑣 𝑡 with the velocity 𝑣 = 10 𝑚/ℎ
• The chain rule allows us to calculate how the
temperature changes with time. Can you do it?
• You can insert 𝑧 𝑡 into 𝑇(𝑧) to obtain 𝑇 𝑡 and test the
chain rule.

11
Excursion:
The product rule 𝒅 𝒇 𝒕 𝒈 𝒕
𝒅𝒕
=𝒈 𝒕
𝒅𝒇
𝒅𝒕
+ 𝒇 𝒕
𝒅𝒈
𝒅𝒕
𝐵𝐵𝐿
• A well in Texas produces 𝑅 = 1000
30 𝑑
𝑈𝑆𝐷
• The oil price is currently 𝑃 = 50 .
𝐵𝐵𝐿
𝑈𝑆𝐷
• Running the well costs 𝐶 = 10000 .
30 𝑑
𝑈𝑆𝐷
𝑑𝑃
• The market analysts expect the price to rise 𝑃 =
ሶ =1 𝐵𝐵𝐿
.
𝑑𝑡 30 𝑑
• The engineering team expects the production rate to decline
𝐵𝐵𝐿
𝑑𝑅

𝑅= = −20 30 𝑑
.
𝑑𝑡 30 𝑑
• How will the profit 𝐺 𝑡 = 𝑃(𝑡) × 𝑅(𝑡) − 𝐶 change?
Product rule continued
• Profit 𝐺 𝑡 = 𝑃(𝑡) × 𝑅(𝑡) − 𝐶
𝑈𝑆𝐷 𝐵𝐵𝐿 𝑈𝑆𝐷 𝑈𝑆𝐷
𝐺 = 50 × 1000 − 10000 = 40 000
𝐵𝐵𝐿 30𝑑 30𝑑 30 𝑑
• Profit change with time:
𝑑𝐺 𝑑

𝐺= = 𝑃 × 𝑅 − 𝐶ሶ = 𝑃 × 𝑅ሶ + 𝑅 × 𝑃ሶ − 0
𝑑𝑡 𝑑𝑡
𝐵𝐵𝐿 𝑈𝑆𝐷
𝑈𝑆𝐷 𝐵𝐵𝐿

𝐺 = 50 × −20 30 𝑑
+ 1000 ×1 𝐵𝐵𝐿
𝐵𝐵𝐿 30 𝑑 30 𝑑 30 𝑑
𝑈𝑆𝐷
𝐺ሶ = 0 30 𝑑
30 𝑑
𝜕𝑓 𝑥,𝑡 𝜕𝑓 𝑥,𝑡
Partial derivatives ,
𝜕𝑡 𝜕𝑥
• If functions have more than one argument, we replace the
derivative with the partial derivative.
• An example for function with more than one argument is the
pressure distribution in a reservoir with respect to space and
time 𝑝(𝑥, 𝑡).
• When taking the partial derivative, we keep the other
arguments constant.
𝜕𝑝(𝑥,𝑡)
• By taking the partial derivative with respect to time we
𝜕𝑡
ask: How does the pressure at a position 𝑥 change with time.
𝜕𝑝(𝑥,𝑡)
• By taking the partial derivative with respect to space we
𝜕𝑥
ask: How does the pressure at a time 𝑡 change in direction 𝑥.

14
𝑡
Integrals 𝐹 𝑡 = ‫𝑓 𝑡׬‬ 𝜏 𝑑𝜏
0
• Integrals are the opposite of derivatives. The
derivative tells us how things change. The
integral how things accumulate.
• Intuitively the integral is the area under a
function.
• To determine the integral, we need a starting
point.
• Example ‘slope of road’: The integral of the
slope over the distance gives the
accumulated height by climbing the slope of
the road.
• Example ‘velocity of the car’: The integral of
the velocity over time gives the accumulated
distance by traveling with the velocity.

15
(partial) Differential equations
• Differential equations are equations for how things change rather
than how things are.
• It might be easier to understand the speed rather than the detailed
position.
• Example:
– We observe a train travelling at constant speed: 𝑣 = 𝑣0 .
𝑑𝑥
– The speed 𝑣 is how the position 𝑥 changes with time 𝑣 = .
𝑑𝑡
𝑑𝑥
– Hence, we can formulate a differential equation for the position: = 𝑣0
𝑑𝑡
– If we can solve this equation, we know where the train will be when.
– To do so, we need an initial condition, i.e. a position of the train at a
certain time 𝑥 𝑡0 = 𝑥0

16
(partial) Differential equations
• From the previous example with the beach house:
– The solution to ℎ′ 𝑥 = 𝑚 is ℎ 𝑥 = 𝑚 𝑥 + ℎ0 .
– If I know parameter 𝑚, what condition do I need to determine the value of ℎ(𝑥)
uniquely?
– For constraints at certain positions in space we speak of boundary conditions
instead of initial conditions.
• Exponential differential equation
– A very frequently occurring form of a differential equation is that the change of a
property depends on how much of the property is there: 𝑓ሶ 𝑡 = 𝑎 𝑓(𝑡)
– Do you know any examples?
– The solution to this equation is 𝑓 𝑡 = 𝑓0 exp(𝑎 𝑡) . If I know parameter a, what initial
condition do I need to determine the value of 𝑓(𝑡) uniquely?
• Partial differential equations translate this concept when functions depend
on more than one variable.

17
Vectors
• Vectors 𝑣Ԧ are a way of expressing
directions
• Coordinates are directions to a point
from the origin. They change if we 1 1
1
change the reference. 2
1
• Is pressure a vector? 1 1
−1
• Is velocity a vector?
• Is gravity acceleration a vector? 1 11
• One uses bold font 𝒗 or an arrow 𝑣Ԧ to 1
indicate vectors.
𝑣1
• In 2D vectors have 2 entries 𝑣Ԧ = 𝑣
2

18
(2nd order) Tensors
• Tensors 𝑻 are objects that manipulate algebraic objects
such as vectors.
• Intuitively tensors stretch and rotate vectors.
• One uses bold font 𝑻 to indicate tensors.
• A convenient form of expressing tensors is in form of
matrices.
• A tensor 𝑻 operates on a vector 𝑣Ԧ through matrix vector
multiplication and produces a new vector 𝑢 = 𝑻 ⋅ 𝑣. Ԧ
• The entry 𝑢𝑖 in row 𝑖 of vector 𝑢 is calculated by 𝑢𝑖 =
σ𝑗 𝑇𝑖𝑗 𝑣𝑗 where 𝑇𝑖𝑗 is the element in row 𝑖 and column 𝑗 of
the matrix 𝑻.

𝑇11 𝑇12 𝑣1
• In 2D: 𝑻 = , 𝑣Ԧ = 𝑣 . Then
𝑇21 𝑇22 2
𝑢1 𝑇 𝑇12 𝑣1 𝑇11 𝑣1 + 𝑇12 𝑣2
• 𝑢 = 𝑢 = 11 ⋅ 𝑣 =
2 𝑇21 𝑇22 2 𝑇21 𝑣1 + 𝑇22 𝑣2
2 0 1 0 0 1
• What do the tensors 𝑻𝒂 = , 𝑻𝒃 = , 𝑻𝒄 = do?
0 2 0 −1 1 0

19
Vector calculus: Gradient ∇𝑓
• The direction in which the field 𝑓 changes the most.
• It is the generalization of the spatial derivative to 2D
and 3D for scalar (non-vector) fields such as
pressures, densities
𝜕𝑓
𝜕𝑓 𝜕𝑥
𝜕𝑥 𝜕𝑓
• In 2D: ∇𝑓 = 𝜕𝑓 , in 3D: ∇𝑓 = 𝜕𝑦
𝜕𝑦 𝜕𝑓
𝜕𝑧
20
Examples for gradients

𝑥 𝑦 𝑥 𝑦
𝑝 𝑥, 𝑦 = 2 − MPa 𝑝 𝑥, 𝑦 = 2 − MPa 𝑝 𝑥, 𝑦 = 2 − − MPa
km km km km

−1 MPa 0 MPa −1 MPa


∇𝑝 𝑥, 𝑦 = ∇𝑝 𝑥, 𝑦 = ∇𝑝 𝑥, 𝑦 =
0 km −1 km −1 km
21
Vector calculus: Divergence ∇ ⋅ 𝑣Ԧ
• The amount of which a vector field changes.
• It is a generalization of the spatial derivative to 2D
and 3D for vector fields such as fluxes and velocities.
𝜕𝑣𝑥 𝜕𝑣𝑦 𝜕𝑣𝑥 𝜕𝑣𝑦 𝜕𝑣𝑧
• In 2D: ∇ ⋅ 𝑣Ԧ = + , in 3D: ∇ ⋅ 𝑣Ԧ = + +
𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑧
• Notation
– ∇ Nabla symbol or Nabla operator
– ∇𝑓 gradient of scalar field f: grad 𝑓 = ∇𝑓
– ∇ ⋅ 𝑣Ԧ divergence of vector field 𝑣:
Ԧ div 𝑣Ԧ = ∇ ⋅ 𝑣Ԧ

22
Examples for divergence

1 m 𝑥 m 0 m
𝑣Ԧ 𝑥, 𝑦 = 𝑦
1 s 𝑣Ԧ 𝑥, 𝑦 = m 𝑣Ԧ 𝑥, 𝑦 =
1 s m s

1 1 1
∇ ⋅ 𝑣Ԧ 𝑥, 𝑦 = 0 + 0 ∇ ⋅ 𝑣Ԧ 𝑥, 𝑦 = 1 + 0 ∇ ⋅ 𝑣Ԧ 𝑥, 𝑦 = 0 + 1
s s s
23
Statistics and Geostatistics
• Averages


n 1/ n
ki N  n

k ar  i k ha  k g    k i 
1  i 

n
N
• Measures of correlation/difference
i
ki

i
n
( y ( z ) − y ( z + h )) 2

 ( h) 
2 N ( h)
Linear algebra and calculus now hopefully
look much more like …

25

You might also like