1

So I went online to find out how you can calculate the temperature of a planetary body based on the size and temperature of its star, and the body's distance from its star. That brought about this solution:

function calcBodyTempSolar(starTemp, starRadius, bodySemiMajorAxis) { //MAGIC math. Determines approx. body temp based on the body's distance from it's star.
return starTemp*Math.sqrt(starRadius/(2 * bodySemiMajorAxis)) * Math.pow(.7, 1/4)}

Next I thought "If I can know how hot a planet will be at a given distance, can I reverse that to determine the "Habitable Zone"?"

I reversed the equation above, but I'm getting the wrong numbers.

(Math.pow(starTemp/(254.58 * Math.pow(0.7, 1/4)), 2) * (starRadius/2))/AU

Running the above equation gives me the wrong number. I have input the proper temperature of earth* but it isn't giving me the right answer. (should be 1, is 1.428...)

*if earth had no atmosphere.

The source of the equations above, is here: https://www.astro.princeton.edu/~strauss/FRS113/writeup3/

I'm thinking that I simply reversed the first equation wrong. But I'm not sure. Any math people here to weigh in?

2
  • not my field of expertise but where is albedo of planet? Where is atmosphere? If you account only incoming energy I would think star size is irrelevant what is important is: energy emitted (might be a function of start size, star temp and type), energy absorbed (function of planet distance size orientation/rotation, albedo, atmospheric effects, shadows by other objects like moons rings dust) energy emmited back (planet surface area, other factors) and do not forget that some parametters differs with wavelength... Commented Oct 8, 2022 at 6:23
  • Good point. This calculation assumes that the albedo is .3. That's what the 0.7 is all about. Atmosphere will play a large factor in the temperature of the planet, but I haven't figured that out yet. If you know of a good source for atmospheric calculations/greenhouse effect, I'd appreciate it. I'm thinking of just adding a number that is relative to the increase that earth experiences. Commented Oct 8, 2022 at 17:49

1 Answer 1

0

According to the equation in the source this should be the planet temperature based on star, size and distance. (That part you got right). The reverse is just as simple

function calcPlanetTemp(starTemp, starRadius, distance, absorbtion) {
  absorbtion = absorbtion || 0.7
  return starTemp * Math.sqrt(starRadius / (2 * distance)) * Math.pow(absorbtion, 1 / 4)
}

var AU = 150 * 1e6; // distance to sun = 1 astornomical unit


// for earth and sun:
var planetTemp = calcPlanetTemp(6000, 700000, AU)
console.log("earth temp (celsius): ", planetTemp - 273.15)
console.log("(that's minus the greenhouse effect)")
// 265.1027012854874
/*
function calcStarTemp(planetTemp, starRadius, distance, absorbtion) {
  absorbtion = absorbtion || 0.7
  return planetTemp / (Math.sqrt(starRadius / (2 * distance)) * Math.pow(absorbtion, 1 / 4))
}
console.log("sun temp: ", calcStarTemp(planetTemp, 700000, AU))
*/

function calcDistance(planetTemp, starTemp, starRadius, absorbtion) {
  absorbtion = absorbtion || 0.7
  return 1 / (Math.pow(planetTemp / starTemp / Math.pow(absorbtion, 1 / 4), 2) * 2 / starRadius)
}
console.log("distance from sun: ", calcDistance(planetTemp, 6000, 700000, 0.7))

Sign up to request clarification or add additional context in comments.

2 Comments

Ah. That helps a lot! The question now is how to solve for the distance if I know the temperature.
Oh man! This is a life saver! I'm not sure why I couldn't figure this one out! Thanks!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.