Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Joe Riel Newsgroups: comp.soft-sys.math.maple Subject: Re: Spice Question Date: Sat, 30 Aug 2014 17:15:59 -0700 Organization: A noiseless patient Spider Lines: 61 Sender: JoeRiel@cpe-75-80-177-38.san.res.rr.com Message-ID: <87oav11pkw.fsf@san.rr.com> References: <5dSdnVgc3KQX3p_JnZ2dnUVZ_u2dnZ2d@megapath.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx05.eternal-september.org; posting-host="15591ad2607da309a0d1a78a1d632bc7"; logging-data="15385"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CQ5i8/tedIcRCuL2oAWv8" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:OqgvGhzXIEv302awQCl31cw893c= sha1:QG64fgmI3lDT87BE2EusWvAQuxg= Xref: csiph.com comp.soft-sys.math.maple:935 "Thomas D. Dean" 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