Hi everyone, sorry about the delay and we'll start. My talk is basically about writing bindings to native libraries in to Node.js. So let's say you want to use something like an image processing library, say OpenCV, or you want to port Node.js to a smartphone and you want Node.js applications to be able to access smartphone APIs like the phone, the API, the contact work, so on. Right? How do you do that? You integrate C++ libraries and Node.js, that is what the talk is about. If you are interested in generally knowing about the internals of Node in some sense, then also this is a good talk for you. So basically Node is a small grapple around the V8 JavaScript engine, which makes scripting JavaScript, I mean, integrating JavaScript into other applications as easy as something like Lua, and it's quite possible that JavaScript will be the new Lua someday. So yeah, if you want to follow the slides and code in the setup, all the code itself is like you can write out as I go along. So what we want to do is use C++ libraries in Node.js, exchange data between C++ and JavaScript, and the main part which is do asynchronous IO with Node. I don't know if I have enough time for the async IO part, but let's see what happens. Yeah, this talk is very code heavy. You will see a lot of C++ on screen. So if you have any questions at any point, just like stop me. So the very basic thing, like the first simplest Node module you can write. How many of you have written Node modules in JavaScript plain? Use multiple files so that you do export, dot, something, right? Okay, so three or four people. So just like you have exports in JavaScript, what you do in C++ is that first of all, you include obviously the V8 and Node header files. And then you define this function called init, and you still Node using the Node module macro that my module is called first step in this case. And to set up this module, call this function called init, and this init function can then set up the module as you want it, right? So just like you have the exports object in your JavaScript modules, you have this target object in C++, so you can set properties on that and they'll show up in your module. I'll explain the handle and object and these things as you go along. So this is like the basic template. Every Node module you ever make will have this, right? So how do you build, how do you compile this? So Node uses this tool called VAP, WAF, for its compilation, which is basically a Python replacement for me. So this is like a simple make file, I mean, a W script file for where you set that it's a C++ project and you have this Node add-on thing which can, which includes certain Node related libraries like V8 and Node itself. And then you tell it to build a module called first step using the source file called first step.cc at the very end, right? So this is again something that is common. So in all the code that is in my Git repo, you'll find every directory has a build file and so on. So you can just directly compile it. So to compile it, you do Node dash WAF, which is a slightly modified form of WAF and you say configure and then build and hopefully it builds successfully and then you can use it. So just like you require modules in Node, require normal JavaScript modules, you can do the same thing with your C++ module. So you just do require and the path to the module itself, right? And if you compile this module, then this is what you would get because it's like you haven't actually done anything in the module, it's just an empty object, right? So this is basically what Node is. It's V8, it takes this library called lib uv which does async IO and all those things. And it wraps the entire thing and calls it Node.js and your binding is the one in red. So that interacts with V8 and the library part is your native library. For example, OpenCV or SSH, for example, a lot of libraries in the Node code distribution itself like the crypto library and Zlib and so on are written exactly as I'm going to describe, right? So V8 itself has good API documentation, but it's not officially hosted on their website. So this is one of the places on the web where you can find it, okay? So now let's go back to the code. You see this handle object target, okay? So what V8 does is since it has to do garbage collection by itself, right, it's going to pass everything through this handle wrapper. You can think of handle as a smart pointer which keeps track of how many references there are to V8 objects and so on. And the wrappers in a sense also encode the scope of that variable itself. So as long as any V8 object has at least one handle referring to it, the garbage collector knows that I'm not supposed to delete this and it will keep it in memory. So handles are of two types. First is local and which is also Eda's handle and is persistent. As soon as a local handle goes out of scope, the garbage collector is free to delete it and a persistent handle is not deleted manually by, I mean, not deleted by the garbage collector, you are manually supposed to tell it to delete it. So you'll usually use persistent handles when you want to pass around data through multiple function calls and store them around for later. Otherwise you'll stick with local. So let's get directly to implementing functions. This is a simple JavaScript module like you would say export.square equal to whatever that's implementation and then in other node modules you could just require, let's say this is called square.js. You could do require square and then you could do square.square itself and call the function. So how do you do this in C++? So it's pretty simple, nothing too complex.  You do target.set, the last line of the code. You do target set, the name of the function and the corresponding function itself. So any C++ function which has to be called from JavaScript has this signature which is the first line itself. It should return a value and of course the function name and then it takes this arguments object which is used to transfer JavaScript arguments from JavaScript to C++. Then in the init function I have created this function template. So I'll explain what a function template is in a few slides. Think of it as saying that telling v8 that this C++ function should somehow be magically put into the JavaScript function. And so you use this function template to allow that. So you function template and then you tell the function template give me an instance of the function and then you inject that into the target. So this is equivalent to export.square function n. Now I'll actually go and implement the function itself. So this is the function implementation. Just like I had a square, I mean I go and implement it. So args is something like an array. Okay, just like you get one argument named arguments in JavaScript, you can extract them by index in C++. So I'm taking the first argument in the arg0 and right here. And extracting the integer value from it. Then I square it. This is like normal C++. And then I do scope.close integer nu square. So at this point I would like you to realize two patterns in writing bindings. One is that anytime you use a v8 class, you don't do v4c++ nu operator. You use the static functions capital N nu.  And using these static functions allows it to keep track of all that. The other thing is this handle scope thing. So as I mentioned before, there's local handles and position handles. So local handles, v8 maintains a corresponding stack of some sort. About what variables are in scope currently. And when like, so a handle scope is like adding a new stack frame in v8's garbage collection thing, right? And then you say that any new values, like any new handles that are created in this scope, right? Once that scope is popped off, you can delete all of them. Okay, so the only problem is that return value has to go back to the calling function, right? And if that was deleted when this function went out of scope, then that's not good. So what scope.close does is it goes and accesses the scope that was in scope before, like the handle scope that was in there before on the stack. And it makes this whatever you pass in the close as parented to that. So it doesn't get deleted. Basically, any time you want to return something, it's best to wrap it in scope.close, right? Excuse me? Yeah. You don't need to instantiate the scope there? Uh, yeah, I should see the first line that's handle scope scope, and that's basically all you need to do. And internally it will handle you. So, uh, this is like the analogy from C++ v8 to what happens in actual JavaScript. So function template itself doesn't have very good JavaScript analogy itself. It's more of a way to, you know, before I create the function, I keep it in some kind of paused state. And so that I can do stuff with it. Okay. Then when I did the get function to get an instance, get function, the return of get function is something like what happens when you refer to a function just by its name, right? Without following it. It's just the function itself, right? So function template provides certain things, instance template and prototype template being two of them. So using instance template, when we go to like the next slide is object oriented, like how you can create JavaScript objects in C++. Right. So when you do that, there's this common pattern where you do, like you do, let's say the inventory is the object. So you have a function and then you create it with new. And when you create it with new, it's like object in JavaScript. So then you use this dot items to set properties of that object, right? So instance template is equivalent to this in JavaScript, right? And if you move here, and this is the traditional way of adding methods to a JavaScript object, like if any instance of inventory will now have add stock and ship methods as part of it, right? So just like that, prototype template is the corresponding dot prototype thing, right? Any questions at this point? Because now we'll go to object oriented. So now it's like, if you actually try running the code called this simple function in the GitHub account repo, right? You will see this same thing I've like had in the header files and so on. And you can just run it. And if you require the module, it will have a square function ready to go, right? Yeah, so coming to objects. So there's not much difference between creating a function template and creating, you know, objects of that kind. So again, it's the same thing I created a function template and inventory again has the same signature if you look at the bottom, right? What I am doing differently is that since I want that this dot items equal to something, right? So I get the instance template, right? And on that I set items new, new integer called with a value 257, right? And then I say, I inject that into the target itself. So I'm doing exports.inventory equal to the inventory function, right? The interesting part about the inventory implementation is that it's just one line. Return this, okay? So what is going to happen is that just like in normal JavaScript, this pointer is created by the JavaScript environment itself. It's just the empty object, right? Similarly, args.this is the equivalent in V8 and it will be an empty object again, created by V8 before it calls your function, right? So you can just return that and that makes it an object, right? Okay, so just like you have a string new, symbols are something like internally V8 will keep that in some sort of, I mean, it will convert it to an integer. We call it interning in JavaScript engines. And what it's going to do is instead of having to look up by the entire string compiles and every time, it's going to say that it goes on a unique code and that speeds up the lookup. So for certain frequently used things, you might want to use it. Yeah, so now this was operating on instance template. So every instance of inventory will have its own items and you can really modify it. Right? So how do you transform the method pattern of JavaScript into C++? That is how do you set methods on the inventory class? I mean, it's not a class, but we're going to treat it as a class, right? So again, not hard. What I'm trying to show is that this like V8 has a tremendous simplified, how you write, you know, applications that can interact with JavaScript to one row and know that certain useful things on top, which I think make a lot of difference. So just what it's going to do is prototype and create. So node provides this macro called node set prototype method. And you just pass it the object itself. And then you specify what method is going to be called in JavaScript. And what callback, like what C++ function is going to be called when add stop is called. Right? I'll explain why you don't directly want to operate on prototype template and why you should use this macro a bit later. But I mean, it will become clear as we go on why you should use a macro, right? Again, not much difference here. Just get a function and set it. And you should have add stock and ship as part of inventory methods. Right? So let's actually turn to the implementation so that we can understand how that object is now internally accessible in C++, right? Again, I have used args.this. So args.this will, let's say I do something like var x equal to new inventory and then x.add stock and let's say I pass five. Then in this case, if you were writing JavaScript, this object in add stock would be x, right? So that's what is going to be here too. It's going to get you that this object. And then you just do a get items and get its value, right? If you understand this even 32 value and so on, you can just consult the API documentation. Basically, what it's doing is it's converting from the V8 representation of an integer into the C++ thing, right? And otherwise, I'm using this object as a simple, some kind of dictionary. I'm just setting and getting problems, right? Very simple. And then I just return undefined. Undefined is just a convenience function. Similarly, the shift method. So again, I do get this point over and get properties. I can throw an exception by just calling throw exception and passing the string. So let's say I'm trying to ship more than I have and you can throw an exception. So as you can see up till now, we have a very one-to-one analogy between C++ implementation of the module and the JavaScript. What you would actually be doing in ship would be, let's say you were calculating, I mean, you were using some native implementation of inventory, right? You would be calling methods of that native library on the instances and then echoing back those values, right? So that is where we come to, I think, the most important part of writing bindings, which is object wrap, right? Where you associate native C++ objects with JS objects. And what I mean is that if you see the diagram, there's a v8 object, let's call it obj. And v8 objects are these internal fields, okay, where you can arbitrarily insert data, right? Any kind of thing, and v8 won't touch it. You can do what you want with it, right? And similarly, you have this instance in a stick of an object wrap subclass, which you will create. And then you have the native class instance. So let's say you are having some image processing library and so that library has a class called image, okay? And for every image that you want your JS app to use, you want the instance of the native image class to be created. So in JavaScript, if I do a new image, you want a new image to be created in your native app, a native library as well. So what you do in that case is that you would create an object wrap subclass, let's call it image in another namespace. So let's call it JS image, so we don't get confused, right? And JS image would contain the native image and would do operations on the native image. And JS image would handle, it would have methods on itself and it would have feeds on itself and expose itself to v8, right? Except what happens is that how does v8 know that for every instance of like a normal v8 object in the JavaScript space, this is the instance of the sequence object, right? To establish that association, we use the internal field. And this is the object wrap what it does is it simplifies doing the internal field manipulation. And when you call INHD wrap, so wrap is actually a method of object wrap and since it's a subclass, you call it. And on the OBG, then internally it sets the field. So field number zero is now pointing to the instance of your subclass, right? And this way v8 knows that this is the association, right? And at any point, when you get a v8 object, you can extract the JS image class by accessing the field. And you could ditch object wrap and just operate on the internal fields yourself, like instance set internal field count one, right? You need to do this because v8 by itself will not initialize any internal fields. So you need to tell it I'm using one field, two fields, two fields, so on, right? You could do it manually. The only thing is that object wrap does some, again, garbage collection.   Because otherwise you get this mismatch and your program supports. So you have to be careful about that. So this is where object wrap is going to deal with those things, right? So this is our example going to proceed. This is your native C++ library. I'm calling it library. And it has a class inventory, right? And all this is native code. Let's say in a real situation, you would probably have a compiled library which implemented this and you had only the header file. And you would go about this. So think of this as a header file, which has all these things, right? So we do have to set the internal field count manually because, I mean, no doesn't know which instance we are dealing with. So this object template instance is again, like you create a function template for inventory and what you get from that template instance template is the instance, right? And you set the internal field count to one. So you say that every inventory class in the inventory object in JavaScript has one associated internal field and which you are internally going to point to your JavaScript, I mean, C++ wrapper, right? So in namespace binding, okay, my bindings code, I create a subclass of object prep, right? And I have this new method in it. So just like v8 has integer new string new, so we use the same convention in our classes so that it makes using them easier, right? And realize that it's static, okay? Any class method, I mean, any method that's in a class that you want to associate with v8 has to be static because only static callbacks, I mean only static functions in C++ can be passed around as function pointers, right? So they have to be static. And then what you're doing is internally you are creating an actual instance of the same class itself, okay? This class inventory and here inventory is the same thing, right? So you create a new instance of that and then you wrap it around argument this, right? Except I'm not using this, I'm using Holder. So what's the difference between Holder and this, right? If you realize in the first one, when I was just reading the items and getting and setting them, I was using args.this, right? And now I suddenly switched to using Holder. So what's the difference, okay? So args.this is always the this object with reference to the JavaScript scope, okay? And you know that in JavaScript, you can always rebind functions to other, you know, deal with other objects as this. Except what happens is that when you're dealing with internal fields, okay? So when your inventory had this internal field storing reference to a subclass, right? And then I go and change the prototype of my internal object to point to something completely different, okay? And then when you invoke the method, args.this is actually that different object, which no longer has an internal field and I try to access it and the program crashes. Right? So what args.Holder does is it makes sure that this object you're dealing with is a valid, you know, object wrap instance or whatever you store. So that even if you try to call something, it will fail with a more decent message than just crashing. Right? And this is the node prototype set method. I told you, don't directly go and set the prototype template. Right? What node prototype set method does is it uses something called signature in the game. I'm not going to go into details of that, but basically node prototype set method combined with using holder will ensure that it gets called on the right class and I mean, right object in the prototype chain. Right? So you can always use holder. I'm not saying use this in certain cases, use holder in certain cases. It's preferable to always use holder itself. Right? So getting back to the wrapper, yeah. So what I've done is now I wrap the this instance in my wrapper so that this link here is established. And then I return this object itself because that's our instance. Now, this is where the interesting part comes. Since we have wrapped it, now we obviously need to unwrap it at some point to operate on this. Okay? So when in JavaScript, the user does x.ship by items. Right? This object is going to be x, which is a v8 object. And that v8 object has the pointer to our internal subclass. Right? So we unwrap it and we convert it. I mean, we then do our normal operations. So wrapper itself has, okay, sorry, yep. This wrapper itself will have internally key preferences to, you know, the native library classes. Right? In this case, it's called INV. So what I'm doing here is I'm actually calling the native method ship. And then I can check the return value and do error handling. Okay? So this is like the simplest binding you can get from JavaScript to a native library. Right? Any, like, questions up to this one? So, how much time do we have? Wait a minute. Okay. So we have time to get on the asynchronous IO part, which I think makes a ton of difference to, I mean, that's what Node is all about, right? You shift operations that block to another thread and you can process lots of stuff. Right? So what is the concepts involved in getting the... You wrap this same native object twice. Do you make the same JavaScript object? Okay. So let me clarify. When you wrap, okay, so it's somewhat unintuitive. When I'm doing wrap world or wrap, r-short-folder, it's not r-short-folder that is being modified in IV, except that r-short-folder's internal field is being mapped to wrap itself, wrap or itself. Right? So if you call it again, it's just going to reset it. It's the item, I mean, idempotent operations, sir. Of course, if you try to unwrap something and it turns out to be of the wrong type, then it will be null, right? So in all my examples and even in the code, I've been very relaxed with error checking to simplify the code, but even like accessing arg zero and then just calling even 32 value is a very bad idea. If somebody passes a string, then you're going to get a wrong value, right? So you have to do typing and so on in production code, right? Yeah. So what is the problem we are dealing with when we want to go easy, right? Most libraries are not designed to be non-working, okay? So when you do file IO in normal C, you do open and then you read, right? Until the read doesn't finish. So let's say you're reading on a socket until the socket doesn't actually send data, read is going to block and your program is going to block, right? So most native libraries are not designed to be non-blocking by design, okay? They are native implementation. So the workaround that Node does is to allow casing Node to use synchronous bindings as that. It has an internal pool of threads, okay, in the background and Node itself runs on this main thread and using LiveUV, it abstracts away the thread pool and so you can give it a synchronous task and we'll move it off to the thread pool, right? It will run it over there, it will detect that it is finished and it is finished, it will notify you to do the further processing, right? So internally it will use multithreading and simulate the asynchronous nature. So you need to do three steps to have casing bindings, like convert a synchronous library to a casing behavior in Node. So the first step is to use this function called UV underscore, Q underscore, right? So this function takes a couple of things. First of all, you will need to define three functions, okay? Just like we had a one-to-one from the JavaScript ship to C plus a ship, right? So when somebody calls, okay, let me take the code itself. This is what we're going to do, okay? I've called this async module, I'm creating an inventory and let's say in your company, the inventory story becomes very full and because you want to optimize it, you tell your workers to reshell the whole thing in some sort of order, right? Except that your inventory is so big that reshelving it in the main thread would stop people from interacting with the inventory, right? So you want to make it an async operation and you want to know when it's done, when reshelving is done, right? So what do you think is going to happen if you just read this code as an order? What is going to happen? First of all, you're going to do the reshelve call, but then it's immediately going to go and print after reshelving source because this call, we want to make it non-blocking, right? Then it's going to do this tick, tick, tick, give printing it. And the native version of reshel, okay, in your native library, your thing is blocking and what it does in this simple case is it just leaves for five seconds, okay? So here you're going to get output like after reshelving source, then I think I have the output, yeah. This is what the output is going to be, right? So how do you do that? So because it's like this three-step thing, you need to define three functions other than one function for every async function you want to use. The first one is, of course, the direct mapping, like shift will go to shift, right? Except that there, instead of doing the operation itself and then returning, you are going to set things up and put it on the third pool, right? The second function is the one which actually gets run in a separate thread and does the synchronous task. So calling the native version of reshel would be done in the second function, right? And once the second function is done, liveUV is going to tell you it's done. So what do you want to do now, right? And that is going to be handled by the third function.  So how do you transfer data through all these three functions, right? Because you will have some kind of parameter. So if reshel was called with what to reshel, then you want to pass that into those native every, right? So we use this concept of baton to pass around data. Okay. So this is the baton in this case. I call it a reshel baton. So yeah, yeah, so if you see, it's not exactly the easiest, like till now we were doing pretty one-to-one mappings, but to get asynchronousity in the mix, it's a bit cumbersome. So it might be too much typing effort, but it's worth the performance improvement, right? So the first member of the baton always has to be this thing called uvworkt, which is something internal. You don't need to worry about that, but it has to be the first number. Okay. And then you can keep track of whatever arguments are being passed. So in this case, we want to call a callback, right? So we keep a reference to that callback here. Then we also want to call reshel on a certain instance of the object, right? So we call, I mean, we keep track of that for here, right? And so what is going to happen is when I made out reshel is called, or corresponding reshel function is called, and you see this code, right? That goes and creates this button, okay? So reshel is going to create this button here, right? I'm going to set the callback as a position function. So why I have a mirrored position? Because as a function passed into the callback arguments, it's a local handle, right? And as soon as this reshel function exits, it's going to be garbage collected. So I've made a copy of it, which is persistent to keep it around for later, right? And then I pass the wrapper. So this is like very basic. I'm setting the fields of the button, right? And then I call the magic function uvq work, which is going to handle all the details. So this is the main event loop. So you just get access to that. Then you pass the request along, and then you tell uv that the actual function doing the blocking work is reshel vsync.  So I'll get to the implementation of these two, right? But this is how you do it.  So, okay, we come to reshel vsync. Remember that this one is the blocking function which runs in a separate thread, okay? So you do not, do not, do not do anything with E8 in this function, okay? Do not access any VAT related functions, objects, anything, because it's in multiple threads, all kinds of bad things can happen, right? What do you mean by multiple threads? Yeah, so you know that node is an event loop, right? Yes. Yeah, but the thing is a lot of IO operations that occur are still blocking, right? Native IO operations. So to simulate this single-threadedness, Yeah, yeah, but the actual IO operation has to run in another... It means whatever node application whatever, operations that you do in an AC block also still, one core only, it's like a respect to a number of cores in it. Sorry? So you do multiple CPUs on the machine? Yeah. So you do multiple cores? Yeah. You're still running an AC operation? Only one of the cores will spike? Yeah. Irrespective of... So... No, but there's no question of how cores spike in. You're doing IO only. I'm saying that there will be only one process running. There will be no thread. So if at all we have to ask, a thread will be a child process. Yeah. It will be spot on. So there's no need for a node process. No, you have to understand that blocking IO has to still be done. Okay, so what's going to happen is, let's say your node app does a IO request, okay? And you are saying it's part of a continuous thread, right? I agree. I agree. So what's going to happen is internally it's not blocking. I mean, IO by its nature is not non-blocking, right? No. Okay, so even a library like EV, like if you run it in the same thread, even if you say it's not blocking, as long as it's in the same thread and you call a blocking function, it's blocked. That thread itself is not going to move, right? So if you want to have the main thread, which is the BV thread, while I'm doing the blocking IO operation, you want another network connection to come in and be registered, right? You need to move this blocking IO somewhere else so that this thread can continue running, right? So internally, node and BV together conspire to create this thread pool and any blocking IO operations are moved off to the thread pool, simply so that node can simulate the virtual reality of having just one. Visualize this ship. For me, top would be the only way. I can see this spike on a pool. I can see that the process has started running in that. Okay. But when you're saying that it stops that operation, fix up a new operation. I thought the CPU cycle has clicked. No, okay. So I'll just finish up and then we can... Okay, so this is the blocking function where, as I said, don't interact with V8, only do your native calls. So I get the wrapper, I call the reshell function, right? And then in async after, which is called once it's done, you can invoke the callback, right? So this is the output. If you actually were using a native library, you have to tell Vop to link to it when you compile. So again, you can just add some flags. Yeah, I covered this. So there are a couple of things I didn't cover in this, which V8 provides, especially accessors. So you can, you know, every time a certain variable is set, you can have a callback, get triggered and so on, right? Function signatures, again, I didn't do it because we didn't have time. But details of VV and using V8 on its own, what I mean by that is if you wanted to use V8 in another application, not in a different mode, just as a scripting language for JavaScript, then how do you do that? It's not much different between node and this, you just get context and so on. But most of the concepts are the same, right? So these are three good add-ons to start browsing the code for if you want to write your own add-on and confuse about some things, then they are a good point to start from, right? So yeah, now we can get to the question. Okay, so can I just take one, 20 seconds? Yeah, I actually wanted to ask you people a question. I'm just doing like a kind of Soviet kind of thing. If I want to ask you, what do you think is the one technology or idea or concept or whatever that you think every software developer, irrespective of whether he's a mobile developer or assembly hacker should know? And if you just think about that and you can shoot me a mail or something with your answer? Okay, so yeah, okay. So if any of you have different answers, please let me know. And I'm just doing the short story. Thank you. Thanks, Shikhar.


