If you leave a pot of milk on the stove with the heat turned up, it boils over and you have to clean up the mess. Why it happens is because milk, like most other things and almost all solids, expands under the effect of heat, the same quantity occupying more space than it did previously.

While there are some materials in nature that buck the usual thermodynamics and behave differently under very specific circumstances, they are rare. But a team of engineers has now constructed, using 3D-printing, a new “metamaterial” that shrinks when heated.

Scientists had proposed theoretical structures about 20 years ago that would display a property they termed negative thermal expansion, or NTE. But at the time, they didn’t have the means to produce the kind of structure they theorized. A team, led by Nicholas X. Fang of Massachusetts Institute of Technology (MIT), used the concept described two decades ago and 3D-printing to manufacture 3D structures using stiff copper and an elastic material.

They created “tiny, star-shaped structures out of interconnected beams, or trusses. The structures, each about the size of a sugar cube, quickly shrink when heated to about 540 degrees Fahrenheit (282 C),” according to a statement on the MIT website, published Tuesday.

The structure shrinks marginally, only by about 0.6 percent, but according to researchers, the important thing is that it doesn’t expand.

Using the example of computer chips, where this kind of metamaterial — a term used for composite materials that exhibit counterintuitive properties not usually found in nature — may find uses, Fang said: “Printed circuit boards can heat up when there’s a CPU running, and this sudden heating could affect their performance. So you really have to take great care in accounting for this thermal stress or shock.”

The research was published under the title “Lightweight Mechanical Metamaterials with Tunable Negative Thermal Expansion” in the journal Physical Review Letters. Engineers from MIT, University of Southern California, University of California at Los Angeles and Lawrence Livermore National Laboratory were involved in the research, which was partially supported by the Defense Advanced Research Projects Agency.