# Automate simulations by adding a journal file option

**URL:** <https://prepomax.discourse.group/t/automate-simulations-by-adding-a-journal-file-option/2735>\
**Category:** Feature Requests\
**Created:** [May 28, 2025, 2:22pm UTC](https://prepomax.discourse.group/t/automate-simulations-by-adding-a-journal-file-option/2735 "2025-05-28T14:22:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://prepomax.discourse.group/u/frank)\
**Post date:** [May 28, 2025, 2:22pm UTC](https://prepomax.discourse.group/t/automate-simulations-by-adding-a-journal-file-option/2735/1 "2025-05-28T14:22:24Z")

</div>

Hi,  
in an earlier post, the option of using history files was mentioned in order to automate some operations.

> [@Set mesh type default preferences?](https://prepomax.discourse.group/t/set-mesh-type-default-preferences/2687/8):
>
> I agree, I could add a default setting for each family of elements. In the meantime, for certain repetitive actions, history commands can be used to repeat them. History commands are records of all user actions (Edit → Edit History). There is no possibility to change the history commands (they can only be recorded). Then all unnecessary commands can be deleted (select entire row, Delete key). And then the command history can be saved to a file: in the Edit Commands window, select File → Save A…

This is a great idea but it appears that there is a missed opportunity here. The binary history files cannot easily be edited (it may be possible to set this up though) and I would propose to get this into clear text files instead. It would then also be an option to convert this into ‘journal files’ similar to what is done in Ansys Fluent to automate some analysis:

> **[Writing Fluent journal files — Sheffield HPC Documentation](https://docs.hpc.shef.ac.uk/en/latest/referenceinfo/ANSYS/fluent/writing-fluent-journal-files.html#gsc.tab=0)**

This is different to what is proposed here:

> [@automatedMultiRun.py : Automated analysis runs for multiple .inp files](https://prepomax.discourse.group/t/automatedmultirun-py-automated-analysis-runs-for-multiple-inp-files/2273):
>
> 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 Generate .inp Files Generate your analysis files by exporting as .inp files. 'analysis\_1.inp, analysis\_2.inp, analysis\_3.inp etc.` Set Working Directory Set the path to .inp files in the Python script @line#7 ----\> working\_direct…

For example, a journal file would allow import of different .inp files or allow to rerun the same simulations but scaling the geometry etc. and would in general be more flexible (I think).

Just my thoughts…

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [May 29, 2025, 7:53am UTC](https://prepomax.discourse.group/t/automate-simulations-by-adding-a-journal-file-option/2735/2 "2025-05-29T07:53:53Z")

</div>

I agree that binary files limit the possibility of editing them. But converting them to clear text files is not possible. The binary files are, namely, direct copies of the objects in memory. They are not structured with parameters and functions. To add this structuring, all commands will have to be rewritten (a huge amount of work). That is why binary files are used, since they were very easy to integrate.

But I am investigating this approach while adding Python support. In this way, a Python script will be used to automate PrePoMax functions. This will require even more work, but would open up many more options.

Currently, the results of applying a binary file can be varied by using parameters. If you have a model where some features are defined by a parameter, and you have its history recorded, you can rerun the history from the command line with different parameter values.

---

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://prepomax.discourse.group/u/frank)\
**Post date:** [May 29, 2025, 10:08am UTC](https://prepomax.discourse.group/t/automate-simulations-by-adding-a-journal-file-option/2735/3 "2025-05-29T10:08:22Z")

</div>

Fully appreciate this @Matej, but very happy to hear that an Python API may be in the pipeline! I fully appreciate how much work this must cause and didn’t dare to suggest this (yet) 😉

An API like in other commercial FEA solvers would be a great addition. This would allow geometric pre-processors such as TexGen to be used directly:

> **[TexGen](https://texgen.sourceforge.io/index.php/Main_Page)**

There is for example a scripting guide for TexGen here:

> **[TexGenScriptingGuide\_v3.1.pdf](https://github.com/louisepb/TexGenScriptingGuide/blob/master/TexGenScriptingGuide_v3.1.pdf)**

The benefit of such geometry pre-processors is that not only the geometry is generated, they can also create a mesh and assign periodic boundary conditions.

I will watch the space!

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://prepomax.discourse.group/u/jbr)\
**Post date:** [May 29, 2025, 5:29pm UTC](https://prepomax.discourse.group/t/automate-simulations-by-adding-a-journal-file-option/2735/4 "2025-05-29T17:29:55Z")

</div>

> [@Matej](#):
>
> But I am investigating this approach while adding Python support. In this way, a Python script will be used to automate PrePoMax functions. This will require even more work, but would open up many more options.

This would be such a game changer for PrePoMax. How can the community support this work @Matej ?
