Running Analyses
Browser simulation sends the generated circuit directly to local ngspice WebAssembly. Server simulation uses a separate safe path: the requested analysis is parsed structurally, validated, and compiled into a server-owned ngspice control block. Arbitrary control language is never executed on the server.
Supported server analyses
| Analysis | Accepted form | Purpose |
|---|---|---|
| Operating point | .op | DC operating point. |
| DC sweep | .dc source start stop step | Sweep one independent source. |
| AC sweep | .ac lin|dec|oct points start stop | Small-signal frequency response. |
| Transient | .tran step stop [start [maxStep]] [uic] | Time-domain response. |
A server job must contain exactly one analysis. Point and workload limits are listed on the Limits page.
Source values
Independent voltage and current sources accept the following server-side forms:
- A numeric value, or
DC value. AC magnitudeorAC magnitude phase.DC value AC magnitudeorDC value AC magnitude phase.PULSE(...)with seven arguments.SIN(...)with three to six arguments.
SPICE suffixes are parsed as SPICE values, including forms such as 1, 12,
1k, 10k, 1Meg, 1u, 1uF, and 10n.
.control on the server
The editor may generate a control block for local WebAssembly execution. In server mode, Giux-CalcLab accepts
a deliberately small declarative subset: op, dc, ac, tran,
meas, and measure. The block is removed from the submitted netlist after validation;
the server generates the actual ngspice command sequence itself.
.control
ac dec 100 10k 1Meg
meas ac peak_gain MAX vdb(4)
.endc
Commands such as shell, source, write, wrdata,
include/lib, set, let, alter, and loop commands are rejected.
Browser-only overlays may use a wider local control script; they are documented separately.
.model support
Server simulation accepts .model definitions only for diode (D), NPN, and PNP devices.
Model parameters must be numeric and belong to the validator's allowlist. The model type must match the D or Q
element that references it. Continuation lines beginning with + are accepted for model definitions.
.model MYD D(IS=2n N=1.8)
D1 1 0 MYD
.model MYPNP PNP(BF=180 VAF=80)
Q1 3 2 1 MYPNP
Built-in selectors currently provide common diode, LED, Zener, 2N3904/2N2222 NPN, and 2N3906/2N2907 PNP models. Custom D/NPN/PNP model statements use the same server validation.
.meas and .measure
Measurements are accepted for AC, transient, and DC analyses. Supported forms include
MAX, MIN, AVG, RMS, PP, INTEG,
FIND, WHEN, and TRIG/TARG, with applicable
FROM/TO, AT, RISE, FALL,
CROSS, and LAST qualifiers.
.meas tran vout_max MAX v(4) FROM=1m TO=10m
.measure ac gain_10k FIND vdb(4) AT=10k
.meas tran delay TRIG v(2) VAL=2.5 RISE=1 TARG v(4) VAL=2.5 RISE=1
Operating-point measurements are not part of the current server measurement subset.
Where results appear
Measurements, numerical waveforms, and the SPICE Log are exposed in the Results area. Open the Results & Workspace page for viewer, export, persistence, and sharing details.