Example #1
0
        /// <summary>
        /// This method calculates how much heat energy moves from one object to the other
        /// when they are touching.
        /// </summary>
        /// <param name="otherObject"></param>
        private void ProcessHeatTransfer(DEEPThermalObject otherObject)
        {
            /* The thermal resistance is the sum of both objects' thermal resistances. */
            double r = this.thermalResistance + otherObject.thermalResistance;

            /* Calculate the temperature difference. */
            double dT = otherObject.temperature - this.temperature;

            /* Calculate the energy transferred. */
            double dE = (dT * internalRefreshRate) / r;

            /* Calculate resulting temperature changes using the specific heat capacities. */
            double dT1 = dE / this.heatCapacity;
            double dT2 = -dE / otherObject.heatCapacity;

            /* Apply the changes to the interacting objects. */
            this.temperature        += dT1;
            otherObject.temperature += dT2;
        }
        /// <summary>
        /// This method calculates how much heat energy moves from one object to the other
        /// when they are touching.
        /// </summary>
        /// <param name="otherObject"></param>
        private void ProcessHeatTransfer(DEEPThermalObject otherObject)
        {
            /* The thermal resistance is the sum of both objects' thermal resistances. */
            double r = this.thermalResistance + otherObject.thermalResistance;

            /* Calculate the temperature difference. */
            double dT = otherObject.temperature - this.temperature;

            /* Calculate the energy transferred. */
            double dE = (dT * internalRefreshRate) / r;

            /* Calculate resulting temperature changes using the specific heat capacities. */
            double dT1 = dE/this.heatCapacity;
            double dT2 = -dE/otherObject.heatCapacity;

            /* Apply the changes to the interacting objects. */
            this.temperature += dT1;
            otherObject.temperature += dT2;
        }