Manipulate[
Plot[(Subscript[F, d])*v^2*(η/100),{(Subscript[F, d]),5,20},
{GridLines->Automatic,
PlotStyle->Thick,
Frame->True,
PlotLabel->"Output Power vs Damping Coefficient",
FrameLabel->{"Damping Coefficient (kN/(m/s))","Output Power (kW)"}}
],
{{η,50,"% Efficiency"},1,100},{{v,1,"Velocity"},0,2}]

rBank={10,10,25,50,75,100}

combos=DeleteDuplicates[Drop[Subsets[rBank],1]]

Length[combos]

parallel[values_]:=(1/Total[1/values])

power[values_]:=1500/(1/Min[values]/Total[1/values])

power[{90,90}]

outVals=Map[parallel,combos]

Length[outVals]

outPows=Map[power,combos]

outVmax=Sqrt[outVals outPows]

outList=Transpose[{outVals,outPows}]

LoadBankPlot=ListPlot[Sort[outVals],{PlotRange->All,Frame->True,PlotLabel->Load Resistor Values,FrameLabel->{"","Resistance (ohms)"},AxesOrigin->{0,0},PlotMarkers->Automatic,Joined->True}]

Export["LoadBankPlot.pdf",LoadBankPlot]

TableForm[Join[{{res,pow}},N[Sort[outList],4]]]

outListAll=Transpose[{N[outVals,4],combos,Round[outVmax],Round[outPows]}]

Round[outVmax,3]

TableForm[Join[{{Res,Vals,Vmax,Pmax}},Sort[outListAll]]]

FormattedOut=Grid[Join[{{Res,Vals,Vmax,Pmax}},Sort[outListAll]],Frame->All]

Export["LoadBank.pdf",FormattedOut]

Now design a new resistor bank to be deployed in an oil-filled box on the buoy. There will be eight 1000 W resistors in the box.

power[values_]:=1000/(1/Min[values]/Total[1/values])

rBank2={2,4,8,16,32,64,128,256}

rBank2={3,6,12,25,33,50,80,100}

combos2=DeleteDuplicates[Drop[Subsets[rBank2],1]];

outVals2=Map[parallel,combos2];

Length[outVals2]

outPows2=Map[power,combos2];

Length[outPows2]

outVmax2=Sqrt[outVals2 outPows2];

outList2=Transpose[{outVals2,combos2,outPows2}];

LoadBankPlot=ListPlot[Sort[outVals2],{PlotRange->All,Frame->True,PlotLabel->Load Resistor Values,FrameLabel->{"","Resistance (ohms)"},AxesOrigin->{0,0},PlotMarkers->{Automatic,Tiny},Joined->True}]

Export["LoadBankPlot.pdf",LoadBankPlot]

TableForm[Join[{{Res,Vals,Pow}},N[Sort[outList2],4]]];

outListAll2=Transpose[{N[outVals2,4],combos2,Round[outPows2]}];

FormattedOut=Grid[Join[{{Res,Vals,Pmax}},Sort[outListAll2]],Frame->All]

Export["LoadBank2.pdf",FormattedOut]

Export["LoadBankData.xls",Join[{{Res,Vals,Pmax}},Sort[outListAll2]]];

combos2

values=Sort[N[outVals2,4]]

initlist=Transpose[{values,settings}]

Length[values]

Length[settings]

Export["initlist.txt",initlist]

getsetting[lst_]:=
Module[{total=0},
If[MemberQ[lst,100],total+=1];
If[MemberQ[lst,80],total+=2];
If[MemberQ[lst,50],total+=4];
If[MemberQ[lst,33],total+=8];
If[MemberQ[lst,25],total+=16];
If[MemberQ[lst,12],total+=32];
If[MemberQ[lst,6],total+=64];
If[MemberQ[lst,3],total+=128];
Return[total];
]

getsetting[{3,6,12,25,33,50,80,100}]

blah[3]

total=0

if[MemberQ[{3,6,100},100],total+=1];

total

sortedlist=Sort[Transpose[{N[outVals2,4],combos2}]]

sortedsets=Transpose[sortedlist][[2]]

sortedsettings=Map[getsetting,sortedsets]

sortedvalues=Transpose[sortedlist][[1]]

Length[sortedvalues]

Length[sortedsettings]

resdata1=Transpose[{sortedvalues,sortedsettings}]

resdata2=Transpose[{sortedsettings,sortedvalues}]

ListLinePlot[resdata1,{PlotRange->All,Frame->True}]

sortresdata2=Sort[resdata2]

ListLinePlot[sortresdata2,{PlotRange->All,Frame->True,FrameLabel->{"Byte Value","Resistance (Ohms)"}}]