I am having trouble understanding how to model AC mains voltage. Or rather I am modelling it how I see as correctly, and yet the transient analysis produces something incomprehensible to me.
I have modelled a VSIN source, with a GND with the following parameters
dc=0 ampl=240 f=50hz ac=1
Across this I have put a 1m Resistor as a load.
I have created a label called “in”
I run my transient analysis with a timestep of 20ms and a final time of 1s
I expect to see a sinusoidal trace in the transient, because, well frankly it’s a sinusoid!
What I get is a mostly flat line at around 240v with a spike to 0 at the start and end of the trace.
How on earth is it possible with such a simple circuit to not get a sinusoid?
20ms steps are far too large if you wish to see a 50Hz signal: 20ms is one full period.
Try steps of 500us or less and there will be a shape you will recognise.
But don’t forget that a time of 1s horizontally means you will see fifty full cycles. Perhaps you could also reduce this (unless you have a rather wide monitor) to maybe 0.2s or less.