Jump to content

[1.8+] Real Fuels


NathanKell

Recommended Posts

10 hours ago, Iso-Polaris said:

I know it belongs to

Stockalike RF Engine Configs thread

However no one is monitoring that thread.

I doubt that is true but we’re still not integrating it in RF... unless there is a tank specific section but RF automagically handles tank parts anyway.

you should make a pull request for the RF stockalike mod on its github site and ask raptor to merge it. And then he decides if he wants to use it. Or not. 

Link to comment
Share on other sites

  • 3 weeks later...

So, i have an issue, and if someone could help me with a little bit of info, i might be able to track it down the rabbit hole and fix my current issue.  i have over 100 mods, so issues are like breathing.  Im trying to get a functioning install so I can play how I want, but that has usually proven a little difficult.  Im usually pretty good at tracking down the various bugs I run into, but I just dont know where to look for this one.

 

Anyway, the reason I am posting this here is that it appears that RealFuels is throwing the error.  I get some stuff in my logs that say:

[RealFuels.ModuleFuelTankRF] AnalyticInfo being called with: sunAndBodyIn = 150.409234809136, backgroundRadiation = 288.213284429303, radArea = 251.480798100429, absEmissRatio = 0.407198926761887, internalFlux = 0, convCoeff = 12.6072170489755, ambientTemp = 16.9790979903821, maxPartTemp = 282.298420984878

And then my logs fill to the brim with the following lines, over and over:

[RealFuels.ModuleFuelTankRF] Q = NaN! W - T - F!!!

[RealFuels.ModuleFuelTankRF] WHO WOULD WIN? Some Well Written Code or One Misplaced NaN?

[RealFuels.ModuleFuelTankRF] heatLost = NaN

[RealFuels.ModuleFuelTankRF] deltaTime = 51.7000000011285

[RealFuels.ModuleFuelTankRF] deltaTimeRecip = 0.0193423597674695

[RealFuels.ModuleFuelTankRF] massLost = 0

[RealFuels.ModuleFuelTankRF] tank.vsp = 213000

 

Might someone point me in the direction of the cause of this error?  If I need to post the entire log, i will be happy to, it is just a lot to sort through, and this seems to be the pertinent bit.

Link to comment
Share on other sites

1 hour ago, xx_mortekai_xx said:

So, i have an issue, and if someone could help me with a little bit of info, i might be able to track it down the rabbit hole and fix my current issue.  i have over 100 mods, so issues are like breathing.  Im trying to get a functioning install so I can play how I want, but that has usually proven a little difficult.  Im usually pretty good at tracking down the various bugs I run into, but I just dont know where to look for this one.

 

Anyway, the reason I am posting this here is that it appears that RealFuels is throwing the error.  I get some stuff in my logs that say:


[RealFuels.ModuleFuelTankRF] AnalyticInfo being called with: sunAndBodyIn = 150.409234809136, backgroundRadiation = 288.213284429303, radArea = 251.480798100429, absEmissRatio = 0.407198926761887, internalFlux = 0, convCoeff = 12.6072170489755, ambientTemp = 16.9790979903821, maxPartTemp = 282.298420984878

And then my logs fill to the brim with the following lines, over and over:


[RealFuels.ModuleFuelTankRF] Q = NaN! W - T - F!!!

[RealFuels.ModuleFuelTankRF] WHO WOULD WIN? Some Well Written Code or One Misplaced NaN?

[RealFuels.ModuleFuelTankRF] heatLost = NaN

[RealFuels.ModuleFuelTankRF] deltaTime = 51.7000000011285

[RealFuels.ModuleFuelTankRF] deltaTimeRecip = 0.0193423597674695

[RealFuels.ModuleFuelTankRF] massLost = 0

[RealFuels.ModuleFuelTankRF] tank.vsp = 213000

 

