You can follow along with this presentation by going to nanohub.org and downloading the corresponding slides. Enjoy the show. Okay, so we're on lecture five. Let's get started. Okay, so again, you know, everything we're doing is based on this Landauer picture. We have this conceptual picture of a small nano device and we just make it long and we get all of the right answers for bulk devices too. It doesn't matter whether we're working in 1D, 2D or 3D, our basic current equation, you know, this is the thing we would like you to remember when you're thinking about transport, this is a very good place to start. And, you know, when you're far from equilibrium you can sometimes use this expression too. Then F1 and F2 are much different. When you're near equilibrium F1 and F2 are close and you Taylor series expand them. And we're talking about near equilibrium. But the key idea is that differences in occupation or different, when there's a difference in Fermi level then current flows. And in near equilibrium we Taylor series expand this and there can be two reasons that there's a difference in Fermi level or a difference in occupation probability. One is that there's a difference in Fermi level and that happens when we apply a voltage to the second contact. But if the temperatures are different then there's also a difference in occupation due to the temperature in the Fermi function. And when we have both effects we call it thermoelectric transport. So when we did this for constant temperature, this is just a review of the results that we got. Current is conductance times voltage. That's obvious. We think of the conductance as, you know, we have parallel energy channels because we're not allowing significant inelastic scattering within the device. An electron that comes in and energy doesn't change energy. So we just compute the conductance of each channel and we add them all up. So G prime of E is the differential conductance, the conductance of each channel. And in this case it's a constant temperature. So in 3D that differential conductivity would be written like this. The number of modes, M3D, M sub 3D is a notation I'm using for the number of modes at energy E per square centimeter. And then if we want the total number we multiply by the cross sectional area. If we do it in 2D there would be a W there. If we do it in 1D we would just count the number of sub bands. Now we like to write, you know, if we think of diffusive transport we think that well conductance is proportional to area over length. The longer it is, the lower the conductance is, the fatter it is, the higher the conductance is. So I could just do that. I could just pull out that A in the first one, I could divide by L but then I have to multiply by L again. And I could just do that and I could determine what the conductivity is. The conductance is conductivity times A over L. But notice I haven't made any diffusive assumption. This is an expression that we commonly use for diffusive transport but I haven't made any assumption. It's just a definition. That's why that lambda apparent is not the real mean free path, it's a fictitious mean free path because I'm allowing for ballistic transport too. So you just do that algebra. Lambda apparent is transmission times length and transmission is lambda over lambda plus L. So it is 1 over lambda plus 1 over L. So the apparent mean free path is just the shorter of the actual length of the resistor or the mean free path, whichever one is shorter is the one that matters. So if you have diffusive transport, the device is much longer than the mean free path and lambda apparent is the mean free path for scattering. If you have ballistic transport, the apparent mean free path is the length of the resistor and it works in both cases. So then if you want the total conductivity, you just integrate over all channels and these are the expressions that we have. So hopefully that's clear and makes physical sense to you. Then the questions that we started to deal with yesterday were what happens when we have a difference both in the Fermi levels and in the temperature and then what happens to the heat current? How can we define heat current and how are these two currents related? And we're interested in understanding things like the sign and the magnitude of the CBAT coefficient. So there isn't a whole lot new in here. You're seeing what we saw in lecture four. We established and I did it in a little bit less rigorous way. We're just going to do it more carefully this time. That's all. If we have no temperature difference, then this is what would happen. Here's my Fermi function for the first contact. It makes a transition from 1 to 0 around the Fermi energy. The width of that transition is a few kT. In my second contact, if I've applied a positive voltage, its Fermi level is lower. So the red dashed line is the Fermi function for the second contact. So you can see that f1 is bigger than f2 around the Fermi energy, so current is going to flow and it'll have a positive sign. Here it gets back to this difference between n-type and p-type semiconductors. We haven't said if the Fermi level is in the conduction band or near the conduction band, the current will be flowing through the conduction band. If the Fermi level is in the valence band or close to it, those states will be in the valence band. But we'll get the same sign of the current. Everything will work the same way. It doesn't really matter whether the electrons are flowing through the conduction band or through the valence band. We do that Taylor series expansion and we get this familiar expression. Now what if there's a difference in temperature? This is the Fermi function for the first contact, just like it was before. Now the second contact, let's assume that we have the same voltage in contact too. So the Fermi level is in the same place. So the place where the probability is one half is at the Fermi energy. It's exactly the same place. But if contact two is hotter, then the width of that transition is much broader. It's always a few kT. So now if f1 is greater than f2, everywhere except exactly at the Fermi energy, but the sign of the current. The current is proportional to f1 minus f2. Whether that current is positive or negative now depends on whether the states that are carrying the current are above the Fermi level or below the Fermi level. So it works differently when I apply a temperature difference to the two contacts. So you can see, let's see here before I do that, you can see that f1 minus f2 is positive for states that are above the Fermi energy. So if this is an n-type semiconductor, the Fermi level is down near the bottom of the conduction band. The conduction is going to occur for states above the Fermi energy. f1 minus f2 is positive and I'll get a positive current. If the Fermi energy is down by the valence band, then if I look at the states that are conducting the current will be at energies below the Fermi energy. And f1 minus f2 is negative there. So I'll get a different sign. So things work a little differently. When I apply a voltage difference I get the same sign of the current. When I apply a temperature difference I get opposite signs depending on which band the conduction is occurring in. And I can do the same thing we did for a voltage difference. We just do a Taylor series expansion. So I just do a, the only difference between these two Fermi functions is that they have a different temperature. So I expand in temperature. And if you go ahead and do that derivative of the Fermi function, you'll see that it's df de multiplied by this factor e minus ef over tl. So it's similar to what we had before but it's just got a little bit of an extra factor there. All right. So that's just algebra. Doing a Taylor series expansion in temperature instead of in voltage. All right. So here I guess I was ahead of myself. So here's the answer. So we'll do this one more time. Thinking about n-type versus p-type. As I said, if you have an n-type semiconductor, so the way we can think about this physically is if I apply a positive voltage on contact two, I'll attract electrons and they'll move from the left to the right. But they carry a negative charge. So that's current moving from the right to the left and the direction of the arrow, that's a positive current. That's because f1 minus f2 is positive. Now, if that's a p-type semiconductor and I have a positive voltage on the second contact, it'll push holes away. The current will flow from right to left in the direction of the arrow and the current is still positive. So for the voltage difference, I get the same as the current. And for a temperature difference, as I argued there before, something different will happen. You know, depending on whether the states are above or below the Fermi level, I'll have n-type or p-type conduction and I'll have different signs of the current. Okay. All right. So when we talk about thermoelectric effects, the questions we're asking is what happens when both things are occurring simultaneously. And when both, the Fermi level is different and the temperature is different, we'll have some situation like this. So the two Fermi functions are different because they have different Fermi levels and they have different temperatures. But it's easy. When I do the Taylor series expansion, I'll just expand in both voltage and temperature. I'll just add the two effects. So we just have a more complicated Taylor series expansion for F1 minus F2. The first term is the driving force due to voltage or differences in Fermi level. The second term is the driving force due to temperature differences. Okay. So now we can go through and do the charge current and the heat current. So let's just do the math here. So at any given energy channel, the current is just 2q over h, transmission at that energy. Remember transmission is just a number between 0 and 1. It tells us what's the probability that an electron that comes in from contact 1 goes out contact 2. M is a number of channels at that energy. And then F1 minus F2. If we want the total current, we just add the contributions for all the energy channels. So if we want to do this near equilibrium, we just Taylor series expand F1 and F2 in both voltage and temperature. And you can see that we're going to get a term that's proportional to voltage. That's the conductance. Or since I'm doing this for just one channel, that's G' differential conductivity of the channel at that energy. And I'll get another set of terms that's proportional to delta T. And that's what I'm calling S sub T prime. It's just a collection of all those terms that are there. Now S sub T, in other transport problems, there's a similar effect and people call it a Soray coefficient. You don't see it named that often in semiconductor work. But in similar problems and in other transport problems, it's called a Soray coefficient for electro-thermal diffusion. It's going to be related to our CBEC coefficient. We'll see later. Okay, so this is what we have. I don't need to talk about G' differential conductance because we already talked about that. The second term is just those collection of terms that went with the second term in our Taylor series expansion. And this is what it is. So you can see that it's got a minus sign out front but it has an E minus EF in it. So it's going to change the sign depending on whether the states are above or below the Fermi level. So I'll get a different sign of this coefficient depending on whether it's an N type or P type material. And you can also see that it's very similar to the differential conductivity. The differential conductivity was 2q over hT times M times minus D F D E. So it's just that multiplied by this last factor. So I have a simple integral expression. That's my theoretical expression. If I have a band structure, I can compute the number of channels. If I know something about the mean free path, I can compute the mean free path and I can evaluate this integral and we can find out what it is. And as I mentioned, negative for N type material. It's negative for N type material because all of the states or most of the states doing the conduction are in energies above the Fermi energy. So that term in parentheses is positive which is a negative sign out front. And then it flips sign for P type material. Alright, so this is a recap. So this is all very straight forward. So starting from our general model, we see that if we Taylor series expand for small voltage and temperature differences, we get current is proportional to voltage and the constant of proportionality is the conductance. And it's also proportional to the temperature difference and the constant of proportionality is this thing I've called the Soray coefficient. We have expressions for G, we have expressions for S, S sub T and we can work this out in 1D, 2D or 3D if we just use the right expression for M, the number of channels in 1D, 2D or 3D. And it'll work in ballistic or diffusive if we're just careful about the transmission. Ok, so let's do a little exercise here. Frequently if you're reading textbooks you'll see these for bulk semiconductors, large semiconductors where instead of applying a difference across the two ends the structure is very long and you just think of a gradient in temperature and a gradient in voltage or an electric field. So we saw before that the correct current equation in a uniform temperature semiconductor is conductivity of the electrochemical potential. This is a very fundamental way to write current. It comes out of our model, people frequently derive it from irreversible thermodynamics and it's very general and applies to lots of different kinds of flow. So we could just go through a little bit of algebra and just to point out, we have to be careful, I've defined positive current as flowing into contact 2 which is in the minus x direction so if I want to compute the current in the x direction there's a negative sign that you have to be careful it doesn't trip us up. If I want current density then I write current as current density J times cross sectional area A and then I just do a little bit of algebra and it's fairly straightforward to show that our current equation is sigma times gradient of the electrochemical potential times minus C back coefficient times the gradient of the temperature. So that's the drift diffusion equation that we would use when there's both an electric field or a gradient in quasi-firmly level and a gradient in the temperature. So let me point out one thing you have to be careful of and sometimes you see tripping people up. If I write the carrier density N as some effective density of states times E to the quasi-firmly energy minus EC over KT that's for a non-degenerate semiconductor. So I could solve for the quasi-firmly energy its F sub N is equal to E sub C plus KT times log of N over NC. Now if I take the gradient of that and I showed you you get a drift diffusion equation sometimes people are tempted to say well there's a temperature in here the temperature is varying when I take the gradient of this and put it in the top equation I'll get my temperature term. Actually you get the wrong answer if you do it that way. The first expression assumed the temperature was constant. So we can't put the thermal level in there and differentiate temperature. The second form is the proper current equation. People make use of this. I haven't been in the lab for a little while I used to do this. You have a semiconductor wafer you don't know whether it's N type or P type. How do you find out? So the way people would do it is you take this wafer you stick a soldering iron on it you make one end hot. Now you know that so you think about we're going to put a temperature gradient across this. We know that if there are electrons there they're going to diffuse away from the hot region. If there are holes there they're going to diffuse away from the hot region. If I attach a high impedance voltmeter and stick the other end on the cold end of the wafer and measure the sign of that temperature gradient across it. It's the C back effect but it's also in this equation. I could open circuit that. The gradient in the quasi-firmly level is really a gradient in the applied voltage. By the sign of the voltage I'll tell whether I have an N type semiconductor or P type semiconductor. So we also have a heat current and again so this is the picture that we had yesterday so we have two contacts. The current likes to flow near the Fermi energy in a metal because that minus the FDE is sharply peaked near the Fermi energy. It's highly degenerate so the Fermi energy is way up in the band. So the electron comes in contact one near the Fermi energy but if I have a lightly doped semiconductor all of the states in the semiconductor are in the conduction band and they're at a higher energy. The electrons have to absorb energy get up there, travel across and then they dissipate their energy in the second contact. When I'm computing the current the current is 2q over h times transmission number of modes F1 minus F2. Now if I want to ask the question how much heat do these electrons take well they had to absorb amount of heat E minus EF and if I want a current equation for that then I'm just going to replace that Q with the amount of heat that they had to absorb and carry with them when they travel across from left to right. So it means all I have to do is to take that Q and replace it by E minus EF and I've got the heat current. Now if you look at conventional books on near equilibrium transport you'll see people make thermodynamic arguments to explain why when you compute the heat current you don't just compute the energy current why you have to subtract the Fermi energy but it's very clear in this physical picture when you can see where the electrons are going. They have energy at EF in the contact they have to absorb energy, heat energy on amount E minus EF to get up in the channel and conduct. So all we have to do is make that replacement and then we've got an expression for the heat current. So we still have the heat current instead of carrying charge we're carrying E minus EF of heat so we have a similar type of expression. The heat coming in is IQ1 so we absorb an amount E minus EF1 if we've applied a small bias then EF2 is down lower and when we go out we dissipate a heat that is a little bit bigger E minus EF2 over H. So we have heat currents coming in, heat currents coming out the difference between those two is just the energy being dissipated in this resistor I times V. I think I'll see that a little bit later. Okay so how do we do the math? So we just made this replacement we just replaced charge we've replaced the charge that an electron carries and then we compute the electric current by the heat that an electron carries now we have the heat current we do the same Taylor series expansion and you can see that we're going to get a term the heat current is going to be proportional to delta V and there could be a whole bunch of terms there and the heat current is going to be proportional to delta T so we'll get a heat current expression like this and the first term is temperature serrate coefficient that we saw before so again this is showing this this connection between these two coupled flows we saw the serrate coefficient in the electric current the serrate coefficient is coming again in the heat current multiplied by a T that's the kelvin relation and then we get a thermal conductivity and I've given a superscript zero and we have a definition of it here so this particular thermal conductivity tells me that if I had zero voltage applied across this device then the heat current would be proportional to the temperature difference so I would measure the thermal conductivity under short circuit conditions okay so if I take a look at this you know these are the expressions we have to be careful about these signs the heat current flows along the positive X expression and those are just the expressions that we saw before if I want the total current then we just integrate all over all energy channels and we've got the final answer so we've got the heat current alright so the point is it's all very straight forward you just take the general model you do a Taylor series expansion in voltage and temperature then straightforwardly get the electric current if you want the heat current you have to think about how much heat does each electron carry but if you use this physical picture it's clear how much heat each electron carries and then we've got expressions for both the heat current and the electrical current so this is what we've done we've derived these two equations electric current is conductance times voltage difference plus serrate coefficient times temperature difference heat current is temperature times serrate coefficient times the voltage difference minus thermal conductance times the temperature difference and the two are coupled temperature differences will give me electric currents will give me heat flow and the expressions that we've developed very straightforwardly the expression for conductance should be very familiar to you now the expression for sore coefficient and thermal conductance just came straightforwardly from the math of doing that Taylor series expansion now if we were to go ahead and convert these into equations for the bulk then we would have a long region we would talk about gradients in voltage or electric field or gradients in quasi-firmly level we'd talk about gradients of temperature we could just straightforwardly convert those to bulk transport equations the first one is the one we saw before the second one is the heat current equation the last term there is like Fourier's law heat flows down the thermal gradient the first term is this Peltier effect but these aren't quite in the form so this is what you always find in these transport problems the form that it's most natural to derive them in is not the form that experimentalists usually use it's usually more convenient for them to rewrite them and use them in a different form so there's just a little bit of straightforward algebra these are the equations that we derived and when you do this from the Boltzmann equation it's the same thing the way you derive them is not the most convenient way to use them so people turn things around depending here when you look at these equations is well I'm going to apply a voltage difference and I'm going to apply a temperature difference and then I'm going to see what electric current flows what heat current flows I'll measure those two but we could turn this around and instead of having voltage and temperature as the independent variables I could turn things around so I could have current and temperature as the independent variables if I solve the first equation for the voltage then I could rewrite the first equation as the voltage difference is 1 over conductance times the current so it's just resistance times current and now it's Sauré coefficient divided by conductance and the difference in temperature I know from the last lecture that that's what we call the Seebeck coefficient so if I open circuit this and put a temperature difference there I'll measure a voltage and the constant of proportionality is the Seebeck coefficient so the Seebeck coefficient is just the Sauré coefficient that we have an expression for divided by the conductance so let's see okay so we have an expression now and this is one I tried to do yesterday afternoon intuitively but so this is the correct expression for the Seebeck coefficient you can see that it's on the top it has the integral of E minus EF over Qt times the differential conductance and on the bottom it's a differential conductance so if I want to give a physical interpretation to this it's like E minus EF is the energy at which the current is flowing I'm computing the average energy at which the current is flowing above the Fermi energy the weighting factor is the differential conductivity which tells me how easily current flows at each energy and then I'm dividing by the integral of that differential conductivity to normalize it so you can see physically that the Seebeck coefficient is related to the average energy that current flows minus the Fermi energy divided by Q times the temperature that's what this equation says so for a bulk semiconductor you know that interpretation I'll call E sub j the average energy so it's the average energy of current flow minus the Fermi energy over Q times the temperature with a negative sign so my expression I would expect it to look like this if I have a Fermi energy that's way below the semiconductor it's going to be large and you know if I do that if my Fermi energy is way below the conduction band then all of the current is flowing very close to the bottom of the conduction band so the average energy of current flow is very close to the bottom of the conduction band just a little bit above so the Seebeck coefficient is very close to conduction band edge minus Fermi energy over Qt now that's what the dash line shows but actually it's a little bit higher because the average energy flows a little bit above the bottom of the band 2kd for a parabolic band you know with simple scattering but as you start getting into the conduction band the Seebeck coefficient gets very small and you can kind of see why it gets very small because when your Fermi energy gets way up in the conduction band now the current wants to flow near the Fermi energy so the difference between the average energy that the current is slowing at and the Fermi energy approaches zero so the Seebeck coefficient gets very small so that's why the Seebeck coefficient is small in the metal and large in a lightly dope semiconductor so these are some calculations that my student Changwook was sitting in the back row did a year ago or so so these are more rigorous calculations where he took the integral expressions but he did them for a full band structure of germanium gallium arsenide and bismeteliuride he did them for the conduction band in which you can usually approximate it pretty well by a parabolic band but also for the valence band which is usually very complicated and hard to approximate by a parabolic band and you can see that for lightly dope semiconductors where your Fermi level is below the edge of the band which is at zero or above for a p-type you just get what we expect conduction band edge minus Fermi level over kt and it gets smaller for when your Fermi level goes above the bottom of the band or below the top of the valence band it's interesting you know it basically just depends on the difference between the band edge and the Fermi level whether it's n-type or p-type germanium or gallium arsenide electrons or holes everything behaves pretty much the same except for that bismeteliuride that behaves pretty much the same until the Fermi level gets too far below the band edge and then it starts turning around what's that all about we'll talk about that a little bit later and we'll explain that a little bit later you know in general we have two bands you know we'll have a Fermi level somewhere and we'll have some CBAC coefficient due to the electrons in the conduction band we'll have some CBAC coefficient due to holes in the valence band they have opposite signs they cancel each other out if you have a small band gap material or if you're at a high temperature you can see contributions from both bands and you can see it so the point is that the CBAC coefficient is pretty easy to understand it's pretty easy to estimate it doesn't depend on details of the band structure very much although there is some interesting work being done in the thermoelectric community seeing if you can do a little bit of band structure engineering and make this a little bit bigger to get a little bit better thermoelectric figure of merit okay now so we inverted the top equation and we found the CBAC coefficient now if I take that expression for delta V and put it in the second equation then I'll get another equation that will relate the heat current to the electrical current okay but when I do that math I'm going to also find that the heat current is minus a thermal conductance times the difference of the temperature but now that's a different thermal conductance and you know it's important to keep these thermal conductances straight when people measure a thermal conductance you have to ask them how did you measure this because if you were to open circuit this and measure the heat flow the constant of proportionality would give you case of E the electronic thermal conductance under open circuit conditions the other one was under short circuit conditions and also this pi is just T times S we've seen that before and this electronic thermal conductivity the previous one that we saw the short circuit thermal conductivity minus pi S times G just depends on how you did the measurement okay so we have the Peltier coefficient we talked about this from a physical perspective last time you know we just seen the mathematics here we run current through we absorb heat from one end to get the electrons up in the channel they dissipate the heat in the other end it's reversible reverse the direction of the current the arrows just flip and in summary these are the basic equations for thermal electricity you know for a finite size sample so the top two equations are the way that it's most natural to derive them the bottom two equations are the way that you will most commonly see them people use it so you know you rarely see people talk about a Soray coefficient in electronic materials they always talk about a Seebeck coefficient and remember if thinking about it experimentally if we were to use the top equations we would impose a voltage difference and a temperature difference and then we would measure the electric current and the heat current that flows and if we're using the bottom two equations we're thinking about forcing a current and imposing a temperature gradient and then measuring the voltage difference that results and the heat current that flows and of course they're mathematically equivalent and you can extend those for bulk semiconductors just by making things long thinking of delta t over the length as the gradient of the temperature delta f n over length as the gradient of the quasi-firmly energy the gradient of the quasi-firmly energy for a uniformly doped material where there are no diffusion currents is just the electric field so frequently we'll write this as electric field instead of gradient to the electrochemical potential and these then are the equations that if you look in most thermoelectric textbooks or if you look in papers on thermoelectrics they'll typically start by showing a set of equations that are these equations they might not be written in exactly this form it might take you a little bit of work to sit down and think okay now aren't these equivalent but they are because typically most papers won't express things in terms of numbers of modes and mean free paths they'll have been deriving them but they're mathematically equivalent if we use this differential conductivity notation then they'll even look the same okay so let's see just make a couple of points here so this is where sometimes when you're doing thermoelectric work it looks highly mathematical because you know these are this kind of if you don't know where these equations come from and you just look at them it looks a little bit imposing but I hope you've gotten a sense that it's all really very straight forward if you're careful about your bookkeeping and just do things step by step you look at these now you can physically interpret most of them pretty clearly the physical interpretation of the Seebeck coefficient has to do with the energy of current transport I need an equal sign at the end there so it's equal to minus average energy of current flow minus EF over QT the kappa zero so I can interpret these as various types of averages for kappa zero it looks like I'm averaging this quantity E minus EF squared over Q squared T L I'm weighting it by the differential conductivity and then I'm normalizing by that it looks like I'm computing an average of the quantity E minus EF squared over Q squared T so what that tells me is that the thermal conductivity is proportional to the electrical conductivity and the proportionality factor has something to do with this particular average of how the current is flowing so that makes sense because the electrons are carrying the charge the electrons are responsible for the electrical conductivity the electrons are carrying the heat because I'm not talking about phonons so the two should be proportional to each other okay so that's what people call the Weidman-Fron's law and now I don't know exactly how to you know Mayen had a paper now that I can't quite dig up this is not really a law although sometimes people slip into thinking of it as a law you know Professor Fischer talked to you about how the ratio between the thermal conductivity and the electrical conductivity for a degenerate semiconductor is pi squared over three times Boltzmann's constant over Q squared that's true under certain specific conditions that are so common that a lot of times people just forget about certain specific conditions but it depends on that particular average and to do that average we need to know what the density of states is what the density of modes is we could get quite different results if we have strange densities of states and sometimes with nanowires and superlattices and things where you have very where you have densities of states that are distinctly different from the bulk you can get numerical factors that are much different from pi squared over Q squared. But this is what we saw this is what our equations give us people usually write this as the ratio of thermal conductivity over electrical conductivity is something called a Lorenz number L times the temperature now I put this in quotes because this is not usually what people call the Weidmann-Franz law here I'm taking the ratio of the thermal conductivity in short circuit conditions to the electrical conductivity that's not the one that people normally use because people normally work with the other set of equations so people are normally interested in what is the ratio of the thermal conductivity over the electrical conductivity that should just be a sigma there and that is Lorenz number L times temperature this is what is called the Weidmann-Franz law and if you do the math that Lorenz number L is the thing in squirrely brackets times K over Q squared now if you do the math for parabolic bands under degenerate conditions you get that pi squared over 3 factor if you do it for parabolic bands under non-degenerate conditions you get a factor of 2 so going from non-degenerate conditions to degenerate conditions the factor goes from 2 to 3 so people usually think that this is pretty solid it's never going to vary by very much it's always going to be between 2 and 3 and that's true now if you do this for a delta function density of states the number is zero and there are some cases in superlattices and things where you have a very sharp density of states where the number can be very low but you have to go to very special conditions for that why is all of this important? I guess the main reason is that Professor Fisher talked a little bit about measuring thermal conductance it's hard to measure thermal conductivities it's relatively easy to measure electrical conductivities so in practice what a lot of people do is they'll measure the electrical conductivity and they'll say I really can't measure the thermal conductivity so I'll just assume the Weidmann-Franz law and estimate what it is so that's the reason that it's widely used we talked a little bit about the valence band but I haven't said too much about it but let's look again so let's say I've been thinking about one band or the other band but I actually have both of them there at the same time so my number of modes for a parabolic band maybe back lecture two maybe in 3D goes proportional to the energy minus the bottom of the band so it's a straight line for the conduction band for the valence band we have the same thing the line just goes down and I've been talking about how the CBEC coefficient is positive if the primary level is up near the conduction band positive if it's down near the valence band what if it's in between and both bands are important so it's actually relatively easy there's no reason that I have to separate these states because nothing different really happens in the conduction band or valence band it's just electrons flowing through states in the conduction band or electrons flowing through states in the valence band my channels are in the conduction band or valence band number E1 that is down in the valence band way below the Fermi energy way below that point where DfDe is finite up to the some region in the conduction band where DfDe is zero and just include some of those two so I'll just do the integration so that's what you see in the top right I'll just take my expression and I have a total number of modes it gives me some finite number of modes if my energy is below the valence band it'll give me zero modes as I go from the valence band to the conduction band because I'm in the band gap and then when I start going in the conduction band it'll just give me the conduction band number of modes I just do that integration over the total number of modes and I'll get the total correct conductivity now if you want to separate that out I could just do the first piece of the integral in the conduction band I could integrate from the bottom of the conduction band up to some energy E2 that's high enough that I'm safe that would give me the second line here the conductivity of the conduction band I could integrate from E1 up to EV that would give me all the states in the bottom half and the total integral is just the sum of the two so everything is simple the conductivity is just the sum of the conductivity due to the conduction band and due to the valence band now it's a little more interesting if you look at the CBAC coefficient so again I can do the CBAC coefficient in exactly the same way I can just say I have one total function that gives me the density of channels versus energy it gives me some channels in the valence band in the band gap and then it gives me some channels and I just take my expression from before and I just integrate from some energy deep in the valence band to some energy deep in the conduction band and I get all of those states and I'll get the correct total F if the band gap is small and the Fermi level is in the band gap somewhere I'll get some contribution from the valence band with a positive sign and I'll get some contribution from the conduction band with a negative sign alright now if you look at that so in the denominator I've got the total conductivity because that's our normalizing factor if I look at the numerator I could divide that again into two pieces I could integrate from deep in the valence band to the top of the valence band there's nothing in the band gap so when I integrate across the band gap I get nothing I can integrate from the bottom of the conduction band to the deep inside the conduction band in the second term that's just splitting that first integral in the numerator into two pieces now I could divide the first integral by the integral of the differential conductivity over energy and then multiply by the same thing and I could do the same thing for the second one that is if you get that this is what you'll get the first contribution is the CBAC coefficient due to just the conduction band which is negative times the conductivity due to the conduction band the second term is the CBAC coefficient for the valence band which is positive times the conductivity due to the valence band so the total CBAC coefficient is a weighted sum when the Fermi level is far away from the band edge you get a very big CBAC coefficient so for example if the Fermi level is way down near the valence band you would have a huge CBAC coefficient for the conduction band but you have zero conductivity for the conduction band so it gives you no contribution to the overall CBAC coefficient vice versa if you have a narrow band gap and you have a Fermi level somewhere in the band gap you might get a sizable contribution from both bands if you have a high temperature and you have a very broad Fermi distribution you might get a sizable contribution from both bands so when I showed you that red line earlier how the CBAC coefficient was following the theory and then turning around and heading to zero it's because the other band was becoming important so let me just summarize so that's pretty much it let me just summarize by going through this physical picture this is the way we think about Peltier cooling so it's a very simple physical picture we have these two contacts, let's say we have different voltages applied to them we have these energy channels which might be in the conduction band if you want to make sure that you understand this do this for the valence band too we have this hook to a current source so electrons come in contact one, they're flowing at the Fermi energy they absorb a thermal energy E minus EF1, if E is the energy of the channel they flow across, they dissipate that energy minus EF2 and because EF2 is a little bit lower because we've applied a voltage, they dissipate a little more than they absorb and if you ask how much it's just the difference between what they absorbed and what they admitted and if you want the power then you multiply that by the flux well here, before I get ahead of myself they dissipate that energy and electron comes out to contact the surrounding internal source comes back in the next one, when it comes back in, it comes back in at the Fermi energy again, has to absorb energy, current keeps flowing so you're continually absorbing energy at the first contact and emitting them at the second, so then as I was saying you absorb a little bit less than you admit because the Fermi energy is a little bit lower on the right than on the left and if you ask how much power is being dissipated that extra that you're dissipating at the second contact is just I times V, if it's a resistor you have to be dissipating a power I times V and in this physical picture you absorb some then you lose it by dissipating it but you lose a little bit extra because that Fermi energy is a little bit lower ok so just to summarize and as I said then we've done the heavy lifting in the course and the rest of the lectures will talk about some topics that we've glossed over a little bit applications, measurements, you know, applying these to other materials but the key points, you know, don't get lost in the mathematics, there are two driving forces for current flow always, gradients in the quasi Fermi level or electrochemical potential and gradients in temperature and we can begin with our general model and it's very straightforward to determine what the current equations are just have to be careful about the bookkeeping. If we have a long sample for which the contacts don't matter, we get all of the textbook expressions for these thermoelectric parameters ok so I'll stop and see if you have some questions so where did the lattice thermal conductivity even come into the picture at the end of these equations? so the lattice thermal conductivity is not in any of these equations because we have only been talking about electrons and we have only been talking about the heat that is being carried by the electrons or the heat that is being pumped by the electrons we're only talking about the electron system now when we get to a real thermoelectric device it's going to be important to know the total amount of heat that we're pumping and the total amount of in order to do that we're going to have to add to our heat equation it's just a heat equation for electrons we'll have to add to that the heat equation for phonons which is just minus kappa of the lattice times gradient of the temperature and we had a little bit of discussion last time in a heavily dope semiconductor there are electrons and the thermal conductivity that we've been talking about here carries, it can carry perhaps some significant fraction maybe a third of the heat in a material like bismuth telluride for which the lattice thermal conductivity is very very small now in silicon it's almost completely the lattice okay we have a question down front I want the t a lot less in the numerator so it is after you have expanded the parameter function in the Taylor series and you changed the variables with the derivative of the air and you changed it to the lattice t help I believe well yeah let's go back so you're asking a question about that Taylor series expansion that we did yeah so this is a Taylor series expansion when the temperature is constant and this is a Taylor series expansion when the voltage is constant how do you get the expression on the second line to the expression okay so all I did is I took this Fermi function 1 over 1 plus e to the e minus e f over k t lattice and I differentiate it with respect to temperature and then I looked at the results and I said ah that's exactly what I got when I differentiated it with respect to energy except I've got this other factor e minus e f over t l out front that's how I got it so you're saying you worked it out you don't get the same answer well let's do that at the break I just have a basic question about the couple equations so I'm just wondering why do we talk about devices we like the thermal components is that because it's small and since we always have a heating going on the second question is why do you take a semiconductor course do you not typically worry about these so one thing is you know why when you take an introductory semiconductor course do you not typically worry about these you know one thing is if you're thinking you know you can build practical devices people use thermoelectric coolers are used to do things like stabilize lasers so you can stabilize temperature control infrared detectors frequently people will stabilize the temperature with a thermoelectric cooler they're used you can buy these little picnic coolers where you cool your beverage with a thermoelectric cooler there are applications you know when you want to exploit these and actually use them for thermoelectric cooling or for power generation or energy scaveraging then you have to talk about these now one of the reasons it's not an elementary text I think is it's generally thought to be kind of mathematically complicated I mean you saw these equations it's generally thought to be kind of especially when you solve it from the Boltzmann equation it's all math and you don't really you don't really draw these pictures of what's going on so people tend to try to avoid it in introductory courses now is it important when I talk about measurements it's something that you really people who do careful measurements worry about these effects a lot so let's say you just go in and you want to measure the resistivity of a material you force a current through a resistor and you measure the voltage across it well if you know about thermoelectric effects you know that when you force a current through those two contacts it's going to get a little bit colder and one's going to get a little bit hotter so the voltage difference that you measure will not be exactly related to the resistivity it will also include a C-beck effect and people who do careful measurements of materials worry about things like this you know they can introduce artifacts when you're trying to measure something unless you're aware that those might happen I think we'll talk a little bit about that when I talk about measurements now your other question had to do and I'm not sure what your other question had to do about the lattice thermal so let's see what can I say about that you know I mean this Soray coefficient is just when I write the equation in this form you can kind of see that it's similar to the C-beck coefficient you know that the C-beck coefficient relates a temperature difference to a voltage that you measure right so if I just look at this top equation you know this is just the way things came out I had a whole bunch of terms I lumped them together I gave it a name and not everybody calls this a Soray coefficient but similar to what some people call a Soray coefficient it's just a set of constants some people call it sub 1 2 you know it's got all kinds of names but if I just look at that and I say what voltage would I measure under open circuit conditions because that's the definition of the C-beck coefficient right well set I equal to 0 and then solve that for delta V I would have to divide through by the conductance the voltage that I measure would be minus Soray coefficient divided by conductance times delta T that's the definition of the C-beck coefficient so that's the connection between the two when I invert that equation and write it in the other form then you know I have delta V is equal to rho to resistance times C-beck coefficient just you know it's the same physical thing we just wrote the equation in a different form and gave the parameter a different name now your other question was about this cap is 0 and the question so here we have a current equation so this is the heat current equation and it says that if I have a voltage difference I'm going to have heat and that's not exactly the Peltier effect because the Peltier effect says if I have an electric current I get a heat current but it's very similar the second one says heat flows down a temperature gradient very intuitive now your question is what is the relation between cap is 0 and the lattice thermal conductivity I don't know that there is any although this is kind of an interesting question we're only talking about electrons there are no phonons in this picture except that they might be doing some scattering and giving me a mean free path for electrons but we're not talking about any heat flow this is only the heat because the electrons are carrying the heat phonons are also carrying heat that's a completely separate thing is there a Weidman-Fran's law that relates the electrical conductivity to the lattice conductivity I don't know I think it would be interesting to see if there's some fundamental connection I see somebody shaking their head I would be interesting to think about whether there's a fundamental connection between the electrical system and the lattice system because it's the lattice that gives you the electronic structure and it's the lattice that gives you the phonons now are those two connected in some way at some level they must be but really all we're talking about are electrons carrying electrical current electrons carrying heat current lecture 9 I talk about phonons we'll add we just add the two we add the heat flowing to the electrons to the heat flowing to the phonons that gives us the total heat flow okay any other questions so when people are doing device simulation when people are doing device simulation and they're interested in the electron effects sometimes they use the hydrogen and the iron or the energy balance will be equivalent to the energy that would be carried in the hydro type? yeah that's a very good question you know and I have some of you are familiar with my book and I have a chapter where we take the Boltzmann equation and you take moments of the Boltzmann equation and you get these hydrodynamic type flow equations and you can write them very similar to this trying to get the expressions to be it's a little bit tricky you get similar effects you get something that looks like a CBEC coefficient or a SORA coefficient and a PELTIA coefficient all of those physical effects are there now trying to get those moment equation approaches to give you precisely the same results here is a little bit tricky it can be done but it's the same physics that's going on part of it is the truncation and part of it is the way you do the various averaging when you take these moments and you have to be really careful about how you do that so you get results that are consistent with this I'm not sure which one is the advantage of doing hydrodynamic equations is it should work not only near equilibrium but out of equilibrium so you get thermoelectric effects under high fields and high biases okay one question so we are talking about when there is a difference in temperature in terms of the one contact and the second contact so what does this function do at which delta T is done oh so your question is how big can delta T be yeah and I have seen some papers where people worry about this so it's sort of it's a similar question to people worry about fixed law for diffusion that says that a flux goes down a concentration gradient if the concentration gradient gets too large when does it break down because this is sort of the same thing a heat flux is going down a temperature gradient you know the way you find out if your temperature difference gets too big then this Taylor series you can't neglect the higher order terms in your Taylor series expansion then you just go back to F1 minus F2 and you just put the temperature of the first contact in and the temperature of the second contact in you don't make the Taylor series expansion so you would have to take a temperature difference and you'd have to ask yourself is that Taylor series expansion valid dropping the next term that's proportional to delta T squared so in principle there are these other terms there's a delta V squared out there if I do the next term in my Taylor series expansion there's a delta T squared out there our definition of near equilibrium transport is those terms are small enough and when they're not you just go back to the starting equation where you have F1 minus F2 and you don't Taylor series expand it okay


