next up previous contents index
Next: Device Models Up: WRspice Input Format Previous: .adc Line   Contents   Index

Circuit Elements

Each element in the circuit is specified by an element line that contains the element name, the circuit nodes to which the element is connected, and the values of the parameters that determine the electrical characteristics of the element. The first letter of the element name specifies the element type (case insensitive). For example, a resistor name must begin with the letter `R' or `r' and can contain one or more characters. Hence, R, r1, Rse, ROUT, and r3ac2zY are valid resistor names.

In the descriptions that follow, data fields that are enclosed in square brackets `[', `]' are optional. All indicated punctuation (parentheses, equal signs, etc.) is optional and merely indicates the presence of any delimiter. A consistent style such as that shown here will make the input easier to understand. With respect to branch voltages and currents, WRspice uniformly uses the associated reference convention (current flows in the direction of voltage drop).

The circuit cannot contain a loop of voltage sources. If a dc operating point analysis is performed, which is true for all analysis except for transient analysis with the uic (use initial conditions) flag set, the circuit can not contain a loop of voltage sources and/or inductors and cannot contain a cutset of current sources and/or capacitors. In transient analysis with the uic flag set (which is always the case when Josephson junctions are present), inductor/voltage source loops are allowed, as are capacitor/current source cut sets. However, parallel voltage sources and series current sources are not accepted. It is not strictly necessary that each node in the circuit have a dc path to ground with the uic flag given, however convergence problems may result. It is sometimes necessary to add a large-valued resistor to ground in these cases. In general, nodes should have at least two connections.

This and the following sections describe the devices available in the standard device library linked into WRspice. The device library contains the element and model code for each device, as well as the parser for the element specification lines.

Most of the code for the device library (with the exception of restricted third-party semiconductor models) is available upon request from Whiteley Research Inc. In theory, users can build their own, customized device library for use with WRspice. In this case, devices can be added to or deleted from the library, or modified. Contace Whiteley Research for more information.

This format for most device lines, including the key letters, number of nodes, etc., is standard for the SPICE input language, but is set entirely by the code in the device library, and hence can be abridged in a custom device library. The descriptions below pertain to the standard library.

The following is a complete list of circuit elements available in the standard WRspice library, and the key letter (the first letter of the device name).

Passive Elements
Capacitor c
Inductor l
Mutual Inductor k
Resistor r
Current-Controlled Switch w
Voltage-Controlled Switch s
General Transmission Line t
Lossy Transmission Line o
Uniform RC Line u
Voltage and Current Sources
General Voltage Source v
General Current Source i
Arbitrary Source a
Voltage-Controlled Current Source g
Voltage-Controlled Voltage Source e
Current-Controlled Current Source f
Current-Controlled Voltage Source h
Semiconductor Devices
Junction Diode d
Bipolar Junction Transistor q
Junction Field-Effect Transistor j
Superconductor Devices
Josephson Junction b

The models for the semiconductor and some other devices require many parameter values. Often, many devices in a circuit are defined by the same set of device model parameters. For these reasons, a set of device model parameters is defined on a separate .model line and assigned a unique model name. The device element lines in WRspice then refer to the model name. This scheme alleviates the need to specify all of the model parameters on each device element line.

The show command with the -D option is useful for printing a list of the parameters names that can be used on a device instance line. Only the parameters not listed as ``RO'' (read-only) can be specified on the line.

next up previous contents index
Next: Device Models Up: WRspice Input Format Previous: .adc Line   Contents   Index
Stephen R. Whiteley 2017-03-28