Jump to content

[Part] Advanced SRB [WIP v0.7] by Kerbal Science Foundation


kujuman

Recommended Posts

0.7 Alpha is released.

These advanced solid rocket boosters (AdvSRB) are the pinnacle of modern engineering. Developed after accusations that current SRB designs were nothing more than “trash cans full ‘o boomâ€Â, the AdvSRB boasts many exciting features:

-Stackable: Each AdvSRB Segment added to a booster stack increases the thrust of the entire stack.

-Varying Thrust: By carefully shaping the propellant (or modifying the MassFlow floatcurve in the .cfg) you can change how quickly the propellant burns, exchanging burn time for thrust. Have thrust constant, reduce over time, or even decrease before increasing again!

-Gimbaled Nozzles: Nozzles are gimbaled to help steer vessels. While they have no thrust of their own, their Isp helps determine the thrust for the entire stack.

-Fixed Burn Times: If mass flow is fixed at a set time, then how does Isp work? Thrust! Low Isp results in lower thrust than a higher Isp, just like on the fictional world of Earth!

(May be out of date)

How to use: Attach as many AdvSRB segments as you would like one on top of the other. The height of the stack determines its thrust. At the bottom of the stack add an AdvSRB Nozzle. Without a nozzle, the segments are useless. The nozzle will only activate through the regular staging process, and its icon is the standard SRB icon. Note that there is no fuel gauge drawn in the staging stack, so you should use the right click “T+†indicator on the nozzles to determine how long they have been burning. When in the editor, hover your mouse over a nozzle and press the "Home" key to bring up the editor GUI (hover and "End" closes it). This advanced GUI will enable you to customize burn profiles in game, without having to have different parts each with a specific burn profile! Symmetry is not yet supported though, so it's best to make one booster stack to your liking and then engage symmetry. Copy and Paste functionality are per nozzle. While the nozzles provide the GUI, the burn profiles are saved per segment.

Version v.1 July 1, 2013 Initial Release

Version v.2 July 3, 2013 Update

Version v.3 July 4, 2013 Update

Version v.4 July 20, 2013 Update

Version v.5 September 13, 2013 Update

Version v.6 October 26, 2013 Update

Version v0.7 Alpha December 4, 2014 Initial Limited Release

BaGOZFV.png

Features to be implemented before final release:

-Full effects: heat

-Engine damage

-How-To guide, on how to develop your own models and parts (specific requirements)

Features to be implemented if possible:

-Enabling thrust/delta-V to be read by MechJeb and other popular addons

Current known/suspected issues:

-The game may allow you to save while the AdvSRBs are thrusting; I have not tested resuming this.

-May not work correctly with mods installed (I think MechJeb and Kerbal Engineer will not evaluate the AdvSRBs correctly)

-Segments MUST be placed the correct side up- a possible loop failure may cause the engine to not thrust, MassFlow to be excessive, or both.

-B size boosters are very wobbly and prone to breaking apart. Please stru

As the pack is still in development, do not rely upon parts to remain available or function the same way after an update. I suspect that you will only use them for launch vehicles, so hopefully this will not be too much of an issue.

0.7 Alpha is c 2014, All Rights Reserved.

0.6.1 and earlier versions of this work are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

It was previously released under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License, which was reverted as per the following:

"If after 45 days there are no updates to this mod, then the license shall revert to a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. The 45 day period will reset with each update. For these purposes, updates will be noted by version number increases, i.e., v.1 to v.2 This is to give me exclusive right to updating the software while still allowing the community to take over if I let it languish."

Video tutorial for v.6

Download <s>Now</s> in the near Future!

Development Thread

http://forum.kerbalspaceprogram.com/threads/77563-Advanced-SRB-dev-Major-rework-from-v-6?p=1112630#post1112630

.23 HOTFIX information

http://forum.kerbalspaceprogram.com/threads/38597-Part-Advanced-SRB-WIP-v-6-by-Kerbal-Science-Foundation-22?p=900643&viewfull=1#post900643

Edited by kujuman
dev thread link posted
Link to comment
Share on other sites

Here at Kerbal Science Foundation we value your sanity, so 1 unit of this resource weighs 1mass unit. Easy!

So … wait. One liter of your rocket propellant masses 200 kilograms? That's nearly twenty times denser than lead! Does each of your booster segments contain a piece of the core of a sun?

Don't get me wrong. It's a super-rad idea. That just stuck out at me, is all.

Link to comment
Share on other sites

The "liter" convention isn't set in stone or anything, so I just made the density easy to use. Fo' instance...

The included SRB segments have 3.75 units of propellant and weigh .25 tons empty for a total mass of 4 tons.

The stock small SRB has 433 units of propellant and weigh .5 tons empty, for a total mass of 3.7475 tons.

Hopefully this will make figuring out the mass of the boosters simpler as they almost certainly don't work with MechJeb or anything.

Link to comment
Share on other sites

I really like where this is going! The useless stock SRBs have always bothered me, and there's been a real shortage of sensible mod parts. With the Mission Controller mod growing more popular, some inexpensive SRBs are looking more attractive.

Link to comment
Share on other sites

The "liter" convention isn't set in stone or anything

True, but the way the resource system works right now kinda makes it a pain not to adopt some kind of volumetric convention. Densities are defined in metric tons per whatever  and the metric tons part is set in stone. It's hard-coded into the game that if you define a resource as having a density of "1" then an amount of "1" of that resource will mass one metric ton. You can have different resources denominated in different volumetric units if you want to; there's nothing stopping you from unilaterally doing something like this:

RESOURCE_DEFINITION
{
name = Helium
density = 166.0 // grams per cubic meter at 1 atm and 20°C
flowMode = STACK_PRIORITY_SEARCH
transfer = PUMP
}

RESOURCE_DEFINITION
{
name = Nitrogen
density = 0.23291 // kilograms per liter at 2000 psia and 20°C
flowMode = STACK_PRIORITY_SEARCH
transfer = PUMP
}

RESOURCE_DEFINITION
{
name = Water
density = 1.0 // pounds per pint
flowMode = STACK_PRIORITY_SEARCH
transfer = PUMP
}

But it makes life a living hell for anybody who's trying to figure out how to assign resources to parts. When you add in something like Modular Fuels, you have to convert all your densities to the same units  whatever those units be  because the whole point of that plugin is to divided volumes up to hold resources.

So no, it's not set in stone. But the fact that it's not set in stone is the third-worst thing about this game right now. (The other two being, in my opinion, the complete lack of sanity to how electricity currently works and the baffling ordeal that is heat production. Both make life way harder for people who want to mod their game than it really should be.)

But just to reiterate: Yes, I absolutely think this is a very cool idea. I'm just throwing some unsolicited feedback at you in the hope that whatever decisions you make about your mod in the early days are the best ones, so you don't have to go back and make big, sweeping changes to it later.

(The density of APCP, by the way, is 0.00195 metric tons per liter. You know, just in case you decide you want that information.)

Link to comment
Share on other sites

...But it makes life a living hell for anybody who's trying to figure out how to assign resources to parts. When you add in something like Modular Fuels, you have to convert all your densities to the same units  whatever those units be  because the whole point of that plugin is to divided volumes up to hold resources....

(The density of APCP, by the way, is 0.00195 metric tons per liter. You know, just in case you decide you want that information.)

Just for clarity, in this post by "volume" units I mean the fuel units.

I understand and appreciate where you're coming from. To be honest, when I had started the coding of the part modules, I made the density of the rocket fuel to be similar to the regular solid rocket fuel. But the thrust calculations are based on mass flow rate and the way resources are requested is based on volume units. So I was having a hard time developing the modules while also not screwing up the math (mostly decimal places). Further, I had not been able to find a way to get the density of a type of fuel programmatically, so I was making a mess of things with incorrect unit conversions.

I think at this point for most users "units of fuel" is arbitrary in any case. Like when they changed the RCS a few updates ago there was a bit of an issue, but people have adapted to understanding intuitively what one RCS tanks of each size will do in space. For this mod, as there is yet no mechjeb integration; if people want to determine delta-V by hand, knowing that this segment contains 3.75t of fuel is simpler (by a bit at least) than having to subtract loaded mass from dry mass to get the fuel level (though I admit that this is not a huge burden).

So the only real reason to use a volume convention is to make parts scaled similarly to each other. But I feel that people who are making mod parts will be okay if I include some "suggested volume per mass" in that documentation.

At some point between v.2 and v.3 I will probably consider the issue more thoroughly, but at least until I get the burn time calculators running, I will leave things as they are so that they are more intuitive to develop.

Thanks for the density of APCP btw, as that's basically what I got my Isp range from, so if I do decide to convert the densities I'm likely to use it. At this point, I'm even debating having different fuels with different Isp, but that might just add too much complication as compared with different nozzles.

Shouldn`t more segments result in a longer burn time not higher thrust?

All things equal, no.

When rocket fuel burns you can think of the mass of the fuel burned as creating a certain level of thrust in a certain time. So for a certain amount of propellant, the faster you burn fuel, the higher the thrust generated at the expense of burn time.

A simple way to think of how fast something burns is based on its surface area being burned. Liquid engines you can think of as having a fixed surface area for combustion, so no matter how much fuel you have, the rate of burning is the same, and therefore thrust doesn't change. Solid rockets burn fuel all the way to the top of the stage through a hollow channel in the segments. This means that adding another segment and making a booster taller increases the surface area being burned, creating a higher thrust level, but because the segment you've added also contains more fuel, the burn time is unaffected.

Edited by kujuman
Link to comment
Share on other sites

Shouldn`t more segments result in a longer burn time not higher thrust?

Nope. SRBs are hollow in the middle, so they burn from the center outward. Longer = more surface area burning = more thrust. Wider = more fuel = longer burn time. Extremely simplified explanation, but that's pretty much how they work.

Link to comment
Share on other sites

Just for clarity, in this post by "volume" units I mean the fuel units.

The unnamed "fuel unit" of volume is exactly equal to five liters. That's how the stock configs are set up. There's nothing saying your parts can't contain a couple liters of propellant and a hell of a lot of empty space, but that raises questions about moments of inertia and all that whatnot that are easier left unasked.

But the thrust calculations are based on mass flow rate and the way resources are requested is based on volume units. So I was having a hard time developing the modules while also not screwing up the math (mostly decimal places).

Dude, I totally know where you're coming from. I had to fight the same fight. ModuleEngines actually handles it all automatically, using thrust and Isp. F = dm Isp g0, so it computes the mass flow from the rated thrust and the specific impulse at the current ambient static pressure. (Wrongly, it turns out, but I've got a plugin up that fixes this for people who are bothered by it.)

Then it does all the arithmetic to handle propellant flow in a fairly simple way. The density of the fuel mixture is just Σ Ã f where f is the propellant fraction defined in the ModuleEngines config. So if reactant #1 has a density of 5 metric tons per liter and reactant #2 has a density of 13 metric tons per liter and their ratio is set up in ModuleEngines as 0.60 and 0.40 respectively, then ÃÂm = 0.60×5 + 0.40×13 = 8.2 metric tons per liter. Then it takes dm from the thrust equation (mass per time, so metric tons per second), multiplies by the length in seconds of the current frame (giving us mass), then divides that by ÃÂm (mass per volume, so metric tons per liter) to get the total volume of reactants required for that frame. Then it just multiplies that volume by each reactant ratio in turn to get the volume of each reactant to consume.

The arithmetic is tedious to get right the first time, yeah, but once you get it right, you never have to worry about it again, because everything that can change  resources, mixture ratios, reactant densities  are all set in config files, and the math is the same as long as you don't go changing units on people. ;-)

Further, I had not been able to find a way to get the density of a type of fuel programmatically, so I was making a mess of things with incorrect unit conversions.

Yeah, I don't think that's exposed through an API directly. But it should be trivially easy to get it from GameDatabase through something like this:

foreach (ConfigNode node in GameDatabase.Instance.GetConfigNodes ("RESOURCE_DEFINITION")) {
if (node.hasValue("density"))
// do things
}

I think at this point for most users "units of fuel" is arbitrary in any case.

It is … which is the problem. For Mr. Wannalauncharocket, it doesn't matter at all, but for everybody who has to open a .cfg file, not having an agreed-upon set of units of measure has made life way harder than it needs to be.

Thanks for the density of APCP btw, as that's basically what I got my Isp range from, so if I do decide to convert the densities I'm likely to use it. At this point, I'm even debating having different fuels with different Isp, but that might just add too much complication as compared with different nozzles.

Ah, that's the tricky bit. Specific impulse is related to what kind of propellant you use, but it's also related to the geometry of your rocket nozzle. Remember that F = ve dm + (Pe – Pa) Ae, and Isp = F / dm g0. In order to make a good choice about what specific impulse to give an engine, you've gotta take into account the diameter of the nozzle and the exhaust pressure. The diameter of the nozzle is a constant; it's part of the 3D model, obviously. And you can make a sensible choice about exhaust pressure by asking yourself what altitude this motor was meant for. For an SRB, an exhaust pressure of half an atmosphere is sensible, because they're meant to burn during ascent. So in vacuum you're looking at a pressure thrust component of half an atmosphere applied across the area of your nozzle exit; that adds to the thrust you get from the momentum of your exhaust. At sea level, you're looking at a pressure thrust component of minus half an atmosphere across your nozzle exist; that subtracts from your momentum thrust. That's why motors have different specific impulses at sea level and in vacuum in the first place.

