Coming up with a function to model expected room temperature

In summary, you need to find a function that predicts the temperature inside a box after a certain amount of time for a certain angle of the dimmer. This would involve two variables (the dimmer's angle and the time interval). You should be able to think of calibration experiments to separately determine H and C.
  • #1
purpleBlob
10
0
I have some cubic box with light bulbs controlled by a dimmer. The dimmer is calibrated in degrees (0-270).

I need help in coming up with a function that would accurately predict what the temperature inside the box would be after say.. 5 or 10 minutes.

Basically, I need to come up with a function that would predict the temperature of the box after t (time) for a certain angle of the dimmer.

I think this would involve two variables (the dimmer's angle and the time interval). I have no idea though how to come up with an equation. I'm quite familiar with differential and integral calculus with same basic knowledge of multivariable calculus.

My question is very similar to this: (http://math.stackexchange.com/questions/11502/find-formula-from-values) except mine involves two variables and is definitely not linear.

Any tips?
----------
Here's a sample of the data I got from my 'calibration' experiment
?temp_hash=e0356d706e77cfdb06b887c4e37ca8ef.jpg

Where:
Init. Temp is the temperature at the start of the interval
Final. Temp is the temperature at the start of the interval
so the function would look something like this?: f(Ti, θ) = Tf

I could go on with the calibration so I can come up with a more accurate function but I simply want to know the general idea of how to come up with a function given some values.
-----
Thanks in advance!
 

Attachments

  • calibration.JPG
    calibration.JPG
    25.6 KB · Views: 579
Last edited:
Science news on Phys.org
  • #2
:welcome:

Define:

A dimmer angle
Q1 heat produced by the bulbs. Assumed to be directly proportional to the dimmer angle, and instantaneous
K a constant relating Q1 to A.
TB box temperature
TA ambient temperature
C a constant proportional to the thermal conductivity of the box walls (i.e. insulation)
H a constant proportional to the heat capacity of the box.
Q2 heat flow from box to ambient outside the box.
QB heat retained in the box

##Q1=K\cdot{A}##
##QB=\int{(Q1-Q2)dt}##
##TB=H\cdot{QB}##
##Q2=C\cdot(TB-TA)##

Accuracy depends on how well you can determine the constants K, H and C. You should be able to think of calibration experiments to separately determine H and C. Hint: at time infinity TB depends only on C, Q1 and TA, but not H.

Good Luck
 
  • #3
Hi! thanks for the quick reply.

I'm not that familiar with the principles of thermodynamics but should I use the formula Q = cmΔT for solving heat? (particularly in Q1), i.e. should I use c = specific heat of air, and m = mass of air?

Also, just some clarifications to see if what I'm thinking of is correct:
(1) Solve for Q1
##
Q_{1} = cm\Delta T = KA \\
\\
K = \frac{cm\Delta T}{A}
##

(2) Since both TA and TB can be measured, I can solve for Q2 first by taking measurements of TA TB to approximate C.

(3) I can then solve for QB and H

I have a question regarding ## dt ## though. I'm not sure how to interpret that given that ## dt ## traditionally means instantaneous time. In this case however, the dimmer would only change after a certain amount of time, e.g. 5 or 10 or 20 minutes. How do I interpret/solve the Integral? Could you provide an example?

--------
Btw, It just occurred to me that the calibration would probably involve a lot of input output pairs and would probably take a lot of time to solve manually.
I've done some searching and I've stumbled upon some softwares that use Regression Analysis (https://en.wikipedia.org/wiki/Regression_analysis) to approximate a function.

I'm not sure though if it can be used for this case to approximate the function itself (or even just the constants K, H and C). I'm also not sure what type of Regression analysis to use though, if it should be multiple linear (probably not), or polynomial, or parametric, or semiparametric, etc., and I'm also not sure about what software to use.

Any ideas?
 
Last edited:
  • #4
The specific heats are in the constant H. You didn't say how big the box is. Therefore I'm going to assume that it is fairly small. In that case, there is little air. Specific heat is dominate by the walls of the box, the light fixture and anything else inside the box. You won't be able to look that up. You'll have to find it by experiment.

purpleBlob said:
I need help in coming up with a function that would accurately predict what the temperature inside the box would be after say.. 5 or 10 minutes.

Basically, I need to come up with a function that would predict the temperature of the box after t (time) for a certain angle of the dimmer.

I interpreted that as meaning that you want to solve for temperature as a function of time t. Hence the dt meaning integral with respect to time. If you want only the steady state value at time infinity, the problem is easier. Just set QB=Q1=Q2. Then H disappears, the integral equation disappears, leaving only K and C to determine by experiment.

Another thing that might help, Q1 is exactly the same as the electrical power used, except for the units. Do you know how many watts the bulb uses? If you know that, then K is just the ratio of power to dimmer angle at 270 degrees. That leaves only C to determine by experiment.
 
  • #5
I see. The box is around 0.5m on all sides on the inside. Will the equation hold?

I guess that simplifies the experiment quite a lot.

Just a question; If I want to somehow vary the time intervals
(e.g. for the first interval t=10 min, for the second interval t = 20min), do I do it like this?:

##
\int_{t = 0}^{t = 10} (Q1 - Q2)dt
\\ \\
\int_{t = 0}^{t = 20} (Q1 - Q2)dt
##
t isn't in the integral though?
so the first equation would evaluate to
(Q1 - Q2)(t) @ t = 10?
 
Last edited:
  • #6
Q2 is a function of time Q2(t). Q1 can be constant or a function of time Q1(t) if you are twisting the dimmer.

You said that you were familiar with differential calculus. I misinterpreted that as familiarity with differential equations and thus time based simulation.

You may not have the background needed to do the experiments, calibrate the constants, and then solve the equations.

Maybe if you described in more detail what you are actually trying to accomplish, we may think of away to help you. You must have a reason to want to know the temperature at those times. What is the light box for?
 
  • #7
Sorry about that. I do have knowledge of differential calculus but not too much on differential equations, and I definitely have almost little to no knowledge of the applications of calculus besides the typical examples found in books.

I'm trying to simulate weather conditions (only dry bulb temperature) inside a box, for that I need to know what the temperature of the box would be after t, time for a certain angle of the dimmer.
For example, I'll try to mimic the temperature values shown here: https://www.wunderground.com/histor...reqdb.zip=10001&reqdb.magic=1&reqdb.wmo=99999

Maybe I'd start 1 hour before, and I'll turn the dimmer for some angle. Then, after one hour, the temperature reaches 21.1.
I'll turn the dimmer again based on the angle from the derived function, then after one hour, the temperature becomes 20.0, and so on..

I'm basically using this to see how certain materials react to actual weather conditions (specifically dry bulb temp).
---------
Some additional info:
The material (wall assemblies) I'll be testing would be placed at the center of the box dividing the box into two portions, the side with the light bulbs represents the outdoors, while the other side would represent the indoors.
 
  • #8
Now we're getting closer. Please clarify one thing first. You mentioned specific times, 5 minutes, 10 minutes, one hour. Do you really mean specific times or do you mean the steady state when temperature is steady?
 
  • #9
I'm not sure what steady state means, but if it means the point at which the temperature apparently stabilizes, then no.

I intend to predict what the temperatures would be after some time for a certain dimmer angle. This is in accordance with weather data found online which are usually displayed at hourly intervals. I intend to compare the results of this experiment with computer simulation results.
The computer simulation uses weather files with fixed time intervals, so my experiment also has to be at fixed intervals.
---------
I just noticed my thread title was wrong, it should be
'Coming up with a function to model expected box temperature'
 
Last edited:
  • #10
Steady state just means that the temperature stops changing significantly. If it is not steady, then the answer at 5 minutes will be different than the answer at 6 minutes.

Assuming steady state, then everything becomes much simpler. There is no time, no integration. The only remaining equation is:
##Q2=C\cdot(TB-TA)##

If we set Q2=Q1, and solve for TB.
##TB=\frac{Q1}{C}+TA=\frac{K\cdot{A}}{C}+TA##

Assume K=1, then it becomes
##TB=\frac{A}{C}+TA##

To calibrate, set the dimmer at 270 degrees, wait for steady state and measure TB and TA. Calculate C from the measurements.
To check for linearity, repeat at 180 degrees and 90 degrees. The calculated value of C should be roughly the same in all three cases.

If you use a one-chamber box, then TA is the outside ambient temperature. It won't change because of your experiment. With a two-chamber box, the resistance to heat flow between the two chambers must be very much less than the resistance of heat from inside the box to outside. Otherwise, your results will be spoiled.
 
  • #11
purpleBlob said:
I'm not sure what steady state means, but if it means the point at which the temperature apparently stabilizes, then no.
Are you saying you are not interested in achieving stable temperatures? Are your experiments more concerned with how fast the temperatures change rather than what the final (steady state) temperature is?
 
  • #12
purpleBlob said:
I intend to compare the results of this experiment with computer simulation results.

What exactly is the computer simulation simulating?
 
  • #13
anorlunda said:
Steady state just means that the temperature stops changing significantly. If it is not steady, then the answer at 5 minutes will be different than the answer at 6 minutes.

Assuming steady state, then everything becomes much simpler. There is no time, no integration. The only remaining equation is:
##Q2=C\cdot(TB-TA)##

If we set Q2=Q1, and solve for TB.
##TB=\frac{Q1}{C}+TA=\frac{K\cdot{A}}{C}+TA##

Assume K=1, then it becomes
##TB=\frac{A}{C}+TA##
Does this mean I have to set the time interval beforehand? For example, i'd choose an interval of every 20 mins for both the calibration and the experiment? What if the temp doesn't stabilize after 20 mins though?

russ_watters said:
Are you saying you are not interested in achieving stable temperatures? Are your experiments more concerned with how fast the temperatures change rather than what the final (steady state) temperature is?
I think yes, my objective isn't to achieve stable temperatures, it's to replicate a set of weather data.

anorlunda said:
What exactly is the computer simulation simulating?
The same thing as in this experiment, i.e. How certain materials affect room temperature in response to weather conditions. I'm using EnergyPlus.

Are my thoughts correct.?
 
  • #14
Your statements are contradictory and confusing. Steady state or time-domain transient. If it is steady, then time interval does not come into play.

Try this to clarify. If the sampling interval was changed from 20 minutes to 30 minutes or 10 minutes, would you expect the numerical results to change?
 
  • #15
purpleBlob said:
I think yes, my objective isn't to achieve stable temperatures, it's to replicate a set of weather data.

The same thing as in this experiment, i.e. How certain materials affect room temperature in response to weather conditions. I'm using EnergyPlus.

Are my thoughts correct.?
Well, the engineering reference for EnergyPlus is 1700 pages long, but I did find this:
"Most models in EnergyPlus are quasi-steady energy balance equations used to predict the conditions present during each timestep."

This fits with my understanding (I'm an HVAC engineer) of how load caluclations software generally works: it constructs a day's worth of HVAC loads using 24 separate steady-state steps of heat transfer. I suppose it would be possible to do dynamic modeling - and they do talk about "capacitance" in a number of places, but I'm not sure to what extent they use the concept.

I think you need to put some more thought into exactly what you are trying to accomplish because it isn't clear to me you even understand the difference between steady state (step) and transient modeling, much less how that feeds into what you are trying to accomplish. But the short answer to "replicate a set of weather data" is that weather data is provided in sets of 24 steady-state steps per day. It is not provided in transient functions.
 
  • #16
Ah I think I get it now, I was misunderstanding what steady state meant.

I have a question though, i was just wondering how the initial temperature of the box is taken into consideration when determining its final temperature
I.e.
##TB_{i} = initial temperature of box \\ \\
TB_{f} = final temperature of box ##

For example,
1) before beginning the experiment, the temp of the box was at 20, then maybe i set the dimmer to 180 degrees, after the interval the temperature of the box is 22. Then for this interval, TBi = 20 and TBf = 22

2) for this next interval, the inital temp of the box to be used would of course be the final temp of the box from the previouw interval, which is 22, therefore TBi = 22 for this interval

How do I take this into account? Since the previous temp of the box will definitely affect the resultant temp.
Or mayb i could change TB to delta TB and A to delta A?

Regarding linearity btw, I don't think the function is linear as based on the attached image from my first post where even though i changed the dimmer's angle from 130 to 120 then 110, the temperature didn't change. Whereas there it decreased by a very small 0.4 when the angle went from 110 to 90. In comtrast, for the first few intervals, the temperatures increased quite dramatically even though the dimmer angle remained the same.

I'll post back if I encounter something.
 
  • #17
purpleBlob said:
Ah I think I get it now, I was misunderstanding what steady state meant.

I have a question though, i was just wondering how the initial temperature of the box is taken into consideration when determining its final temperature
The initial temperature does not impact the final temperature. The final temperature is a function of the ambient (outside the box), heat generated in the box and insulation of the box.
 
  • #18
russ_watters said:
The initial temperature does not impact the final temperature. The final temperature is a function of the ambient (outside the box), heat generated in the box and insulation of the box.

I see.. These equations should be good enough then?
anorlunda said:
##Q2=C\cdot(TB-TA)##

If we set Q2=Q1, and solve for TB.
##TB=\frac{Q1}{C}+TA=\frac{K\cdot{A}}{C}+TA##

Assume K=1, then it becomes
##TB=\frac{A}{C}+TA##
Thank you very much guys, I'll try to calibrate then..
 
  • #19
Hi guys, I've just finished with the calibration, and I think it was quite good except except for a minor anomaly regarding the estimated value of C.
given
##
C = \frac{A}{TB-TA}
##

the values for 90 and 180 degrees were quite close but @ 270, the value of C was an anomaly, I've checked the thermometers multiple times and I'm sure the readings were around those temperatures @ steady state.
*correction, for A=90, TA was at 21.8, so the value of C for A=90 is ## 60 ##
It seems the value of C was decreasing with the angle increasing?

Did I perhaps omit something?
?temp_hash=774bd8169f92fc8051fbfbbf4a120e30.jpg

-----------
btw
anorlunda said:
If you use a one-chamber box, then TA is the outside ambient temperature. It won't change because of your experiment. With a two-chamber box, the resistance to heat flow between the two chambers must be very much less than the resistance of heat from inside the box to outside. Otherwise, your results will be spoiled.
My box uses spare acoustic panels as insulators while the materials I'll be testing involves mainly concrete. My box is 15cm thick on all sides while the concrete wall to be tested is around 7.5cm. I did q quick seach for the thermal conductivity of concrete (0.8) and acoustic panels (0.058).

I guess it's assured then that heat would flow primarily through the wall right?
 

Attachments

  • Calibration_SteadyState.JPG
    Calibration_SteadyState.JPG
    21.6 KB · Views: 553
Last edited:

1. What is a function?

A function is a mathematical expression that relates an input value to an output value. In this case, the input value would be the temperature of a room and the output value would be the expected room temperature.

2. Why is it important to have a function to model expected room temperature?

A function allows us to predict the expected temperature of a room based on different variables, such as the time of day, weather conditions, and heating or cooling systems. It can help us make informed decisions about how to maintain a comfortable and consistent temperature in a room.

3. How do you come up with a function to model expected room temperature?

To come up with a function, we need to gather data on room temperature and its influencing variables, such as outside temperature, time of day, and heating or cooling systems. Then, we can use mathematical tools and techniques to analyze the data and determine the relationship between the variables. This will allow us to create a function that accurately models expected room temperature.

4. Can a function accurately predict room temperature in all situations?

No, a function is a simplified model and may not accurately predict room temperature in all situations. There are many factors that can affect room temperature, such as human activity, insulation, and air flow, that may not be accounted for in the function. However, a well-designed function can provide a good estimate of expected room temperature in most situations.

5. How can a function be used to improve energy efficiency in a building?

A function can help us understand how different variables affect room temperature, which can be used to optimize energy usage in a building. By using the function to predict expected room temperature, we can adjust heating and cooling systems accordingly to maintain a comfortable temperature while minimizing energy consumption.

Similar threads

Replies
1
Views
882
Replies
152
Views
5K
Replies
10
Views
2K
Replies
29
Views
5K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
427
Replies
1
Views
944
  • Thermodynamics
Replies
1
Views
3K
Replies
2
Views
7K
  • STEM Academic Advising
Replies
9
Views
1K
Back
Top