Title: Introduction to scientific programming in Earth's Sciences
1Introduction to scientific programming in Earth's
Sciences
J.W. Goethe University. Frankfurt
- Dr Guillaume RICHARD
- Institüt für Geowissenchaften 1.232
- richard_at_geophysik.uni-frankfurt.de
2Overview
- 12 x 45min Lectures / 45min training classes
(praktical) -
- Basics (Hardware, OS, editor, etc.. )
- Basics 2 (Linux commands, Compile,Visualize )
- Languages Fortran (FORmula TRANslation)
- Languages Fortran (2)
- Languages Fortran (3)
- Languages Fortran (4)
- Languages C/C
- Languages Matlab (1)
- Languages Matlab (2)
- Languages Introduction to Maple
- Introduction to Finite difference method
- A study case Solving the heat equation in 1D
3L. 12 A study Case The heat equation in 1
Dimension
4The Problem
A hot diapir emplaced at the base of the crust.
How long does it take for the temperature to come
back to steady state ?
Schematic illustration showing a possible model
to explain the development of Hall-Star Chrome
type orenbodies in the middle-upper crust.
5And now ?
1. Problem. Clearly and unambiguously identify
the problem to be solved.
Remember lesson number 1
1D Heat diffusion equation with a constant
diffusivity K
6The Model
- Approximations
- Settings
- Boundary conditions
- Initial conditions
1-Dimensional model Constant diffusivity K
Solve only for the crust fixed
Temperature Adiabatic profile
7The Method
- Use of
- Fortran90 language
- Finite difference method
- Explicite in time numerical scheme
8Implementation
- Define a grid
- What are the necessary variables to define ?
- Lets write this code !
9Assessment
Analytical solution Using similarity approach it
is possible to show (Turcotte Schubert,
Geodynamics, 2002, p153-157) that a analytical
solution to the diffusion equation is given by
(for specific BCs !)
10Assessment
Analytical solution In our case fixed Temperature
Boundary conditions (BCs). We can find a solution
using variables separation
Where the constants Cs can be calculated
11Visualisation
Matlab Load the data into Matlab and plot it (T
as function of x for different time.) Tecplot Load
the data into Tecplot and plot it