Steam is the working fluid for an ideal Rankine cycle. Saturated vapor enters the turbine at eight megapascals, and saturated liquid exits the condenser at 0.0075 megapascals. The net power output of the cycle is 100 megawatts. Determine the thermal efficiency, the backwork ratio, the massful rate of steam in kilograms per hour, the rate of heat addition, the rate of heat rejection, and then, if the condenser was cooled by a stream of cooling water entering the condenser at 15 degrees Celsius, determine the minimum stream mass flow rate in kilograms per hour, which would prevent the cooling water from exceeding 35 degrees Celsius. I will begin with a system diagram. Next, I will begin to parse out the properties that I know about my four state points. Remember that it takes two independent, intensive properties to fully define a state point, so my goal is going to be to try to identify two independent, intensive properties for all four state points. Having those would mean that I could look up whatever it was that I needed. First, let me pose the question, how many pressures do we have? There are two. Because remember, like the Brayton cycle, all heat addition and rejection processes in the Rankine cycle are assumed to be isobaric. So the condenser occurs isobarically, and the boiler occurs isobarically. Therefore, P2 is equal to P3, which is the high pressure, and P4 is equal to P1, which is the low pressure. So I will identify those pressures over here. P high is eight megapascals. P low is 0.0075 megapascals. And then state one and four are at the low pressure, and two and three are at the high pressure. Next, I recognize that I was told saturated vapor enters the turbine, and that would be state three. And I will show that in my properties as a quality. X3 is equal to one because it's a saturated vapor, and the saturated liquid exits the condenser, that would be state one. So I will write that as X1 is equal to zero. States one and three are now fully defined, from which I can look up whatever I want. What I will want to look up is eventually going to be enthalpy for my energy balances. But in the meantime, I will also want S1. Why? Because our compression and expansion processes are assumed to be isentropic unless we're given enough information to deduce otherwise. We have not been given that information. Therefore, we assume S2 is equal to S1, and S4 is equal to S3. So at state one, I want to look up H1 and S1. With that S1, I can look up H2. At state three, I will want to look up H3 and S3. And at state four, I will use that S3 to look up H4. And with that, I have enough information to get started on my property lookups. I want the four enthalpies, and I need S1 and S3 to be able to get there. I also am going to add specific volume one into the mix for reasons that will make sense later. For now, let's just add it to the lookups that I'm requiring us to do. Our working fluid is water, which means that our tables for these properties are going to be tables A2 through A5. And remember, the first part of the lookup process is going to be to fix the phase at all four state points. Once I know the phase, I can go into the correct table and evaluate the properties that I need. If you want a review of the property lookup process, I have some videos under Thermo One's chapter three videos. That I think might be helpful. But for now, let's start with state one, assuming that you guys totally remember how to do all of these property lookups. So at state one, I have a pressure of 0.075 bar and a quality of zero, meaning I'm going to grab the saturated liquid property from my saturation tables by pressure. Remember that the saturation tables A2 and A3 contain the same information. One is just listed in even increments of pressure. One is listed in even increments of temperature. So if I jump into table A3 and find 0.075, I see that I don't happen to have a row corresponding to 0.075 bar, which means I'm going to have to interpolate between 0.06 and 0.08. I will write that out as 0.075 minus 0.06 divided by 0.08 minus 0.06. That will represent the proportion of the way I am between 0.06 and 0.08. And I will apply that same proportion to specific volume, specific enthalpy, and specific entropy. Those are the VF, HF, and SF values at 0.075 bar. And to make this a little bit easier to follow, as I'm scrolling all over the place, I will highlight these two rows so that we can just grab the values as we see fit. And when I'm typing this on my calculator, I will type it using the solve function so that hopefully, it's a little bit easier for you guys to reverse engineer what I'm doing. When you calculate it yourself, of course, you would probably do the algebra and actually compute a number as opposed to trying to leave the calculator to do the algebra. Anyway, 0.075 minus 0.06 divided by 0.08 minus 0.06 is equal to... Let's go with VF first, because it's right here. The thing that I'm looking for, which I'm going to call x for now, minus the value at 0.06 bar, which would be 0.0010064. Remember that that column is not VF. It is VF times 10 to the third. Therefore, to get back to VF, you have to take this quantity times 10 to the negative third. Anyway, then I'm dividing by 0.0010084 minus 0.0010064. And I get a value for my V1 of 0.001008. So 0.001008 cubic meters per kilogram. One look up down. Do you want to go? Let's stay one. I apply the same proportion to my HF values. So I will jump back into the calculator. I will grab that same calculation and just replace the terms on the right. So this would be x minus 151.53 divided by 173.88 minus 151.53. And I get an H1 value of 168.293. That would be kilojoules per kilogram. And then my S1 value is going to be between 0.5210 and 0.5226. So calculator. We swap out those two values. I'm going to be taking x minus 0.5210 divided by 0.5226 minus 0.5210. And I get an S1 value of 0.5747. 0.5747 kilojoules per kilogram kelvin. Okay, stay one done. For state two, I have a pressure of 80. kilojoules per kilogram kelvin. Okay, stay one done. For state two, I have a pressure of 8 megapascals, which is 80 bar. And an entropy of 0.5747. So the first step is going to be to determine the phase at state two. Easiest way to do that would be to look up SF and SG at P2 and compare my entropy to those values. So at 80 bar, I'm going to be looking at an SF and SG value of 3.2068 and 5.7432. Because this first column is SF, this second column is SG. So at 80 bar, that's 3.2068 and 5.7432. And the logic goes, if my entropy is less than SF, I must have a compressed liquid. If it's greater than SG, I must have a superheated vapor. And if it's between SF and SG, then I must have a saturated liquid vapor mixture. So my value of 0.5747 is going to be less than SF, therefore I have a compressed liquid. So now I will jump over to my compressed liquid table, which is table A5. And I find the pressure subtable corresponding to 80 bar. And I see that alas, I don't happen to have a pressure subtable corresponding to 80 bar. Which means that I'm going to have to interpolate between 75 bar and 100 bar. Furthermore, I recognize that my value of 0.5747 does not appear on either one of these nice even rows, which means I'm going to have to interpolate between two rows and two sub-tables. Which means that I have a triple interpolation on my hands. And remember from thermal 1, there are two ways that we can go about doing that. Either interpolating between the rows first and then interpolating on the between the two sub-tables, between the columns essentially, or interpolate between the columns first to generate a little sub-table corresponding to 80 bar, and then interpolate between the rows. You can do whichever method you prefer, they both yield the same answer. But performing the interpolation by hand is a little bit easier to follow. If I start by interpolating between the two pressure subtables on the same row to essentially build a little sub-table of our own, that way you can more easily follow what I'm doing. So I'm going to jump back to the iPad. I'm going to bring us our own little sub-table corresponding to 80 bar. And I have a temperature column, an enthalpy column, and an entropy column. And my entropy is going to be between 0.5696 and 0.5686 and 1.0704 and 1.0688, which means that I'm going to be between the temperatures of 40 and 80. The 40, 80, and I'm going to interpolate for an h value at 80 bar and 40 degrees Celsius. And then I'm going to interpolate for an h value at 80 bar and 80 degrees Celsius. This would be, let's call this 1, 2, and then an entropy value at 40 degrees Celsius here and 80 bar, and then an entropy value at 80 degrees Celsius and 80 bar, which is here. And then I'm going to use my entropy, which is 0.5747, to interpolate for a value of enthalpy at that entropy. Does that all make sense? I mean, I could grab T2 while I'm here, but I don't actually need it. And it's kind of a waste of time to calculate yet another thing at this standpoint. So I will just leave it off for now. So we have four interpolations to do to establish the framework that we are actually using for our actual interpolation. Does that make sense? Okay, good. So jumping back to our tables, I'm grabbing the value of enthalpy at 80 bar and 40 degrees Celsius first. So that interpolation is going to be wakeup calculator. Solving between pressures would be 80 minus 75 divided by 100 minus 75. And that's equal to, and look, I'm going to be doing a whole bunch of interpolations here. So I'm going to make this a little bit easier on myself by plugging in variables. I can do that on my TI 89. If you have an 89 or a 92 or an inspire or equivalent, you can do the same thing. If you're working through this on a simpler calculator, you're probably going to have to just punch the numbers every time. And that's, of course, fine, but this will make it a little bit faster for us to work this on the example problem. So I'm going to say x minus a divided by b minus a. And then I'm going to evaluate it for x and I'm going to plug in an a value of, we are interpolating for enthalpy first and 40 degrees Celsius. So 174.18 and a b value of. A b value of. That's, that's letter a again calculator and a b value of 176.38. So our first value here is 174.62. Okay. And then our second value is going to be enthalpy at 80 degrees Celsius. So a is. 340.84 b is 342.83 341.238 and then an entropy value at 40. So I'm using an a value of 0.5696 and a b value of 0.5686. Giving me an entropy of 0.5694 and I'm so confident that we're doing this correctly that I'm going to grab the other one as well so that I can just write them both down at the same time. That'd be 1.0704 and 1.0688. So those are our two entropy values forming the framework for our final interpolation here. So that was 0.5694 and 1.07008. And that seems very high. So I'm just going to go double check 1.07008. Yep. Okay. Now we have everything we need to actually perform our actual interpolation. So I'm going to say solve 0.5747 minus 0.5694. Divided by 1.07008 minus 0.5694 is equal to what we're looking for. X minus 174.62 divided by 341.238 minus 174.62. Calculator if you would please solve for X we get 176.384. And I'm going to write that up here 176.384. And while we're here I mean just for fun we can interpolate for temperature as well. I mean why not right? We did all this work already. Why not do a little bit of extraneous work? Look it's 40.42 degrees Celsius at state 2. Hooray. Anyway that process of going from state 1 to state 2 is a lot of interpolation. And it could have been worse. I mean imagine for a moment if we had ended up between two different rows and the two different tables and imagine if my state point was below the lowest pressure subtable then my interpolation would be between the lowest pressure subtable and the saturated liquid property. There is a shortcut that we can take to come up with our enthalpy value at state 2 and that shortcut is actually a navigation through fluid mechanics in order to get to a property. And that's by considering the work of a pump if we have incompressible flow. So we were to take our conservation of energy Reynolds transport theorem control volume equation and simplify it for a situation where we had incompressible flow undergoing steady state operation and we were to neglect friction we would end up with the work of a pump on a specific basis is approximately equal to specific volume times pressure change. And our specific work of our pump here is h2 minus h1. So if we make the assumption that the flow from one to two is pretty close to incompressible we can just take the specific volume at either state point because it's assumed to be the same because we're assuming that the density doesn't change times p2 minus p1 that gives us our difference in enthalpy. So I could say h2 is pretty close to h1 plus specific volume times p2 minus p1. We had h1 already it was 168.293 and we are adding to that our specific volume of state 1 which is 0.001008 cubic meters per kilogram multiplied by a pressure difference. Why don't we write that pressure difference in bar that would be 80 minus 0.075 bar and I recognize that a bar is 100 kilopascals and actually let me back up a second I want to get to kilojoules so best practice is to start a kilojoules and work backwards. A kilojoule can be written as a kilonewton times a meter and a kilopascal can be written as a kilonewton per square meter forgive me I'm running out of space here and everyone knows it's impossible to move when you're working digitally. Kilopascals cancels kilopascals bars cancel bars kilonewtons cancels kilonewtons cubic meters cancels square meters and meters and kilograms are left over. So if I were to take 0.001008 times the quantity 80 minus and 0.075 times 100 I would yield a quantity in kilojoules per kilogram which I could add to 168.293 to get an approximate value for h2 so let's try that out calculator if you would please wake up that's 168.293 plus 0.001008 times the quantity 80 minus 0.075 times 100 we get 176.349 so comparing contrast here with five interpolations we came up with a value that was 176.384 with zero interpolations and a single calculation we came up with a value that is 176.349 how much error is there in that calculation well let's find out 176.349 actually let me just grab the value so that we can keep the trailing decimals minus 176.384 divided by 176.384 that's what 0.02 percent that's probably an acceptable amount of error so here are my rules for that shortcut if you have a pump not a compressor but a pump and you're in the compressed liquid region and the saturated liquid line the whole time you can use this shortcut just be sure to note in your assumptions that you're assuming incompressible flow from one to two anyway we have the better value so let's keep the better value and move on to state three which is thankfully going to be just a matter of finding 80 bar in our saturation tables so back to table eight three we are looking for 80 bar which is down here I will grab the highlighter tool again and what I want at state three is an hg value this column here and an sg value this column here and I can't quite fit both of those on the same sheet of paper at any reasonable scale so I apologize for these small numbers on your screen but if I write down 5.7432 for my entropy 5.7432 5.7432 and an enthalpy value of 2758 on the nose that gives me my lookups and for my lookup at state four I have generally the same process as state two that is I need to use my entropy at state four which is the same as state three and compare that to sf and sg at my pressure at state four and then use our value to determine the phase so I'm going to have an entropy of 5.7432 and if we scroll on back up to 0.075 bar and try to find the hand tool in adobe again I can scoot over zoom in I see that my entropy value is going to be between sf and sg I mean my sf value is going to be whatever the interpolation for three quarters of the way between 0.5210 and 0.5226 is I mean I guess we actually have that number it's like 0.57 whatever it was and three quarters of the way between 8.33 and 8.23 is going to be what like 8.25 8.26 I have an entropy value of 5.74 which is definitely between sf and sg therefore I have a saturated liquid vapor mixture so my interpolation for enthalpy at state four is going to come from interpolating between sf and sg at 0.075 bar and I need to apply that same proportion to the difference between hf and hg at 0.075 bar so lucky me I have more interpolation steps to do let's see if we can draw that out here on the iPad again so I am going to take at state four x4 which is equal to h4 minus hf at 0.075 bar divided by hg minus hf both at 0.075 bar that's equal to s4 minus sf at 0.075 bar divided by sg minus sf at 0.075 bar and thankfully hf and sf are already done because we did that for state one because we had 0.075 bar and a saturated liquid so all we really need to do to support this interpolation is going to be to figure out sg and hg so for sg at 0.075 bar I am going to take 0.075 minus 0.06 divided by 0.08 minus 0.06 and set that equal to the value that I'm looking for x minus 8.3304 divided by 8.2287 minus 8.3304 and I get 8.25413 8.25413 kilojoules per kilogram kelvin and for hg that's going to be the same proportion except using the values at hg that'd be x minus 2567.4 divided by 2577.0 minus 2567.4 and I get 2574.6 2574.6 and I should have mentioned this earlier but I'll mention it now when you are interpolating between values that are going the opposite direction as the value that you're using to drive the interpolation like in this case pressure is increasing from 0.06 to 0.08 and enthalpy is increasing from 0.06 to 0.08 bar but the entropy is going down it can be easy to accidentally switch the direction of your entropy interpolation you might have been tempted to write 0.075 minus 0.06 divided by 0.08 minus 0.06 is equal to x minus 8.2287 minus divided by 8.3304 minus 8.2287 because your brain wants you to write a positive quantity but it doesn't actually work because you aren't grabbing the value at 0.06 and 0.08 anymore you're switching them it's okay to have a negative difference because you have a negative number in both the numerator and denominator on the right hand side of that interpolation and that's fine just make sure you keep an eye out for it it's good to get into the habit of checking that the proportion of the way you are between the numbers actually makes sense so we got 8.25 I can see that 8.25 is closer to 8.2287 than it is to 8.3304 which should be expected because 0.075 is much closer to 0.08 than it is to 0.06 so just get into the habit of double checking the sanity of your interpolation to make sure that you didn't actually switch the direction and come up with a quarter of the way across as opposed to three quarters of the way across if that makes sense anyway I have everything I need to be able to solve for h4 now we could also solve for x4 I mean we don't need it but we already determined t2 I mean we could calculate it one thing at a time so s4 was 5.7 432 minus sf at 0.075 which was 0.5747 divided by sg which is 8.25413 minus sf which is 0.5747 is equal to the thing that I'm looking for minus hf which was 168.293 divided by hg which is 2574.6 minus 168.293 and I get an x value of 1787.81 and does that make sense we are closer with 5.7 432 to 8 than we are to 0.5 therefore our enthalpy should be closer to 2500 than it is to 200 and it is which makes sense so my h4 value is 1787.81 and with that enthalpy I have everything that I actually need to determine my work in my workout my q in and my q out which will get me thermal efficiency the back work ratio I can use the power along with my network out to determine the mass flow rate of steam I can multiply that mass flow rate of steam by specific q in and specific q out to determine parts d and e and then for part e I'm going to be relating q that out to m dot cooling water times the difference in enthalpy of the cooling water itself so I have everything that I need look up wise just for funsies here let's calculate a quality at state 4 just in case I decide to plot the ts diagram I have something to refer to so that is just going to be 5.7 432 minus 0.5747 divided by 8.25413 minus 0.5747 and look we get about 0.673 queens so next even though it isn't explicitly asked for directly let's calculate the work in the q in the workout and the q out I have an open system analysis for each of these devices and I recognize that I only have work in occurring in the pump so I'm just going to end up with h2 minus h1 and again that comes from an energy balance on the pump it's isentropic which implies adiabatic we're neglecting changes in kinetic and potential energy and we're assuming work is only in the inward direction therefore it simplifies down to h2 minus h1 energy balances on the boiler turbine and condenser respectively would yield q in workout and q out terms because only one thing is happening at a time so for q in I would end up with h3 minus h2 then workout would be h3 minus h4 and q out would equal h4 minus h1 so my enthalpy values we yield these four quantities and I will bring the calculator back up and just for the sake of not scrolling all over the place I'm going to calculate all four of them before I start running them down so 176.384 minus 168.293 is work in which is 8.091 and then h3 minus h2 yields q in so 2758.0 minus 176.384 and that's 2581.62 and then 3 minus 4 yields work out which is 2758.0 minus 1787.81 and 4 minus 1 yields q out which is 1787.8.81 minus 168.293 so my four quantities are 8.091 and then 2581.62 and then 970.19 kilojoules per kilogram and 1619.52 now you know what's coming next don't you it's right I want network out and net heat transfer in so the network out is going to be the workout minus the work in which is this number minus this number we get 962.099 and that should match the net heat transfer in the inward direction not sure why I wrote the outward direction the net heat transfer in would be q in minus q out which would be 2581.62 minus 1619.52 and just to be consistent here I will actually grab the actual numbers so we get the trailing decimals that my calculator decides we don't need just so I can be a little closer to the actual value that I'm expecting hey look we got 962.099 again calculating both is a good way to check that you built these equations correctly right now we are analyzing the simplest variation of the Rankine cycle that we will possibly consider just like with the Brayton cycle we're going to add stuff to it and as we start adding stuff to it our equations are going to become more complicated which means the probability of messing this up is going to increase so good practice is to check yourself now I can consider what I actually asked for in the problem which I believe started with thermal efficiency thermal efficiency would be the network out divided by the heat transfer in so I'm going to take our shiny new 962.099 and I'm going to divide by 2581.62 and I get 37.26 percent then I asked for the back work ratio the back work ratio is the proportion of work out of the turbine that goes back into the work in and in this case it should be a very small number because the pump takes almost no work at all so I'm taking 8.091 and dividing that by 970.19 which yields 8.3 percent excuse me 0.83 percent which means all of the rest of the workout is able to go on to network out which is actually the goal of this device so we have a tremendous proportion of our work of our turbine actually being the profit that we are trying to achieve this small back work ratio implies that not much work is being reinvested to get more proportion as profit if that makes sense then for part c I wanted the mass flow rate of the steam which is the working fluid in the cycle and to do that I'm going to consider the net power output of our cycle and recognize that that quantity can be expressed as mass flow rate times specific network out therefore mass flow rate of our steam is equal to the net power output divided by the net work output or more accurately the specific network output so I have 100 megawatts 100 megawatts and I'm dividing by 962.099 kilojoules per kilogram and for now let's calculate a quantity in the kilograms per second and then we can actually get kilograms per hour which is what the problem asked for so a megawatt is a thousand kilowatts and a kilowatt is a kilojoule per second so I'm going to yield kilograms per second as an answer so 100 times 1000 divided by 962.099 yields a mass flow rate of 103.939 kilograms per second and then I can get kilograms per hour which is 3,600 seconds in one hour so if I multiply that quantity by 3,600 I will yield kilograms per hour which is 374,182 kilograms per hour and then for part d and e I am going to need a new sheet of paper here so for part d I'm looking for q in I believe yeah and that's q dot in which is going to be mass flow rate times specific q in the mass flow rate in kilograms per second was 103.939 and if I multiply that by kilojoules per kilogram I will get an answer in kilowatts so multiplying by 2581.62 something broke yields total q dot in which is going to be 268332 and that's kilowatts so 268.332 megawatts and that's one way to get to that answer there is another way do you spot it well remember that our thermal efficiency represents among other things the specific network out over the specific q in and also the total net power output divided by the rate of heat input therefore I could have taken the net power output divided by our thermal efficiency and gotten q dot in that would have also worked and that's going to be 100 megawatts divided by 0.37267 and we get 268.332 that would have been the faster way if we hadn't calculated kilograms per second as an intermediate step anyway part e is q dot out again there are two ways to do this the first would be m dot steam times specific q out kilograms per second times kilojoules per kilogram we yield kilojoules per second which is kilowatts so I could take 103.939 and multiply that by I forget what the q out number is 1619.52 and we get 168.332 megawatts do you spot the other way well the other way would be recognizing that our heat engine is taking in q in and outputting q out plus network out so an energy balance on the heat engine itself would say q dot in has to equal the net power output plus q dot out therefore q dot out could be written as q dot in minus whatever went to net power output which means that we could have taken 268.332 and subtracted 100 and gotten 168.332 that again would have been the faster method especially if I hadn't calculated m dot steam in kilograms per second then lastly part f we are considering how the cooling process actually occurs in the condenser so in our system diagram we just drew a circle and said condensation is happening here but we didn't actually elaborate on it so this is elaborating on it if I draw that circle again let's draw that as a bigger circle something like this yes that's helpful how about that yeah that'll work so this is my condenser and I have entirely too thick a line weight again make some more space I have my output of my turbine entering at state four and it is condensing it leaves at state one so the logic is we are spraying in our vapor in this case it's actually a liquid vapor mixture that is approximately 63% vapor and what 27% liquid so some amount of mixture as well and then we are running that through some coils where cooling water is passed and let's call this cooling water in and cooling water out it is gathering on those coils and it is dripping down and leaving as a freshly condensed saturated liquid so I could draw it something like this look all those droplets they're falling our gathering is a liquid and then leaving and then leaving so my question becomes if we have cooling water passing through this that's entering at 15 degrees Celsius and leaving at 35 degrees Celsius how much mass flow rate of cooling water do I need remember that the amount of heat rejected into this coil is queued out so what I'm saying is the heat rejected by the condenser is going into the cooling water and I could write that as the mass flow rate of cooling water times the specific heat absorbed by the cooling water which if I were to set up an energy balance would be m dot cooling water times h cooling water at the outlet minus h cooling water at the inlet now I'm in a situation where I am evaluating a delta h for water now I could look up the enthalpy of water if I knew two independent intensive properties but I don't I only know one so I could assume a pressure and then I can look up the enthalpy at that pressure but it might be better for me to recognize that I have a temperature difference of 20 degrees Celsius which means I have a relatively small change in temperature and my liquid is unlikely to evaporate as a result of going up to 35 degrees Celsius therefore it stays in the same phase the whole time that is the cooling water passing through the coils not the steam on the other side so if I were to assume the specific heat capacity of the cooling water was constant and again let's just remember I'm assuming the specific heat capacity of the cooling water is constant not the actual working fluid in my cycle then this would become m dot cooling water times cp of cooling water which would be cp of h2o times 35 degrees Celsius minus 15 degrees Celsius therefore m dot cooling water is equal to q dot out from my cycle divided by cp of water times 20 kelvin because the temperature difference in kelvin is the same as the temperature difference in degrees Celsius so that's going to be what was it 168.332 megawatts and I'm going to quickly run out of unit converter in the base so I'm going to bring this over here let's draw a big horizontal line and then we are dividing by the cp of water that is determined halfway between 15 and 35 halfway between the two would be 25 degrees Celsius 25 plus 273.15 is going to be about 300 kelvin so I'm grabbing the cp of water at 300 kelvin which from table 819 in my textbook means I am grabbing a number that is 4.179 4.179 kilojoules per kilogram kelvin multiplying by 20 kelvin so in order to get the energy inside of the heat transfer rate and kilojoules to cancel I need to break apart the megawatt let's write that as a thousand kilowatts and a kilowatt can be written as a kilojoule per second so kilowatts cancels kilowatts kill them excuse me megawatts cancels megawatts kilojoules cancels kilojoules and I want hours again so 3600 seconds in one hour will leave me with an answer in kilograms of cooling water per hour because we're playing the directly compare the two numbers game so calculator I need you to get back on top of business let's take 168.332 and multiply by 1000 and then multiply by 3600 and then divide by the quantity 4.179 times 20 and I get 7.25 times 10 to the sixth so in the interest of direct comparison here I will write that as 7,250,480 kilograms of cooling water per hour and exaggerated commas so we figured out that the mass flow rate of steam required to operate this was 374,000 kilograms per hour does it make sense that we need way more cooling water to accomplish the cooling process yeah it does because remember that the working fluid here the steam is undergoing a phase change which means that latent energy is involved so in order to absorb that massive amount of energy with such a small sensible energy change here means we're going to require way more mass flow rate to do that so we should expect that the cooling water needs a much much higher mass flow rate than the working fluid itself so that does make sense and by the way maintaining a certain temperature difference in your cooling water is relatively common I mean most steam power plants don't actually just reject heat with some fins and a fan on the side of a condenser they usually run the working fluid through a heat exchanger pushing it into another fluid like for example cooling water and then dealing with the cooling water separately in some cases that might just be dumping the heat into cooling water in the form of a nearby river or stream in some cases they're pulling water out of a well and just letting that hot water back into the environment and if it's too hot then it's damaging in other cases they okay this is the heat engine okay steam power plant in other cases they build a big evaporative cooler and then run it through a heat exchanger and then spray the cooling water out into the evaporative cooler and then collect the condensed cooling water before pumping it back in that's a very easy way to get rid of that heat pretty quickly and then the resulting hot air is pulled upwards which means that you end up with this little plume of steam and water vapor leaving with the hot air up into the atmosphere so if you've ever driven by a power plant and you see a big cooling tower that looks like a nuclear silo it's probably not unless it's actually a nuclear station but that cooling tower is cooling the water that they are using to cool the condenser in the actual power cycle it's just a much more efficient way to handle that and the advantage of keeping your cooling water separate from your working fluid is you want your working fluid to remain pure you don't want there to be any sort of air mixed in with it you don't want there to be impurities you don't want there to be like a build up of any sort of minerals inside of your system whereas the cooling water you don't care so much about because you don't have to be quite as precious because it's a lot easier to maintain that system anyway that's enough rambling that's all the required parameters in this problem but just for fun here why don't we draw a ts diagram i think that'd be fun so i am drawing a ts diagram and because we are talking about a Rankine cycle it's going to be helpful if we draw and because we are talking about a Rankine cycle it's going to be helpful if we draw saturation lines in order to indicate our state points relative to so i'm going to draw go with a thicker line weight i'm going to draw a saturated liquid line here and a saturated vapor line over here it's not a particularly good drawing about that that's slightly better okay start over that'll work and i have two relevant lines of constant pressure here so i am going to draw those in black i'm gonna draw low pressure remember the line of constant pressure on a ts diagram goes up into the right high pressure up here and actually let's just draw this whole thing black so that our state points will be red poof so state one is a saturated liquid at the low pressure this is 0.075 bar and this is 80 bar saturated liquid at the low pressure would appear here then state two is on the high pressure line but that's an isentropic process between one and two which means we go straight up state three was a saturated vapor at the high pressure and state four is an isentropic process straight down the low pressure line therefore my cycle looks like this and note that if i had pictured my ts diagram when i was defining my state point properties i could have more quickly determined the phase of states two and four because going up from these saturated liquid line is going to yield a compressed liquid and going down from the saturated vapor line is going to yield a saturated liquid vapor mixture and just to be consistent with my thermal one drawings here i will draw a little arrow here and say this is 60 what was it 68 percent of the way over 67.3 let's be exact shall we okay then that region enclosed is my network out and just like when we talked about trying to improve our cycle in the Brayton cycle i think it's useful to consider what would happen on your ts diagram when you're thinking through the implications in terms of thermal efficiency so remember that the integral under the process from two to three on a ts diagram would represent the heat transfer in so if i switch to blue color here this region here is my q in so the thermal efficiency is going to be the red hatched area divided by the blue hatched area that's a visual representation of my thermal efficiency so if i asked you a question like what if the condenser was operated at 0.06 bar instead of 0.075 bar you could immediately determine how that's affecting the thermal efficiency by visualizing what if the bottom line went down you have the same q in but you have a larger network out or rather you have approximately the same q in because you're scooting a little bit to the left but that same area is being added to the network out as well so network out makes a larger proportion of q in therefore dropping the condenser pressure would improve thermal efficiency or if i were to ask a question like what if the boiler were taken up to 90 bar instead of 80 bar how would that affect the thermal efficiency well you're adding the same quantity to both network out and q in therefore you're going to be improving the thermal efficiency or if we were to super heat the steam in the boiler maybe bringing it out to like here and then we are adding much more area to the network out then proportionally then we are to q in therefore that's also going to be improving the thermal efficiency moving the right line for the right also improves thermal efficiency so generally speaking increasing our boiler pressure dropping our condenser pressure and increasing our maximum temperature are all ways to improve our thermal efficiency if we set this problem up in matlab we end up with something that looks like this here i am using my boiler pressure and condenser pressure as our given information and we are looking up all of the state point properties using the x team tool set and then determining the work in q in workout and q out and calculating a thermal efficiency i'm getting a thermal efficiency of 37.25 with matlab which is good because when we worked it by hand we got 37.26 percent and then matlab also has the convenience of being able to plot this on a ts diagram so here i'm drawing my saturated liquid and saturated vapor lines drawing a line of constant pressure for 80 bar and 0.1 bar and then plotting our four state points state point one is appearing here state point two is actually visually directly on top of it because in our hand drawing the lines of constant pressure in the compressed liquid region are a bit exaggerated in reality the line of constant pressure follows so closely to the saturated liquid line that you can't really discern the difference between state one and state two visually on this plot i mean consider the fact that t1 is at our saturation temperature at 0.075 bar and t2 was 42 degrees celsius i mean they're very very close to each other state three is right here and state four is directly below it which matches what we drew which makes sense working through this in matlab allows you the ability to quickly modify given parameters and see the change that it has on your calculation very quickly i mean for example if i were to change the boiler pressure from 80 to 90 i can rerun all the calculations immediately and get a thermal efficiency of 37.65 instead of 37.25 or if i were to change this back to 80 and change the condenser pressure to 0.065 instead of 0.075 i get a thermal efficiency of 37.63 and that brings me to my next comment if we had considered the isentropic efficiency of our compressor and turbine i mean imagine a hypothetical situation where i had given you isentropic efficiencies for this process and asked you to perform all these calculations with those isentropic efficiencies all that would be different would be how we got to states two and four we would have used s1 being equal to s2s to look up in h2s and then used our definition of the isentropic efficiency for a compressor or a pump to determine h2 actual from h2s similarly we would have used s3 is equal to s4s to look up in h4s so note h2s and h4s would still be 176.384 and 1787.81 and then we would have used our isentropic efficiency of a turbine to represent the difference in enthalpy and use that to calculate h4 actual so we would have just had an extra step to getting to h2 and h4 and the rest of the analysis would be the same we would have just used h2 actual and h4 actual instead of these values which are h2s and h4s but the advantage of setting up your matlab code with an isentropic efficiency even if it's 100% is it allows us the ability to change those very quickly so instead of trying to go back and modify all your code if you have an isentropic efficiency instead of not having it you can just change it here so if we had an isentropic efficiency of a pump of 0.8 and an isentropic efficiency of our turbine of 0.9 these are very respectable efficiencies 80% and 90% let's see how much that affects our thermal efficiency shall we look at that it dropped all the way down to 33.8% wow that's quite a big change just by changing our isentropic efficiency just a little bit and now i think we can consider this example problem done


