Material model
What a PhysicalMaterial describes, how Core computes complex permittivity, the sign convention, dispersion, perfect conductors and capability flags.
PhysicalMaterial is one solver-neutral record of what a structure is made of. Core computes only one physical quantity from it, the complex relative permittivity at a frequency. Everything else (layers, roughness, scattering) is stored for the solvers to interpret.
What a material describes#
| Group | Fields | Used by Core |
|---|---|---|
| Bulk response | eps_r, mu_r, sigma_e | Yes, for evaluate_static and evaluate_at_frequency |
| Dispersion | dispersion | Yes, in evaluate_at_frequency |
| Conductor model | conductor_model ("finite" or "perfect") | Only for capabilities() |
| Slab | thickness_m, geometry_mode ("thin_sheet" or "volumetric"), layers | Stored only |
| Surface | roughness_front, roughness_back, gain, scattering_coefficient, xpd_coefficient | Stored only |
| Identity | name, material_id, version | For IDs and versions |
A phase screen is not part of the material. It belongs to the binding between a material and a surface, so you set it on the Structure (Structure(..., phase_screen=...)).
Complex permittivity#
evaluate_at_frequency(f) returns a FrequencyMaterialSample whose eps_r is complex:
eps = eps_r - j * sigma_e / (2 * pi * f * eps_0), eps_0 = 8.8541878128e-12 F/mA lossy material therefore has a negative imaginary part. This matches an exp(+j * omega * t) time dependence. Solvers convert to their own convention; Maxwell, for example, documents exp(-i * omega * t) for its frequency-domain formulas.
from witwin.core import PhysicalMaterial
wet_ground = PhysicalMaterial(eps_r=30.0, sigma_e=0.15, name="wet ground")
print(wet_ground.evaluate_at_frequency(1.0e9).eps_r)(30-2.696265537678351j)At f = 0 a material without conductivity returns eps_r + 0j. A conductive one raises ValueError (Conductive materials require frequency_hz > 0.). A negative Python frequency also raises ValueError; tensor frequencies are not checked.
evaluate_static() returns the bulk values unchanged in a StaticMaterialSample(eps_r, mu_r, sigma_e).
If any of eps_r, sigma_e or the frequency is a tensor, the result is a complex tensor and keeps the autograd graph. Tensor inputs must share one device and one dtype.
Dispersion#
A material without dispersion has constant eps_r and sigma_e; only the 1/f term above varies. Two kinds of dispersion exist:
PowerLawDispersion(reference_frequency_hz, eps_r_exponent=0.0, sigma_e_exponent=0.0)scales the base values:eps_r * (f / f_ref) ** eps_r_exponentandsigma_e * (f / f_ref) ** sigma_e_exponent, then applies the formula above. The returned sample'ssigma_eis the scaled value.- Your own model. Any object with a
complex_eps(frequency_hz)method satisfies theDispersionSpecprotocol. Core returns its result aseps_ras is, without adding the conductivity term, so include losses in your model.
See Define materials for examples.
Perfect conductors#
A perfect electric conductor is an identity, not a number. PhysicalMaterial.perfect_conductor() (or conductor_model="perfect") marks the material as PEC while keeping finite parameters (eps_r=1, mu_r=1, sigma_e=0). Its capabilities().perfect_conductor is True. Solvers map that flag to their own PEC model; Core never stores an infinite or very large conductivity.
Capabilities#
capabilities() returns a MaterialCapabilities with boolean flags that a solver checks before it accepts a material:
| Flag | True for a PhysicalMaterial when |
|---|---|
conductive | sigma_e is not 0, or the material is a perfect conductor |
perfect_conductor | conductor_model == "perfect" |
magnetic | mu_r is not 1 |
dispersive | the material or one of its layers has a dispersion |
layered | layers is not empty |
rough | roughness_front or roughness_back is set |
anisotropic, phase_screen | never |
For tensor-valued sigma_e and mu_r, Core cannot read the value without a host synchronisation, so conductive and magnetic are True whenever these fields are tensors.
Other material types#
Structure accepts any object that implements the MaterialSpec protocol: a name attribute and the methods capabilities(), evaluate_static() and evaluate_at_frequency(frequency). Maxwell's Material is a PhysicalMaterial subclass with extra constitutive terms. See Write your own geometry or material.