# LTSpice transient simulation of LC circuit

I've a question about the LTSpice simulation of the following simple LC circuit driven by a DC current source.

The first simulation (A) looks good from point of view of initial conditions for either voltage cap V(n001)=0 and inductor current I(L1)=0. As shown in the first picture the Initial Transient Solution (ITS) for the inductor current looks ok.

Consider now the second simulation (B) in which the initial condition has been set just for the inductor current I(L1)=0. This time, as shown in the second picture, that condition seems to be not honored (the initial inductor current results in 10A)

Can you help me in understanding the reason behind it ? Thanks

Edit: based on comments I've done another simulation (C) without any initial condition. As you can see the solver is able to work out the Initial Transient Solution (ITS) different from the previous two (A & B).

Can you point me to some book (or documentation) about how Spice works under the hood ? Thanks

• Both schematic diagrams appear to have the same initial conditions set. You must have changed something so inspect closely what you did. – Andy aka Jan 9 at 15:40
• @Andyaka I suspect the blue one is commented out. – user_1818839 Jan 9 at 15:41
• @BrianDrummond I'm not convinced!! – Andy aka Jan 9 at 15:41
• Be interesting to know the init value of V(n001) that gives the 1GW dissipation though! Presumably, 100MV (at I=10A). Probably due to a simulation limit in source I1. – user_1818839 Jan 9 at 15:42
• I bet LTSpice is trying to solve the initial conditions and, without the active directive, it gets in a mess with a current source and parallel capacitor. – Andy aka Jan 9 at 15:59

In some circumstances (such as these) you need to "force the hand of the simulator" so that the initial conditions are defined as in .ic V(1) = 0.