Point of all that is simply to remind you to remember that specific impulse is a function both of propellant and of engine nozzle geometry … and also that rocket science is fun. :-)

Link to comment
Share on other sites

The unnamed "fuel unit" of volume is exactly equal to five liters

Has that ever been stated anywhere or is it just taking the external dimensions of a fuel tank and the tank capacity and working backwards? Because fuel tank walls

The way I'm calculating thrust right now is F = massflow * 9.81 * currentIsp I was thinking that nozzles would have a "native" Isp for some baseline pressure fuel and different fuels would have pressures at some ratio above or below the baseline. But upon consideration, that seems too involved and unless too much pressure would blow the rocket (or some other balancing mechanic, like funding in career mode), I don't see a case where I would pick a lower Isp fuel. Long story short, setting Isp in the nozzle config will be a level removed from figuring out nozzle geometry and pressure.

Thanks for the tip on game database, I haven't thought to venture into exploring what I can see using it.

Im interested as long as the texture changes lol. Not sticking checkered parts onto side of my rockets. :confused:

Heh, I know the feeling. I'm working to try to get v.2 out today (hopefully before .21 comes out, because I'm not going to work on the mod for about a day after release) but for some reason my plugins aren't loading right now, so I can't test my fuel mass flow analyzer.

Anyway, game d/l'd, so time to get back to work.

Link to comment
Share on other sites

I just happened to read about the Shuttle's SRBs last night and, after learning about the gimbals and shaped propellant, thought "I wish someone implemented this in, you know, a mod or something. That'd be nice."

Well, my wish has come true! Thank you!

Link to comment
Share on other sites

Added fx which scale with the mass flow. Added some action group items. One action group item is "Abort", which basically lowers your Isp a lot to simulate the nozzle blowing out.

QmK5Gb4l.jpg

I've capped the fx though so that this doesn't happen.

oHTih1Dl.png

Don't worry, this probably can't happen

Link to comment
Share on other sites

Basic effects means it looks perfectly usable now. Nice job!

May I suggest making some similar SRBs in different scales? I'd like to use little .625m boosters on a small rocket, and 2.5m on a heavy lifter or space shuttle. Maybe even bigger! :D

Link to comment
Share on other sites

ok I downloaded, tried to make a simple rocket matched the nose cones with the fuel piece t-100's, attached it to a pod, im not getting any action from these new srb's, they dont ignite, whats the deal? I have the newest version.

Link to comment
Share on other sites

Bad news. This mod is incompatible with Ferram Aerospace Research 0.9.5.1

I uninstalled all mods, installed Advanced SRB, and the boosters work perfectly. I installed FAR, tried to launch the example craft, and the boosters produce zero thrust. Not only is there no thrust, but only the bottom segment is burning fuel; all other segments do nothing.

