PMDL Informal Language Specification

PMDL (Physical Model Description Language) is a modeling language I designed for circuit and semiconductor devices. I implemented it as part of my PhD at the ETHZ (see Litsios, J., 1996. A modeling language for mixed circuit and semiconductor device simulation, Hartung-Gorre). It was built as a subset of the C programming language to remain simple and familiar, meaning it retains basic C syntax but does not support pointers or full hierarchical models.

I had Gemini summarize the language specs below. The reason I bring it up is that the language vertex, edge, face, and element specifiers are actually tying the language semantics to the k-simplices of a 3D spatial manifold! And that is a pretty useful thing to know, and something I will bring up again in this blog.

FYI: Dessis, which I developed during my PhD and was later acquired by Synopsys to become the number one TCAD device simulator, was my PhD's principal activity. My DSL development compiled to code run in Dessis. 

Core Types and Modifiers

PMDL extends C with specific modifiers to handle equations, physical variables, and external parameters. Currently, the only supported base types for these modifiers are float and double.

  • variable: Identifies a model variable. It can only be used as an r-value (on the right side of an assignment) because its value is determined by the solver.

  • equation: Identifies a model equation. It can only be used as an l-value (on the left side of an assignment) and is always forced to equal zero by the simulator. Equations can be built incrementally across different devices using the =, +=, and -= operators.

  • extern: Used to access external parameters or data stored in the device's database.

Vectors and Spatial Data

To support physical equations, PMDL introduces vector types and spatial discretization operators.

  • vector3: Defines a standard 3-dimensional vector, regardless of the simulated device's actual dimensions.

  • vector: Defines a vector that automatically matches the dimensions of the specific device being simulated.

Mesh-Based Declarations

Data can be pinned to specific parts of a geometric mesh.

  • Specific mesh positions: You can force data to exist at a specific location using the vertex, edge, face, or element specifiers.

  • Automatic positioning: The mesh specifier lets the automatic mesh discretization engine determine the best position. (Note: This cannot be used with the extern specifier).

Built-In Functions

Vector & Math Operations

  • grad(x) / div(x): Computes the gradient or divergence of x. Argument x must at least be vertex based. Both grad and div produce vertex element data.  

  • dot(a, b) / cross(a, b): Computes the dot product or cross product of two vectors.

  • norm2(x) / norm(x): Computes the norm of a vector.

Mesh Discretization Helpers

  • diff(x): Computes the difference of a vertex-based x over mesh edges. Signature is from vertex to vertex edge.

  • egrad(x) / ediv(x): Computes the final gradient or divergence from an edge-based x (technically from vertex edge to vertex).

  • Mesh Geometry: edge_length(mp), face_area(mp), face_normal(mp), and element_volumes(mp) retrieve geometric properties for a given mesh position mp.

Physical & Simulation Helpers

  • limit(x, dx): Limits the next Newton step of variable x to dx.

  • d_by_dt(x): Computes the time derivative of x for transient models. Note that like many of the functions, this function expresses the model. (It is not implemented as a derivative but as an integration)!

  • time(): Returns the current simulation time.

  • bernoulli(x): Calculates x/(e^x-1).

  • fermi_integral(x, y): Calculates the Fermi-Dirac integral.

  • PMDL also supports standard C math functions like log, exp, sqrt, sin, sinh, etc.

All original content copyright James Litsios, 2026.