In the last class we had been looking at deriving inductances for the case of an electrical machine, a simple machine with a cylindrical stator and a salient pole rotor. The cylindrical stator has a single coil and the salient pole rotor has another single coil. In such a system there are basically two coils one on the stator, one on the rotor, stator is cylindrical and rotor is salient pole. For this we were trying to determine the mutual inductance between the stator and the rotor coil which we can call as MSR. In order to determine the mutual inductance we have tried to understand how the flux density distribution inside the machine would look like. And after looking at the way the flux density distribution is we have seen that the flux density distribution is a wave form that travels along with the rotor that means as the rotor rotates the flux density wave form also rotates along with it and this flux density wave form can be approximated as a quasi square wave shown here in the orange line that is this wave form which is 0 over some interval it has a high value when it is under the phase of the pole and then 0 elsewhere it has a negative value under the phase of the other pole and 0 again. The interval over which it is 0 from 0 degree to the place where it first goes up that we denoted it by ?. So this is the kind of flux density distribution at this point it may be helpful to look at an animation to understand how the geometry is going to look like. So here we have an animation of the machine assembly this is not the way the actual machine may get assembled but it is essentially meant to understand what the geometry looks like. So here you see the machine shaft and on that the cylindrical the two rotor poles have now been inserted and on this the field winding is now getting wound these two are the slip rings which through which the excitation is then provided to the rotor field coils the rotor has now been wound and should be inserted into the stator here you see the stator of the machine the stator consists of two slots one here and one here through this the coil is getting wound you see that the coil is inserted into one slot goes around the circumference and then gets inserted into the next slot there are five turns in this so the coil gets wound and has now finished winding the rotor is inserted into the stator assembly now here you see that the rotor has now been inserted into the stator assembly and the rotor can now rotate because of a small air gap between the pole phase of the rotor and the stator here you see the rotor rotating and now here you can see the gap that is there between the rotor pole phase and that of the stator the normal drawings that we draw we depict this view of the machine and end on view of the machine where we show only the slot here and slot here some conductors in this slot and conductors in this slot this cylindrical otherwise cylindrical stator and then the rotor now once the field is excited this arrangement will produce a magnetic field that circulates through this rotor pole gets into the stator one half of those flux lines would go around this stator come back into this rotor pole the other half would travel around this through the stator again and come back into the rotor pole that field generated is shown as a blue glow that is going to happen in this animation I would like to reinforce here that this blue glow is only meant for animation it is not that in the actual machine when the field is generated there is a blue glow everywhere so now you see the field that is that has been generated in the machine and this field divides itself here and here in order to go around the machine so that was the animation to help us understand how the geometry of the machine looks like and this part of the flux density is the one that is under the pole phase other areas around the pole phase do not have much of flux density in the air gap so we approximate that flux density wave form to a quasi square like this and as the rotor rotates this flux density wave form moves or the flux density wave form rotates along with the rotor so this being the case the next question is how do we determine the mutual inductance of the machine of the two stator coil between the stator coil and the rotor coil now if you remember earlier we had done this exercise of determining the mutual inductance for these between the stator and the rotor for the case where stator was cylindrical and the rotor was also cylindrical and there we looked at the MMF generated by the rotor and as this wave form moves how we evaluated how the flux linkage is going to be and there we had looked at how much flux is going to be linked by the turns of the stator as this moves and we simply took the area finding approach now it would be B average multiplied by the area B here multiplied by the area which will be the flux linked and as this wave form moves you can then determine how much of flux still links this a similar approach could be followed here as well but this time we will take a different approach what we will do is we first consider as we have said before the rotor to be excited second we know the flux density wave form please note that this is the flux density wave shape around the air gap which means as you travel around the air gap of the machine for a particular position of the rotor you know what the flux density wave shape is and we also know that the flux density wave shape does not change wave shape does not change as the rotor rotates the wave shape bodily moves but it is not going to change in shape and therefore what we can do is to resolve this flux density wave form wave form into Fourier series and then use this Fourier series description to determine the flux linkage in the stator use this use to determine flux linkage in stator and hence the value of mutual induct this is the approach that we are going to take now therefore the end on view of the machine what we saw now looks like this we are now going to determine the flux the expansion for the flux density wave form so let us redraw the flux density wave form around the air gap so the angle as you traverse around the air gap let us denote by a and the flux density wave form is given by is drawn like this 0 so you have a certain maximum value B hat and this value is – B hat it is 0 the flux density wave form has a value of 0 from 0 degrees to an angle equal to ? this is 180 degrees so this angle is 180 degree – ? this would be 180 plus ? and this is 360 degrees – ? so this describes the flux density wave form now if you proceed to the left of 0 degrees then what you would have is that the flux density wave form would then look like this so if you look at this wave form we at once notice that this flux density wave form is an odd function of a we also notice that this wave form is having half wave symmetry you may recollect from your first courses on network analysis if a wave form has this feature that it is an odd function of the independent variable then in the Fourier series expansion you will have only sinusoidal terms sinusoidal term if it has half wave symmetry then this wave form will have only odd harmonics therefore this wave form B of a can be written as ? n equal to 1 to 8n odd Bn sin n a is the expansion of this wave form you would have in a normal function other terms such as an cos n a this is not there because the function is an odd function of a there is no DC component because the average value of this function is 0 so in order to determine the Fourier components all that we need to do is determine this Bn so how do we go about doing that we know that Bn is given by 2 over 2 pi integral 0 to 2 pi B of a sin n a d a and because this wave form is an odd function of a this can be reduced to 4 over 2 pi integral 0 to pi B a sin n a d a and this function also has another aspect that it is symmetric about this line as well and therefore this can be further simplified as 8 by 2 pi integral 0 to pi by 2 B of a sin n a d a so this would then give us in the interval 0 to pi by 2 the function has a value equal to B hat over the interval ? to pi by 2 and 0 elsewhere and therefore this is sin n a d a which can therefore be written as 8 times B hat by 2n pi integral of sin n a is cos n a by n we have taken the n out and this is ? to pi by 2 and therefore that is 8 B hat by 2n pi let us take the minus sign also outside then it is cos n pi by 2 – cos n ? note that this is valid for odd n which means whenever n is odd cos n pi by 2 is 0 which therefore means that Bn is equal to 8 B hat by 2n pi into cos of n ? so that is the expression for Bn and therefore B of a can then be written as 8 B hat by 2 pi ? m equal to 1 to infinity cos of 2m – 1 ? into sin of 2m – 1 into a divided by 2m – 1 we use 2m – 1 instead of n because n has only odd values this is the expression for the flux density waveform that we have seen that is this quasi square wave flux density waveform has now been resolved into a Fourier series expression which looks like this now this is this expression is valid for this waveform in the sense this waveform is drawn for the case where this rotor as this is drawn the rotor that is shown here is in the horizontal angular location angular position in that case the maximum value of flux density would occur in this region the flux density will be 0 from here to somewhere here and then you have maximum flux density and then 0 flux density therefore this figure is drawn for the rotor horizontal. Now as the rotor begins to move what would happen as the rotor begins to move this flux density waveform would shift let us say the rotor from this horizontal has moved by a certain angle ?r in which case this rotor waveform is going to shift it will shift by an angle ?r and hence look like this so this shift being ?r what we have determined is the flux density waveform for ?r equal to 0 and we need to modify this flux density waveform expression the Fourier series expansion to take into account any angular position of the rotor and that is easily done because what we have determined is a function f of a and as the rotor rotates by a certain angle we have said that this waveform also bodily moves that means we are now looking at a function f of a – ?r and therefore we can write b of a, ?r the two variable function is nothing but b a – ?r which is the same as 8b hat by 2p sigma m equal to 1 to infinity cos 2m – 1 ? sin 2m – 1 now it is a – ?r this whole thing divided by 2m – 1 now this is your flux density waveform and this flux density waveform has to be integrated in order to get the flux linkage from this we need to get flux linkage so the goal is to find out flux linkage in the stator now how to do that let us look at our animation once again so here you see a snapshot of the geometry of the system as the system was rotating this is one particular frame in that what we see in this is that the flux in the machine travels through the rotor crosses the pole phase gets into the stator and comes back so essentially what we have said is in this region of the pole phase the flux density waveform is high and as you travel around here the flux density waveform becomes 0 then beneath this pole phase the flux density waveform acquires the negative value and then here again it is 0 and it is this waveform that we have resolved into Fourier series and therefore we now have a functional description of the flux density waveform as we travel around the circumference inner circumference of the machine as we travel around this and we now have to determine the flux linkage for the coil as shown here this is the coil that is the stator coil which goes into this slot comes out here goes in through this slot comes out on the other side and again around the circumference goes back and comes now how to find the flux linkage flux linkage is found by to find the flux linkage we have to find out flux crossing an area spanned by the coil and what we see here is that this area around the inner circumference what is shown here in green this area is the area through which flux is going to pass from the rotor to the stator you can see here from the rotor to stator this flux is going to pass that has to cut across this area and what we have obtained is the flux density distribution as we travel around the circumference note that the axial length of the machine is not included in that expression which means essentially we are assuming that this flux density distribution is constant along the axis of the machine along this axis in the stator whatever value of flux density you encounter at one point it is the same thing as you travel along the axis but around the circumference we have determined what the distribution is and therefore what we can do in order to determine the flux density distribution is we will consider this is the mid point that is the center of the cylindrical arrangement and we will consider a small segment around the circumference of the machine that small segment let us say subtends an angle that small segment subtends an angle d a so let us call this angle as d a and that d a generates a small arc here and the length of that arc obviously from geometry you would know is r d a is the length of this arc and we will consider an elemental area around this inner circumference of the machine that area around the inner circumference of the machine is taken along this axial length this is the area around the inner circumference of the machine so if the stator length is l then the area along that axis is then given by r d a multiplied by l and we know the flux density at this particular angle a so let us say a equal to 0 is at this point where this coil starts so this is an angle a and at an angle a you consider an elemental movement of d a that subtends an arc equal to r d where r is the radius of the inner surface of the stator and along the stator then you get a length l so this area r d a now this occurs at an angle a and we know the flux density at a given angle a by our Fourier series expansion and therefore the flux passing through this elemental area is given by b of a multiplied by this elemental area due to this flux that is going to cross through this area the stator has a flux linkage which is the number of turns in the stator multiplied by this flux that is passing through so this would then be an elemental flux linkage in the stator so writing this expression down you have an elemental flux linkage in the stator is given by the number of turns multiplied by r into l into b of a d a that is the expression that we have written here if this is the flux linkage due to this elemental area the total flux linkage is then obtained as ? of s equal to integral of this note that we have done this expression for a starting from here at some point a if we want to get the flux linkage note that the coil one end of the coil is in this lot another end of the coil is in this lot and therefore the flux linkage that is going to be the flux that is going to be linking this is obtained as the flux crossing this inner circumferential area which is spanned by this coil and that area is obtained then by a sweeping a from 0 to 180 degrees and therefore this integration can be done as integral 0 to ? d ? s which is nothing but integral 0 to ? of this so which we will now expand further so this is ns r into l b of a we have determined in the earlier expression it is a ? ? ? r really and therefore that is 8b hat by 2 ? these are constants so we can take them out of the integration and ? m equal to 1 to infinity cos of 2m-1 ? by 2m-1 into integral 0 to ? sin of 2m-1 into ?- ? r that is your expression to get the total flux linkage and we need to perform this integration now to get the final expression and this is nothing but ns r into l 8b hat by 2 ? into ? m equal to 1 to infinity cos of 2m-1 into ? by 2m-1 integral of this remember the integration is with respect to a and hence ? r can be considered to be fixed and therefore integral of sin 2m-1 is – of this multiplied by cos of 2m-1 into a – ? r going from 0 to ? there is a denominator 2m-1 which we will take out and put it as square here so let us look at simplifying this expression alone the remaining terms are the same so this expression works out to then cos of 2m-1 into ? – ? r – cos of 2m-1 into – ? r that is the expression so let us simplify this further what you have is cos of 2m-1 p x cos ? r – sin of 2m-1 p x sin ? r that is the familiar cos a – b expansion and then you have – cos of 2m-1 into ? r cos ? r and therefore this is the expression now this part is cos of 2m-1 into ? so cos of an odd multiple of ? is like cos of ? cos of 3 ? cos of ? and so on so all of these are – 1 so this is – 1 sin of an odd multiple of ? is 0 so this term goes to 0 and therefore the term in the square brackets boils down to – 2 cos there is a 2m-1 here so – 2 cos of 2m-1 into ? r and therefore the expression for the flux linkage reduces to ns x r x l x cos of 2m-1 into ? cos of 2m-1 into ? r multiplied by or divided by 2m-1 whole square this whole thing multiplied by 2 that is the expression you get for the flux linkage. So let us simplify this a little by expanding it and we will write the terms individually so what you have is ns x r x l x 8 b hat by ? multiplied by for m equal to 1 what you have is cos ? cos ? r by 1 for m equal to 2 you have cos 3 ? cos 3 ? r by 9 plus cos 5 ? cos 5 ? r by 25 plus so on. So we see that the flux linkage that is arising due to exciting the stator has one term that is a fundamental component has a third harmonic and has a fifth harmonic and so on. We also notice that the third harmonic is attenuated by as 1 over n square that is the third harmonic is 1 over 9 fifth harmonic goes down as 1 over 25 since the nth harmonic goes down as 1 over n square it is normally approximated this expression is normally approximated using the fundamental component alone therefore what we write is ? s is nothing but ns r x l x 8 b hat by ? x cos ? cos ? r alone the others are neglected since they are generally smaller compared to the fundamental and this approximation gives us by enlarge sufficiently accurate answers for machine analysis and therefore this is all that is done b hat is nothing but ns x is the mmf that is there divided by the reluctance which is lg divided by ? 0 x area under the pull phase. So this is flux and then divided by the area is b and therefore b hat is ns is ? 0 by lg and therefore the inductance the mutual inductance the mutual inductance is then given by ? s divided by is which is nothing but ns sorry this is not ns but nr because the excitation is on the rotor so you have nr so ns x nr x r x l x 8 by ? x b hat so that is is x 0 by lg and ? s by is would mean that this is is no longer there so this is then the mutual inductance multiplied by cos ? cos ? r and therefore this term one can call as the peak value of mutual inductance msr hat multiplied by cos ? r so what we have done now is we have found out mutual inductance between stator and rotor we may find out the self inductance of the rotor as well self inductance of rotor winding rotor coil how to find out self inductance again excite the rotor coil inductance is always the flux linkage divided by the excitation exciting amperes so self inductance of the rotor coil lr is then obtained as ? r which is the flux linkage in the rotor divided by the current in the rotor so in order to do this we need to get at the flux linkage that is going to be generated we know that the mmf of mmf generated by the rotor winding generated by rotor winding rotor coil is nr multiplied by is so at this point it would be helpful to go back to our image so what we have here is we are now saying that the rotor coil has been excited as before of course and then the flux is flowing through but what we want to determine is the flux linkage through the rotor itself flux linkage in this coil and this coil and the flux passing through this coil is therefore independent of the rotor angle we if you remember we said that this flux distribution rotates along with the rotor and therefore irrespective of where the rotor is the flux passing through this will always be the same because the entire air gap that is faced by this flux lies here and here that is on this pole phase to stator is one air gap this pole phase to stator is another air gap and irrespective of where the rotor is that air gap is going to remain the same which means that the rotor mmf that is so generated faces a constant air gap irrespective of rotation whether the rotor is in this position or in some other position the air gap is the same and therefore the flux generated does not change much and we also find that the flux is generated primarily in this region there is not much of flux in these regions and therefore the area that is now relevant to look at flux flow is the area that is covered by this pole phase and that pole phase which is lying there. So if we say that the pole phase area let the pole phase area be equal to some a then let the length of air gap equal to LG then the reluctance of air gap is equal to LG by mu 0 x a the total mmf that is acting is number of rotor turns multiplied by the rotor current this is mmf and therefore the flux that is generated is nothing but mmf divided by the reluctance and therefore it is nr x ir divided by LG x mu 0 x a this is your flux that is going to be generated and what is the flux linkage ?r ?r is nothing but number of rotor turns multiplied by the flux linkage and therefore that is nr2 multiplied by ir x mu 0 x a by LG and the inductance in this case it is the self inductance of the rotor winding is nothing but ?r divided by ir which is then given as nr2 mu 0 x a by LG. So this you see that this inductance is independent of rotor angle that is expected because irrespective of the rotor angle the flux linkage does not change why it does not change because the air gap is remaining the same irrespective of the angle at which the rotor is and why is the air gap same irrespective of the angle of the rotor that is because the stator is cylindrical if the stator were not cylindrical then as the rotor rotates the air gap could change from one angle to another so we have determined the self inductance of the rotor winding. So we have now a stator winding we have rotor winding we have determined the mutual inductance between these two we have determined the self inductance of this and we need to determine the self inductance of the stator winding in order to be able to write the full electrical system equations. Now determining this inductance of the stator winding is not very simple the reason is in the case of self inductance of the rotor winding we found that irrespective of the angle of the rotor the flux generated is always the same independent of angle therefore it is easy to determine in the case of MSR when we try to determine the mutual inductance between the stator and the rotor what we did was we excited the rotor and we try to find out the flux density distribution what we found was the wave form of flux density distribution around the air gap is the same irrespective of where the rotor is it is just that the wave form bodily moves but the wave shape remains the same. Now that enables us to describe this flux density wave form in terms of Fourier series and then we were able to arrive at the flux linkages but now in order to determine the self inductance of the stator what we need to do is to find out the flux linkage of the stator for unit excitation on the stator. Now if we excite the stator then depending on where the rotor is you may have less flux or more flux if the angle of the rotor is aligned along the axis of the stator you may get more flux if it is aligned away from that you will get less flux so the flux linkage is not going to be the same in fact the wave shape of the flux density distribution itself will undergo a change as the rotor rotates this makes it a little more difficult to determine the self inductance of the stator winding in the next lecture we will see how this can be handled in order to arrive at an expression for self inductance we will stop now for this lecture.