Welcome to Thinking About the Topic, Brainstorming. In this video, you'll explore and practice how to brainstorm a list of ideas related to a topic. In this video, you will learn how to brainstorm in order to find out how much you already know about a topic. At the end of this video, you will be asked to practice this technique. To brainstorm, you think about a topic and then write down as many ideas as you can about the topic. You write these ideas in a list of words or short phrases, no sentences. Whatever comes into your head while you're thinking about this topic should be written down. And be sure to write down everything that comes into your head. Don't edit, erase, or correct errors at this time. There's plenty of time to do that later. Let's look at an example. First, write the topic at the top of the page. Then, write down anything you know about this topic. Don't be concerned if you don't see a connection with your idea and the topic right away. For some reason, you were thinking of the idea at this time, so write it down. Writing can be challenging. So here's a few brainstorming notes to help you out. A wise saying is, it doesn't exist until it's written down. You can have lots of wonderful ideas, but until you commit those ideas to paper, they are just that, ideas. Get them on paper as soon as possible. Many novice writers are worried that once they put something on paper, it must be permanent. It can never change. But, the truth is you want to use paper to help you change and shape your ideas. OK, it's time to practice. Choose either the topic you're currently working on for your class, or the topic from this learning object, Winters in Wisconsin. Spend two minutes generating ideas through brainstorming. Remember to relax, take your time, and use your brainstorming notes. Ready to give it a try? Here's a timer to keep track of your two minutes. It's easy or difficult. If you were not able to come up with a lot of ideas in this time limit, you either were too worried about editing what you were writing, you do not know a lot about the topic, or this technique may not be effective for you. Keep in mind that you will more than likely be spending more than two minutes trying to generate ideas when you're not working on this exercise. Depending on the complexity of your writing project, you may spend minutes, hours, or days trying to come up with ideas. So what's next? You need to examine your list and see if there are enough ideas to work on for your writing project. If there are enough ideas, you can start to work with them to create a draft of your document. If you need more ideas, you may have to spend more time on this technique, try another technique, or do research to find out more about the topic. Congratulations! You've completed thinking about the topic brainstorming. If you want to see more videos like this, subscribe to our channel. We'll notify you when we have something new for you to learn.


Alright Dan, as a Korean, do you think this Shake Shack Gochujang Glazed Chicken Sandwich from Shake Shack can be the best Korean fried chicken sandwich in the world? I think so. Let's sign out. Alright everybody, I'm about to put in my order for four Korean chicken sandwiches from Shake Shack. Boom. Get excited. You're about to get shackin'. Alright you guys, we are looking for the BBQ chicken sandwiches right now. The only thing they have out are their Honey Garlic Wings and that's it. They have not wanted to buy the hot brew as much unless the BTS' face was on it so I might have to pop it. Alright this Korean fried chicken sandwich battle is about to go down. We're outside of Pelicana. We are here with our resident Korean Dan Chang. Yo, you just proved that any for everybody wrong. Dan, according to 23andMe is 99.9% Korean. So that makes you like one of the most Korean people I've ever met. I'm going to be comparing the sandwiches. We got a sandwich from Pelicana. We got the sandwich from Shake Shack. We got some BBQ chicken, Gochujang Spicy Fried Chicken. So man, I think we just got it determined. How does the Shake Shack hold up? Do we have any early predictions? Dan, we have two chains from Korea. Obviously one was the supermarket version, BBQ Chicken. You got Pelicana and of course you got Shake Shack. I think Pelicana is going to be one of the better ones because I'm not going to lie. I don't like the chicken to be super wet and like the traditional Korean fried chicken. So the Shake Shack Korean Fried Chicken Sandwich was actually a limited drop in Korea. It got really popular at the Shake Shack branches and then they just brought it over and it's here through what? April. I believe that the fried chicken sandwich wars were getting so heated in 2020 and into 2021 Shake Shack just had to make a big move. KFC Sandwich Wars. Let's go. Yo Dan, what does this say? This says Pelicana Chicken. Pelicana Chicken. And if you guys are curious to know if Shake Shack has the best Korean fried chicken sandwich in the game right now, make sure you hit that like button because that's really going to help us out. Let's go. Aren't you guys the Korean fried chicken KFC battle is going down? Alright first up, of course we got to do the newly arrived Shake Shack KFC Korean fried chicken sandwich. It's got slo, it's got the kimchi mayo, it's the chicken is glazed in the gochujang sauce. Is this the exact same recipe for the one that debuted and sold like maybe like four or five months ago? That's what I would be curious. I would be curious. I would think so. They like reinvented everything and like put mad ketchup in the gochujang. Oh you mean if they tweaked it for the American market? Yeah. I feel like it is. Yeah. Break it down. What are we looking at? Just take it out to the wrap. Guys you got your. We got the clamshell. Is that the clamshell bun? Clamshell bun of course. Classic potato bun right here. Super soft.   And then you have your coleslaw. You have a little bit of the kimchi mayo of course. Classic condiment. Man. I mean it has everything you need. Oh my God. You can smell every, every spice in there. And David here of course we had to try one protein style lettuce wrap. Shake Shack Korean Fried Chicken. Okay. The gochujang is like pretty light. It's not too spicy. All right man. It was tough because my chicken piece was a little bit dry. This is like a chicken shack with gochujang glaze on it. The spices were maybe even stronger than I thought. One layer or two layers deeper than I thought in terms of like how it's sort of just resonating in my mouth. I do feel like they catered this a bit to the American palate. I do feel the same. You think that this is probably different like slightly different recipe. I feel like this could definitely be like super strong when you get it. I'm going to give this a four out of five. Would I get this every day? I give it like a 3.5 out of five. Okay. So as a Korean you're not like yo if I go to Shake Shack I have to get this sandwich. I have to get the cream. No yeah. I'm going to get the burger. Wait is there any element that would feel like kind of stereotypical like if you walked up there and you're like can I get the Korean Bob?  I wasn't super impressed. Me personally. You know it was good and solid but it didn't blow me away. Yeah thank you. Alright moving along the special limited Korean menu at Shake Shack we've got the Korean Shake Shack bites. Yeah the chicken bites right here. They're smaller pieces. They're fried in a similar vein but there is no gochujang glaze you're just going to dip this in the kimchi mayo right here. Kimchi mayo bites. I actually like those chicken bites better than the chicken in the chicken sandwich. I want to see this on like future Korean dishes with like some panchang on the side you know just dip this while you're eating food in the Korean. Dude you know what I think would have been fire is if the chicken patty from the soul burger was more fried and then had this sauce on along with the kimchi coleslaw. I think if these had the gochujang glaze I would get this over the sandwich. Aren't you guys our second competitor is Pelicana chicken. This is the original Korean fried chicken brand from Korea started in 1982. To have the Pelicana of course then we got to have some Korean drinks. Dan this is a lunar this is yuzu hard seltzer this is blowing up right now. Alright David this is a makgeolli I would say the makgeolli though for the people who have it it might be even their more favorite drink than soju. I actually have a Chinese beer which is a or a jasmine tea bowl. We are here looking at the spread at the Pelicana round. Dan you're saying that they're using chicken thigh.  And I see maybe more of a gochujang or kimchi dust as opposed to a hard core gochujang sauce. Yeah so this one is a this one's glazed in the gochujang sauce not gochujang sauce but their house-made sauce. And then these are more battered into a bowl and then kind of tossed in. So it's a lot more dry like it lets the meat come out. So as you can see the glaze is kind of poured on it wasn't completely tossed in but you can see it dripping onto the bun right here. Pelicana with spicy sauce going head up with Shaksha let's go. Wow one started the fried chicken craze in Korea and one's uh you know the newcomer. Oh that is good my goodness I want to say there for sure is some gochujang in there but not a lot. The chicken piece is way bigger and it's thigh meat so it's juicier and it kind of has that irregular shape because it is a chicken thigh. Overall the chicken piece was way better. For me I'm gonna give that a 4.5. I would have to agree 4.5 out of 5. Bro you know I said the chicken sandwich 3.5 out of 5. This is a definitely 4.5 out of 5. Monster with cheese.  This thing is gigantic this is taller than an Air Force 1 midsole let's go. That's even better. I'm gonna just say it early hold up. The monster is even better than the one with spicy sauce. That's interesting yo. Oh my god man that was so good bro. I'm just gonna bust out the Uji matcha beard or something. Yo David is lit right now but not the chicken sandwiches. This is the original Pelikana chicken sandwich. Pelikana the original. Is the sandwiches kind of look the same visually but I would say yeah they all they they taste more different than you think. Pelikana southern style. You want to do it you want to put kimchi on the chicken sandwich. Oh kimchi chicken sandwich. A little bit more of those southern spices cayenne pepper. The kimchi almost makes it more comparable to the shake shack because the shake shack one has a kimchi slaw in it and you really need that fresh fermented sort of energy. Man actually. It was a monster the monster was the best especially if you put kimchi on the monster. If you put kimchi on the monster that would have been easily a 5.5 out of 5. My favorite pelikana sandwich is the spicy sauce one. I don't know if it was just the kimchi but that southern style is definitely my favorite. All right we are going to compare pelikana's chicken to bbq chicken. Now this is a battle because these are two chains from korea. One's more of a og you know really like the kfc of it. All and then bbq chicken might be like uh maybe like a Popeyes. Still pretty popular still international but just not as big. Pelikana chicken. So these are thigh bites there's no bones. Reminds me more almost of like a um Taiwanese popcorn chicken. That's like the immediately I've never had actually chicken thigh bites before. Next up we got the bbq chicken spicy boneless. Damn what's your opinion on bbq chicken. Every time I see this in H farm I'm always tempted to get a box. I feel like these are chicken tender pieces which is of the chicken tenderloin and maybe not the thigh. Bbq chicken.  This flavor is super good at bbq chicken. The sauce is rare. But we gotta dock them points because they didn't have sandwiches available today but had this flavor been on a sandwich you might be dealing with an all-star too. This is like the strongest tasting one I've had so far. It's very sweet and a lot more wet. Between the two this is pretty good. The bbq chicken was good man. Between these two because like we said bbq chicken automatically disqualified for not having sandwiches today. They might have to. On the boneless chicken bites they take it. All right you guys that does it for our kfc Korean fried chicken battle. Of course we had shake shack bringing over the recipe from soul korea. We've got pelakana obviously being the og originally from soul korea and of course you got bbq chicken which is a little bit more of a newcomer with the olive oil. A lot of people are familiar with that because I think the bbq chicken expanded in america before pelakana did. All right you guys as you guys sip on the soju melona drinks here.  We got to get out of pelakana to make sure that we're being unbiased. Okay first can I say what I appreciate about the shake shack sandwich. Yeah okay I appreciate that it was gochujang glaze. It did not taste exactly like other Korean fried chicken sauces that I've had. It was a little bit more traditional a little bit spicier. I think for such like a large chain like shake shack to kind of endorse Korean flavors and break that to the american palace very cool. Right and it's not just a new york or la thing it's like all the shake shacks around the country. This is nationwide through april this is not a shake shack brand new. I'm just letting you know the information in case you guys want to try it. The shake shack one was the most gastronomic the pelakana especially the monster was just the most tasty but then bbq chicken out of all of them it might have been the easiest to eat. Sandwich per sandwich the shake shack one is not the most delicious one but you should try it because it's different. The pelakana chicken sandwiches two or three out of four of them were delicious. They were good. The southern style here at pelakana that was that was crazy. And then putting kimchi on there they said they're bringing gochujang kimchi to some of their new burgers they should they really should. All right so Dan you're going with the southern style as your favorite sandwich out of all the ones we had today I'm going with the monster with cheese who especially if I had a little kimchi or a little kimchi aioli or mayo on that one. Yo all right so the shake shack chicken sandwich wasn't my favorite today but can I say something I think with the elements that it brought it is going to influence or at least push other chicken sandwiches to up their game. Because they kid did the kimchi slaw. Thank you everybody for watching that battle of the kfc sandwiches Korean fried chicken that is and I know that there was other brands that we couldn't include a lot of them are not all in New York or not super close to each other but shout out I'm so glad I got to try pelakana the og brand I'm so glad we got to try the new drop from shake shack. And check out Mark Lee and spot desserts man shout out to Mark. Yup shout out to Dan for being with us in the comments down below let us know what your favorite Korean fried chicken spot is and if you want to try the shake shack chicken sandwich also let us know if there's anything else in New York that we should check out. All right you guys let us know what you thought in the comment section below make sure you like subscribe turn on your notifications until next time we out peace.


