Mae'r adŵr. Dwi'n credu'r adŵr i'w rhun oherwyddGrath drwy'r adŵr? Mae yma yn ei gwasanaeth sydd o'r adŵr? Felly, dwi'n credu'r adŵr. Ac ydw i, dyfnodd ychydig i wedi gydag. Rhaid i chi'n credu'r adŵr. Mae'r Adŵr. Ac rwy'n dechrau i'n teimlo i'r 300 o'r cyf würdenol ffaith yr עthoedd. Mae'r swyddo ar welnodos llwyth yn ei dyn stands. Er yw hipud i'n tymnu Ambu North. New bamboo is a rails consultancy down in London and I'm now heading up the development of Pusher. So at New bamboo over the last year or so we've been working on quite a few product ideas and two products have really come out of that work. They're both cloud based services they've been interesting challenges to work on in lots of interesting problems and those are the kind of problems I want to talk to you about today. So the first product that came out was Panda. Panda is a hosted video encoding service and then Pusher which I'm now leading is a hosted real time messaging system and you'll notice that we're quite proud of our new domain name. All of the three stories I'd like to talk about today are all about event machine and also about Redis. Just before I start I'd like to get an idea of who here has used Redis. Okay that's brilliant. Practically everybody has used Redis. Redis is awesome. I'm sure you know that already. So what is Redis? Obviously you know that. It's an advanced key value store that's what it says on the website. So you store data in it right? That's what it's for. Well we actually only use Redis to store data in a very few little places. It's like storing API keys for really fast lookup. Things like that. But then actually Redis is also described as an advanced data structure server. I think that's getting a bit closer to it. I was talking to a colleague of mine and he really said it's kind of like a grab bag of algorithms and super fast in memory structures and you can kind of just in an emergency you can just go in and get some great tools that will help you solve your problem. And I think that's what I'd like to concentrate on today. Some maybe non-studded use cases. Specific solutions to problems we had. So three stories as I said. The first story is about auto assigning roles to processes. The second is about asynchronous communication between processes and the third is about synchronising state in your system. So let's get started. So this is about pusher. First I'd like to tell you just a little bit about the basic architecture of pusher. Because that'll make things easier. So at its very core the idea of pusher is to make it super easy to send messages from your server to web browsers. And so we've got two components kind of on the left side we've got the API. It's a little dark kind of standard. You send messages to it via a REST API. They get sent to a message bus in the middle and then those messages then get sent to a socket servers and those servers maintain persistent connections with large numbers of browsers. So in the system there are lots of operations happening all the time. There's hundreds of people connecting and disconnecting and sending messages up the pipe, sending messages down the pipe. And the important thing for us is to be able to measure what's happening and to have an idea of the usage of the system. That's very important because the billing information is based on that. So we build based on message volume and that kind of thing. And also it means that we can give our users very nice analytics. And that's actually very useful because when all your clients are connecting these persistent connections with your service you get a lot of real-time information that you can use very easily. We want to collect these statistics. And Reddit seems like a great place to store statistics. It's non-blocking. We can really, really quickly store the statistics. We can use incrementers to update values atomically. That's great, but that's not really what I want to talk to you about. What I really want to talk about is how we store those statistics in the long term. So Reddit is great for storing things right here right now and getting them out of your process really fast without blocking any operations. But really we'd like to store that data in a database so that we can archive it and we can query it however way we want to. So the question is really how does the data get from Reddit to SQL? Well it doesn't really matter who sends that data. It's not a really difficult job. It's not a job that has to happen super-super-quickly. It's just kind of a background process. We need to read some data from Reddit and write it into the database. But what we don't want is that multiple processes are doing this at the same time because then in our code we have to write lots of locking code and it gets really ugly and what if we read data from Reddit at the same time and try and push it into the database. We don't want to do that. So it should be a single process that does this. But we should be isolated from failure. We don't want this process dying and then suddenly there are no statistics for several days. What are we going to do? And ideally I don't really want to configure it because if I have to configure it it will go wrong and if it fails then I have to change the configuration and that's going to be a real pain. So we're kind of inspired here by something that Netflix put out and they wrote a blog post about this thing they've got called Chaos Monkey and Chaos Monkey just sits in their AWS cloud and it just randomly goes and terminates instances and terminates services and I think that's a great way of thinking about it. If you want to survive failure the best way to avoid failure is to fail constantly and that's what they said. And so how do we solve this problem? So the inspiration for this really came from the Chubby paper that Google put out. So they use it as a lock service so that they can do some of these same kinds of problems. So they had lots of different they have obviously huge distributed systems at Google right. And one of the quotes from the paper is they said before Chubby most distributed systems used ad hoc methods for primary election or required operator intervention in case of failure. So they were having to write this ad hoc code all the time that allowed instances in a distributed system to elect a master process. So the master process is responsible for some key operations. And there's some papers on this. Paxos the protocol if you've read that is kind of the most commonly used. But one of the interesting things that Google says in the Chubby paper is that it's actually they decided not to use a kind of distributed process, a distributed consensus protocol for defining the master. They said actually it's just easier to use a lock. So it's a central process. And so we thought well if a central lock is good enough for Google it's going to be good enough for us. So obviously the central lock in Chubby is resilient to failure right. They've got I think they say that they have five kind of slaves or five Chubby processes communicating and at least those must be up in order for the service to be up. But it means that they don't have to worry about consensus in their actual processes to define who the master process is. They can simply query this lock and the lock will tell them and the lock will say yes you have the lock you can do this job. So what we thought is I thought this is great. I bet I could build this in Redis. So the simplest way to build a lock in Redis is to use the setNX operations. I'm going to use this style. Can you read this text actually? Is it okay? Okay good. I'm going to use this style. I'm sorry about the dollar marks at the front. It's something to do with show off. It will only give me these nice kind of command line prompts if I use dollars. So setNX basically says set this key if it doesn't already exist. So nobody has the lock right now. I'd like to assign myself the lock and I'm going to the value there is a time stamp. So that seems to be a usual way of doing things. That will reply with either a 1 if the operation succeeded or a 0 if the operation failed. So returns 1. We've got the lock. Great. When I go away, when I want to shut down, I can delete the lock that returns okay. That's fine. Some other process can come along and claim the lock. If another process tries to claim the lock at the same time, then it returns 0. It didn't get the lock. Okay, you're getting the picture. But obviously there's an issue here. If there are multiple processes, some processes might just die without cleaning up the state and there's a lock there that hasn't been cleaned up. The algorithm that I'm going to describe is described actually in the Redis documentation for setNX. The idea is that we start off as before. We attempt to acquire the lock, but that fails. So we say, well, maybe a process died and didn't clean up its state. So the lock contains a time stamp and that is the expiry time of the lock. Whatever the process that originally set the lock defined as the expiry time. So I can fetch that value. Fetch T1 and check whether T1 is in the past or if it's in the future. If it's in the future, then okay, somebody else has the lock. That's fine. We'll stop. If it's in the past, we'll say okay, we're going to try and acquire a lock ourselves. So we'll define a new expiry time, T2, which is, for example, right now plus five minutes, something like that. And then what gets set does, it's one of these nice atomic operations within Redis, which allows you to get a key and return the value that key previously held at the same time. And so in this case it returns T1, the old value of the lock, and we can compare it with the value that we got previously and say, well, okay, that time stamp hasn't changed, therefore nobody else tried to acquire the lock at the same time. And so to see how that kind of works, if another process does the same thing, when they call get set at the bottom right, they'll get the new time stamp T2 in response, which means that basically they failed to acquire the lock. So that's basically the algorithm we've worked. You were used and it works great. The new version of Redis actually has a very nice feature which I'd like to talk about which is a little bit on the side, which are transactions. So in the previous slide it's kind of a kind of a pain. The code ends up looking a little bit messy because you can actually clean it up a lot using transactions. So there's actually still quite a lot of commands, but the idea here is really that we start in the same way as previously, we call set an axe, if we return one and we got the lock, otherwise we return zero. And then what we'd like to do really is we'd like to Redis uses the style of locking called optimistic locking rather than kind of pessimistic locking which is maybe more common which says that rather than locking the value of the lock, sorry about that, rather than creating a lock and then saying okay nobody else can change that data because it's mine.  If it didn't change then that's fine, then everything's consistent and you can process those commands atomically. So the idea here is called watch. Watch is the lock and then we call get. If we get an old time stamp we call multi, this starts the atomic block of operations and we set a new key a new t2 expiry time and we call exec. Exec will either fail or succeed depending on whether that lock was modified by another process or not. It's actually maybe a little bit simpler to look at the commands. So this is as before when we watch it says okay you're watching, fine go get, that returns, we're not in a multi exact block yet, then we call multi. So all further commands instead of being executed right now, they just get queued up by Redis for execution at future points in time and then we call exec and they get executed and you can do really quite interesting things with this. You can watch one or more keys and you can execute many transactions within the multi exact block. So you can really create a really nice kind of atomic mechanism for yourself. So I think it's time to look at some Ruby. So we're going to do this right? No, event machine callbacks, okay. Who was in the talk yesterday by Matthias? Okay that's really great. I was hoping that practically everyone would have gone to that talk because it was great and it means I don't have to explain a whole load of stuff. So right, we're using event machine, how are we going to do this? There are at least two event machine Redis clients. I wrote EM high Redis because I wasn't really happy with the old EM Redis gem. Ask me later if you want to know why. I'm going to use it for the duration purely because I know it and it's fairly similar in terms of interface. So I'm going to skip a whole load of the kind of boilerplate code in these slides but basic idea with event machine is you always run things inside a reactor loop. If I haven't defined a connection that is an instance of EM high Redis client and it's got the kind of callback style that you'd expect in an event machine you call get, you call any Redis operation against a key and it returns a value for you asynchronously. Optionally you can provide callback and errorback blocks to Redis.get or any other operation in fact because it returns a deferable which allows you to bind to success and failure separately if that's useful for you. So what's the interface that we'd like? This is something I'd quite like to talk about a little bit today. I think Matias mentioned yesterday, often event machine gets a bad name and node and other such frameworks because you get all these callbacks right? It's all these callbacks and that's a problem to some people. But what I'd like to say is actually you don't really need to have you can kind of abstract the callbacks away from your main code in most cases and so the kind of interface that I'd like for a lock is something like this I say okay I'm going to create a new lock I'm going to find the key, it's called my lock and 60 which is the timeout so I'm going to set my timeout value 60 seconds in the future which means when I acquire this lock I would have it for 60 seconds. And then what I'd like to do is I'd like to basically callback if I managed to acquire the lock successfully or if the lock didn't acquire then I'd like to get an errorback. So rather than worrying about the kind of complexities of the operations that are actually happening in this redis I'd like to just get these kind of simple callbacks and errorbacks. And this is quite a common style in Event Machine is to rather than returning true or failure or returning true or raising an exception return an object that completes or fails sometime in the future. So this is the code that this is the kind of core bit of the code for the redis lock. This is the algorithm we were talking about earlier. Sorry about the amount of code it's just like that. As you can see it kind of nested lots of callbacks kind of horrible but the point is we don't have to worry about that in our actual interface. That's good. We're calling get, we're checking the expiry time if it's in the past, we're calling get set and then we're looking at the value returned by get set and then depending on that we're either acquiring the lock or failing to acquire the lock. What I've done here as well is you'll notice that inside the redis lock class I'm including EM deferable which is one way you can use an Event Machine of making an instance have this property of failing or succeeding sometime in the future. So if we look at the code we're basically attaching a callback and an errorback to the lock itself. So just kind of two thirds of the way down we're calling fail. So that's the, that will basically end up triggering the errorback block. And then in our lock acquired method there we've got a call to succeed at the bottom and that will end up, that will call the callback. Another thing that's quite common is rather than kind of making a whole class deferable itself, just return a deferable from a method call. And so the unlock method I implemented happened to work like that. So Event Machine comes with this thing called a default deferable which is kind of just a really simple class that mixes in deferable and I end up doing this quite a lot at the start of the method definition just define a new deferable object doesn't have any logic doesn't know anything about the problem is just a thing that can accept callbacks and errorback functions.  And so we can return that deferable to our calling method and then attach a callback and an errorback function and then when those deferables fail or succeed those callbacks get called. It's not an ideal interface because what I was talking about at the start was that I'd like to kind of be able to elect a master process effectively. I'd like to say okay this process is going to be in charge of this operation and ideally I would like to do that kind of at the start of the lifetime of a process and it could just say okay am I the master or not and periodically it could check, you know, do I need to become the master has another node failed. I don't really want to be acquiring and then losing the lock and all this stuff all the time and we want to keep the expiry time for lock fairly short, you know, 60 seconds something like that because if one of these processes fail we'd like that lock to expire and for that role to be taken over by another process relatively quickly. And so we ended up kind of wrapping up that code again and again kind of bundling up a whole load of callbacks inside a nice object that we could use which I called a persistent lock. We gave the persistent lock a timeout which is the timeout for the underlying lock and then also a kind of polling interval between successive attempts to acquire a lock and then we get a very simple interface really unlocked and that's another common pattern you'll see in a lot of event machine code is your if a deferrable object is not kind of suitable for whatever reason you'll find people kind of attaching on event handlers kind of very similar to a kind of JavaScript way of doing things. So in our codes you know we're interested in you know being this process that can synchronise locks sorry synchronise statistics to from Redis to MySQL. You know we can just write this code and and just really simply we get a call back fired if we're the master process and then when we fail to be the master process we get another call. So I think this is actually what makes this code really understandable actually and in many ways event machine gives you a very elegant abstraction actually. It allows you to write these kind of this kind of code that's as long as you kind of have abstracted away the complexity with a simple interface. You can look at the code and really simply understand what's going on and we end up using this for quite a few different tasks within Pusher and it works really great. One of the big advantages is that as I said it means we're tolerant to failure. Rather than having to worry about stopping instances, stopping nodes it's really just kind of it's just easy you don't have to worry about was this process responsible for that task do I need to maybe not stop it maybe I should kind of stop that cleanly first or what have you. You can just kind of boot up on that instance, kill one of the old instances and things just kind of work and it's a lot more resilient. So the next story is about asynchronous communication between processes and this is in the context of Panda. So Panda as I said before it's a hosted video encoding service. People send videos, upload videos to Panda and those videos are encoded and then they're stored on S3 and it provides you a lot of callback functions webhooks when those different events happen or that kind of thing. So obviously one of the core concerns in Panda is to be able to encode videos. So we obviously have a huge number of Pandas that sit around encoding videos. It's kind of obvious. So we'll call those encoders from now on. Now the way we price Panda and sell it is we give people virtual encoders. Virtual Pandas if you will. So I've given a customer maybe purchases five virtual encoders. What that means is that if they have five or more videos in their queue to encode they end up encoding exactly five videos. It means that we don't end up provisioning a whole lot of resources for users that are not currently requiring to process any videos. We just have to make sure that in our system we've got sufficient resources so that we can always satisfy the demand for actual encoders at any given point in time. So this is kind of what I'm describing. So we've got maybe a user a red user and the red user has a encoding capacity of three. So we've got three of these encoders down on the right-hand side. Three of those are active. Say the blue user has an encoding capacity of two but they've only got one video right now encoding they've got nothing in their queue and so this kind of thing. What we'd like is that when any one of these jobs completes, we've finished encoding a video we'd like to automatically assign a new job for that user if they have space in their allocation of encoders and when a new job arrives in the system we'd like to immediately push that into one of the available encoders. So in many ways this problem is kind of a classic kind of queuing problem right and in many ways you would solve this by using delayed job or Beanstalk or a library like that. You just have a queue of work that has to happen and you're going to do it as and when you have resources. But Panda is a little bit different as I've described in that you end up queuing especially having a queue for every user and it's not always necessarily trivial to determine which encoder should take on which job next. Initially we did this with a whole lot of database logic in each encoder but that was kind of a horrible solution because the complexity of this just kept getting bigger and bigger and we wanted to optimise the placement of encodings in the system and you end up putting a load of logic in all your encoders and they have to kind of pull the database so it's not a push base model and just as you scale the number of encoders it just kind of gets unmanageable. So what we do like to do is have a kind of a way of kind of pushing those jobs which is why we introduced this single manager process. So the manager process has a knowledge of all of the queues for all of the users what jobs you're raising and it has a knowledge of all of the different encoders in the system who's encoding what videos for which clients and which encoders are free and we also like to be able to boot up a new encoding instances and have all of those kind of encoders just automatically available and not have to kind of configure anything. The manager should just automatically be aware of what's available. And so we wanted to have this kind of asynchronous communication between the manager and all of the different coders in the system. So the manager could ask an encoder what's your status and they should reply well I'm busy or I'm doing something else. They should be able to say I've completed the video, all this kind of thing. Synchronous communication is kind of a bad idea in this context because encoding a video is kind of a blocking operation and they're not going to respond very quickly and you don't know where they are even if you did and so having an asynchronous method just works so much better. So the way we did this is we solved it using Redis lists. So Redis lists very quickly. They are extremely cheap and they have a lot of operations for pushing and popping onto a list. So we can push an item onto a list we can pop that item off the list again if we try to pop an item on the list that's already empty which turns nil. We can also do these kind of blocking pop operations and what this means is that you don't have anything to keep kind of popping all the time and saying is there anything new on the list? Is there a new communication for me yet? You don't have to do that. You can just kind of blocking pop and you will receive a call you'll be notified when something arrives on that list. So this is the kind of Ruby interface, BR pop operation and in this case we end up returning nil which is what Redis returns if it kind of timed out. So if it timed out it was a time out otherwise we got a value. So same as before getting rid of the callbacks what do we do? So we need an object to handle this. We call it a post box. Every process has a post box. What's the really nice interface for this? I've got a post box and all I want to know is a process is when am I going to get a message. Under the hood we'll use blocking pop. So it means when I send a message to a user that process is immediately notified of that. This is just kind of the boilerplate code for that class. It allows us to attach an on message callback and it allows us to send a message just by doing an L push onto a list. This is the listen method which as you can see does the blocking write to pop operation to see whether it was a time out. In all cases it ends up calling itself again in the callback after it completes so this kind of this listen call just kind of endlessly circulates. I would probably want to have some method of telling this class to stop at some point but I kind of skipped over that. But again, maybe this API is still not really perfect. All this allows us to do is to attach an on message handler but maybe I have different parts of my code base that are responsible for different operations. One part of the code base is responsible for receiving new jobs that require work. Maybe another part of the code is responsible for handling job complete calls from encoders. Again, just kind of shape the API to fit the problem. In Panda we ended up with an interface something like this. We led to create a post box for a process so this is the manager process we create a new post box for it and then we can just kind of register for these kind of different callbacks that we're interested in. So we say well you know new encoder do something so one class in the system maybe registers for this call and in another part of the code base we register for the job complete and then the encoder things look basically the same. So the advantage of this was the manager gave us a very clear global view of the system. The asynchronous communication within Redis worked really great and the system ended up being very resilient to failure. Encoders could fail in the middle of processing job because we were querying their status we'd find out oh this encoder's vanished okay we'll reschedule that job for someone else and actually we're even resilient to manager failure because all that communication to the manager goes over Redis lists and so if the manager for some reason fails we can just boot it up again and all of those that mailbox is stored in Redis and it can retrieve all the new events that happened in the system and process them accordingly. Zero configuration scaling okay how am I doing for time okay so last story really really quickly this is actually a really fun one so hopefully we'll get through it so this is about synchronising shared state we have this feature called the debug console and the debug console allows you to log into your account click on the debug console and see all the events that are happening in your system so you'll see that users are connecting, they're disconnecting, they're subscribing to channels, unsubscribing to channels they're sending messages, messages that have been delivered all this kind of thing so this is extremely useful for people especially when they're developing their applications they can just something's not happening they're working the way they expect and see exactly what's going on. The problem is that they're kind of supporting this for a busy application there could be hundreds of thousands, tens of thousands of operations per second happening in the system and so exposing all of this data is just a shed load of information to push over the message bus and so really what we'd like to know is which users have a debug console open right now because there's a whole load of extra work I'd like I need to do in the case that they have that open so maybe the simplest way to think about this is well let's just use a set right so we have a set in Redis, really really cheap O1 adding, removing and querying to see whether an element is a member of a set. The problem with using a set is that okay a user and they have multiple debug consoles open, multiple tabs in their window then when one of those closes you need to know whether that was the last one right and so you can't just remove from a set at that point because maybe they already had one open so the solution to that is to use sorted sets. A sorted set is very simply it's a set where every element has a score associated to it and it allows very cheap kind of range queries by score by index and that kind of thing. I'm running out of time so I'm going to kind of skip over this really quickly. Basically we can query the score of an element so we can query app ID 42, it's nil, okay that means it's not even in the set, okay so that means the debug console is not open. When someone opens the debug console we can call Z increment by one that returns one, that's the new score of that element, that means somebody has their debug console open, okay we can query that, we can get ranges, see all the elements that have at least one, all the apps that have at least one debug console open and then we can kind of keep incrementing and decrementing and you get the idea, okay so the question is how do we know if a debug console is open? So we have this kind of distributed system, API processes, socket server processes and they're all kind of doing work and they're all receiving subscriptions and unsubscriptions and they'd kind of like to know whether they need to tell kind of broadcast that information to the debug console so I broadcast that information to the message bus so that people can kind of view it. So we could definitely do this by calling Z score which is a really nice atomic operation, tells us in a cheap way whether that constant time way whether the console is open or not, however we end up doing that a lot so we solved the problem using the atomic operations to have a kind of consistent view of whether the application has a debug console open or not but we kind of haven't really solved the problem entirely. So really what we'd like to do is to be able to push that change instead of each process requesting that over and over and over again we'd just like to tell them ok it changed. And let us come to the rescue again let us pub sub is really really great it's really performant, it's really simple to solve problems really nicely. The idea here is that if you're interested in the fact that the set of debug consoles open changed then you can just subscribe to that and so pub sub allows us to really easily decouple the system. We can just say when the set changes we can publish a notification and then any process that's interested in that event can very easily subscribe. So again skipping quickly over the interface we can call subscribe against a channel and that returns a result well it returns a subscription result we can subscribe again if we want to do. We can publish publish to that channel, the foobar message that ends up telling us how many subscriptions received, how many subscribers there were that received that message which can be quite useful. And then what happens is when you call subscribe that redis process blocks and can no longer use it as a normal communications channel but that just basically receives messages whenever they arrive in the system ok so the interface for EM high redis is very simple, you just subscribe, you can keep subscribing and subscribing on the same connection as many times as you like and then you just receive a message whenever a message is sent to the pub sub channel and you get the channel and the message ok skip that and so this is what we want to do we want to publish when it's open or closed and so we can do this because of the fact that the incremental operations in redis return the new value of that, the new score of that value, we can really easily anatomically which is important when a new console is opened we can increment by one and then the new score is returned to us, if that score is one it means that previously it was definitely zero and so this is new, the set changed, we can publish that event exactly the same on close, if the new score is zero that means we're closed and this means that what we'd like to do is we'd like to update an in memory list so rather than querying redis all the time if we're interested as a process in the fact that that list changed we can just subscribe to that event so we can say subscribe and then when we get that a message on that channel we can just say ok give me all of the consoles that have score between one and infinity and we'll store that in an array in memory and we can just query that kind of almost free and so to wrap up the atomic operations were extremely useful for this meant that we could have this distributed state in the system and have it change that distributed state atomically which is important so that we could publish those events the PubSub just made it really easy to propagate that state across the system and made sure that we could de-couple the components if a new process arrives and we need to write a new process that cares about the state of those debug consoles we can use this and we've used this for a lot of different data in the system not just this debug consoles it's been a really flexible tool so just that's perfect timing thanks for coming have you got any questions no don't block the event loop there's nothing wrong with it for doing message passing well you end up with basically one connection if you're doing subscriptions you can subscribe to multiple channels over the same redis connection so you can keep calling subscribe and unsubscribe and changing your subscriptions in real time you can usually end up with one connection which is blocking on some operation and then one connection which you are using to send other messages right that's a good question so redis has a very nice feature for slaving so I can boot up a new instance of redis and slave off another instance so we end up having at least one slave for the data and then all of the operations are sent to that slave as they happen and so it's kind of always kept up to date and then you can do a certain well if you want to you can build a kind of auto failover system in that yep we haven't we could have done that especially for the statistics we could have used expires we ended up and as I said we're kind of storing it transiently in redis so we're actually only storing it for about five minutes and then we're flushing it to the database so that we can give people near real time statistics yes that could probably work that is fairly new anything else okay great thanks very much


