BreadPostNumber=3;
LBreadPost=1.75*25.4/1000;
ABreadPost=Pi*((0.3125*25.4/1000)^2-(0.133*25.4/1000)^2);
lambdaPEEK=0.24;

InnerToBathConductionCoef=0.004842;
LInnerPost=1.25*25.4/1000;

BreadToBathConductionCoef=1/(1/InnerToBathConductionCoef+(LBreadPost-LInnerPost)/(BreadPostNumber*ABreadPost*lambdaPEEK))

sigma=5.67*10^-8;
RBread=7.5*25.4/1000;
ABread=Pi*RBread^2;
epsilonBread=0.07;
epsilonInnerInterior=1;
ESpecularBreadInner=epsilonInnerInterior*epsilonBread/(epsilonInnerInterior+epsilonBread-epsilonInnerInterior*epsilonBread)
TBread=123;
TInner=125;
BreadtoInnerRadiation=2.4*sigma*ESpecularBreadInner*ABread*(TInner^4-TBread^4)

HoleNumber=3;
HoleRadius=1*25.4/1000;
SlotWidth=3.5*25.4/1000;
ABreadToBath=HoleNumber*Pi*HoleRadius^2+Pi*HoleRadius^2+2*HoleRadius*SlotWidth;
epsilonBread=0.07;
epsilonBath=0.1;
ESpecularBreadBath=epsilonBread*epsilonBath/(epsilonBread+epsilonBath-epsilonBread*epsilonBath)
TBath=273+21;
TBread=123;
BreadToBathRadiation=sigma*ESpecularBreadBath*ABreadToBath*(TBath^4-TBread^4)

RBread=7.5*25.4/1000;
ABread=Pi*RBread^2;
epsilonBathNoShields=0.5;
ESpecularBreadBathNoShields=epsilonBread*epsilonBathNoShields/(epsilonBread+epsilonBathNoShields-epsilonBread*epsilonBathNoShields)

InnerPostNumber=3;
AInnerPost=Pi*(0.3125*25.4/1000)^2;
LInnerPost=1.25*25.4/1000;
lambdaPEEK=0.24;
TBath=273+21;
TInner=123;
InnerToBathConduction=InnerPostNumber*AInnerPost*lambdaPEEK*(TBath-TInner)/LInnerPost

RInnerShield=(9*25.4/1000);
rInnerShield=(8.5*25.4/1000);
HInnerShield=(8.5*25.4/1000);
hInnerShield=(8*25.4/1000);

ROuterShield=(10*25.4/1000);
rOuterShield=(9.5*25.4/1000);
HOuterShield=(10*25.4/1000);
hOuterShield=(9.5*25.4/1000);

TOuter=261;

AInnerShield=2*Pi*RInnerShield^2+2*Pi*RInnerShield*HInnerShield;
AOuterShieldInterior=2*Pi*rOuterShield^2+2*Pi*rOuterShield*hOuterShield;
epsilonInnerExterior=0.07;
epsilonOuter=0.07;
epsilonBath=0.1;
ESpecularInnerOuter=epsilonInnerExterior*epsilonOuter/(epsilonInnerExterior+epsilonOuter-epsilonInnerExterior*epsilonOuter)
EDiffuseInnerOuter=epsilonInnerExterior*epsilonOuter/(epsilonInnerExterior+(AInnerShield/AOuterShieldInterior)(epsilonOuter-epsilonInnerExterior*epsilonOuter));
sigma=5.67*10^-8;
InnerToOuterRadiation=sigma*ESpecularInnerOuter*AInnerShield*(TOuter^4-TInner^4)

ABreadToBath=HoleNumber*Pi*HoleRadius^2+Pi*HoleRadius^2+2*HoleRadius*SlotWidth;
HoleCoverRadius=(0.75*25.4/1000);
ABreadToBathCovers=(HoleNumber+1)*Pi*HoleCoverRadius^2+Pi*HoleRadius^2/2+HoleRadius*SlotWidth;
AInnerToBathCovers=ABreadToBath-ABreadToBathCovers;
epsilonInnerExterior=0.07;
epsilonBath=0.1;
ESpecularInnerBath=epsilonInnerExterior*epsilonBath/(epsilonInnerExterior+epsilonBath-epsilonInnerExterior*epsilonBath);

OuterPostNumber=3;
AOuterPost=Pi*(0.3125*25.4/1000)^2;
LOuterPost=0.5*25.4/1000;
lambdaG10Hot=0.7;
OuterToBathConduction=OuterPostNumber*AOuterPost*lambdaPEEK*(TBath-TOuter)/LOuterPost

AOuterShieldExterior=2*Pi*ROuterShield^2+2*Pi*ROuterShield*HOuterShield;
ABath=2*Pi*(12*25.4/1000)^2+2*Pi*(12*25.4/1000)*(11*25.4/1000);
ESpecularOuterBath=epsilonOuter*epsilonBath/(epsilonOuter+epsilonBath-epsilonOuter*epsilonBath);
EDiffuseOuterBath=epsilonOuter*epsilonBath/(epsilonOuter+(AOuterShieldExterior/ABath)(epsilonBath-epsilonOuter*epsilonBath));
OuterToBathRadiation=sigma*ESpecularOuterBath*AOuterShieldExterior*(TBath^4-TOuter^4)

BarSideLength=(1*25.4/1000);
BarArea=BarSideLength^2;
BarLength=(16*25.4/1000);
lambdaCopper=400;
TBar=77;
CryoToBreadConduction=BarArea*lambdaCopper*(TBath-TBar)/BarLength