What's going on, everyone? Sam here with late in sports cards. We're up in one box of 23 Panini Mosaic football hobby for Sam A. So good luck here, Sam. Let's do it, buddy. Got Sam, then Tony, then Jim, and then Scott. And then that'll be it. For the night, thank you all again. I might need to switch with you when you get a chance. Jalen Hyatt, Orange Chad Rylan to $199. Silver J Ward, Aaron Jones, Tony Pollard, and a gold Stefan Diggs, moments in time, 9 of 10. Minneapolis Miracle, thanks, sir. Go to bed, Jake. Go to bed. Quentin Johnson on the debut. 2199 is Dak Prescott, Mahomes, and Dante Hall. CJ Stroud debut. Devin White, Red Andre Johnson, George Kittle, and Silver Splash of Dak Prescott. Yes, yes, yes. Will Leviss Rookie, Traylon Burks, Dalvin Cook, Tiki Barber, Silver Dwight Stevenson, Zay Flowers Rookie, Silver Chris O'Lave. Are you guys best friends or something? Tavius Martin, Ozzie Newsome, 2 at 49, Silver Charlie Jones, Ramsey and Gough and Dak. Bijan debut, Josh Allen Mosaic, Blue Aaron Rodgers, 299, 94 of 99, Tony Dorsett, and Malcolm Rodriguez center stage. OK, got you, got you. Big Spurs fan. Big Spurs fan. Got you. Got you. Tariq Wollin, Charlie Jones, Silver Jalen Waddle, Mahomes, and Adrian Pearson. She happened to catch any of his summer league highlights. You're going to go back and watch them. Thanks for letting mine know. Got you. Jamiro Gibbs debut. Johnson Damarino, Saus Gardner, Jimmy Garoppolo, and CMC. Jalen Waddle, Trey Tucker, nice one there. He is dying in bed right now. Trey Tucker. Henden Hooker Rookie, nice one there. Joe Burrow-Red, Josh Jacobs, and Zay Flowers Silver. Go to badge. Zay Flowers Rookie. Aiden Hutchinson to 75 on a blue auto, nice one there. Sam. Blue Aiden Hutchinson. Red Broderick Jones. Silver CPAT. DJ Moore in a silver Dante Hall, a human joystick. That'll do it for your break there, Sam. Thanks again, as always, men and men. Do appreciate it. Get it right out to you.