Hello, welcome back. In the last segment, we did a detailed example, a somewhat complete program using if statements. Now we are going to discuss the switch statement and logical data. So first the switch statement. So this is a little bit complicated and so you will have to bear with me as I describe it. So I will start by describing the general form. So it looks like this, which followed by an expression. Then there is the keyword case and then there is constant 1. So here you are expected to actually have a number like 5, 7, 1, 2, 3 whatever it is. And then you are going to have a group of statements. Usually these statements will end with a break. Then there is a case, another constant, another group of statements and so on. And then there will be the keyword default and there will be another group of statements which we will call the default group of statements. So that is what this switch statement looks like in general. And the expressions and the constants are required to be integers. How does this execute? So first the expression is evaluated. So when after the previous statement is executed, when we want to execute the switch statement, first the expression is evaluated. Now this value is compared with constant 1, constant 2 and so on. If some constant i is found equal, say maybe constant 2 is found equal and constant 1 is not equal. So the first constant that is found equal, let us say that is constant i or in this case constant 2. Then all statements starting with group i are executed. So from here everything is executed. If a break statement is found, so we said that it usually ends with a break. If a break statement is found, then we deem that this switch statement execution is over and the control goes on to the next statement following the switch. If there is no break statement, then it executes the next group of statements and the next group of statements and so on until a break statement appears or you execute the last statement in whatever group. So that is what the switch statement looks like. If no constant i is found equal to this expression, then the default group of statements is executed. So this statement looks like it is designed for our turtle controller. Remember what was happening in the turtle controller? We were reading in a command and command is a character but you know that a character is actually an integer, a character is a numeric type. So a character only when you print it gets printed behaves like a character but for calculation purposes it is actually an integer. So this is the perfectly fine numeric type as we required it to be. So we wanted this switch command, we wanted an integer to come out of this and the command being a character, its value is in fact an integer. If the value of this integer is equal to f, the asque value of f, then forward 100 will be executed. But after forward 100 is executed because there is a break, then the control will go on to the next statement following this. So it will go on to the next part, next repeat. If command was r then this will be executed, if command was l then this will be executed. And if none of these were present then the default this will be executed. So notice that this looks quite nice. On the other hand there is a slight problem, what is the problem? You may forget to write the break, so go back here. It is very likely that you may just forget it, if you just forget say this break what happens you execute this and you also execute this, so that is not such a good idea. So this statement is actually, I will actually suggest that you do not use the statement instead just you use the analysis. So the statement looks elegant but because of the way it is designed because of this break part it is actually a little bit dangerous to use because you may forget. And you may say that look sometimes it might be necessary to execute several groups and the book indeed gives you an example just for completeness but really my recommendation is do not use the switch statement. And in fact in this course I will not be asking you anything about the switch statement. I just described this because for the reasons of completeness if you read real code you should not get a code written by somebody else you should not get surprised when you see this switch statement. So the next topic I want to cover in this segment is logical data. So we have seen that we can evaluate conditions and we can also combine together conditions. So we can write something like if x greater than 5 and y less than 6. So we are really performing we are really doing operations on results of conditions as well. So when you might ask why should we not allow storing the results true or false of such computations. So we evaluated a condition it came out to be true and false. So let us say I want to remember that that condition came out to be true or false. So can I remember it? Can I put it in some variable? Indeed I can. So C++ has a data type bool into which values of conditions can be stored. Bool is named after the scientist George Bool who formalized the manipulation of conditions and logical data. In fact he invented something called a Boolean algebra. So we are not going to see Boolean algebra as such but we will discuss this bool data type next. So here is how we can declare a bool type of data. So I can write bool high income or low income. Of course these are going to be standard identifiers with the usual rules for identifiers. I can assign to this and I can write something like high income equals and I can put down a condition over here. So this condition will get evaluated and depending upon the value of the condition either a true or a false will go in over here. I can also write something like declare a Boolean variable fun and simultaneously initialize it to true if I want. So true is a constant or a keyword. So the first statement will set high income to true if the variable income contains value larger than 800,000 and the second statement will just set fun to true and true and false are Boolean constants and what is the use of these variables? Well Boolean variables can be used wherever conditions are expected. So I can write something like if high income tax equal to so and so. Of course before this it is expected that I will have set high income to true or false by writing a statement of this kind. So now I want to give you an exercise which is write a program to test if a given number n is prime. So we are going to do this and let us see how we would do it. So first of all you would do this, so we would ask look how do you do this manually? So there is an algorithm that you may or may not remember or may or may not know called the sieve of Eratosthenes. So how does that work? Well very quickly we start with 2 and we keep on checking whether a certain number divides n. Now this we make it a little bit more efficient by saying look if we want to check whether a given number i divides n we first have to check whether it is a prime itself or not. So that is Eratosthenes sieve, we are not going to follow that method so it does not matter if you did not understand what Eratosthenes sieve is. We are going to do something slightly different, we are going to do something which is slightly less efficient but it will do things without requiring us to remember too many things. Here is what we will do, we will start with 2 and go all the way till n minus 1 and check if any of these numbers divides n. If one of these numbers divides n then clearly n is composite. If none of these numbers divides n then n is a prime. So that is going to be our algorithm. So start with 2 as a candidate divisor and check if it divides n otherwise go on to the next candidate until n minus 1 and check if any of those numbers divides, candidate divisors divides n. And if we find any such number we will be able to conclude that in fact that number is composite otherwise that number will be we can say is prime. So let us write the program, so we will include simple CPP and we will have the main program and n is the number that we want to decide whether it is prime or composite and divisor is our candidate divisor which we are going to start off at 2. So the first thing we do is we read into read n. So we expect the user to type in whatever number he or she wants to check whether it is prime or not. Then we are going to have a Boolean variable. Remember we said that we are going to go over the candidate divisor starting at 2 and this is our first candidate divisor over here. So I should have perhaps used a bigger name candidate divisor but that is what I mean. So this is our candidate divisor and we are going to start with this and go on till n minus 1. And if ever I find that candidate divisor divides n then I will make divisor found to be true. So far I have not found any divisor for n. So I will make it false, I will set it to be false. So we will check if divisor divides n as it varies from 2 to n minus 1 and then thereby set divisor found. So if the divisor divides n then set divisor found equal to true. And how do we do this? Well we have to check for all numbers between 2 and n minus 1. So there are n minus 2 such numbers. So we are going to have a repeat loop of n minus 2 steps, n minus 2 iterations. And we are going to check if n mod divisor is 0 or in other words is n perfectly divided by divisor. If it is then we have found a divisor and so we will set divisor found to be true. And then we want to check the next divisor and therefore we will set divisor equal to divisor plus 1 and that is it. After this if divisor found is true then we know that the number is composite. So we will say if not divisor found then see out prime. We could have written if divisor found then print composite but we just wrote it in a different order else we are going to print that this number is composite that is it. So what has happened over here? We have used divisor found a Boolean variable to accumulate whether or not we have found a divisor as we go through the loop. So this is one use we can put Boolean variables to. So we are remembering the previous whether or not divisors were found previously and that is a Boolean value whether a divisor was found is either true or false so that information can be accumulated can be put in Boolean variable. And so we have given it an appropriate name and inside that we are putting this information and at the end if Boolean if divisor found is false that is we did not find any divisor at all then we are going to print out prime otherwise we will print out composite. So I would like you to execute this program mentally for n equal to 100 and I would like you to verify that it produces the correct answer. But I would also like you to think about whether you think that the program is a good program or whether it is perhaps doing too much work and if it is and you will indeed see that it is doing a necessary work we will find ways of remaining that a little bit later in the course. So what have we discussed? We discussed the switch statement and we recommended that it should not be used. We discussed logical data and we said that it can be used to remember results of conditional evaluation. In the next brief segment we are just going to summarize this lecture sequence. But before that let us take a short break. Welcome back. In the last segment we discussed the switch statement and logical data. In this segment we are nearly going to summarize the lecture. So first of all I should observe that conditional execution makes life interesting. We noted at the beginning that the tax calculation program cannot be solved, cannot be written without something like conditional execution, something like an if statement. Then we discussed three forms of if. The plain if, if, condition consequent, if then else, if condition consequent, else alternate and then the most general with several consequence and a single alternate. And I should point out that you can nest if statements inside each other. So the consequent can be a block and that block can contain if statements. But there are some pitfalls in this and those pitfalls are discussed in the book. So please read the book. We also looked at compound conditions. So conditions which are made by saying look I want this condition to be true and this condition to be true or maybe this condition to be true or this condition to be true or this condition should be false. Then we also talked about logical data. We did talk about the switch statement but I am not mentioning it over here because I really do not want you to use it. And before I finish this lecture as usual I will be, I will ask you to try the exercise not at the end of the book but at the end of the chapter. So please do that, that is absolutely necessary and I hope you will like those exercises. So that is it, that is it for this lecture sequence. Thank you.


