# automatedMultiRun.py : Automated analysis runs for multiple .inp files

**URL:** <https://prepomax.discourse.group/t/automatedmultirun-py-automated-analysis-runs-for-multiple-inp-files/2273>\
**Category:** Tips & Tricks\
**Created:** [December 18, 2024, 11:13am UTC](https://prepomax.discourse.group/t/automatedmultirun-py-automated-analysis-runs-for-multiple-inp-files/2273 "2024-12-18T11:13:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhayrettin](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mhayrettin](https://prepomax.discourse.group/u/mhayrettin)\
**Post date:** [December 18, 2024, 11:13am UTC](https://prepomax.discourse.group/t/automatedmultirun-py-automated-analysis-runs-for-multiple-inp-files/2273/1 "2024-12-18T11:13:23Z")

</div>

**Hi,  
If you need to run multiple analysis sequentially you can use this script.**

**[GitHub Link](https://github.com/mhayrettin/PrePoMax_CalculiX_OpenSource/tree/main/automatedMultiRun)**

# `automatedMultiRun.py` : Automated analysis runs for multiple .inp files.

## What this code does?

This script helps you to run multiple analyses sequentially.

## Usage Instructions

1. **Generate `.inp` Files**  
Generate your analysis files by exporting as `.inp` files. 'analysis\_1.inp, analysis\_2.inp, analysis\_3.inp etc.`
2. **Set Working Directory**  
Set the path to `.inp` files in the Python script @line#7 ----\> `working_directory = "C:\\Users\\ABCDEF\\Desktop\\Analysis\\"`
3. **Set CalculiX Executable Path**  
Set the path to `ccxVERSION.exe` executable in the Python script @line#10 ----\> `ccx_executable = "C:\\Users\\ABCDEF\\Desktop\\Calculix\\bin\\ccx\\ccx213.exe"`
4. **Add Files to Run List**  
Add .inp file names to list in the Python script @line#13 ----\> `inp_files = ["analysis_1", "analysis_2", "analysis_3"]"`
5. **Specify Number of Processors You Want to Use**  
Edit variable ‘numberOfCores’ in the Python script @line#18 `numberOfCores = 4`
6. **Run the Script** When you run the script, it will send `.inp` files one by one to `Calculix` folder. You will be able to see elapsed time for each run and also total time for all analysis.
7. **See Result Files** Result files are going to be created in the working directory you set @step#2.

**optional** You can also use `getResultsFromFRD.py` script to work easily with `nodal stress\strain\force\displacement` results. [PrePoMax\_CalculiX\_OpenSource/getResultsFromFRD at main · mhayrettin/PrePoMax\_CalculiX\_OpenSource · GitHub](https://github.com/mhayrettin/PrePoMax_CalculiX_OpenSource/tree/main/getResultsFromFRD)

## If you encounter anything unexpected or have any suggestions, please don’t hesitate to reach out to me.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/prepomax/original/1X/c97ddd9f35474d2460bb0afe28e64e6fc45de4fe.png) [@system](https://prepomax.discourse.group/u/system)\
**Post date:** [December 19, 2024, 2:19pm UTC](https://prepomax.discourse.group/t/automatedmultirun-py-automated-analysis-runs-for-multiple-inp-files/2273/2 "2024-12-19T14:19:59Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/prepomax/original/1X/c97ddd9f35474d2460bb0afe28e64e6fc45de4fe.png) [@system](https://prepomax.discourse.group/u/system)\
**Post date:** [December 19, 2024, 3:00pm UTC](https://prepomax.discourse.group/t/automatedmultirun-py-automated-analysis-runs-for-multiple-inp-files/2273/3 "2024-12-19T15:00:59Z")

</div>


