Jump to content

[Alpha WIP] T-Tech Modular Reactors - (Much More) Functional Thermodynamics


Sypress

Recommended Posts

Greetings. As a small number of people know, I had a previous reactor mod that I designed for generating power for larger vessels. It was prone to bugs, such as unintentional separation of ship components, melting of space suits, and a myriad of other problems that are still under investigation.

The plugin's design was inherently flawed in the fact that I relied on KSP's heat system to generate power and KSP doesn't simulate heat while vessels are 'packed' or on-rails. This leads to serious problems when the ship is unpacked at the end of a warp, resulting in such things as the reactor being at -9999999999999 degrees and taking 5 years to gain back it's power output.

This time I'm working on an ambitious project to make properly-simulated thermodynamics for a new series of parts, albeit with very little knowledge of the subject itself. So far, the plugin can determine the specific heat capacity of an object given it's weight and material along with how much energy it might lose with a given surface area, emissivity, and temperature. However, atmosphere and sunlight is not accounted for yet, though hopefully will be soon.

Hopefully I can maintain focus long enough to turn this into a reality.

Progress can be tracked on github: https://github.com/Calrizan/T-TechModularReactors/

-Heat simulation properties of various materials have been added.

-Weight-compensation is taken into account when calculation an object's specific heat capacity.

-Ambient temperature has been incorporated and works as desired.

-Config-based setting of materials and properties is done. Commonly-used construction materials have been included in an inbuilt dictionary. This will be expandable to prevent limitations.

The plugin itself and the parts won't be provided until things have advanced far enough to warrant modelling of custom parts.

Edited by Sypress
Title
Link to comment
Share on other sites

Greetings. As a small number of people know, I had a previous reactor mod that I designed for generating power for larger vessels. It was prone to bugs, such as unintentional separation of ship components, melting of space suits, and a myriad of other problems that are still under investigation.

The plugin's design was inherently flawed in the fact that I relied on KSP's heat system to generate power and KSP doesn't simulate heat while vessels are 'packed' or on-rails. This leads to serious problems when the ship is unpacked at the end of a warp, resulting in such things as the reactor being at -9999999999999 degrees and taking 5 years to gain back it's power output.

This time I'm working on an ambitious project to make properly-simulated thermodynamics for a new series of parts, albeit with very little knowledge of the subject itself. So far, the plugin can determine the specific heat capacity of an object given it's weight and material along with how much energy it might lose with a given surface area, emissivity, and temperature. However, atmosphere and sunlight is not accounted for yet, though hopefully will be soon.

Hopefully I can maintain focus long enough to turn this into a reality. A github link will be up shortly.

I'm a Materials Science Engineering student currently taking two courses in theoretical and applied thermodynamics.

So yeah, if you figure out what on earth it all means, let me know.

Link to comment
Share on other sites

As promised, the github link: https://github.com/Calrizan/T-TechModularReactors/

The code is all boilerplate at the moment, so it doesn't really do much besides provide basic functions.

I'm a Materials Science Engineering student currently taking two courses in theoretical and applied thermodynamics.

So yeah, if you figure out what on earth it all means, let me know.

I figured out -some- of it. And some of it is frightening, like how much energy exists in a single kilogram of thorium.

Link to comment
Share on other sites

Heat management in space is very important, and i'm surprised no one made fully functional mod tackling this issue. I hope you will succeed :)

I never really thought about it until I read the Mass Effect codex entries. There's actually a great deal of interesting ideas on how to deal with heat in there.

Link to comment
Share on other sites

I never really thought about it until I read the Mass Effect codex entries. There's actually a great deal of interesting ideas on how to deal with heat in there.

The plan is to incorporate heatsinks and thermocouples into the design, but I need to construct a working example first to ensure that everything works as intended. Hopefully some progress will be made today!

Link to comment
Share on other sites

Heat processing works as planned and the code has been pushed to a pre-alpha state. It's functional, but doesn't do much besides show you the temperature scaling for an object of given size. In this case, an aluminum block @ 2 tonnes with 6m2 of surface area.

Link to comment
Share on other sites

I never really thought about it until I read the Mass Effect codex entries. There's actually a great deal of interesting ideas on how to deal with heat in there.

It'd be curious to see if something like that could actually be done, but storing heat like that would have issues, such as how you would 'pump' heat from a lower temperature object to a greater temperature object. The Peltier effect could do this to a small extent.

Link to comment
Share on other sites

I've hit a small snag that seems intent on disrupting the completion of the plugin. Simulating heat between two objects in a non-full-body way is poorly documented. Everything else is modeled and ready to go except for this.

Link to comment
Share on other sites

It'd be curious to see if something like that could actually be done, but storing heat like that would have issues, such as how you would 'pump' heat from a lower temperature object to a greater temperature object. The Peltier effect could do this to a small extent.

With one of these?

35-181-010-08.jpg

Link to comment
Share on other sites

To solve 'pumping' heat why don't you do exactly that. use a heat exchanger, same principle that air conditioning runs on, closed cycle cryogenic helium is I think the most efficient method currently. It would be somewhat bulky, the exchange is very nearly 1:1 almost no loss in the system. The exchanger takes advantage of the thermal properties of gases while they expand or are compressed which responds in kind with exothermic properties and endothermic properties. In this way you can make the 'hot' end hotter from the 'cool' end. thing to keep in mind that is as the hot end gets hotter the cool end get cooler, as each side reaches it's saturation point the (longer/or higher pressure) the exchanger has to work to change the temperature. So it can be insanely efficient at temperatures close to the operating range of the gases in the exchanger, but out side of that it begins to get saturated and eventually destroy itself (melting)

Link to comment
Share on other sites

Shoved another update to Github. Locating sinks on a vessel should be easy enough. Adjacency is not implemented yet. But Sink objects now exist in game logic. Code was refactored to look more 'pretty' (thank Majiir for that).

Mathematics for part-to-part heat transfer are slowly congealing into a semi-solid equation. Sinks will likely accept as much heat as possible in the form of J/s until their output matches input, increasing overall heat capacity for the system. Radiators will make use of expansive surface area to dissipate large amounts of heat, and thermocouples will take advantage of the transfer difference between parts to generate power.

Link to comment
Share on other sites

Two problems have been encountered that are hindering my progress. The first problem is the math behind moving heat (or energy) from one object to another. The second is an engine-related problem. When Time Warp hits 100k, temperatures immediately go to -infinity for no explainable reason. I suspect that orbital body heat isn't processed at those rates.

Link to comment
Share on other sites

Substantial progress has been made thanks to the efforts of Odin and BlackMoon of the #KSPOfficial channel on EsperNet. Parts now conduct heat in the manner intended, but there's a slight drawback due to the math involved. With the current simulation model, any timewarp over 50k causes the variables to oscillate wildly out of control until they can't be processed, resulting in NaN for reactor and sink values. This can be mitigated, but it will require users to wait in realtime for the core to heat up to operating temperature, which may take 10 or so minutes with the larger versions even with 5MJ/s being dumped into the core. Adjustable output (fuel rods) will be added sooner or later to handle these minor problems.

Considerable thanks to Majiir (Kethane) for his suggestions and coding help, Greys (Hexcans) for his constant pestering about making a forum thread, BlackMoon for badgering me into getting the code right, Odin for supplying me with the necessary mathematics, and Taniwha (Extraplanetary Launchpads) for providing clues and examples through his own addon. Without their help, this wouldn't have been possible.

Welcome to Alpha testing. :cool:

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