Just try something. It might not always work, okay? But guess what? It's just as likely to not work as it will work. Right? So just try it. I've tried plenty of things that haven't worked out, okay? Things that I thought I would love. It's okay. Sometimes you try something and you learn this. It's not for me.  I'm so glad I had the courage to step out of my comfort so I didn't do that. So do that for yourself.


This study examined the causes of interruptions in a hospital pharmacy and assessed the effectiveness of implemented measures for reducing them. It found that interruptions are caused by adaptive behaviors of both pharmacists and nurses, who adjust their workloads to accommodate short staffing and lack of information about the medication dispensing status. To reduce these interruptions, the study introduced measures including a medication dispensing tracking system for nurses, request-based extra medication delivery, and pass boxes for earlier pickup of medications. These measures resulted in a significant reduction in the total number of interruptions, with a 60% decrease in the daily median number of interruptions. This article was authored by Tokahiro Kojima, Noa Yosukinoshita, Harumi Kitamura, and others.


Since the beginning of invasion, over 314,000 people have fled Ukraine into Slovakia, including over 20,000 people who are non-Ukrainians and non-EU nationals. We, an international organisation for migration here in Slovakia, have rapidly expanded our operations to respond to the needs of displaced people. Through Migration Information Centre that we have been operating for over 17 years here in the country and National Hotline, we are assisting people with information and counselling. We have been training frontline workers on how to prevent trafficking and we are establishing a mobile team to provide psychosocial support services. Our team have also been supporting those fleeing Ukraine with non-food items, including thousands of blankets to keep us staying in temporary accommodation. It is also very urgent to get emergency assistance into Ukraine itself. We are operating a warehouse in Košice, which is a city some 70 km from the border, to transport vital supplies into the country. We have also started to roll out our displacement tracking matrix, tool to collect and analyse data on the profiles, vulnerabilities and other needs of people on the move.