-
Posts
8,734 -
Joined
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Angelo Kerman
-
[DEVTHREAD] Deep Space Exploration Vessels
Angelo Kerman replied to Angelo Kerman's topic in KSP1 Mod Development
By the way, 1.0.1 was just released. I'm at work so I can't check, but apparently there is now a temperature gauge? Can anyone shed light on this? -
Well, I am continuing regardless. I just uploaded the latest WildBlueTools, where ModuleRadiator and HeatManager currently reside. When I get home I'll break them out and put them into Cooldown. Changes from last night: - INPUT_RESOURCE is now supported. You can specify multiple coolants. - coolantResource removed - radiator manager will not cool a part below room temperature (293K). It was cooling to ambient, which in space is 4K. - performance enhancements - radiator parts are excluded from the HeatManager's parts list that it cycles through - if a radiator isn't extended then it only accepts 1/100th the requested input heat. This is an initial pass at tuning radiators that are stowed. Todo: - find ways to improve the heat management code- do I have to re-calculate a radiator 's current thermal energy for each part, or can I do it once per time-tick, and all parts work against that once per tick calculation? - fix a bug where if a radiator explodes it causes nullRefs. Just need to tell the HeatManager that the radiator is about to explode. - find out if physics-less parts take on heat. If not then exclude them from the parts list. - account for radiators that don't extend in the heat transfer calculations. - implement optional coolant loss over time, probably per INPUT_RESOURCE - implement optional ElectricCharge requirement. - implement optional module to specify the lowest temperature that the part may be cooled to. Without the module, default is 293K, settable in a config file for the mod. Other: What benefits, if any, do Engineers give? How can I use the built-in shader that makes parts glow as they get hot? When I increase the part temperature, I don't see any texture changes unless I do the change myself.
-
[DEVTHREAD] Deep Space Exploration Vessels
Angelo Kerman replied to Angelo Kerman's topic in KSP1 Mod Development
LOL! Looks like I need to drastically drop down the heat transfer while the radiators are stowed. Hey I'm just glad the basic concept is working. Now to refine it. -
Currently from what I've seen, KSP uses thermodynamics to transfer heat around a vessel: a hotter part transfers heat to the cooler part until the two reach thermal equilibrium. For DSEV, I actively pull heat out of a part and put it into the radiator. I made the assumption that a vessel has a circulatory system built-in, and the radiator circulates coolant through the vessel. That way you don't need dedicated heat pipes and you keep your part count low. Some of the feedback I got tonight was that radiators might benefit from a heat transfer rate. Right now I assume that the coolant heats up quickly, gets circulated to the radiator where it "drops off" the heat, cools down, and is ready for the next part. I could account for heat difference between a part and the coolant but I decided that would take a lot of calculations and slow the game down. So that's something to think about too: reality vs gameplay.
-
Not sure, but one solution is open-cycle cooling. With radiators you have closed-cycle and open-cycle cooling. closed-cycle keeps the coolant within the craft and it takes awhile to cool off. Open-cycle dumps coolant overboard, and in return you get rapid cooling. The radiator code is designed to support both types and it's been proven to work nicely. Here is a sample config file. It's a WIP but it gives you an idea where I'm going with the radiator code in DSEV/Cooldown heat reference mod. I'm using this in 0.3.17 MODULE { name = ModuleRadiator animationName = Deploy pivotName = sunPivot IsBreakable = true raycastTransformName = suncatcher chargeRate = 0 //A value between 0 and 1, specifies how much of the part's //maximum temperature may be used by the radiator. //Radiator max temp should be below the resource's critical point. //Assuming the radiator itself is pretty sturdy and won't melt. workingTempFactor = 0.85 //INPUT_RESOURCE specifies the coolant needed for heat transfer. It is required for active cooling. //Active cooling circulates coolant to other parts in the vessel to cool them down. //Without active cooling, parts must rely on the parts they're attached to, //their own mass, and the environment to cool down. //You can use whatever resource you want for coolant. Some resources are better than others. //If you specify multipult INPUT_RESOURCE nodes, be sure that their combined ratios add up to 1. INPUT_RESOURCE { name = Coolant flowMode = FLOW_NONE ratio = 1.0 } //TODO: Get rid of this and use INPUT_RESOURCE nodes instead. coolantResource = Coolant //Radiators support two types of cooling: closed-cycle, and open-cycle. //Closed-cycle keeps circulating coolant within the vessel, and it may take awhile //for the vessel to cool down. Open-cycle cooling sheds heat more quickly, //but at the expense of coolant (the resources specified by INPUT_RESOURCE). //This value specifies the number of units per second to dump overboard. //Each INPUT_RESOURCE above will be dumped according to their ratio. //If you don't want open-cycle cooling, then don't include this field or set it to 0. coolantDumpRate = 66.67 //Specifies the coolant loss rate. //The first number represents the number of units per second that is lost //in general. The second number is the number of units lost per g of acceleration. //That second number is particularly useful for liquid droplet radiators. //Uncomment this line if you want coolant loss. //coolantLossRate = 0,1.0 }
-
[DEVTHREAD] Deep Space Exploration Vessels
Angelo Kerman replied to Angelo Kerman's topic in KSP1 Mod Development
Absolutely. I have some work to do on it but I have the proof of concept tested. I started a discussion on heat management here: http://forum.kerbalspaceprogram.com/threads/118192-1-0-Cooldown-A-Community-Discussion-of-Heat-Management My plan is to break the heat management code out of WildBlueTools and put it into Cooldown, my reference mod for the discussions. I'll put the large and small DSEV radiators there as reference parts as well. -
Hi folks, I just released DSEV 0.3.17, and I've been getting some inquiries about how I did the heat radiators. Since radiators are a hot topic, I thought I'd start a thread where we can share what we've learned about heat management. At the very least, this information exchange will help people create their own heat management system. Ideally though, we'd create a community-driven heat management mod. To start off, I'll share all the notes I took over the past week. Many many thanks to Red Iron Crown and NathanKell for their insights! From KSP 1.0 Readme: Heat Simulation: - Completely revised part heating model, energy flux is considered, not merely temperature. - All game temperatures changed from ‘Kervin’ to proper Kelvin. - Radiative, conductive, and convective heating and cooling are simulated. - Parts can have individual radiative, conductive, and convective properties. - All parts now emit a blackbody radiation glow if they get hot enough. - Conduction between attached parts is more accurately modelled. - Parts can occlude other parts from being exposed to sunlight, celestial body albedo/radiation and supersonic flow. - Reentry/hypersonic flight heating is now simulated. - Added difficulty Setting to scale aerodynamic heating. - Atmospheric temperature, and thus density, takes latitude and sun position into account. - Celestial bodies accurately emit thermal radiation making nearby craft warmer. - Service modules, fairings and cargo bays can be used to protect parts inside from heat. - Heat shields provide (finite) ablation-based protection for parts behind them. From Part object: //This is how you add or remove heat from the part. + value adds heat, - value removes heat. public void AddThermalFlux(double kilowatts); These are in kJ/sec //negative values indicate heat is going out of the part and into the environment. Positive values mean heat is coming into the part. public double thermalConductionFlux; public double thermalConvectionFlux; public double thermalRadiationFlux; public double thermalInternalFlux; public double thermalInternalFluxPrevious; public double thermalMass; //Kj/K public double thermalMassModifier; public double thermalMassReciprocal; From Red Iron Crown: Red Iron Crown Thermal mass is the capacity of the part to absorb heat, i.e. the specific heat of the material times the mass of the part. It takes more heat to raise the temperature of a part by a given amount if it has a higher thermal mass. So parts with higher thermal mass change temperature more slowly than those with a lower thermal mass, both upwards and downwards. Radiative area is the theoretical area that emits or absorbs radiated heat. Parts emit heat when in shadow and absorb it when in sunlight (at least I think this is modelled). Parts with a larger radiative area gain or lose heat faster than those with smaller radiative areas. As I understand it: - All parts has a default specific heat of 800 kJ/tonne-Kelvin defined in Physics.cfg in the root folder (standardSpecificHeatCapacity) - Parts can have that modified in their cfgs by a multiplier (thermalMassModifier, setting this to 2 would double specific heat) - Resources also have their own specific heats defined in ResourcesGeneric.cfg in Gamedata/Squad/Resources (hsp) - Part thermal mass thus should be (dryMass * standardSpecificHeatCapacity *thermalMassModifier) + (resourceMass * hsp) <- Repeat last section for each resource within the part. Units are kJ/K. **** Some math I did: thermal energy = thermalMass (KJ/K) * temperature (K) If my radiator is at 1000 K, then my thermal energy = 1790 * 1000 = 1,790,000 KJ If my radiator's maximum temperature is 2400K, and we have a "working temperature" of 0.85 of that, then the maximum thermal energy that the radiator can take on is: 2400 * 0.85 * 1790 = 3,651,600 KJ Remember that you need to conserve heat. If you add it from one part, remove it from another. Transferring heat: Heat goes from hot part to cool part until equilibrium is reached. KSP game itself handles heat radiation and will calculate its radiative area automatically. I'll break the heat management out of DSEV later this evening to serve as a reference.
-
[DEVTHREAD] Deep Space Exploration Vessels
Angelo Kerman replied to Angelo Kerman's topic in KSP1 Mod Development
Get the latest version HERE IMPORTANT NOTES - This update will break your saves. Please retire any vessels in flight. - Please redo action groups for your VAB/SPH vehicle's radiator panels as these will have changed since last update. - The Centrifuge ring and countertorque ring use the latest InfernalRobotics mod; please set up your action groups accordingly. - Heat management is a work in progress. The radiators DO work and keep your craft cool! But more tuning is needed. Right now the Fusion Reactor and Supernova engine heat production is dialed back until I find the right balance. Thank you Red Iron Crown and NathanKell for your valuable information on the new heat mechanics! Gameplay - Recompiled for KSP 1.0 - Added new part category for DSEV. Fuel Tanks - Removed the old fusion pellet tanks. - Added the FLM-900 Multipurpose Storage Tank. It's a half-sized version of the FLM-1800 designed to fit the half-hex truss. - Added the FLM-14400, FLM-7200, and FLM-3600 Multipurpose Storage Tanks. These massive orange tanks are able to hold different resources, and you can toggle their diameters from 3.75m to 2.5m. - The resource storage templates are now based upon 1L units, in-line with the revisions to Community Resource Pack. Now you can hold more stuff! - Added the Coolant storage template. ISRU - Added liquid hydrogen creation to the stock ISRU. - Added FusionPellets creation to the stock ISRU. Power & Heat management - The Fusion Reactor now uses the stock resource generator. - The radiators now provide active and passive heat radiation. You can also vent coolant (open-cycle cooling mode) to shed heat more rapidly. - Radiators now start to glow red based upon temperature more accurately. NOTE: More heat management is on the way. Bug Fixes & Enhancements - Fixed an issue where the fusion reactor and Supernova engine would not remember that they were activated. - Fixed an issue with the ArcJet RCS thrusters not shutting off via action groups. - Fixed an issue with the ArcJet RCS thrusters still showing stock thrust effects. - ArcJet and Supernova now use liquid hydrogen by default (previously it was liquid fuel, with a liquid hydrogen switch if Near Future Propulsion was installed). Rename MM_LiquidFuel.txt to MM_LiquidFuel.cfg if you want them to use LiquidFuel instead. - Removed SpinHub plugin in favor of latest Infernal Robotics 0.20c. -
[DEVTHREAD] Deep Space Exploration Vessels
Angelo Kerman replied to Angelo Kerman's topic in KSP1 Mod Development
I'll have source code up tonight after work along with the latest release. It's actually not too bad to do once you understand how the game's heat mechanics work. There is a thread in game suggestions where I posted a bunch of my findings. NathanKell and Red Iron Crown were really helpful! -
[DEVTHREAD] Deep Space Exploration Vessels
Angelo Kerman replied to Angelo Kerman's topic in KSP1 Mod Development
Yup! Works just fine. -
[DEVTHREAD] Deep Space Exploration Vessels
Angelo Kerman replied to Angelo Kerman's topic in KSP1 Mod Development
mbm for tonight's release. Wasn't enough time for dds. Next release after tonight will be with dds -
[DEVTHREAD] Deep Space Exploration Vessels
Angelo Kerman replied to Angelo Kerman's topic in KSP1 Mod Development
The next update, which I will have ready tonight, will be 1.0 compatible. -
[DEVTHREAD] Deep Space Exploration Vessels
Angelo Kerman replied to Angelo Kerman's topic in KSP1 Mod Development
Thanks guys! And more good news: I have my radiators working! DSEV radiators will go through all the parts in a vessel and attempt to cool them down to ambient temperature- or room temperature if the part has crew capacity. The radiators themselves take on the heat. This is all done within the game's heat system, so parts attached to the radiators may get hotter. That said, I had a Supernova running full throttle on the pad and staying a nice cool room temperature. So not only will they cool the Supernova and fusion reactor, they can cool fuel cells, drills, and ISRU processors, and LV-Ns... Radiators have Coolant, a resource with good thermal mass per unit. But I've set up the module so that you can specify different types of coolants, such as liquid fuel, oxidizer, and monopropellant if you wish. My radiators support both closed-cycle and open-cycle cooling. With open-cycle cooling, you can rapidly cool the radiator at the expense of venting Coolant. The nice thing as this paves the way for those liquid droplet radiators that I've wanted forever... -
Help to make a mod: Radiators
Angelo Kerman replied to Dragonchampion's topic in KSP1 Mods Discussions
Very cool, Nert. i just got my DSEV radiators working this morning. They support ship-wide thermal transfer, meaning they actually go through the vessel's parts and cool them to ambient temperature (or room temperature for parts with crew capacity) Perhaps we all could collaborate on a radiators mod? -
Dedicated Radiator Panel parts
Angelo Kerman replied to Whirligig Girl's topic in KSP1 Suggestions & Development Discussion
I have my radiators! The next update of DSEV, which will be released tonight, contains the foundation for my active radiator system. In a nutshell, the radiators take on the heat of the vessel's parts, keeping them as close to ambient temperature as possible while still accounting for heat conductivity of the part. Right now, that means kerbals are going to get quite cold, but it's step one in my plan. Thank you Red Iron Crown and NathanKell for your valuable information! -
Dedicated Radiator Panel parts
Angelo Kerman replied to Whirligig Girl's topic in KSP1 Suggestions & Development Discussion
Yeah no worries. I also found this in the Part class: public void AddThermalFlux(double kilowatts); That's pretty much the last piece of the puzzle. I know how to calculate the thermal energy for each part, and with that method, I can reduce the amount of thermal energy in the part and transfer it to my radiators. I should have DSEV working with the new heat next week. -
[DEVTHREAD] Deep Space Exploration Vessels
Angelo Kerman replied to Angelo Kerman's topic in KSP1 Mod Development
So, good news and bad news. Bad news: radiators will remain dark until next week-ish while I sort out the new heat mechanics. Good news: mod will be 1.0 ready by tomorrow night, and has new parts. More good news: in my quest to get the radiators working again, they will be able to cool the entire spacecraft. -
Dedicated Radiator Panel parts
Angelo Kerman replied to Whirligig Girl's topic in KSP1 Suggestions & Development Discussion
Fantastic, thank you. Based on the above explanations: radiativeArea: Probably in m^2, and the game somehow calculates this. These three parameters are the heat transfer, in kilowatts, of the part, into the environment. Negative values must mean that heat is going out of the part. thermalConductionFlux; thermalConvectionFlux; thermalRadiationFlux; These parameters are the kilowatts of heat transfer that goes between parts. I think positive values mean heat is coming in and negative is heat going out. thermalInternalFlux; thermalInternalFluxPrevious; Thermal mass of the part: thermalMass: (dryMass * standardSpecificHeatCapacity *thermalMassModifier) + (resourceMass * hsp) //Resource thermal mass calculated for each resource. Possibly already done with resourceThermalMass. Thanks Red Iron Crown! For my radiator with thermalMassModifier = 4.475 and dryMass = 0.5### and no resources: thermalMass = 0.5 tonnes * 800 * 4.475 = 1,790 KJ/K (confirmed in game) I based my thermalMassModifier on lithium's specific heat capacity of 3.58 KJ/Kg-K (3850 KJ/tonne-K) ### I suppose I could also have 0.5tonnes of lithium as a coolant resource, brilliantly named Coolant. NOTE: If I have a Coolant resource, then I now have a way to sacrifice Coolant for a quick heat dump. So, thermal energy = thermalMass (KJ/K) * temperature (K) If my radiator is at 1000 K, then my thermal energy = 1790 * 1000 = 1,790,000 KJ If my radiator's maximum temperature is 2400K, and we have a "working temperature" of 0.85 of that, then the maximum thermal energy that the radiator can take on is: 2400 * 0.85 * 1790 = 3,651,600 KJ OK, now I'm starting to see the picture. Once I know my thermal energy, I can transfer that energy from a part to my radiator, and then calculate my radiator's new temperature as well as the part's new temperature. Now my next question: how can I prevent heat from going out of my radiator and back into parts it is attached to? I will have my working radiators, dagnabbit! -
Dedicated Radiator Panel parts
Angelo Kerman replied to Whirligig Girl's topic in KSP1 Suggestions & Development Discussion
So I'm continuing my investigation into the new heat mechanics and found these parameters in the Part object: public double thermalConductionFlux; public double thermalConvectionFlux; public double thermalInternalFlux; public double thermalInternalFluxPrevious; I'm guessing here, but are these in terms of Kelvin? Are they measured in units/sec or units/fixed update? If I know an object's mass and current temperature, and its specific heat capacity 800, then I should be able to get the amount of heat in watts that a part has, right? Basically if I know how much thermal energy a part has, then I can transfer that energy to a radiator and cool the part while heating the radiator.