Skip to content

symbulator 0.6.17

Choose a tag to compare

@Symbulator Symbulator released this 01 Oct 00:48
· 10 commits to main since this release

Added

  • evaluate(result, "expression") and solve(result, equations, unknowns) -- the app's Evaluate box and Solve card as package
    functions, so a notebook can do what the calculator did with a solved
    circuit's variables: evaluate(res, "vo/vs"), evaluate(res, "vc", conditions=["t = 2"]), solve(res, ["im(ze) = 0"], ["w"], conditions=["w > 0"], real_only=True). Both return SymPy and read
    answer names in every spelling (i_r1, ir1, IR1), with the same
    shorthand a circuit value gets (2'k, ^, u(t), {...} in FD).
    evaluate also answers pf(...), s2t(...)/t2s(...) and
    limit(...) with the answers substituted in first, takes a condition at
    infinity as a limit, and on a th() result knows the load answers
    irl, vrl and prl in the variable load. solve reads a pinning
    condition (R_3 = 10) as a substitution and a comparison as a filter on
    the roots, and real_only=True is the calculator's solve() against
    its cSolve(). A port() result and a plain mapping of names to values
    are accepted too, the latter being how er()'s single expression is
    handed over. New module symbulator/cards.py; nothing else changes.
  • Result.desc, the circuit a result was solved from. It lets
    cards.py derive an element's voltage drop from the two nodes it spans,
    which in fd and tr is not among values -- the third level is computed
    for dc and ac only -- so vc names an answer on the app's page while
    the package had no such key.
  • Notebooks. notebooks/books/ holds one executed notebook per built-in
    example book (the Course's problems, the two textbook samplers, the
    Showcase and the monograph's exemplars), A Baker's Dozen, and the
    Manual's circuits, each generated from the app's own files and compared
    with the app answer by answer. Not part of the installed package.

Fixed

  • th(), er() and port() accept a frequency written as a string, as
    ac() always has: th(circuit, "2", "0", domain="ac", omega="2*pi*2e3")
    reached the stamping code as a str and failed there with can't multiply
    sequence by non-int of type ImaginaryUnit
    , naming nothing the caller had
    typed. The one place all of them pass through now sympifies it.

On PyPI: https://pypi.org/project/symbulator/0.6.17/ (wheel sha256 c7108cbd0395...).