Message Boards Message Boards

3
|
17383 Views
|
10 Replies
|
20 Total Likes
View groups...
Share
Share this post:

Model the Coffee cooling problem with WSM?

Posted 7 years ago

Greetings while I am new to WSM I have a few years physics experience.

It seems to me that a the classic 'when do I add milk/cream? is a perfect opportunity for illustrating the modelling capabilities of WSM. However, I am yet to see this application..

Too simple perhaps?

I have plenty of examples of mathematical modelling. this conference article covers all the possibilities with 5 models, each more complex to allow for fat globules on surface insulation radiation, colour of surface of cup, material of cup, volume of cup, surface area etc..

I am hoping experienced WSM guru will not find this too trivial and apply their talents to develop an all tim classic WSM model..

regards Gary high school physics/IT teacher melbourne Australia

** the need for this? we have just licensed every high school teacher (20k)and their students (200k) on whatever OS they have for the entire wolfram suite Wolfram Alpha PRO Mathematica Wolfram SystemModeler Wolfram Cloud...

Attachments:
POSTED BY: Gary Bass
10 Replies
Posted 7 years ago

Patrik, your detailed reply is very helpful.

In high school the purpose of the exercise is exploration within limits. These examples provide alternatives which can usefully be explored and verified by direct experiment.

limits of theory and limits of experiment (accuracy and errors) are all important lessons which can be reinforced with open ended exploration.

Comparison of different coffee pouring strategies can easily be measured and now modelled. Different cup materials and configurations can now also be accounted for. surface area, covered/uncovered, material glass, ceramic, metal, colour, double walled, vacuum insulated..

I appreciate your comment about 'over fitting the model' however in physics this is a constant temptation because we can.. Knowing when to stop is an important skill. regards Gary Melbourne (ambient air temp = 32?C today..)

POSTED BY: Gary Bass
Posted 7 years ago

Nicely done Marco.

POSTED BY: Gary Bass

Hi Everyone, I know that I am not actually answering the question, which is already answered, I believe. Here is something that I do in my lectures regarding that same problem. I don't use WSM, but just standard Mathematica and a rather simple approach based on Newton's law for cooling. Please see: Coffee & milk problem with Arduino and Newton's law of cooling

Attachments:
POSTED BY: Marco Thiel
Attachments:
POSTED BY: Patrik Ekenberg
Posted 7 years ago
POSTED BY: Gary Bass
Posted 7 years ago
POSTED BY: Gary Bass

Hi Gary!

I went through some of the models in the paper you posted. Overall, it seems like SystemModeler could be very good fit for this, allowing students to add and remove different effects and see the results. The models I show below are attached to this post. I'd love to hear more about the milk adding problem also, seems like an interesting scenario, but I am not sure I understand what the object of the students would be.

As for the paper you linked:

Experiment 1 can be described using standard components from the Modelica.Thermal.HeatTransfer package. The pot will be HeatCapacitor component, the ambient temperature will be modeled using FixedTemperature and the convection is modeled using a ThermalConductor, which follows Newtons law of cooling.

enter image description here

The G parameter in the ThermalConductor is equivalent to the k parameter they use. From what I could tell, the paper did not include any measurement of the heat capacitance or ambient temperature so I went with 3 dl of water and 20 degrees Celsius. However, both of these would probably need to be higher to fit their experimental data.

To create experiment 2 I first duplicated experiment 1 by selecting it and pressing Ctrl+D, you can also right click and select Duplicate. Experiment 2 requires a component like the ThermalConductor but one that has an exponent that causes nonlinear behaviour in the heat flow. No such component exist in the Modelica Standard Library, but we can easily create one. I created a new component to be used in experiment 2 by dragging the normal ThermalConductor into Experiment2.

enter image description here

And gave it a new name, "ArbitraryExponentConductor"

Now I had to modify it to use the exponent. After opening the new component I first added a new parameter by right clicking the parameter view and and selecting Insert > Parameter

enter image description here

I used the name x as in the paper and used type Real.

enter image description here

Now I had to modify the equations so I went into the Modelica Text View (Ctrl+3) and changed the line:

 Q_flow = G * dT;

to

 Q_flow = G * dT ^ x;

dT corresponds to the temperature difference (tc-ts) in the paper.

Going back into Experiment 2, I changed the normal ThermalConductor by right clicking it and selected Change Type. In the dialog, I gave the name of the new type (CofeeCooling.Experiment2.ArbitraryExponentConductor). You can also drag the component from the component browser directly into the field.

enter image description here

or of course, delete the component, drag the new one in and make new connections.

For experiment 3, you need to add a some more stuff. Start by douplicating experiment 1. Connect the ThermalConductor to a new HeatCapacitor instead of the FixtedTemperature. That heat capacitor will be the pot, while the original one will be the coffee. The first ThermalConductor then represents equation 1 in the paper, transfer of heat from coffee to the pot. Add another ThermalConductor and connect it between the pot and the FixedTemperature to represent equation 5. Also add two BodyRadiation components and connect them from each capacitor to the FixedTemperature. These will represent all the radition effects described. They are bidirectional so they represent two equations each (3,4 and 6,7). For evaporation, I created a custom component which is described by the equation

  port.Q_flow = k * port.T;

Where k is the product of the P, l and v parameters described in the paper. You could add individual parameters for each of them instead, as described in the text for experiment 2.

Connect the evaporation to the coffee capacitor.

enter image description here

The 4:th experiment is much like the the 3:d one. I modified the evaporation component to have the equation

  port.Q_flow = k * port.T ^ z;

instead. However, with the exponent they present, 3.7, the temperature will go down very fast for all but very small values of k. Without knowing what parameter they had for l, v and P, it is hard to see if that approach is sound. Do you have an idea if they published more information on the other parameters they fitted?

Attachments:
POSTED BY: Patrik Ekenberg

WSM can do this easily and is perfect for that type of system. I would start with one of the heat transfer examples and modify it. You can even add some of the thermal components if you want to model circulating air (i.e. someone turns on a fan!). Look at the thermal examples to see how to do that. The basic case is very much like the examples.

If you have problems you can post your example for some more help.

Regards

POSTED BY: Neil Singer

BTW why not Mathematica? See: The Coffee Cooling Problem. You can download the code freely there.

enter image description here

POSTED BY: Vitaliy Kaurov

This doesn't answer your question but I couldn't resist posting that a classmate of mine at Reed College, Andrew Case, wrote a B.A. dissertation modelling the behaviour of milk drops falling into a cup of coffee, and if I recall correctly, even did some of the work in Mathematica http://catalog.library.reed.edu/REED:local:CP71102917680001451

POSTED BY: Arno Bosse
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract