Jump to content

[1.8+] Real Fuels


NathanKell

Recommended Posts

4 hours ago, b0ss said:

I'm still new to the whole modding business, how nice does this play with mods like Interstellar, Cryogenic Engines, etc.?

IIRC Interstellar has its own resource management system; you should only ever have one such active on a given part at one time. Or there will be conflict.

Resource management as in  being able to edit what kind of and how much of a resource a part has.

Link to comment
Share on other sites

8 hours ago, b0ss said:

doesn't Interstellar use Community Resource Pack?

It's not an issue of resource compatibility, it's an issue of having two different mods that want to manage those resources. I.e. want to edit the tank contents of a part. Interstellar comes with Interstellar Fuel Switch. I do not use that mod and I have no idea what will happen if it is installed at the same time as Real Fuels and you don't want to have to find out the hard way. Ask @FreeThinker if it's safe to use the two together.

 

But, speaking as an RF developer, I would pick one or the other and then stick with it because past experience has taught me that multiple resource management systems don't work well together and trying to make them compatible is more trouble than it's worth. FT might have another answer though.

Edited by Starwaster
Link to comment
Share on other sites

18 hours ago, Starwaster said:

It's not an issue of resource compatibility, it's an issue of having two different mods that want to manage those resources. I.e. want to edit the tank contents of a part. Interstellar comes with Interstellar Fuel Switch. I do not use that mod and I have no idea what will happen if it is installed at the same time as Real Fuels and you don't want to have to find out the hard way. Ask @FreeThinker if it's safe to use the two together

 

 

Well basically if you are referring to IFS it can be installed at the same time as Real Fuel. IFS will leave any tank containing known part manager modules alone (and since it often comes last, you will no see it), it expects other resource control mods to do the same with tanks that have dedicated  IFS parts. The Last IFS release 3.0.0+ now have some auto adaptation functionality in the sense even if no matching configuration is found it will leave the resource  contents alone and only show statistical on tank contents like resource mass and wet/dry mass ratio

Edited by FreeThinker
Link to comment
Share on other sites

For what it's worth, I find it hard to imagine running KSPI *without* RealFuels. The two work excellently together, and KSPI provides a partial ISRU architecture for RF. My 'perfect KSP' is 6.4x scale w. outer planets + KSPI + RealFuels + FAR (and *most* other realism mods) + MKS/USI. I can't recommend this combo enough for 'veteran' KSP players.

Link to comment
Share on other sites

Is there a way to make a config, so that real fuel lqdhydrogen boil off into hydrogen. When I have a normal empty hydrogen gas tank attached to an insulated cryogenic lqdhydrogen tank, the hydrogen will get filled up automatically at the speed that matches the boil off of the lqdhydrogen (obey mass conservation)? So that, I can have my custom made 70s-ish isp hydrogen cold gas RCS thruster working?

Thank you.

Link to comment
Share on other sites

14 hours ago, BUGescape said:

Is there a way to make a config, so that real fuel lqdhydrogen boil off into hydrogen. When I have a normal empty hydrogen gas tank attached to an insulated cryogenic lqdhydrogen tank, the hydrogen will get filled up automatically at the speed that matches the boil off of the lqdhydrogen (obey mass conservation)? So that, I can have my custom made 70s-ish isp hydrogen cold gas RCS thruster working?

Thank you.

The changes have to be made to the TANK nodes inside the TANK_DEFINITION nodes.

Each tank that you want to do this must have the line boiloffProduct = (whatever you want to be produced). For example if you look at ServiceModule TANK_DEFINITION you will see that the LqdOxygen TANK has the line boiloffProduct = Oxygen.

This is currently only possible with Oxygen, Hydrogen, Ammonia and Methane because those are the only ones that have heat of vaporization assigned to their liquid counterparts. (vsp)

If there's no vsp for the resource then it falls back to the old pre KSP 1.0 code (which doesn't handle boiloff product) but that's probably not a problem because the affected resource are less common types that you'll run into in Realism Overhaul and are probably pretty obscure.

Also be warned that boiloff product collected cannot be used for propulsive venting and won't be counted for ullage control.

 

Edited by Starwaster
Link to comment
Share on other sites

On 5/11/2018 at 4:43 AM, Starwaster said:

The changes have to be made to the TANK nodes inside the TANK_DEFINITION nodes.

Each tank that you want to do this must have the line boiloffProduct = (whatever you want to be produced). For example if you look at ServiceModule TANK_DEFINITION you will see that the LqdOxygen TANK has the line boiloffProduct = Oxygen.

