/* * Simplified Models For Gas Exchange In The Human Lungs * * Model Status * * This CellML model runs in both PCEnv and COR to recreate the * published results. The units have been checked and they are * balanced. Please note that this particular version of the CellML * model does not correspond with any one of the four possible * models from the original publication. Rather it is a combination * model, made up of equations 2,7,9,10,11,12,13,16, and 20. * * Model Structure * * ABSTRACT: This paper presents a hierarchy of models with increasing * complexity for gas exchange in the human lungs. The models span * from a single compartment, inflexible lung to a single compartment, * flexible lung with pulmonary gas exchange. It is shown how the * models are related to well-known models in the literature. A * long-term purpose of this work is to study nonlinear phenomena * seen in the cardio-respiratory system (for example, synchronization * between ventilation rate and heart rate, and Cheyne-Stokes respiration). * The models developed in this paper can be regarded as the controlled * system (plant) and provide a mathematical framework to link * between "molecular-level", and "systems-level" models. It is * shown how changes in molecular level affect the alveolar partial * pressure. Two assumptions that have previously been made are * re-examined: (1) the hidden assumption that the air flow through * the mouth is equal to the rate of volume change in the lungs, * and, (2) the assumption that the process of oxygen binding to * hemoglobin is near equilibrium. Conditions under which these * assumptions are valid are studied. All the parameters in the * models, except two, are physiologically realistic. Numerical * results are consistent with published experimental observations. * * model diagram Schematic diagram of inflexible lung model. The * lung is modelled as a single, inflexible container. Pm represents * the mouth pressure, PA is the alveolar pressure, air flow is * represented by q, R is the resistance to air flow and V0 is * the volume of the container. * * model diagram Schematic diagram of flexible lung model. The * lung modelled as a single, flexible container. VA - total lung * volume, Pm - mouth pressure, PL - pleural pressure, q - air * flow, R - overall resistance of the conducting airways, ks - * spring constant. * * model diagram Schematic diagram of flexible lung model with * gas exchange. The lung modelled as a flexible container with * gas exchange. All the symbols are the same as in the diagram * above. In addition, fo and fc are the alveolar concentrations * of oxygen and carbon dioxide respectively, and pao and pac are * the alveolar partial pressures of oxygen and carbon dioxide * respectively. po and pc are the blood partial pressures of oxygen * and carbon dioxide respectively. * * model diagram Schematic diagram of flexible lung model with * gas exchange and gas transport. The lung modelled as a flexible * container with gas exchange and gas transport. With each heart * beat a new compartment is pushed into the lung. Each compartment * consists of a small container representing dissolved gas, and * a large container representing the means by which oxygen and * carbon dioxide are transported. * * The original paper reference is cited below: * * Simplified models for gas exchange in the human lungs, Alona * Ben-Tal, 2006. Journal of Theoretical Biology, 238(2), 474-495. * PubMed ID: 16038941 */ import nsrunit; unit conversion on; //Warning: unit mmHg_ renamed from mmHg, as the latter is predefined in JSim with different fundamental units. unit mmHg_=133.32 kilogram^1*meter^(-1)*second^(-2); unit per_mmHg=.00750075 kilogram^(-1)*meter^1*second^2; unit mmHg_second_per_litre=133320 kilogram^1*meter^(-4)*second^(-1); unit mmHg_per_litre=133320 kilogram^1*meter^(-4)*second^(-2); unit mmHg_per_second=133.32 kilogram^1*meter^(-1)*second^(-3); unit mmHg_litre_second2=.13332 kilogram^1*meter^2; unit litre_per_second_mmHg=7.5007501E-6 kilogram^(-1)*meter^4*second^1; unit litre_per_second=.001 meter^3*second^(-1); unit radian_per_second=1 second^(-1); unit mole_per_litre=1E3 meter^(-3)*mole^1; unit litre_per_mole=.001 meter^3*mole^(-1); unit per_second=1 second^(-1); unit litre_per_second_mole=.001 meter^3*second^(-1)*mole^(-1); unit m2_kg_per_K_second2=1 kilogram^1*meter^2*second^2*kelvin^(-1); unit mm3=1E-9 meter^3; unit mole_per_second_mmHg=.00750075 kilogram^(-1)*meter^1*second^1*mole^1; unit mole_per_litre_mmHg=7.5007501 kilogram^(-1)*meter^(-2)*second^2*mole^1; unit ms=.001 second^1; math main { realDomain time second; time.min=0; extern time.max; extern time.delta; real P_L(time) mmHg_; real dP_Ldt(time) mmHg_per_second; real PluralPressureFunction.P_m mmHg_; PluralPressureFunction.P_m=760; real PluralPressureFunction.R mmHg_second_per_litre; real omega radian_per_second; omega=1.256637; real PluralPressureFunction.V_T litre; PluralPressureFunction.V_T=0.41; real PluralPressureFunction.E mmHg_per_second; PluralPressureFunction.E=2.5; real lungMechanics.P_m mmHg_; lungMechanics.P_m=760; real V_A(time) litre; when(time=time.min) V_A=1; real lungMechanics.E mmHg_per_second; lungMechanics.E=2.5; real P_A(time) mmHg_; when(time=time.min) P_A=760; real lungMechanics.R mmHg_second_per_litre; lungMechanics.R=1; real Q_A(time) litre_per_second; real q(time) litre_per_second; real D_o mole_per_second_mmHg; D_o=0.0000156; real f_o(time) dimensionless; when(time=time.min) f_o=0.1368; real f_oi(time) dimensionless; real D_c mole_per_second_mmHg; D_c=0.0000316; real f_c(time) dimensionless; when(time=time.min) f_c=0.05263; real f_ci(time) dimensionless; real P_w mmHg_; P_w=47; real p_ao(time) mmHg_; real p_o(time) mmHg_; when(time=time.min) p_o=40; real p_ac(time) mmHg_; real f_om dimensionless; f_om=0.21; real f_cm dimensionless; f_cm=0; real p_c(time) mmHg_; when(time=time.min) p_c=46; real V_D litre; V_D=0.151; real gasExchange.V_T litre; gasExchange.V_T=0.41; real df_satdp(time) dimensionless; real L dimensionless; L=171200000; real K_T litre_per_mole; K_T=10000; real K_R litre_per_mole; K_R=3600000; real sigma mole_per_litre_mmHg; sigma=0.0000014; real V_c litre; V_c=0.071; real T_h mole_per_litre; T_h=0.002; real delta dimensionless; real h mole_per_litre; real l_2 litre_per_second_mole; l_2=164000; real r_2 per_second; r_2=0.12; real sigma_c mole_per_litre_mmHg; sigma_c=0.000033; real z(time) dimensionless; when(time=time.min) z=0.00000044219; // // PluralPressureFunction.R=((2 mmHg_)*3.141592653589793*(1 second)/(5 litre)); P_L=(PluralPressureFunction.P_m-PluralPressureFunction.R*omega*PluralPressureFunction.V_T/2*sin(omega*time/1)-PluralPressureFunction.E*((2.5 second)-PluralPressureFunction.V_T*(1 second)/(2 litre)*cos(omega*time/1))); dP_Ldt=((-1)*PluralPressureFunction.R*omega^2*PluralPressureFunction.V_T/(2*1)*cos(omega*time/1)-PluralPressureFunction.E*(2.5-PluralPressureFunction.V_T/(2 litre)*sin(omega*time/1))); // q=((lungMechanics.P_m-P_A)/lungMechanics.R); P_A:time=(lungMechanics.P_m*lungMechanics.E*Q_A/(P_A*(1 litre_per_second))+dP_Ldt); V_A:time=((lungMechanics.P_m-P_L-V_A*lungMechanics.E/(1 litre_per_second))/lungMechanics.R); // p_ao=(f_o*(P_A-P_w)); p_ac=(f_c*(P_A-P_w)); Q_A=(q+(1 litre_per_mole)*D_c*(p_c-p_ac)+(1 litre_per_mole)*D_o*(p_o-p_ao)); f_oi=(if (gasExchange.V_T>=V_D) (f_o*V_D+f_om*(gasExchange.V_T-V_D))/gasExchange.V_T else f_o); f_ci=(if (gasExchange.V_T>=V_D) (f_c*V_D+f_cm*(gasExchange.V_T-V_D))/gasExchange.V_T else f_c); f_o:time=(1/V_A*((1 litre_per_mole)*D_o*(p_o-p_ao)+(f_oi-f_o)*q-f_o*((1 litre_per_mole)*D_c*(p_c-p_ac)+(1 litre_per_mole)*D_o*(p_o-p_ao)))); f_c:time=(1/V_A*((1 litre_per_mole)*D_c*(p_c-p_ac)+(f_ci-f_c)*q-f_c*((1 litre_per_mole)*D_o*(p_o-p_ao)+(1 litre_per_mole)*D_c*(p_c-p_ac)))); // delta=(10^1.9); h=((1 mole_per_litre)*10^((-1)*7.4)); df_satdp=(((L*(1+K_T*sigma*p_o)^4+(1+K_R*sigma*p_o)^4)*(3*L*K_T^2*sigma^2*p_o*(1 mmHg_)*(1+K_T*sigma*p_o)^2+L*K_T*sigma*(1 mmHg_)*(1+K_T*sigma*p_o)^3+3*K_R^2*sigma^2*p_o*(1 mmHg_)*(1+K_R*sigma*p_o)^2+K_R*sigma*(1 mmHg_)*(1+K_R*sigma*p_o)^3)-(L*K_T*sigma*p_o*(1+K_T*sigma*p_o)^3+K_R*sigma*p_o*(1+K_R*sigma*p_o)^3)*(4*L*K_T*sigma*(1 mmHg_)*(1+K_T*sigma*p_o)^3+4*K_R*sigma*(1 mmHg_)*(1+K_R*sigma*p_o)^3))/(L*(1+K_T*sigma*p_o)^4+(1+K_R*sigma*p_o)^4)^2); p_o:time=(D_o/(sigma*V_c)*(1+(4 per_mmHg)*T_h/sigma*df_satdp)^((-1)*1)*(f_o*(P_A-P_w)-p_o)); p_c:time=(D_c/(sigma_c*V_c)*(p_ac-p_c)+(1 mole_per_litre)*delta*l_2/sigma_c*h*z-delta*r_2*p_c); z:time=(delta*r_2*sigma_c*p_c/(1 mole_per_litre)-delta*l_2*h*z); }