Skip to content

module equation_builder.API

ThomWright edited this page Sep 7, 2014 · 2 revisions

Table of Contents generated with DocToc

Module: equation_builder

equation_builder

Create an equation to describe a circuit.

Source:

Requires

  • module:matrixy
  • module:chai

Namespaces

stamp

Type Definitions

builder

Type:
  • Object
Properties:
Name Type Description
stamp module:equation_builder.stamp
getEquation module:equation_builder.getEquation
Source:

equation

Type:
  • Object
Properties:
Name Type Description
nodalAdmittances external:Matrix
inputs external:Matrix
Source:

getEquation() → {module:equation_builder.equation}

Source:
Returns:
Type
module:equation_builder.equation

stamp(value) → {Object}

Stamp an element into the circuit equation.

Parameters:
Name Type Description
value Number

Value to stamp.

Source:
Returns:

Choice of units to stamp.

Type
Object
Examples
# Stamp a 5 ohm resistor between nodes 1 and 2
stamp(5).ohms.between(1, 2)
# Stamp 5 volts from node 1 to node 2
stamp(5).volts.from(1).to(2)
# Stamp a Voltage-Controlled-Current-Source (VCCS)
stamp.a.gain.of(10).multiplying.a.voltage.from(1).to(2)
.controlling.a.currentSource.from(2).to(3)

Generated with wicked.