Metadata-Version: 2.2
Name: flex-rf
Version: 0.1.0
Summary: Extremely large radio-frequency and microwave electrodynamics simulations.
Author-Email: "Flexcompute Inc." <support@flexcompute.com>
Project-URL: homepage, https://www.flexcompute.com/
Requires-Python: <3.15,>=3.11
Requires-Dist: click>=8.0
Requires-Dist: tidy3d<2.12,>=2.11.0
Requires-Dist: tomlkit>=0.13
Provides-Extra: notebooks
Requires-Dist: plotly>=5.0; extra == "notebooks"
Requires-Dist: tidy3d[dev]<2.12,>=2.11.0; extra == "notebooks"
Description-Content-Type: text/markdown

# flex-rf

`flex-rf` is a software package for extremely large radio-frequency and
microwave electrodynamics simulations using the finite-difference time-domain
(FDTD) method. You can work with `flex-rf` through the Python package or
through a web-based graphical user interface.

Read the [RF documentation](https://docs.flexcompute.com/rf/latest/) for
guides, examples, and API reference material.

## Quickstart

Install the latest stable `flex-rf` package:

```bash
pip install --user flex-rf
```

Configure `flex-rf` with the API key from your account:

1. Get your API key from the [RF GUI](https://tidy3d.simulation.cloud/).
2. Run:

```bash
flex-rf configure --apikey=XXX
```

`flex-rf` stores credentials in its own configuration, separate from Tidy3D.
By default this is `~/.config/flex-rf/config.toml`; if `FLEX_RF_BASE_DIR` is
set, the file is written under `$FLEX_RF_BASE_DIR/config/config.toml`.

Environment precedence for API keys is:

1. `FLEX_RF_APIKEY`
2. the flex-rf `config.toml`

Runtime-only logging and local cache settings can be configured with
`flex_rf.config` and are applied only around `flex_rf.web` calls:

```python
import flex_rf

flex_rf.config.logging.level = "ERROR"
flex_rf.config.local_cache.enabled = False
```

These runtime settings are process-local and are not written to flex-rf or
Tidy3D config files. Persistent cache enablement, directory, and size limits are
configured through the CLI:

```bash
flex-rf cache configure --enabled --directory ~/.cache/flex-rf/simulations --max-size-gb 20 --max-entries 1000
flex-rf cache info
flex-rf cache clear
```

For wrapper-phase notebooks that need to silence Tidy3D warnings before a
`flex_rf.web` call, use the Tidy3D compatibility namespace directly:

```python
import flex_rf.tidy3d as rf

rf.config.logging.level = "ERROR"
```

## Start Here

After installation, choose the workflow that fits how you want to work with
`flex-rf`.

### Choose Your Workflow

- Use the Python package when you want scriptable simulation setup,
  automation, and postprocessing.
- Use the RF GUI when you want a browser-based workflow for simulation setup
  and job management: [RF GUI](https://tidy3d.simulation.cloud/)
- Open the RF API reference for the main `flex-rf` and Tidy3D microwave entry
  points: [Tidy3D microwave API reference](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/microwave/index.html)

## Related Products

`flex-rf` is part of a broader product ecosystem:

- [PhotonForge](https://docs.flexcompute.com/projects/photonforge/en/latest/)
  for photonics design and simulation workflows.
- [RF GUI](https://tidy3d.simulation.cloud/) for browser-based simulation
  setup and job management.
- [Tidy3D microwave docs](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/microwave/index.html)
  for deeper RF reference material.

## Learn More

- [About our solver](https://www.flexcompute.com/tidy3d/)