BarSurfaceArea=4*BarLength*BarSideLength+BarSideLength^2;
epsilonBar=.1;
ESpecularBarBath=epsilonBar*epsilonBath/(epsilonBar+epsilonBath-epsilonBar*epsilonBath)
BarToBathRadiation=sigma*ESpecularBarBath*BarSurfaceArea*(TBath^4-TBar^4)

BarPostNumber=1;
LBarPost1=5*25.4/1000;
LBarPost2=3.6*25.4/1000;
ABreadPost=Pi*((0.3125*25.4/1000)^2-(0.133*25.4/1000)^2);
lambdaPEEK=0.24;

InnerToBathConductionCoef=0.004842;
LInnerPost=1.25*25.4/1000;

TBar=77;

BarToBathConductionCoef=1/(1/(InnerToBathConductionCoef/3)+(LBarPost1-LInnerPost)/(BarPostNumber*ABreadPost*lambdaPEEK))+1/(1/(InnerToBathConductionCoef/3)+(LBarPost2-LInnerPost)/(BarPostNumber*ABreadPost*lambdaPEEK))
BarToBathConduction=BarToBathConductionCoef*(TBath-TBar)

DSMinipoints={{40,0},{60,0.8},{77,1.8},{90,2.4},{120,4},{150,5.2},{180,6.2},{210,6.8},{240,7},{270,7},{300,7.6}};

MTpoints={{40,0},{60,3},{77,5},{100,9},{120,12},{140,16},{160,18},{180,21},{200,24},{220,26},{240,29},{260,31},{280,33},{300,36}};

CTpoints={{40,0},{60,6},{77,11},{100,17},{120,21},{140,25},{160,28},{180,31},{200,33},{220,35},{240,36},{260,37},{280,36.5},{300,36}};

GTpoints={{40,0},{60,10},{77,16},{100,24},{120,30},{140,35},{160,40},{180,45},{200,48},{220,49},{240,50},{260,49},{280,47},{300,35}};

DS30points={{35,0},{60,20},{77,32},{100,50},{120,60},{140,70},{160,80},{180,85},{200,93},{220,97},{240,100},{260,100},{280,97},{300,85}};

RD125points={{30,0},{35,10},{44,20},{61,30},{80,40},{104,50}};

CH104points={{20,0},{25,10},{32,20},{45,30},{60,40},{77,50},{105,60},{155,70},{225,79}};
CH110points={{20,0},{27,50},{38,100},{48,150},{68,200},{77,220}};

AL10points = {{25,0},{50,10},{60,11},{70,13},{80,14}};
AL60points={{25,0},{50,40},{60,49},{70,57},{80,60}};

PT30points={{35,0},{50,16},{60,23},{70,30},{80,37}, {120,45},{155,58},{200,73},{280,95}};
PT30RMpoints={{35,0},{50,11},{60,18},{70,23},{80,30}, {120,45*.85},{155,58*.85},{200,73*.85},{280,95*.85}};
PT60points={{30,0},{40,20}{50,34},{60,44},{70,53},{80,60}};
PT63points={{25,0},{30,11.5}{35,17.5},{40,22}};
PT90points={{30,0},{40,30}{55,60},{80,90}};

DE102Fpoints={{25,0},{77,16},{150,25}};
DE102TFpoints={{25,0},{77,25},{150,38}};
DE104Fpoints={{25,0},{77,35},{150,50}};
DE104TFpoints={{25,0},{77,60},{150,90}};
DE110points={{25,0},{77,200}};
DE202AEpoints={{9,0},{77,4}};
DE202ATEpoints={{9,0},{77,6}};
DE204AEpoints={{9,0},{77,17}};
DE204ATEpoints={{9,0},{77,23}};
DE204PEpoints={{9,0},{77,14}};
DE210points={{9,0},{77,25}};

OC012rpm60points={{30,0},{36,4},{49,8},{77,12},{90,13}};
OC012rpm90points={{30,0},{32,4},{38,8},{55,12},{77,17},{90,18}};

OC040rpm60points={{30,0},{31,12},{38,20},{53,30},{77,42},{100,50}};
OC040rpm90points={{30,0},{31,15},{33,20},{40,30},{48,40},{65,50},{77,57},{100,62}};

CryoPoints=PT30RMpoints;

CryoPowerFunction[T_]:=Piecewise[{{0,T<CryoPoints[[1]][[1]]},{ Interpolation[CryoPoints,InterpolationOrder->1][T],CryoPoints[[1]][[1]]<=T<CryoPoints[[Length[CryoPoints]]][[1]]},{CryoPoints[[Length[CryoPoints]]][[2]],T>=CryoPoints[[Length[CryoPoints]]][[1]]}}];
Plot[CryoPowerFunction[T],{T,0,TBath},PlotRange->All,AxesLabel->{"Cold Tip Temperature (K)","Lift (W)"},PlotLegends->{Lift Power}]

ClockFunction[TimeNumber_] :=StringForm["``:``:``",Floor[TimeNumber/3600],IntegerString[Floor[Mod[TimeNumber,3600]/60],10,2],IntegerString[Round[60*Mod[Mod[TimeNumber,3600]/60,1]]],10,2];

CryoToBarConduction =1;
BarToBreadConduction =0.6;
BarConduction=BarArea*lambdaCopper/BarLength
CyroToBreadConductionCoef=1/(1/CryoToBarConduction+1/BarConduction+1/BarToBreadConduction);
BreadToBathRadiationCoef=sigma*ESpecularBarBath*BarSurfaceArea;

