As noted by @smiths in the manual version, the Newton鈥檚 Law of Cooling GD should be moved to a TM in Drasil. (This change has already been made in manual, but still has to be done for Drasil.)

As shown in the above screenshot of TM4, it should be referenced by DD1 and DD2, but TM3 references DD6, which causes an import cycle. From the diagram of what can reference what, TMs should be able to reference DDs, but not vice versa. How should this be resolved? @JacquesCarette @smiths

The melt fraction does not show up at all in TM3, so why is it in the notes? This "latent heat energy" 'thing' seems to be very very broken!
I'm not sure; its been in the notes with no mention of the melt fraction since the file was created. @smiths Can you shed some light on this? I think the TM notes might need to be re-written as the IM notes were.
The melt fraction appears in the notes because when SWHS was originally written, the informal approach was for the theory models to be summarized by both the equation and the description. The two were read together. Since the time of writing that document, we have refined the concept. The equation should bring in everything relevant and the notes should justify or explain the equation. As much as it would make our lives easier, we can't just remove the melt fraction. Latent energy is only added to a material while it is melting (undergoing a phase change). (We can remove any reference to T_melt and T_boil.)
We should change the equation to be conditional.
It will help you understand this problem @samm82 if you review the physics in the wikipedia link. The material keeps melting until enough energy has been added to overcome the latent heat of fusion. When that happens all of the mass has been converted from solid to liquid.
I've made this change. However, the import cycle still remains. The DDs "Heat flux into the water from the coil" and "Heat flux into the PCM from water" should reference the new TM "Newton's law of cooling" according to stable, but according to the diagram of what can reference what, TMs should be able to reference DDs, but not vice versa. @smiths I think the reference makes sense, so should the DDs be moved to TMs as well? Or is there a better solution?
Thank you for your questions @samm82. They are definitely help shape the relationship between the "chunks." When the same issue came up with @bmaclach, we made the DDs into GDs. I think we should do the same thing here. GDs refine the TMs, which is exactly what these GDs do. They take the general Newton's Law of Cooling and refine it into a more problem specific form.
One of the DDs ("Heat flux into the water from the coil") that is being moved to a GD is the only DD in NoPCM. Is it OK for an example to have no DDs? It's OK for one to not have GDs, but an error is thrown if there aren't any DDs. @smiths
But NoPCM gets a bunch of things from SWHS - is that where the DDs are? It is certainly fine for an example to have no DDs of its own. No DDs at all seems odd, although it might be possible.
The only DD in NoPCM is "Heat flux into the water from the coil", which it gets from SWHS. However, this issue turns the DD into a GD, which means that NoPCM won't have any DDs (although it will still get the GD).
I'm not sure who decided that not having any DDs was an error? I don't think we understand their role well enough to say that not having them is an error. Previously we were fairly loose in our distinction between GDs and DDs. We are now trying out a more rigorous distinction. GDs refine TMs. DDs do not refine anything. They are just given knowledge for the problem at hand. With this new definition, DDs will potentially be much less frequent. I don't see this as a bad thing. Our GDs are "derived" in some way, while the DDs are given.
We need to look at the examples to see if the new understanding of the role of TMs, GDs, DDs and IMs makes sense. My preference would be to remove the rule of having to have DDs. I think we could have a rule that we need IMs, since that is where input and output come from. The IMs then need the proper supporting information, which may or may not include DDs.
Once we have settled on our understanding of the relationships between knowledge, we should "codify" that into Drasil.
git blame is your friend. Find the line that throws the error, and you'll find who wrote it (and the commit). That might help trace the origins of the decision.
@samm82, I've reviewed the changes to Newton's Law of Cooling and they look fine to me. This is definitely an improvement. However, the latent heat energy TM has not been fixed, as discussed at https://github.com/JacquesCarette/Drasil/issues/1479#issuecomment-500902879. Please create a separate issue to fix this TM. You should't include this in the current issue, since it is a separate problem.
There already is a separate issue at #1593, which (if I understand things correctly) should be done after #1373, which could take a while.
Thanks @samm82. I forgot about the other issue.