Solar model spreadsheet gives negative values in columns I and J

3 replies · 2K views · last reply
PeteWheatstraw
Messages
6
Reaction score
0

Homework Statement



The problem given is...Calculate mI+1 and lI+1 at point xI+1 using equation (5), the values of the slopes at points xI+1 and xI from equation (4), and the values of mI and lI from the previous step.

Here is a screenshot of my solar model

Excel spreadsheet titled Solar Model with columns i, x=r/R, density, temperature, X, epsilon, delta m/delta x, delta l/delta x, m and l; column J shows negative values like -0.04, -0.12, -0.24, and the formula bar shows =SUMPRODUCT(J3+1/2*(H4+H3)*B4-B3).


Homework Equations



Printed page of a PDF showing dimensionless variable substitutions m, l and x, equations (4) and (5) for m and l at step i+1 with constants A = 2.13011 and B = 1.08636.

The Attempt at a Solution



I need help with columns I and J.

For column I, I have the equation entered as =SUMPRODUCT(I2+1/2*(G3+G2)*B3-B2)

For J I have =SUMPRODUCT(J2+1/2*(H3+H2)*B3-B2)

and for some reason I'm getting negative values when as it goes down it should be getting closer to 1

Thanks in advance!
 
You need parentheses around B3-B2.
(Why do you need to use sumproduct? You're not using entire arrays of numbers to calculatd a single cell, are you?)
 
haruspex said:
You need parentheses around B3-B2.
(Why do you need to use sumproduct? You're not using entire arrays of numbers to calculatd a single cell, are you?)

Thank you so much! I knew it was something obvious that would make me look stupid ;)

To your question...I'm not really sure. I'm excel illiterate and our professor expects us to use it without ever showing us anything.
 
PeteWheatstraw said:
To your question...I'm not really sure. I'm excel illiterate and our professor expects us to use it without ever showing us anything.

Try removing the SUMPRODUCT() wrapper. I don't think it's doing anything.