Nonstratified model

grey=RGBColor[55.7/100,57.3/100,56.9/100];

eT[T_,V_]:=λ T -μ T -β V T
eY[V_,T_,Y_,A_]:= β V T + ρa Y- μ Y - κ Y A
eV[V_,Y_]:= μ θ Y - ζ V
eA[Y_,A_]:=σ Y A

system2={
T'[t]==eT[T[t],V[t]],
Y'[t]==eY[V[t],T[t],Y[t],A[t]],
V'[t]==eV[V[t],Y[t]],
A'[t]==eA[Y[t],A[t]],
T[0]==1000,Y[0]==1,V[0]==0,A[0]== (10^(-10))};

pars2={λ-> 0.67,β-> (10^(-10)), μ-> 0.67,ζ-> 1.18,κ-> 0.0024, σ-> 0.0001};
tmax=500;

timeseries

parsθρ={θ-> (10^4),ρa-> 0.7};
sol=NDSolve[{system2/.pars2/.parsθρ},{T,Y,V,A},{t,0,tmax},
Method->"StiffnessSwitching"];

Plot[Evaluate[{Y[t],A[t]}/.sol/.pars2/.parsθρ],{t,0,tmax},
PlotRange-> {(10^(-2)),All},Frame->{True,True,False,False},
PlotLegends->{"I","A"},FrameLabel->{"time","pop size"},PlotStyle->{{Blue,Thick},{grey,Thick}},AspectRatio->1,ImageSize->Small]

Plot[Evaluate[{T[t]}/.sol/.pars2/.parsθρ],{t,0,tmax},ImageSize->Small]
T[400]/.sol

peak of V

tmax=350;
sol2 =ParametricNDSolve[system2/.pars2,V,{t,0,tmax},{θ,ρa},Method->"StiffnessSwitching"];

ContourPlot[NMaxValue[V[θ,ρa][t]/.sol2,{t,0,tmax}],{θ,100,10000},{ρa,0.7,1.4},PlotLegends->Automatic,FrameLabel->{{"(Subscript[ρ, a])",None},{"θ","Peak V"}},PerformanceGoal:>"Speed"]

peak of I

tmax=350;
sol3 =ParametricNDSolve[system2/.pars2,Y,{t,0,tmax},{θ,ρa},Method->"StiffnessSwitching"];

ContourPlot[NMaxValue[Y[θ,ρa][t]/.sol3,{t,0,tmax}],
{θ,100,10000},{ρa,0.7,1.4},PlotLegends->Automatic,FrameLabel->{{"(Subscript[ρ, a])",None},{"θ","Peak I"}},PerformanceGoal:>"Speed"]

duration of infection (I -> 0)

tmax=350;
sol3 =ParametricNDSolve[system2/.pars2,Y,{t,0,tmax},{θ,ρa},Method->"StiffnessSwitching"];

ContourPlot[First[Position[Flatten[Table[Y[θ,ρa][t]/.sol3/.parsθρ,{t,1,tmax}]],_?(#<(10^(-5))&)]],
{θ,100,10000},{ρa,0.7,1.4},PlotLegends->Automatic,FrameLabel->{{"(Subscript[ρ, a])",None},{"θ","Duration I"}},PerformanceGoal:>"Quality"]

First[Position[Flatten[Table[Y[4000,0.71][t]/.sol3,{t,1,tmax}]],_?(#<(10^(-5))&)]]

Nonstratified model - dynamic T with carrying capacity

grey=RGBColor[55.7/100,57.3/100,56.9/100];

eT[T_,V_]:=λ T (1- (T/Nb)) -β V T
eY[V_,T_,Y_,A_]:= β V T + ρa Y- μ Y - κ Y A
eV[V_,Y_]:= μ θ Y - ζ V
eA[Y_,A_]:=σ Y A

system2={
T'[t]==eT[T[t],V[t]],
Y'[t]==eY[V[t],T[t],Y[t],A[t]],
V'[t]==eV[V[t],Y[t]],
A'[t]==eA[Y[t],A[t]],
T[0]==1000,Y[0]==1,V[0]==0,A[0]== (10^(-10))};

pars2={λ-> 0.67,β-> (10^(-10)),Nb-> 1000, μ-> 0.67,ζ-> 1.18,κ-> 0.0024, σ-> 0.0001};
tmax=500;

timeseries

parsθρ={θ-> (10^4),ρa-> 0.7};
sol=NDSolve[{system2/.pars2/.parsθρ},{T,Y,V,A},{t,0,tmax},
(*Method-> "BDF",*)Method->"StiffnessSwitching"];

Plot[Evaluate[{Y[t],A[t]}/.sol/.pars2/.parsθρ],{t,0,tmax},
PlotRange-> {(10^(-2)),All},Frame->{True,True,False,False},
PlotLegends->{"I","A"},FrameLabel->{"time","pop size"},PlotStyle->{{Blue,Thick},{grey,Thick}},AspectRatio->1,ImageSize->Small]

Plot[Evaluate[{T[t]}/.sol/.pars2/.parsθρ],{t,0,tmax},ImageSize->Small]
T[400]/.sol

peak of V

tmax=350;
sol2 =ParametricNDSolve[system2/.pars2,V,{t,0,tmax},{θ,ρa},Method->"StiffnessSwitching"];

ContourPlot[NMaxValue[V[θ,ρa][t]/.sol2,{t,0,tmax}],{θ,100,10000},{ρa,0.7,1.4},PlotLegends->Automatic,FrameLabel->{{"(Subscript[ρ, a])",None},{"θ","Peak V"}},PerformanceGoal:>"Speed"]

peak of I

tmax=350;
sol3 =ParametricNDSolve[system2/.pars2,Y,{t,0,tmax},{θ,ρa},Method->"StiffnessSwitching"];

ContourPlot[NMaxValue[Y[θ,ρa][t]/.sol3,{t,0,tmax}],
{θ,100,10000},{ρa,0.7,1.4},PlotLegends->Automatic,FrameLabel->{{"(Subscript[ρ, a])",None},{"θ","Peak I"}},PerformanceGoal:>"Speed"]

duration of infection (I -> 0)

tmax=350;
sol3 =ParametricNDSolve[system2/.pars2,Y,{t,0,tmax},{θ,ρa},Method->"StiffnessSwitching"];

ContourPlot[First[Position[Flatten[Table[Y[θ,ρa][t]/.sol3/.parsθρ,{t,1,tmax}]],_?(#<(10^(-5))&)]],
{θ,100,10000},{ρa,0.7,1.4},PlotLegends->Automatic,FrameLabel->{{"(Subscript[ρ, a])",None},{"θ","Duration I"}},PerformanceGoal:>"Quality"]

First[Position[Flatten[Table[Y[4000,0.71][t]/.sol3,{t,1,tmax}]],_?(#<(10^(-5))&)]]