BreadToBathConductionCoef=1/(1/InnerToBathConductionCoef+(LBreadPost-LInnerPost)/(BreadPostNumber*ABreadPost*lambdaPEEK));
BreadtoInnerRadiationCoef=2.4*sigma*ESpecularBreadInner*ABread;
BreadToBathRadiationCoef=sigma*ESpecularBreadBath*ABreadToBath;

InnerToBathConductionCoef=0.004842;
InnerToOuterRadiationCoef=sigma*ESpecularInnerOuter*AInnerShield;

OuterToBathConductionCoef=0.01418;
OuterToBathRadiationCoef=sigma*ESpecularOuterBath*AOuterShieldExterior;

BarToBathRadiationCoef=sigma*ESpecularBarBath*BarSurfaceArea
BarToBathConductionCoef=1/(1/(InnerToBathConductionCoef/3)+(LBarPost1-LInnerPost)/(BarPostNumber*ABreadPost*lambdaPEEK))+1/(1/(InnerToBathConductionCoef/3)+(LBarPost2-LInnerPost)/(BarPostNumber*ABreadPost*lambdaPEEK))

BreadtoInnerConductionCoef=0;

StringForm["The Cryohead to Bread Conduction Coefficient is ``W/K.",CyroToBreadConductionCoef]
StringForm["The Bar to Bath Radiation Coefficient is ``W/K.",BreadToBathRadiationCoef]

StringForm["The Bread to Bath Conduction Coefficient is ``W/K.",BreadToBathConductionCoef]
StringForm["The Bread to Inner Shield Radiation Coefficient is ``W/K^4.",BreadtoInnerRadiationCoef]
StringForm["The Bread to Bath Radiation Coefficient is ``W/K^4.",BreadToBathRadiationCoef]

StringForm["The Inner Shield to Bath Conduction Coefficient is ``W/K.",InnerToBathConductionCoef]
StringForm["The Inner Shield to Outer Shield Radiation Coefficient is ``W/K^4.",InnerToOuterRadiationCoef]

StringForm["The Outer Shield to Bath Conduction Coefficient is ``W/K.",OuterToBathConductionCoef]
StringForm["The Outer Shield to Bath Radiation Coefficient is ``W/K^4.",OuterToBathRadiationCoef]

StringForm["The Bread to Inner Shield Coef Coefficient is ``W/K.",BreadtoInnerConductionCoef]

CopperDensity=8960;

lbstokg=2.2;
MassBar=BarArea*BarLength*CopperDensity;
MassBread=9/lbstokg;
MassInnerShield=(23.63+5.75)/lbstokg;
MassOuterShield=38/lbstokg;
SpecificHeatAluminum=900;
SpecificHeatCopper=385;

BarmeffCpeff=MassBar*SpecificHeatCopper;
BreadmeffCpeff=MassBread*SpecificHeatAluminum;
InnermeffCpeff=MassInnerShield*SpecificHeatAluminum;
OutermeffCpeff=MassOuterShield*SpecificHeatAluminum;

Twant = 123;
TBath=294;

Time=10^6;

CryoPoints=CH110points;

CryoPowerFunction[T_]:=Piecewise[{{0,T<CryoPoints[[1]][[1]]},{Quiet[ Interpolation[CryoPoints,InterpolationOrder->1][T]],CryoPoints[[1]][[1]]<=T<CryoPoints[[Length[CryoPoints]]][[1]]},{CryoPoints[[Length[CryoPoints]]][[2]],T>=CryoPoints[[Length[CryoPoints]]][[1]]}}];

TCryo=CryoPoints[[1]][[1]];

Plot[CryoPowerFunction[T],{T,0,TBath},PlotRange->All,AxesLabel->{"Cold Tip Temperature (K)","Lift (W)"},PlotLegends->{Lift Power}]


s=NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)+BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}];
TInnerFinal=(TInnerVar[Time]/.s)[[1]];
TOuterFinal=(TOuterVar[Time]/.s)[[1]];
TBarFinal=(TBarVar[Time]/.s)[[1]];
TBreadFinal=(TBreadVar[Time]/.s)[[1]];
ApproxTimetoCool=BreadmeffCpeff*(TBath-Twant)/CryoPowerFunction[123];

StringForm["The final Inner Shield Temperature is ``K.",TInnerFinal]
StringForm["The final Outer Shield Temperature is ``K.",TOuterFinal]

Quiet[TimeToCool = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)+BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath,WhenEvent[TBreadVar[t]<=1.000001*Twant,Sow[t]]},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}]][[2]][[1]][[1]]];

Quiet[TimeToCoolBar = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)+BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath,WhenEvent[TBarVar[t]<=1.000001*TCryo,Sow[t]]},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}]][[2]][[1]][[1]]];

If[TimeToCoolBar==={},StringForm["The Bar does not get to `` K. The final temperature is `` K.", TCryo,TBarFinal],StringForm["The time to cool the Bar to `` K is ``s.",TCryo,TimeToCoolBar]
StringForm["This is `` hours, `` minutes",ClockFunction[TimeToCoolBar]]]

StringForm["The approximate time to cool the Breadboard to `` K is ``s.",Twant,ApproxTimetoCool]
StringForm["This is ``",ClockFunction[ApproxTimetoCool]]

If[TimeToCool==={},StringForm["The Breadboard does not get to `` K. The final temperature is `` K.", Twant,TBreadFinal],StringForm["The actual time to cool the Breadboard to `` K is ``s, or``.",Twant,TimeToCool,ClockFunction[TimeToCool]]]


