Package: tidy3d-beta
Tidy3DTidy3D 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 referencehere.
The source code for our documentation ishere.InstallationSigning up for tidy3dNote that while this front end package is open source, to run simulations on Flexcompute servers requires an account with credits.
You can sign uphere.  While it's currently a waitlist for new users, we will be rolling out to many more users in the coming weeks!  Seethis pagein our documentation for more details.Installing the front endUsing pip (recommended)The easiest way to install tidy3d is throughpip.pip install tidy3dThis will install the latest stable version, to get the a "pre-release" version.pip install --pre tidy3dAnd to get a specific versionx.y.zpip install tidy3d==x.y.zInstalling on WindowsPre-release1.9.0rc1introduces theadjointplugin, which usesjaxfor automatic differentiation of tidy3d simulations. As windows users may have trouble installingjax, the recommended approach is to usejax-windows-builderto 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 tidy3dMore details can be foundhere.Installing from sourceFor 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 authenticationAuthentication (linking the front end to your account) will be done via an API key moving forward.You can find your API key in theweb interfaceAfter signing in and navigating to the account page by clicking the "user" icon on the left-hand side, copy the API key from the button on the right-hand side of the page.To set up the API key to work with Tidy3D, we need to store it either in the~/.tidy3d/configfile or an environment variable.You can set it up using one of three following options.Command line (recommended)tidy3d configureand then enter your API key when prompted.Note that Windows users must run the following instead (ideally in an anaconda prompt):pip install pipx
pipx run tidy3d configureManuallyFor an API key of{your_api_key}, you may runecho 'apikey = "{your_api_key}"' > ~/.tidy3d/configor manually insert the line'apikey = "{your_api_key}"in the~/.tidy3d/configfile.Environment VariableSet theSIMCLOUD_APIKEYenvironment variable to your API key (in quotes).export SIMCLOUD_APIKEY="{your_api_key}"Testing the installation and authenticationFront end packageYou 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.0AuthenticationTo test the web / authenticationpython -c "import tidy3d.web"Issues / Feedback / Bug ReportingYour feedback helps us immensely!If you find bugs, file anIssue.
For more general discussions, questions, comments, anything else, open a topic in theDiscussions Tab.LicenseGNU LGPL