Make heat generator not lose energy when below ambient temperature, and use the Carnot Engine equations for efficiency.
This commit is contained in:
parent
8a4aaff44a
commit
3544addf20
1 changed files with 8 additions and 3 deletions
|
@ -405,9 +405,14 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu
|
||||||
@Override
|
@Override
|
||||||
public double[] simulateHeat()
|
public double[] simulateHeat()
|
||||||
{
|
{
|
||||||
double workDone = getTemp()*thermalEfficiency;
|
if(getTemp() > 0)
|
||||||
transferHeatTo(-workDone);
|
{
|
||||||
setEnergy(getEnergy() + workDone);
|
double carnotEfficiency = getTemp() / (getTemp() + IHeatTransfer.AMBIENT_TEMP);
|
||||||
|
double heatLost = thermalEfficiency * getTemp();
|
||||||
|
double workDone = heatLost * carnotEfficiency;
|
||||||
|
transferHeatTo(-heatLost);
|
||||||
|
setEnergy(getEnergy() + workDone);
|
||||||
|
}
|
||||||
return HeatUtils.simulate(this, Coord4D.get(this), worldObj);
|
return HeatUtils.simulate(this, Coord4D.get(this), worldObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue