// Cardiovascular system - Constrained-Frank-Starling-Baroceptor // Set up for cardiac function curves // Contractility (cardiac function) is increased progressively IndVars: CNT DepVars: Va,Vv,CVP,MAP,COL,HR,SV Params: //Fixed parameter values & compliances Vblood = 3.5 SVR = 17 CPLv = 0.45 CPLratio = 20 CPLa = CPLv/CPLratio //Unstressed volumes and pressures //At MCP, Vv/CPLv = Va/CPLa and Va + Vv = Vblood Vblood = 3.5 Va0 = Vblood/(CPLratio + 1) Vv0 = Vblood-Va0 MCP = Va0/CPLa //Calculate desired normal volumes and pressures when stressed //xa and xv are scaling factors that let the normal pressures change with compliance //Empirically force one third of blood to be in the arterial compartment when stressed xa = 3 PaS = xa/CPLa VaS = Vblood*1/3 xv = 0.06 PvS = xv/CPLv VvS = Vblood*2/3 //Calculated pressures - venous //A line with point through (Vv0,MCP) slopeCVP = (MCP-PvS)/(Vv0-VvS) interCVP = MCP-slopeCVP*Vv0 CVPtemp = slopeCVP*Vv+interCVP CVP = IFLTZERO(CVPtemp,0,CVPtemp) //Calculated pressures - arterial //A line with point through (Va0,MCP) slopeMAP = (PaS-MCP)/(VaS-Va0) interMAP = MCP - slopeMAP*Va0 MAPtemp = slopeMAP*Va+interMAP MAP = IFLTZERO(MAPtemp-MCP,MCP,MAPtemp) //HR control //Constrain HR to be between 0 and 220 MAPset = 100 HRgain = 1.8 MAPdelta = MAPset-MAP HRtemp = MAPset + MAPdelta*HRgain HR = IFLTZERO(HRtemp,0,IFLTZERO(220-HRTEMP,220,HRTEMP)) //Calculate stroke volume from CVP and Contractility //A logistic curve kc = 0.00001 SVlim = 5.1 SV50 = 2.55 nSV = 1.9 SVtemp = ((Svlim*CVP^nSV)/(SV50^nSV+CVP^nSV))*kc*CNT SV = IFLTZERO(SVtemp,0,SVtemp) //Cardiac output //Constrain CVP to be positive COL = SV*HR CORtemp1 = (MAP)/SVR CORtemp2 = (MAP-CVP)/SVR COR = IFLTZERO(CVP,CORtemp1,CORtemp2) //Differential equations for volume changes Vv' = COR-COL Va' = COL-COR //Parameter values 0