FreeThinker

[1.2.2] KSP Interstellar Extended 1.12.14 (25-3-2017) Development

8399 posts in this topic

NorthStar, as I said on the Real Fuels thread, I have literally no idea why you think I have it out for you. As to the patch itself, as I just said on the RealFuels thread, it is clear that my being busy recently and not keeping RealFuels on a development cycle which accords with your wishes means that the best policy is to not tie you to the RF development cycle. For that reason RF will not ship integration configs for KSPI. This makes no real difference to the patch code (whether a patch is part of RF and :NEEDS[WarpPlugin] or whether it's in KSPI and :NEEDS[RealFuels] ) but means I am not a bottleneck for you or FreeThinker.

Apologies for having been one so far. I do hope to get 8.4 out tonight, having finally fixed the mass bug.

I agree with you that engine packs should determine engine stats. RF attempts to ship no engine configs of its own, and it makes sense for part mods to do likewise.

Share this post


Link to post
Share on other sites

Also, FreeThinker, just wanted to be *sure* you saw this. Here is the code again that Dreadicon wrote up for better TAC Life Support and KSP-Interstellar integration (basically it fixes the name-differences between the Water resources, and just needs a config file of its own in the KSP-Interstellar Extension Config folder to call home... :) )


//Configs for TAC Life Support & KSPI
@PART
[*]:HAS[@MODULE[FNModuleResourceExtraction]]:NEEDS[WarpPlugin&TacLifeSupport]
{
@MODULE[FNModuleResourceExtraction]:HAS[#resourceName[LqdWater]]
{
@resourceName = Water
}
}

@WARP_PLUGIN_SETTINGS[WarpPluginSettings]:NEEDS[WarpPlugin&TacLifeSupport]
{
@WaterResourceName = Water
}

@TANK_DEFINITION
[*]:HAS[@TANK[Kerosene]&!TANK[Water]]:NEEDS[RealFuels&WarpPlugin&TacLifeSupport]:AFTER[TacLifeSupport]
{
!TANK[LqdWater] {} //just in case
+TANK[Kerosene]
{
@name = Water
}
}

@PART
[*]:HAS[@RESOURCE[LqdWater]]:NEEDS[WarpPlugin&TacLifeSupport]
{
@RESOURCE[LqdWater]
{
@name = Water
}
}

@BASIC_NTR_PROPELLANT[Water]:NEEDS[WarpPlugin&TacLifeSupport]
{
@PROPELLANT[LqdWater]
{
@name = Water
}
}

@PLANETARY_RESOURCE_DEFINITION[Water]:NEEDS[WarpPlugin&TacLifeSupport]:FINAL
{
@resourceName = Water
}

@OCEANIC_RESOURCE_DEFINITION
[*]:HAS[#resourceName[LqdWater]]:NEEDS[WarpPlugin&TacLifeSupport]
{
@resourceName = Water //LqdWater
}
@WARP_PLUGIN_SETTINGS
[*]:NEEDS[WarpPlugin&TacLifeSupport]
{
@WaterResourceName = Water //LqdWater
}

I modified it slightly and put it in the Resource Folder. Could you verify everything works as it should?

Share this post


Link to post
Share on other sites

@FreeThinker

Just a concern that came up- how are we currently handling whether the Propulsive Fluid Accumulators should produce "Nitrogen" vs. "Liquid Nitrogen" or "CarbonDioxide" vs. "LiquidCO2"?

In short, how does the Atmospheric Scoop know whether to produce the gaseous or cryogenic version of a resource? (not really sure why we even have a gaseous CO2 resource though, other than the fact that it was already in CRP and we started with it before adding cyrogenic CO2- the gaseous Nitrogen is at least already used by RealFuels for RCS, but the CarbonDioxide resource seems fairly useless compared to LiquidCO2...)

I'm worried about a potential issue like with IntakeAir/IntakeAtm, where you can potentially *double* your resource-intake by having storage for BOTH... (the issue with IntakeAtm/IntakeAir is that you can potentially run a conventional jets and a Thermal Turbojets at full throttle in parallel off the same intake, at an altitude/speed where there should only be enough airflow for one, as the intakes produce equal amounts of both resources...)

Regards,

Northstar

Share this post


Link to post
Share on other sites

Also, the Changelog for 0.7.12 says:

"Added Support for TAC Lifesupport"

But right now it's more like *PARTIAL* support for TAC Life Support. We still don't even have the simple/intuitive ability to use CO2 respired by Kerbals in our Thermal/Electric Thrusters (or in a KSP-I Sabatier Reactor that works outside the atmosphere off stored resources, for that matter- whereas TACLS already includes a Sabatier Reactor for life-support reasons that works on somewhat unrealistic chemistry...) You can store the CO2 in tanks, separate it from the manned craft entirely (or dump it overboard with TAC Fuel Balancer), but not use it for anything in KSP-Interstellar yet...

We'll probably need some way of converting the resources for that, or changing the rate at which Kerbals produce it, though- as the TACLS Carbon Dioxide had a different/arbitrary density than pretty much any other mod last I checked... (although that might have changed)

Regards,

Northstar

Edited by Northstar1989

Share this post


Link to post
Share on other sites

I'm worried about a potential issue like with IntakeAir/IntakeAtm, where you can potentially *double* your resource-intake by having storage for BOTH... (the issue with IntakeAtm/IntakeAir is that you can potentially run a conventional jets and a Thermal Turbojets at full throttle in parallel off the same intake, at an altitude/speed where there should only be enough airflow for one, as the intakes produce equal amounts of both resources...)

No, the current implementation of Athmospheric scoop only process a single resource at the time. Which is fine for the time beeing as you can use multiple resource intakes on single vessel.

- - - Updated - - -

But right now it's more like *PARTIAL* support for TAC Life Support. We still don't even have the simple/intuitive ability to use CO2 respired by Kerbals in our Thermal/Electric Thrusters (or in a KSP-I Sabatier Reactor that works outside the atmosphere off stored resources, for that matter- whereas TACLS already includes a Sabatier Reactor for life-support reasons that works on somewhat unrealistic chemistry...) You can store the CO2 in tanks, separate it from the manned craft entirely (or dump it overboard with TAC Fuel Balancer), but not use it for anything in KSP-Interstellar yet...

True, currently it's just some configuration for the tanks. It's not much but it's a start and will give player the signal that we aim for further integration

Share this post


Link to post
Share on other sites
No, the current implementation of Athmospheric scoop only process a single resource at the time. Which is fine for the time beeing as you can use multiple resource intakes on single vessel.

OK, good. Surprisingly I haven't really had the chance to play around much with Propulsive Fluid Accumulators yet (even though it was my #1 most wanted feature to get into KSP-I in the first place), as I've been busy doing research on and testing other aspects of the Extension Config...

True, currently it's just some configuration for the tanks. It's not much but it's a start and will give player the signal that we aim for further integration

Indeed. I just didn't want players downloading the Extension Config to get the wrong idea and start asking why certain aspects of the two mods still don't work together...

I tried to install TAC Life Support this morning to see how well the existing code is working for that, but it turns out the latest version of TAC Life Support (released a month ago) is not compatible with Modular Fuel Tanks (which is a part of the code of RealFuels and I have installed).

Is it possible you could test this one? It should be a simple matter of installing TACLS and trying to do a few things like running a KSP-I ISRU refinery off the life-support water added to a crew capsule through TACLS, or seeing if Kerbals can use Water stored in a KSP-I water tank for life-support...

[Removed bythe Moderation Team] But if you'd like to give it a shot, maybe you could try working with him to see if it would even be possible to migrate *all* the functions from ORS over to Regolith without requiring too much custom coding for different resource-densities of LiquidFuel/Hydrogen, for instance?

Regards,

Northstar

Edited by sal_vager

Share this post


Link to post
Share on other sites

That is quite enough of that, I expect this altercation to end now and for this thread to stay on topic.

1 person likes this

Share this post


Link to post
Share on other sites

OK, so FreeThinker- a couple of questions about dependencies:

(1) I notice that Community Resource Pack is currently a dependency, but you were concerned about them going with a 1 unit = 5 liters convention and possibly messing up the Extension Config in doing so... What do we actually rely on CRP for besides the CarbonDioxide (but *not* LiquidCO2) resource?

(2) I noticed Regolithi is currently a dependency. I thought that was for the Propulsive Fluid Accumulator code, but one thing we learned from RoverDude's earlier posts was that it was not. What do we currently use Regolith for?

Also, I've gotten quite confused about exactly where the Thermal Turbojet performance is now. It got buffed, then nerfed, and I want to make sure I'm running my numbers correctly. So, I'm going to test the parts again in the latest version, and report the changes that need to be made to the Thrust/MW based on the current, actual numbers. A 20-25% buff might not be the correct number: so hold off on implementing it if you haven't already...

Regards,

Northstar

Share this post


Link to post
Share on other sites

OK, so I'm glad I decided to actually re-test with the new ThermalPower and Thrust/MW figures for the Thermal Turbojet...

7T5UJDQ.jpg

BmPd3Jb.jpg

For 849.8416 MW of ThermalPower at 2750 K, the ThermalTurbojet "only" gets 320.4 kN of Thrust at 130.4 seconds ISP...

That equates to:

0.377 kn/MW at 130.4 seconds

For reference, the NERVA for 0.3 kN/MW of Thrust at 850 seconds Vacuum ISP...

Using the equation (Power = 1/2 * Thrust * Exhaust Velocity) we can get an expected Thrust at this level of ThermalPower, but first we need to find the Thrust/MW at optimal ISP for the Thermal Turbojet so we are comparing apples to apples...

Once again, the optimal ISP for a Thermal Turbojet is (2500/800) = 3.125 times as high as at sea-level... In KSP, jet engines already have a correct relationship between Thrust and ISP- fuel flow remains fixed, and Thrust increases/decreases with ISP. Here is a graph from some excellent analysis of this on Reddit:

http://imgur.com/INHzu9P

So, at optimal ISP:

CURRENT/EXPECTED Thrust Production: 320.4 * 3.125 = 1001.25 kN

CORRECT Thrust Production: 0.3 kN/MW * 849.8416 MW * 850/(130.4 * 3.125) = 531.8 kN

Surprisingly, if I'm correct in extrapolating the behavior of stock jet engines to that of the Thermal Turbojet, the Thrust/Mw is actually nearly *twice* what it SHOULD be at sea-level...

So, never mind that bit about increasing Thrust 20-25%? :blush:

Sometimes the numbers REALLY surprise you when you actually do them out...

Conclusion:

A 46.9% REDUCTION in Thrust/MW for the Thermal Turbojet seems to be in order...

Regards,

Northstar

Share this post


Link to post
Share on other sites

Aren't the stock jet engines horribly overpowered?

Share this post


Link to post
Share on other sites
OK, so FreeThinker- a couple of questions about dependencies:

(1) I notice that Community Resource Pack is currently a dependency, but you were concerned about them going with a 1 unit = 5 liters convention and possibly messing up the Extension Config in doing so... What do we actually rely on CRP for besides the CarbonDioxide (but *not* LiquidCO2) resource?

Well Boris aims for CRP integration, so I will do as well. Integration is what solves a lot of resource problems. The plan new hierachical structure of CRP - RF will solve many of our current resource issues.

- - - Updated - - -

(2) I noticed Regolithi is currently a dependency. I thought that was for the Propulsive Fluid Accumulator code, but one thing we learned from RoverDude's earlier posts was that it was not. What do we currently use Regolith for?

To be exact, Regolith is not used in the code but it is used in the storage proces. KSPI Atmosphereic scoop first collect the gas resource (without Regolith) which is then converted to a liquid resource using Regolith. This is the case for Nitrogen which is extract from the upper atmosphere and than converted to Liquid Nitrogen using Regolith resource converters (you should check the LiquidNitrogen tank part).

Share this post


Link to post
Share on other sites

So, at optimal ISP:

CURRENT/EXPECTED Thrust Production: 320.4 * 3.125 = 1001.25 kN

CORRECT Thrust Production: 0.3 kN/MW * 849.8416 MW * 850/(130.4 * 3.125) = 531.8 kN

Surprisingly, if I'm correct in extrapolating the behavior of stock jet engines to that of the Thermal Turbojet, the Thrust/Mw is actually nearly *twice* what it SHOULD be at sea-level...

So, never mind that bit about increasing Thrust 20-25%? :blush:

Sometimes the numbers REALLY surprise you when you actually do them out...

Conclusion:

A 46.9% REDUCTION in Thrust/MW for the Thermal Turbojet seems to be in order...

Regards,

Northstar

Well considering that the original Thermal Power production was 85 MW and is now 850 MW (which is exaclty 10 times as much, coincidence?) I was expecting the Thermal Turbojet trust adjustment, to be more than a mere 46.9% but I will implement it.

Anyhow, It is nice nice that the number is close to 50% because I also doubled the Thermal Power output of fusion reactors. Which means player will have slightly higher performance using them.

Alright, now that Thermal nozzles and thermal jet is balanced., we need to take a look at energy and wasteheat production. One thing that always bothered me is the rediculous amount of wasteheat that can be stored in the radiators, much more than in the reactor itself. Intiutively, I expect wasteheat storage to be related to the total weight of a heatsink and the materials used.

Edited by FreeThinker

Share this post


Link to post
Share on other sites

Alright, now that Thermal nozzles and thermal jet is balanced., we need to take a look at energy and wasteheat production. One thing that always bothered me is the rediculous amount of wasteheat that can be stored in the radiators, much more than in the reactor itself. Intiutively, I expect wasteheat storage to be related to the total weight of a heatsink and the materials used.

Could we get a really large solar panel and really large heat radiator? That seems to be a big hole in construction of LKO solar power satellites. Maybe use a modification of the solar sail model? Or does tweakscale take care of this?

Share this post


Link to post
Share on other sites
Could we get a really large solar panel and really large heat radiator? That seems to be a big hole in construction of LKO solar power satellites. Maybe use a modification of the solar sail model? Or does tweakscale take care of this?

Regarding Huge solar panels, I would advice KOSMOS. Note that KSPI Extended actualy has fixed a bug related to the double pivoted huge solar panels in KOSMOS which caused it not to recieve all generated power.

Regarding radiators, I intend to make radiators fully scalable with Tweakscale and the larger sized parts will become avaiable with technology that is related with building larger parts. It should eventualy allow you build huge radiators.

Edited by FreeThinker

Share this post


Link to post
Share on other sites
Well considering that the original Thermal Power production was 85 MW and is now 850 MW (which is exaclty 10 times as much, coincidence?) I was expecting the Thermal Turbojet trust adjustment, to be more than a mere 46.9% but I will implement it.

Hold off on that adjustment- because if I am wrong about the relationship between altitude and Thrust (that is, maximum Thrust is observed on the runway, not at optimal speed/altitude) then the adjustment will actually need to be in the opposite direction (a 50% INCREASE in Thrust/MW).

Regards,

Northstar

Share this post


Link to post
Share on other sites
Aren't the stock jet engines horribly overpowered?

Yes, but for reasons that don't affect our Thermal Turbojets.

The main reasons the stock jets are OP'd compared to real life are as follows:

(1) There is a MAJOR issue in the way their ISP is calculated. In real life, chemical jet ISP is calculated based on the consumption of liquid fuel (Kerosene, Hydrogen, etc.) not based on the total airflow/ exhaust-velocity. That means if a Turbojet has an ISP of 2500, but only 1/10th of its mass-flow is in liquid fuel, its actual Exhaust Velocity corresponds to an ISP of 250 seconds, not 2500 seconds- the reduced fuel flow is due to the use of atmosphere as propellant. However, our Thermal Turbojets rely *ENTIRELY* on the atmosphere for propulsion-mass, which means the rates ISP is what you get for exhaust velocity, and there is no possibility for a mix-up like this. A sea-level Exhaust Velocity of 1278.787 m/s (130.4 seconds ISP) is actually quite *low* for a real-life jet engine...

(2) The atmospheric and velocity-curves of the stock jet engines are quite generous compared to real-life engines. KSP-Interstellar Thermal Turbojets have their own, much more balanced curves, however- so this is also not an issue.

Thus, there is nothing overpowered about our current Thermal Turbojets, except that their engine mass may be a bit low (which is hard to realistically implement in KSP since jet engines hang entirely on the tail of a plane, instead of being built through the length of a fuselage. IF we gave the engines realistic masses, all planes built with them would become far too tail-heavy, and aerodynamically unstable as a result...)

Regards,

Northstar

Share this post


Link to post
Share on other sites

OK, so in-flight tests proved invaluable...

First of all, here the Thermal Turbojet is at low altitude:

w0BBUDt.jpg

And here it is at optimal altitude (after this height, the TTJ started to lose Thrust and ISP...)

b4vHGMk.jpg

Thrust *DID* increase with ISP, and fuel-flow remained fixed, as I expected/hoped- but ISP did not climb *nearly* as high as I was expecting...

At about optimal altitude (which was higher than I expected), less than 20% of Thrust was being lost to velocity at this altitude (at 400 m/s 20% of Thrust is lost to the velocity-curve). I estimate the correction-factor for airspeed as about 1.2 (corresponding to 1/6th Thrust-loss). Thus, optimal Thermal Turbojet performance is approximately:

ISP: 195.5 seconds * 1.2 = 234.6 seconds

Thrust: 136.0 kN * 1.2 = 163.2 kN

What was the EXPECTED result based on the sea-level performance? (note the correction-factor for 1/3rd throttle)

ISP: 134 * 3.125 = 418.75 seconds

Thrust: 320.4 kN * 3.125 / 3 = 333.75 kN

And finally, most importantly, what would be the REALISTIC Thrust based on the optimal ISP of 234.6 seconds?

Realistic Thrust at 234.6 seconds: (850/234.6) * 0.3 kn/MW * (849.8416 / 3) MW = 307.91 kN

It appears that the way the velocity and altitude-curves are currently being implemented, the Thermal Turbojets are actually currently under-performing real life... Thrust/MW is only (163.2 / 307.91) * 100 = 53% of what we would expect based on the 0.3 kN/MW performance of the NERVA engine in real life... Thus, a 47% increase in Thrust/MW appears to be in order...

Final Conclusions:

Flight-testing reveals that only a 47% increase in the Thrust/MW of the Thermal Turbojet is in order...

Regards,

Northstar

Share this post


Link to post
Share on other sites

On jets you missed (3), which is that the jets don't care about current atmospheric density, whereas in reality thrust is proportional to both velocity and to density (in fact, thrust is closely proportional to Q, although taking compressibility into account).

Share this post


Link to post
Share on other sites
snip

Ah, interesting read - thanks for clearing that up!

Share this post


Link to post
Share on other sites
*snip*

Just taking a look at your screenshots, I think everything looks about right as-is.

For the second picture, with the engine producing 136 kN at 195.5 s, sticking that into the thrust power equation gives a total thrust power of about 130 megawatts:

(136,000 N * 195.5 s * 9.81 m/s/s) / 2 =~ 130,000,000 W = 130 MW

Given that the fully-upgraded dusty-plasma reactor of that size puts out a max power of 142 megawatts, a 130-megawatt thrust power seems to suggest rather generous values for conversion efficiency, but it's at least within the realm of possibility, especially since you mentioned that was peak thrust. (It's also a little hard to nail down how the charged-particle portion of that power is making it into the exhaust - bremsstrahlung? Who knows, but also another thing that can be allowed to slide).

Obviously, you won't see efficiencies nearly that high at sub-optimal conditions, like at very high altitude or especially high speed. There's some complexities regarding airflow volume and speed that aren't accounted for in the current model, but I think it's mostly accurate enough as it stands, and it certainly doesn't need to be given more thrust, since that would be pushing the limits of theoretical efficiency at best and pulling energy out of nowhere at worst (which is something we've seen in other parts of the mod, unfortunately.) Plus, those engines are generally enough to scream your way into orbit in a handful of minutes - Even if it were realistic to give them a buff, would they need it? :P

