Modelica Day 2015 Jiří Kofránek Univerzita Karlova v Praze, 1. lékařská fakulta, Laboratoř biokybernetiky a počítačové podpory výuky
Naše cesta k Modelice Jiří Kofránek Modelica pro simulace
Formalizace fyziologických vztahů Annual Review of Physiology 1972 A.C. Guyton
Functional block 20 0-4 50 Divider Formalizace fyziologických vztahů??!! Integrator Multiplier PPA PLA Summator + + - PCP PCP=0.55 PLA+0.45 PPA
RPF - Renal plasma flow [ml/min] GKf - Glomerular filtration coeffitient [ml/min/torr] 7 GKf RAP RAP - Renal artery pressure [torr] 1 RAP PAff - Afferent artery pressure [torr] RBF - Renal blood flow [ml/min] 4 RBF PAf f PAff=RBF*AffC GP = RAP - PAff GP - Glomerulal pressure [torr] GP GKf GKf - Glomerular filtration coeffitient [ml/min/torr] Grafické zobrazení matematických vztahů? NETP - Net pressure gradient in glomerulus [torr] GFR = NETP*GKf GFR - Glomerular filtration rate [ml/min] Ne! 1 GFR 2 AffC AffC - Afferent artery conductance [ml/min/torr] 3 GFR - Glomerular filtration rate [ml/min] TubC - Tubule conductance [ml/min/torr] PTP - Proximal tubule pressure [torr] TubC PTP = GFR/TubC AVeCOP - Average colloid osmotic pressure [torr] NetP = GP - PTP - AVECOP GFRold - GFRnew Solve f (z) z f(z) = 0 Algebraic Constraint 5 RPF 6 APr APr - Afferent protein concentration [g/ml] 1160 B - Landis-Pappenheimer coeffitient [torr/g/ml]1 Grafické zobrazení GFR - Glomerular filtration rate [ml/min] FF - Filtration fraction [relative number] transformace FF = GFR/RPF u 2 vstupních hodnot na výstupní (APr)^2 B * (Apr)^2 ACOP - Afferent colloid osmotic pressure [torr] 320 A - Landis-Pappenheimer coeffitient [torr/g/ml] A*Apr ACOP = A*Apr + B*(APr)^2 1 EPr - Efferent protein concentration [g/ml] u 2 1 - FF EPr = APr / (1-FF) (EPr)^2 B * (Epr)^2 ECOP - Efferent colloid osmotic pressure [torr] A*Epr ECOP = A*Epr + B*(EPr)^2 ACOP+ECOP 2 AVeCOP = (ACOP+ECOP)/2 Matlab/Simulink simulation chip: G L O M E R U L A R F I L T R A T I O N
Softwarové nástroje pro tvorbu modelů 6.25 Normal proximal tubule conductance [ml/min/torr] 0.07 Plasma protein cnoncentration [g/ml] 16 Normal glomerular filtration coeffitient [ml/min/torr] 99.65 RAP AffC TubC RBF RPF APr GKf G L O M E R U L A R F I L T R A T I O N INPUTS : RAP - Renal artery pressure[torr] Affc - Afferent artery conductance [mll/min/torr] TubC - Proximal tubule conductaqnce [ml/min/torr] RBF - Renal blood flow [ml/min] RPF - Renal plasma flow APr - Plasma protein concentration (in afferent artery) [g/ml] GKf - Glomerular filtration coeffitient [ml/min/torr] OUTPUT : GFR - Glomerular filtration rate [ml/min] Calculation of glomerular filtration rate1 GFR 0.8 Normal Na proximal fractional reabsorbtion 125.1 PNa GFR LogA2 PrxFNaNorm Log Pd C M Y O G E N I C R E S P O N S E 200 Venous conductance [ml/min/torr] 7 Vena renalis pressure [torr] 0.44 Hematocrit AffC EffC RenVenC AP VP Hct Clamp R E N A L P E R F U S I O N INPUTS : AffC - Afferent artery conductance [ml/min/torr] EffC Efferent artery conductance [ml/min/torr] RenVenC - Renal venous conductance [ml/min/torr] AP - Arterial pressure [torr] VP - Vena renalis pressure [torr] Hct - Hematocrit [relative number] Clamp - Renal artery pressure drop caused by renal artery clamp [torr] OUTPUTS : RAP - Renal artery pressure [torr] RBF - Renal blood flow rate[ml/min] RPF - Renal plasma flow rate[ml/min] RAP RBF RPF RAP 662.1 INPUT : RAP - Renal artery pressure [torr] OUTPUT : AffC - Myogenic effect [ x Normal] AffMyo1 Calculation of the myogenic response to changes in renal perfusion pressure (afferent conductance responds to changes in perfusion pressure, with pressure increases causing vasoconstriction) 1182 0.9999 0 Calculation of renal artery pressure and renal blood flow rate Renal artery pressure clamp drop [torr] 29.83 A F F E R E N T A R T E R Y AffMyo INPUTS : AffMyo - Myogenic effect [ x Nomal] AffC MDSig - Macula densa feedback signal [ x Normal] MDSig AffNorm - Normal conductance in afferent artery [ml/min/torr] OUTPUT : AffC - Vascular conductance [ml/min/torr] Calculates conductance of afferent artery Af f Norm 30 Normal conductance of Afferent artery [ml/min/torr] Matlab/Simulink
Kauzální modelovací nástroje Je jednoznačně definován postup výpočtu 200 Venous conductance [ml/min/torr] 7 6.25 Normal proximal tubule conductance [ml/min/torr] 0.07 Plasma protein cnoncentration 16 [g/ml] Normal glomerular filtration coeffitient [ml/min/torr] R E N A L P E R F U S I O N AffC INPUTS : EffC AffC - Afferent artery conductance [ml/min/torr] EffC Efferent artery conductance [ml/min/torr] RenVenC RenVenC - Renal venous conductance [ml/min/torr] AP - Arterial pressure [torr] VP - Vena renalis pressure [torr] AP Hct - Hematocrit [relative number] Clamp - Renal artery pressure drop VP caused by renal artery clamp [torr] 99.65 RAP RBF RAP G L O M E R U L A R F I L T R A T I O N AffC INPUTS : RAP - Renal artery pressure[torr] TubC 125.1 Affc - Afferent artery conductance [mll/min/torr] TubC - Proximal tubule conductaqnce [ml/min/torr] RBF RBF - Renal blood flow [ml/min] GFR RPF - Renal plasma flow RPF APr - Plasma protein concentration (in afferent artery) [g/ml] GKf - Glomerular filtration coeffitient [ml/min/torr] APr OUTPUT : GFR - Glomerular filtration rate [ml/min] GKf Calculation of glomerular filtration rate1 0.8 Normal Na proximal fractional reabsorbtion M Y O G E N I C R E S P O N S E INPUT : RAP RAP - Renal artery pressure [torr] AffMyo1 0.9999 OUTPUT : AffC - Myogenic effect [ x Normal] Calculation of the myogenic response to changes in renal perfusion pressure (afferent conductance responds to changes in perfusion pressure, with pressure increases causing vasoconstriction) 1182 N A T R I U M - P R O X I M A L T U B U L E PNa MDNaFlow INPUTS : PNa - Plasma sodium concentration [mmol/ml] GFR - GLomerulal filtration rate [ml/min] GFR LogA2 - Logarithm of plasma angiotensin concentration [pg/ml] PrxFNaNorm - Normal value of sodium proximal PdxNaReab fractional reabsorbtion [relative number] LogA2 OUTPUTS : MDNaFlow - Sodium outflow [mmol/min] PdxNaReab - Proximal sodium reabsorbrtion [mmol/l] PrxFNa - Proximal fractional sodium reabsorbtion PrxFNa PrxFNaNorm [relative number] Calculation of proximal tubule sodium reabsorbtion 3.648 14.37 0.7975 Vena renalis pressure [torr] Hct 0.44 Clamp Hematocrit OUTPUTS : RAP - Renal artery pressure [torr] RBF - Renal blood flow rate[ml/min] RPF - Renal plasma flow rate[ml/min] RPF 662.1 0 Calculation of renal artery pressure and renal blood flow rate Renal artery pressure clamp drop [torr] Kauzální modelování 29.83 A F F E R E N T A R T E R Y AffMyo INPUTS : AffMyo - Myogenic effect [ x Nomal] AffC MDSig - Macula densa feedback signal [ x Normal] MDSig AffNorm - Normal conductance in afferent artery [ml/min/torr] OUTPUT : AffC - Vascular conductance [ml/min/torr] Af f Norm 30 Normal conductance Model v Simulinku vyjadřuje spíše způsob výpočtu než strukturu modelované reality AP EffC ZNAE A R T E R I A L P R E S S U R E INPUTS : ZNAE - ECF sodium content [mmol] AP LogA2 loga2 - Logarithm of plasma angiotensin concentration [pg/ml] AP APNorm - Normal value of arterial pressurel [torr] OUTPUT : 100 APNorm AP Arterial pressure [torr] APNorm [torr] Control of arterial pressure by angiotensin and extracellular sodium content LogA2 Scope1 Scope A N G I O T E N S I N PRA 18.84 A2 INPUTS : PRA - Plasma renin activity [ Units/ml] CEAct - Converting enzyme activity [x Normal] 1.275 CEAct A2Inf Angiotensin 2 infusion rate [ng/min] LogA2 OUTPUTS : loga2 A2 - Plasma angiotensin 2 concentration [ pg/ml] A2Inf LogA2 - logarithm of plasma angiotensin concentration [ pg/ml]) Calculation of plasma angiotensin concentration and logarithm of plasma angiotensin concentration (most of the action of angiotensin are logarithmic in nature: concentration changes at higher concentrations produce less of an Calculates conductance of afferent artery of Afferent artery [ml/min/torr] E F F E R E N T A R T E R Y loga2 INPUTS : loga2 - logarithm of angiotensin concentration EffC MDSig - Macula densa feedback signal [ x Normal] MDSig EffNorm - Normal conductance in afferent artery [ml/min/torr] 25.1 OUTPUT : EffC - Vascular conductance [ml/min/torr] Ef f Norm 25 Normal conductance Calculates conductance of efferent artery of Efferent artery [ml/min/torr] 99.65 0.9418 R E N I N MDSig INPUTS : MDSig - Macula densa feedback signal [ x Normal] PRA VECml - Ectracellular fluid volume OUTPUT : VECml PRA - Plasma renin activity [ Units/ml] 1 Converting Enzyme Calculation of plasma renin activity Activity 0 Angiotensin Infusion Rate VECml 1.006 M A C U L A D E N S A MDNaFlow INPUTS : MDNaFlow - Macula densa sodium flow [mmol/min] MDSig loga2 - Logarithm of plasma angiotensin concentration [pg/ml] LogA2 MDNorm - Normal macula densa feedback signal [ x Normal] OUTPUT : MDSig - Macula densa feedback signal [ x Normal] MDNorm Macula densa feedback signal calculation based on macula densa sodium flow and angiotensin concentration 1 Normal macula densa feedback signal effect than changes of the same size at lower concentrations) A L D O S T E R O N E loga2 LogA2 INPUTS : loga2 - Logarithm of plasma angiotensin concentration [pg/ml] Aldo AldoInf - Aldosterone infusion rate [ng/min] VTW - Total body water content [ml] OUTPUT : Aldo - Plasma aldosterone concentration [ ng/dl] Calculation of plasma aldosterone concentration AldoInf 0 Aldosteron Infusion Rate VTWml -C- Totasl body water content [ml] Aldo MDNaFlow Aldo N A T R I U M - D I S T A L T U B U L E DisNaFlow INPUTS : MDNaFlow - Sodium inflow [mmol/min] Aldo - Plasma aldosterone level [pg/ml] DisFNaNorm - Normal value of sodium distal fractional reabsorbtion [relative number] DisNaReab DistNaFlow 1.855 1.792 OUTPUTS : DisNaFlow - Sodium outflow [mmol/min] 6.846 0.5 DisFNaNorm DisNaReab - Distal sodium reabsorbrtion [mmol/min] DisFNa - Distal fractional sodium reabsorbtion DisFNa 0.5086 Normal distal [relative number] fractional reabsorbtion for Na Calculation of distal tubule sodium reabsorbtion 2159 S I M P L E S O D I U M B A L A N C E Matlab/Simulink 0.144 NaDiet ZNAE INPUTS : NaDIet - Dietary sodium intake [mmol/min] NaUrine - Sodium urine outflow [mmol/min] NaUrine VECml - Extracellular fluid volume [ml] PNa OUTPUT : ZNAE - ECF sodium content [mmol] VECml PNa - Plasma sodium concentration [mmol/ml] Extracellular sodium quantity is the integral over time dietary sodium intake minus urinary sodium loss 0.125 NaDiet [mmol/min] 15000 Extracellular fluid volume[mmol/min]1 0.1248 1.668 0.9304 N A T R I U M - C O L L E C T I N G D U C T NaUrine INPUTS : DisNaFlow DisNaFlow - Sodium inflow [mmol/min] CDFNaNorm - Normal value of sodium distal fractional reabsorbtion [relative number] CDNaReab OUTPUTS : NaUrine - Sodium urine outflow [mmol/min] CDNaReab - Collecting duct sodium reabsorbrtion [mmol/min] CDFNaNorm CDFNa CDFNa - Collecting duct fractional sodium reabsorbtion [relative number] 0.93 Normal collecting duct fractional reabsorbtion for Na Calculation of collecing duct sodium reabsorbtion
Modelica pro simulace
Modelica pro simulace
Modelica pro simulace
Děkuji za pozornost kofranek@gmail.com Modelica pro simulace