Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

femx

CI Python License

Verification-first, differentiable electrothermal FEM for silicon photonics.

femx connects electrical conduction, Joule heating, thermal transport, thermo-optic material updates, waveguide modes, and FDTDX optical objectives through explicit numerical contracts.

  • JAX provides native differentiable finite-element operators and implicit adjoints.
  • Elmer provides an independently executed open-source FEM reference.
  • FDTDX consumes explicit material, mode, source, detector, and result contracts.

Research preview: APIs, evidence schemas, and experimental distributed interfaces may change before the first stable release.

3D silicon-photonics ring heater

Physical-scale 3D ring-heater material stack and direct 5 mA JAX-Elmer thermal fields

Native JAX and locked external Elmer independently solve the same coarse Gmsh Tet4 problem at 5 mA. No displayed temperature or parity field is rescaled from the retained 15 mA result.

Direct 5 mA reference Value
Mesh 12,761 nodes; 71,808 Tet4 cells
Voltage 0.229573 V
Joule power 1.14786 mW
Peak temperature rise 18.2608 K
Maximum JAX-Elmer temperature difference $2.12\times10^{-8}\ \mathrm{K}$
Relative $L_2$ temperature-rise difference $2.31\times10^{-10}$
Maximum conductor-potential difference $7.72\times10^{-11}\ \mathrm{V}$

This 3D same-discretization parity result is solver evidence for an uncalibrated, constant-property benchmark. The modeled thermal domain is 20 um by 20 um, contains only 0.5 um of silicon below the 2 um BOX, fixes the bottom at 300 K, uses adiabatic sides, and applies top convection to 300 K with $h=10\ \mathrm{W,m^{-2},K^{-1}}$. In the retained coarse result, 99.997 percent of the heat exits through the fixed bottom. The result is not a fabricated-device prediction.

The original 15 mA source-reproduction reaches a 164.348 K peak rise and is retained for source traceability, not as a recommended operating point. See the direct 5 mA method and open fields, thermal-scope note, original 15 mA bundle, and earlier 2D adjoint reference.

Thermal-envelope sensitivity

Ring-heater domain-width and modeled-substrate-depth sensitivity

A separate CPU float64 study crosses 20, 40, and 80 um square domains with 0.5, 5, and 50 um modeled silicon depths while holding material values and the mesh-size policy fixed. The widest, deepest case differs from the source envelope by -1.41 percent in peak K/mW and -3.23 percent in ring-mean K/mW. Width and depth interact; this bounded study is not formal domain convergence or device calibration. The complete case evidence is public.

What femx provides

  • Solver-neutral problem, mesh, material, artifact, and validation contracts.
  • JAX-native steady heat, current, Joule-heating, and electrothermal paths.
  • Independent same-mesh checks against separately installed Elmer.
  • Residual-defined differentiation with finite-difference or independent-adjoint checks.
  • Explicit FEM-to-Yee mode transfer and FDTDX interoperability.
  • Experimental distributed JAX paths with bounded physical TPU evidence.

Process success, numerical convergence, and scientific validation are reported separately. A test or completed executable does not by itself establish a physical claim.

Current public scope

Capability Status
2D steady heat and current FEM Available and cross-validated
2D electrothermal coupling and implicit adjoint Available for the documented subset
3D Tet4 current, Joule heating, and steady heat Available for the constant-property forward subset
3D ring-heater JAX-Elmer field parity Available on the public coarse mesh
Three-level 3D ring-heater mesh sensitivity Available through 3,179,879 Tet4 cells
2D waveguide port modes and documented eigen-adjoints Available for the lossless PEC subset
FEM-to-Yee transfer and FDTDX consumers Available for the documented contracts
Distributed scalar and electrothermal JAX paths Experimental; bounded TPU evidence retained
3D ring-heater FDTDX resonance response In development

Transient thermal analysis, foundry-calibrated prediction, and a continuum-converged ring-heater value are not currently claimed.

Installation

femx supports Python 3.11 to 3.14. Install the published development release from PyPI with:

pip install "femx==0.1.0.dev0"
femx doctor

For an editable source checkout, install uv and run:

git clone https://github.com/yspkm/femx.git
cd femx
uv sync --locked --extra jax --extra artifacts --extra meshing
uv run femx doctor

The optional jax, artifacts, and meshing extras may be selected for workflows that need them. Gmsh, Elmer, and FDTDX remain separately installed external tools.

Run the portable public CI selection with:

uv run pytest -m "unit or architecture"

Elmer comparison requires JAX float64. Set JAX_ENABLE_X64=1 before importing JAX.

Runtime model

prepared = femx.prepare(problem, backend, request=prepare_request)
solution = femx.solve(prepared, backend, request=solve_request)

Problem contains solver-neutral physics. PreparedProblem binds one exact backend payload, and Solution records fields, observables, convergence, and validation state. femx does not silently change the backend, precision, mesh, element family, or scalar type.

Documentation

For reproducible work, record the exact femx version or source commit together with external solver revisions, mesh and material identities, numerical policy, and the relevant evidence artifact.

License

femx is distributed under the MIT License. Elmer, FDTDX, JAX, and Gmsh are separate projects with their own licenses; femx does not vendor their implementations.

Acknowledgements

We gratefully acknowledge Google's TPU Research Cloud (TRC) program for providing access to Cloud TPU resources that supported the development and distributed validation of femx.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

femx-0.1.0.dev0.tar.gz (8.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

femx-0.1.0.dev0-py3-none-any.whl (433.2 kB view details)

Uploaded Python 3

File details

Details for the file femx-0.1.0.dev0.tar.gz.

File metadata

  • Download URL: femx-0.1.0.dev0.tar.gz
  • Upload date:
  • Size: 8.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for femx-0.1.0.dev0.tar.gz
Algorithm Hash digest
SHA256 105d477632b2bf5ec8d1f98fcb2da2dd8f9d3590d1d2c00598d0e498647a71e2
MD5 b62e7fba47d1bb167855019aed5606e5
BLAKE2b-256 2240aed97b5a222548bf78de6b54f5536c2f5f60630bcce3f93e05075069be16

See more details on using hashes here.

File details

Details for the file femx-0.1.0.dev0-py3-none-any.whl.

File metadata

  • Download URL: femx-0.1.0.dev0-py3-none-any.whl
  • Upload date:
  • Size: 433.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for femx-0.1.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 09c63ef3e8a2a614f7e89fdcbf444d813467481122616cc872ad8aa7bfda83d1
MD5 551e296cc1f67c75078c9572af194906
BLAKE2b-256 10d4043653eef6f84d9d04bc0b8ebc7b48e64094e13549c13e49b9abb1038d38

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0.dev0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page