This is currently only possible with Oxygen, Hydrogen, Ammonia and Methane because those are the only ones that have heat of vaporization assigned to their liquid counterparts. (vsp)

If there's no vsp for the resource then it falls back to the old pre KSP 1.0 code (which doesn't handle boiloff product) but that's probably not a problem because the affected resource are less common types that you'll run into in Realism Overhaul and are probably pretty obscure.

Also be warned that boiloff product collected cannot be used for propulsive venting and won't be counted for ullage control.

 

7

Im surprised RealFuel has native support for boiloffProduct.

Without any editing, the service module does have boiloffProduct definition, so I did a bit of testing.

Album HWdEm0a will appear when post is submitted

Empty hydrogen tank + LqdHydrogen tank in a service module, the boiloff speed of Lqd does seem to match the filling speed of Hydrogen. Yeahhhh!

But what do you mean by cannot be used for propulsive venting? Is that means this is not realistic?

Link to comment
Share on other sites

7 hours ago, BUGescape said:

But what do you mean by cannot be used for propulsive venting? Is that means this is not realistic?

When ullage simulation is enabled for RF, boiled off propellant is assumed to be vented in a manner that provides a small amount of propulsion to settle the propellants. (Saturn V third stage SIVB did this with its hydrogen tank)

However, if you are collecting that gas then by definition you are not venting it. So any gas that you collected is not counted for propulsive venting.

Edited by Starwaster
Link to comment
Share on other sites

1 hour ago, Starwaster said:

When ullage simulation is enabled for RF, boiled off propellant is assumed to be vented in a manner that provides a small amount of propulsion to settle the propellants. (Saturn V third stage SIVB did this with its hydrogen tank)

However, if you are collecting that gas then by definition you are not venting it. So any gas that you collected is not counted for propulsive venting.

Didn't even know realfuel has such thing. Thanks.

Link to comment
Share on other sites

RealFuels v12.6.0 for KSP 1.3.1

  • Add multi-layer insulation and dewar (vacuum) bottles
    • MLI is configured by numberOfMLILayers on the TANK_DEFINITION
      • Each layer adds cost and mass
      • Cryo and balloon cryo tank types now come with 10 layers of MLI
    • Dewar / vacuum bottles defind by isDewar = true on the TANK
      • Cryogenic fuels in the Serivce Module tank type use this
      • Does not work with other types of insulation

New cryo implementation is by @Starwaster

Will be publishing a 1.4.x release soon, just needed to get this out first

Edited by blowfish
Link to comment
Share on other sites

1 hour ago, JebIsDeadBaby said:

Hi, 

I'd like to write a config file for an engine. Is there some formula that  allows for translation of real world parameters into RF ones? Or is it done by trail and error until engine performance makes sense in the game?

If you're just talking about a rocket then it's very straightforward. No trial and error involved.  First look at how other engines are done, especially for Realism Overhaul.

https://github.com/KSP-RO/RealismOverhaul/tree/master/GameData/RealismOverhaul/Engine_Configs

Set the engine's maxThrust to thrust in kilonewtons. minThrust should be set if you want to restrict the rocket's throttleability. Most rockets historically were not able to be throttled. When Saturn V first and second stage needed to be 'throttled down' they did so by shutting down the center engine. Lunar Module had an engine that could be throttled down to 10% SpaceX Merlin engine are also said to be able to throttle down to 40% of their max rated thrust (you very nearly always want to set thrust to the RL counterpart's vacuum thrust though some documents list an engine's SL thrust if it was a first stage engine)

propellant ratios are in volume never mass (unlike real life)

atmosphere curve is where you define the engine's isp rating for vacuum to sea level (or denser). The engine will have its max thrust at vacuum isp and calculate backwards for its isp (and therefore thrust) deeper into the atmosphere.

Those are some of the most important areas for setting the rocket's abilities. Other areas can wait until you're more familiar with the engine configs.

 

Link to comment
Share on other sites

On 5/20/2018 at 8:48 PM, blowfish said:

Recompile for KSP 1.4.3

I'm just trying to test (yes really) this in stock KSP 1.4.3.

No MM errors, but a lot of parts have either

NullReferenceException: Object reference not set to an instance of an object
  at ModuleRCS.FixedUpdate () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

or even worse, have this

