<!-- TE10 Studio documentation: /docs/app/roughness -->
# Surface roughness

Rough copper loses more than smooth copper once the skin depth δ gets close to the size of the
surface bumps: on PCB foils, from about 1 GHz up. TE10 Studio models this on finite-conductivity
surfaces by multiplying the smooth surface impedance Zs(ω) by a roughness factor K(ω). The field
inside the metal is still not meshed.

## Where to set it

- **Conductivity boundary** (**Boundaries › Assign Boundary › Conductivity (Lossy Metal)…**): *Surface roughness*
  and the model's parameters. Applies to the faces of that boundary.
- **Metal material** (material manager › **Edit Material...**): *Surface Roughness*. Applies to every conductor surface
  the mesher makes from solids of that material. The dialog previews the loss increase at 1, 10
  and 40 GHz.
- **Scripts**: `prj.boundaries.conductivity(..., roughness="huray", radius="0.5um", surface_ratio=2.26)`
  or `prj.materials.set_roughness("copper", "groisse", rms="1um")` (see [Excitations and boundaries](/docs/api/excitations-boundaries)).

## Models

| Model | Parameters | K(ω) | Use |
|---|---|---|---|
| Huray (snowball) | nodule radius a; surface ratio SR = N·4πa²/A_hex; A_matte/A_flat (default 1) | A_matte/A_flat + Σ (3/2)·SR / (1 + (1 − j)·δ/(2a)) | rough and very rough foils; keeps growing past 2× |
| Hammerstad–Jensen | RMS roughness Δ | 1 + (2/π)·atan(1.4·(Δ/δ)²) | moderate roughness; at most 2× |
| Groisse | RMS roughness Δ | 1 + exp(−(δ/(2Δ))^1.6) | moderate roughness; at most 2× |

Huray uses Bracken's causal form (DesignCon 2012). Its loss is exactly the classic
Huray ratio A_matte/A_flat + (3/2)·SR / (1 + δ/a + δ²/(2a²)), and the S-parameters stay causal for
time-domain use. SR is the HFSS "Huray surface ratio": N nodules of radius a on a tile of area A_hex
give SR = N·4πa²/A_hex. For example, a = 0.5 µm and N = 72 per 100 µm² give SR = 2.26.

K multiplies the whole impedance (resistance and internal inductance), in every solve type:
driven (uniform, adaptive and interpolating sweeps), eigenmode, and the wave-port mode solve.
With a Thickness set, K multiplies the finite-thickness impedance. Static solves ignore it.

## Imported projects

- **HFSS** (.aedt, .aedtz, .a3dcomp): roughness on a Finite Conductivity boundary comes in exactly. The RMS
  roughness becomes Groisse, and the nodule radius and Hall-Huray surface ratio become Huray. HFSS uses the
  same formulas.
- **CST** (.cst, .mtd): a lossy metal's surface roughness Rq comes in as Groisse with the same RMS, and the
  import log says so. CST solves Rq with its own Gradient model, which TE10 doesn't have. The two agree within
  about 5 % while the skin depth is larger than Rq (below about 4.4 GHz for Rq = 1 µm on copper). At higher
  frequencies CST's loss keeps rising past Groisse's 2× limit, so the imported model gives less loss there.
  Exporting a material to .mtd writes Hammerstad or Groisse roughness as CST's Rq. Huray has no CST material
  setting and is left out, with a warning.

## Validation

K(ω) was checked against Bracken's published curves and
the closed-form Hammerstad/Groisse values, plus a 25 mm stripline from 1 to 40 GHz solved with
smooth and rough copper. The extra insertion loss matches the analytic prediction
IL_rough = IL_dielectric + K·IL_conductor.

Roughness needs the solver that comes with TE10. With another Palace build, a solve with roughness set
stops with a message instead of running smooth.
