To model the heat going in and out of the tank, we used blocks from the Simscape Thermal Domain, highlighted in magenta in the model.
I like using Simscape because you create a model by assembling components the way they are assembled in real life. To help me with that, my colleague Zack Peters offered to put together a few Simulink models. I thought it would be a good idea to use the Simscape Thermal Liquid domain to analyze if it would be worth changing my current system to something else, for example a tankless system. Last summer I was traumatized to hear the furnace starting in the middle of the day when it is 100 degrees Fahrenheit outside and I am not using any hot water.
For the first time in my life, I have an oil furnace, and a oil-fired storage water heating system. This week we talk about the new Simscape Thermal Liquid domain introduced in R2013b, and we see how it helped me to analyze how much I pay for hot water in my house.