Yeah, it might have been down here. Yeah, it got early. Yeah, it got early. Yeah, it got early. Third time. I'm done. Yeah. Yeah, so like I said, the first one's going to be some memorization, so just give you tons of on ropes, so you go down, touch the ground, we'll bring you off, we'll do that with a couple of guides, and then we'll actually get into taking that trip. Let's make sure that that's set up exactly like this. I sit with the left, so make sure that he doesn't swing the back end when Doc and I... Rescue, are you ready with the victim? Ready! Jerk.


The ego is a belief that there is no God, or the ego is a belief that love is impossible. So it's kind of like when you see it, when there's an eclipse and the moon just kind of disappears. The brightness of the moon isn't behind a planet or there's an eclipse that occurs where the light is blocked out. It's really the ego is like a blinder to the light that's already there. And so the ego doesn't have a real existence, it doesn't have a source, it doesn't have a creator and therefore it never was created. The way Jesus says in the Course, he says, you made the ego, he doesn't say creator, he says you made the ego by believing in it and you can dispel it by withdrawing your belief from it. So it's like a line spot, it's like a figment of imagination and it's literally behind a big bang that seems to be this cosmic explosion that seems to be time and space. The ego is the big bang and there is a light behind this veil of separation that we could call God. And in order to experience that, we have to let go of our investment in our mind energy being given over to the ego belief. So in the back of the Course, in the clarification of terms, Jesus says, ego will ask many questions that this Course has no answer for. How did the impossible happen? To whom did the impossible happen? And many other forms. And he says, there is no answer, he's meaning like there is a theological answer or no conceptual answer. But he does say an experience will come to end your doubting and to really seek for that experience. So that's why when you're working with the Course, it's so important to keep in mind that you're going for an experience. You're not going for another theological system or another set of concepts. You're actually going to be carried beyond the theology of the Course, beyond the concepts into an actual living experience. So that's one of those trick questions that's best to say, okay, I'll step back on that one for a while and just ask the question. Because I just think the ego itself says, oh well, God, this must be all unintended consequences. We're all suffering from various expressions. He didn't mean us to do it, we've done it towards ourselves. But that sends you around in all kinds of circles. Yeah, there's a line in the Course that says, I have done this thing and it is this, not what I'm doing. So just like in 12-step programs, the mission that there's a problem is essential. If an alcoholic stays in denial, then there's no healing. And similarly, I've said many times, like the Course of Miracles groups, you could kind of go around and instead of saying, hi, my name's So-and-So and I'm an alcoholic, you could say, hi, my name's So-and-So and I have a perceptual problem. Because even in that sense, it takes an admission that you have to have an admission and you have a perceptual problem before the Course can work for you. As long as you remain riveted and got relationship problems and finance problems and health problems and sexual problems and on and on and on, then the problems have been defined inside of the dream world. And the dreaming is completely forgotten. It seems like there's all these separate problems, many problems, and there's no solution at that level. But once you start to go back deeper and get in touch with that belief and separation, which is a core, is the error, then you can have it solved. And that's why people pray. That's why they meditate. That's why all the spiritual traditions talk about going inside the Kingdom of Heaven is within. They all send us in. It's not in our bodies. So we have to even learn what that end means.  It's quite guarded. I've seen a couple of people expressing everything in my life seems okay, except there's one person in this one situation and that just brings up so much in terms of anger. The trigger. That's the trigger we have. It seems frustrating and you can see we have so many aspects of your life going on and there's this trigger that even stands out even more because of what seems to be a fairly stabilized life. The trigger is there. And it's like a trigger that's saying you haven't gone back inside your mind far enough or deep enough because the triggers will keep reoccurring in form as long as we haven't got inside, we haven't got beneath or underneath the ego. So when we talk about unplugging from the ego, we talk about completely unplugging. That's another thing that's like, oh no, my life's too busy. I can't completely unplug. I'll give you 10 minutes a day or 45 minutes a day. I can squeeze you in there into my calendar. And God's like, that approach is not going to work. We have to be ready for, I think the phrase was in some of you might have seen Tom Cruise's movie, Vanilla Sky, a revolution of the mind. You have to be ready for a total revolution of the mind. That means if everything's been upside down, everything has to be turned right side up. And we just have the willingness to allow that process. I'm going to feel however I feel. It's going to look however it's going to look. It's like healing. I have a desire for healing and to say to the Holy Spirit, and I don't care what it seems to cost or I don't care what it takes. Okay, I'm going to go for the healing. And then that tends to stir things up in a major way. We were talking yesterday and Suzanne was feeling maybe about a year ago or a year and a half ago that it was like, I could die. It's almost like if you have to have that in the context of healing, okay, I want healing and I want healing no matter what.  Yeah, I could die to my old perception of myself. I literally, you know, that's part of the same Francis prayer, you know, to die when you're born again. In reality, you know, it's just a re-translation and it's a reorientation of your mind toward God and towards your true identity. So nothing's really dying and nothing's ever really lost, but there's a reinterpretation that has to occur and the ego is dead set against that reinterpretation. Because if you allow your mind that reinterpretation, you will accept the Holy Spirit and the ego is no more. You know, there's no ego that continues on after that reinterpretation. There's a part in the Course where it says you will believe this Course entirely or not at all. So I think anyone who gets into authentic spirituality needs to be aware of how important that line is. It's not like, okay, I'll go and I'll make it 80% or 90%. There's really a sense of funality. There's a sense of it being completely non-compromising in a glorious way, in order to have total joy, peace, freedom, love. That means you cannot be willing to compromise with the ego. And sometimes people will say, how do I defeat the ego? The ego loves it when the mind puts it into a contest, you know, or like a war.  It's going to pay for what it's put me through and I'm going to crucify the good. And the ego is like sitting there, good. Love with fights. Nothing more wonderful than a fight. Because the ego is the belief in competition. It is the belief in war. With all the wars we've had throughout human history and it's interesting that Jesus says, the war against yourself is almost over now. We're able to come here to this center in Crow's Nest and talk about exposing the ego and royally exposing it. I mean, really exposing it. That's a wonderful acknowledgement to our mind that the war against ourselves is almost over now. In fact, some of you might remember John Lennon and Yoko. Oh no, back in the day, they rented, they spent tens of thousands of dollars to rent billboards all over the place. A lot of them were in New York City, but all over. In giant, bold, black letters, war is over. And then in small letters, if you want it. And that was the course of miracles. They were spending all these tens of thousands of dollars to publish the course of miracles teachings on these billboards. Now war is over if you want it.  It's just our desire for peace is growing strong. We're outgrowing the religions now. We're outgrowing the theologies. Even the techniques, the formulas, in the end it's our desire for peace that will bring it back into awareness. There's not going to be any formula or theology. Even the theology of the course of miracles has to be grown and transcended because it's speaking as if there's linear time. It's speaking as if we're dealing with bodies and private minds and private thoughts. And most of the course is written right at that level. And yet it's a beginning and not an end, like the workbook says. This is a beginning and not an end. If you get through the workbook, that's what's going to be waiting for you. Henceforth, listen to the voice of God within your mind and it will direct all subsequent lessons. It can actually reach a point where we have to practice it and really fully apply it without exception. And the words and the lessons and everything, they were like the trampoline. It gets you springing and bouncing a little bit. But they're not meant to forever bounce on trampoline. They're meant to spring and spring and really take the leap and go for it. And that's what makes all the difference in the end. And we're here to encourage each other with those leaps.


