Mercurial > forge
changeset 11981:7e3b09533178 octave-forge
time step vector bug fixed in all newton solvers
author | dvd7587 |
---|---|
date | Mon, 29 Jul 2013 15:53:32 +0000 |
parents | de10a10ef6bf |
children | 061d03e55fcc |
files | extra/secs1d/inst/demos/resistor_circuit.cir extra/secs1d/inst/demos/resistor_circuit.nms extra/secs1d/inst/secs1d_coupled_circuit_newton.m extra/secs1d/inst/secs1d_coupled_circuit_newton_reordered.m extra/secs1d/inst/secs1d_newton.m extra/secs1d/inst/secs1d_newton_res.m extra/secs1d/inst/secs2d_coupled_circuit_newton.m extra/secs1d/inst/secs3d_coupled_circuit_newton.m |
diffstat | 8 files changed, 27 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/extra/secs1d/inst/demos/resistor_circuit.cir Mon Jul 29 13:50:32 2013 +0000 +++ b/extra/secs1d/inst/demos/resistor_circuit.cir Mon Jul 29 15:53:32 2013 +0000 @@ -5,10 +5,17 @@ % Voltage Source (input) Mvoltagesources pwl 2 6 1 6 -%t0 v0 t1 v1 t2 v2 - 0 0 1 1 2 1 +t0 v0 t1 v1 t2 v2 + 0 0 1 1 2 1 3 0 % +% Voltage Source GROUNDED +Mvoltagesources pwl 2 4 +1 4 +t0 v0 t1 v1 + 0 0 1 0 +4 0 +% END % % LCR @@ -31,4 +38,10 @@ L 8.6e4 2 3 +%% % Ground +%% Mresistors LIN 2 1 +%% 1 1 +%% R +%% 0 +%% 4 0 END
--- a/extra/secs1d/inst/demos/resistor_circuit.nms Mon Jul 29 13:50:32 2013 +0000 +++ b/extra/secs1d/inst/demos/resistor_circuit.nms Mon Jul 29 15:53:32 2013 +0000 @@ -2,7 +2,9 @@ 1 Vcap 2 Vind 3 Vgen -4 Ig -5 q -6 f1 -7 f2 +4 Vgnd +5 Igen +6 qcap +7 phi1 +8 phi2 +9 Ignd
--- a/extra/secs1d/inst/secs1d_coupled_circuit_newton.m Mon Jul 29 13:50:32 2013 +0000 +++ b/extra/secs1d/inst/secs1d_coupled_circuit_newton.m Mon Jul 29 15:53:32 2013 +0000 @@ -7,7 +7,7 @@ rejected = 0; Nnodes = numel (device.x); dt = (tspan(2) - tspan(1)) / 1000 - t(tstep = 1) = tspan (1); + tout(tstep = 1) = t = tspan (1); [V, n, p] = deal (Vin, nin, pin); %F = V([1 end], 1) - constants.Vth * ... % log (n([1 end], 1) ./ device.ni([1 end], :))
--- a/extra/secs1d/inst/secs1d_coupled_circuit_newton_reordered.m Mon Jul 29 13:50:32 2013 +0000 +++ b/extra/secs1d/inst/secs1d_coupled_circuit_newton_reordered.m Mon Jul 29 15:53:32 2013 +0000 @@ -9,7 +9,7 @@ dt = (tspan(2) - tspan(1)) / 1000; - t(tstep = 1) = tspan (1); + tout(tstep = 1) = t = tspan (1); logdtvec(tstep) = 1; [V, n, p] = deal (Vin, nin, pin);
--- a/extra/secs1d/inst/secs1d_newton.m Mon Jul 29 13:50:32 2013 +0000 +++ b/extra/secs1d/inst/secs1d_newton.m Mon Jul 29 15:53:32 2013 +0000 @@ -3,7 +3,7 @@ rejected = 0; Nnodes = numel (device.x); dt = (tspan(2) - tspan(1)) / 20; - t(tstep = 1) = tspan (1); + tout(tstep = 1) = t = tspan (1); [V, n, p] = deal (Vin, nin, pin); M = bim1a_reaction (device.x, 1, 1);
--- a/extra/secs1d/inst/secs1d_newton_res.m Mon Jul 29 13:50:32 2013 +0000 +++ b/extra/secs1d/inst/secs1d_newton_res.m Mon Jul 29 15:53:32 2013 +0000 @@ -6,7 +6,7 @@ Nnodes = numel (device.x); dt0 = (tspan(2) - tspan(1)) / 200; dt = dt0; - t(tstep = 1) = tspan (1); + tout(tstep = 1) = t = tspan (1); [V, n, p] = deal (Vin, nin, pin); F = V([1 end], 1) - constants.Vth * ... log (n([1 end], 1) ./ device.ni([1 end], :));
--- a/extra/secs1d/inst/secs2d_coupled_circuit_newton.m Mon Jul 29 13:50:32 2013 +0000 +++ b/extra/secs1d/inst/secs2d_coupled_circuit_newton.m Mon Jul 29 15:53:32 2013 +0000 @@ -8,7 +8,7 @@ nnodes = columns (device.msh.p); Nelements = columns (device.msh.t); dt = (tspan(2) - tspan(1)) / 1000; - t(tstep = 1) = tspan (1); + tout(tstep = 1) = t = tspan (1); [V, n, p] = deal (Vin, nin, pin);
--- a/extra/secs1d/inst/secs3d_coupled_circuit_newton.m Mon Jul 29 13:50:32 2013 +0000 +++ b/extra/secs1d/inst/secs3d_coupled_circuit_newton.m Mon Jul 29 15:53:32 2013 +0000 @@ -8,7 +8,7 @@ nnodes = columns (device.msh.p); Nelements = columns (device.msh.t); dt = (tspan(2) - tspan(1)) / 1000; - t(tstep = 1) = tspan (1); + tout(tstep = 1) = t = tspan (1); [V, n, p] = deal (Vin, nin, pin);