Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.maple > #935

Re: Spice Question

From Joe Riel <joer@san.rr.com>
Newsgroups comp.soft-sys.math.maple
Subject Re: Spice Question
Date 2014-08-30 17:15 -0700
Organization A noiseless patient Spider
Message-ID <87oav11pkw.fsf@san.rr.com> (permalink)
References <5dSdnVgc3KQX3p_JnZ2dnUVZ_u2dnZ2d@megapath.net>

Show all headers | View raw


"Thomas D. Dean" <tomdean@speakeasy.org> writes:

> How do I form, solve
>
> ## syrup example for the problem posed on the maxima mailing list
> ## by Rupert Swarbrick rswarbrick@gmail.com
> ## creating a shunt to measure current from a power supply in decade
> ## steps.
> ## the maxima solution is:
> ##  (%o49) [r1 =   0.04000003980823639,r2 =   0.400003980860735,
> ##          r3 =   4.000398123173552,  r4 =   40.03984945656259,
> ##          r5 = 404.0224806732696,    r6 = 4444.219040588743]
> restart; with(Syrup);
> r_isol:=100000;
> ckt:="*Shunt by Rupert Swarbrick \n\
> V 1 2 1 \n\
> R1 1 2 \n\
> Ra 1 3 r_isol \n\
> Rb 2 4 r_isol \n\
> R2a  3 21 r_isol \n\
> R2  21 22 \n\
> R2b 22  4 r_isol \n\
> R3a  3 31 r_isol \n\
> R3  31 32 \n\
> R3b 32  4 r_isol \n\
> R4a  3 41 r_isol \n\
> R4  41 42 \n\
> R4b 42  4 r_isol \n\
> R5a  3 51 r_isol \n\
> R5  51 52 \n\
> R5b 52  4 r_isol \n\
> R6a  3 61 r_isol \n\
> R6  61 62 \n\
> R6b 62  4 r_isol \n\
> .end";
>
> I tried using a subckt for the R2..R6 parts.
> ##
> ## X2 3 4 net(Rx=R2) \n\
> ## X3 3 4 net(Rx=R3) \n\
> ## X4 3 4 net(Rx=R4) \n\
> ## X5 3 4 net(Rx=R5) \n\
> ## X6 3 4 net(Rx=R6) \n\
> ## \n
> ## .subckt net p n \n\
> ## R1 p a r_isol \n\
> ## R a b Rx \n\
> ## R2 b n r_isol \n\
> ## .ends net \n\
>
> Is this correct, other than being commented out?
>
> Tom Dean

As with any Spice deck, you need to assign ground (node 0).
Preferable is to change, say, node 1 to node 0. 
Or add a short between 0 and 1.   Your subcircuit looks okay,
but I haven't tried it.

-- 
Joe Riel

Back to comp.soft-sys.math.maple | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Spice Question "Thomas D. Dean" <tomdean@speakeasy.org> - 2014-08-30 14:35 -0700
  Re: Spice Question Joe Riel <joer@san.rr.com> - 2014-08-30 17:15 -0700
    Re: Spice Question Joe Riel <joer@san.rr.com> - 2014-08-30 17:18 -0700
    Re: Spice Question "Thomas D. Dean" <tomdean@speakeasy.org> - 2014-08-30 23:44 -0700
      Re: Spice Question Joe Riel <joer@san.rr.com> - 2014-08-31 08:02 -0700
        Re: Spice Question "Thomas D. Dean" <tomdean@speakeasy.org> - 2014-09-01 21:22 -0700

csiph-web