Plot[{Evaluate[TOuterVar[t]/. s],Evaluate[TInnerVar[t]/. s],Evaluate[TBreadVar[t]/. s],Evaluate[TBarVar[t]/. s]},{t,0,If[TimeToCool==={},Time,1.5*TimeToCool]},PlotRange->All,AxesLabel->{"Time(s)","Temperature (K)"},PlotLegends->{Outer Shield Temperature,Inner Shield Temperature,BreadBoard Temperature,Bar Temperature}]

Plot[{Evaluate[TOuterVar[t]/. s],Evaluate[TInnerVar[t]/. s],Evaluate[TBreadVar[t]/. s]},{t,0,If[TimeToCool==={},Time,1.5*TimeToCool]},PlotRange->All,AxesLabel->{"Time(s)","Temperature (K)"},PlotLegends->{Outer Shield Temperature,Inner Shield Temperature,BreadBoard Temperature}]

Plot[{Evaluate[TOuterVar[t]/. s],Evaluate[TInnerVar[t]/. s]},{t,0,Time},PlotRange->All,AxesLabel->{"Time(s)","Temperature (K)"},PlotLegends->{Outer Shield Temperature,Inner Shield Temperature}]

Plot[Evaluate[TOuterVar[t]/. s],{t,0,Time},PlotRange->All,AxesLabel->{"Time(s)","Temperature (K)"},PlotLegends->{Outer Shield Temperature}]

StringForm["The Maximum Cryohead to Bread Conduction at the start is ``W.",CyroToBreadConductionCoef*(TBath-TCryo)]
StringForm["The Maximum Cryohead to Bread Conduction at Equilibrium is ``W.",CyroToBreadConductionCoef*(Twant-TCryo)]

StringForm["The Bread to Bath Conduction at Equilibrium is ``W.",BreadToBathConductionCoef*(TBath-Twant)]
StringForm["The Bread to Inner Shield Radiation at Equilibrium is ``W.",BreadtoInnerRadiationCoef*(TInnerFinal^4-Twant^4)]
StringForm["The Bread to Bath Radiation at Equilibrium is ``W.",BreadToBathRadiationCoef*(TBath^4-Twant^4)]

StringForm["The Inner Shield to Bath Conduction at Equilibrium is ``W.",InnerToBathConductionCoef*(TBath-TInnerFinal)]
StringForm["The Inner Shield to Outer Shield Radiation at Equilibrium is ``W.",InnerToOuterRadiationCoef*(TOuterFinal^4-TInnerFinal^4)]

StringForm["The Outer Shield to Bath Conduction at Equilibrium is ``W.",OuterToBathConductionCoef*(TBath-TOuterFinal)]
StringForm["The Outer Shield to Bath Radiation at Equilibrium is ``W.",OuterToBathRadiationCoef*(TBath^4-TOuterFinal^4)]

StringForm["The Bar to Bath Conduction at Equilibrium is ``W.",BarToBathConductionCoef*(TBath-TBarFinal)]
StringForm["The Bar to Bath Radiation at Equilibrium is ``W.",BarToBathRadiationCoef*(TBath^4-TBarFinal^4)]

StringForm["The Bread to Inner Shield Conduction at Equilibrium is ``W.",BreadtoInnerConductionCoef*(TInnerFinal-Twant)-CyroToBreadConductionCoef*(Twant-TCryo)]


TotalPowerAtEquilibrium=BreadToBathConductionCoef*(TBath-Twant)+BreadToBathRadiationCoef*(TBath^4-Twant^4)+InnerToBathConductionCoef*(TBath-TInnerFinal)+OuterToBathConductionCoef*(TBath-TOuterFinal)+OuterToBathRadiationCoef*(TBath^4-TOuterFinal^4)+BarToBathConductionCoef*(TBath-TBarFinal)+BarToBathRadiationCoef*(TBath^4-TBarFinal^4);
StringForm["The Total Power Lost at Equilibrium is ``W.",TotalPowerAtEquilibrium]

StringForm["The Cryo Power at Equilibrium is ``W.",CryoPowerFunction[TBarFinal]]

StringForm["The Heaters at Equilibrium must heat ``W.",CryoPowerFunction[TBarFinal]-TotalPowerAtEquilibrium]

AInnerPost=Pi*((0.3125*25.4/1000)^2-(0.133*25.4/1000)^2);
LOuterPost;
OuterToBathConductionCoef=0.01418;
1/(1/OuterToBathConductionCoef+(LInnerPost-LOuterPost)/(InnerPostNumber*AInnerPost*lambdaPEEK))
InnerToBathConductionCoef
InnerToBathConductionCoefApprox=InnerPostNumber*AInnerPost*lambdaPEEK/LInnerPost
OuterToBathConductionCoefApprox=OuterPostNumber*AOuterPost*lambdaPEEK/LOuterPost

CyroToBreadConductionCoef=1/(1/CryoToBarConduction+1/BarConduction+1/BarToBreadConduction);
BarToBathRadiationCoef=sigma*ESpecularBarBath*BarSurfaceArea
BarToBathConductionCoef=1/(1/(InnerToBathConductionCoef/3)+(LBarPost1-LInnerPost)/(BarPostNumber*ABreadPost*lambdaPEEK))+1/(1/(InnerToBathConductionCoef/3)+(LBarPost2-LInnerPost)/(BarPostNumber*ABreadPost*lambdaPEEK))

BreadToBathConductionCoef=1/(1/InnerToBathConductionCoef+(LBreadPost-LInnerPost)/(BreadPostNumber*ABreadPost*lambdaPEEK));
BreadtoInnerRadiationCoef=2.4*sigma*ESpecularBreadInner*ABread;
BreadToBathRadiationCoef=sigma*ESpecularBreadBath*ABreadToBath;

