Monday, May 11, 2015

Rocket Propulsion

Rocket propulsion is interesting; it's not like anything else we normally encounter when moving on Earth. Originally a lot of this post was going to be in the last post, to explain about how the engine stats related to real world science, but it grew far too big. Last week's simple answer is likely to be enough for anyone deciding for engine parts, but here's how things work behind the curtains. I hope that anyone reading this finds the topic as interesting as I do.

First, let me reference cars, as I believe anyone reading this is quite familiar with them in principle. A car accelerates by spinning its tires that then push against the Earth. At the same time, there's friction pushing back against the car, mostly from wind resistance whenever the car is moving. In practice, we spend most of the energy from the engine to equal out this wind resistance acceleration, and so move at a constant speed. Even though all the car can do is accelerate, we think of its movement in terms of speed and raw distance, and this is reflected in how we measure a car's performance.

Think of all the terms of measurement you use when talking about vehicles. Some big ones are the ones that relate to practical matters. I rate the efficiency of the vehicle in terms of miles per gallon. Similarly, I can take that number and the amount of gas I have left in order to roughly calculate how many miles I can travel before refueling. For performance I'll usually use max speed, rather than using horsepower or acceleration.

With rockets, everything is different, though there are a lot of similarities to a regular car. For a rocket to move forward, you must throw stuff out the back. The rocket gains the momentum of the stuff sent backwards, in a similar way to the car gaining momentum by pushing against the Earth. (For those that have forgotten from science class, momentum is mass * velocity, and momentum must be conserved in a given system) We call this "stuff" propellant, reaction mass, or remass, though I'm very sure we'll have more names for the stuff as it enters popular speech. (Do not call this stuff fuel, or rocket enthusiasts will be very angry with you. Unless it is fuel, as with chemical rockets, which muck everything up naming-wise)

I'm sure most people are aware of this, but space is overwhelmingly empty. For a rocket in space, this means there's no friction until you crash into something. Compared to how we think of movement on Earth, this difference is huge. The distance of a trip starting at rest, the distance gone is a function of acceleration versus time. Normally, we ignore the acceleration and consider it in terms of velocity - why would I care about the 6 seconds of acceleration I have when I'm traveling for an hour? Even though I constantly accelerate forward when using a car, my speed will not change, as it is countered by the acceleration due to friction. But with a rocket, the acceleration needs to be accounted for, and this is shown with all the terms of measurement in use with them.

Now, to keep things as simple as possible, I'll try to relate these terms to those of a normal car, but remember that the comparison is not exact; they differ in key points. This is muddled further by the tendency to talk about a rocket by its engine, while we talk about a vehicle in terms of the entire vehicle. For example, I'll give a rocket's performance measurement in terms of thrust (given in Newtons (N)), whereas a vehicle's performance is done in max speed. The vehicle's engine performance however is given in horsepower, which is similar to the engine's thrust.

With rockets, measuring how far it can go is a useless measurement. If we pick a good trajectory, the rocket can travel light years, though it will take eons. Instead, it's more useful to measure a rocket's ability to change velocity, dV (pronounced delta V, and measured in meters/second). And now we get to the fun part: measuring an engine's efficiency. That's measured either as specific impulse (labeled Isp and given in seconds) or effective exhaust velocity, measured in meters per second. Why is it fun? It's like labeling a car's efficiency in horsepower per pound of fuel. If you're interested in learning how it relates to efficiency, read the next paragraph, or feel free to skip if you want to take my word for it.

First. Let me define Isp more clearly. Impulse is (roughly) defined as the change in momentum, and calling it specific means using it in relation to something else. In this case, we use impulse in terms of pounds of propellant. (Note the word pound: measure the propellant in terms of weight, not mass) Instead of measuring propellant by weight, we can use mass. This other value is known as the effective exhaust velocity (more colloquially known as exhaust velocity), and also measures the average speed of the propellant as it leaves the rocket (when done outside an atmosphere). Specific impulse is more useful for other aspects relating to rocket design and so engines are rated in terms of specific impulse. Exhaust velocity is easier to understand, and much nicer for calculating dV, and so is what I'll tend to use. The calculation is dV = exhaust velocity * ln(ratio of total rocket mass to propellant mass)

