¿ªÔÆÌåÓýYou should first of all, read the Help. It is very information-intensive, so it needs reading carefully and reading several time. There is a special way of treating capacitors that do unusual things or are charged in unusual ways, which is at the end of the Help page on Capacitors: There is also a general nonlinear capacitor available. Instead of specifying the capacitance, one writes an expression for the charge. LTspice will compile this expression and symbolically differentiate it with respect to all the variables, finding the partial derivative's that correspond to capacitances. Syntax: Cnnn n1 n2 Q= [ic=] [m=] There is a special variable, x, that means the voltage across the device. Therefore, a 100pF constant capacitance can be written as Cnnn n1 n2 Q=100p*x A capacitance with an abrupt change from 100p to 300p at zero volts can be written as Cnnn n1 n2 Q=x*if(x<0,100p,300p) I have assumed from your message that your capacitor value is not
constant. If it is constant, just put its value in the expression.
You can do this even just with Waveform Arithmetic (see the
Help!). Click on the title of the plot of the voltage (V(n005) for
example) across your capacitor and change? the expression? to
V(n005)^2*10^(-7)/2, if your capacitor is 100 nF. The y-axis is in
terms of volt-squared, because LTspice doesn't know that the
'10^(-7)' is a capacitor.? It ought to be plotted in joules if you
multiply it by 1F/1J (1 farad/1joule), but it doesn't work because
LTspice recognizes '1F' as '1 femto', i.e. 1-^(-15). John Woodgate OOO-Own Opinions Only J M Woodgate and Associates Rayleigh, Essex UK On 2018-11-17 19:31,
douglas.fay@... [LTspice] wrote:
? |