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*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)

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)

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)

AlDensity=2700;
lbstokg=2.2;
MassBread=8/lbstokg;
MassInnerShield=(6.2*2+7.06)/lbstokg;
MassOuterShield=(7.6*2+9)/lbstokg;
SpecificHeatAluminum=900;
AlEnergyToCool=SpecificHeatAluminum*((MassInnerShield+MassBread)*(TBath-TInner)+MassOuterShield*(TBath-TOuter))

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

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

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

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]

CryoPower=25;

MassBread=8/lbstokg;
MassInnerShield=(6.2*2+7.06)/lbstokg;
MassOuterShield=(7.6*2+9)/lbstokg;
SpecificHeatAluminum=900;

BreadmeffCpeff=MassBread*SpecificHeatAluminum;
InnermeffCpeff=MassInnerShield*SpecificHeatAluminum;
OutermeffCpeff=MassOuterShield*SpecificHeatAluminum;

Twant = 123;
TBath=294;

Time=10^6;

s=NDSolve[{TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-CryoPower),TInnerVar'[t]==HeavisideTheta[TInnerVar[t]-Twant]/(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)),TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath},{TBreadVar,TInnerVar,TOuterVar},{t,0,Time}];
TInnerFinal=(TInnerVar[Time]/.s)[[1]];
TOuterFinal=(TOuterVar[Time]/.s)[[1]];
ApproxTimetoCool=BreadmeffCpeff*(TBath-Twant)/CryoPower;

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

TimeToCool = Reap[NDSolve[{TBreadVar'[t]==HeavisideTheta[TBreadVar[t]-Twant]/(BreadmeffCpeff)*(-BreadToBathConductionCoef*(TBreadVar[t]-TBath)- BreadToBathRadiationCoef*(TBreadVar[t]^4-TBath^4)-BreadtoInnerRadiationCoef*(TBreadVar[t]^4-TInnerVar[t]^4)-CryoPower),TInnerVar'[t]==HeavisideTheta[TInnerVar[t]-Twant]/(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)),TBreadVar[0]==TInnerVar[0]==TOuterVar[0]==TBath,WhenEvent[TBreadVar[t]==Twant,Sow[t]]},{TBreadVar,TInnerVar,TOuterVar},{t,0,Time}]][[2]][[1]][[1]];

StringForm["The time to cool the Breadboard to `` K is ``s.",Twant,TimeToCool]
StringForm["This is `` hours, `` minutes",Floor[TimeToCool/3600],Round[Mod[TimeToCool,3600]/60]]

Plot[{Evaluate[TOuterVar[t]/. s],Evaluate[TInnerVar[t]/. s],Evaluate[TBreadVar[t]/. s]},{t,0,2*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 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)]

TotalPowerAtEquilibrium=BreadToBathConductionCoef*(TBath-Twant)+BreadToBathRadiationCoef*(TBath^4-Twant^4)+InnerToBathConductionCoef*(TBath-TInnerFinal)+OuterToBathConductionCoef*(TBath-TOuterFinal)+OuterToBathRadiationCoef*(TBath^4-TOuterFinal^4);
StringForm["The Total Power Lost at Equilibrium is ``W.",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

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

ABeamPost=Pi*(0.75*25.4/1000)^2;
LBeamPost=0.5*25.4/1000;
lambdaPEEK=0.24;
TBreadBoard=140;
TInner=123;
BeamToBreadConduction=ABeamPost*lambdaPEEK*(TBreadBoard-TInner)/LBeamPost
BeamToBreadConductionCoef=ABeamPost*lambdaPEEK/LBeamPost