44
Modelling tutorial – ESCTAIC 2012 Stephen E. Rees Center for Model-based Medical Decision Support, Aalborg University, Denmark

Modelling tutorial – ESCTAIC 2012

  • Upload
    becca

  • View
    51

  • Download
    0

Embed Size (px)

DESCRIPTION

Modelling tutorial – ESCTAIC 2012. Stephen E. Rees Center for Model-based Medical Decision Support, Aalborg University, Denmark. Tutorial Purpose and content. - PowerPoint PPT Presentation

Citation preview

Page 1: Modelling tutorial – ESCTAIC 2012

Modelling tutorial – ESCTAIC 2012

Stephen E. Rees

Center for Model-based Medical Decision Support, Aalborg University, Denmark

Page 2: Modelling tutorial – ESCTAIC 2012

Tutorial Purpose and content

• To provide an understanding of the principles of mathematical modelling, some of the terminology, and the issues related to clinical application.

– Dynamic verses steady state conditions.– Parameters or variables.– State variables, what are they? why are they useful?– Complexity, is bigger always better?– Application, modelling is fun but the purpose must be the focus.

– To illustrate these issue we will consider the acid-base chemistry of blood.

Page 3: Modelling tutorial – ESCTAIC 2012

The Henderson-Hasselbach equation

Questions that can be asked to this (or any) model• Where does it come from?• What does it assume?• Parameters, variables.• Is this enough complexity, for what purpose?

Page 4: Modelling tutorial – ESCTAIC 2012

k1

HA H+ + A-

k-1

Forward velocity proportional to concentration HA

vf [HA] or vf = k1 [HA]

Reverse velocity proportional to concentration H+ and A-

vr [H+] [A-] or vr = k-1 [H+][A-]

NOTE: k1 and k-1 are rate constants, defined as the fraction of mass transported in that direction per unit time

e.g. k1 = 0.5 /s ( or s-1)

k1 and k-1 describe the dynamic properties of the system.

Mathematical formulation: mass action equations

Page 5: Modelling tutorial – ESCTAIC 2012

k1

HA H+ + A-

k-1

At steady state the forward and reverse velocity is equivalent i.e.

vf = vr or k1 [HA] = k-1 [H+][A-]

If k1/k-1 = Keq then

Keq = [H+][A-]

[HA]

Weak acids dissociate reversibly in aqueous solution, e.g.

Mathematical formulation: mass action equations at steady state

Page 6: Modelling tutorial – ESCTAIC 2012

Keq = [H+][A-]

[HA]

Rearrange to give

[H+] = Keq [HA]

[A-]

Taking logarithms gives

log10[H+] = log10 Keq +log10 [HA] [A-]

From the definition of pH pH = - log10 [H+], we get

pH = pK + log10 [A-]

[HA]

Where pK is a new constant pK = -log10 Keq

The Henderson-Hasselbalch equation

Mathematical formulation: mass action equations at steady state

Page 7: Modelling tutorial – ESCTAIC 2012

The Henderson-Hasselbach equation

• Where does it come from? • What does it assume? • Parameters, variables. • Is this enough complexity, for what purpose?

So reaction

Translates to

Page 8: Modelling tutorial – ESCTAIC 2012

The Henderson-Hasselbach equation

• Where does it come from? – mass conservation.• What does it assume? – steady state• Parameters, variables. pK (parameter)• Is this enough complexity, for what purpose?

– For calculating from pH and CO2. - YES – For simulating what happens on changing CO2 in plasma –

NO

So reaction

Translates to

Page 9: Modelling tutorial – ESCTAIC 2012

Plasma

Translates to1

2

These are called ”mass-action” equations

Page 10: Modelling tutorial – ESCTAIC 2012

Can we simulate what happens, when we measure pH and CO2 in a plasma sample and want to understand what happens if we change CO2?

Page 11: Modelling tutorial – ESCTAIC 2012

Can we solve when changing CO2

