Skip to main content

A fast FDTD solver

Project description

Tidy3D

Notebooks tests Documentation Status Language grade: Python PyPI version shields.io

Tidy3D is a software product from Flexcompute that enables large scale electromagnetic simulation using the finite-difference time-domain (FDTD) method.

This repository stores the python interface for Tidy3d.

This code allows you to:

  • Programmatically define FDTD simulations.
  • Submit and magange simulations running on Flexcompute's servers.
  • Download and postprocess the results from the simulations.

You can find a detailed documentation and API reference here. The source code for our documentation is here.

Installation

Signing up for tidy3d

Note that while this front end package is open source, to run simulations on Flexcompute servers requires an account with credits. You can sign up here. While it's currently a waitlist for new users, we will be rolling out to many more users in the coming weeks! See this page in our documentation for more details.

Installing the front end

Using pip (recommended)

The easiest way to install tidy3d is through pip.

pip install tidy3d

This will install the latest stable version, to get the a "pre-release" version.

pip install --pre tidy3d

And to get a specific version x.y.z

pip install tidy3d==x.y.z

Installing on Windows

Pre-release 1.9.0rc1 introduces the adjoint plugin, which uses jax for automatic differentiation of tidy3d simulations. As windows users may have trouble installing jax, the recommended approach is to use jax-windows-builder to first install jaxlib before tidy3d.

pip install "jax[cpu]===0.3.14" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
pip install tidy3d

More details can be found here.

Installing from source

For development purposes, and to get the latest development versions, you can download and install the package from source as:

git clone https://github.com/flexcompute/tidy3d.git
cd tidy3d
pip install -e .

Configuring and authentication

Authentication (linking the front end to your account) will be done via an API key moving forward.

You can find your API key in the web interface http://tidy3d.simulation.cloud

After signing in, copy the API key for the next steps.

To set up the API key to work with Tidy3D, we need to store it either in the ~/.tidy3d/config file or an environment variable.

You can set it up using one of three following options.

Command line (recommended)

tidy3d configure and then enter your API key when prompted.

Manually

For an API key of {your_api_key}, you may run

echo 'apikey = "{your_api_key}"' > ~/.tidy3d/config

or manually insert the line 'apikey = "{your_api_key}" in the ~/.tidy3d/config file.

Environment Variable

Set the SIMCLOUD_API_KEY environment variable to your API key (in quotes).

export SIMCLOUD_API_KEY="{your_api_key}"

Testing the installation and authentication

Front end package

You can verify the front end installation worked by running:

python -c "import tidy3d as td; print(td.__version__)"

and it should print out the version number, for example:

1.0.0

Authentication

To test the web / authentication

python -c "import tidy3d.web"

Issues / Feedback / Bug Reporting

Your feedback helps us immensely!

If you find bugs, file an Issue. For more general discussions, questions, comments, anything else, open a topic in the Discussions Tab.

License

GNU LGPL

Project details


Download files

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

Source Distribution

tidy3d-beta-1.9.1.tar.gz (466.1 kB view details)

Uploaded Source

Built Distribution

tidy3d_beta-1.9.1-py3-none-any.whl (510.5 kB view details)

Uploaded Python 3

File details

Details for the file tidy3d-beta-1.9.1.tar.gz.

File metadata

  • Download URL: tidy3d-beta-1.9.1.tar.gz
  • Upload date:
  • Size: 466.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for tidy3d-beta-1.9.1.tar.gz
Algorithm Hash digest
SHA256 43d4028cda8d346adccede51284c6004aef882672a2bea24c7e6c062cd68d364
MD5 3a6ed5633a66479d72f63bb3a91393d3
BLAKE2b-256 238afea0b1e06cd745f21f2b57b3752e62b1e2093f8d38ada6296be8b85d4400

See more details on using hashes here.

File details

Details for the file tidy3d_beta-1.9.1-py3-none-any.whl.

File metadata

  • Download URL: tidy3d_beta-1.9.1-py3-none-any.whl
  • Upload date:
  • Size: 510.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for tidy3d_beta-1.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fc9280a850cbaf43f0b0b14bf9291fc74513cc2bc7efd4982393c29ebbb65b67
MD5 5361ca058c50a26014d8b7191af34dfe
BLAKE2b-256 b1900d28ed4f0ebfa9493825bdb8ccbd13901d5a83355c19b283fa2f9e19f53a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page