I hope this can be fixed. :(

Link to comment
Share on other sites

Bad news. This mod is incompatible with Ferram Aerospace Research 0.9.5.1

I uninstalled all mods, installed Advanced SRB, and the boosters work perfectly. I installed FAR, tried to launch the example craft, and the boosters produce zero thrust. Not only is there no thrust, but only the bottom segment is burning fuel; all other segments do nothing.

I hope this can be fixed. :(

Hm, Ok thanks for the report

Update: Ok, I have recreated the no thrust issue (which is also the cause as the no booster above it fuel use and the low mass flow reading), I think I know which line is causing it, but I don't know why it is.

Update 2: I've found a workaround. It actually is a tighter piece of coding now, something I had planned to do when cleaning up the code near the finish. So i'm just going to go ahead and tidy up the code a bit more before publishing a hotfix

Basic effects means it looks perfectly usable now. Nice job!

May I suggest making some similar SRBs in different scales? I'd like to use little .625m boosters on a small rocket, and 2.5m on a heavy lifter or space shuttle. Maybe even bigger! :D

That's planned for later in the release. I want to make sure I have the code in place before making too many models (in case I need to make changes)

ok I downloaded, tried to make a simple rocket matched the nose cones with the fuel piece t-100's, attached it to a pod, im not getting any action from these new srb's, they dont ignite, whats the deal? I have the newest version.

Could you please provide a .craft or a picture of the craft?

Also, do you have any other mods installed? FAR is currently not working with this.

Edited by kujuman
found a workaround
Link to comment
Share on other sites

CQgvjIQ.png

V.3 Adds scaling visual and sound FX and action groups!

These advanced solid rocket boosters (AdvSRB) are the pinnacle of modern engineering. Developed after accusations that current SRB designs were nothing more than “trash cans full ‘o boomâ€Â, the AdvSRB boasts many exciting features:

-Stackable: Each AdvSRB Segment added to a booster stack increases the thrust of the entire stack.

-Varying Thrust: By carefully shaping the propellant (or modifying the MassFlow floatcurve in the .cfg) you can change how quickly the propellant burns, exchanging burn time for thrust. Have thrust constant, reduce over time, or even decrease before increasing again!

-Nosecones: Contain a small amount of propellant which fires at a set time, aiding booster separation. Also contains a parachute for safe splashdowns downrange!

-Gimbaled Nozzles: Nozzles are gimbaled to help steer vessels. While they have no thrust of their own, their Isp helps determine the thrust for the entire stack.

-Custom Resource: KSF_SRfuel does not flow, cannot be pumped, and burns evenly through the entire stack. Here at Kerbal Science Foundation we value your sanity, so 1 unit of this resource weighs 1mass unit. Easy! And no more will “SRBs†be able to use fuel lines…you know who you are.

-Fixed Burn Times: If mass flow is fixed at a set time, then how does Isp work? Thrust! Low Isp results in lower thrust than a higher Isp, just like on the fictional world of Earth!

How to use: Attach as many AdvSRB segments as you would like one on top of the other. The height of the stack determines its thrust. At the bottom of the stack add an AdvSRB Nozzle. Without a nozzle, the segments are useless. The nozzle will only activate through the regular staging process, and its icon is the standard SRB icon. Note that there is no fuel gauge drawn in the staging stack, so you should use the right click “T+†indicator on the nozzles to determine how long they have been burning.

rUIOoJd.png

The mass flow of the new booster segment A3

Version v.1 July 1, 2013 Initial Release

Version v.2 July 3, 2013 Update

Version v.3 July 4, 2013 Update

New Features

Added sound and visual effects-they scale with thrust output

Added 3 new action groupable actions to nozzles

-Ignite: Starts the AdvSRB

-Abort: drops Isp to 1/15 of "normal" value, simulating an abort mode where the throat is blown out to drastically reduce chamber pressure (it might be realistic...)

-Separation Gimbal: Will attempt to gimbal engine 3deg (towards the red arrow at the bottom of the nozzle) to aid in booster separation (this is kinda iffy right now)

Bug fixes/tweaks

Fixed Isp not being correctly calculated for first 1km

Right click menu is now formatted

l4y3HULl.png

Features to be implemented before final release:

-Full effects: heat

-Engine damage

-Additional Booster Sizes and burn configurations

-How-To guide, on how to develop your own models and parts (specific requirements)

Features to be implemented if possible:

-Enabling thrust/delta-V to be read by MechJeb and other popular addons

Current known/suspected issues:

-The game may allow you to save while the AdvSRBs are thrusting; I have not tested resuming this.

-May not work correctly with mods installed (I think MechJeb and Kerbal Engineer will not evaluate the AdvSRBs correctly)

-Segments MUST be placed the correct side up- a possible loop failure may cause the engine to not thrust, MassFlow to be excessive, or both.

As the pack is still in development, do not rely upon parts to remain available or function the same way after an update. I suspect that you will only use them for launch vehicles, so hopefully this will not be too much of an issue.

tWY03XPl.jpg

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

If after 45 days there are no updates to this mod, then the license shall revert to a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. The 45 day period will reset with each update. For these purposes, updates will be noted by version number increases, i.e., v.1 to v.2 This is to give me exclusive right to updating the software while still allowing the community to take over if I let it languish.

Note: parts makers are encouraged to develop parts to use this plugin, and a how to guide will be written at some point.

Download Now!

http://kerbalspaceprogram.com/ksf-advsrb/

You should try to make the smoke given off by them realistic, plumes and plumes! Just a cool effect that would work well in KSP I think.

Link to comment
Share on other sites

You should try to make the smoke given off by them realistic, plumes and plumes! Just a cool effect that would work well in KSP I think.

Like these?

gKJ3HIp.png

GCEvCM2.png

dnIwWKp.png

At this point the effects become very taxing on system resources, so I put a max cap on the effects.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...