We are to take care of one another That's what we're to do. I think sometimes we're forgetting that we have become so As a culture we've become so narcissistic So me centered everything has to be pleasing to me that we forget that we were not saved to serve God by ourselves We were saved to serve God with a family a family of believers We're to be united in spirit and in heart and desire and purpose where to be united in that way And we're to care for one another We're to love one another We're to lay down our lives for one another when necessary and that's something that we read about in the Bible But that's something that's practical and very true We we die to ourselves so we may help somebody else to to succeed to live to grow and and that's what? But that's what believers are supposed to do and the enemy does everything He can to sow seeds of discord amongst the body of Christ because if the unit fights within itself It can't defeat the enemy


We have been doing propeller theories, we did some propeller fundamentals and we tried to understand how the propeller actually creates thrust. In the process of creating thrust, the propellers need to be supplied with power for which of course, you need an engine which could be a piston engine or a gas turbine engine or any other engine, any other device that produces power and propellers main job is to make use of that power and create thrust for flying an aircraft. Typically the propellers are made up of three or more number of blades, number of blades could be even two and these blades are made up of aerofoil sections which put together create the blade shape and these blades when in rotation in a pre-determined manner help producing thrust. In the last class, we did a theory of propellers in which we looked at propellers as an actuator disk which means physically and mathematically the propeller was replaced by an actuator disk and this actuator disk essentially is modeled to be a thrust creator or energizer which then produces the thrust. So, this is what we did in the last class, of course we have been introduced to the fact that propellers are made up of aerofoil sections, we had a look at one or two of these aerofoil sections. Today, we shall look at a propeller theory which again makes use of the propeller aerofoil sections and the proper propeller blade shapes and how this theory then uses the aerofoil sections to actually create thrust and how this thrust is determined with the help of simple mathematical formulations and as a result of which the designer can make use of this theory to design a propeller and then of course create a model for prediction of the propeller performance. We shall see how the prediction of the propeller performance is actually created which are called propeller characteristics and these characteristics essentially as the name suggests characterizes the propeller, this particular propeller which has been designed. So, every propeller that is designed needs to be immediately accompanied with a propeller characteristics which determine the entire propeller operation and its capability. Only then the aircraft designer can make use of the propeller because he has to match the aircraft characteristics with the propeller characteristics. On the other hand the matching the propeller with the engine requires that the propeller characteristics is matched with the engine characteristics. So, propeller as we see is the interface again between the engine and the aircraft, its characteristics must match with the aircraft characteristics, its characteristics must match with the engine characteristics and only then we have a propeller that can fly an aircraft with the help of the engine providing the power. So, let us take a look at the propeller theory that uses the propeller blade shape as it is actually is and the aerofoil sections which actually provides the conversion of lift and drag to thrust and matching of the torque that is provided by the engine. The theory that uses the propeller blade shape is simply known as blade element theory. There are of course various versions of the blade element theory, we will be doing the elementary version, there are more advanced versions of blade element theory which are beyond the scope of this course and we shall not be doing them, but the fundamental blade element theory that we will be doing provides sufficient backdrop for understanding of how the propeller blades are designed, how the propeller blades finally go on to create thrust and how the aerofoil shapes with characteristic values of C L and C D actually help in creation of thrust. The blade elements which create the propeller blade shape are assumed to be made up of aerofoil shapes. Now, these aerofoil shapes can actually vary from root to the tip of the blade. So, along the length of the blade, the aerofoil shapes can vary quite a lot really and as a result of which their C L and C D characteristics would also vary substantially from the root of the blade to the tip of the blade. Now, this is something which you need to understand very quickly because when the propeller is in rotation the as we have seen before in the simple velocity triangle that you can construct on a blade section, the incident velocity on a blade section would vary from root to tip. Now, one of the reasons is that near the root your rotational speed is rather low and near the tip the rotational speed is quite high and as a result of which the incident velocity at the root is likely to be low and the incident velocity at the tip is likely to be quite high and the difference is quite substantial. Near the roots you could have velocities which we could say are low subsonic velocities and the aerofoil sections therefore, you should be using there are essentially meant for low subsonic applications. On the other hand near the tips the incident velocity which we called we are would be quite high they could be high subsonic in the more modern aerofoils they are in fact going almost transonic and some of these would then correspondingly require aerofoils which are either high subsonic aerofoils or in the modern propellers transonic aerofoils. So, you see from the root to the tip of the blade the aerofoil sections would vary quite a lot from somewhat thicker aerofoil sections which are good for low subsonic aerofoil applications to thin aerofoils which are good for high subsonic or transonic applications. So, the aerofoils you would be using all the way from the root to the tip of a single blade varies substantially in its shape the in its camber and of course, its basic characteristics normally denoted in terms of C L and C D. The other difference of course, is these aerofoils would also have different kind of incident angle range. The C L C D that they use actually automatically would have the aerofoil characteristics built into it and these aerofoil characteristics would show the C L C D applicable over a certain incidence range. Now, this incidence range also varies from low subsonic aerofoil to high subsonic or transonic aerofoils typically the low subsonic aerofoils would have a somewhat higher incidence range of the order of 15 16 degrees of incidence range of operation. On the other hand near the tip where the incidence range is going to be very low because they are thin aerofoils meant for high subsonic to transonic applications and those incidence ranges are often of the order of 4 5 6 7 degrees. So, that is the range that you have of variability of the incidence which means your incident flow velocity V R could change its direction by that much depending on the aerofoil that is deployed at that particular section. So, this is the difference that happens from root to tip of a single blade and this is what the designer has to be very careful about when choosing the aerofoil sections and blending them together into one blade shape because they are actual sectional properties very substantially. So, a large number of different aerofoils are used to make up one propeller blade could be something like 10 15 20 different aerofoil sections with having each having its own CLCD and incidence range characteristics and all of them will have to be blended together into one single blade shape. And each of these elements they have their CLCD characteristics and in addition they have their as I just mentioned their incidence range which is built into the shape of the propeller that is being deployed over here. Now let us look at the various flow geometry and the flow parameters that every blade section can be say to be dealing with. On the left side we have let us say a three blade propeller which is let us say in rotation with an angular velocity omega and if we take one blade section here which has let us say a radial depth of d r and this is the blade section which we say let us say is representative of the propeller. So, typically a propeller is quite often represented by a blade section which is somewhere near about around 60 to 75 percent of the blade most of the subsonic propellers would have their representative blade section at around 75 percent of the blade length some of the transonic propellers may be even higher than that. So, it is somewhere between 50 to 75 percent that you have what can be called a representative blade section. This representative blade section is the first section that is typically designed by the designer and the designer creates its own characteristics which is the average characteristics of that particular propeller. So, every propeller is first designated with an average sectional characteristics or sectional property that is required to create thrust and this average sectional property is built into the reference section of the blade which is as I mentioned normally somewhere near 75 percent of the blade length and this section is the first section that is often designed and then the rest of the sections are designed from there onwards from root to the tip of the blade. So, let us take a look at this representative section over here in which you have let us say a blade which is expected to rotate with angular velocity omega and as a result of which it acquires a rotational speed of omega r which can be written in terms of twice pi n r n being the r p m and this propeller let us say along with the aircraft which it is flying is moving with a forward velocity and width of which is of the order of v infinity. So, we say that this is the velocity with which the air is coming and meeting the propeller. So, that is this is the relative forward velocity with which the air is meeting the propeller and this is the rotational velocity of the propeller section. So, the two of them together make up this resultant velocity v r which is now said to be actually incident on the propeller at this particular section. So, this particular section now has to be aligned as close to this direction of the resultant velocity. Now, this resultant flow is at an angle phi with respect to the peripheral direction or tangential direction of the propeller and then you need to set the blade this particular blade section which here is shown as a blade setting angle of beta and if you set it at an angle beta that means the chord or the zero lift line of the particular blade section is set at this angle beta with respect to the rotational direction then what you have is beta minus phi is alpha which is then the angle of attack of this particular blade section. Now, this is the angle of attack or sometimes called angle of incidence which characterizes this particular airfoils C L C D characteristics. So, one needs to be very careful what is the angle at which this blade section is being set with reference to the angle at which the flow is expected to come into the propeller. So, the angle of v r and the angle at which the blade section is set need to be very close to each other. So, that you have angle of attack alpha which is within the operating range of this particular airfoil as characterized by its C L C D characteristics. So, you have here the propeller blade section being typically harnessed on the one hand using the C L C D characteristics on the other hand aligning it to the actual propeller operation in terms of rotation and its forward velocity. Now, let us say that the blade has been aligned the blade has been set and the flow is coming into the propeller at an angle alpha to the blade section with a velocity v r. Then it creates a small elemental lift of D L born out of the lift characteristics C L. So, this is the elemental lift that is created born out of C L correspondingly this section would experience a small drag of D D which is born out of its drag characteristics C D and these are then the characteristic values of this particular blade element. Now, these are as per the definitions of lift and drag are parallel and perpendicular to the flow direction and as a result of which the lift is in this direction which is perpendicular to the flow direction and drag is in this direction which is parallel to the flow direction. Now, if you decompose the elemental lift D L and the elemental drag D D into two other direction which is the direction of motion of the propeller and the aircraft together and perpendicular to that you get two forces the one which is in the direction of motion of the propeller and the aircraft together gives you the thrust. So, the component of D L in the forward direction or what can we call the direction which is parallel to the axis of the propeller would give you the thrust component which we call D T which is the elemental thrust of this particular element. So, as a result of which you get a thrust now born out of the lift component of the propeller of course, here you would get a very small negative thrust in the actual direction. So, the net thrust would be composed out of positive contribution from the lift and a small negative contribution from the drag. On the other hand if you take perpendicular to the thrust the in the peripheral direction the two components of the lift and drag are actually additive and they together create a force. Now, this force is what needs to be countered or matched by the torque that is supplied by the engine. So, torque which is elemental torque which is shown here as D Q divided by r gives you the peripheral force that is coming in from the engine on this particular section and that needs to be matched with the peripheral component of D L and D D and if they are matched if the torque supplied by the engine matches with this torque requirement of the propeller of this particular section then we have a situation where we get the thrust that we want. So, the lift and the drag are the characteristics of the propeller the torque is what is supplied by the engine and if all these things are matched together properly we get a elemental thrust D T which is what you would require to fly the aircraft when all the elements are put together of a particular propeller. So, the thrust that is created by an element at let us say radial length D R is created with the contributions from the aerofoil which are characterized by D L and D D of this particular element and of course the torque which is supplied by the engine. So, this is how the thrust is elementally created by any particular element of a particular propeller and all the elements put together then create the total thrust of a blade which is in rotation. If you now look at this elemental lift and drag characteristics which then create the working capacity of the propeller. So, we have a blade element which is in work which is in rotation and in rotation it is doing work and in the process of doing work it is actually creating thrust. So, the thrust that is produced by this particular element can be now written down in terms of D T which is shown in the diagram and they can be written down in terms of the elemental lift D L elemental drag D D as I have stated the drag component actually gives you a slight negative component and as a result of which you can now write down the entire thrust equation. The first part that is half rho v r square c actually is the dynamic head which is created and C L is the characteristics of the propeller blade section. C D also is the characteristics of the propeller blade section which is under consideration. Phi is the angle at which the flow is coming into the blade and C is the chord of the particular blade section and as we have seen in the earlier diagram the propeller blade section could vary from quite a lot. The actual value of the chord could vary quite a lot from the root to the tip of the blade. So, chord of the blade would vary from one section to another. So, in this thrust creating equation rho is the density of the air which is an operation which let us say is invariant from root to the tip of the blade. On the other hand as we have seen from this diagram v r would vary from root to the tip of the blade c would vary from root to the tip of the blade d r the elemental length could be same for the for each and every element. Let us say that you take the C L value would vary from root to the tip of the blade depending on the air fall section you are using same with C D its value would vary from root to the tip of the blade of any particular blade and then the value of phi also would vary from root to the tip of the blade depending on the rotational speed which depends on r omega angular velocity being constant. So, phi would vary also from root to the tip of the blade. So, in this thrust creating equation as you can see the except for rho all the other parameters actually are varying from root to the tip of the blade. Now, supposing if you want to have the thrust created by each and every section of the same order you would probably have to manipulate these values in terms of lift a lifting capacity the drag penalty the resultant velocity that is coming in and the chord dimension of the chord to get the value of d t constant from root to the tip of the blade. Now, quite often that may not always be possible. So, quite often the actual elemental thrust produced by each section could indeed vary from root to the tip of the blade. Now, let us look at the torque that is to be supplied. Now, this is to be matched by the engine supply. So, torque is required for the propeller to be operated and this is to be supplied by the engine. So, again using the same diagram we can write down the torque equation here in terms of the elemental lift and the elemental drag and in terms of the local flow angle phi. Again if we write down in terms of the fundamental propeller blade characteristics the air fall characteristics we can write down half rho v r square c again is the chord d r is the elemental length of the elemental blade c l is again characteristics and phi is the flow angle c d is the characteristics and fly is the flow angle. So, here we can see that the components from c l or lift and drag are additive they are on the same side of the axis and as a result of which they are additive and they add up together to create a force and torque which needs to be matched by the engine supply and this when multiplied by r gives you the torque. Now, this torque has to be supplied by the engine without which of course, the propeller would not operate at all. So, this is how you create thrust this is how the torque is needed to be supplied by the engine is and is matched by the propeller requirement and if this requirement is matched and if we have a proper airfoil deployed there with proper c l c d characteristics then you have a thrust production that is required for flying an aircraft. Now, if you proceed along those lines and if you say that the from the flow geometry that is we have created the result in inflow velocity is a line to the blade element you know and if we write down v r as v infinity which is the forward velocity of the incoming axial velocity by sin phi which is the angle which it subtends and the incoming flow dynamic head based on the forward velocity of the particular element if we make these two substitutions in the equation that we are written down for thrust and torque from the flow geometry that is available over here the elemental thrust can now be written down in terms of q which is now the dynamic head c is the core d r is the elemental length and phi is the flow angle and again in terms of c l and c d. So the thrust elemental thrust can now be written down in a slightly different form but using the same characteristic values of c l c d and flow angle correspondingly the elemental torque can be written down again in terms of dynamic head q the chord c r of course is the length of the element from the axis and d r is the elemental length of the particular element and phi is the flow angle c l c d are the characteristics of the aerofoil being deployed at that particular section. So the elemental thrust and the elemental torque can be now written down in terms of the characteristics of the aerofoil and the geometry of the aerofoil and the flow which is coming in at an angle phi. So these are the things that are built into the equations that create the elemental thrust and the elemental torque. If we now try to put all together as we have seen the blade is a blended version of all the aerofoils put together and when all the aerofoils are put together you get total propeller thrust and the total propeller torque. So the elemental thrust and torque we were talking about are now to be integrated from the root to the tip of the blade and let us say we have a number of blades which is b which as we have seen could be 2, 3, 4 or 5 or 6 or 8 that is typically the number of blades normally uses these days and if you put them all together you get the total thrust of the propeller and the total torque of the propeller that needs to be supplied by the engine. So these two are to be very accurately estimated only when the total torque is properly supplied we get the thrust that is required to fly the aircraft. So this is the thrust you would require to fly the aircraft in a predetermined manner to do that you need to be supplied with that kind of a torque from the engine and of course the propeller power needs to be matched with the engine power to be supplied by the engine. So these are the parameters that you require finally for the propeller to create thrust based on the aircraft on which it is mounted and based on the engine to which it is attached. Hence we see that the net thrust and the torque are seen to be directly proportional to the number of blades b and the chord c as given in the final thrust and torque relationship. Now that gives an impression that if you keep on increasing the number of blades let us look at the thrust equation quickly you see here the thrust and torque are directly related directly proportional to the number of blades b and the chord c both of them. Now that gives a immediate impression that if you simply increase the number of blades you get more thrust of course you would require more torque or if you simply increase the size of the chord let us say all the way from root to the tip of the blade you would actually get more thrust and of course you would need to be supplied with more torque. So if you are supplied with more torque you would simply get more thrust. Now that is the impression one would get from the blade element theory and the torque and the thrust equation that we have put together in practice that is not quite true. What happens is if you increase the number of blades or the size of the blades by increasing the chord it shall result in more surface area of the blades if you have more blades around it will create more flow blockage and as a result of which very high aerodynamic losses. So the efficiency of the propeller blades would start falling. So if you increase the number of blades and the size of the blades or the chord the efficiency of the propeller would be affected the propellers would create more and more blockage to the flow and the thrust create is directly proportional to the amount of mass flow that it actually activates. So by increasing the surface area you are decreasing the efficiency of the propeller by increasing the number of blades you are increasing the blockage of the propeller and two of them together actually reduce the aerodynamic efficiency of the propeller. So just by increasing number of blades or the size of the blade shapes you would actually be reaching a situation where you would not get more thrust there would be what can be called a point of diminishing return at which you have to stop your increase of number of blades and that is how the number of blades are decided quite often and that is how you see today even today the number of blades are of the order of 3 or 4 or 6 or 8 and very rarely more than that. And the reason is here that if you just simply increase the number of blades you are not going to get more thrust. So the optimum number of blades that need to be decided would need to be found separately and does not directly come from the blade element theory. So blade element theory is not a correct indicator of the number of blades that need to be deployed for reaching a certain value of thrust. The next thing we need to talk about of course is the blade element efficiency. Every element is creating thrust as we have seen they use the airfoil characteristics C L and C D and as a result fundamentally they are aerodynamic entities and any aerodynamic entity would have a certain aerodynamic efficiency. So these blade elements would have certain basic elemental efficiency which when blended together would give us of course the total propeller efficiency. So the elemental efficiency typically as per known efficiency definition is the thrust power that is produced by the particular element and the torque power that is supplied by the engine. So the elemental airfoil characteristics that we have seen before now can be made use of and if you do that the elemental efficiency comes out in the form of C L and C D. So the elemental efficiency of any particular blade element of a propeller can be written down in terms of C L and C D and phi which is the flow angle into that particular element and these three together finally give you the elemental efficiency of the propeller which stands to reason really because the three of them together actually decide the aerodynamic working capability of that particular element which as you know is an airfoil section. So this airfoil section is operative in a particular situation which is incident flow at an angle of phi and this of course creates the local aerodynamic flow angle which creates lift and the drag and they together then finally decide what is the efficiency with which this element is going to perform. So we can directly calculate the elemental efficiency from the airfoil characteristics and the local flow condition. Now what can be done is you can find that the maximum efficiency of this element from the earlier equation that we have written down it can be shown by simple algebraic derivation that the elemental maximum efficiency occurs at this value phi by 4 minus C D by twice C L and this is how you can quickly calculate what could possibly be the maximum elemental efficiency. Now of course you know the elemental airfoil is characterized by the C L and the C D and hence it stands to reason that they together decide what the maximum efficiency is likely to be. It is generally found that all the things that we have been finding the thrust, the torque, the efficiency and the maximum elemental efficiency all these can be found with the reasonable engineering approximation and which normally gives us of the order of 10 percent approximation which is a fair approximation to begin with given the simplicity of the theory and it allows us to design the propeller it allows us to predict the propeller performance with reasonable approximate accuracy. And if we do that we can create a propeller which then can be deployed in a aircraft flight. So, these are the some of the simple things that can be derived out of this elemental propeller efficiency and the thrust and the torque that we can calculate. If we can now put together all of it into typical blade every element is now created with a lifting characteristic and let us say that we get a value of variation of lift variation of thrust and torque in the direction from root to tip that is designated as x from root to the tip of the blade. And if we can show that there is a gradient of thrust coefficient and torque coefficient which can be found and if they are plotted again from root to tip we would get a characteristic curve like this for any particular propeller. So, the elemental thrust variation would look like this and you would probably get a maximum thrust somewhere over here and the elemental torque characteristics would look something like this and you would get a maximum torque somewhere over here. What you can see here is that the maximum thrust and the maximum torque may not occur at the same element. So, the same element may not be giving you maximum thrust just because maximum torque is being supplied the thrust there could be less than maximum and you could get maximum thrust not necessarily at the maximum torque may be something a little less than maximum torque. And of course, as you can see the maximum thrust and torque typically occur on the outer half of the propeller blade and the lower half actually are less contributory to the thrust. And of course, they also consume less of torque and towards the root of the propeller you could see that it could actually be creating negative thrust because that is the portion which is often not properly aerodynamically shaped they may not have very good aerofoil shapes over there. In fact, they may not have aerofoil shapes there at all because that portion is structurally strengthened and hence they may be creating actually negative thrust around the root area. So, most of the thrust need to be created on the outer half of the propeller. However, near the tip of the propeller again as we can see the torque and the thrust dips very fast. So, very near the tip of the propeller the tip flow actually highly influences the propeller elemental behavior there and you are unlikely to get much thrust contribution from the tip area. So, one needs to be very careful in designing the propeller in which the thrust needs to be distributed in a manner so that together the blended propeller would give the necessary thrust that is required for flying the aircraft. So, this is the variation that you need to build into a propeller shape to get a propeller that is useful for flying an aircraft. A typical low speed aircraft propeller characteristics is being shown here which is shown in terms of C T and C P the C T of course as we have seen is the thrust coefficient and C P is the power coefficient and as we can see here and the efficiency of the propeller is being shown over here which shows that the efficiency of the propeller maximizes somewhere at one point this is plotted with reference to advance ratio V by N D and this shows that the efficiency of the propeller could be maximum at one point whereas, the thrust and the power could be maximum at some other point of advance ratio. Now, advance ratio as you know would vary with the forward speed of the propeller which is the flying speed of the aircraft and of course, the rotational speed. So, the ratio of the two of course gives the advance ratio. So, typically the higher the aircraft flying speed higher would be the advance ratio. Now, this is a low speed aircraft. So, advance ratio values we are looking at are somewhat on the lower side. So, typically that is the variation one would probably get from a low speed aircraft propeller and first thing we can see here is that the maximum efficiency operation if you if the cruise or the longest deployment of the propeller which is during cruise is somewhere near the maximum efficiency that is not the point where you of course use maximum thrust or maximum power you would probably be using less than the maximum power and you would probably using less than the maximum thrust coefficient and still creating sufficient thrust to fly the aircraft. On the other hand when you are taking off you would be somewhere near 0 of advance ratio and you would be using maximum near about maximum power to create near about maximum thrust. You would probably need to create a good thrust during the climb operation of the aircraft. So, you would need to create good thrust and then of course, during cruise you come down to lower thrust and lower power requirements and where you have very high efficiency of the propeller. So, good propeller efficiency is often obtained near the cruise whereas, as you can see here new during the takeoff the propeller efficiency is indeed quite low actually, but you operate there for a very short period to create high thrust of course, using high power. We can have a quick look at the high speed aircraft where the again the cruise is somewhere near the maximum propeller efficiency to get the best fuel efficiency of the power plant. It is it does not use the maximum power or maximum thrust coefficient which are typically high the highest near the takeoff and that is where you need to create maximum thrust for the takeoff and the climb operation and this is where you can see the advance ratios are little on the higher side compared to the earlier one and the advance ratio here shown is of the order of 3.5 maximum and you are probably operating at advance ratio somewhere near 2.6. So, this is a comparatively high speed aircraft on which a propeller has been deployed for providing thrust to the aircraft. Now, this is what you would probably get of a propeller characteristics which is a variable pitch propeller. Now, you see we have discussed the fact that propellers can be fixed pitch or variable pitch most of the modern propellers used in most of the aircraft today are variable pitch propellers. Now, these variable pitch propellers then would need to have their thrust versus advance ratio and efficiency versus advance ratio characterized with different pitch angles and this is the blade angle that is beta that we have seen before and each value of beta then would create one characteristic graph like this. So, if you have a variable pitch propeller one of the job of the propeller designer is to create variable pitch propeller characteristics within which then the aircraft would need to be flown the engine would need to be operated. So, that all the time the propeller is matched on one hand with the engine on the other hand with the aircraft. Now, what we see here is a probable cruise point selection which is where you are likely to operate at a comparatively high advance ratio and you would probably get at a you are working at a high pitch angle. Now, during the cruise your pitch angle is likely to be higher order during the takeoff your pitch angle of the propeller would likely to be rather low or as it is often called they are finely set whereas, during cruise it is going to be a core setting of the propeller and so during the cruise the efficiency of the propeller can be used for a high pitch angle and you would get a good efficiency there during the cruise operation of the aircraft. So, this is the kind of variable pitch propeller characteristics that you would get of thrust coefficient and efficiency. We can get a similar characteristics for the power coefficient and this is of course, a thrust power characteristics. So, you have the thrust variation here or on the y axis you have the power variation and what you would see here is a thrust power characteristics. The cruise point is likely to be somewhere over here where you would use modest amount of power and create modest amount of thrust to sufficient for the aircraft to fly. On the other hand near the takeoff you would need to create more thrust and hence you would probably using more power and as a result of which you would be operating somewhere over here which is at near 0 advance ratio whereas, over here you are operating at high advance ratio during high forward flight speed of the aircraft. So, these are the typical characteristics that characterizes the propeller every propeller once designed and created would need to have a characteristic plots like these for the engine designer and the aircraft designer to match to and this is absolutely necessary for matching the propeller with the aircraft and the engine. There is a fourth characteristics which is often used the first three being the thrust coefficient, the power coefficient and the efficiency. A fourth characteristic which is often used for propeller design or selection is simply called speed power coefficient and this is defined as C s and is defined as rho v to the power 5 divided by power p into n square n being the rotational speed all of it together power of 1 by 5 that is 0.2 and this is often used for designer selection of propeller. Now, this speed power coefficient can be related to the power coefficient simply with the advance ratio J and is related as C s equal to J by C p to the power 1 by 5. Now, why this speed power coefficient has been created this is of course, used only by the designers and the propeller selectors. This is because in the process of creating this definition the diameter of the propeller has been eliminated as a result of which you have a parameter normalized parameter in which the size of the propeller has been taken out of the equation and as a result of which you can create a propeller characteristics conceptually without to begin with a priori bothering about the size of the propeller which can be then factored in a little later in the design process. So, this speed power coefficient allows you to create a conceptual propeller without fixing the size right away and the fixing of the size can be slightly deferred to a later date. So, that you have a propeller conceptually already created and its characteristics also already created and this is the advantage of the speed power coefficient which is defined in many of the literature. This is a typical speed power coefficient characteristics of a propeller again a variable pitch propeller and this shows that at under various pitching angle operation the speed power characteristics would vary. This is the advance ratio this is the speed power characteristics on the x axis it is plotted against advance ratio j and the efficiency eta and these are the efficiency curves and these are the advance ratio versus c s curves and these are plotted at various pitch angle. So, we are characterizing typically again a variable pitch propeller. So, this is the kind of characteristic plot which helps selection or design of a propeller for a particular operation in which thrust needs to be created and the power needs to be supplied by the engine and as a result of this we get propellers which can be matched to a craft and engine. Some of the modern propellers we can take a quick look at have shapes which are which have sweeps and these swept propellers are being used in the modern propellers which have gone transonic. The airfoil shapes of these are of transonic airfoil shapes some of the new propellers that are coming up are counter rotating that means you have two propellers one behind the other and the second one is rotating in the opposite direction to the front one. So, these are called counter rotating propeller. The propellers can be fundamentally two types one is known as a tractor type in which the propeller is deployed somewhere at the front of the aircraft and it is pulling the aircraft. So, to say and that is why it is called tractor type sometimes they are deployed in the rear of the aircraft and quite often they are referred to as pusher type as if they are pushing the aircraft from behind. So, the tractor type is what is deployed somewhere in the front of the aircraft the pusher type is deployed somewhere near the rear of the aircraft. So, these are the various kinds of propellers which are typically used in aircraft. In typical aircraft application we can say that the propeller power will be equal to the engine power multiplied by the shaft efficiency multiplied by the propeller efficiency. So, we have to keep an eye on the propeller efficiency which is a composite of all the elemental efficiencies. The propeller torque we will have to be matched exactly with the engine torque that is being supplied with the engine and till you do that you are not going to get the proper thrust that is required. Typically during takeoff the torque requirement is low the blade setting angle or the pitch angle is low the power required is high and the rpm is high because during takeoff you require very high thrust normally you require very high thrust. During cruise on the other hand the torque requirement is very high that is because the blade pitch setting angle is very high and as a result of which the torque requirement is very high, but on the other hand the power requirement is rather low and the rpm is also rather low compared to the takeoff rpm. So, during the cruise and during the takeoff the propellers operate at quite different operating conditions to create thrust one for takeoff which is very high one for cruise where the thrust requirement is indeed rather low, but the torque requirement is rather on the higher side. So, these are the different two at least two different operating conditions which a propeller has to cater to to ensure that the aircraft flies properly. So, these are some of the fundamental issues that comes out of propeller theories and you need to ensure that you have a propeller which supplies sufficient thrust during takeoff meeting all these requirements and you have a propeller which supplies thrust during takeoff again meeting all the requirements that are shown over here. So, only then you have a propeller which is worthy of putting on an aircraft for flying the aircraft. In the next class we will be trying to make use of all these propeller theories that we have done the propeller fundamental definition that we have used the C p and the C t and when you use all these fundamental theories it should be possible for us to solve some very simple problems. So, that you get a feel of the numbers I will be bringing along a problem and I will solve a problem for you may be a variable pitch problem. So, that you get a idea of what happens when these theories are used to solve real life problems and so that is what we will be doing in the next class trying to solve problems making use of the theories that we have done over the last three lectures.


