- Author:
- Soroush Safaei <ssaf006@aucklanduni.ac.nz>
- Date:
- 2018-07-26 17:41:12+12:00
- Desc:
- adding new model
- Permanent Source URI:
- https://models.physiomeproject.org/workspace/3a4/rawfile/ef211134741455b4bb947067d786989076afe41e/inflexible_lung.cellml
<?xml version='1.0'?>
<model name="respiratory" xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cellml="http://www.cellml.org/cellml/1.1#" xmlns:cmeta="http://www.cellml.org/metadata/1.0#" xmlns:xlink="http://www.w3.org/1999/xlink">
<import xlink:href="Units/Units.cellml">
<units name="mmHg" units_ref="mmHg"/>
<units name="mmHg_per_l" units_ref="mmHg_per_l"/>
<units name="per_s" units_ref="per_s"/>
<units name="l_per_mole" units_ref="l_per_mole"/>
<units name="mM_per_mmHg" units_ref="mM_per_mmHg"/>
<units name="mmHg_per_m" units_ref="mmHg_per_m"/>
<units name="mmHg_per_l" units_ref="mmHg_per_l"/>
<units name="l_per_s" units_ref="l_per_s"/>
<units name="cm3" units_ref="cm3"/>
<units name="l_per_mmHg_per_s" units_ref="l_per_mmHg_per_s"/>
<units name="per_s_per_M" units_ref="per_s_per_M"/>
<units name="mM" units_ref="mM"/>
<units name="mmHg_s_per_l" units_ref="mmHg_s_per_l"/>
</import>
<component name="lung">
<!-- Variables-->
<!-- var{pleural_pressure} P_L: mmHg {pub: in};-->
<variable cmeta:id="alveolar_pressure" initial_value="0" name="P_A" units="mmHg"/>
<!-- var{alveoli_gas_influx} Q_A: l_per_s;-->
<variable cmeta:id="lung_volume" initial_value="0" name="V_A" units="cm3"/>
<!-- var{alveoli_pressure_auxiliary} P_x: mmHg {init: 0.0};-->
<variable cmeta:id="air_flow" initial_value="0" name="q" units="l_per_s"/>
<!-- var{inspired_air_flow} q_i: l_per_s;
var{O2_blood_partial_pressure} p_o: mmHg {init: 0.0};
var{O2_alveolar_partial_pressure} p_ao: mmHg;
var{CO2_blood_partial_pressure} p_c: mmHg {init: 0.0};
var{CO2_alveolar_partial_pressure} p_ac: mmHg;
var{inspired_O2_concentration} f_oi: dimensionless;
var{inspired_CO2_concentration} f_ci: dimensionless;
var{alveoli_O2_concentration} f_o: dimensionless {init: 0.1368};
var{alveoli_CO2_concentration} f_c: dimensionless {init: 0.05263};
var{blood_HCO3_concentration} z: mM {init: 0.00003};-->
<variable cmeta:id="environment_time" name="t" public_interface="in" units="second"/>
<!-- // Parameters-->
<variable cmeta:id="mouth_pressure" initial_value="760" name="P_m" units="mmHg"/>
<!-- var{water_vapor_pressure} P_w: mmHg {init: 47};
var{mouth_O2_concentration} f_om: dimensionless {init: 0.21};
var{mouth_CO2_concentration} f_cm: dimensionless {init: 0.0};
var{lung_tidal_volume} V_T: dimensionless {init: 0.41};
var{lung_dead_space} V_D: dimensionless {init: 0.151};
var{collapsed_lung_volume} V_0: dimensionless {init: 1.0};
var{capillaries_volume} V_c: dimensionless {init: 0.071};
var{airways_resistance} R: mmHg_s_per_l {init: 1};
var{lung_elastance} E: mmHg_per_l {init: 2.5};
var{respiration_frequency} omega: per_s {init: 1.257};
var{time_between_heartbeats} T_L: second {init: 60};
var{O2_diffusion_capacity} D_o: l_per_mmHg_per_s {init: 3.5e-4};
var{CO2_diffusion_capacity} D_c: l_per_mmHg_per_s {init: 7.08e-3};
var{O2_solubility_in_plasma} sigma: mM_per_mmHg {init: 1.4e-3};
var{CO2_solubility_in_plasma} sigma_c: mM_per_mmHg {init: 3.3e-2};
var{hemoglobin_concentration} T_h: mM {init: 2};
var{H_concentration} h: mM {init: 0.00004};
var{dehydration_reaction_rate} r_2: per_s {init: 0.12};
var{hydration_reaction_rate} l_2: per_s_per_M {init: 164e3};
var{acceleration_rate} delta: dimensionless {init: 79.433};-->
<!--// Flexible Lung ////-->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>P_A</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<times/>
<ci>P_m</ci>
<ci>q</ci>
</apply>
<apply>
<times/>
<ci>P_A</ci>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>V_A</ci>
</apply>
</apply>
</apply>
<ci>V_A</ci>
</apply>
</apply>
</math>
<!-- P_x ={auxiliary_variable} P_A-P_L;
V_A ={lung_volume} (P_A-P_L)/E+V_0;
q ={air_flow} (P_m-P_A)/R;
Q_A ={net_gas_flux_into_alveoli} q+D_o*(p_o-p_ao)+D_c*(p_c-p_ac);
ode(P_x, time) ={i-flexible_lung_model} P_m*E/P_A*Q_A;-->
<!-- //// Gas Exchange ////-->
<!-- ode(f_o, time) ={ii-O2_concentration_rate_of_change} (D_o*(p_o-p_ao)+(f_oi-f_o)*q_i-f_o*(D_c*(p_c-p_ac)+D_o*(p_o-p_ao)))/V_A;
ode(f_c, time) ={iii-CO2_concentration_rate_of_change} (D_c*(p_c-p_ac)+(f_ci-f_c)*q_i-f_c*(D_o*(p_o-p_ao)+D_c*(p_c-p_ac)))/V_A;
q_i ={inspired_airflow} q;-->
<!-- f_oi ={inspired_O2_concentration} sel
case V_T >= V_D:
(f_o*V_D+f_om*(V_T-V_D))/V_T;
case V_T < V_D:
f_o;
endsel;-->
<!-- f_ci ={inspired_CO2_concentration} sel
case V_T >= V_D:
(f_c*V_D+f_cm*(V_T-V_D))/V_T;
case V_T < V_D:
f_c;
endsel;-->
<!-- //// Gas Transport ////-->
<!-- ode(p_o, time) ={iv_O2_partial_pressure_rate_of_change} D_o*(p_ao-p_o)/(sigma*V_c*(1{dimensionless}+4{dimensionless}*T_h/sigma));
ode(p_c, time) ={v_CO2_partial_pressure_rate_of_change} D_c*(p_ac-p_c)/(sigma_c*V_c)+delta*l_2*h*z/sigma_c-delta*r_2*p_c;
ode(z, time) ={vi_bicarbonate_concentration} delta*r_2*sigma_c*p_c-delta*l_2*h*z;
p_ao ={O2_partial_pressure} f_o*(P_A-P_w);
p_ac ={CO2_partial_pressure} f_c*(P_A-P_w);-->
</component>
<component name="environment">
<variable cmeta:id="environment_time" name="time" public_interface="out" units="second"/>
</component>
<connection>
<map_components component_1="environment" component_2="lung"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
</model>