Python API 22.1
Instructions
- Download the following files and save them if your working directory:
- beam.py
- beamOPT.py
- dynaCon.py
- dynaRun.py
- getResults.py
- mainOPT.py
- optModel.py
- results.py
- .env (Make sure the downloaded file has a dot at the start. If necessary, edit the file name to add it)
- In that folder create a subfolder called "initialM"
- In "initialM" create another subfolder called "450"
- In "450" put the following file: beam.key
- Download and install Ansys LS-DYNA R13.1 SMP Double precision from the Oasys website
- If you don't have it already, install the following Python modules:
- Oasys.PRIMER: pip install Oasys.PRIMER
- Oasys.THIS: pip install Oasys.THIS
- python-dotenv: pip install python-dotenv
- Edit the file .env with the following 3 environment variables:
- DYNARUNEXE = "path to the Ansys LS-DYNA executable you have installed in the step above"
- PRIMERCON = "path to your PRIMER executable"
- THISCON = "path to your T/HIS executable"
- Run the script mainOPT.py