MissingMethodException: No constructor found for BaseField::.ctor(KSPField, System.Reflection.MonoProperty, RealFuels.ModuleEnginesRF)
  at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <filename unknown>:0 
  at BaseFieldList`2[R,K].CreateList (System.Object instance) [0x00000] in <filename unknown>:0 
  at BaseFieldList.CreateList (System.Object instance) [0x00000] in <filename unknown>:0 
  at BaseFieldList`2[R,K]..ctor (System.Object host, Boolean ignoreUIControl) [0x00000] in <filename unknown>:0 
  at BaseFieldList`2[R,K]..ctor (System.Object host) [0x00000] in <filename unknown>:0 
  at BaseFieldList..ctor (UnityEngine.Object host) [0x00000] in <filename unknown>:0 
  at PartModule.ModularSetup () [0x00000] in <filename unknown>:0 
  at PartModule.Awake () [0x00000] in <filename unknown>:0 
UnityEngine.GameObject:Internal_AddComponentWithType(Type)
UnityEngine.GameObject:AddComponent(Type)
Part:AddModule(String, Boolean)
Part:AddModule(ConfigNode, Boolean)
PartLoader:ParsePart(UrlConfig, ConfigNode)
<CompileParts>c__Iterator1:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
 
(Filename:  Line: -1)

PartLoader: Encountered exception during compilation. System.NullReferenceException: Object reference not set to an instance of an object
  at PartModule.Load (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at Part.AddModule (.ConfigNode node, Boolean forceAwake) [0x00000] in <filename unknown>:0 
  at PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0 
  at PartLoader+<CompileParts>c__Iterator1.MoveNext () [0x00000] in <filename unknown>:0 
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

PartCompiler: Cannot compile part
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

 

Is this because I dare to try it without RSS/RO ?

Or are the RealFuels-Stockalike and RealPlume-RFStockalike patches not finally good to go and the reason for this?

 

Edit:

Hmm, perhaps I should not only use RealPlume-RFStockalike, but also the "default" RealPlume-Stock and also this
GameData/RealPlume/RealPlume-Stock/Compatibility.cfg

@PART[*]:HAS[@MODULE[ModuleEnginesRF]]:BEFORE[RealPlume]
{
   @MODULE[ModuleEnginesRF]
   {
      %RFConfig = TRUE
   }
}

@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[#RFConfig[TRUE]]]:FINAL
{
   @MODULE[ModuleEngines*],*:HAS[#RFConfig[TRUE]]
   {
      @name = ModuleEnginesRF
   }
}

which I found here: https://github.com/NathanKell/ModularFuelSystem/issues/98

Edit:

no avail, also that didn't help - too much parts couldn't be compiled.

 

Okay, @Phineas Freak already opened a Github issue about that ...

Edited by Gordon Dry
Link to comment
Share on other sites

I play 6.4x rescaled Kerbin, so I don't us RSS or RO, just RF with Raptor's Real Fuels stockalike configs (and Real plumes). I am also seeing most of the liquid fuel engines and SRBs missing as well. But RF Stockalike hasn't been updated for KSP 1.4.3 and the latest RF version so I expect that was the issue.

If I remove RFSA but keep RF the engines and SRBs show up and everything works fine although the engines are back on a diet of liquid fuel and oxidizer of course. 

Edited by EatVacuum
Link to comment
Share on other sites

@EatVacuum @Dux Aquila

Without logs and ModuleManager.ConfigCache files, there's nothing to be done except speculate.

Regarding RF Stockalike that doesn't necessarily prove it was the cause as what it does is use MM to patch the engine files to use ModuleEnginesRF and ModuleEngineConfigs ---- there's nothing really to update in it unless Module Manager introduced new limitations or started enforcing older ones as it did when multiple ordering phases were disallowed.

Link to comment
Share on other sites

On 5/12/2018 at 10:40 PM, Starwaster said:

When ullage simulation is enabled for RF, boiled off propellant is assumed to be vented in a manner that provides a small amount of propulsion to settle the propellants. (Saturn V third stage SIVB did this with its hydrogen tank)

However, if you are collecting that gas then by definition you are not venting it. So any gas that you collected is not counted for propulsive venting.

Back to the cold gas RCS thruster testing, if you can still help, I encountered some strange situations.

Album c9MorLw will appear when post is submitted

I have a rcs config using hydrogen with isp around 60 ish, thrust around 0.12. I attach a hydrogen gas tank behind my LqdHydrogen tank (hydrogen tank volume around 480L, and Lqdhydrogen tank volume around 40kL), and let it filled by natural boiloff. The filling speed shown in flight is around -20 ~ -30 depends on the main tank temperature, which is surprisingly low and took a lot of time to fill a 480 L hydrogen tank. A single cold gas RCS fire will use 2000 unit which depletes the hydrogen tank very fast...I don't know where I got wrong with but I think it should perform better than this? I did not tweak any resource conversion code...


 

Link to comment
Share on other sites

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...