The current code incorrectly calculates how much heat to transfer from reactor fuel to coolant. It results in massively more heat being added to the coolant than is removed from the fuel. Because of this, heat output of the research reactor is effectively proportional to the amount of active coolant present. This means that running a reactor no coolant or small amounts of coolant causes it to produce significantly less heat than when run with the maximum amount of coolant present.
The reason this happens is as follows:
Temperatures in the research reactor are currently updated in two steps:
1) Every tick, the active fuel is increased in temperature by 2C
This is implemented in the code in the "Reactor.React" method:
float temperatureDelta = GameUtil.EnergyToTemperatureDelta(-10f * dt * activeFuel.Mass, activeFuel);
activeFuel.Temperature += temperatureDelta;
This is calculates the temperature delta from adding (10 * dt * mass) DTUs which is (10 * dt * mass) / (SHC * mass). Because SHC of refined uranium is 1, dt is always .2, and the mass terms cancel out: this is always 2.
2) The temperatures of the fuel and the coolant are recalculated to be equal. The apparent intention of this code is to bring the fuel and the coolant into thermal equilibrium in a single step. However given typical values mass and temperature it actually adds massively more heat to the coolant than is removed from the fuel.
public static void ForceConduction(PrimaryElement a, PrimaryElement b, float dt)
{
float num1 = Mathf.Min(a.Element.thermalConductivity, b.Element.thermalConductivity) * dt;
float num2 = a.Temperature * a.Element.specificHeatCapacity * a.Mass;
float temperature1 = a.Temperature;
float num3 = b.Temperature * b.Element.specificHeatCapacity * b.Mass;
float temperature2 = b.Temperature;
float num4 = num3 / (num2 + num3) * num1;
a.Temperature = (temperature2 - temperature1) * num4 + temperature1;
b.Temperature = (float) (((double) temperature1 - (double) temperature2) * (1.0 - (double) num4)) + temperature2;
}
This function is called with fuel as "a" and coolant as "b"
For example immediately after venting there will be ~2.75kg of enriched uranium at ~400C. 30kg of reserve coolant water (at 95C) will then interact with the fuel. In a single step this will result in fuel at 364C (a loss of 98kDTUs) and water at 364C (a gain of 33,760kDTUs).
On the next step the ~2.75kg of reactor fuel will be increased by 2C then "equilibrated" down by .3C "balanced" by the 30kg of water increasing 1.7C.
Edit: this code would correctly bring the two materials into thermal equilibrium:
public static void ForceConduction(PrimaryElement a, PrimaryElement b, float dt)
{
#float num1 = Mathf.Min(a.Element.thermalConductivity, b.Element.thermalConductivity) * dt; #TC of materials is irrelevant
float num2 = a.Element.specificHeatCapacity * a.Mass; #Heat capacity of material 1 (does not depend on temperature)
float temperature1 = a.Temperature;
float num3 = b.Element.specificHeatCapacity * b.Mass; # Heat capacity of material 2( does not depend on temperature)
float temperature2 = b.Temperature;
float num4 = num3 / (num2 + num3); # Heat capacity of b as fraction of total heat capacity
a.Temperature = (temperature2 - temperature1) * num4 + temperature1;
b.Temperature = (float) (((double) temperature1 - (double) temperature2) * (1.0 - (double) num4)) + temperature2;
}
1) Run the research reactor with abundant coolant. And measure heat output.
2) Run the research reactor with restricted coolant (e.g. 100g/s of water) and measure heat output.
1) will produce an order of magnitude more heat than 2)
-
2
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 accountSign in
Already have an account? Sign in here.
Sign In Now