SlideShare a Scribd company logo
Beyond and side by side with
numerics -I
Riccardo Rigon
Dance,HenryMatisse,HotelBironearly1909
Wednesday, April 24, 13
They started from wrong
assumptions, and applying a
perfect logic, they arrived
rigorously to wrong results.
My father in law
Wednesday, April 24, 13
3
I am here to tell you about
What are the central topics of the work of the modellers
•Find the right equations
Introduzione
R. Rigon
•Find the right numerical methods
Wednesday, April 24, 13
4
Are Richards’ equation right ?
Well, they represents mass conservation: and this is a basic principle
However
What happens when soil turns to saturation ?
What happens when soil freezes ?
What happens when warms, goofers or roots escavate the soil ?
Richards ++
R. Rigon
Wednesday, April 24, 13
5
What I mean with Richards ++
First, I would say, it means that it would be better to call it, for
instance: Richards-Mualem-vanGenuchten equation, since it is:
Se = [1 + ( ⇥)m
)]
n
Se :=
w r
⇥s r
C(⇥)
⇤⇥
⇤t
= ⇥ · K( w) ⇥ (z + ⇥)
⇥
K( w) = Ks
⇧
Se
⇤
1 (1 Se)1/m
⇥m⌅2
C(⇥) :=
⇤ w()
⇤⇥
Richards ++
R. Rigon and E. Cordano
Wednesday, April 24, 13
5
What I mean with Richards ++
First, I would say, it means that it would be better to call it, for
instance: Richards-Mualem-vanGenuchten equation, since it is:
Se = [1 + ( ⇥)m
)]
n
Se :=
w r
⇥s r
C(⇥)
⇤⇥
⇤t
= ⇥ · K( w) ⇥ (z + ⇥)
⇥
K( w) = Ks
⇧
Se
⇤
1 (1 Se)1/m
⇥m⌅2
Water balance
C(⇥) :=
⇤ w()
⇤⇥
Richards ++
R. Rigon and E. Cordano
Wednesday, April 24, 13
5
What I mean with Richards ++
First, I would say, it means that it would be better to call it, for
instance: Richards-Mualem-vanGenuchten equation, since it is:
Se = [1 + ( ⇥)m
)]
n
Se :=
w r
⇥s r
C(⇥)
⇤⇥
⇤t
= ⇥ · K( w) ⇥ (z + ⇥)
⇥
K( w) = Ks
⇧
Se
⇤
1 (1 Se)1/m
⇥m⌅2
Water balance
Parametric
Mualem
C(⇥) :=
⇤ w()
⇤⇥
Richards ++
R. Rigon and E. Cordano
Wednesday, April 24, 13
5
What I mean with Richards ++
First, I would say, it means that it would be better to call it, for
instance: Richards-Mualem-vanGenuchten equation, since it is:
Se = [1 + ( ⇥)m
)]
n
Se :=
w r
⇥s r
C(⇥)
⇤⇥
⇤t
= ⇥ · K( w) ⇥ (z + ⇥)
⇥
K( w) = Ks
⇧
Se
⇤
1 (1 Se)1/m
⇥m⌅2
Water balance
Parametric
Mualem
Parametric
van Genuchten
C(⇥) :=
⇤ w()
⇤⇥
Richards ++
R. Rigon and E. Cordano
Wednesday, April 24, 13
6
What happens when
In terms of soil water content, it cannot become
larger than porosity (if the matrix is considered
rigid).
At the transition with saturation
R. Rigon and E. Cordano
Wednesday, April 24, 13
7
What I mean with Richards ++
Extending Richards to treat the transition saturated to unsaturated zone.
Which means:
At the transition with saturation
R. Rigon and E. Cordano
Wednesday, April 24, 13
8
So we switch to a generalised
groundwater equations
which has been obtained by modifying the SWRC
At the transition with saturation
R. Rigon and E. Cordano
Wednesday, April 24, 13
9
What about soil freezing ?
In terms of soil water content, it cannot become
larger than porosity (if the matrix is considered
rigid).
Soil Freezing
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
10
dS(U, V, M) = 0
first principle
potential
energy
kinetic
energy
internal
energy
energy fluxes at
the boundaries
second principle
the equilibrium relation becomes:
(But they are not 2 equations. The second is just a restriction on the
first ). Assuming:
K( ) = 0 ; P( ) = 0 ; ( ) = 0
Which equations ?
Soil Freezing
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
11
Uc( ) := Uc(S, V, A, M)
dUc(S, V, A, M)
dt
=
⇥Uc( )
⇥S
⇥S
⇥t
+
⇥Uc( )
⇥V
⇥V
⇥t
+
⇥Uc( )
⇥A
⇥A
⇥t
+
⇥Uc( )
⇥M
⇥M
⇥t
Internal Energy
entropy area
volume mass
Independent variables
To find how the equations are
modified we go to the basics
Soil Freezing
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
12
Expression Symbol Name of the dependent variable
⇤SUc T temperature
- ⇤V Uc p pressure
⇤AUc surface energy
⇤M Uc µ chemical potential
To find how the equations are
modified we go to the basics
So the equation for each phase is:
Soil Freezing
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
13
dS( ) =
1
Tw
1
Ti
⇥
dUw( ) +
pw
Tw
pi
Ti
⇥
dVw( )
µw( )
Tw
µi( )
Ti
⇥
dMw = 0
⇤
⇥
Ti = Tw
pi = pw
µi = µw
the equilibrium relation
becomes:
Flat interfaces at equilibrium
*
* The derivation is not so straightforward and implies the use of Lagrange multipliers. See Muller and Weiss,
2005
Water Freezing
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
14
first principle
potential
energy
kinetic
energy
internal
energy
energy fluxes at
the boundaries
second principle
but:
(But they are not 2 equations. The second is just a restriction on the
first ). Assume:
Let’s condsider a disequilibrium process
Soil Freezing equations
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
15
Dirichlet Boundary Conditions
Dirichlet Boundary Conditions
The Stefan problem
The Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
16
Ice (thermal conductivity,
thermal capacity)
Water (thermal conductivity,
thermal capacity)
The Stefan problem
The Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
17
Diffusion of heat through water
The Stefan problem
Diffusion of heat through ice
The Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
18
Different condition at the interface
The Stefan problem
The Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
19
⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⇤
⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⇥
v1 = v2 = Tref (t > 0, z = Z(t))
v2 ⇥ Ti (t > 0, z ⇥ ⇤)
v1 = Ts (t > 0, z = 0)
⇥1
v1
z ⇥2
v2
z = Lf ⇤w s
dZ(t)
dt (t > 0, z = Z(t))
v1
t = k1
2
v1
z2 (t > 0, z < Z(t))
v2
t = k2
2
v2
z2 (t > 0, z > Z(t))
v1 = v2 = Ti (t = 0, z)
Freezing case (1D
discretization)
Equations of the Stefan Problem
The Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
20
• Moving boundary condition between the two phases,
where heat is liberated or absorbed
• Thermal properties of the two phases may be different
The Stefan Problem
The Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
21
⌅⌅⇤
⌅⌅⇥
v1(t, z) = Ts +
Tref Ts
erf · erf z
2
⇥
k1 t
if z ⇤ Z(t)
v2(t, z) = Ti
Ti Tref
erfc
“ q
k1
k2
” · erfc z
2
⇥
k2 t
if z > Z(t)
⌅⌅⇤
⌅⌅⇥
v1(t, z) = Ti
Ti Tref
erfc
“ q
k2
k1
” · erfc z
2
⇥
k1 t
if z > Z(t)
v2(t, z) = Ts +
Tref Ts
erf · erf z
2
⇥
k2 t
if z ⇤ Z(t)
where ζ is the solution of:
Freezing case:
exp( 2
)
· erf
⇤T 1
⇤
k2 (Ti Tref )
⇤T 2
⇤
k1 (Tref Ts) · erfc
⇧
k2
k1
⇥ · exp
⇤
k2
k1
2
⌅
=
Lf ⇧w ⇥s
⇤
⌅
CT 2 (Tref Ts)
where ζ is the solution of:
Thawing case:
exp( 2
)
· erf
⇤T 2
⇤
k1 (Ti Tref )
⇤T 1
⇤
k2 (Tref Ts) · erfc
⇧
k1
k2
⇥ · exp
⇤
k1
k2
2
⌅
=
Lf ⇧w ⇥s
⇤
⌅
CT 1 (Tref Ts)
The Stefan Problem: analitic solutions
The Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
22
Well, the real case is a little more complicate
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
23
Water is
•often in unsaturated conditions
•in pores
•it is known that it does not freeze until very
negative temperatures are obtained
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
24
Unsaturated conditions
•Means that capillary forces acts, i.e. we have to
account for the tension forces that accumulate in
curves surfaces
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
25
pw = pa wa
⇤Awa(r)
⇤Vw(r)
= pa wa
⇤Awa/⇤r
⇤Vw/⇤r
= pa wa
2
r
:= pa pwa(r)
Young-Laplace equation
pa
pw
the equilibrium condition:
becomes:
What does it means unsaturated conditions
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
26
⇤
dp
dT
=
sw( ) si( )
vw( ) vi( )
=
hw( ) hi( )
T [vw( ) vi( )]
⇥
Lf ( )
T [vw( ) vi( )]
where Lf = 333000 J/Kg is the latent heat of fusion
Clausius-Clapeyron equation
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
27
A paradox ?
Water inside a capillary is at a lower pressure than atmosphere.
Therefore it should freeze before (lower the pressure, higher the freezing
temperature.
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
28
A paradox ?
Instead what happens is exactly the contrary, because for freezing a nucleus of
condensation has to occur
r
with r << r
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
29
So, actually
The situation at the freezing point is the opposite, and represented by the
blue arrow
Freezing point depression
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
30
Because,
the smaller the pores,
the larger the freezing point depression
larger pores
freezes before than
smaller pores
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
31
Because
by means of the Clausius-Clapeyron equation
there is a one-to-one relations between the
size of the pores and the temperature
depression, and because there is
also a one-to-one relationship between the
size of the pores and the pressure
there is a one-one relation among T and
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
32
Unsaturated
unfrozen
Unsaturated
Frozen
Freezing
starts
Freezing
procedes
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
33
pw0 = pa wa
⇥Awa(r0)
⇥Vw
= pa pwa(r0) pi = pa ia
⇥Aia(r0)
⇥Vw
:= pa pia(r0)
pw1 = pa ia
⇥Aiar(0)
⇥Vw
iw
⇥Aiw(r1)
⇥Vw
Two interfaces (air-ice and water-
ice) should be considered!!!
Curved interfaces with three phases
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
34
Now
we have enough information to write the right
equations
Perhaps
Beyond the Stefan problem
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
35
A further assuption
To make it manageable, we do a further assuption. Mainly the freezing=drying
assuption.
Considering the assumption “freezing=drying” (Miller, 1963) the ice “behaves
like air” and does not add furhter pressure terms
Freezing = Drying
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
36
pw1 = pw0 + pfreez
Freezing = Drying
Freezing = Drying
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
37
Unfrozen water content
soil water
retention curve
thermodynamic
equilibrium (Clausius Clapeyron)
+
⇥w =
pw
w g
pressure head:
w(T) = w [⇥w(T)]
How this reflects on pressure head
Freezing = Drying
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
38
w =
s
Aw |⇥| + 1
⇥w = ⇥r + (⇥s ⇥r) · {1 + [ (⇤)]
n
}
m
max
w = s ·
Lf (T Tm)
g T ⇥sat
⇥-1/b
Clapp and
Hornberger
(1978)
Luo et al. (2009), Niu and
Yang (2006), Zhang et al.
(2007)
Gardner (1958) Shoop and Bigl (1997)
Van Genuchten
(1980) Hansson et al (2004)
How this reflects on pressure head
Freezing = Drying
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
39
Unsaturated
unfrozen
Unsaturated
Frozen
Freezing
starts
Freezing
procedes
Soil water retention curves
Freezing = Drying
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
40
−0.05 −0.04 −0.03 −0.02 −0.01 0.00
0.10.20.30.4
Unfrozen water content
temperature [C]
Theta_u[−]
psi_m −5000
psi_m −1000
psi_m −100
psi_m 0
ice
air
water
...
T := T0 +
g T0
Lf
w0
T* at various saturation contents
= ⇥r + (⇥s ⇥r) · {1 + [ · ⇤w0]
n
}
m
ice content: i =
⇥w
⇥i
w
⇥
⇥w = ⇥r + (⇥s ⇥r) ·
⇤
1 + ⇤w0
Lf
g T0
(T T⇥
) · H(T T⇥
)
⇥n⌅ m
liquid water content:
Total water content:
depressed
melting point
Soil water retention curves
Freezing = Drying
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
41
Soil water retention curves
Freezing = Drying
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
42
Soil water retention curves
Freezing = Drying
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
43
-3 -2 -1 0 1
0.00.20.40.60.81.0
n=1.5
temperature [C]
theta_w/theta_s[-]
psi_w0=0 psi_w0=-1000
alpha=0.001 [1/mm]
alpha=0.01 [1/mm]
alpha=0.1 [1/mm]
alpha=0.4 [1/mm]
-10000 -8000 -6000 -4000 -2000 0
0.00.20.40.60.81.0
n=1.5
psi_w0 [mm]
theta_w/theta_s[-]
T=2 T=-2
alpha=0.001 [1/mm]
alpha=0.01 [1/mm]
alpha=0.1 [1/mm]
alpha=0.4 [1/mm]
T > 0
[mm 1
]
n 0.001 0.01 0.1 0.4
1.1 0.939 0.789 0.631 0.549
1.5 0.794 0.313 0.099 0.049
2.0 0.707 0.099 0.009 0.002
2.5 0.659 0.032 0.001 1.2E-4
T = 2 ⇥
C
[mm 1
]
n 0.001 0.01 0.1 0.4
1.1 0.576 0.457 0.363 0.316
1.5 0.063 0.020 0.006 0.003
2.0 4E-3 4E-4 4E-5 1E-5
2.5 2.5E-4 8E-6 2.5E-7 3.2E-8
25
θw/θs at ψw0=−1000 [mm]
Playing with Van Genucthen
Freezing = Drying - Numbers
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
44
⇤
⇤t
fl
w (⇥w1)
⇥
⇤ •
⇤
KH⇤ ⇥w1 + KH⇤ zf
⌅
+ Sw = 0
Liquid water may derive from
ice melting: ∆θph
water flux: ∆θfl
Volume conservation:
⇤
⌃⇧
⌃⌅
0 ⇥ r ⇥ ⇥ ⇥ s ⇥ 1
r
⌥
w0 + i0 + 1 i
w
⇥
ph
i ⇥ fl
w ⇥ s
⌥
w0 + i0 + 1 i
w
⇥
ph
i
Mass conservation (Richards, 1931) equation:
Richards’ equation
Equation of freezing
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
45
U = Cg(1 s) T + ⇥wcw w T + ⇥ici i T + ⇥wLf w
U
t
+ ⌥⇥ • ( ⌥G + ⌥J) + Sen = 0
⌃G = T (⇥w0, T) · ⌃⇤T
J = w · Jw(⇥w0, T) · [Lf + cw T]
0 assuming freezing=drying
U = hgMg + hwMw + hiMi (pwVw + piVi) + µwMph
w + µiMph
i
no expansion: ρw=ρi
assuming:0
no flux during phase change
Eventually:
0 assuming equilibrium thermodynamics:
µw=µi and Mw
ph = -Mi
ph
conduction
advection
Energy Equation
Equation of freezing
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
46
dU
dt
= CT
dT
dt
+ ⇥w (cw ci) · T + Lf
⇥⇤ w
⇤t
⇤ w [⇥w1(T)]
⇤t
=
⇤ w
⇤⇥w1
·
⇤⇥w1
⇤T
·
⇤T
⇤t
= CH(⇥w1) ·
⇤⇥freez
⇤T
·
dT
dt
dU
dt
=
⇤
CT + w Lf + (cw ci) · T
⇥
· CH(T) ·
⇤⇥freez(T)
⇤T
⌅
·
dT
dt
-3 -2 -1 0 1
020406080100140
alpha= 0.01 [1/mm] n= 1.5 theta_s= 0.4
Temp. [ C]
U[MJ/m3]
psi_w0=0
psi_w0=-100
psi_w0=-1000
psi_w0=-10000
-3 -2 -1 0 1
alpha= 0.01 [1/mm] n= 1.5 C_g= 2300000 [J/m3 K]
Temp. [ C]
C_a[MJ/m3K]
1e+011e+021e+03
psi_w0=0 psi_w0=-1000
theta_s= 0.02
theta_s= 0.4
theta_s= 0.8
{Capp
Appearent Heat Capacity
Equation of freezing
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
47
⇤
⌃⇧
⌃⌅
⇤U( w0,T )
⇤t
⇤
⇤z ⇥T (⇤w0, T) · ⇤T
⇤z J(⇤w0, T)
⇥
+ Sen = 0
⇤ ( w0)
⇤t
⇤
⇤z
⌥
KH(⇤w0, T) · ⇤ w1( w0,T )
⇤z KH cos + Sw = 0
1D
representation:
Finally the “right” equations
Equation of freezing
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
48
GEOtop solver of freezing equations
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
49
The right numerical methods
Notes on numerics
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
50
• Finite difference discretization, semi-implicit Crank-Nicholson
method;
• Conservative linearization of the conserved quantity (Celia et al,
1990);
• Linearization of the system through Newton-Raphson method;
• when passing from positive to negative temperature, Newton-
Raphson method is subject to big oscillations (Hansson et al,
2004)
Notes on numerics
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
51
if ||⌅(⇥)m+1
|| > ||⌅(⇥)m
|| ⌅ ⌅⇥m+1
⇤ ⌅⇥m ⌅⇥⇥ ·
reduction factor δ with 0 ≤ δ ≤ 1.
If δ = 1 the scheme is the normal Newton-
Raphson scheme
Globally convergent Newton Method
Notes on numerics
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
52
Limitations of the analytical solution:
• homogeneous substance (pure water)
• instant freezing/thawing at 0˚C
• porosity=1
• SFC (soil freezing characteristic curve)
very steep (see VG parameters)
GEOtop
Notes on numerics of GEOtop
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
53
real soil
• constant Dirichlet conditions at the surface
• no water movement (static conditions) • Richards is OFF
-3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.0 0.5
0.00.20.40.60.81.0 temperature [C]
Theta_u[-]
modeled SFC for the comparison
real SFC
GEOtop
Notes on numerics of GEOtop
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
54
!5 !4 !3 !2 !1 0 1 2
543210
Temp [ C]
soildepth[m]
phase change: simulated and analytical solution
alpha= 0.4 n= 2.5 theta_s= 1 theta_r= 0
sim an (day 0)
sim an (day 15)
sim an (day 30)
sim an (day 45)
sim an (day 60)
sim an (day 75)
time (days)
T[C]
−5−4−3−2−1012
0 15 30 45 60 75
An GEOtop
GEOtop Vs Analytical solution
alpha= 0.4 n= 2.5 theta_s= 1
0.02 m
0.12 m
0.22 m
0.32 m
0.42 m
0.52 m
0.62 m
0.72 m
Oscillations: interface Z=Z(T=0,t) cannot move in a continuum as the analytical
solution. Therefore the interface can be either on the cell i or on the cell i+1 but
not in between.
GEOtop
Notes on numerics of GEOtop
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
55
time (days)
T[C]
!5!4!3!2!1012 0 15 30 45 60 75
An GEOtop
GEOtop Vs Analytical solution
#layers= 100 , layer D= 200 mm, alpha= 0.4 n= 2.5 theta_s= 1
0.1 m
0.3 m
0.5 m
0.8 m
1.1 m
1.5 m
3 m
4.5 m
grid size=300 mm grid size=200 mm
time (days)
T[C]
!5!4!3!2!1012
0 15 30 45 60 75
An GEOtop
GEOtop Vs Analytical solution
#layers= 100 , layer D= 300 mm, alpha= 0.4 n= 2.5 theta_s= 1
0.15 m
0.3 m
0.5 m
0.8 m
1.1 m
1.5 m
3 m
4.5 m
GEOtop
Notes on numerics of GEOtop
R. Rigon and M. Dall’Amico
Wednesday, April 24, 13
Beyond and side by side with
numerics - II
Riccardo Rigon
Dance,HenryMatisse,HotelBironearly1909
Wednesday, April 24, 13
When you arrive at Naples, you
are not at the South of Italy.
When you are at Reggio
Calabria, you are at the South!
Giuseppe Formetta
Wednesday, April 24, 13
58
•Produrre un sistema di supporto alle decisioni (DSS)
•Produrre un sistema “democratico”, facilmente mantenibile, che favorisca
la cooperazione tra ricercatori
•Produrre Ricerca Riproducibile (RRS)
•Adottare un sistema informatico appropriato a trattare i dati di contorno
del solutore numerico
Aver individuato le giuste equazioni e i corretti metodi
numerici non basta
Introduction
R. Rigon
Wednesday, April 24, 13
59
MODELS
IS MODELING SCIENCE ?
R. Rigon
Wednesday, April 24, 13
60
To sum up
DataParametersEquations
Mass,
momentum and
energy
conservation.
Chemical
transformations
Forcings and
obervables
Equation’s
constant. In time!
In space they are
heteorgeneous
Hydrological models are the interplay of
Models
R. Rigon
Wednesday, April 24, 13
61
To sum up
Numerics,
boundary and
initial conditions
Data
Assimilation.
Data Models.
Tools for
Analysis.
Calibration,
derivation from
proxies
DataParametersEquations
Mass,
momentum and
energy
conservation.
Chemical
transformations
Forcings and
obervables
Equation’s
constant. In time!
In space they are
heteorgeneous
Models
R. Rigon
Wednesday, April 24, 13
62
Boundary and initial conditions
Equations are not enough
R. Rigon
Wednesday, April 24, 13
63
Meteo Forcings
Equations are not enough
R. Rigon
Wednesday, April 24, 13
Hourly:
- Precipitation (quantity and type, spatially distributed)
- Relative humidity (spatially distributed)
- Wind Speed and direction (spatially distributed)
- Solar Radiation (spatially distributed)
64
Required Input Data
Equations are not enough
R. Rigon
Wednesday, April 24, 13
- Soil moisture (profile, in terms of matric potential, spatially
distributed)
- Soil temperature (profile, spatially distributed)
- Surface water (if present)
- Snow cover (if present)
65
Other Input Data
Equations are not enough
R. Rigon
Wednesday, April 24, 13
66
Equations are not enough
Fields of Parameters
R. Rigon
Wednesday, April 24, 13
Data base
Calibrazione
EVALUATION OF
STRATEGIES THROUGH
MODELS
STRATEGIES FOR
POLICY MAKERS
DATA
INTERPRETATION
67
DDS
Modelling is not just for
Modelling
R. Rigon
Wednesday, April 24, 13
68
I - Once a model, design and implemented as a monolithic
software entity, has been deployed, its evolution is totally in
the hands of the original developers. While this is a good
thing for intellectual property rights and in a commercial
environment, this is absolutely a bad thing for science and
the way it is supposed to progress.
RobbedfromaCCApresentation
A critique of old modelling style
R. Rigon
Wednesday, April 24, 13
69
II - Independent revisions and third-party
contributions are nearly impossible and especially when
the code is not available.
Models falsification (in Popper sense) is usually impossible by
other scientists than the original authors.
III- Thus, model inter-comparison projects give usually
unsatisfying results. Once complex models do not
reproduce data it is usually very difficult to
determine which process or parameterization was
incorrectly implemented.
A critique of old modelling style
R. Rigon
Wednesday, April 24, 13
70
MODELLING, FOR WHO ?
Which end user do you have in mind ?
SCIENTIST ARE NOT THE ONLY MODELS USERS
R. Rigon
Wednesday, April 24, 13
71
Users/Actors
Four types of user have been defined:
• Prime users: take or prepare decisions at a political level
• Technical users: prepare projects or maps for the primary users
• Other end-users: national agencies, representative groups, etc.They
may take or prepare decisions at national or regional level, or represent
stakeholder groups.
• Model and application developers/modellers: build
models and targeted applications
SCIENTIST ARE NOT THE ONLY MODELS USERS
R. Rigon
Wednesday, April 24, 13
72
Users/Actors
These groups have been further detailed according to their roles:
• Coders: implement models, applications and tools.
• Linkers: link existing models and applications.
• Runners: execute existing models, but they create and define
scenarios.
• Players: play simulations and experiments comparing scenarios and
making analyses.
• Viewers: view the players’ results, have a low level of interaction with
the framework.
• Providers: provide inputs and data to all other user roles.
SCIENTIST ARE NOT THE ONLY MODELS USERS
R. Rigon
Wednesday, April 24, 13
73
Users/Actors
Roles
Users
Hard
Coders
Soft
Coders
Linkers Runners Player Viewers Providers
Prime
Other End
Users
Technical
Researchers
SCIENTIST ARE NOT THE ONLY MODELS USERS
R. Rigon
Wednesday, April 24, 13
74
Object-oriented software development. O-O
programming is nothing new, but it has proven to be a successful
key to the design and implementation of modelling frameworks.
Models and data can be seen as objects and therefore they can
exploit properties such as encapsulation, polymorphism, data
abstraction and inheritance.
Component-oriented software development. Objects
(models and data) should be packaged in components, exposing for
re-use only their most important functions. Libraries of
components can then be re-used and efficiently integrated across
modelling frameworks.Yet, a certain degree of dependency of the
model component from the framework can actually hinder reuse.
NEW (well relatively) MODELING PARADIGMS
ModifiedfromRizzolietal.,2005
MODELLING BY COMPONENTS
R. Rigon
Wednesday, April 24, 13
75
MODELLING BY COMPONENTS
R. Rigon
Wednesday, April 24, 13
76
Discrete units of software which are re-usable
even outside the framework, both for model components
and for tools components.
Seamless and transparent access to data, which
are made independent of the database layer.
A number of tools (simulation, calibration, etc.) that the
modeller will be free to use (including a visual modelling
environment).
A model repository to store your model (and
simulations) and to share it with others.
BENEFITS
MODELLING BY COMPONENTS
R. Rigon
Wednesday, April 24, 13
77
Tools for studying feedbacks among different processes.
BENEFITS FOR SCIENTISTS
Encapsulation of single processes or submodels
MUCH MORE in the field of possibilities
New educational tools and a “storage” of hydrological
knowledge using appropriate onthologies
MODELLING BY COMPONENTS
R. Rigon
Wednesday, April 24, 13
78
T H E R E E X I S T S U C H M O D E L I N G
INFRASTRUCTURE ?
Economic modelling frameworks^. GAMS (general
algebraic modelling system, http://www.gams.com) and GTAP
(global trade analysis program, http://
www.gtap.agecon.purdue.edu ) are some of the most used
modelling systems in the agro-economic domain.They can also
account for social variables, such as unemployment.
^from Rizzoli et al., (Modeling Framework (SeamFrame)
Requirements 2005
MODELLING BY COMPONENTS
R. Rigon
Wednesday, April 24, 13
79
T H E R E E X I S T S U C H M O D E L I N G
INFRASTRUCTURE ?
Environmental modelling frameworks. If we limit to the
agricultural domain, the list is quite limited.There is no ‘real’
framework according to the definition, but APSIM, STICS
and CropSyst provide some of the functionalities. In this area
SEAMFRAME is an emerging technology.When we consider
the water management sector, we find many examples, such
as TIME (the invisible modelling environment), IMT, OpenMI,
and OMS, and, to a certain respect, JUPITER-API.
^ extended from Rizzoli et al., (Modeling Framework
(SeamFrame) Requirements 2005
MODELLING BY COMPONENTS
R. Rigon
Wednesday, April 24, 13
80
T H E R E E X I S T S U C H M O D E L I N G
INFRASTRUCTURE ?
Other modelling software environments of notable
interest are SME, MMS, ICMS, Tarsier, Modcom,
Simile, but they are integrated modelling environments, not
frameworks.This means that they can be used to perform
assessments, analyses, decision support, but they do not provide
programming structures such as classes, components, objects,
design patterns to be used to create end-user applications.
^from Rizzoli et al., Modeling Framework (SeamFrame)
Requirements, 2005
MODELLING BY COMPONENTS
R. Rigon
Wednesday, April 24, 13
81
T H E R E E X I S T S U C H M O D E L I N G
INFRASTRUCTURE ?
Other modelling software environments of notable
interest are SME, MMS, ICMS, Tarsier, Modcom,
Simile, but they are integrated modelling environments, not
frameworks.This means that they can be used to perform
assessments, analyses, decision support, but they do not provide
programming structures such as classes, components, objects,
design patterns to be used to create end-user applications.
^from Rizzoli et al., Modeling Framework (SeamFrame)
Requirements, 2005
MODELLING BY COMPONENTS
R. Rigon
Wednesday, April 24, 13
82
T H E R E E X I S T S U C H M O D E L I N G
INFRASTRUCTURE ?
Atmospheric Sciences: Earth Sciences Modeling Framework
(ESMF) (including Earth System Curator)
High Performance Computing: Common Component
Architecture (CCA)
MODELLING BY COMPONENTS
R. Rigon
Wednesday, April 24, 13
83
DEPLOYEMENT
PREREQUISITES
ALLOWS WRAPPING OF EXISTING CODES BUT
PROMOTES BETTER PROGRAMMING STRATEGIES
BUILT BY OPEN SOURCE TOOLS
DATA BASE PROVIDED
OGC COMPLIANT
CUAHSI SPECIFICATIONS AWARE
DEPLOYABLE THROUGH THE WEB
CAN BE ENDOWED WITH ONTOLOGIES
R. Rigon
Wednesday, April 24, 13
84
The complete framework
PostGIS
Postgres
Web
services
WMS
WFS-T
WPS
Web
services
WMS
WFS-T
WPS
OMS3
Jgrasstools
JGrass
uDig
Eclipse RCP
H2 spatial
UIBuilder
GRASS
GIS engine
The Horton
Machine
Models
BeeGIS
DEPLOYEMENT
R. Rigon with Hydrologis
Wednesday, April 24, 13
85
Java
JGrass
uDig
Eclipse RCP
SOLIDITY: The framework bases on the solid fundaments of the Eclipse RCP
framework first created by IBM.
CONNECTIVITY and USERFRIENDLYNESS:The GIS framework is based on the uDig
GIS framework, specialized in accessibility and remote connections
ANALYSIS: The JGrass extentions define a layer of powerful GIS analysis tools and a
straight connection to the GRASS GIS
MOBILITY:The BeeGIS extentions supply tools for digital field surveying
BeeGIS
DEPLOYEMENT
R. Rigon with Hydrologis
Wednesday, April 24, 13
86
Connectivity and web standards
Database:
PostGIS-Postgres
H2 spatial
Web services
WMS
WFS-T
soon WPS
DATABASE: The GIS framework is ready to connect
to external relational databases as postgres, mysql or
oracle. To spatial data servers like postgis, Oracle
spatial and Arcsde. It also comes with an internal
spatial database based on H2 (no indexing yet)‫‏‬‫‏‬.
It would be fairly easy to create connections to
RESTful services to acquire data.
WEB SERVICES AND STANDARD WEB PROTOCOLS:
The framework supports OGC web standards
like the web mapping service (WMS), the web
feature service, also in transactional format (WFS-
T). An efforth for the web processing service is
ongoing.
DEPLOYEMENT
R. Rigon with Hydrologis
Wednesday, April 24, 13
87
The analysis engine
OpenMI
GRASS
THE CONSOLE ENGINE: the console engine
supplies a framework for modeling development
and scripting environment for fast
methodology testing.The engine contains already
masses of modules called Horton Machine for
various terrain analyses as well as a stability
model and hydrologic models.
Also the engine gives access to the GRASS
analysis modules.
THE STANDALONE MODE:The need for usage
of the modelling environment on supercomputer
defined a heavily decoupled design for the
console engine. The framework defines a strict
interface between GUI and analysis engine, which
makes it easy to exploit the console engine in
standalone mode on server-side.
The Horton
Machine
Models
DEPLOYEMENT
R. Rigon with Hydrologis
Wednesday, April 24, 13
88
The relationship to OMS3
OMS3
THE OMS3 ENGINE: the console engine exposes a
compiler for an OMS3 based modeling language.This
gives a way to write scripts to execute openmi chained
models.
THE OGC STANDARDS EXTENTION:The need for big
vector and raster data forced the team to extend the
OMS3 standard interfaces with two GIS OGC standards:
the OGC feature model
the OGC grid coverage service (in prototype mode)‫‏‬
OGC IN JGRASS: the OGC feature and grid coverage models are served by the
geotools libraries.The coverage model is based on the Java Advanced Imaging
library and supports tilecaching for processing of large dataset. Coverage data are
passed to native languages as C, C++ and Fortran through the easy adoptable
JNA libraries.
The Horton
Machine
Models
DEPLOYEMENT
R. Rigon with Hydrologis
Wednesday, April 24, 13
89
Not just an idea
but a reality
The case of JGrass-NewAGE
The State Of Art of the Project
R. Rigon with Hydrologis and G. Formetta
Wednesday, April 24, 13
90
Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
5
Modelling with componentsGIS Integration Multi-platform
Multi-languageOpen-source Reproducible research system
NewAge Goals:
Motivation Outline Hydrological Components Modelling Framework Conclusions
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
R. Rigon with Hydrologis and G. Formetta
Wednesday, April 24, 13
91
The RRS concept
Since research and technical work rely on daily use of computer programs
•Models configurations
•Models setup
•Models input data
•Models output
•Results interpretation
Should be sharable in the easiest way
The State Of Art of the Project
R. Rigon, G. Formetta, and O. David
Wednesday, April 24, 13
92Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
10
Model setting
Hillslope
Features
Basin splitted
in hillslopes
Outline Calibration Issues Data AssimilationMotivation Hydrological Component
Trento 17 June 2011G. Formetta, Trento 24 June 2011
Outline ConclusionsInformatic StructureHydrological Components
Leipzig 05 July 2012G. Formetta,
Motivation Outline Hydrological Components Modelling Framework Conclusions
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
Hydrologis, R. Rigon and G. Formetta
Wednesday, April 24, 13
93
Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
1
Model setting
Network splitted
in links
Links
Features
Outline Calibration Issues Data AssimilatMotivation Hydrological Component
Trento 17 June 2011G. Formetta, Trento 24 June 2011
Outline Calibration IssuInformatic Structure Hydrological Components
Leipzig 05 July 2012G. Formetta,
Motivation Outline Hydrological Components Modelling Framework Conclusion
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
Hydrologis, R. Rigon and G. Formetta
Wednesday, April 24, 13
94
Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
16
Outline Calibration Issues Data AssimilationMotivation Hydrological Component
Trento 17 June 2011G. Formetta, Trento 24 June 2011
Interpolation Problem
Verification Procedure
Outline Calibration IssuesInformatic Structure Hydrological Components
1) Start from a complete dataset
Outline ConclusionsInformatic StructureHydrological Components
Leipzig 05 July 2012G. Formetta,
Motivation Outline Hydrological Components Modelling Framework Conclusions
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
R. Rigon, G. Formetta, and O. David
Wednesday, April 24, 13
95
Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
21
Precipitation Interpolation: Krigings
Motivation Outline Hydrological Components Modelling Framework Conclusions
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
R. Rigon, G. Formetta, and O. David
Wednesday, April 24, 13
96
Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
28
Shortwave Energy Model: raster mode application on Piave river
Simulation time step: hourly
Simulation Period: 01/10/201-
02/10/2010
Motivation Outline Hydrological Components Modelling Framework Conclusions
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
R. Rigon, G. Formetta, and O. David
Wednesday, April 24, 13
97
Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
29
NewAge-OMS3 automatic calibration algorithms
Generic Parameter set
Optimal Parameter set
Uncertainty:
•  catchment heterogeneity
•  model limitations
•  measurement techniques
Motivation Outline Hydrological Components Modelling Framework Conclusions
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
R. Rigon, G. Formetta, and O. David
Wednesday, April 24, 13
98Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
34
Outline Calibration Issues Data AssimilationMotivation Hydrological Component
Trento 17 June 2011G. Formetta, Trento 24 June 2011
Outline Calibration IssuesInformatic Structure Hydrological ComponentsOutline ConclusionsInformatic StructureHydrological Components
Leipzig 05 July 2012G. Formetta,
Basin Delineation Conclusions
Formetta G., ARS-USDA-Fort Collins (CO)
Motivation Hydrological Components
Formetta G., David O. and Rigon R.
Little Washita river basin: Rainfall-Runoff modelling solution
Motivation Outline Hydrological Components Modelling Framework Conclusions
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
R. Rigon, G. Formetta, and O. David
Wednesday, April 24, 13
99
Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
39
Something more than a classical model
Outline Calibration Issues Data AssimilationMotivation Hydrological Component
Rome 09 March 2011Trento 17 June 2011G. Formetta, Trento 24 June 2011
Different possibility to run OMS3 components
uDig 1.3.1 Spatial Toolbox
Trento 24 June 2011
Outline Calibration IssuesInformatic Structure Hydrological ComponentsOutline ConclusionsInformatic StructureHydrological Components
Leipzig 05 July 2012G. Formetta,
Motivation Outline Hydrological Components Modelling Framework Conclusions
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
Hydrologis, R. Rigon, G. Formetta, and O. David
Wednesday, April 24, 13
100
Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
40
Something more than a classical model
Outline Calibration Issues Data AssimilationMotivation Hydrological Component
Rome 09 March 2011Trento 17 June 2011
uDig 1.3.1 Spatial Toolbox
OMS3 Console
Different possibility to run OMS3 components
Outline Calibration IssuesInformatic Structure Hydrological ComponentsOutline ConclusionsInformatic StructureHydrological Components
Leipzig 05 July 2012G. Formetta,
Motivation Outline Hydrological Components Modelling Framework Conclusions
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
Hydrologis, R. Rigon, G. Formetta, and O. David
Wednesday, April 24, 13
101
Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
41
Something more than a classical model
Outline Calibration Issues Data AssimilationMotivation Hydrological Component
Rome 09 March 2011Trento 17 June 2011G. Formetta, Trento 24 June 2011
OMS3 Console
Command Line
uDig 1.3.1 Spatial Toolbox
Outline Calibration IssuesInformatic Structure Hydrological ComponentsOutline ConclusionsInformatic StructureHydrological Components
Leipzig 05 July 2012G. Formetta,
Different possibility to run OMS3 components
Motivation Outline Hydrological Components Modelling Framework Conclusions
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
Hydrologis, R. Rigon, G. Formetta, and O. David
Wednesday, April 24, 13
102
Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
42
Something more than a classical model
Outline Calibration Issues Data AssimilationMotivation Hydrological Component
Rome 09 March 2011G. Formetta,
What is a .sim file?
Outline Calibration IssuesInformatic Structure Hydrological ComponentsOutline ConclusionsInformatic StructureHydrological Components
Leipzig 05 July 2012G. Formetta,
Motivation Outline Hydrological Components Modelling Framework Conclusions
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
Hydrologis, R. Rigon, G. Formetta, and O. David
Wednesday, April 24, 13
103
Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23
The file structure is different
respect to a common .sim file:
- Model: here the model has to
be calibrated
- PSO Parameters: here have
to be assigned
- Model Parameters to optimize:
here have to be assigned
- Objective Function, Model output
and measurements: here have to
be assigned
Particle Swarm calibration .sim file
Outline ConclusioInformatic StructureHydrological Components
Leipzig 05 July 2012G. Formetta,
Motivation Outline Hydrological Components Modelling Framework Conclus
Trento 19 April 2013G. Formetta,
The State Of Art of the Project
R. Rigon, G. Formetta, and O. David
Wednesday, April 24, 13
104
EPILOGUE
OUR AIM IS NOT TO MODEL EVERYTHING*OR
DO A MODEL OF EVERYTHING BUT GIVE A
S P A C E W E R E D I F F E R E N T , E V E N
CONTRADICTORY, IDEAS,AND DATA CAN BE
EXPLOITED IN A WAY WHICH PROPELS
COLLABORATIVE EFFORTS BY SCIENTISTS
AND USERS.
*“Correctly interpreted, you know, pi contains the entire history of the human race.”
-Dr. Irving Joshua Matrix, from M. Gardner,“The magic numbers of dr. Matrix”
The Overall Goal
R. Rigon, and the whole group
Wednesday, April 24, 13
105
Direct Contributors:
Andrea Antonello uDig and jgrasstools core developer and architect
Giacomo Bertoldi GEOtop developer (energy budgets, vegetation)
Emanuele Cordano GEOtop developer (Richards equation, I/O)
Matteo Dall’Amico GEOtop developer (permafrost, GEOtop-mono)
Stefano Endrizzi GEOtop developer (energy budgets, snow, permafrost)
Giuseppe Formetta JGrass-NewAGE developers
Silvia Franceschi Jgrasstools models developer and architect
Riccardo Rigon All the merits go to the others
Erica Ghesla, Andrea Cozzini, Silvano Pisoni and others contributed to original version of the
Horton Machine
Acknowledgements
R. Rigon
Wednesday, April 24, 13
106
G.Ulrici-2000?
Thank you
R. Rigon
Wednesday, April 24, 13

More Related Content

PDF
GEOtop 2.0 - The snow and freezing soil modelling
PDF
Reservoirology#4 or the representation of PDEs with TC Petri nets
PDF
Come scrivere un CV
PDF
Git,Travis,Gradle
PDF
15 Evapotranspiration
PDF
Hillslope hydrologyandrichards
PDF
Angulo contacto
PPT
Quantum mechanics is a fundamental theory
GEOtop 2.0 - The snow and freezing soil modelling
Reservoirology#4 or the representation of PDEs with TC Petri nets
Come scrivere un CV
Git,Travis,Gradle
15 Evapotranspiration
Hillslope hydrologyandrichards
Angulo contacto
Quantum mechanics is a fundamental theory

Similar to Beyond and side by side with numerics (14)

PDF
Nonlinear Weather Forecasting-ORSIS.pdf
PDF
Soil and Water Engineering 05
PPT
Introduction2 qm
PDF
Ls2 unit 4-----1
PDF
Astrodynamics_Note.pdf
DOC
Applications of differential equations by shahzad
PPTX
FIRST ORDER DIFFERENTIAL EQUATION
PPTX
Younger Dryas Presentation Large.pptx
PDF
Freezing-thawing processes study with numerical models
PDF
9 precipitations - rainfall
PDF
Statistics Homework Help
PDF
Multiple Linear Regression Homework Help
PPT
Dr.Philos._Trial_Lecture_Committee_Given_Topic
PDF
Presentation M2 internship rare-earth nickelates
Nonlinear Weather Forecasting-ORSIS.pdf
Soil and Water Engineering 05
Introduction2 qm
Ls2 unit 4-----1
Astrodynamics_Note.pdf
Applications of differential equations by shahzad
FIRST ORDER DIFFERENTIAL EQUATION
Younger Dryas Presentation Large.pptx
Freezing-thawing processes study with numerical models
9 precipitations - rainfall
Statistics Homework Help
Multiple Linear Regression Homework Help
Dr.Philos._Trial_Lecture_Committee_Given_Topic
Presentation M2 internship rare-earth nickelates
Ad

More from Riccardo Rigon (20)

PDF
Models for hazards mapping
PDF
A short introduction to some hydrological extreme phenomena
PDF
EvaporAzione
PDF
Francesco Serafin
PDF
Meledrio
PDF
Lisbon talk for SteepStreams
PDF
Grids implementation
PDF
PDF
Some photos from the field
PDF
Virtual water fem 07032017
PDF
Dalton Prize Lecture 2017 by Dani Or
PDF
Projecting Climate Change Impacts on Water Resources in Regions of Complex To...
PDF
The modern flood forecasting
PDF
La moderna previsione delle piene
PDF
Hydrological Extremes and Human societies
PDF
The Science of Water Transport and Floods from Theory to Relevant Application...
PDF
The Science of Water Transport and Floods from Theory to Relevant Applications
PDF
Climaware at the end
PDF
Hymod model for catchments
PDF
Egu2017 pico
Models for hazards mapping
A short introduction to some hydrological extreme phenomena
EvaporAzione
Francesco Serafin
Meledrio
Lisbon talk for SteepStreams
Grids implementation
Some photos from the field
Virtual water fem 07032017
Dalton Prize Lecture 2017 by Dani Or
Projecting Climate Change Impacts on Water Resources in Regions of Complex To...
The modern flood forecasting
La moderna previsione delle piene
Hydrological Extremes and Human societies
The Science of Water Transport and Floods from Theory to Relevant Application...
The Science of Water Transport and Floods from Theory to Relevant Applications
Climaware at the end
Hymod model for catchments
Egu2017 pico
Ad

Recently uploaded (20)

PDF
Trump Administration's workforce development strategy
PDF
Complications of Minimal Access Surgery at WLH
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
RMMM.pdf make it easy to upload and study
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Cell Types and Its function , kingdom of life
PPTX
Lesson notes of climatology university.
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Trump Administration's workforce development strategy
Complications of Minimal Access Surgery at WLH
202450812 BayCHI UCSC-SV 20250812 v17.pptx
O7-L3 Supply Chain Operations - ICLT Program
RMMM.pdf make it easy to upload and study
Final Presentation General Medicine 03-08-2024.pptx
Computing-Curriculum for Schools in Ghana
Module 4: Burden of Disease Tutorial Slides S2 2025
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
O5-L3 Freight Transport Ops (International) V1.pdf
Weekly quiz Compilation Jan -July 25.pdf
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Final Presentation General Medicine 03-08-2024.pptx
Cell Types and Its function , kingdom of life
Lesson notes of climatology university.
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Anesthesia in Laparoscopic Surgery in India
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...

Beyond and side by side with numerics

  • 1. Beyond and side by side with numerics -I Riccardo Rigon Dance,HenryMatisse,HotelBironearly1909 Wednesday, April 24, 13
  • 2. They started from wrong assumptions, and applying a perfect logic, they arrived rigorously to wrong results. My father in law Wednesday, April 24, 13
  • 3. 3 I am here to tell you about What are the central topics of the work of the modellers •Find the right equations Introduzione R. Rigon •Find the right numerical methods Wednesday, April 24, 13
  • 4. 4 Are Richards’ equation right ? Well, they represents mass conservation: and this is a basic principle However What happens when soil turns to saturation ? What happens when soil freezes ? What happens when warms, goofers or roots escavate the soil ? Richards ++ R. Rigon Wednesday, April 24, 13
  • 5. 5 What I mean with Richards ++ First, I would say, it means that it would be better to call it, for instance: Richards-Mualem-vanGenuchten equation, since it is: Se = [1 + ( ⇥)m )] n Se := w r ⇥s r C(⇥) ⇤⇥ ⇤t = ⇥ · K( w) ⇥ (z + ⇥) ⇥ K( w) = Ks ⇧ Se ⇤ 1 (1 Se)1/m ⇥m⌅2 C(⇥) := ⇤ w() ⇤⇥ Richards ++ R. Rigon and E. Cordano Wednesday, April 24, 13
  • 6. 5 What I mean with Richards ++ First, I would say, it means that it would be better to call it, for instance: Richards-Mualem-vanGenuchten equation, since it is: Se = [1 + ( ⇥)m )] n Se := w r ⇥s r C(⇥) ⇤⇥ ⇤t = ⇥ · K( w) ⇥ (z + ⇥) ⇥ K( w) = Ks ⇧ Se ⇤ 1 (1 Se)1/m ⇥m⌅2 Water balance C(⇥) := ⇤ w() ⇤⇥ Richards ++ R. Rigon and E. Cordano Wednesday, April 24, 13
  • 7. 5 What I mean with Richards ++ First, I would say, it means that it would be better to call it, for instance: Richards-Mualem-vanGenuchten equation, since it is: Se = [1 + ( ⇥)m )] n Se := w r ⇥s r C(⇥) ⇤⇥ ⇤t = ⇥ · K( w) ⇥ (z + ⇥) ⇥ K( w) = Ks ⇧ Se ⇤ 1 (1 Se)1/m ⇥m⌅2 Water balance Parametric Mualem C(⇥) := ⇤ w() ⇤⇥ Richards ++ R. Rigon and E. Cordano Wednesday, April 24, 13
  • 8. 5 What I mean with Richards ++ First, I would say, it means that it would be better to call it, for instance: Richards-Mualem-vanGenuchten equation, since it is: Se = [1 + ( ⇥)m )] n Se := w r ⇥s r C(⇥) ⇤⇥ ⇤t = ⇥ · K( w) ⇥ (z + ⇥) ⇥ K( w) = Ks ⇧ Se ⇤ 1 (1 Se)1/m ⇥m⌅2 Water balance Parametric Mualem Parametric van Genuchten C(⇥) := ⇤ w() ⇤⇥ Richards ++ R. Rigon and E. Cordano Wednesday, April 24, 13
  • 9. 6 What happens when In terms of soil water content, it cannot become larger than porosity (if the matrix is considered rigid). At the transition with saturation R. Rigon and E. Cordano Wednesday, April 24, 13
  • 10. 7 What I mean with Richards ++ Extending Richards to treat the transition saturated to unsaturated zone. Which means: At the transition with saturation R. Rigon and E. Cordano Wednesday, April 24, 13
  • 11. 8 So we switch to a generalised groundwater equations which has been obtained by modifying the SWRC At the transition with saturation R. Rigon and E. Cordano Wednesday, April 24, 13
  • 12. 9 What about soil freezing ? In terms of soil water content, it cannot become larger than porosity (if the matrix is considered rigid). Soil Freezing R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 13. 10 dS(U, V, M) = 0 first principle potential energy kinetic energy internal energy energy fluxes at the boundaries second principle the equilibrium relation becomes: (But they are not 2 equations. The second is just a restriction on the first ). Assuming: K( ) = 0 ; P( ) = 0 ; ( ) = 0 Which equations ? Soil Freezing R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 14. 11 Uc( ) := Uc(S, V, A, M) dUc(S, V, A, M) dt = ⇥Uc( ) ⇥S ⇥S ⇥t + ⇥Uc( ) ⇥V ⇥V ⇥t + ⇥Uc( ) ⇥A ⇥A ⇥t + ⇥Uc( ) ⇥M ⇥M ⇥t Internal Energy entropy area volume mass Independent variables To find how the equations are modified we go to the basics Soil Freezing R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 15. 12 Expression Symbol Name of the dependent variable ⇤SUc T temperature - ⇤V Uc p pressure ⇤AUc surface energy ⇤M Uc µ chemical potential To find how the equations are modified we go to the basics So the equation for each phase is: Soil Freezing R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 16. 13 dS( ) = 1 Tw 1 Ti ⇥ dUw( ) + pw Tw pi Ti ⇥ dVw( ) µw( ) Tw µi( ) Ti ⇥ dMw = 0 ⇤ ⇥ Ti = Tw pi = pw µi = µw the equilibrium relation becomes: Flat interfaces at equilibrium * * The derivation is not so straightforward and implies the use of Lagrange multipliers. See Muller and Weiss, 2005 Water Freezing R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 17. 14 first principle potential energy kinetic energy internal energy energy fluxes at the boundaries second principle but: (But they are not 2 equations. The second is just a restriction on the first ). Assume: Let’s condsider a disequilibrium process Soil Freezing equations R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 18. 15 Dirichlet Boundary Conditions Dirichlet Boundary Conditions The Stefan problem The Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 19. 16 Ice (thermal conductivity, thermal capacity) Water (thermal conductivity, thermal capacity) The Stefan problem The Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 20. 17 Diffusion of heat through water The Stefan problem Diffusion of heat through ice The Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 21. 18 Different condition at the interface The Stefan problem The Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 22. 19 ⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⇤ ⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⌅⇥ v1 = v2 = Tref (t > 0, z = Z(t)) v2 ⇥ Ti (t > 0, z ⇥ ⇤) v1 = Ts (t > 0, z = 0) ⇥1 v1 z ⇥2 v2 z = Lf ⇤w s dZ(t) dt (t > 0, z = Z(t)) v1 t = k1 2 v1 z2 (t > 0, z < Z(t)) v2 t = k2 2 v2 z2 (t > 0, z > Z(t)) v1 = v2 = Ti (t = 0, z) Freezing case (1D discretization) Equations of the Stefan Problem The Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 23. 20 • Moving boundary condition between the two phases, where heat is liberated or absorbed • Thermal properties of the two phases may be different The Stefan Problem The Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 24. 21 ⌅⌅⇤ ⌅⌅⇥ v1(t, z) = Ts + Tref Ts erf · erf z 2 ⇥ k1 t if z ⇤ Z(t) v2(t, z) = Ti Ti Tref erfc “ q k1 k2 ” · erfc z 2 ⇥ k2 t if z > Z(t) ⌅⌅⇤ ⌅⌅⇥ v1(t, z) = Ti Ti Tref erfc “ q k2 k1 ” · erfc z 2 ⇥ k1 t if z > Z(t) v2(t, z) = Ts + Tref Ts erf · erf z 2 ⇥ k2 t if z ⇤ Z(t) where ζ is the solution of: Freezing case: exp( 2 ) · erf ⇤T 1 ⇤ k2 (Ti Tref ) ⇤T 2 ⇤ k1 (Tref Ts) · erfc ⇧ k2 k1 ⇥ · exp ⇤ k2 k1 2 ⌅ = Lf ⇧w ⇥s ⇤ ⌅ CT 2 (Tref Ts) where ζ is the solution of: Thawing case: exp( 2 ) · erf ⇤T 2 ⇤ k1 (Ti Tref ) ⇤T 1 ⇤ k2 (Tref Ts) · erfc ⇧ k1 k2 ⇥ · exp ⇤ k1 k2 2 ⌅ = Lf ⇧w ⇥s ⇤ ⌅ CT 1 (Tref Ts) The Stefan Problem: analitic solutions The Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 25. 22 Well, the real case is a little more complicate R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 26. 23 Water is •often in unsaturated conditions •in pores •it is known that it does not freeze until very negative temperatures are obtained Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 27. 24 Unsaturated conditions •Means that capillary forces acts, i.e. we have to account for the tension forces that accumulate in curves surfaces Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 28. 25 pw = pa wa ⇤Awa(r) ⇤Vw(r) = pa wa ⇤Awa/⇤r ⇤Vw/⇤r = pa wa 2 r := pa pwa(r) Young-Laplace equation pa pw the equilibrium condition: becomes: What does it means unsaturated conditions Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 29. 26 ⇤ dp dT = sw( ) si( ) vw( ) vi( ) = hw( ) hi( ) T [vw( ) vi( )] ⇥ Lf ( ) T [vw( ) vi( )] where Lf = 333000 J/Kg is the latent heat of fusion Clausius-Clapeyron equation Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 30. 27 A paradox ? Water inside a capillary is at a lower pressure than atmosphere. Therefore it should freeze before (lower the pressure, higher the freezing temperature. Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 31. 28 A paradox ? Instead what happens is exactly the contrary, because for freezing a nucleus of condensation has to occur r with r << r Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 32. 29 So, actually The situation at the freezing point is the opposite, and represented by the blue arrow Freezing point depression Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 33. 30 Because, the smaller the pores, the larger the freezing point depression larger pores freezes before than smaller pores Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 34. 31 Because by means of the Clausius-Clapeyron equation there is a one-to-one relations between the size of the pores and the temperature depression, and because there is also a one-to-one relationship between the size of the pores and the pressure there is a one-one relation among T and Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 35. 32 Unsaturated unfrozen Unsaturated Frozen Freezing starts Freezing procedes Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 36. 33 pw0 = pa wa ⇥Awa(r0) ⇥Vw = pa pwa(r0) pi = pa ia ⇥Aia(r0) ⇥Vw := pa pia(r0) pw1 = pa ia ⇥Aiar(0) ⇥Vw iw ⇥Aiw(r1) ⇥Vw Two interfaces (air-ice and water- ice) should be considered!!! Curved interfaces with three phases Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 37. 34 Now we have enough information to write the right equations Perhaps Beyond the Stefan problem R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 38. 35 A further assuption To make it manageable, we do a further assuption. Mainly the freezing=drying assuption. Considering the assumption “freezing=drying” (Miller, 1963) the ice “behaves like air” and does not add furhter pressure terms Freezing = Drying R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 39. 36 pw1 = pw0 + pfreez Freezing = Drying Freezing = Drying R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 40. 37 Unfrozen water content soil water retention curve thermodynamic equilibrium (Clausius Clapeyron) + ⇥w = pw w g pressure head: w(T) = w [⇥w(T)] How this reflects on pressure head Freezing = Drying R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 41. 38 w = s Aw |⇥| + 1 ⇥w = ⇥r + (⇥s ⇥r) · {1 + [ (⇤)] n } m max w = s · Lf (T Tm) g T ⇥sat ⇥-1/b Clapp and Hornberger (1978) Luo et al. (2009), Niu and Yang (2006), Zhang et al. (2007) Gardner (1958) Shoop and Bigl (1997) Van Genuchten (1980) Hansson et al (2004) How this reflects on pressure head Freezing = Drying R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 42. 39 Unsaturated unfrozen Unsaturated Frozen Freezing starts Freezing procedes Soil water retention curves Freezing = Drying R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 43. 40 −0.05 −0.04 −0.03 −0.02 −0.01 0.00 0.10.20.30.4 Unfrozen water content temperature [C] Theta_u[−] psi_m −5000 psi_m −1000 psi_m −100 psi_m 0 ice air water ... T := T0 + g T0 Lf w0 T* at various saturation contents = ⇥r + (⇥s ⇥r) · {1 + [ · ⇤w0] n } m ice content: i = ⇥w ⇥i w ⇥ ⇥w = ⇥r + (⇥s ⇥r) · ⇤ 1 + ⇤w0 Lf g T0 (T T⇥ ) · H(T T⇥ ) ⇥n⌅ m liquid water content: Total water content: depressed melting point Soil water retention curves Freezing = Drying R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 44. 41 Soil water retention curves Freezing = Drying R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 45. 42 Soil water retention curves Freezing = Drying R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 46. 43 -3 -2 -1 0 1 0.00.20.40.60.81.0 n=1.5 temperature [C] theta_w/theta_s[-] psi_w0=0 psi_w0=-1000 alpha=0.001 [1/mm] alpha=0.01 [1/mm] alpha=0.1 [1/mm] alpha=0.4 [1/mm] -10000 -8000 -6000 -4000 -2000 0 0.00.20.40.60.81.0 n=1.5 psi_w0 [mm] theta_w/theta_s[-] T=2 T=-2 alpha=0.001 [1/mm] alpha=0.01 [1/mm] alpha=0.1 [1/mm] alpha=0.4 [1/mm] T > 0 [mm 1 ] n 0.001 0.01 0.1 0.4 1.1 0.939 0.789 0.631 0.549 1.5 0.794 0.313 0.099 0.049 2.0 0.707 0.099 0.009 0.002 2.5 0.659 0.032 0.001 1.2E-4 T = 2 ⇥ C [mm 1 ] n 0.001 0.01 0.1 0.4 1.1 0.576 0.457 0.363 0.316 1.5 0.063 0.020 0.006 0.003 2.0 4E-3 4E-4 4E-5 1E-5 2.5 2.5E-4 8E-6 2.5E-7 3.2E-8 25 θw/θs at ψw0=−1000 [mm] Playing with Van Genucthen Freezing = Drying - Numbers R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 47. 44 ⇤ ⇤t fl w (⇥w1) ⇥ ⇤ • ⇤ KH⇤ ⇥w1 + KH⇤ zf ⌅ + Sw = 0 Liquid water may derive from ice melting: ∆θph water flux: ∆θfl Volume conservation: ⇤ ⌃⇧ ⌃⌅ 0 ⇥ r ⇥ ⇥ ⇥ s ⇥ 1 r ⌥ w0 + i0 + 1 i w ⇥ ph i ⇥ fl w ⇥ s ⌥ w0 + i0 + 1 i w ⇥ ph i Mass conservation (Richards, 1931) equation: Richards’ equation Equation of freezing R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 48. 45 U = Cg(1 s) T + ⇥wcw w T + ⇥ici i T + ⇥wLf w U t + ⌥⇥ • ( ⌥G + ⌥J) + Sen = 0 ⌃G = T (⇥w0, T) · ⌃⇤T J = w · Jw(⇥w0, T) · [Lf + cw T] 0 assuming freezing=drying U = hgMg + hwMw + hiMi (pwVw + piVi) + µwMph w + µiMph i no expansion: ρw=ρi assuming:0 no flux during phase change Eventually: 0 assuming equilibrium thermodynamics: µw=µi and Mw ph = -Mi ph conduction advection Energy Equation Equation of freezing R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 49. 46 dU dt = CT dT dt + ⇥w (cw ci) · T + Lf ⇥⇤ w ⇤t ⇤ w [⇥w1(T)] ⇤t = ⇤ w ⇤⇥w1 · ⇤⇥w1 ⇤T · ⇤T ⇤t = CH(⇥w1) · ⇤⇥freez ⇤T · dT dt dU dt = ⇤ CT + w Lf + (cw ci) · T ⇥ · CH(T) · ⇤⇥freez(T) ⇤T ⌅ · dT dt -3 -2 -1 0 1 020406080100140 alpha= 0.01 [1/mm] n= 1.5 theta_s= 0.4 Temp. [ C] U[MJ/m3] psi_w0=0 psi_w0=-100 psi_w0=-1000 psi_w0=-10000 -3 -2 -1 0 1 alpha= 0.01 [1/mm] n= 1.5 C_g= 2300000 [J/m3 K] Temp. [ C] C_a[MJ/m3K] 1e+011e+021e+03 psi_w0=0 psi_w0=-1000 theta_s= 0.02 theta_s= 0.4 theta_s= 0.8 {Capp Appearent Heat Capacity Equation of freezing R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 50. 47 ⇤ ⌃⇧ ⌃⌅ ⇤U( w0,T ) ⇤t ⇤ ⇤z ⇥T (⇤w0, T) · ⇤T ⇤z J(⇤w0, T) ⇥ + Sen = 0 ⇤ ( w0) ⇤t ⇤ ⇤z ⌥ KH(⇤w0, T) · ⇤ w1( w0,T ) ⇤z KH cos + Sw = 0 1D representation: Finally the “right” equations Equation of freezing R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 51. 48 GEOtop solver of freezing equations R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 52. 49 The right numerical methods Notes on numerics R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 53. 50 • Finite difference discretization, semi-implicit Crank-Nicholson method; • Conservative linearization of the conserved quantity (Celia et al, 1990); • Linearization of the system through Newton-Raphson method; • when passing from positive to negative temperature, Newton- Raphson method is subject to big oscillations (Hansson et al, 2004) Notes on numerics R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 54. 51 if ||⌅(⇥)m+1 || > ||⌅(⇥)m || ⌅ ⌅⇥m+1 ⇤ ⌅⇥m ⌅⇥⇥ · reduction factor δ with 0 ≤ δ ≤ 1. If δ = 1 the scheme is the normal Newton- Raphson scheme Globally convergent Newton Method Notes on numerics R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 55. 52 Limitations of the analytical solution: • homogeneous substance (pure water) • instant freezing/thawing at 0˚C • porosity=1 • SFC (soil freezing characteristic curve) very steep (see VG parameters) GEOtop Notes on numerics of GEOtop R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 56. 53 real soil • constant Dirichlet conditions at the surface • no water movement (static conditions) • Richards is OFF -3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.0 0.5 0.00.20.40.60.81.0 temperature [C] Theta_u[-] modeled SFC for the comparison real SFC GEOtop Notes on numerics of GEOtop R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 57. 54 !5 !4 !3 !2 !1 0 1 2 543210 Temp [ C] soildepth[m] phase change: simulated and analytical solution alpha= 0.4 n= 2.5 theta_s= 1 theta_r= 0 sim an (day 0) sim an (day 15) sim an (day 30) sim an (day 45) sim an (day 60) sim an (day 75) time (days) T[C] −5−4−3−2−1012 0 15 30 45 60 75 An GEOtop GEOtop Vs Analytical solution alpha= 0.4 n= 2.5 theta_s= 1 0.02 m 0.12 m 0.22 m 0.32 m 0.42 m 0.52 m 0.62 m 0.72 m Oscillations: interface Z=Z(T=0,t) cannot move in a continuum as the analytical solution. Therefore the interface can be either on the cell i or on the cell i+1 but not in between. GEOtop Notes on numerics of GEOtop R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 58. 55 time (days) T[C] !5!4!3!2!1012 0 15 30 45 60 75 An GEOtop GEOtop Vs Analytical solution #layers= 100 , layer D= 200 mm, alpha= 0.4 n= 2.5 theta_s= 1 0.1 m 0.3 m 0.5 m 0.8 m 1.1 m 1.5 m 3 m 4.5 m grid size=300 mm grid size=200 mm time (days) T[C] !5!4!3!2!1012 0 15 30 45 60 75 An GEOtop GEOtop Vs Analytical solution #layers= 100 , layer D= 300 mm, alpha= 0.4 n= 2.5 theta_s= 1 0.15 m 0.3 m 0.5 m 0.8 m 1.1 m 1.5 m 3 m 4.5 m GEOtop Notes on numerics of GEOtop R. Rigon and M. Dall’Amico Wednesday, April 24, 13
  • 59. Beyond and side by side with numerics - II Riccardo Rigon Dance,HenryMatisse,HotelBironearly1909 Wednesday, April 24, 13
  • 60. When you arrive at Naples, you are not at the South of Italy. When you are at Reggio Calabria, you are at the South! Giuseppe Formetta Wednesday, April 24, 13
  • 61. 58 •Produrre un sistema di supporto alle decisioni (DSS) •Produrre un sistema “democratico”, facilmente mantenibile, che favorisca la cooperazione tra ricercatori •Produrre Ricerca Riproducibile (RRS) •Adottare un sistema informatico appropriato a trattare i dati di contorno del solutore numerico Aver individuato le giuste equazioni e i corretti metodi numerici non basta Introduction R. Rigon Wednesday, April 24, 13
  • 62. 59 MODELS IS MODELING SCIENCE ? R. Rigon Wednesday, April 24, 13
  • 63. 60 To sum up DataParametersEquations Mass, momentum and energy conservation. Chemical transformations Forcings and obervables Equation’s constant. In time! In space they are heteorgeneous Hydrological models are the interplay of Models R. Rigon Wednesday, April 24, 13
  • 64. 61 To sum up Numerics, boundary and initial conditions Data Assimilation. Data Models. Tools for Analysis. Calibration, derivation from proxies DataParametersEquations Mass, momentum and energy conservation. Chemical transformations Forcings and obervables Equation’s constant. In time! In space they are heteorgeneous Models R. Rigon Wednesday, April 24, 13
  • 65. 62 Boundary and initial conditions Equations are not enough R. Rigon Wednesday, April 24, 13
  • 66. 63 Meteo Forcings Equations are not enough R. Rigon Wednesday, April 24, 13
  • 67. Hourly: - Precipitation (quantity and type, spatially distributed) - Relative humidity (spatially distributed) - Wind Speed and direction (spatially distributed) - Solar Radiation (spatially distributed) 64 Required Input Data Equations are not enough R. Rigon Wednesday, April 24, 13
  • 68. - Soil moisture (profile, in terms of matric potential, spatially distributed) - Soil temperature (profile, spatially distributed) - Surface water (if present) - Snow cover (if present) 65 Other Input Data Equations are not enough R. Rigon Wednesday, April 24, 13
  • 69. 66 Equations are not enough Fields of Parameters R. Rigon Wednesday, April 24, 13
  • 70. Data base Calibrazione EVALUATION OF STRATEGIES THROUGH MODELS STRATEGIES FOR POLICY MAKERS DATA INTERPRETATION 67 DDS Modelling is not just for Modelling R. Rigon Wednesday, April 24, 13
  • 71. 68 I - Once a model, design and implemented as a monolithic software entity, has been deployed, its evolution is totally in the hands of the original developers. While this is a good thing for intellectual property rights and in a commercial environment, this is absolutely a bad thing for science and the way it is supposed to progress. RobbedfromaCCApresentation A critique of old modelling style R. Rigon Wednesday, April 24, 13
  • 72. 69 II - Independent revisions and third-party contributions are nearly impossible and especially when the code is not available. Models falsification (in Popper sense) is usually impossible by other scientists than the original authors. III- Thus, model inter-comparison projects give usually unsatisfying results. Once complex models do not reproduce data it is usually very difficult to determine which process or parameterization was incorrectly implemented. A critique of old modelling style R. Rigon Wednesday, April 24, 13
  • 73. 70 MODELLING, FOR WHO ? Which end user do you have in mind ? SCIENTIST ARE NOT THE ONLY MODELS USERS R. Rigon Wednesday, April 24, 13
  • 74. 71 Users/Actors Four types of user have been defined: • Prime users: take or prepare decisions at a political level • Technical users: prepare projects or maps for the primary users • Other end-users: national agencies, representative groups, etc.They may take or prepare decisions at national or regional level, or represent stakeholder groups. • Model and application developers/modellers: build models and targeted applications SCIENTIST ARE NOT THE ONLY MODELS USERS R. Rigon Wednesday, April 24, 13
  • 75. 72 Users/Actors These groups have been further detailed according to their roles: • Coders: implement models, applications and tools. • Linkers: link existing models and applications. • Runners: execute existing models, but they create and define scenarios. • Players: play simulations and experiments comparing scenarios and making analyses. • Viewers: view the players’ results, have a low level of interaction with the framework. • Providers: provide inputs and data to all other user roles. SCIENTIST ARE NOT THE ONLY MODELS USERS R. Rigon Wednesday, April 24, 13
  • 76. 73 Users/Actors Roles Users Hard Coders Soft Coders Linkers Runners Player Viewers Providers Prime Other End Users Technical Researchers SCIENTIST ARE NOT THE ONLY MODELS USERS R. Rigon Wednesday, April 24, 13
  • 77. 74 Object-oriented software development. O-O programming is nothing new, but it has proven to be a successful key to the design and implementation of modelling frameworks. Models and data can be seen as objects and therefore they can exploit properties such as encapsulation, polymorphism, data abstraction and inheritance. Component-oriented software development. Objects (models and data) should be packaged in components, exposing for re-use only their most important functions. Libraries of components can then be re-used and efficiently integrated across modelling frameworks.Yet, a certain degree of dependency of the model component from the framework can actually hinder reuse. NEW (well relatively) MODELING PARADIGMS ModifiedfromRizzolietal.,2005 MODELLING BY COMPONENTS R. Rigon Wednesday, April 24, 13
  • 78. 75 MODELLING BY COMPONENTS R. Rigon Wednesday, April 24, 13
  • 79. 76 Discrete units of software which are re-usable even outside the framework, both for model components and for tools components. Seamless and transparent access to data, which are made independent of the database layer. A number of tools (simulation, calibration, etc.) that the modeller will be free to use (including a visual modelling environment). A model repository to store your model (and simulations) and to share it with others. BENEFITS MODELLING BY COMPONENTS R. Rigon Wednesday, April 24, 13
  • 80. 77 Tools for studying feedbacks among different processes. BENEFITS FOR SCIENTISTS Encapsulation of single processes or submodels MUCH MORE in the field of possibilities New educational tools and a “storage” of hydrological knowledge using appropriate onthologies MODELLING BY COMPONENTS R. Rigon Wednesday, April 24, 13
  • 81. 78 T H E R E E X I S T S U C H M O D E L I N G INFRASTRUCTURE ? Economic modelling frameworks^. GAMS (general algebraic modelling system, http://www.gams.com) and GTAP (global trade analysis program, http:// www.gtap.agecon.purdue.edu ) are some of the most used modelling systems in the agro-economic domain.They can also account for social variables, such as unemployment. ^from Rizzoli et al., (Modeling Framework (SeamFrame) Requirements 2005 MODELLING BY COMPONENTS R. Rigon Wednesday, April 24, 13
  • 82. 79 T H E R E E X I S T S U C H M O D E L I N G INFRASTRUCTURE ? Environmental modelling frameworks. If we limit to the agricultural domain, the list is quite limited.There is no ‘real’ framework according to the definition, but APSIM, STICS and CropSyst provide some of the functionalities. In this area SEAMFRAME is an emerging technology.When we consider the water management sector, we find many examples, such as TIME (the invisible modelling environment), IMT, OpenMI, and OMS, and, to a certain respect, JUPITER-API. ^ extended from Rizzoli et al., (Modeling Framework (SeamFrame) Requirements 2005 MODELLING BY COMPONENTS R. Rigon Wednesday, April 24, 13
  • 83. 80 T H E R E E X I S T S U C H M O D E L I N G INFRASTRUCTURE ? Other modelling software environments of notable interest are SME, MMS, ICMS, Tarsier, Modcom, Simile, but they are integrated modelling environments, not frameworks.This means that they can be used to perform assessments, analyses, decision support, but they do not provide programming structures such as classes, components, objects, design patterns to be used to create end-user applications. ^from Rizzoli et al., Modeling Framework (SeamFrame) Requirements, 2005 MODELLING BY COMPONENTS R. Rigon Wednesday, April 24, 13
  • 84. 81 T H E R E E X I S T S U C H M O D E L I N G INFRASTRUCTURE ? Other modelling software environments of notable interest are SME, MMS, ICMS, Tarsier, Modcom, Simile, but they are integrated modelling environments, not frameworks.This means that they can be used to perform assessments, analyses, decision support, but they do not provide programming structures such as classes, components, objects, design patterns to be used to create end-user applications. ^from Rizzoli et al., Modeling Framework (SeamFrame) Requirements, 2005 MODELLING BY COMPONENTS R. Rigon Wednesday, April 24, 13
  • 85. 82 T H E R E E X I S T S U C H M O D E L I N G INFRASTRUCTURE ? Atmospheric Sciences: Earth Sciences Modeling Framework (ESMF) (including Earth System Curator) High Performance Computing: Common Component Architecture (CCA) MODELLING BY COMPONENTS R. Rigon Wednesday, April 24, 13
  • 86. 83 DEPLOYEMENT PREREQUISITES ALLOWS WRAPPING OF EXISTING CODES BUT PROMOTES BETTER PROGRAMMING STRATEGIES BUILT BY OPEN SOURCE TOOLS DATA BASE PROVIDED OGC COMPLIANT CUAHSI SPECIFICATIONS AWARE DEPLOYABLE THROUGH THE WEB CAN BE ENDOWED WITH ONTOLOGIES R. Rigon Wednesday, April 24, 13
  • 87. 84 The complete framework PostGIS Postgres Web services WMS WFS-T WPS Web services WMS WFS-T WPS OMS3 Jgrasstools JGrass uDig Eclipse RCP H2 spatial UIBuilder GRASS GIS engine The Horton Machine Models BeeGIS DEPLOYEMENT R. Rigon with Hydrologis Wednesday, April 24, 13
  • 88. 85 Java JGrass uDig Eclipse RCP SOLIDITY: The framework bases on the solid fundaments of the Eclipse RCP framework first created by IBM. CONNECTIVITY and USERFRIENDLYNESS:The GIS framework is based on the uDig GIS framework, specialized in accessibility and remote connections ANALYSIS: The JGrass extentions define a layer of powerful GIS analysis tools and a straight connection to the GRASS GIS MOBILITY:The BeeGIS extentions supply tools for digital field surveying BeeGIS DEPLOYEMENT R. Rigon with Hydrologis Wednesday, April 24, 13
  • 89. 86 Connectivity and web standards Database: PostGIS-Postgres H2 spatial Web services WMS WFS-T soon WPS DATABASE: The GIS framework is ready to connect to external relational databases as postgres, mysql or oracle. To spatial data servers like postgis, Oracle spatial and Arcsde. It also comes with an internal spatial database based on H2 (no indexing yet)‫‏‬‫‏‬. It would be fairly easy to create connections to RESTful services to acquire data. WEB SERVICES AND STANDARD WEB PROTOCOLS: The framework supports OGC web standards like the web mapping service (WMS), the web feature service, also in transactional format (WFS- T). An efforth for the web processing service is ongoing. DEPLOYEMENT R. Rigon with Hydrologis Wednesday, April 24, 13
  • 90. 87 The analysis engine OpenMI GRASS THE CONSOLE ENGINE: the console engine supplies a framework for modeling development and scripting environment for fast methodology testing.The engine contains already masses of modules called Horton Machine for various terrain analyses as well as a stability model and hydrologic models. Also the engine gives access to the GRASS analysis modules. THE STANDALONE MODE:The need for usage of the modelling environment on supercomputer defined a heavily decoupled design for the console engine. The framework defines a strict interface between GUI and analysis engine, which makes it easy to exploit the console engine in standalone mode on server-side. The Horton Machine Models DEPLOYEMENT R. Rigon with Hydrologis Wednesday, April 24, 13
  • 91. 88 The relationship to OMS3 OMS3 THE OMS3 ENGINE: the console engine exposes a compiler for an OMS3 based modeling language.This gives a way to write scripts to execute openmi chained models. THE OGC STANDARDS EXTENTION:The need for big vector and raster data forced the team to extend the OMS3 standard interfaces with two GIS OGC standards: the OGC feature model the OGC grid coverage service (in prototype mode)‫‏‬ OGC IN JGRASS: the OGC feature and grid coverage models are served by the geotools libraries.The coverage model is based on the Java Advanced Imaging library and supports tilecaching for processing of large dataset. Coverage data are passed to native languages as C, C++ and Fortran through the easy adoptable JNA libraries. The Horton Machine Models DEPLOYEMENT R. Rigon with Hydrologis Wednesday, April 24, 13
  • 92. 89 Not just an idea but a reality The case of JGrass-NewAGE The State Of Art of the Project R. Rigon with Hydrologis and G. Formetta Wednesday, April 24, 13
  • 93. 90 Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 5 Modelling with componentsGIS Integration Multi-platform Multi-languageOpen-source Reproducible research system NewAge Goals: Motivation Outline Hydrological Components Modelling Framework Conclusions Trento 19 April 2013G. Formetta, The State Of Art of the Project R. Rigon with Hydrologis and G. Formetta Wednesday, April 24, 13
  • 94. 91 The RRS concept Since research and technical work rely on daily use of computer programs •Models configurations •Models setup •Models input data •Models output •Results interpretation Should be sharable in the easiest way The State Of Art of the Project R. Rigon, G. Formetta, and O. David Wednesday, April 24, 13
  • 95. 92Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 10 Model setting Hillslope Features Basin splitted in hillslopes Outline Calibration Issues Data AssimilationMotivation Hydrological Component Trento 17 June 2011G. Formetta, Trento 24 June 2011 Outline ConclusionsInformatic StructureHydrological Components Leipzig 05 July 2012G. Formetta, Motivation Outline Hydrological Components Modelling Framework Conclusions Trento 19 April 2013G. Formetta, The State Of Art of the Project Hydrologis, R. Rigon and G. Formetta Wednesday, April 24, 13
  • 96. 93 Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 1 Model setting Network splitted in links Links Features Outline Calibration Issues Data AssimilatMotivation Hydrological Component Trento 17 June 2011G. Formetta, Trento 24 June 2011 Outline Calibration IssuInformatic Structure Hydrological Components Leipzig 05 July 2012G. Formetta, Motivation Outline Hydrological Components Modelling Framework Conclusion Trento 19 April 2013G. Formetta, The State Of Art of the Project Hydrologis, R. Rigon and G. Formetta Wednesday, April 24, 13
  • 97. 94 Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 16 Outline Calibration Issues Data AssimilationMotivation Hydrological Component Trento 17 June 2011G. Formetta, Trento 24 June 2011 Interpolation Problem Verification Procedure Outline Calibration IssuesInformatic Structure Hydrological Components 1) Start from a complete dataset Outline ConclusionsInformatic StructureHydrological Components Leipzig 05 July 2012G. Formetta, Motivation Outline Hydrological Components Modelling Framework Conclusions Trento 19 April 2013G. Formetta, The State Of Art of the Project R. Rigon, G. Formetta, and O. David Wednesday, April 24, 13
  • 98. 95 Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 21 Precipitation Interpolation: Krigings Motivation Outline Hydrological Components Modelling Framework Conclusions Trento 19 April 2013G. Formetta, The State Of Art of the Project R. Rigon, G. Formetta, and O. David Wednesday, April 24, 13
  • 99. 96 Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 28 Shortwave Energy Model: raster mode application on Piave river Simulation time step: hourly Simulation Period: 01/10/201- 02/10/2010 Motivation Outline Hydrological Components Modelling Framework Conclusions Trento 19 April 2013G. Formetta, The State Of Art of the Project R. Rigon, G. Formetta, and O. David Wednesday, April 24, 13
  • 100. 97 Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 29 NewAge-OMS3 automatic calibration algorithms Generic Parameter set Optimal Parameter set Uncertainty: •  catchment heterogeneity •  model limitations •  measurement techniques Motivation Outline Hydrological Components Modelling Framework Conclusions Trento 19 April 2013G. Formetta, The State Of Art of the Project R. Rigon, G. Formetta, and O. David Wednesday, April 24, 13
  • 101. 98Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 34 Outline Calibration Issues Data AssimilationMotivation Hydrological Component Trento 17 June 2011G. Formetta, Trento 24 June 2011 Outline Calibration IssuesInformatic Structure Hydrological ComponentsOutline ConclusionsInformatic StructureHydrological Components Leipzig 05 July 2012G. Formetta, Basin Delineation Conclusions Formetta G., ARS-USDA-Fort Collins (CO) Motivation Hydrological Components Formetta G., David O. and Rigon R. Little Washita river basin: Rainfall-Runoff modelling solution Motivation Outline Hydrological Components Modelling Framework Conclusions Trento 19 April 2013G. Formetta, The State Of Art of the Project R. Rigon, G. Formetta, and O. David Wednesday, April 24, 13
  • 102. 99 Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 39 Something more than a classical model Outline Calibration Issues Data AssimilationMotivation Hydrological Component Rome 09 March 2011Trento 17 June 2011G. Formetta, Trento 24 June 2011 Different possibility to run OMS3 components uDig 1.3.1 Spatial Toolbox Trento 24 June 2011 Outline Calibration IssuesInformatic Structure Hydrological ComponentsOutline ConclusionsInformatic StructureHydrological Components Leipzig 05 July 2012G. Formetta, Motivation Outline Hydrological Components Modelling Framework Conclusions Trento 19 April 2013G. Formetta, The State Of Art of the Project Hydrologis, R. Rigon, G. Formetta, and O. David Wednesday, April 24, 13
  • 103. 100 Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 40 Something more than a classical model Outline Calibration Issues Data AssimilationMotivation Hydrological Component Rome 09 March 2011Trento 17 June 2011 uDig 1.3.1 Spatial Toolbox OMS3 Console Different possibility to run OMS3 components Outline Calibration IssuesInformatic Structure Hydrological ComponentsOutline ConclusionsInformatic StructureHydrological Components Leipzig 05 July 2012G. Formetta, Motivation Outline Hydrological Components Modelling Framework Conclusions Trento 19 April 2013G. Formetta, The State Of Art of the Project Hydrologis, R. Rigon, G. Formetta, and O. David Wednesday, April 24, 13
  • 104. 101 Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 41 Something more than a classical model Outline Calibration Issues Data AssimilationMotivation Hydrological Component Rome 09 March 2011Trento 17 June 2011G. Formetta, Trento 24 June 2011 OMS3 Console Command Line uDig 1.3.1 Spatial Toolbox Outline Calibration IssuesInformatic Structure Hydrological ComponentsOutline ConclusionsInformatic StructureHydrological Components Leipzig 05 July 2012G. Formetta, Different possibility to run OMS3 components Motivation Outline Hydrological Components Modelling Framework Conclusions Trento 19 April 2013G. Formetta, The State Of Art of the Project Hydrologis, R. Rigon, G. Formetta, and O. David Wednesday, April 24, 13
  • 105. 102 Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 42 Something more than a classical model Outline Calibration Issues Data AssimilationMotivation Hydrological Component Rome 09 March 2011G. Formetta, What is a .sim file? Outline Calibration IssuesInformatic Structure Hydrological ComponentsOutline ConclusionsInformatic StructureHydrological Components Leipzig 05 July 2012G. Formetta, Motivation Outline Hydrological Components Modelling Framework Conclusions Trento 19 April 2013G. Formetta, The State Of Art of the Project Hydrologis, R. Rigon, G. Formetta, and O. David Wednesday, April 24, 13
  • 106. 103 Formetta et al., CAHMDA IV Lhasa 2010 - July 21-23 The file structure is different respect to a common .sim file: - Model: here the model has to be calibrated - PSO Parameters: here have to be assigned - Model Parameters to optimize: here have to be assigned - Objective Function, Model output and measurements: here have to be assigned Particle Swarm calibration .sim file Outline ConclusioInformatic StructureHydrological Components Leipzig 05 July 2012G. Formetta, Motivation Outline Hydrological Components Modelling Framework Conclus Trento 19 April 2013G. Formetta, The State Of Art of the Project R. Rigon, G. Formetta, and O. David Wednesday, April 24, 13
  • 107. 104 EPILOGUE OUR AIM IS NOT TO MODEL EVERYTHING*OR DO A MODEL OF EVERYTHING BUT GIVE A S P A C E W E R E D I F F E R E N T , E V E N CONTRADICTORY, IDEAS,AND DATA CAN BE EXPLOITED IN A WAY WHICH PROPELS COLLABORATIVE EFFORTS BY SCIENTISTS AND USERS. *“Correctly interpreted, you know, pi contains the entire history of the human race.” -Dr. Irving Joshua Matrix, from M. Gardner,“The magic numbers of dr. Matrix” The Overall Goal R. Rigon, and the whole group Wednesday, April 24, 13
  • 108. 105 Direct Contributors: Andrea Antonello uDig and jgrasstools core developer and architect Giacomo Bertoldi GEOtop developer (energy budgets, vegetation) Emanuele Cordano GEOtop developer (Richards equation, I/O) Matteo Dall’Amico GEOtop developer (permafrost, GEOtop-mono) Stefano Endrizzi GEOtop developer (energy budgets, snow, permafrost) Giuseppe Formetta JGrass-NewAGE developers Silvia Franceschi Jgrasstools models developer and architect Riccardo Rigon All the merits go to the others Erica Ghesla, Andrea Cozzini, Silvano Pisoni and others contributed to original version of the Horton Machine Acknowledgements R. Rigon Wednesday, April 24, 13