InnerToBathConductionCoef=0.004842;
InnerToOuterRadiationCoef=sigma*ESpecularInnerOuter*AInnerShield;

OuterToBathConductionCoef=0.01418;
OuterToBathRadiationCoef=sigma*ESpecularOuterBath*AOuterShieldExterior;

BreadToBathRadiationCoefCovers=sigma*ESpecularBreadBath*ABreadToBathCovers;
InnerToBathRadiationCoef2LayerCovers=sigma*ESpecularInnerBath*AInnerToBathCovers;

InnerToBathRadiationCoef=sigma*ESpecularInnerBath*AInnerShield;

BreadToBathRadiationCoefNoShields=2.4*sigma*ESpecularBreadBathNoShields*ABread;

BreadtoInnerConductionCoef=1;

CryoList={{"DS Mini",DSMinipoints},{"MT",MTpoints},{"CT",CTpoints},{"GT",GTpoints},{"DS 30",DS30points},{"RD 125",RD125points},{"CH 104",CH104points},{"CH 110",CH110points},{"AL 10",AL10points},{"AL 60",AL60points},{"PT 30",PT30points},{"PT 30-RM",PT30RMpoints},{"PT 60",PT60points},{"PT 63",PT63points},{"PT 90",PT90points},{"DE-102F",DE102Fpoints},{"DE-102(T)F",DE102TFpoints},{"DE-104F",DE104Fpoints},{"DE-104(T)F",DE104TFpoints},{"DE-110",DE110points},{"DE-202AE",DE202AEpoints},{"DE-202A(T)E",DE202ATEpoints},{"DE-204AE",DE204AEpoints},{"DE-204A(T)E",DE204ATEpoints},{"DE-204PE",DE204PEpoints},{"DE-210",DE210points},{"OC 0/12 60 rpm",OC012rpm60points},{"OC 0/12 90 rpm",OC012rpm90points},{"OC 0/40 60 rpm",OC040rpm60points},{"OC 0/40 90 rpm",OC040rpm90points}};

CryoTable={{"CryoCooler Name|","CryoCooler Power @ 123 K|","2 layers of shields with covers|","2 layers of shields|","1 layer of shields with covers|","1 layer of shields|","2 layers of shields with covers Cold Inner|","2 layers of shields Cold Inner|","1 layer of shields with covers Cold Inner|","1 layer of shields Cold Inner|","No shields|"}};

For[i=1,i<=Length[CryoList],i++,
CryoPoints=CryoList[[i]][[2]];

CryoPowerFunction[T_]:=Piecewise[{{0,T<CryoPoints[[1]][[1]]},{Quiet[ Interpolation[CryoPoints,InterpolationOrder->1][T]],CryoPoints[[1]][[1]]<=T<CryoPoints[[Length[CryoPoints]]][[1]]},{CryoPoints[[Length[CryoPoints]]][[2]],T>=CryoPoints[[Length[CryoPoints]]][[1]]}}];

TCryo=CryoPoints[[1]][[1]];

CryoPower123=N[CryoPowerFunction[123]];

Quiet[TimeToCool2LayersCovers = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoefCovers*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)-InnerToBathRadiationCoef2LayerCovers*(TInnerVar[t]^4-TBath^4)),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath,WhenEvent[TBreadVar[t]<=1.000001*Twant,Sow[t]]},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}]][[2]][[1]][[1]]];

TimeToCool2LayersCoversClock=ClockFunction[TimeToCool2LayersCovers];

Quiet[TimeToCool2Layers = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath,WhenEvent[TBreadVar[t]<=1.000001*Twant,Sow[t]]},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}]][[2]][[1]][[1]]];

TimeToCool2LayersClock=ClockFunction[TimeToCool2Layers];

Quiet[TimeToCool1LayerCovers = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoefCovers*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToBathRadiationCoef*(TInnerVar[t]^4-TBath^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TBath,WhenEvent[TBreadVar[t]<=1.000001*Twant,Sow[t]]},{TBarVar,TBreadVar,TInnerVar},{t,0,Time}]][[2]][[1]][[1]]];

TimeToCool1LayerCoversClock=ClockFunction[TimeToCool1LayerCovers];

Quiet[TimeToCool1Layer = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToBathRadiationCoef*(TInnerVar[t]^4-TBath^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TBath,WhenEvent[TBreadVar[t]<=1.000001*Twant,Sow[t]]},{TBarVar,TBreadVar,TInnerVar},{t,0,Time}]][[2]][[1]][[1]]];

TimeToCool1LayerClock=ClockFunction[TimeToCool1Layer];

Quiet[TimeToCool2LayersCoversColdInner = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoefCovers*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)-InnerToBathRadiationCoef2LayerCovers*(TInnerVar[t]^4-TBath^4)+BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath,WhenEvent[TBreadVar[t]<=1.000001*Twant,Sow[t]]},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}]][[2]][[1]][[1]]];

TimeToCool2LayersCoversColdInnerClock=ClockFunction[TimeToCool2LayersCoversColdInner];

Quiet[TimeToCool2LayersColdInner = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)+BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath,WhenEvent[TBreadVar[t]<=1.000001*Twant,Sow[t]]},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}]][[2]][[1]][[1]]];

TimeToCool2LayersColdInnerClock=ClockFunction[TimeToCool2LayersColdInner];