Okay, can everybody hear me? So I thought once again that my Verizon issues were resolved. They're not. I don't know what's going to happen here today. Every day for the last week, they've been in my apartment and every day they leave. And every day we think it's fixed. And last night I thought it was because they actually said they didn't hook it up somehow right. My router with the main office when the installation was set up in November. So I said okay, that made sense. I said this is going to do it. This is going to do it. Now I have terrible upload and download speed this morning. I have internet. I am here. I've got Zoom up. We're here. I don't know how long it's going to last. And I have to call them again. And it just continues. So I'm going to try to stay focused here. We do have a nice gap in AAL. It's very slow moving, 30 cents, 50 cents, the most out of this. And we're just going to do this and get out. So there's a FOMC minutes today at two. The market's up, but it may not hold that. So let's just stay away from anything related to the market today and try to do this. And it's not going to wait for us. Crap. I was going to say 1350 target and it's going there. It's got to wait. Okay, let's do 60 by 95. 60 by 95. There. Do it right now. 95. 95. Put this top in it. 95. I'll look at that later, Jackie. I like this. And Amazon is going to go with the market today. So 95 is my stop in this if you want it. You've got to be in it. We've got to watch 1330, 1325. I mean, again, this doesn't have huge, huge, huge Megalodon moves. We're lucky we're getting this here today. Again, market is up. We'll talk about that later. I just can't believe my internet isn't fixed. I mean, I just cannot believe after screaming at them yesterday, they finally admitted that they never hooked it upright from the initial installation. And I thought that was it. I really thought that was it. It's not fixed. And I shouldn't have to screen at them either. 1340, 1330, 1325. We got to watch every number. I'm not talking right now, Jeff. I'm talking right now, but I'm probably talking low volume. So I'm not talking loud today. Okay, 51 is the low for the market quick. So the market thinks that the Fed is going to stop raising rates and lower rates after the data today. I don't think that's the case. And I'm not sure if we're going to know anymore two o'clock because that's a preplanned speech or two. But that's why we're up. High inflation, bad news. Mark it up. See how the economy, what happens with the economy does not go with the market. Market is up on negative news today. The prices are up, not up as much as they thought, but up enough that they think the Fed is going to lower rates this year. It's a crazy world we live in. 1351. There we go. 1351. One more push. We're going to be out of this. One more push. We're going to be out of this.  Friday's a big day. Mark it out quick. If I can. See, do you see that? Circle, circle, circle. This is not holding up as well as I thought it would. Wow. That's interesting. Interesting. Okay, so we're waiting this AAL out. Mark it's backing up a little bit.  Tests is falling. Banks are trying to rally. Spies trying to hold on. Again, not what you'd say is some fabulous, fabulous, bullish market that you'd want to go along, everything in the world. In fact, we did some longs the other week in the market. I didn't feel any reason to do them today. So these are crappy, crappy, crappy. So we're lucky we have this little guy here. We're really lucky we can get out soon and I can call Verizon every day like I do. Just call them every day of my life. Just call them every day. Again, if I wanted to be aggressive, I'd add in here but I just don't. I just don't want to be aggressive today. I don't think we should be aggressive until an earnings season. I don't want to do it. But if you want to add right here, you can add right here at 60. You could. I'm not going to do that though. But here's the market failing. Failing. Toss the failing. It's got a long way to go but it can do it. Spy starting to fail.   Sucks in the shorts. I'll be happy if I can get 25, 30 cents out of this. It's a tiny one. Yeah, look at Amazon. I can load up the data with my internet issues. Look at this. Is everybody here? Do I have connection? Talk to me. Gary said yes. So we're in AAL. Stop is $13.95. We have the market in our favor now moving in our direction that should help this. Glad we didn't go long today. So happy we didn't go long today. I can reset it. You don't have charts. I can reset it. We're in AAL. Short. Again, in a normal market environment, I would look at a gap up and I'm just going to say the spy. Even Tesla. Okay, which we shorted the other day. And I would say this is a good bullish gap. Let's go long. In the spy, in Tesla, and a couple of other things I looked at this morning, in a normal market environment, I would have conviction in the gap. I would have confidence in the gap up. I would, we would get the rally.  The market isn't doing that. It's just not doing it. We were lucky we had the couple of plays, the two or three plays we did the other week in options to the upside. And I'm not saying I'm never going long again, but I'm just saying I knew, I knew not to do it today. I knew not to do it today. And I was just so glad I didn't do it because they would have lost. There's another big number out tomorrow morning. Banks Friday morning, F1C Minutes at 2, thing after thing after thing after thing. This market is hanging on by a thread. That's the best way to describe it, but it's been hanging on by thread for weeks. So it can hang on by thread for another weeks. A couple of weeks. So AAL is fine. It's not doing anything wrong. It's a snail. You could even lower the shop if you want to. I said you could add if you want to. I do not want to be aggressive today. We're lucky we got this. We'd be doing nothing if we didn't have this. Because we wouldn't be shorting the market. And we certainly can't go long. So that is that. And Amazon, I'm not interested in that today. We're lucky we even found that link. That was Jackie's pick late fine. But yesterday was very difficult with the internet. And today I thought I was going to be okay. We're here right now though. So where it's touching go every minute, I have to do a state of these people to get it fixed. They finally believed me yesterday that something was wrong in the back end. But it's obviously not still not fixed. So this is a snail. A snail with a lot of volume though. I'll give it that. Longer takes to go. The bigger the move it'll make under the low. Just wish it would do it fast. 945. But again, we have the market with us. Is there anything else we can look at? Not that I'm doing anything else. Not that I want to do anything else. But, but, but, but, any questions while we're waiting for this to go? So what what is going to happen Friday morning? I don't know. I have no idea how these banks are going to report. And even if they have a good report, they could have a negative reaction. Just like if they have a bad earnings report, they could have a positive reaction. Just like you saw the market have a positive reaction this morning in the gap up at a negative reaction today in the day based on the data. So they don't always coincide. So I have no idea what they do. But you do remember last earnings season, the banks really didn't do anything significant on earnings. If you remember, we were like, oh, this is a waste of our time. That was sort of a precursor looking back now to what happened then several months later when you think about it. Remember, we were, we were like, this is, these are earnings like they were nothing burgers. I don't know if anyone remembers that. You can't even go in a chart and look in a chart and tell me where Goldman's earnings are. You can't find the gap. You can't find the date. I don't know if anyone remembers that, but I do. Here we go. It's a snail, but it's a good snail. You do read snails, escargot. I never had it, but there's a French restaurant. I never had caviar either. And I'm like, if I'm going to try caviar ever, I should try it at this French restaurant. It's really good French restaurant. I'm like, if I'm going to try caviar or anything anytime, I should try it here. I don't know if I'm going to like it. I love fish, but I like the idea of eating something raw. I don't know, but people eat snails too. That's a French delicacy and I've never had them either. Here we go. A, A, L, doo, doo, doo, doo, doo, doo, doo, doo, doo, doo, doo, doo. Sushi, I don't like. Try it before. Don't like it unless it's cooked. Don't like it unless it's cooked. Here we go. I did get this French chocolate. They made these chocolate eggs for Easter. Here we go. A, A, L. Boom. It was, the chocolate was delicious. The chocolate was so delicious. They made these big eggs and then they filled them with candies and all the candies inside were homemade. I mean, it was like delicious. I still didn't, I still didn't even eat more than half of it. I have left. Okay, you can be out of this. You can be out of this if you want this. It's a snail. We're trying to squeeze more out. That's all we can do today. Netflix is a bust. I don't want to move off of this because this is going to go and my computer is also a bust. I shouldn't say my computer. My internet. I feel like I'm living in a third world country. Am I on an island in the Pacific Ocean right now? Why can't I get internet? I actually called the manager of the building. I said, who has Verizon? What is the main cable service provider in this building? He said, it's Verizon. I said, okay, then what's the problem? No pot smells. You're right, Jackie, but I need internet to work, to train, to function, to do classes. I'm classes weekend. I need internet. The Verizon lady actually said that and I'm like, I have no internet. This is, you know, and she's like, but look at your view and I'm like, what does one have to do with the other? I'm paying you for your service. It's funny. It's ironic. We just talked about this when we were talking about customer service. The other week, how customer service in general across the board at large corporations has gone downhill. The fact that I'm arguing with people, one of the guys on the phone was giving me attitude. He was giving me attitude. I just, I just said to the guy, I am angry. My service isn't working. Stop giving me attitude. Are you going to help me or not? I mean, this is like, because if not, I'm hanging up. It's like, really? You can't have everything. Yeah. You can't have internet and a view and no pot and chocolate. Here we go. A.A.L. Roll continues. Yesterday was a flood because of the internet issues, but I was determined to trade today with five megabits of speed. Here we go. A.A.L. One megabit, two megabit, three megabit. Here we go. We're trying to get this under 1340 and then we'll see. Who knows? This could go to 13 today. I don't see myself in it till then. I don't see myself in it till then at all, but we're getting it down 40. Come on, Bootsy. Did anybody get out? 36. Every penny counts here because this is such a small target. I didn't get out. Jackie got out. Damn it. I should have here. Do not want this to back up to 1350 something for the market quick. Market's falling. We're on the right side of things with this market. I've been, I've been some options. We're on the right side of things. The week is still a question mark. Here we go. A.A.L. Be out of this soon though. One more chance to break in here. One more chance to break.  I don't want it to bounce up to 1350 and change. This is good enough. I said 25 cents close enough. Close enough. I can't sit through a rally up to 1350. It just doesn't make any sense for 10 more cents or five more cents. But if you're still in it, what you could do, you could put a stop at 1350, but you know, I think this could go to 13 today. I really think it could. If you've got the patience, if you've got the stamina, if it could wait it out. Why? The market. So let me just look at one thing here and then we'll get to


