Docs / Getting started

Getting started

Open the app, mint an API key, submit your first analysis, and read a structured, evidence-backed result — from the browser or the Python SDK, in a few minutes.

Self-serve, today. cufemlab runs as a hosted web app at /app/ plus a Python client SDK. Everything talks to the canonical base URL https://app.cufemlab.secrotec.nl. Create an account, run the demo workflow, and you have a first result before you touch any geometry.

Two ways to run

Both paths hit the same API, the same queue, and the same result.v1 envelope. Point-and-click when you are exploring; script it when you want repeatability.

browser

The web app

Create a project, pick an analysis, fill the per-type parameter form, submit, and watch the job progress live — no local setup at all.

/app/ · account + API key · live queue · one-click signed report
sdk

The Python client

Drive the same workflows from code: create_projectanalyzejob.wait()job.result(). Ideal for parameter sweeps and CI.

Client(api_key) · scriptable · result.v1 + artifacts

1. Create an account and an API key

Open /app/ and sign up. Once you are in:

Treat the key like a password. It authenticates every job you submit and every artifact you download. Do not paste it into shared notebooks, screenshots, or version control. You can revoke and re-issue keys any time from /app/api_keys.html.

2. First run in the browser

The fastest path to a result, start to finish:

3. The same run from the SDK

The minimal end-to-end flow: create a project, run the demo workflow, wait for it, and read the structured result.

First run — demo to resultPython
import os
from cufemlab_client import Client

client = Client(api_key=os.environ["CUFEMLAB_API_KEY"])   # base url defaults to https://app.cufemlab.secrotec.nl

project = client.create_project(name="Quick check")

job = client.analyze(
    project_id=project.id,
    analysis_type="demo_motor_quick_check",
)                                             # omit max_minutes → per-analysis default

job.wait(poll_interval=3)                         # blocks until the job leaves the queue

result = job.result()
print(result.verdict, result.value)            # verdict + headline value
print(result.summary)                          # human-readable summary
print(result.metrics)                          # structured numbers

To run against your own geometry, upload it first and pass the returned file IDs into analyze(...):

One job at a time, per account, by default. There is a per-user concurrency cap. Submitting a second concurrent job over the cap returns HTTP 429 CONCURRENCY_LIMIT_EXCEEDED — wait for the running job (or use job.wait()) before launching the next.

4. Read the result and artifacts

Every completed job returns the same result.v1 envelope, whether you fetched it from the browser or the SDK:

Alongside the envelope, each job produces artifacts — plots, field files (VTU for the 3-D lane), and, for the validated cogging workflow, an independent FEMM / GetDP validation card that cites the tolerance and the measured error. The API keys, the result.v1 envelope, and artifact download all work end to end.

5. Generate a signed evidence report

When you want something auditable, run the signed_report_generation utility against a completed job. It produces a deterministic, HMAC-signed PDF with SHA-256 provenance over inputs, code, and materials — so anyone can confirm the report matches the run it claims to describe.

Signed report from a completed jobPython
report = client.analyze(
    project_id=project.id,
    analysis_type="signed_report_generation",
    input_params={"source_job_id": job.id},        # the completed job to sign
)
report.wait()
report.download_report("report.pdf")             # HMAC-signed PDF, SHA-256 provenance

The same report is one click away in the browser at /app/reports.html.

The catalog: 15 workflows, all live

The catalog holds fifteen analysis workflows: eight magnetics workflows (below), a thermal / core-loss / coupling lane and a neural surrogate — documented in Thermal, core-loss & FNO — plus GPU-accelerated 3-D field analysis (cufem3d_gpu_field_analysis), which runs on compatible GPU workers and reports the actual execution backend and fallback state in its runtime metadata. See the feature matrix for all fifteen. The eight magnetics workflows, including the 3-D field validation lane:

For the full parameter reference of each workflow, see the cufem engine API and examples & recipes; the validated motor path is documented in the motor workflow.

What is validated, what is maturing, what is roadmap

We keep current capability and roadmap clearly separated so you always know how much weight a number carries.

Available today

  • Self-serve app + Python SDK: projects, jobs, API keys, result.v1, artifacts
  • Validated 2-D moving-band cogging with a FEMM / GetDP validation card
  • 3-D field validation lane: geometry, mesh, magnetic field & flux, relative-error verdict
  • Deterministic HMAC-signed PDF evidence reports

Maturing

  • 2-D operating-torque estimate (engineering estimate, not independently validated)
  • Iron-loss estimate (Steinmetz-type engineering estimate)
  • Legacy 2-D cogging sweep (partial; superseded by moving-band)

Roadmap / not claimed

  • Full 3-D motor torque with skew and end-effects
  • Full 3-D operating maps
  • Thermal, transient / time-harmonic eddy-current, and conductive-region multiphysics solvers
  • Commercial-tool benchmark comparisons

3-D field validation is available now; full 3-D motor simulation with torque, skew, and end-effects is on the roadmap. See physics domains and the roadmap for where this is heading, and hard limitations for the honest scope statement.

Credits and billing

Billing is fail-closed: Stripe is not activated, so nothing charges a card. Free-trial credits cover the free-eligible analysis types — including the 3-D field validation lane (1 credit, ≤5 min) — so you can complete the first-run path end to end at no cost. You can review your balance and usage at /app/credits.html.

Compute, briefly. A FastAPI API, a Redis-backed queue worker, and Postgres run your jobs; the PMSM and cogging analyses run GPU-first on an RTX-class node, while iron-loss, materials, signed reports, the demo, and the 3-D field validation run on CPU. For the full picture, see compute: GPU & CPU.

Next steps

Questions about scoping a run or a result you did not expect? Reach us at contact or request a pilot. cufemlab is built by Secrotec B.V.