If you clicked on this video, chances are you are secretly harboring romantic feelings for someone who is quite reserved, and you want to know if your feelings are mutual. Challenge becomes tougher when your crush has a shy personality, as they can be a little hard to read. So, we're here to help you look for the signs that a shy someone likes you. Number 1. They become silent and fidgety around you. When someone is shy, they may not have enough confidence in themselves to flirt with the person they like. When their crush comes around, it's like everything becomes tense and stressful. They think too much about the right thing to say or do. This makes them nervous, so they fidget, tug at their hair, twist their shirt, or play with their fingers. So, watch out for the sudden change. You're causing tension for some reason. Maybe it's a good one. Number 2. They create opportunities to be around you. They're not going to be in your face asking you out. They're shy, so they'll try to be where you are by amazing coincidence. Well, far more frequently than actual coincidence. This is especially notable. If you see them somewhere you know isn't one of their usual hangouts. This means they're taking a huge step out of their comfort zone just to be around you. But what if you're already friends? If you suggest something new, they'll see it as another chance to spend time with you and probably won't pass it up. And even if the new things seem strange to them, they'll still try. Just to be in your company. Number 3. They talk to you online. People who are shy need a shield. And for many that shield is being online. Face-to-face interactions can feel stressful because they have to get it right the first time. But online, there's a backspace, delete, and the option to not use the camera. If they make a mistake, they have a way out. Since typed words don't convey emotions as accurately as spoken ones, they can explain themselves. In other words, they have some time to think and give a satisfactory response. This makes them feel more at ease and lets them be more real with you. Number 4. They seem to be imitating you. Not like that annoying younger sibling thing. You move around in your seat and they do the same.  This is actually called behavior mirroring and is believed to help establish a connection through the like equals like concept. Number 5. They struggle to maintain eye contact with you. As soon as they look at you, their eyes immediately move to another place. They might look at your hand or over your shoulder, but never directly at you. They might look back at you for a split second once in a while. It is easy to overlook. They want to look at you, but it makes their insides go all wobbly wobbly because of their intense feelings for you, making them extra nervous. So for the sake of not giving themselves an anxiety attack, they just have to look away from your brilliance. Number 6. They notice everything about you, even your social media posts. Look out for the person who likes almost all your posts and comments on them. Maybe they may even say something like, the sunset picture you took this time is clearer than the other three from the same spot. To show that they've been paying close attention. In fact, they will see a lot of changes in you, even in significant ones. Today you wanted to wear a different watch. They might ask what happened to the other one, or they might comment on how short you had to file one nail because it broke the other day. People don't tend to be that attentive unless they like you, or they're being paid. And being paid to do so is not the most likely scenario here. Number 7. They surprise you with small gestures. This is because they notice everything about you. You may mention your favorite book or author, and a little while later you may find them reading one of those favorites. You may recommend some new music and suddenly their playlist is filled with all your recommendations. They're showing you that they value your likes and opinions. They're paying attention and trying to connect. To avoid the possibility of being rejected, your crush is doing what they can, and in their own way, to tell them, I like you. So take note, acknowledge them, and if you feel the same way, don't leave them hanging. Which of these signs have you noticed before or now? Has this shed some light on past events? If you're a shy person yourself, have you noticed yourself doing any of these things? Please comment, share, and discuss. We will boldly ask you to tap that like button. You don't have to be shy about it. Thanks for watching. We'll see you soon.


Entrepreneurship is certainly not as glamorous and straightforward as people make it seem. It sure is a lot of work which can sometimes go unnoticed, leading to frustration and as a matter of fact giving up in some cases. Ada Bernier, CEO and co-founder of Skillcrush, an interactive tech learning platform, said that one of the most important things I have learned is that businesses don't fail, entrepreneurs give up. Now, sometimes giving up is the right decision, but usually you need to dig in and figure out how to make things better. Remember, every day is a new opportunity to get up and do it better than yesterday. The truth is that entrepreneurship is not an escape route for a lack of a job. It's a journey that requires hard work, perseverance and consistency. And this can take a psychological toll on entrepreneurs. In this video, I'll share with you the psychological price of entrepreneurship. If you're new here, consider subscribing so you won't miss other exciting videos like this. Entrepreneurship can be lonely at times. Until you eventually grow your business to the point of bringing others on board, it's going to be a one-person show. It's also going to be just you running your business. You'll be responsible for making all the decisions, taking risks and the like. You'll be the salesperson, the manager, the logistics person, the PR officer, the finance officer and everything else there is to become. Having to deal with so much can sometimes be discouraging and tiring, which is why it is advisable to step out and take a break to enjoy some fun time with family and friends now and then. It can help fuel creativity and remind you that even if you have to deal with your business alone, you are not in the world alone. Number 2. You'll fail many times before you eventually succeed. According to Albert Einstein, a person who never made a mistake never tried anything new. In entrepreneurship, failure is inevitable. It comes in different shapes and sizes, but it is still a failure, and it is bound to happen. Why? Because that's how you learn. When you watch the lives of some famous entrepreneurs who have turned out to be one of the best in their various industries, you might be tempted to think they were born that way with some special kind of talent, hence they have never experienced failure in their field. Do you know what? They weren't born that way, and they have also had their share of failures in the past. The truth is that you are likely to make a bunch of mistakes and have a lot of setbacks, and your ability to rise above them will equip you with the insight and resilience you'll need to succeed eventually. Jessica Herron, founder and CEO of Stellar and Dot said, You have to see failure as the beginning and the middle, but never entertain it as an end. Also, according to Reed Hoffman, co-founder of LinkedIn, if you tune it so that you have zero chance of failure, you'll usually have zero chance of success. The key is to look at ways for when you get to your failure checkpoint, you know to stop. Failure is an outcome that you should expect, but rather than getting worked up about it, learn from it, re-strategize and focus on how to get better results in the future. Number 3. Self-Doubt is a part of the journey. Great entrepreneurs look so calm and composed on the outside, however, they deal with an emotional rollercoaster that comes with running a business, one of which is self-doubt. Self-Doubt is normal and natural in entrepreneurs, but that does not mean that self-doubt gets to be the master. Learning to quickly overcome these feelings and any other form of emotional instability is a part of the journey you must also learn. Number 4. Entrepreneurship requires perseverance more than skills. Have you ever heard this famous saying, the fastest runner doesn't always win the race and the strongest warrior doesn't always win the battle. The wise sometimes go hungry and the skillful are not necessarily wealthy and those who are educated don't always lead successful lives. It is all decided by chance, by being in the right place at the right time. It takes perseverance to remain in the right place, even when it looks isolated. In business, especially the early years, you are most likely going to be on your own. It is your vision, no one sees it as clearly as you do, so no one will move at the pace you want your dream to move, which is why it will take time to build, even though we all want what we want fast. Entrepreneurship requires a persevering and not giving up attitude, even when the only thing you want to do is quit. Number 5. You'll have to deal with inconsistent income. Well, it's official, your days of paychecks are over. Although entrepreneurship provides the opportunity to earn significant income, it can be inconsistent. It will take time to build a steady customer base, which is why there will be a lot of high and low periods. However, if you learn to develop a good saving habit, you can create a substantial emergency fund. You will hardly fall into the trap of debt and the like. You see, starting your own company or business is a first class ticket to financial security. However, you can only achieve it when you are prepared for it. In other words, knowing these things isn't an excuse to give up, but an opportunity to make ahead of time. Here's something you need to know. Knowing about the psychological price of entrepreneurship isn't to scare you off or stop you from being an entrepreneur, but to prepare you for the journey and also help you handle the hurdles that come with being an entrepreneur quickly. So, good luck in your journey. Thank you very much for watching our videos. If you like this video, watch more videos on our channel and subscribe. We love you.