Quiet[TimeToCool1LayerCoversColdInner = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoefCovers*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToBathRadiationCoef*(TInnerVar[t]^4-TBath^4)+BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TBath,WhenEvent[TBreadVar[t]<=1.000001*Twant,Sow[t]]},{TBarVar,TBreadVar,TInnerVar},{t,0,Time}]][[2]][[1]][[1]]];

TimeToCool1LayerCoversColdInnerClock=ClockFunction[TimeToCool1LayerCoversColdInner];

Quiet[TimeToCool1LayerColdInner = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToBathRadiationCoef*(TInnerVar[t]^4-TBath^4)+BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TBath,WhenEvent[TBreadVar[t]<=1.000001*Twant,Sow[t]]},{TBarVar,TBreadVar,TInnerVar},{t,0,Time}]][[2]][[1]][[1]]];

TimeToCool1LayerColdInnerClock=ClockFunction[TimeToCool1LayerColdInner];


Quiet[TimeToCoolNoShields = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoefNoShields*(TBreadVar[t]^4-TBath^4)),TBarVar[0]==TBreadVar[0]==TBath,WhenEvent[TBreadVar[t]<=1.000001*Twant,Sow[t]]},{TBarVar,TBreadVar},{t,0,Time}]][[2]][[1]][[1]]];

TimeToCoolNoShieldsClock=ClockFunction[TimeToCoolNoShields];

CryoTable=Append[CryoTable,{CryoList[[i]][[1]],CryoPower123,TimeToCool2LayersCoversClock,TimeToCool2LayersClock,TimeToCool1LayerCoversClock,TimeToCool1LayerClock,TimeToCool2LayersCoversColdInnerClock,TimeToCool2LayersColdInnerClock,TimeToCool1LayerCoversColdInnerClock,TimeToCool1LayerColdInnerClock,TimeToCoolNoShieldsClock}]];
CryoTable//MatrixForm

PowerList={"Power Lost to Bath at Equilibrium","N/A"};
TCryo=20;
CryoPower=100;

s=NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPower),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoefCovers*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)-InnerToBathRadiationCoef2LayerCovers*(TInnerVar[t]^4-TBath^4)),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}];
TBreadFinal=(TBreadVar[Time]/.s)[[1]];
TInnerFinal=(TInnerVar[Time]/.s)[[1]];
TOuterFinal=(TOuterVar[Time]/.s)[[1]];

BathPower=BreadToBathConductionCoef*(TBath-Twant)+BreadToBathRadiationCoefCovers*(TBath^4-Twant^4)+InnerToBathConductionCoef*(TBath-TInnerFinal)+InnerToBathRadiationCoef2LayerCovers*(TBath^4-TInnerFinal^4)+OuterToBathConductionCoef*(TBath-TOuterFinal)+OuterToBathRadiationCoef*(TBath^4-TOuterFinal^4)+BarToBathConductionCoef*(TBath-TBarFinal)+BarToBathRadiationCoef*(TBath^4-TBarFinal^4);

PowerList=Append[PowerList,BathPower];

s=NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPower),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}];
TBreadFinal=(TBreadVar[Time]/.s)[[1]];
TInnerFinal=(TInnerVar[Time]/.s)[[1]];
TOuterFinal=(TOuterVar[Time]/.s)[[1]];

BathPower=BreadToBathConductionCoef*(TBath-Twant)+BreadToBathRadiationCoef*(TBath^4-Twant^4)+InnerToBathConductionCoef*(TBath-TInnerFinal)+OuterToBathConductionCoef*(TBath-TOuterFinal)+OuterToBathRadiationCoef*(TBath^4-TOuterFinal^4)+BarToBathConductionCoef*(TBath-TBarFinal)+BarToBathRadiationCoef*(TBath^4-TBarFinal^4);

PowerList=Append[PowerList,BathPower];

s=NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPower),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoefCovers*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToBathRadiationCoef*(TInnerVar[t]^4-TBath^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TBath},{TBarVar,TBreadVar,TInnerVar},{t,0,Time}];
TBreadFinal=(TBreadVar[Time]/.s)[[1]];
TInnerFinal=(TInnerVar[Time]/.s)[[1]];

BathPower=BreadToBathConductionCoef*(TBath-Twant)+BreadToBathRadiationCoefCovers*(TBath^4-Twant^4)+InnerToBathConductionCoef*(TBath-TInnerFinal)+InnerToBathRadiationCoef*(TBath^4-TInnerFinal^4)+BarToBathConductionCoef*(TBath-TBarFinal)+BarToBathRadiationCoef*(TBath^4-TBarFinal^4);

PowerList=Append[PowerList,BathPower];

s=NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPower),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToBathRadiationCoef*(TInnerVar[t]^4-TBath^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TBath},{TBarVar,TBreadVar,TInnerVar},{t,0,Time}];
TBreadFinal=(TBreadVar[Time]/.s)[[1]];
TInnerFinal=(TInnerVar[Time]/.s)[[1]];

BathPower=BreadToBathConductionCoef*(TBath-Twant)+BreadToBathRadiationCoef*(TBath^4-Twant^4)+InnerToBathConductionCoef*(TBath-TInnerFinal)+InnerToBathRadiationCoef*(TBath^4-TInnerFinal^4)+BarToBathConductionCoef*(TBath-TBarFinal)+BarToBathRadiationCoef*(TBath^4-TBarFinal^4);

PowerList=Append[PowerList,BathPower];

s=NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPower),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoefNoShields*(TBreadVar[t]^4-TBath^4)),TBarVar[0]==TBreadVar[0]==TBath},{TBarVar,TBreadVar},{t,0,Time}];
TBreadFinal=(TBreadVar[Time]/.s)[[1]];

