Stability issue with behavioral Capacitor

I have run into some issues with a behavioral Capacitor of the definition:

C = 40.0 * V(T1)^3 / (V(T1) + 20)^3 + 1m

This is the simulation:

This is a thermal model following the usual SPICE equivalences of:

  • heat capacitances are capacitors
  • heat conductances are conductances
  • heat flows are currents
  • temperatures are voltages
  • heat reservoirs are voltage sources

The simulation should show how the objects (C1 and C2) cool from room temperature down to 1.5 K:

Applying the proper Debye formula for the heat capacitance will reveal a faster cooldown:

It all works well until the voltage on C1 suddenly bursts into oscillation:

This is unexpected, because the formula for C is well behaved and smooth on the positive domain.

I have tried different step sizes, but nothing solved the issue reliably, however forcing a small stepsize on a millisecond scale made the simulation stable, but deliver wrong results, namely the temperature (aka voltage) got stuck at 40, slightly oscillating around that value.

If I change the value 20 in the capacitor’s definition, the wrong result will continue stabilizing at twice that value.

Just for completeness’ sake, below is the correct simulation, which I got by pure trial and error or some value tuning, but which is not at all reliable, especially once I add more things to the circuit or change values: