0

So i have a simple problem with a complex solution. I need some help figuring out how to convert this:

T = m * K * log(ywr * (Tegg - Twater) / (Tyolk - Twater))

  • m = 56 – Grade A eggs mass in grams.
  • K = ?? – Thermal properties of egg find out how to represent K in JS
  • Tegg = -15.556 – Temperature of egg from fridge in Celsius
  • Twater = 212 – Temperature of boiling water at sea level in Fahrenheit
  • Tyolk = .69 – Temperature (.69a, tcooked)
  • ywr = .76 – Ratio of yolks to whites

... into JavaScript code. I have done the easy parts already but I have no idea how to even start to translate the thermal conductivity properties of an egg into JS. I might be going down the wrong path or misunderstood something due to my lack of knowledge in physics, so I have included the link to the pdf that I am referencing.

const m = 56          // in grams
const K =             // thermal properties of egg find out how to represent K in JS
const T_egg = -15.556 // celsius
const Twater = 212    // @sealevel change this to a mutable variable
const Tyolk = .69     // T(.69a, tcooked)
const ywr = .76       // ratio of yolks to whites

function TminTwater(T, Twater, T_egg){
    if (T || Twater || T_egg != null ){
        const d = (T_egg - Twater)
        const e = (T - Twater)
        const f = (d / e)
        const g = ywr * f
        return g
    } else console.log('error at function TminTwater')
}

// T = m * K * LOG(ywr * (Tegg  -   Twater) / (Tyolk  -  Twater))
function solution(TminTwater, K , m){

}
meowgoesthedog
  • 14,670
  • 4
  • 27
  • 40
  • 6
    You should include any and all code that you have done yourself, functional or not. It helps everybody gauge your skill level and gives us a chance to see where you may be going wrong. Is this a homework problem? – Marie Mar 06 '19 at 18:13
  • 3
    @JonasWilms I think you mean "physicists", haha! :) – Tyler Roper Mar 06 '19 at 18:21
  • It looks like you would benefit from using one of the Math.Log functions: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log – Steven Stark Mar 06 '19 at 18:21
  • The thermal conductivity of a material is a measure of its ability to conduct heat. so K is supposed to be the eggs particular thermal properties. https://en.wikipedia.org/wiki/Thermal_conductivity. – ScaleWork Alchemist Mar 06 '19 at 18:23
  • 4
    "_Everyday physics_" Bah ... Just boil ten minutes, and if still raw, boil two minutes more until cooked. – Teemu Mar 06 '19 at 18:23
  • if you follow the link i sent at the bottom of the pdf there is the thermal properties of eggs. i just dont understand this. @Teemu i wish it was that easy when im in utah and want a soft boiled egg one day and a hard boiled egg the next day but im from NOLA. – ScaleWork Alchemist Mar 06 '19 at 18:29
  • `k = 0.0034` then ... ? – Jonas Wilms Mar 06 '19 at 18:35
  • yeah but is it that easy? ill plug that in and see if it works. also does the rest of my code look logical? – ScaleWork Alchemist Mar 06 '19 at 18:41
  • 1
    The units in the table are odd, in metric system the basic units are usually used, e.g. the unit of K should be W/m°K to fit in the common equations ... The same for the density (kg/m³) and the thermal capacitance (J/kg°K). – Teemu Mar 06 '19 at 18:53
  • @Marie I wish this was homework i have not taken PHY yet so no. this is a personal project im the working on. part one is using the altitude data from the googlemaps api to determine the barometric pressure then determining the boiling point at said elevation. i thought that was gonna be the hard part. no way its boiling the eggs lol . i needed the boiling point of water because the temperature thats the temperature constant for the egg equation. – ScaleWork Alchemist Mar 06 '19 at 20:13
  • You've **massively** misunderstood the paper and the associated physical variables. e.g. (1) `Tyolk` is *not* 0.69 (even Antarctica only goes down to ~190 K), but the temperature measured at 0.69 times the radius of the egg when it is cooked; (2) 0.76 is related to but *not equal* to the ratio of white to yolk. – meowgoesthedog Mar 07 '19 at 10:18

1 Answers1

0

This works

let temperatureEggBeginning = 4; // TStart Temperatur des Eis bei Beginn des Kochvorgangs [Kühlschrank ≈ 4 °C … Zimmertemperatur ≈ 20 °C]
let temperatureYolkEnd = 63;  // TInnen Temperatur des gekochten Eigelbs im gewünschten Zustand [weich ≈ 62 °C … hart ≈ 82 °C]
let temperatureBoilingWaterAtZero = 100;
let massOfEgg = 57; //M das Gewicht des Eis in Gramm medium = 57
let altitude = 0;
let meterBoilingPoint = 285; // Siedepunkt sinkt um 1 °C pro 285 m. // K  thermalConductivityEgg / 60 from https://khymos.org/2009/04/09/towards-the-perfect-soft-boiled-egg/
let temperatureBoilingWater = temperatureBoilingWaterAtZero - altitude / meterBoilingPoint; // TWasser

let eggC = 3.7;
let eggP = 1.038;
let eggK = 5.4 * Math.pow(10, -3);

let thermalConductivityEgg = (eggC * Math.pow(eggP, 1 / 3)) / (eggK * Math.pow(Math.PI, 2) * Math.pow(4 * (Math.PI / 3), 2 / 3));

let timeInSeconds = thermalConductivityEgg * Math.pow(massOfEgg, 2 / 3) * Math.log(0.76 * (temperatureEggBeginning - temperatureBoilingWater) / (temperatureYolkEnd - temperatureBoilingWater));
//  = (57^(2/3)*3.7*1.038^(1/3))/(5.4*10^-3*pi^2*(4*pi/3)^(2/3))*ln(.76*(4-100)/(63-100))  = 272.039 bei https://www.wolframalpha.com/input/?i=+%3D+%2857%5E%282%2F3%29*3.7*1.038%5E%281%2F3%29%29%2F%285.4*10%5E-3*pi%5E2*%284*pi%2F3%29%5E%282%2F3%29%29*ln%28.76*%284-100%29%2F%2863-100%29%29
let timeInMinutes = timeInSeconds / 60;