Thank you for your post, Jesus. It is hard to see why your circuit should depend on netlist element ordering, but it is not unheard of for there to be such dependence (though it is exceptionally rare). Changing the netlist ordering can change the order in which computations are evaluated, and if the circuit is extremely ill-behaved then differences in roundoff between the two differently ordered variants can lead one to succeed and the other to fail. But it is not at all clear that that's what's going on here.
I am currently looking over this netlist and am seeing different results than you do, suggesting that this is a really sensitive problem that may be hard to pin down. I am seeing that moving your two lines in the way you indicated has no effect on my system, where both versions run just fine to completion. However, very slight modifications that *should* have no effect are then causing my simulations to fail, too.
We are aware of a bug in B source table derivatives that can sometimes show up as convergence failures that seems to be relevant when a table only has two points in it. In order to check if that were the source of problems in this case, I tried simply adding a (0.0,0.0) pair in the middle, which should have had no effect and should mask the bug were it relevant to this case --- yet when I ran it, THEN I started having convergence failures irrespective of where I put the BDRAG2 and RDUMMY lines. This suggests that the table derivative bug is irrelevant to this issue.
I also tried changing BDRAG2 to:
BDRAG2 DRAG 0 V={if((V(SHAFT_SPEED)< -0.001),-1.0,if((V(SHAFT_SPEED)>0.001),1.0,(-1+(V(SHAFT_SPEED)+0.001)*1e3)))}
which also should have created a B source identical to the table function you specified and should have no derivative bug, but it, too, crashed with a timestep too small at about 45% of the run. In fact, everything I've tried other than your original circuit seems to lead to this failure at the same time, and on my system I can't make it work just by reordering the netlist at all. This suggests to me that the problem is indeed quite sensitive to small numerical issues and you just happened to have stumbled upon one variant that worked.
I also worried that perhaps there was something about the discontinuous derivatives that the expression above produces, and tried using the "SMOOTHBSRC=1" option to the B source that adds a small RC network in the device to smooth out sharp transitions, but that didn't help at all (which I see now is because you had already specified that option to apply globally to all B sources). What did help, though, was adding a 1pf capacitor in parallel with RDUMMY1 (i.e. between node DRAG and ground). But this only worked with the original TABLE and my "IF" variant --- if I tried the table that had (-0.001,-1) (0.0,0.0) (0.001,1.0) it still failed with timestep too small.
So this circuit does appear to have some convergence issues on its own, and the exact formulation of the BDRAG2 device appears to be at the root of the problem, but beyond that I can only speculate on why without a lot more effort. The fact that there are circuit elements (inductors) in this model that mention that they're there to "force timestep control" may indicate that they're relying on some specific PSPICE magic under the hood to keep it stable, and you might have more work cut out for you to make it stable for Xyce.