Re: [Qucs/gnucsator] DC voltage sweep

Felix Salfelder <[email protected]> Sun, 3 Oct 2021 00:19:40 +0200
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <[email protected]>
On Sat, Oct 02, 2021 at 02:55:57PM -0700, Dow Drake wrote:
> If we have a netlist similar to 'tests/dc_sweep.0.net', but which does a single sweep of DC voltage like this:
> ```
> Vdc:V1 A gnd U="V1"
> .SW:SW1 Sim="DC1" Type="lin" Param="V1" Start="10m" Stop="50m" Points="5"
> .DC:DC1 Temp="26.85" reltol="0.001" abstol="1 pA" vntol="1 uV" saveOPs="no" MaxIter="150" saveAll="no" convHelper="none" Solver="CroutLU"
> R:R1 gnd A R="500"
> ```
> The simulation fails, and no output is generated because (I think) in
> the method `find_sweep(CARD* c)` in 's_dc.cc', line 202
> the `dynamic_cast<ELEMENT*>(c)` fails for the `CARD` c with `dev_type` Vdc and `long_label` V1.

The issue is, in Qucsator, a Vdc instance is not an ELEMENT but a CARD
with a subckt. I put in find_sweep to find the actual ELEMENT to sweep.
At this stage I chose that the name must be "dev". I forgot to rename
all ELEMENT wrapper subdevices to "dev". Please try that.

I was hoping for a better solution... a qucsator-compatible solution
would sweep parameters, not ELEMENTs.