Equations for situation (a) Equations for situation (b)

Known values – CO2(a), CO2(b), pK, pKA

Unknown values -

Four equations, seven unknowns – What are we missing?

Describe the experiment , with pictures and maths

Page 12: Modelling tutorial – ESCTAIC 2012

Are there any physical constraints when we change only CO2 ?

Page 13: Modelling tutorial – ESCTAIC 2012

Mass balance equations.

• The total concentration of protein, phosphate etc (Atot) remains constant.

• The total buffer base (BB) remains constant

These are called ”mass balance” equations.

Page 14: Modelling tutorial – ESCTAIC 2012

Can we solve when changing CO2

Equations for situation (a) Equations for situation (b)

Known values – CO2(a), CO2(b), pK, pKA, Atot

Unknown values -

Eight equations, eight unknowns – Now we can solve

Page 15: Modelling tutorial – ESCTAIC 2012

So plasma can be modelled as

For the situation when we are interested in changing CO2

Page 16: Modelling tutorial – ESCTAIC 2012

Plasma

Page 17: Modelling tutorial – ESCTAIC 2012

Is the model still adequate as a description of anaerobic metabolism?

Tissue (anaerobic metabolism)

Page 18: Modelling tutorial – ESCTAIC 2012

Lets re-visit our assumptions

• The total concentration of protein, phosphate etc (Atot) remains constant.

• The total buffer base (BB) remains constant

These are called ”mass balance” equations.

Page 19: Modelling tutorial – ESCTAIC 2012

Lets re-visit our assumptions

• The total concentration of protein, phosphate etc (Atot) remains constant.

• The total buffer base (BB) remains constant

• For a closed system, the total CO2 remains constant

These are called ”mass balance” equations.

Page 20: Modelling tutorial – ESCTAIC 2012

Can we solve when adding strong acidEquations for situation (a) Equations for situation (b)

Known values – CO2(a), pK, pKA, Atot

Unknown values -

Eleven equations, Eleven unknowns – we can solve

CO2(b),

Page 21: Modelling tutorial – ESCTAIC 2012

Plasma

Page 22: Modelling tutorial – ESCTAIC 2012

So plasma can be modelled as

One mass-action per chemical reaction, one mass-balance per component.

Page 23: Modelling tutorial – ESCTAIC 2012

Plasma - components, reactions, math.

One mass-action per chemical reaction, one mass-balance per component.

Page 24: Modelling tutorial – ESCTAIC 2012

So plasma can be modelled as

For the situations when we are interested in changing CO2 or changing strong acid or base concentration

So – The ”correctness” of a model depends on what we want to do with it!

Page 25: Modelling tutorial – ESCTAIC 2012

How much do we need to know to know everything about plasma?

5 equations, 8 unknowns – This means that values of 3 variables is enough to completely understand plasma (not all combinations work), i.e. We need 3 state variables. Not any variables, one for each component of plasma.

Page 26: Modelling tutorial – ESCTAIC 2012

State variables

• A state variable is one of the set of variables that describe the "state" of a dynamical system. Intuitively, the state of a system describes enough about the system to determine its future behaviour. (from Wikipedia)

Page 27: Modelling tutorial – ESCTAIC 2012

How much do we need to know to know everything about plasma?

5 equations, 8 unknowns – This means that values of 3 variables is enough to completely understand plasma, i.e. We need 3 state variables. Which to choose depends upon the experiment we wish to simulate.

Page 28: Modelling tutorial – ESCTAIC 2012

Exercise: Which variables are appropriate in the following experiments?

1. We measure a sample of plasma and want to simulate what will happen if we change CO2? (Assume we know Atot)

2. We measure a sample of plasma and want to simulate non-selective (i.e. non-charge dependent, Atot) removal of plasma protein?

3. We measure two different samples of plasma and want to simulate what happens when we mix them?

Page 29: Modelling tutorial – ESCTAIC 2012

So plasma can be modelled as