BathPower=BreadToBathConductionCoef*(TBath-Twant)+BreadToBathRadiationCoefNoShields*(TBath^4-Twant^4)+BarToBathConductionCoef*(TBath-TBarFinal)+BarToBathRadiationCoef*(TBath^4-TBarFinal^4)

PowerList=Append[PowerList,BathPower];

CryoTableTotal=Append[CryoTable,PowerList];
CryoTableTotal//MatrixForm

PEEKStress=MassOuterShield*9.8/(BreadPostNumber*ABreadPost)
PEEKTensile=170*10^6
PEEKTensile/PEEKStress

Time=2000000;

CryoToBarConduction =1;
BarToBreadConduction =0.6;
CyroToBreadConductionCoef=1/(1/CryoToBarConduction+1/BarConduction+1/BarToBreadConduction);

StringForm["The Cryohead to Bar Conduction Coefficient is ``W/K.",CryoToBarConduction]
StringForm["The Bar to Bread Conduction Coefficient is ``W/K.",BarToBreadConduction]

BreadtoInnerConductionCoef=0;
StringForm["The Bar to Innder Conduction Coefficient is ``W/K.",BreadtoInnerConductionCoef]

MassBar=10;
MassBread=44/lbstokg;

StringForm["The Bar mass is ``kg.",MassBar]
StringForm["The Bread mass is ``kg.",MassBread]

BarmeffCpeff=MassBar*SpecificHeatCopper;
BreadmeffCpeff=MassBread*SpecificHeatAluminum;

CryoPoints=CH110points;
BarToBreadConductionCoefHeating =0.062;

CryoPowerFunction[T_]:=Piecewise[{{0,T<CryoPoints[[1]][[1]]},{Quiet[ Interpolation[CryoPoints,InterpolationOrder->1][T]],CryoPoints[[1]][[1]]<=T<CryoPoints[[Length[CryoPoints]]][[1]]},{CryoPoints[[Length[CryoPoints]]][[2]],T>=CryoPoints[[Length[CryoPoints]]][[1]]}}];

TCryo=CryoPoints[[1]][[1]];

Plot[CryoPowerFunction[T],{T,0,TBath},PlotRange->All,AxesLabel->{"Cold Tip Temperature (K)","Lift (W)"},PlotLegends->{Lift Power}]


s=NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)+BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}];
TInnerFinalCool=(TInnerVar[Time]/.s)[[1]];
TOuterFinal=(TOuterVar[Time]/.s)[[1]];
TBarFinalCool=(TBarVar[Time]/.s)[[1]];
TBreadFinal=(TBreadVar[Time]/.s)[[1]];
ApproxTimetoCool=BreadmeffCpeff*(TBath-Twant)/CryoPowerFunction[123];

StringForm["The final Bar Temperature is ``K.",TBarFinalCool]
StringForm["The final Inner Shield Temperature is ``K.",TInnerFinalCool]
StringForm["The final Outer Shield Temperature is ``K.",TOuterFinal]

Quiet[TimeToCool = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)+BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath,WhenEvent[TBreadVar[t]<=1.000001*Twant,Sow[t]]},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}]][[2]][[1]][[1]]];

Quiet[TimeToCoolBar = Reap[NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)+BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath,WhenEvent[TBarVar[t]<=1.000001*TCryo,Sow[t]]},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}]][[2]][[1]][[1]]];

If[TimeToCool==={},StringForm["The Breadboard does not get to `` K. The final temperature is `` K.", Twant,TBreadFinal],StringForm["The time to cool the Breadboard to `` K is ``s, or ``.",Twant,TimeToCool,ClockFunction[TimeToCool]]]

Plot[{Evaluate[TOuterVar[t]/. s],Evaluate[TInnerVar[t]/. s],Evaluate[TBreadVar[t]/. s],Evaluate[TBarVar[t]/. s]},{t,0,If[TimeToCool==={},Time,1.5*TimeToCool]},PlotRange->All,AxesLabel->{"Time(s)","Temperature (K)"},PlotLegends->{Outer Shield Temperature,Inner Shield Temperature,BreadBoard Temperature,Bar Temperature}]

Breadheating=0;
Innerheating=0;
Outerheating=0;
h=NDSolve[{TBarVar'[t]==HeavisideTheta[TBath-TBarVar[t]]/(BarmeffCpeff)*(-BarToBreadConductionCoefHeating*(TBarVar[t]-TBreadVar[t])-BreadToBathRadiationCoef*(TBarVar[t]^4-TBath^4)),TBreadVar'[t]==HeavisideTheta[TBath-TBreadVar[t]]/(BreadmeffCpeff)*(Breadheating+BarToBreadConductionCoefHeating*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)),TInnerVar'[t]==HeavisideTheta[TBath-TInnerVar[t]]/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)+Innerheating),TOuterVar'[t]==HeavisideTheta[TBath-TOuterVar[t]]/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)+Outerheating),TBarVar[0]==TBarFinalCool,TBreadVar[0]==TBreadFinal,TInnerVar[0]==TInnerFinalCool,TOuterVar[0]==TOuterFinal},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}];


Plot[{Evaluate[TOuterVar[t]/. h],Evaluate[TInnerVar[t]/. h],Evaluate[TBreadVar[t]/. h],Evaluate[TBarVar[t]/. h]},{t,0,1.5*TimeToHeat},PlotRange->All,AxesLabel->{"Time(s)","Temperature (K)"},PlotLegends->{Outer Shield Temperature,Inner Shield Temperature,BreadBoard Temperature,"Bar Temperature"}]

