I am looking to simulate a buck DC-DC that charges a battery pack. In LTspice when I connect a battery at the output there is a lot of current variation, but if I connect a resistive load the current is pretty stable. Is this something that is observed in actual or just in simulation?

This is showcased in the simulations below where there is a 30V supply and the output of buck is set to around 13.6V. You can find the simulation file with battery as load here - [Simulation file](https://drive.google.com/drive/folders/1AgHbzSTcBnzeT6hh0mmL5lQ-MyqCrMxD?usp=sharing)

[![Buck with resistive load](https://i.stack.imgur.com/R12KP.png)](https://i.stack.imgur.com/R12KP.png)
Figure 1: Buck with resistive load

[![Output current of buck with resistive load](https://i.stack.imgur.com/oG7ck.png)](https://i.stack.imgur.com/oG7ck.png)
Figure 2: Output current of buck with resistive load has about 12mA ripple

[![Buck with a 9V battery as load](https://i.stack.imgur.com/o39Xf.png)](https://i.stack.imgur.com/o39Xf.png)
Figure 3: Buck with a 9V battery as load

[![ Output current of buck with 9V battery](https://i.stack.imgur.com/RGd6O.png)](https://i.stack.imgur.com/RGd6O.png)
Figure 4: Output current of buck with 9V battery load has about 43A current variation