It should be noted that thrust and exhaust velocity are not intrinsically linked. For a given engine power, it's usually possible to increase the thrust at the expense of exhaust velocity or vice versa. I can also increase the engine power to get an increase in both thrust and exhaust velocity compared to the old engine. This isn't always possible though, unfortunately. The ion engine is sadly stuck forever in having a very low thrust, to give an example.

Hope that helped clear some things up and gave people some interest in the matter. Remember, leave a comment if you have any questions, and I'll be sure to answer it!

Friday, May 8, 2015

Ship Design

Had a friend say that she wanted to hear something a bit more cheerful this week, so I'm going to talk about how ship design works.  I've always enjoyed making my own designs for ships when playing similar games, and I'd like to bring that to SEAC.  Even if my designs aren't exactly optimized, it's usually nice to give them your own personal flair.  (For reference, I'm a fan of lasers, quirkiness, and defenses)  Hopefully, I'm able to give enough options for players that they're able to make their own fleet that varies enough from others to really be called their own.

Basic idea for ship design (at least for my game) consists of four main topics: the mission, propulsion, consumables, and the miscellaneous options that mostly deal with morale.  Each ship is made up of a hull and a set of components.  Hulls have an available volume, radius (or alternatively diameter, whichever is easier for people to understand), mass, and length.  Components are the objects that do things - lasers or cargo containers, and can be scaled up or down in size depending on how much of the component you need.

The first thing I try to pin down when designing a new vessel is to determine it's mission.  What is this ship's purpose?  Is it a tanker, perhaps a cargo ship?  Maybe it's a combat ship, one built to slug i t out with the opponent's ships, or maybe one designed to maintain a longer range and let the tougher ships in front take all the beatings.  Whatever the mission, deciding it is where I start my design process.

Let's give an example.  I want to design a Cruiser, a type of ship designed to be good at combat and operate independently if the need arises.  I start the design by selecting a medium sized hull, and add some weapons (lasers of course!) and decent shielding.  As I add on components, the program will continually update the side variables to keep up with the new additions.  I don't care how many crew the cruiser has, but I do care if the cruiser has enough crew, and like any good program the easy stuff will be taken care of.  So, the crew and all components keeping them functioning will update, along with other components like power generation and structure.  The player will always have the option of overriding, but ideally these non-decisions should be handled by the base program.

Next up, I need to worry about the propulsion of my cruiser.  I select the engine that best fits my thrust and efficiency needs, and scale it up to fit my cruiser.  For this mission, I'm leaning towards efficiency, to save on propellant mass.  Next, I adjust how long my cruiser thrusts for during transit. (Given as a percentage) The larger the percentage that I thrust, the quicker the ship will reach its destination, but expend more propellant.  I expect most journeys to be made primarily of drifting, rather than accelerating.  Given all this information, I then add on propellant tanks, with helpful bits of data showing how much time the cruiser can thrust, average distance the ship can travel at cruising speeds, and how fast the ship accelerates.

Now for the rest of the consumables; mostly food, water, oxygen, fuel, and ammo.  For now, anything not listed there is labelled a generic "supplies".  The player will set the how long the ship is supposed to last before refueling, along with an acceptable margin of error.  How much material is required is then a simple calculation, given the rest of the design.  Except, depending on your completed research, there's also the option of using regenerative systems.  Why carry food for the entire trip if we can make it ourselves?  In practice, it doesn't provide that much of an increase in space unless we have long trips, and the technology doesn't really exist even now.  About all we currently reuse is water, and even some of that is wasted.

Lastly, the player decides on some miscellaneous options for his ship.  These can vary from which material to use for the structure, to which amenities to use for the crew.  Do you want your crew to have a mess hall with appropriate cooking facilities to boost morale, or would you rather not waste the extra mass and space on useless frivolities?  How sparse are the crew quarters?  Is it a tin can? Cramped like a submarine, or does it have ample room like a modern boat might?  Morale is always important, but it does mean wasting a lot of space and propellant to keep the men happy.

After all that, you've finally got your cruiser design ready for the factories to construct.  Hopefully it performs in a way that's similar to what you planned for.  If you find you're not really interested in all that design work and want to skip to something that's useful, there will always be pre-made designs built.  Each design is also tweakable, able to be upgraded as new components become available, or to change an existing design without starting from scratch if, say, you don't like lasers and would prefer a ship based off of missiles.  Even though we all know lasers are better.