# Powering Engineering Education with Wolfram Virtual Labs

Explore the contents of this article with a **free Wolfram System Modeler trial**. How can you make teaching come alive and be more engaging? For many educators, the answer turns out to be not so much a single solution, but rather a set of tools that can vary according to subject and even by student. So today, I want to add something new to the pedagogical toolkit: Wolfram Virtual Labs.

Wolfram Virtual Labs are open educational resources in the form of interactive courseware that are used to explain different concepts in the classroom. Our ambition is to provide an easy way to study difficult concepts and promote student curiosity.

For this post, I spoke with Dr. Matteo Fasano about his experience with using Virtual Labs as a course complement in the masters’ courses in which he acts as a teaching assistant. He also told me why and how he supported the Wolfram MathCore group to develop the CollegeThermal Virtual Labs (now available) and how they can help teachers or instructors make learning more engaging.

*Tell us a bit about yourself. What are these Virtual Labs?*

I am a postdoctoral researcher at Politecnico di Torino. I am a teaching assistant for five masters’ courses on energy and thermal engineering. I was the recipient of the Young Researcher of the Year award from energy company Eni in 2017 for my research work “Heat and Mass Transfer of Water at Nanoscale Solid-Liquid Interfaces.”

It was in May last year when I—along with my colleagues—attended a Wolfram System Modeler demo. During this demo, we got to know about an internal project at Wolfram called Virtual Labs. The idea was simple: these were a set of interactive computer exercises meant as a complement to teaching materials in which you explore a specific topic using system models, either by creating new models to describe the topic or by interacting with pre-built models. It was planned to be distributed as an open educational resource to teachers, students and anyone else wishing to learn about a subject.

I was intrigued by this concept and started correspondence with your team. I sent some exercises from my course material to check if it was possible to prepare models for these case studies, and if it could be modeled as a Virtual Lab with interactive instructions for students. On first review it looked doable; however, because of the length of the content, we proposed for it to be split into two Virtual Labs instead, and these are now available to everyone as the CollegeThermal library.

*What prior knowledge is required to use these materials?*

We tried to make sure that the content can be followed by anyone with basic thermodynamic knowledge.

*Can you walk us through one of the labs?*

Ever wondered what the thermal power of the radiator in your house should be to guarantee thermal comfort, or how the ambient conditions affect your room temperature? To answer these questions, it is important to understand the thermal behavior of different components in your house. The Room Heating lab has the ambition to model the most significant components of a house and combine them to see how your room temperature changes with ambient temperature fluctuations.

We first begin by observing the thermal behavior of a multi-layer wall crossed by a heat flux normal to its surface. The wall consists of three layers in series: insulation, brick and insulation, respectively. As a first approximation, the thermal response of this configuration can be studied by a one-dimensional, lumped-parameters model, in which only heat conduction through the wall is considered (for the moment). In the following figure, we show how the thermal conductivity of the different materials affects the temperature distribution inside the wall, at fixed-layers thickness:

There is a first interesting behavior that can be noticed here: if we consider typical values for the thermal insulating and brick layers, namely 0.07 W/m K and 0.7 W/m K, respectively, we observe a large temperature drop across the insulation layers, whereas the temperature drop across the brick layer is only minimal, even if the thickness of the brick layer is three times that of the insulation layers. In fact, the law of heat conduction (also known as Fourier’s law) states that—at fixed-heat flux—temperature gradients are linearly proportional to thermal resistance, which can be here determined as the ratio between the layer thickness and thermal conductivity.

We now add another part to our model: the convective heat transfer from the ambient room to the internal wall, and from the external wall to the environment. The thermal resistances due to convection are added in series with respect to the conductive ones through the wall, thus causing further temperature drops at both sides of the wall. In this case, the typical boundary layer of natural convection can be seen by the nonlinear temperature profiles of air in the proximity of the wall surface:

In addition to opaque walls, buildings have transparent walls (windows). The thermal model of windows here considers the solar radiation through the glass, the air leakages through the window and the thermal conduction across the glass and frame of the window. We can analyze the model response by observing the heat-flow values for the different contributions. In this case, the indoor and outdoor temperatures are set at 20 °C and -10 °C, respectively. Results in the following figure show that the heat flux is positive when it flows from the external ambient to the internal one, as in the case of solar radiation, whereas heat fluxes are negative (i.e. thermal losses) when they flow in the opposite direction, as in the cases of leakages and conduction through the window:

