Skip to content

Boukamp DSL Reference

Circuits use Boukamp notation: series -, parallel p(…), and eleven element codes with optional embedded parameters.

Syntax

text
circuit   ::= element | series | parallel
series    ::= circuit "-" circuit
parallel  ::= "p(" circuit ("," circuit)+ ")"
element   ::= CODE ID param_block?
param_block ::= "{" number ("," number)* "}" | "[" number ("," number)* "]"

Full grammar and examples: Boukamp Syntax Reference.

Element kinds (11)

CodeLabelShort params
RResistorR
CCapacitorC
LInductorL
QCPEQ₀, n
WWarburg (infinite)σ
WsWarburg (short)Y₀, B
WoWarburg (open)Y₀, B
GGerischerY₀, K
PdwParallel Diffusion WarburgD1, D2, θ, Λ
CCCole-ColeR, τ, α
HNHavriliak-NegamiR, τ, α, β

Per-kind detail, symbols, and ranges: Element Types Reference.

Examples

Series

text
R0-C1
R0-C1-L2
R0-p(Q1,R2-Pdw3)
CC1{50,1e-3,0.8}-R2

Parallel

text
p(R0,C1)
p(R0,p(C1,Q2))

Mixed

text
R0-p(R1,C1)              # Randles simplified
R0-p(R1,C1)-Wo2          # Randles + Warburg (open)
R0-p(Ws1,Wo2)-G3         # Finite diffusion + Gerischer

Validation Rules

The parser validates:

  • Duplicate IDsR0-p(R0,C1) → error: R0 appears twice
  • Unknown codesX0 → lex error at position
  • Unbalanced parenthesesp(R0,C1 → parse error
  • Embedded param countQ1{1} → parameter-count error (expects 2)
  • DC pathp(C0,L1) → warning: no resistive path

Next