Skip to main content

ADA - Assembly for Design & Analysis

Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge PyPi Badge

A python library for working with structural analysis and design. This library should be considered as experimental.

The recommended way of installing ada-py is by creating a new isolated environment for the installation like so:

mamba create -n adaenv ada-py

Here are some of the goals with ada-py:

  • Support reading, writing and modifying FE models and post-processing FE results
  • Support open source and commercial FE packages (based on what I use/would like to use regularly)
  • Support scriptable FE meshing
  • Support reading/writing CAD/BIM formats (STEP/IFC) & mesh formats (GLTF)
  • Use a CSG (Constructive Solid Geometry) core primitives library for boolean operations based on the IFC/STEP standards
  • Provide the building blocks for advanced parametric and procedural 3d model design and simulation workflows
  • The library should always strive for user ergonomics.

Command line

Installing the package also installs a console script. Note that the distribution is named ada-py but the command is ada — there is no ada-py command:

ada --help
Command What it does
ada convert Convert a model between CAD/FEM formats (ifc, step, xml, inp, fem, sat → ifc, step, gltf/glb, xml, inp). Local.
ada view Open the built-in web viewer on a file, with the react, pygfx or trimesh renderer. Local.
ada build Run the entrypoints declared in an ada_config.toml and push the artefacts to a viewer (run, upload, run-and-upload).
ada files List, download, upload and delete blobs in a viewer scope (list, download, upload, delete).
ada audit Query, fetch and locally re-run viewer audit conversions (runs, run, log, perf, profile, fetch, logfile, repro, wasm-sweep, parity).
ada serve Run the REST API or the conversion worker (api, worker).

The build, files and audit groups talk to a hosted viewer and read their base URL and token from the environment (a .env in the working directory is picked up too; real environment variables win). Every command and subcommand takes --help, and the full reference is in the docs.

Quick Links

Usage

Some examples of using the ada-py package

Create an IFC file

The following code

from ada import Assembly, Part, Beam

a = Assembly("MyAssembly") / (Part("MyPart") / Beam("MyBeam", (0, 0, 0), (1, 0, 0), "IPE300"))
a.to_ifc("C:/temp/myifc.ifc")

creates an Ifc file containing an IfcBeam with the following hierarchy

MyAssembly (IfSite)
    MyPart (IfcBuildingStorey)
        MyBeam (IfcBeam)

Beam Visualized in BlenderBIM

The resulting IfcBeam (and corresponding hierarchy) shown in the figure above is taken from the awesome blender plugin blenderbim.

Convert between FEM formats

Here is an example showing the code for converting a sesam FEM file to abaqus and code aster

Note! Reading FEM load and step information is not supported, but might be added in the future.

import ada

a = ada.from_fem('path_to_your_sesam_file.FEM')
a.to_fem('name_of_my_analysis_file_deck_directory_abaqus', 'abaqus')
a.to_fem('name_of_my_analysis_file_deck_directory_code_aster', 'code_aster')

Current read support is: abaqus, code aster and sesam
Current write support is: abaqus, code aster and sesam, calculix and usfos

Create and execute a FEM analysis in Calculix, Code Aster and Abaqus

This example uses a function beam_ex1 from here that returns an Assembly object with a single Beam with a few holes in it (to demonstrate a small portion of the steel detailing capabilities in ada and IFC) converted to a shell element mesh using a FE mesh recipe create_beam_mesh found here.

from ada.param_models.fem_models import beam_ex1

a = beam_ex1()

a.to_fem("MyCantilever_abaqus", "abaqus", overwrite=True, execute=True, run_ext=True)
a.to_fem("MyCantilever_calculix", "calculix", overwrite=True, execute=True)
a.to_fem("MyCantilever_code_aster", "code_aster", overwrite=True, execute=True)

after the code is executed you can look at the results using supported post-processing software or directly in python using the built-in THREEJS based viewer in a web browser or Jupyter notebook/lab for the FEA results.

Calculix Results Abaqus Results Code Aster (jupyter) results

Note!

The above example assumes you have installed Abaqus, Calculix and Code Aster locally on your computer.

To set correct paths to your installations of FE software you wish to use there are a few ways of doing so.

  1. Add directory path of FE executable/batch to your system path.
  2. Add directory paths to system environment variables. This can be done by using the control panel or running the following from a cmd prompt with administrator rights:
:: Windows
setx ADA_abaqus_exe <absolute path to abaqus.bat>
setx ADA_calculix_exe <absolute path to ccx.exe>
setx ADA_code_aster_exe <absolute path to as_run.bat>

:: Linux?

:: Mac?

Note! It is crucial that any paths containing whitespaces be converted to "shortened paths". To shorten a path on windows, you can use the utility pathcopycopy.