The thermal model of both opaque and transparent walls can be combined to represent a wall with a window. This assembled model allows you to compare the thermal flux flowing in/out to/from the room at different ambient and room temperatures. Clearly, a nonzero thermal flux balance would lead to the dynamical change of room temperature. If the net thermal flux has negative sign, the room temperature will tend to decrease with time, therefore reducing the thermal comfort:

To observe the actual dynamic behavior of temperature with time, we then refine the thermal model of the room by introducing: (1) other relevant components of the room that significantly affect its temperature, namely the roof, floor (opaque walls) and people (inner heat source); and (2) the thermal capacitance of air in the room. All the components are then combined to create a more comprehensive room model. This model is tested for a given outside temperature:

In this case, we observe from the following figure that the net heat outflow is greater than the inflow one; as a result, the temperature in the room decreases and eventually stabilizes at 10 °C, when inlet and outlet thermal fluxes equalize:

Such equilibrium temperature causes thermal discomfort in the room, which should be avoided by introducing a heating system in the building.

In the Virtual Lab, we have modeled the heating system using radiators as heat exchangers. Specifically, both electric and water radiators as shown in the following diagrams have been considered, since the multidomain approach of System Modeler allows us to combine different domains such as electric, thermal and control in one model. As a first implementation, the radiator operates at a fixed nominal thermal power and is controlled by an on/off strategy:

We will now use Wolfram|Alpha to get temperature data for one example day during the winter season of Rome as a case study, and use it to define the average external temperature required by our complete room + radiator model:

✕
tempsWinter = WeatherData["Rome", "Temperature", {{2016, 01, 01}}]["Path"]; tempsInSecondsWinter = {tempsWinter[[All, 1]] - tempsWinter[[1, 1]], QuantityMagnitude[tempsWinter[[All, 2]], "DegreesCelsius"]}\[Transpose]; |

The following plot shows the temperature variation for a span of about nine hours. This data can then be fed to our model:

✕
ListPlot[tempsInSecondsWinter, AxesLabel -> {"Time[s]", "Temperature[\[Degree]C]"}] |

Thanks to an intuitive graphical user interface, the user can now perform fast sensitivity analyses to assess the effect of the model parameters on the room temperature. For example, in this figure, the room reference temperature, the heat capacity of the room and the solar irradiance can be changed to explore their effects on the on/off cycles of the radiator (and thus the heating system):

The overall energy consumption by the heating system is also estimated during the day. Here the students can appreciate the energy- (and cost-) saving potential of decreasing the room reference temperature by just 1 °C during the heating season, as well as the importance of an adequate sizing of the heating system to guarantee stable comfort conditions throughout the whole day.

In this lab, you saw how we started with trivial models and ended up observing a nontrivial example. The students have access to all the system models used in the labs, where they can learn how these models were created and try to create new models or to refine the existing ones.

*What are the problems you are trying to address using these labs?*

Existing ways of teaching using only presentations and blackboards have no doubt worked for a long time. I believe that this teaching approach is still required to get a full preliminary understanding of the physical heat- and mass-transfer mechanisms and the thermodynamics underlying thermal systems. Nowadays, this approach can be assisted by the real-time simulation of thermal systems to get a fast, hands-on experience of their actual operating conditions. Virtual Labs can support this approach without the need for prior knowledge of low-level coding, which is a plus for students without a solid programming background.

“It took me less than a day to create a model, and I felt that I could now create Virtual Labs by myself.”

*How was your experience using Wolfram tech?*

The notebook interface and wide visualization tools of Mathematica provide a convenient way to create dynamic contents. Modeling using System Modeler is also easy with its wide range of built-in components and equation-based models. It took me less than a day to create a model, and I felt that I could now create Virtual Labs by myself. I am curious to also test the power of the Wolfram Language for my research: in the near future, I would like to explore the machine learning capabilities of Mathematica to predict heat- and mass-transfer processes—for instance, for the injection molding of nanocomposites. Not only me, but I can also see my students making use of these tools to improve their understanding of the physical concepts learned during the lectures.

*Do you have anything to say to the teachers?*

A small tip to teachers: the Wolfram MathCore group is easy to talk to and open to providing help. If you have any ideas or questions on how you could improve your teaching capacities, do contact them! If you want your students to experience innovative learning processes, take an extra step to transform your courses with the help of flexible, intuitive and high-level programming.

Have a good idea for an educational area where Virtual Labs could be helpful? Let us know by sending us an email at virtuallabs@wolfram.com!

Get full access to the latest Wolfram Language functionality for System Modeler models and Virtual Labs with Mathematica 12. | Learn more |

## Comments