When God birthed everything into existence and said let there be light, there was the Christ. The divine DNA was infused into all of creation. You are all gods. A divine DNA? What kind of New Age garbage is this? In the Bible, we're taught that yes, we're made in the image of God, but because of our rebellion against Him, we have this thing called a sin nature. That's why we need to be born again. Only through Jesus can we be born again and adopted into God's family. While this man would like to emphasize our power and control, the Bible emphasizes God's power and control and our need to submit to Him. Follow for more.


Two goals in the Total Nursing Force Strategic Plan are to spearhead customer-driven nursing practices that meet customer needs and to build healthy communities. Meeting customer needs means educating customers to become knowledgeable health consumers. Three ways to become knowledgeable consumers are to work in partnership with your health care team, to share in medical decisions and to become skilled at obtaining medical care.  Let's take a few minutes and share some examples that will help you know how to become a knowledgeable health consumer. Children spend a great deal of each day at home where they eat, sleep, and play. For most children, home is where they feel safe, secure, and comfortable, but homes can be harmful to children. Children spend more time close to the ground where many hazards are found, and children will put things into their mouths. Hazards in the home cannot be avoided completely, but you can become knowledgeable health consumers and protect your children from these hazards. First of all, be aware of your children's activities. Know where they are at all times and with what they are playing. Secondly, child-proof your home. Install cabinet safety locks, outlet covers, and toilet seat locks. Store hazardous items in safe places. Third, if a child does swallow something dangerous, bring any and all suspected items with you to the emergency room. Become a knowledgeable health consumer when feeding your children. Those are way too big. Cut those up a lot smaller so we don't... Reduce the risk of choking hazards by cutting foods into very small bite-sized pieces and always stay nearby when children are eating. Know what to do in a choking situation. Learn how to perform child and infant CPR and keep a list of emergency numbers next to your phone. If your child is sick, remember these simple activities to be knowledgeable health consumers and prepare for a visit to the doctor. At the first sign of an illness, observe and record symptoms in a journal to bring with you. No, under his arm? Oh, alright, I leave it there for five minutes. This will help your doctor more accurately diagnose the problem. In your journal, specifically describe each symptom. Be sure to write down anything unusual that might be related to the problem. Keep a list of medications your child is taking. Measure and record temperature and respiration rate. Prepare a list of questions to ask your doctor and write the answers in your journal when you hear them. When you're at the doctor's office, always ask for clarification if you don't understand what he or she is telling you. I'm glad you're able to come out to my house and make a home visit for us. Well, I'm glad I was able to get out here and do that. You are the frontline partner in the medical partnership. Common Sense will let you manage a lot of minor problems on your own. A knowledgeable health consumer will create a self-care plan. Research information and learn all you can about the problem. Keep a journal of all your symptoms and self-care administered, along with any over-the-counter medications taken. So, send your heart attack. How have you been feeling? I'm a little tired. Okay, that's expected. I'm going to go over your medications, Mr. Crane, and we're going to review them. Decide whether home treatment is helping, and if not, set a time to call a health care professional if the problem continues. And always take prescribed medications properly, as directed by your health care official. There may be a tendency for you to stop your medication, but it's very important that you take all of this until the last one. Remember, knowledge is power. To obtain that power, become a knowledgeable health consumer.


We supported the US in employing the Army Tactical Missile System. It is a ballistic missile system inspired from the high-mass multi-rocket launch system. We deployed the system in a C-130 from the East Coast, Shell Water Bay training area, flew it to Delamere, where it then rolled out the back of the C-130 and fired from Delamere 260km to the northwest into the Bradshaw Field Training Area to demonstrate for the first time our ability to undertake what we would call from range to a range long range strike. So the Air Force allows us to load up on their birds, get to where we need to be and to put our high-mars in a position that we can provide the long-range accurate fires and destroy the target. And so the high-mars offers you the long-range capability with speed, accuracy and precision fires. The high-mars is great. It has all these capabilities. But without the team, without the soldiers that I work with, it wouldn't show any of the capabilities that we offer the offer. See the 600 combined force elements operating and supporting that bare-base scene operation that's practicing logistics in its very hardest when they moved all the way from the East Coast from Australia to there. So that's been really great.


Hi, thank you for joining me. I've just driven my larder on its longest ever journey I've just driven from Bucklehamshire to here to Darlington. It's the IFA Club's weekend. We're going to drive all around the north-east and visit a few attractions. So as you can see we have a Trabant, a Walkberg and if I pan around here, we have another Walkberg and Darlington North Road station which is the Head of Steel Museum. So we're going to have a look around here and then we're going to get in the car, drive further north and there'll be a few more videos from this weekend. Lots of lots of Walkbergs, a few more Trabants and maybe another larder. But now let's go and see Head of Steel Museum. We've paid to come in to the Head of Steel Museum so we're going to have a little look around. This is the old Darlington North Road station. Here's the ticket offices. Through here. Now this is where we should see some interesting stuff. Well as we get to here here we have a steam locomotive. But what we're going to do, we'll have a proper look when we get around there. Let's have a look what there is on this side. So if we go in here we'll actually have a look inside the booking office. So that's where it was a moment ago. So you can imagine all the booking clerks sitting here making their bookings and when people would have sent parcels by rail. You can see they had it been kept here. So this shows us what the station would have looked like.  You can't often get them when you go on heritage railways and some miniature railways do them. This is a great local. I'd love to see this running again. Sounds like a train has just pulled into the station because it is still a functioning station. So let's have a quick look at that. It's a way to rush this. But yeah there's a class 156. Let's go and see that. And then we'll do the museum properly. So out here they're going to think I'm running to capture straight but I'm not. So I'm outside now. I don't need to wear a mask. So you can see on the other side of the palisade fence is a class 156. So that will be going to Bishop's Auckland. And through there there's the overall roof of the station. So I'll just let you have a look at that. A little bit like I'm in a prison. Although if it is a prison it's a nice prison. So it's 156 440. I think it's about to go. 156 440 goes on up towards Bishop's Auckland. We're going to have a look around the site. So we will go in there. That's where the steam engines are. We have a look down here though on what was obviously once quite a big island platform. We can see there's a couple of diesel locos there. So we'll go and have a look at them. There's Darlington Railway Preservation Society's building which I don't think is open today. So I'm not sure if it is actually open so ever. So we probably won't be going in there today but we can have a look. So here's some wagons. So if you wanted to access Darlington North Road Station you'd have to come down this path and come up here into the museum. Let's just I think we can go down here. I don't normally go walking off the end of platform ramps onto track. This is a sharp bit of standard gauge track just here. So let's have a look. Here we have two diesel locos. I don't know the identity of these so if anyone does and wants to comment and tell me I'll be very grateful and I can look them up in my book and pick them off. So two little industrial diesel locos and there's some tank wagons over there. I'm going to head back to get on the station platform and we'll go and have a look around the museum. There's one other thing I wanted to show you on this side before we go in so back onto the platform let's go back into the head of steam and see some steam locomotives. In the men's toilets I can't use these ones though because hey I'll just for show you there's a barrier to stop you going in there's some more modern toilets next door but I quite like these urinals see how you effectively do a wee into one basin and you'd all stood around then so this one's like a full circle for six men to use those ones up to three men could use and then there's the other conventional toilets. It reminds me a bit though as I drove up here we stopped at services and there weren't urinals like this but there was a sink like this where you all stood around and washed your hands and all the water went into the same bowl so finishing with the toilets let's go and have a look at some steam locomotives. So there's number 901 which we'll get look up from the other side go around here so this is the old north road station and as we saw earlier trains do still stop here which is quite nice. There's a replica of locomotion the loco that a lot of people do associate with Darlington so we have various other exhibits to have a look at going exhibition room here of children's stories and there's railways such as Tom's tank engine Harry Potter because of course it has railways in it and various other things Paddington Bear has railways in it so it tells you all about children's stories and railways in that room. We have some quite nice modern model northeastern locomotives and here's an old northeastern carriage body from about 1865 so you have a look inside. As in travelling like this windows are quite small and they say modern trains today aren't very comfortable that really doesn't look comfortable. Let's go through here and you have a look at 901 you can actually have a look at the camp so here we have a big northeastern freight locomotive it's an 080 and this is the camp and now we're going to go and see some older locomotives as we walk through the old station hall. There's various other exhibits to have a look at as we go all sorts telling the story of railways Darlington and the area here we have a lave it must have been literally hundreds of laves in Darlington once. Here we have locomotive 1463 so this is a northeastern railing locomotive she was built here at Darlington in 1885 as we can see on the works plate there's a bridge here and we've got there at the moment and have a look down on the locos so there we have a locos kind of got older well locomotion technically is the newest even though it's an old design around 901 we've now got this one and look at this this is a really interesting locos something quite different but showing the story of earlier locomotives it's called Derwent and it's actually got two tenders it's got tender there for water and then it's got tender there for coal so what would have happened is the driver would have stood here see the cylinders driver would have stood here water came from here but the thymine would have been at the front of the locomotive here this is where the coal would have been in this tender and you would have put the coal in through there so that's really quite different and unusual it's not seen locally it's a little bit like a garret although differences with a garret the section that carries the boiler has no wheels and they have a power bogie here and here so with this you've got the two tenders which is like a garret but it's not like a garret in that the wheels are actually on the locos themselves and then here we have a coal wagon more exhibits telling the story of railways in the area but just around here there's quite a nice model railway the trains aren't going but it shows the area so down here this is Sheldon so this is the old Stockton to Darlington railway see locomotives similar to locomotion this then there's an incline which would have been a rope worked incline we're now going to make a way along the railway having a look at things as we go so there's a double track section some trains would have still been horse and gravity so if you look here you can see a horse pulling a guard van up the hill and that train there looks like it's ride going down the hill and just at the back there is a horse enjoying the ride down before working hard up again here this is the site of where we are today the site of the present north road station with a similar locomotive to what we saw over there going past and there's the school and bridge or school and bridge which is just up the road or what the railways should say from here still there still carrying trains two trains passing so it's quite an impressive little more railways there's another horsework train and then here is Stockton Key where all the cold it was brought down would have been transferred to barges probably on the river Tees I would have thought I think it's river Tees I'm not entirely sure if you know do comment and tell me what I'm going to do now though I've promised I've got here didn't I and we'll go outside have a little look around see which other cars are still here might be one or two other things to show you now I've got a carry-on driving north so let's go up over the bridge there's the Stainmore Summit marker post so that line unfortunately is closed but that would have told you Stainmore Summit I believe it was the highest railway in England possibly Britain 1,370 feet above sea level which is really nice big old wooden bridge wide the stairs are quite steep from here we get a nice view of the steam locals really going right up into the loft of the building so once you go up here you don't actually get such a good view of the locals but you get a perfect view of the loft of the building I'm not going to go outside and we'll see what's going on out the front I enjoyed my visit to head of steam museum some interesting locals in there now as for my larder it has been joined by a few more eastern block cars we have a lineup of trebants so that's quite exciting so these trebants are going to be taken part in the north east weekend which the IFA club is holding around the northeast finger so we're going to drive all around northeast of England over the next couple of days hopefully there'll be more videos from that but there you go here's a nice lineup of trebants the white one and the third one in there the four-stroke one the bright yellow one that's a two-stroke one and then these two blue trebants they're both two strokes and the warburg onion in the middle is my larder so I'm going to get in my larder we're going to drive north thank you very much for watching please do feel free to like subscribe and comment do come and visit the head of steam museum in Darlington from just outside in their car park which has had a bit of an eastern block invasion thank you very much for watching goodbye


The MCU has been a bit of a disaster lately, and by lately I mean everything since Endgame pretty much, but Ant-Man 3 is here to save the day. First thing I want to point out about this trailer is it starts with a cityscape. 90% of movie trailers start with cityscapes. That's just what you do, I guess. Still not making me any wetter in my swimsuit area. Here's the deal. These movies all look like entire green screen productions. They should be able to give me something a little bit more realistic. I understand they're going into the quantum realm, it's all fairy dust and pixie sticks, but at least make some of them out of practical things. Instead, I'm looking at Michelle Pfeiffer and friends on a hoverboard going down the side of a mountain. Nothing looks remotely real.  That, that kind of tickled my fancy. Modak is in this. M-O-D-O-K, I think that's how you pronounce it.