Hi you guys Lindsay here welcome back to my channel inside the hem. I am back day two of our literal literal of our little trick-or-treat series I don't have a better title for it yet still so it's not even Halloween, but that's okay You can still trick-or-treat Other times of the year So today we're gonna be talking about refilling your bobbin So you're sewing along inevitably your bobbin runs out in the middle of a seam. Oh, so annoying. It's like the worst, right? So there's a trick out there where you can refill your bobbin Without unthreading your needle I know it seems too good to be true So I am going to be giving it a go and seeing if I can make it work. I will say I am using a brother sewing machine Somba sewing machines. This is an automatic feature. It's covered in the owner's manual and it's like part of your machine. It's like one of the Like features of your machine. My machine doesn't have that feature So I don't know if this trick is going to work On all machines. We're just going to try it on my machine And then you can try it on your machine and see if it works for you But let's see how it worked on my brother.  Why is that? Okay There it goes so It worked But what I wanted to see was how evenly it did it compared to Yeah, they look pretty much The exact same. I don't know if you guys can really even see this is the one wound through the needle and this is the one wound Regularly so that is actually pretty cool Um, like I said, I tried it before and it didn't work So then you would just and then you'd be back in business like so um Okay, so I think that you just need to make sure you get it through the tension disc and then Mine took a minute to recognize like oh, she's trying to wind me So it took a minute to get going but it did and it it did a really good job I think if it's hooked in here good enough and it catches And creates that tension that it needs then it will wind As beautifully as it would the other way What do you know? I'm shocked honestly. I am seriously shocked that that worked. Um, Can't wait to Need to refill my bobbin again because I'm going to just pull that thread Keep on pulling right through that needle and refill the bobbin without taking my fabric Out of the machine. It's gonna be great. I am so excited. I tried that one um, and really it does seem like the bobbin wound Just as tightly and evenly and perfectly as it does when you don't have it threaded through the needle already I mean, who knew um, so again, like I said at the beginning This is on our brother machine Um, so I don't know if it works on all of them, but I encourage you all to try it And see if it works on other machines and then help everybody out and in the comments Let me know what machine you have and if it worked for you or not Fingers crossed It works as well for everybody as it did for me And if you're one of those fancy pants people who have a machine who doesn't already well Kudos for you But for the rest of us here's a little cheater trick that is a treat and I think it actually worked So yay Okay, so tomorrow's video. We are going to do an age old trick age old trick I mean you probably learned this in your very first sewing class or heard about it at least and that is a trick for um Measuring seam allowance and making sure you can keep that seam allowance through your entire seam line So I'm real excited to show you that one All of the links for this week's videos will be in the description box And so if you want to access any of them in the series at the end of the week You'll be able to go check the description box and you'll find the ones that you need there So until tomorrow, I will see you all very soon. Bye