--UPDATE--

I did a test:

KwGuvfV.png

In that picture, you can see the thrust and Isp of the engine of the test vehicle, which are about 1500 kN and 820 s, respectively. That comes out to a thrust power of almost exactly 6 gigawatts, which is too bad, because the reactor the engine is attached to is only putting out 5.5 GW of thermal power:

0.5 * 1500 kN * 820 s * 9.81 m/s/s =~ 6,000,000,000 W = 6 GW (/ 5.5 GW = 110% conversion efficiency.)

Looks like we've got bad math after all- these engines are putting out way too much thrust and Isp for the input power.

The peak thrust of the engine (which I didn't catch with the screenshot) was more like 1550 kN at 850 seconds (6.6 GW) if you're keen for the record books.

Upshot is, thermoturbojets need a little tweaking. The thrust power I saw at ground level was just fine (about 3 GW, which seems reasonable efficiency), but it quickly got ridiculous as I got a little higher in the atmosphere and moved a little faster. I'm not exactly sure what's wrong with KSPI's math, but it's clearly inconsistent.

Edited by GreeningGalaxy

Share this post


Link to post
Share on other sites

In that picture, you can see the thrust and Isp of the engine of the test vehicle, which are about 1500 kN and 820 s, respectively. That comes out to a thrust power of almost exactly 6 gigawatts, which is too bad, because the reactor the engine is attached to is only putting out 5.5 GW of thermal power:

0.5 * 1500 kN * 820 s * 9.81 m/s/s =~ 6,000,000,000 W = 6 GW (/ 5.5 GW = 110% conversion efficiency.)

Interesting, so based on this observation, thrust should be adjusted with a factor 5.5 / 6 = 0.916666666 correct?

Edited by FreeThinker

Share this post


Link to post
Share on other sites
Interesting, so based on this observation, thrust should be adjusted with a factor 5.5 / 6 = 0.916666666 correct?

I don't think I have any reason to believe that it would be linear - I haven't tested un-upgraded reactors, larger reactors, or different methods of power generation (antimatter, AIM, fission, etc), nor more/less intakes. I think what would be ideal is to find the formulas that govern thrust and Isp on thermal engines and change them to make them behave realistically to begin with, but as I've never worked with this kind of thing before, I have no idea how hard that would be. In the short run, some kind of adjustment to just make sure the thrust power of the engine doesn't go above the power of the reactor attached to it would be better than nothing, even if it acted as a hard limit.

I'll do some more tests tomorrow and see if I can figure anything else out.

Share this post


Link to post
Share on other sites
I don't think I have any reason to believe that it would be linear -

Say, do you know anything about curves, there is some code which might be related to the problem, but can't seem to understand what is exactly happening


vCurve.Add((float)(maxISP * GravityConstant * 1.0 / 3.0), 1.0f);
vCurve.Add((float)(maxISP * GravityConstant), 1.0f);
vCurve.Add((float)(maxISP * GravityConstant * 4.0 / 3.0), 0);
myAttachedEngine.velocityCurve = vCurve;

Notice the * 4.0 / 3.0 , Perhaps this explain the increased power at higher altitudes...

Edited by FreeThinker

Share this post


Link to post
Share on other sites

Hmm. I don't know C# (yet :blush:), so I'm not entirely sure what's going on there, but I'll play with the thermal jets some more and see if I can find anything that looks consistent with those numbers ...I guess. That's the best I can do, but hopefully someone who knows what that code does can provide a better answer.

Share this post


Link to post
Share on other sites
Never used them personally. It was one of the last things Fractal_UK implemented before he went away, and I'm not quite sure exactly how he made them to work.

A *REALISTIC* implementation would basically use ChargedParticles as the only propellant. That is, it would (SLOWLY) convert Uranium into propulsion, at an ISP of over 50,000 seconds! However, the Thrust for this would be DEATHLY low- as in, on the order of magnitude of Solar Sails. So, I'm not quite sure how Fractal_UK *ACTUALLY* made these to work...

It only runs off of charged particles because that's the only form of power you can use to heat your propellant directly. The rest of the output comes in the form of neutrons which heat the solid portions of the reactor, thus the temperature you can heat your propellant to is limited by their failure point.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now