Re: Additional request for simplification.
Put the ReplaceAll
(/.
) outside the list of things to plot. It will, after all, replace all instances of Paorta
. :)
Manipulate[Plot[
Evaluate[
{Paorta[t],
(1/2*k*(1 + Cos[ω t]) + 10),
(((1/2*k*(1 + Cos[ω t]) + 10) - Paorta[t])/Ro)
} /. NDSolve[{Paorta'[t] ==
1/Caorta ((1/2*k*(1 + Cos[ω t]) + 10 - Paorta[t])/
Piecewise[{{Ro, 1/2*k*(1 + Cos[ω t]) + 10 - Paorta[t] > 0}},
x*Ro] - Paorta[t]/Rsystemic),
Paorta[0] == 90}, {Paorta[t]}, {t, 0, 10}]
],
{t, 0, 10}, ImageSize -> Large, PlotRange -> Full,
PlotLegends -> {"Aortic Pressure", "Pressure in Left Ventricle", "Flow"}],
{{Caorta, 1/.48}, 1, 6},
{{Rsystemic, 3.1}, .1, 6},
{{x, 8000}, 1, 10000},
{{ω, 2 π}, π, 3 π},
{{k, 110}, 60, 200},
{{Ro, .01}, .007, .05}]