All right, so yeah today today we're here to talk about how we scale opens for smash learning and how we use communities to Deliver food to millions of people I'm Steven, but if all I'm a machine learning engineer at at waltz, and I'm here with I'm edgy I'm head of develop relations at company called seldom so yeah So maybe for the people that don't know waltz. We are we started as a food delivery company in Helsinki in 2016 and we are now in 23 countries going from Norway to Japan And then we'll have millions of users. That's like the boring part But the fun part is that we have machine learning and we have a lot of different use cases The first one is supply and demand forecasting. The second one is recommended systems. Then we'll have logistic optimization Then we also have fraud detection and the last one with the longest title situation monitoring inbox prioritization So with a lot of different machine learning use cases, we have a lot of different needs and we have to address this needs and The first one Biggest need that you can have usually when you train machine learning is data access. How do you access your data? How do you make sure that you access it's in a secure way, but it has to be simple as well We don't want our data scientists to be struggling and to be like, okay I need access to that table or that table or that database but struggling for like I don't know days and days and we also don't want them to have access to the whole Database that we have and all the all the tables that we have So yeah, we want to have that simple and yet secure and then infrastructure as well Has he has been told, you know scaling is quite hard and then you need infrastructure to scale usually and When you train a model you need some resources. You need some computer resources So you're gonna need CPU usually memory as well and then you might also need GPUs and You might need one GPU or five GPUs or even more. So how do you have access to those? I'm a big believer that if you need something it should be easy to have access to it So if you need one GPU, you should just say, okay, I want one GPU You shouldn't have to think about all the drivers and everything. So yeah, we have a whole infrastructure for that and Then one part that is very important is fast deployment You know you machine learning is very interactive and if you make it slow for your data scientist to deploy something Then usually the whole process is becoming very slow and then instead of taking three months to deploy model to production For example, you take six months a year or even you don't even deploy it You know we know like a lot of models that are you train your model You're like very happy with it, but then you never deploy it to production. So that's why yeah We have fast deployment is very important. And so we have a lot of CI CD pipelines and a lot of different templates And the last one is standardized monitoring So we have data scientists that train the model. They're very happy. They deploy it But you know, I don't want them to have to go on graphana and be like, okay I'm gonna create my new dashboard there because most of them they just want to use graphana They don't really care and they don't want to create dashboards and also you train your model So you're gonna have logging and we want it to be the same for everyone at least for the basic You know, you can have I don't know like CPU usage memory usage and all those things They should I have to think about it We should just yeah provide it for them So that's those are the things and the different needs that we have and Yeah, maybe a quick reminder of the typical life cycle of a machine learning.  I'm I'm pretty happy with my model here. It looks looks decent. So what you're gonna do usually is that you want to deploy it to production So you deploy to production you have your first model deployed You're very happy but then you need to monitor it because You know, you have a model But then if you don't know the latency for example of your model if you're doing it online inference Then it's pretty bad and it's the same. You also have to monitor the quality of your model You trained it on data from the past usually so you have now new data that is coming And so you also need to make sure that you know your model is the same quality It's like, yeah, maybe you deploy something and the data is very different now that what you train enough so You really have to be careful with that and then yeah iterate again You go back to the problem you go back to connecting data prototyping models and deploying again and That's like the thing. We really wanted to focus on making iterative work quick and easy. That's our main thing And we had different challenges when we started the the whole ML platform The first one is that we had projects that have been running for a long time at Walt And we we've been using measuring for I think five years But we only had a couple of projects that were running and it was very hard to create new project We had a lot of people we have some data scientists and they have amazing ideas But sometimes it was very hard to create a new project and be like, okay I want to work on that But then you don't have access to the data or then you don't know exactly how to deploy something so that was quite hard and Then the second one is that we had a lot of different tools We had we're using airflow Then we're using also some cron job to train your model But also yes, I'm safe maker and then sometimes I'm custom curd You know like someone wrote three years ago, and then no one knows exactly what it's doing So that's that's was like a big problem that we had and the last one is really the impact Because we didn't know exactly what was running or if it was running well It's also very hard to to monitor the impact of your models and be like, okay My model is pretty good, you know when I order food it arrives on time or not And so that's those are models that are very important for us and we couldn't really monitor it and One thing that's usually people don't really think about is like we had a disconnect between Machine learning metrics and business metrics. So you arrive to a meeting your data scientist You're very happy your mean square error, for example is lower But then we didn't exactly know what it was what it doesn't mean for the business And so it was like a big big struggle to you to be like, okay So when you start a new project you have some metrics that are data science metrics and then you have some business metrics So you want to optimize for both And then when you have meetings that it's a bit easier To be like, okay, my my error is lower Therefore the the business should increase or the retention should increase and so those were the main challenges that we had And if I click it works, yes So what do we want exactly for the machine learning platform? Well, the first one is easy to launch and iterate. I said that's already a couple of times But that's the main thing and then really a driving force for new endeavors, you know You're like you create a new project and you're like, yeah We have a whole ML platform and it's pretty easy to train a model It's pretty easy to deploy your model and then we also we have monitoring we have logging So, you know, we can we can create it and we are pretty confident that we can make it an end-to-end model actually And focus on platform velocity. That's a big thing as well And then tooling so common best practices You know, I have like we have a lot of tests We write a lot of tests for data scientist and then they can use them But then we also have different tooling like we have an in-house tool that is doing YAML to terraform For example, so our data scientist when they want to access some Bucket on S3 instead of writing all the terraform and everything then we have arrived the YAML for the YAML With the S3 bucket and then it will create the whole terraform without you having to do anything So that's pretty handy for a data scientist because yeah, they didn't sign up to do some terraform I didn't sign up to do some terraform. So pretty happy what I don't have to And then we also have different templates So you you're gonna train your new model and with the different tool that we use and I'm gonna talk about it later You need to write a docker file if you want to train your model and for that You know, you you might not want to run your docker file as root Or you know different things that are related to security So we have those templates so that people can just use them and then they replace They replace the template with their code, but then most of their work is already done So they don't really have to think about those things and therefore it's deployed in a secure way if I can say and Also a lot of automation. That's something very important You work on your feature branch you merge it to the main branch and then we have a lot of CI CD running We have automatic deployment as well running if you merge But yeah, I'll come back to that a bit later and the impact. Yeah We want logging continuous monitoring by default for everything So for the model that you're training for the model that you're deploying and we want that by default for everything without having the data Sense is to do anything and you make machine learning a core business component it's been used for years But we're still not there and I think yeah if we can really have a good ever platform Then we'll be able to make it great and a core business components So yeah, and how did we start then? Started to create value very quickly for a data scientist or data scientist our customers I guess most of you work with customers. Usually you have to create some values for them So they're happy what it's the same for us. We have to create values for them quickly So that means yeah fast iteration within automatic monitoring But for example being able to run a model in shadow mode You have a model running in production You want to run a new one in shadow mode so that you can make sure that you know It's actually good and the latency is not too high in comparison to the one that is running in production Well, we can you can do that easily now and Rolling updates. Yeah, you deploy your model and you're like, okay Maybe if I if it's break if it's broken, sorry Then you know you're not gonna update everything and then you have the whole what communities allows you to have with rolling updates and It had to be easy to deploy on communities as well Because when I joined the company, I joined a year and a half ago You know, we already had like 14 data scientists and I was the only one So you didn't you had to untrust of the data scientists and the different stakeholders You know, I didn't want to be to arrive there and be like, okay Now everyone trust me, you know, I have no background in building an ML platform So I had to earn their trust and to do that we had to deploy something that was quick to deploy on communities and the last one We have a motor at wall which is to focus and so for that we also wanted to focus on only one component Meaning that we didn't want to build the whole ML platform, you know from the first month we had to only one component that quits value quickly and We can have a quick impact so that we don't spend, you know, I don't know six months eight months working on something Something that can be amazing. But then your data scientists will be okay I'm not gonna use it because I don't need it, you know, we want quick feedback as well from them We expect quick iteration from them, but on return we want quick feedback from them So it can be like, okay, what you did is pretty cool. You have to improve that all that so those but that's how we started and That's what it looks like now today So we have a whole ML platform now And we have flights here, which is which is what we use to train and orchestrate our different workflows So that's running on communities as well and it's fully distributed It's fully scalable and it's running on dedicated Kubernetes clusters that we have and Then we use ML flow for experiment tracking Well, it's very famous, but yeah, you can track metrics and different things related to your models and Then we have some Python services that are here to provide automatic updating for your model and different things that we need And the one that I mentioned here as well, which is the YAML to Terraform It's also something that we have here and the last one it's Seldencore So it's what we started with. It's our deployment service And it basically allows you to put models into production microservices and to have automatic logging automatic monitoring Shadow mode a bit test. So that's what we have now and that's what we're going to build on in the future Yeah Go for it Great. Thanks, Stephen So yeah, just a quick show of hands if you've heard of or used ML flow before Okay, cool. So for I don't know people joining online or watching the recording that was maybe half the room I'll do a very quick recap and then I'll show a little bit of the kind of what Seldencore offers and then we're gonna jump into a demo and show some stuff live But I'll try and go through things very quickly. Okay, so the ML flow is basically made up of four components There's projects which allows you to kind of create this reproducible environment You can define the kind of model interface, etc. Set all of that up There's the tracking API, right and this is a bit that will use very heavily This is what allows you to to track every experiment that you run You know every training run the parameters that were used the data and the versions of Configuration and so on, you know, and you'll see some of that again when I show that in a second It has its own model format, which is really good for making your models particularly in different frameworks reusable in the same way And then it also has a model registry, which is a way of handling the life cycle of a, you know, machine learning model Particularly if you're using ML flow to track, you know the training runs and stuff like that Okay, so what's Seldencore? Seldencore Steven mentioned a bit already. It's but it's an open source Project that allows you to deploy and monitor models on Kubernetes. That's kind of it at the highest level If we dig a little bit deeper what it actually does is it creates these containerized microservices with a rest and gRPC interface And then if we're digging in even further, right, it actually provides these like highly optimized inference servers That you can then use to to execute your models code on when at you know at runtime when you're doing inference And if you have a look on the right there, that's an example of a you know, very simple Selden deployment crd and the I don't know if this point is going to work But you can see for example, I've got like this implementation Key value pair and then I've got you know SK learn server So it's using the scikit-learn server and I've given it this model your eyes So it can go and pull my model down and deploy it on a on an optimized scikit-learn server Cool One of the things I really really like about Selden as well is is this ability to do complex inference graphs? So we appreciate that like not every model just runs on its own stand alone often You know you have input transformers output transformers. You might have you might want to chain models together I've given a kind of example up here of how you might do Maybe two models running in tandem If I kind of think of an example for this maybe you know that if you look down the left-hand side here This model to might be a you know some sort of like image classification where I'm doing some you know Transformation on on it beforehand and then some output particularly for NLP We see a lot of use cases for that You know converting to word embeddings running a model and then you know converting back to some sort of text on the on the output And then maybe model one here just takes standard tabular data as and you know numerical inputs And then you can have things like combiners right which take you know the outputs of multiple models and then feed those back So it allows you to define the whole Machine learning like almost business logic within your deployment, which means your end users only have to hit one API and they get all the results. They're expecting And there's I've got a kind of example of how that you build that up within the CRD Couple other things so it integrates really nicely with everything in the Kubernetes stack, you know We use a lot for you know request logging response logging, etc We use elastic search for that, but you could plug and play different databases You can do distributed tracing with Jager It automatically will scrape metrics from your models and and the containers underneath pass them to a Prometheus server We do stream processing integrations with Knative and Kafka and then you can integrate with batch workflow Managers like I'll go or we actually have a CLI tool that allows you to kind of run batch processing workloads, too Okay, so that's enough talking. I'm gonna show you something a bit of a demo I mean I have to squat a little bit here because I'm too tall for this lectern. So Maybe maybe I'll go for a power stance Okay, just before I start I'll talk about the the use case So obviously I can't give you any of Walt's actual machine learning models and that their data and kind of show it live So I've tried to pick something that's kind of similar. So we need some food classification with TensorFlow They're basically a bunch of images that have been taken at different restaurants by people's phones and so on So you'll see that the quality varies quite a lot and maybe the the motivation for doing this is that if you can classify every image that you're using on Like a food ordering app, right and have the metadata attached to it You can then build up a profile of a user, you know as I click on certain images and go, oh, yeah, that looks nice Right, etc. I can be storing that metadata and use it for recommender systems later on So let's dive into that right and I'll see can you can someone at the back tell me if you can see this All right, do I need to make it a bit bigger? Okay, it's I don't know what this means thumbs up. I think Bigger. Okay, cool. Right. Let's go bigger All right, fine. So I'm gonna do I'm just gonna get something training first. So I've got this again. I'll make this one bigger to presumably that's okay Okay, great This is again a simple kind of convolutional neural net The things to highlight in this code rather than going through it in detail is this line here is really cool Right, so if you import ML flow, you can you can actually just run one line of code there This ML flow or keras to autolog and has this autolog feature for a bunch of frameworks And that will then automatically track a bunch of parameters Metrics around your model and then store your model into one of those reusable ML flow model formats as well So that's enough right to do kind of 80% of what you want to do. You can also do things like you know log Maybe manually logs and parameters in there. So I'm gonna do batch size epochs dropout, etc and then What I'm gonna do actually is I'll just run this Okay, and that might that I think I only how many epochs did I do only three so we're good That should take a little bit of time Okay, and you can see the kind of examples of images that have been classified by this You know some are good some are a little bit more ropey, right, you know down here this pizza image I mean that kind of could be anything. Maybe if you look closely you can see it's it's a pizza Cool so we'll let that run and what we do I'm gonna jump in and show you The ML flow UI so if I refresh this You should see That hang on any second is that running Cool, yeah, then it's already picked up my new training run even though it hasn't finished So if I jump back down you can see it's still training But it's picked up some of those parameters. I logged already And then if I jump in and show you something, you know from a previous run The cool thing here is I can look at like I can compare Metrics across, you know over time all of this is automatically logged for me by ML flow tracking So if I want to look at maybe you know the accuracy versus the validation accuracy we can see for this model Let's put this for epochs right rather than time Maybe after about 30 epochs. I'm just overfitting because you can see the the accuracy of the models going up But the validation accuracy is not So that maybe you know as a good indicator that I probably don't need to train for that long But there's maybe some data enhancements. I need to do I can also do cool things like compare runs So if I go in and you know grab two of them Let's go compare those and then again, you know look at the the different accuracy or loss metrics in there You can see so this one that had a larger batch size as we'd expect right kind of converges on a reasonable solution much quicker Because the machine learning model has more information about to read with each each batch Cool, so let's jump back down here We'll see that my model is completed and actually wait just quickly before I do I'm gonna jump in here and show you that you know again you get all the same information for that run I just completed. It's also saved a summary of the model. You know the actual Model topology that's been built within Keras I'm also I'm just gonna copy this run ID because then what I want to show you is if I let's do hang on Python model and then I'm just gonna give it this run ID So what that's gonna do is just saves me a bit of navigating around the file system But that's copying that saved ML flow model into a Minio Storage bucket on my cube cluster and then From putting it there what that means is I can now create a seldom deployment and deploy that straight on top of Kubernetes, so let's have a look at what one of those looks like right, so let's go Hang on. I'll play in a second Okay, so this is For the sake of this demo, right? There's one already running. This is my Model that's already up and running my food classifier that already can accept predictions And you can see in here, you know some of the obvious things I pointed out earlier Like I'm using this ML flow server because it's using that ML flow model format and then I've passed it this Model uri which basically saying like where where is my model stored? You know go and grab that and then importantly here as well like because that's in an S3 bucket or in this case on Minio Running on my cluster. Yeah, how do I actually access that so I have to pass this? secret in as well But that's basically it in terms of what you need and then you can see actually like in one of the cool things with seldom cores you can Customize like a whole load of the CRD underneath So, you know if you want to write the full container spec you can do that and in this case I actually needed to because what ML flow does when you deploy an ML flow model is it recreates the whole environment from scratch so For this model, it's gonna go in fact. I'll show you it in the UI So like the model we just trained you can see these artifacts and there's this Like ML model file and there's a condo yaml. It uses this with all my Python dependencies to recreate the actual environment that the model is gonna run in the reason I then need to set timeouts on my Live-ness probe and my readiness probe is that that can take a while particularly on you know I've got rubbish Wi-Fi here in this venue and it's installing tensor flow from scratch, right? That's a pretty big download So I can do cool things like that What I'm gonna do for this one is I'm just gonna go Show you how maybe for a new one that we've trained which was only three epochs and probably pretty rubbish model Let's not roll it straight out into production. Let's do a shadow deployment instead So if you look at this one again, it's the same as the deployment we had earlier, but I've added another Component spec down here with the same kind of live in this probe thresholds and Then this time I'm gonna let's put in that new run ID So this is the new model. We just created and just pushed to a bucket and then All I need to do to specify that it's a shadow deployment. It's just this one little line here So I can do shadow true right and now what's gonna happen is all the traffic that goes to the main model It's gonna be replicated to the other one But then the output is just gonna be discarded So if I'm monitoring it with you know, Prometheus and looking at latency things like that I can make sure the model performs well before I actually promote it I could equally, you know if I wanted I could do really cool things like Just say, you know traffic 20% right and then you know go and change the traffic up here as well to be Traffic 80 right and so I can I can do kind of a B tests and things like that on my model too. Let me just Just undo that Okay, so it's shadow true. Okay, fine And then how do I how do I actually deploy that model? So that's just a simple cube CTL apply deploy shadow Right, and now if we look at my You can see that it's creating so my food classified defaults already there, but it's creating this shadow deployment as well which When it receives request is gonna send to you as well So finally, let's just send a request have a bit of fun check if my classifiers any good. Let's go grab an image I don't know who here likes tiramisu. That was one of the classes of food in there. All right, this guy does nice Let's grab an image Hopefully it's gonna get this right, but Let's copy the image URL and then what we're gonna do is go Predict And I'm just gonna give it the URL and it's gonna go and pull that image down Oh, maybe not what they done wrong. Oh forbidden it that URL doesn't like me Okay, let's try another one Okay, let's try this one. See if I can pull that one. Okay. Yeah, that looks good. Oh It still didn't like it. All right Well, this is what happens when you do stuff live and try and grab images. I can try one final image But then if this doesn't work, I did copy the image address. Yep This doesn't work. We'll just move on The reason I want to show this is because the output of the classifiers kind of cool You get to see like live inference requests. Oh, no, I've broken something now. Oh My that's all. Okay. Never mind. I won't fix it now because we don't have time But the issue there is that I haven't port forwarded from my cluster to my device So what I do is I'll hand over to Steven so we don't run out of time and you can finish off. Yeah, thank you Thank you So yeah, maybe the very important question on that side is how exactly do we scale the ML platform because that was You know the title of the talk and on our side Yeah, so our data center star customers and what we have now we have dedicated community clusters only for machine learning We have ones running in the development environment production environments and then we'll have other ones as well So then you work on your machine learning and you use a lot of a lot of different data a lot of different nodes Well, then you want to impact the the rest of the production data. So that's pretty good Yeah, common tooling and infrastructure as well as I said our yaml to terraform for example is one of the best example we have Automation yeah, you automatically deploy to production automatically deployed to shadow mode as well Automatically do a lot of things a lot of automation and the last one is really predicting the future needs of data scientist At the moment we only have one model that is using GPUs for example And but maybe in a year we'll have I don't know five five different models And so they're gonna use GPUs to train the model But then how do you how do you run inference with GPUs? Do you need GPUs to run inference or do you use CPUs? That's like one thing that we try to predict so then when they arrive and then a year later They're like, okay, we need that. We're like, okay, we tried out, you know, you should do it like that So that's something that we really try to have and I clearly don't have time to talk about that But that's a very big model. We had running and we're totally blind on it But what we did now is that it's running on the infra and because of that now we can see like number of requests per second it receives and The latency the memory usage But one thing that is very cool is like we use Kafka a lot and now every response you can you can log it to Kafka automatically So then you can monitor the quality of your model and then you can we use snowflake behind the scene So then you get your snowflake and you can compare your prediction to the real values And you can do that easily because everything is locked to Kafka and Yeah, you can run shadow mode a B test and different things So that's that's what we have now And yeah future work. I will finish with that We want really want to work on the ergonomics of the platform data scientist for now I still have to struggle with Cube CTL and everything in some cases We want to get rid of that. So we want to make you acubitus completely Yeah, we want to hide it from them if they're not interested and Really have an integration with the rest of our tools We have an experimentation platform so we want to have full integration with that so we're gonna run a B test and then monitor the result and everything and I will finish on that because we're out of time. So yeah, thank you All right Any questions any questions Anybody got a question anybody hungry Jeremy so sounds good too. Okay. We got a couple of questions Yeah question you down here Sorry, sorry, sorry microphone's got me Hi, Steven. Nice to meet you. Hi, here go from VMware. Um, quick question on your YAML to terraform tool Why are you not open sourcing that? That's one thing we want to do But for now, it's very very targeted towards our infra But it's one of a goal yet to open source it at one point because I think it's pretty cool for a data scientist Hi there when you put model a URI on the spec Yeah, actually fetching the model and then running in your inference server there so you like it will provide for you like the Interface interface like HTTP at gRPC for you. Yes. Yes, maybe and you won't yeah Yeah, it pulls that model down right and that's something that's like mandatory within cell and call is that like you have to provide an external URI to the model because Like if your model is huge, right, you don't want to be like pushing that up with a you know cube manifest when you do it So and we have an init container that goes and grabs that down pulls it down Make sure you've got all the artifacts before it starts running the classifier So it could be also like a proper S3 not an M meaning. Oh, yeah Yeah, so yeah, I mean that that endpoint was one running on my cluster But yeah, just swap that for an S3 bucket, you know Google cloud storage, whatever It's supported like 40 different file types because we use our clone under the covers Any other questions? All right Hi, I'm Luke and nice to meet you. Nice. Thanks for the talk Have you ever considered using the cube flow stack? I say a lot of overlapping and what you did and if it is why you discarded it Yeah, so When I started we benched mark cube flow and the whole thing But I found it to be quite hard to use especially for a data scientist, you know Having to write all the pipelines and all the DSL and everything related to that I found it to be quite hard even for me and I was interested in the tool So I didn't really want it to sell it to our data scientist because I think it would have been too complicated for them So yeah, that's why we didn't go with it Okay, folks, that's unfortunately all the time we got for questions If you want to continue the conversation we can do so outside big round of applause for this amazing talk Let's go to photo