########## NAME dae ########## METADATA time_unit = s ########## MACROS ########## STATES // ODEs d/dt(Pca) = Qdiff/Ca d/dt(Qao) = Plao/Lao // DAEs 0 = Qheart - Qdiff - Qao 0 = Pca + Pra - Prao - Plao // Initial conditions Pca(0) = 0 Qao(0) = 0 Qdiff(0) = 0 Plao(0) = 0 ########## PARAMETERS Ca = 1.1 Ra = 0.1 Rao = 1.2 Lao = 0.0005 ########## VARIABLES // Define function for heart beats k_syst = 0.4 Qheart = ceil(max(0,k_syst-fmod(time,T)/T)) * 300.*sin((CONSTANT_PI*(fmod(time,T)/T))/k_syst) Pra = Ra*Qdiff Prao = Rao*Qao ########## FUNCTIONS ########## EVENTS ########## OUTPUTS ########## INPUTS T = T_in @ 1 // @ 1 means that T has the value 1 if T_in is not given as input ########## FEATURES Aortic pressure = Pca + Pra [mmHg] // Extra features to better understand the model: Flow input Qheart = Qheart [ml/s] Qdiff = Qdiff [ml/s] Qao = Qao [ml/s] Pca = Pca [mmHg] Plao = Plao [mmHg] KCL = Qheart - Qdiff - Qao [ml/s] KVL = Pca + Pra - Prao - Plao [mmHg]