%CREATED: JUNE 2009 by ARC %This code is designed to implement Fung's sheet flow model for perfusion in the capillary bed. %%-----------------------INPUT------------------------- %The input to this function is inlet and outlet pressure for the system and the number of sheets in the acinus. %%----------------------OUTPUT---------------------------- % This code outputs resistance and RBC transit times through the capillary sheet. function [R_cap,TT]=CAP_FUNCTION(Pin_cap,Pout_cap,sheet_number,Parameters) % Area of this particular sheet (=area of all sheets in acinus/no of sheets % in acinus) area_sheet=Parameters.area/sheet_number; %---------------CAPILLARY -------- % Parameters.Sheet flow model constant C C=Parameters.S*area_sheet/(4*Parameters.mu_min*Parameters.K*Parameters.F*Parameters.L_cap^2*Parameters.alpha_S); %Blood pressure in and out of the capillary sheet P_a=Pin_cap; P_v=Pout_cap; %Zone 2 (waterfall) scaling waterfall_scale=1-Parameters.F_sheet+Parameters.F_sheet*exp(-(P_v-Parameters.Palv)^2/(2*Parameters.sigma^2)); if ((P_a-Parameters.Palv)Parameters.Pub)&&((P_v-Parameters.Palv)<=Parameters.Plb) Hart=Parameters.Hmax_art; Hven=Parameters.H0; Q_cap=4*C*Parameters.alpha_S*(Parameters.Hmax_art^3*(P_a-Parameters.Palv-Parameters.Pub)+(Parameters.Hmax_art^4-Parameters.H0^4)/(4*Parameters.alpha_S)); Q_cap=Q_cap*waterfall_scale; RBC_tt=(3*Parameters.mu_min*Parameters.F*Parameters.K*Parameters.L_cap^2*Parameters.alpha_S)/(waterfall_scale*(3*Parameters.alpha_S*Parameters.Hmax_art^2*(P_a-Parameters.Palv-Parameters.Pub)+(Parameters.Hmax_art^3-Parameters.H0^3))); elseif ((P_a-Parameters.Palv)<=Parameters.Pub)&&((P_v-Parameters.Palv)<=Parameters.Pub) Hart=Parameters.H0+Parameters.alpha_S*(P_a-Parameters.Palv); Hven=Parameters.H0+Parameters.alpha_S*(P_v-Parameters.Palv); Q_cap=C*(Hart^4-Hven^4); RBC_tt=(3*Parameters.mu_min*Parameters.F*Parameters.K*Parameters.L_cap^2*Parameters.alpha_S)/(Hart^3-Hven^3); elseif ((P_a-Parameters.Palv)>Parameters.Pub)&&((P_v-Parameters.Palv)<=Parameters.Pub) Hart=Parameters.Hmax_art; Hven=Parameters.H0+Parameters.alpha_S*(P_v-Parameters.Palv); Hub=Parameters.H0+Parameters.alpha_S*Parameters.Pub; Q_cap=Parameters.S*area_sheet*(Parameters.Hmax_art^3*(P_a-Parameters.Palv-Parameters.Pub)+(Hub^4-Hven^4)/(4*Parameters.alpha_S))/(Parameters.mu_min*Parameters.F*Parameters.K*Parameters.L_cap^2); RBC_tt=(3*Parameters.mu_min*Parameters.F*Parameters.K*Parameters.L_cap^2*Parameters.alpha_S)/(3*Parameters.alpha_S*Parameters.Hmax_art^2*(P_a-Parameters.Palv-Parameters.Pub)+(Parameters.Hmax_art^3-Hven^3)); elseif ((P_a-Parameters.Palv)>Parameters.Pub)&&((P_v-Parameters.Palv)>Parameters.Pub) Hart=Parameters.Hmax_art; Hven=Parameters.Hmax_vein; Q_cap=4*C*Parameters.alpha_S*Hart^3*(P_a-P_v); RBC_tt=(Parameters.mu_min*Parameters.F*Parameters.K*Parameters.L_cap^2)/(Hart^2*(P_a-P_v)); else %code should not enter here! Q_cap=1e-12; RBC_tt=0; end %C... RBC transit time (1.4 times faster than blood) RBC_tt=RBC_tt/1.4; %C... Resistance through a single capillary sheet, Pa.s/m^3 R_cap=(Pin_cap-Pout_cap)/Q_cap; %RBC TT TT=RBC_tt;