Might someone point me in the direction of the cause of this error?  If I need to post the entire log, i will be happy to, it is just a lot to sort through, and this seems to be the pertinent bit.

Oh my god NO. Gawddamit

It means something related to conductivity is NaN (Not a Number) which as you can imagine really messes math operations up.

The analytic stuff; don't worry about that, it's just for debugging what happens during high warp or when you visit your ship after it's been unloaded for a few minutes or weeks or months.

But that goddamn NaN.

Better reply back with your output_log.txt file and your ModuleManager.ConfigCache file

That will tell me everything I need to know about your installation

Link to comment
Share on other sites

2 hours ago, xx_mortekai_xx said:

No problems.  You are probably going to hate me, as I have tons of mods.  But that is why we have the "find" function, right?

 

Anyway, i dropped them in a drive folder, found here:

 

https://drive.google.com/open?id=1CO3Hnn9WFdjZDNSrbYNtjhFflmJc9IvJ

 

I truly do appreciate you taking the time to help me out with this.

Need you to gather some more data please.

  • First, enable boiloffDebugging by editing RealSettings.cfg, go to the section that says RFSETTINGS and add a line that says debugBoilOff = True

So it should look something like 

RFSETTINGS
{
	engineMassMultiplier = 4.0
	useRealisticMass = true
	heatMultiplier = 1.0
	debugBoiloff = true

... <all the rest of the stuff below>
  • Start the game and enable physics thermal debugging (ALT-F12, Physics, Thermal)
  • Then load up the craft and (assuming here it's reproducible and still happening) open the action menu for every part
  • Take a screenshot
Link to comment
Share on other sites

Gladly.  I tried to keep the action menus close to the arrangement of the parts so it would be easier to determine what part is represented by what window.

 

https://drive.google.com/open?id=1SQnexUrFTsfT1ZjX7-E2sD3GpSR_BM12

 

I noticed that the engines were showing zeros for conduction and convection, so I tried the same vessel minus the engines, but I got the same result.

 

Link to comment
Share on other sites

3 hours ago, xx_mortekai_xx said:

Gladly.  I tried to keep the action menus close to the arrangement of the parts so it would be easier to determine what part is represented by what window.

 

https://drive.google.com/open?id=1SQnexUrFTsfT1ZjX7-E2sD3GpSR_BM12

 

I noticed that the engines were showing zeros for conduction and convection, so I tried the same vessel minus the engines, but I got the same result.

 

I notice you've got custom TANK_DEFINITION's set... your business, but lowering the temperature value for the TANK nodes, such as 80 for LqdOxygen will increase the rate of boiloff - What you just did there was tell it that boiloff at STP starts 10.15 K lower than than it should be. If the intent was to cool the tanks so they don't boil, well that's not what that field does.

You're also robbing yourself of certain features such as Dewar flask tanks and extra builtin insulation because the necessary data isn't in your custom tank definitions. Also, when boiloff occurs, there is boiloff gas which can be recovered and (with the right mod and parts) re-liquefied but that's also dependent on the tank configs that come with RF - yours are missing that as well.

Edited by Starwaster
Link to comment
Share on other sites

The custom configs are from a previous version (1.3.1, I only recently updated to 1.5.1), and dont include the newer features like the Dewars.  And the MLI was a new one for me with the 1.5.1 version, too.  As you have seen, i have a lot of mods, and the various additions to the tank defs were.....messy, to say the least (not to mention that I dont use most of the entries). So I started blowing the ones from the various mods away, and making my own so I can get uniformity and so I can adjust volumes to my own standards (I use ProceduralParts and use those tanks as a standard.  Given their malleability, i can pretty well match most parts and get a uniform volume based on one standard metric.)

I am in the process of getting everything reconfigured, but havent gotten it all yet.  The temps are set roughly 10K below the boiling point to simulate what SpaceX (and I am sure others, as well) does with their tanks, where they supercool their propellants to get them a bit more dense and get a bit of extra performance from them (specifically for hydrolox and methalox in my install.  I know it doesnt make it more dense.  I adjust the engine performance to finish the effect).  I never noticed an issue before, other than the fact that my cryos do boiloff, but that is normal and one of the reasons I use Realfuels in the first place.  I was not under the impression that adjusting the temp values would do anything but set the actual temperature of the contents of the tank.

Again, i do want to thank you for spending your time doing this.  I am well aware you could be doing something else, and I do appreciate your help here.

Edited by xx_mortekai_xx
Link to comment
Share on other sites

11 minutes ago, xx_mortekai_xx said:

The custom configs are from a previous version (1.3.1, I only recently updated to 1.5.1), and dont include the newer features like the Dewars.  And the MLI was a new one for me with the 1.5.1 version, too.  As you have seen, i have a lot of mods, and the various additions to the tank defs were.....messy, to say the least (not to mention that I dont use most of the entries). So I started blowing the ones from the various mods away, and making my own so I can get uniformity and so I can adjust volumes to my own standards (I use ProceduralParts and use those tanks as a standard.  Given their malleability, i can pretty well match most parts and get a uniform volume based on one standard metric.)

I am in the process of getting everything reconfigured, but havent gotten it all yet.  The temps are set roughly 10K below the boiling point to simulate what SpaceX (and I am sure others, as well) does with their tanks, where they supercool their propellants to get them a bit more dense and get a bit of extra performance from them (specifically for hydrolox and methalox in my install.  I know it doesnt make it more dense.  I adjust the engine performance to finish the effect).  I never noticed an issue before, other than the fact that my cryos do boiloff, but that is normal and one of the reasons I use Realfuels in the first place.  I was not under the impression that adjusting the temp values would do anything but set the actual temperature of the contents of the tank.

Again, i do want to thank you for spending your time doing this.  I am well aware you could be doing something else, and I do appreciate your help here.

To simulate denser propellants you should look at the utilization factor on the tank. That WILL allow you to load more propellant into the same sized tank and not do whatever it is you're doing with the engines.

Here is what I use (below). It's realistic in that you will get actual mass increase on the propellants because it's literally more propellants in the same sized tanks. The utilization factor is educated guesswork but it is a guess since SpaceX keeps the exact numbers a trade secret. (or at least I have yet to come across those numbers and so have had to rely on old NASA documents)

I left the temperature alone in these since the actual effect of going over the superchill temperature would be loss of densification before actual boiloff. The former of which RF doesn't handle and the latter affects gas recovery and venting. (vented boiloff is assumed by RF to be propulsive and is taken into consideration when calculating ullage state). Feel free to do what you want with them, but I would use a patch method like I did below instead of what you have now since it will survive and grow with RF updates.

I'm still trying to figure out where your NaN is coming from. It's definitely not a part conductivity issue but there is a zero creeping into the calculation somewhere. A temperature delta of exactly zero could do it except that condition wouldn't survive contact with the first physics frame. In fact it is zero just prior to the very first physics frame when the vessel is first initialized. The other thing that would do it is a tank wall area of zero but I can already see from your screenshot that the tank wall area is calculated. (procedural parts tend to have that problem but none of those parts are)

I probably won't be able to pursue this until after the weekend as I'm probably having a tooth extracted this weekend. (joy.)

 

+TANK_DEFINITION[Cryogenic]:FOR[ZZZMyTweaks]
{
	@name = SpaceX
	techRequired = largeVolumeContainment
	
	@TANK[LqdOxygen]
	{
		%utilization = 1.09954434
	}
	@TANK[Kerosene]
	{
		@utilization = 1.04938272 // 1.049382716049383
	}
	@TANK[LqdMethane]
	{
		%utilization = 1.12
	}
	TANK
	{
		name = ElectricCharge
		mass = 0.00289
		utilization = 1000
		fillable = True
		amount = 0.0
		maxAmount = 0.0
		note = (pressurized)
	}
	TANK
	{
		name = Nitrogen
		mass = 0.000095
		utilization = 342
		fillable = True
		amount = 0.0
		maxAmount = 0.0
		note = (pressurized)
	}
}

+TANK_DEFINITION[CompositeCryogenic]:FOR[ZZZMyTweaks]
{
	@name = SpaceX.Composite
	@basemass[0, ] *= 0.875
	techRequired = metaMaterials
	
	@TANK[LqdOxygen]
	{
		%utilization = 1.09954434
	}
	@TANK[Kerosene]
	{
		@utilization = 1.04938272 // 1.049382716049383
	}
	@TANK[LqdMethane]
	{
		%utilization = 1.12
	}
	@TANK[LqdHydrogen]
	{
		%utilization = 1.1
	}
	TANK
	{
		name = ElectricCharge
		mass = 0.00289
		utilization = 1000
		fillable = True
		amount = 0.0
		maxAmount = 0.0
		note = (pressurized)
	}
	TANK
	{
		name = Nitrogen
		mass = 0.000095
		utilization = 342
		fillable = True
		amount = 0.0
		maxAmount = 0.0
		note = (pressurized)
	}
}

+TANK_DEFINITION[ServiceModule]:FOR[ZZZMyTweaks]
{
	@name = ServiceModule.SpaceX.Composite
	@basemass[0, ] *= 0.875
	techRequired = metaMaterials
	
	@TANK[LqdOxygen]
	{
		%utilization = 1.09954434
	}
	@TANK[Kerosene]
	{
		@utilization = 1.04938272 // 1.049382716049383
	}
	@TANK[LqdMethane]
	{
		%utilization = 1.12
	}
	@TANK[LqdHydrogen]
	{
		%utilization = 1.1
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks]:HAS[#typeAvailable[*],~typeAvailable[SpaceX*]]]:FINAL
{
	@MODULE[ModuleFuelTanks]
	{
		typeAvailable = SpaceX
		typeAvailable = SpaceX.Composite
	}
}

 

Link to comment
Share on other sites

I do use the utilization function for pressurizing gaseous tanks.  But i was just adding more volume to get more propellant.   Im not sure why it never occurred to me to do it the way you have it, but I will be doing it that way from now on.

 

As for the tooth......ouch.  Good luck with that.

Edited by xx_mortekai_xx
Link to comment
Share on other sites

  • 3 weeks later...
13 hours ago, xx_mortekai_xx said:

Because at times it will call over and over and over, filling my logs. This makes it difficult to find other log entries at times.

AnalyticInfo debug logging happens exactly once for each tank part  when the craft is loaded after a period of being unloaded.

I'll restrict it to only happening when boiloff debugging is enabled, for the next build. 

Link to comment
Share on other sites

  • 4 weeks later...
On 1/14/2019 at 11:50 AM, Starwaster said:

Real Fuels for KSP 1.6.1 is in pre-release

It won't be released for CKAN indexing as Community Resource Pack hasn't been updated and I still want to use this opportunity to clear some of the outstanding issues that have been sitting around for a couple of years. 

https://github.com/NathanKell/ModularFuelSystem/releases/tag/rf-v12.7.4

While trying to sort out behavior identical to this post:

I found out that this is apparently also the cause of an issue I've been suffering that was causing my install to take around twice as much memory to run as it should with the amount of mods I've got installed:

(TL;DR: Some extra DLLs in the plugins folder were causing assets to be loaded at least twice leading to duplicated menus and flags as well as essentially doubling the memory needed to run the game.)

 

Anyway, after doing some searching I've found that this pre-release for KSP 1.6.1 also contains the offending DLLs in its plugins folder which is causing double asset loading. The question is, do they actually need to be in there for this release of RF to work, or is it possible to remove them without losing the mod's functionality until you can release a proper version of the mod without them?

 

Thanks

 

EDIT: Alternatively, has anyone tried the non-pre-release version of RF built for 1.5.1 in 1.6.1 as a stopgap until a proper 1.6.1 release can be finished?

Edited by SpacedInvader
Link to comment
Share on other sites

@SpacedInvader

No, sorry, the plugin folder definitely had extraneous dll files. I re-uploaded without those files.

You can re-download or delete them yourself. The only dll files that should be in RealFuels\Plugins is RealFuels.dll, and TestFlightRF.dll (in addition to the assembly/unity dlls there was also a SolverEngines.dll which is already present in the SolverEngines folder)

Link to comment
Share on other sites

Could be me, but I can't seem to stuff the inflatables into buckboards, i've even tried compressing them:

@PART[WBI_Chuckwagon|WBI_SmokePipe|WBI_Hacienda|WBI_DocSciLab]:NEEDS[KIS]
{
	%MODULE[ModuleKISItem]
	{
		volumeOverride = 425
		editorItemsCategory = false
	}
}

But a Hacienda is still 4321L which is about 10 buckboards. Am I missing the point somewhere?

[edit.. what is %doing there..]

Edited by MacLuky
Link to comment
Share on other sites

29 minutes ago, Starwaster said:

@MacLuky none of that looks remotely Real Fuels related. That’s a KIS module. Did you mean to post this on their thread...?

I'm an idiot, sorry. Should be pathfinder. I am not sure how this happened

Edited by MacLuky
Link to comment
Share on other sites

1 hour ago, Starwaster said:

@SpacedInvader

No, sorry, the plugin folder definitely had extraneous dll files. I re-uploaded without those files.

You can re-download or delete them yourself. The only dll files that should be in RealFuels\Plugins is RealFuels.dll, and TestFlightRF.dll (in addition to the assembly/unity dlls there was also a SolverEngines.dll which is already present in the SolverEngines folder)

No worries, thank you for the quick fix!

I know my mod load is an extreme case, but 20+ GB was clearly way out of way out of line with what ~200 mods should have needed. This fix brought that down to a much more reasonable 12GB. I have to say though, knowing what I do about Unity (which isn't all that much, but I've never liked the way it handles memory) that it doesn't actually surprise me that a few extra DLLs in one mod's folder would force the engine to load every asset in the entire game multiple times. I'm tempted to test what might happen if multiple mods had these files laying around... would the engine just keep loading copies of files until the computer exploded? :sticktongue:

Edited by SpacedInvader
Link to comment
Share on other sites

8 hours ago, SpacedInvader said:

No worries, thank you for the quick fix!

I know my mod load is an extreme case, but 20+ GB was clearly way out of way out of line with what ~200 mods should have needed. This fix brought that down to a much more reasonable 12GB. I have to say though, knowing what I do about Unity (which isn't all that much, but I've never liked the way it handles memory) that it doesn't actually surprise me that a few extra DLLs in one mod's folder would force the engine to load every asset in the entire game multiple times. I'm tempted to test what might happen if multiple mods had these files laying around... would the engine just keep loading copies of files until the computer exploded? :sticktongue:

Or until the quadratic formula explodes.

Link to comment
Share on other sites

I'm having an issue with Apollo service module (fasa): the tank is pressurized, I choose the right propellant, but every time, when I need to fire the engine up near the moon, it doesn't work!

The game always tells me that the vapor is in the feedlines (of each engine: service module and LM). What should I do?

Link to comment
Share on other sites

52 minutes ago, elamiramir said:

I'm having an issue with Apollo service module (fasa): the tank is pressurized, I choose the right propellant, but every time, when I need to fire the engine up near the moon, it doesn't work!

The game always tells me that the vapor is in the feedlines (of each engine: service module and LM). What should I do?

Use RCS to settle the tank. Pressurized tanks only mean they can be used with pressure fed engines. Ullage management is still a must. 

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