tHot=Time;
For[i=1,i<=Time,i++,
If[N[TBreadVar[i]/.h][[1]]>=Twant+1,
tHot=i;
Break[]]]

StringForm["The time to get to `` K is `` s, or ``.",Twant+1,tHot,ClockFunction[tHot]]

Plot[{Evaluate[TOuterVar[t]/. h],Evaluate[TInnerVar[t]/. h],Evaluate[TBreadVar[t]/. h],Evaluate[TBarVar[t]/. h]},{t,0,tHot},PlotRange->All,AxesLabel->{"Time(s)","Temperature (K)"},PlotLegends->{Outer Shield Temperature,Inner Shield Temperature,BreadBoard Temperature,"Bar Temperature"}]

Plot[Evaluate[TBreadVar[t]/. h],{t,0,tHot},PlotRange->All,AxesLabel->{"Time(s)","Temperature (K)"},PlotLegends->BreadBoard Temperature]


TInnerFinal=(TInnerVar[tHot]/.h)[[1]];
TOuterFinal=(TOuterVar[tHot]/.h)[[1]];
TBarFinal=(TBarVar[tHot]/.h)[[1]];
TBreadFinal=(TBreadVar[tHot]/.h)[[1]];

StringForm["The final Bar Temperature after heating is ``K.",TBarFinal]
StringForm["The final Inner Shield Temperature after heating is ``K.",TInnerFinal]
StringForm["The final Outer Shield Temperature after heating is ``K.",TOuterFinal]


s=NDSolve[{TBarVar'[t]==HeavisideTheta[TBarVar[t]-TCryo]/(BarmeffCpeff)*(-CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BarToBathRadiationCoef*(TBarVar[t]^4-TBath^4)-BarToBathConductionCoef*(TBarVar[t]-TBath)-CryoPowerFunction[TBarVar[t]]),TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(CyroToBreadConductionCoef*(TBarVar[t]-TBreadVar[t])-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TInnerVar'[t]==1/(InnermeffCpeff)*(BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-InnerToBathConductionCoef*(TInnerVar[t]-TBath)- InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)+BreadtoInnerConductionCoef(TBreadVar[t]-TInnerVar[t])),TOuterVar'[t]==1/(OutermeffCpeff)*(-OuterToBathConductionCoef*(TOuterVar[t]-TBath)- OuterToBathRadiationCoef*(TOuterVar[t]^4-TBath^4)+InnerToOuterRadiationCoef*(TInnerVar[t]^4-TOuterVar[t]^4)),TBarVar[0]==TBarFinal,TBreadVar[0]==TBreadFinal,TInnerVar[0]==TInnerFinal,TOuterVar[0]==TOuterFinal},{TBarVar,TBreadVar,TInnerVar,TOuterVar},{t,0,Time}];
TInnerFinal=(TInnerVar[Time]/.s)[[1]];
TOuterFinal=(TOuterVar[Time]/.s)[[1]];
TBarFinal=(TBarVar[Time]/.s)[[1]];
TBreadFinal=(TBreadVar[Time]/.s)[[1]];
ApproxTimetoCool=BreadmeffCpeff*(TBath-Twant)/CryoPowerFunction[123];

TimeToCool=Time;
For[i=1,i<=Time,i++,
If[N[TBreadVar[i]/.s][[1]]<=1.00001*Twant,
TimeToCool=i;
Break[]]]

TimeToCoolBar=Time;
For[i=1,i<=Time,i++,
If[N[TBarVar[i]/.s][[1]]<=TBarFinalCool+1,
TimeToCoolBar=i;
Break[]]]

TimeToCoolInner=Time;
For[i=1,i<=Time,i++,
If[N[TInnerVar[i]/.s][[1]]<=TInnerFinalCool+1,
TimeToCoolInner=i;
Break[]]]

TInnerFinal=(TInnerVar[TimeToCool]/.s)[[1]];
TOuterFinal=(TOuterVar[TimeToCool]/.s)[[1]];
TBarFinal=(TBarVar[TimeToCool]/.s)[[1]];
TBreadFinal=(TBreadVar[TimeToCool]/.s)[[1]];

StringForm["The time to recool the Breadboard to `` K is ``s, or ``.",Twant,TimeToCool,ClockFunction[TimeToCool]]

StringForm["The time to recool the Bar to `` K is ``s, or ``.",TBarFinalCool+1,TimeToCoolBar,ClockFunction[TimeToCoolBar]]

StringForm["The time to recool the Inner Shield to `` K is ``s, or ``.",TInnerFinalCool+1,TimeToCoolInner,ClockFunction[TimeToCoolInner]]

Plot[{Evaluate[TOuterVar[t]/. s],Evaluate[TInnerVar[t]/. s],Evaluate[TBreadVar[t]/. s],Evaluate[TBarVar[t]/. s]},{t,0,100000},PlotRange->All,AxesLabel->{"Time(s)","Temperature (K)"},PlotLegends->{Outer Shield Temperature,Inner Shield Temperature,BreadBoard Temperature,Bar Temperature}]

Plot[Evaluate[TBreadVar[t]/. s],{t,0,10000},PlotRange->All,AxesLabel->{"Time(s)","Temperature (K)"},PlotLegends->"BreadBoard Temperature"]

StringForm["The final Bar Temperature after recooling is ``K.",TBarFinal]
StringForm["The final Inner Shield Temperature after recooling is ``K.",TInnerFinal]
StringForm["The final Outer Shield Temperature after recooling is ``K.",TOuterFinal]