Reservoir modeling Reservoir modelling Linear reservoirs Paul Torfs Basic equaion for one reservoir:) change in sorage = sum of inflows minus ouflows = Q in,n Q ou,n n n jus an ordinary differenial equaion ODE) ricky pars are in he descripion of he fluxes: Q = QS) use an ordinary ODE-solver? NO!: here is a need for a reamen ha respecs hydrology I will need some ime o prove his poin Saring up reservoir modeling The linear reservoir, no inpu Before saring up somehing new: firs review he classical linear reservoir heory he mahemaics he numerics he ypical use in hydrology Q ou = S) = S) easy mahemaical soluion: S) = S) e /Tres sysem ime scale =
One reservoir, no inpu One reservoir, no inpu mahs: S) = S) e /Tres mahs: S) = S) e /Tres S).5 = S).5 = 3 4 5 3 4 5 S).5 =. S).5 = 3 4 5 3 4 5 One reservoir wih inpu One reservoir wih inpu THEOREM Le = I) S T Then he soluion is given by: ) S) = J) J) + S) where J is a soluion of: dj = e/t I) e /T THEOREM from: follows: S) = ) J) c e /T dj = e/t I) = I) S T PROOF = dj + e /T ) J) c = I) S T T e /T
Example one reservoir wih inpu Example one reservoir wih inpu = Q in) Q ou ) = e / T r S dj = e / e /Tr = e J) = T r ) e T r T i ) Tr T i ) Q ou ) = e / + Q) ) e /Tr Tr Tr Qin), 8, 6, 4 =, 3 4 5... Q ou ) = Tr e / + Q) ) e /Tr Tr Qou), 8, 6, 4 T r =, 3 4 5 Example one reservoir wih inpu Example one reservoir wih inpu Q ou ) = e / + Q) ) e /Tr Tr Tr = A + cos/ ) ) T r S Qin).8.6.4 =.. 3 4 5 π n Qou).8.6.4 T r =. 3 4 5
Example one reservoir wih inpu Example one reservoir wih inpu = Q in) Q ou ) = A + cos/ ) ) T r S dj = A + cos/ ) ) e /Tr =... bu finally: = Q in) Q ou ) = A + cos/ ) ) T r S...... follows a lo of mahs, using e.g.: cosbx)e ax =...... a + b cosbx θ) eax where θ = aan b a ) Q ou ) = S) A) e { + A + Tr ) where: θ = aan /T r) + Tr ) cos/ θ) } One reservoir, varying inpu: analyics One reservoir, varying inpu: analyics { } Q ou ) = + A + ) cos/ θ) + Tr case : T r = damping large = n =.5 { } Q ou ) = + A + ) cos/ θ) + Tr case : T r = small large = n =.5 Q ou Q in Q ou Q in 4 6 8 4 6 8
One linear reservoir One reservoir, no inpu: numerics Conclusion concerning he mahs: we do maser he mahemaics or somebody does) ofen encounered in hydrology does seem o work simple mahs any oher can be in firs order be approximaed by linear examples given are raher arificial in erms of inpu: wha if rainfall is inpu? can solve i only numerically = S Choose discreizaion Sn ) S[n] Choose finie difference scheme so wha abou he numerics of one linear reservoir? Explici scheme: S[n + ] S[n] = S[n] One reservoir, no inpu: numerics One reservoir, no inpu: numerics Numerics: Compuer: S[n + ] S[n] for n =,,,... S[n + ] = = S = S[n] ) S[n] S[n] = ) S[n ] = ) n S[] choice of influences qualiy convergence: S S < OK: S S < < non physical??? S < < insabiliy S
One reservoir, no inpu: choice of One reservoir, no inpu: numerics.5 =..5 3 4 5.5 =.5 Implici scheme: Compuer: = S S[n + ] S[n] = S[n + ] SOLVE FOR S[n + ] :.5 3 4 5.5 =. In his linear) case: S[n + ] = S[n] S[n + ].5 3 4 5.5 =. S[n + ] = + S[n].5 3 4 5 for all : < + < always sable) One reservoir, no inpu: choice of One reservoir, no inpu.5 =. Conclusion:.5 3 4 5 6 7.5 =.5.5 3 4 5 6 7.5 =..5 3 4 5 6 7.5 = 6 S6) = e 6 =.5 S[] =.49.5 3 4 5 6 7 oo large: bad approximaion,..., insabiliy oo small: much compuaion ime more general: numerical scale real sysem scale
One reservoir, varying inpu: numerics One reservoir, varying inpu: example Qin Explici: S[n + ] S[n] = Q in n ) S[n] 3 4 5 3 Implici: S[n + ] S[n] = Q in n + ) ) S[n + ]..4.8. Qou 3 One reservoir, varying inpu: example One reservoir, varying inpu: example Qin Qin 3 4 5 3 4 5 3 3..5..5..5 Qou.3.5.7.9 Qou 3 3
Coupled reservoirs Double coupled sysem sysem wo sysem scales: = ; =.; S S = S = S S was calculaed above: S ) =... e S ) =... e +... e = S S ) S = S + S = S S ) S = S S Double coupled sysem General soluion echnique = S S ) S = S + S = S S ) S = S S S A,... A,N S d. =...... S N A N,... A N,N S N in marix noaion: d [ S ] [ ] [ ] S = S S look for w,... w N such ha: d w S ) +... w N S N ) ) = λ w S ) +... w N S N )) general linear sysem: S A,... A,N S d. =...... A N,... A N,N S N S N because hen: w S ) +... w N S N ) = e λ
General soluion echnique General soluion echnique if : S A,... A,N S d. =...... S N A N,... A N,N S N d w S ) +... w N S N ) ) = λ w S ) +... w N S N )) A,... A,N [ ] w... w N..... = λ [ ] w... w N A N,... A N,N A,... A,N [ ] w... w N..... = λ [ ] w... w N A N,... A N,N is equivalen afer ransponing) o: A,... A N, w w...... = λ. A,N... A N,N w N w N = classical eigenvecor/eigenvalue problem Back o he world: double coupled sysem sysem Double coupled sysem:analyics real space eigen space S S = S + S = S S he marix: [ ] U = S + S du = U U ) = U ) e = S S ) S = S + S = S S ) S = S S has eigenvecors [ ] [ ] and U = S S du = U ) U ) = U ) e
Double coupled sysem:analyics Double coupled sysem:analyics Example: S ) = and S ) = : Example: S ) = and S ) = : S ) = 3 e + e S ) = 3 e e S ) = 3 e + e S ) = 3 e e.5.5.5.5 balance ime scale = / visible connecion scale=/ firs balance, hen ogeher as one Double coupled sysem: numerics Double coupled sysem: numerics: explici Explici: S [n + ] = S [n] + S [n + ] = S [n] + { S [n] + S } [n] { + S [n] S } [n].5.5 =.9...3.4 Implici: S [n + ] = S { [n] + S [n + ] + S } [n + ] S [n + ] = S { [n] + + S [n + ] S } [n + ] [ ] [ ] [ ] S [n + ] + S [n] = S [n + ] + S [n].5.5 =....3.4
Double coupled sysem: numerics: implici Double coupled sysem.5.5 =.9...3.4.5.5 =....3.4 fully coupled sysems can generae small inernal ime scales imporance may be dependen on boundary condiions beware off small invisible inernal ime scales Typical oupu of a linear reservoir:..5..5. Qou 3 Typical oupu of a linear reservoir:..5..5. Qou 3 he reservoir is mos clearly visible in he recession limbs Q) e k idenifying k = / is called recession analysis
5 5..5..5. Index Qou idenify recession limbs 5 5 5 3..5..5 reclimbframe$posinlimb reclimbframe$q plo recession limbs: Q vs place in limb 5 5 5 3 4 6 8 reclimbframe$posinlimb logreclimbframe$q) log-plo recession limbs: logq) vs place in limb 5 5 5 3 4 6 8 i logq log-plo recession limbs: logq)) logq) vs place in limb
5 5 5 3 4 6 8 i logq and hen jus do linear regression, slope = k = / 3 3 4 5 6 Index QIsel now for some real daa: discharges of he Isel river 3 3 4 5 6 Index QIsel recession limbs of he Isel river 4 6 8..5..5 i logq recession analysis for he Isel river
Eigenvalues and eigenvecors Eigenvalues and eigenvecors Marix muliplicaion: is defined by: Example: M v = w M, M, M,3 v w M, M, M,3 v = w M 3, M 3, M 3,3 v 3 w 3 M, v + M, v + M,3 v 3 = w M, v + M, v + M,3 v 3 = w M 3, v + M 3, v + M 3,3 v 3 = w 3 = 7 3 5 Definiion If M v = λ v hen v is called an eigenvecor and λ he corresponding eigenvalue Example: 6 = 6 = 3 3 Quesions:. are here more eigenvecors? and eigenvalues?. how many? 3. how o find hem? Eigenvalues and eigenvecors Eigenvalues and eigenvecors Are here more eigenvecors? How many? In general: as many as here are dimensions 3 = 3 = 3.5.5.5 6 = 6 = 3 3 is no a differen eigenvecor from: 6 = 6 = 3 3 so: eigenvecors are defined upon a normalizaion facor.89.39.89.39 =.5 =.68.39.5.89.5.39.9983.39.89 =.5 =.68.89.5.39.5
How o calc eigenvecors and eigenvalues?