Is this enough to simulate what happens in blood – changing CO2 levels, addition of acid, changing O2 levels, etc?

Page 30: Modelling tutorial – ESCTAIC 2012
Page 31: Modelling tutorial – ESCTAIC 2012

Components

Plasma

Erythrocyte bicarbonate

Erythrocyte haemoglobin

Page 32: Modelling tutorial – ESCTAIC 2012

Haemoglobin structure

NH - - - - - - - - N C C N C - - - - - - - - C - - - - - - - - COO3 -+

RH RH RHRH

HOHamino acid

Amino acid side chainsAmino end of chain

carboxyl endof chain

R

H

R

H+N

H+

H

H

N

H+

H

H

N

H+

COO

H

H-

Form 1 Form 2Form 2 Form 3

+

Form 1 Form 2

H

H H

CH2

C NH

CHN

HC

Fe++

O

O

1 i i+1 b

Oxygen binding site

Histidine side chainbinding to Feposition 87, chainsposition 92, chains

++

Page 33: Modelling tutorial – ESCTAIC 2012

Consider the protein without side chains

Page 34: Modelling tutorial – ESCTAIC 2012

Consider the protein without side chains

So one can write mass-action and mass balance for these.

Page 35: Modelling tutorial – ESCTAIC 2012

Haemoglobin structure

NH - - - - - - - - N C C N C - - - - - - - - C - - - - - - - - COO3 -+

RH RH RHRH

HOHamino acid

Amino acid side chainsAmino end of chain

carboxyl endof chain

R

H

R

H+N

H+

H

H

N

H+

H

H

N

H+

COO

H

H-

Form 1 Form 2Form 2 Form 3

+

Form 1 Form 2

H

H H

CH2

C NH

CHN

HC

Fe++

O

O

1 i i+1 b

Oxygen binding site

Histidine side chainbinding to Feposition 87, chainsposition 92, chains

++

Page 36: Modelling tutorial – ESCTAIC 2012

Consider the protein side chains

So one can write mass-action and mass balance for these.

Page 37: Modelling tutorial – ESCTAIC 2012

Why do we need this level of complexity – Bohr-Haldane effects.

O2Haldane

Haldane

Page 38: Modelling tutorial – ESCTAIC 2012

Why do we need this level of complexity – Bohr-Haldane effects.

O2Haldane

Haldane

CO2

So, if you want to simulate changes in O2 or CO2 in whole blood, you need Bohr-Haldane

Page 39: Modelling tutorial – ESCTAIC 2012

The full model of blood

Page 40: Modelling tutorial – ESCTAIC 2012

Tutorial Purpose and content

• To provide an understanding of the principles of mathematical modelling, some of the terminology, and the issues related to clinical application.

– Dynamic verses steady state conditions.– Parameters or variables.– State variables, what are they? why are they useful?– Complexity, is bigger always better?– Application, modelling is fun but the purpose must be the focus.

– To illustrate these issue we will consider the acid-base chemistry of blood.

Page 41: Modelling tutorial – ESCTAIC 2012

Summary, conclusions• To provide an understanding of the principles of

mathematical modelling, some of the terminology, and the issues related to clinical application.

– Dynamic verses steady state conditions.• Are the dynamic of the system interesting to our problem?

– Parameters or variables.• What can we estimate? What is constant?

– State variables, what are they? why are they useful?• What variables usefully and completely describe the current state?

– Complexity, is bigger always better?• How many parameters do we need?

– Application, modelling is fun but the purpose must be the focus.

• This must drive complexity, otherwise it is purely academic.

Page 42: Modelling tutorial – ESCTAIC 2012

Simulation of blood mixing

From: Rees S.E et al, EJAP 2010, 108:483-494

Page 43: Modelling tutorial – ESCTAIC 2012

Procedure

Page 44: Modelling tutorial – ESCTAIC 2012

Simulation of blood mixing

From: Rees S.E et al, EJAP 2010, 108:483-494