For manual installation files of open source FEA software such as Calculix and Code Aster, here are some relevant links:

Acknowledgements

This project would never have been possible without the existing open source python and c++ libraries. Although listed in the package dependencies (which is a long list), here are some of the packages that are at the very core of adapy;

  • IfcOpenShell
  • OpenCascade
  • PythonOCC-Core
  • Gmsh
  • Trimesh

A huge thanks to all involved in the development of the packages mentioned here and in the list of packages adapy depends on.

If you feel that a certain package listed in the adapy dependencies should be listed here please let me know and I will update the list :)

Project Responsible

Kristoffer H. Andersen

Download files

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

Source Distribution

ada_py-0.58.0.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

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

ada_py-0.58.0-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

Details for the file ada_py-0.58.0.tar.gz.

File metadata

  • Download URL: ada_py-0.58.0.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ada_py-0.58.0.tar.gz
Algorithm Hash digest
SHA256 3d1abbe2adae9720074c9ee6490f3530da7da8a334335f3e09919753d9c89261
MD5 7a08e37932dcf2ce75103a6315559133
BLAKE2b-256 f257874d11c5ba71f3608788b6b1e01992eeb283a48d4ebc9de2df3e1e8cf032

See more details on using hashes here.

File details

Details for the file ada_py-0.58.0-py3-none-any.whl.

File metadata

  • Download URL: ada_py-0.58.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ada_py-0.58.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0537873df8e37d4f30f8d8bd5a5eaf156b12917d6907ac14b797357b3bf7a11
MD5 2852a1655555c3c5f10284b87d68c312
BLAKE2b-256 f6957dc561beb19db93aaf214f423059c59ef39c8504b745e7f1822e6138fc4c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.64.1

2 files

0.64.0

2 files

0.63.0

2 files

0.62.5

2 files

0.62.4

2 files

0.62.3

2 files

0.62.2

2 files

0.62.1

2 files

0.62.0

2 files

0.61.6

2 files

0.61.5

2 files

0.61.4

2 files

0.61.3

2 files

0.61.2

2 files

0.61.1

2 files

0.61.0

2 files

0.60.0

2 files

0.59.0

2 files

This release

0.58.0 This release

2 files

0.57.0

2 files

0.56.0

2 files

0.55.0

2 files

0.54.0

2 files

0.53.0

2 files

0.52.1

2 files

0.52.0

2 files

0.51.2

2 files

0.51.1

2 files

0.51.0

2 files

0.50.0

2 files

0.49.0

2 files

0.48.0

2 files

0.47.2

2 files

0.47.1

2 files

0.47.0

2 files

0.46.2

2 files

0.46.1

2 files

0.46.0

2 files

0.45.8

2 files

0.45.7

2 files

0.45.6

2 files

0.45.5

2 files

0.45.4

2 files

0.45.3

2 files

0.45.2

2 files

0.45.1

2 files

0.45.0

2 files

0.44.1

2 files

0.44.0

2 files

0.43.1

2 files

0.43.0

2 files

0.42.1

2 files

0.42.0

2 files

0.41.0

2 files

0.40.0

2 files

0.39.0

2 files

0.38.0

2 files

0.37.0

2 files

0.36.0

2 files

0.35.1

2 files

0.35.0

2 files

0.34.1

2 files

0.34.0

2 files

0.33.0

2 files

0.32.1

2 files

0.32.0

2 files

0.31.0

2 files

0.30.1

2 files

0.30.0

2 files

0.29.0

2 files

0.28.0

2 files

0.27.0

2 files

0.26.0

2 files

0.25.0

2 files

0.24.0

2 files

0.23.1

2 files

0.23.0

2 files

0.22.0

2 files

0.21.0

2 files

0.20.2

2 files

0.20.1

2 files

0.20.0

2 files

0.19.0

2 files

0.18.4

2 files

0.18.3

2 files

0.18.2

2 files

0.18.1

2 files

0.18.0

2 files

0.17.3

2 files

0.17.2

2 files

0.17.1

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.12

2 files

0.7.11

2 files

0.7.10

2 files

0.7.9

2 files

0.7.8

2 files

0.7.7

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.18

2 files

0.2.17

2 files

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

0.0.44

2 files

0.0.43

2 files

0.0.42

2 files

0.0.41

2 files

0.0.40

2 files

0.0.39

2 files

0.0.38

2 files

0.0.37

2 files

0.0.36

2 files

0.0.35

2 files

0.0.34

2 files

0.0.33

2 files

0.0.32

2 files

0.0.29

2 files

0.0.28

2 files

0.0.26

2 files

0.0.25

2 files

0.0.24

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

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