Page 1 of 1

Batch processing of multiple calculations

Posted: Fri Mar 24, 2023 12:02 am -1100
by PScharfA
Hello WUFI Team and community,

as far as I see it is not possible to calculate multiple projects at the same time with WUFI 2D.

Nevertheless it would be helpful if it would be possible to prepare multiple projects and input files and send them to a batch calculation process to be calculated automatically one after another.

Is that possible somehow? Maybe with a batch file to run calculations without opening WUFI (in combination with Christians batch file where it is possible to start WUFI with a custom amount of CPU cores since it is significantly reducing calculation time overall)

Thank you all for your ideas and greetings

Re: Batch processing of multiple calculations

Posted: Fri Mar 24, 2023 1:42 am -1100
by Christian Bludau
Hello,

you can not start more than one instance of the WUFI GUI, but it is possible to start multiple command consoles and run batch processes in parallel.

As mentioned here
viewtopic.php?f=15&t=2005
the affiliation to single cores has not yet handled.

Christian

Re: Batch processing of multiple calculations

Posted: Fri Mar 24, 2023 3:25 am -1100
by PScharfA
Hello Christian,

thank you for your reply!

That works! It is possible to prepare multiple calculations within the GUI and then copy your wufi2d_batch_calc_number_cores.bat in each of the folders and run them with the needed number of cores. They can run simultaneously and the wufi2dresult.wfd can be found in each of the folders. This is great stuff. Thank you

Re: Batch processing of multiple calculations

Posted: Sat Mar 25, 2023 11:37 pm -1100
by PScharfA
Hello Christian, with your batchfile it is possible to run multiple calculations at once by preparing multiple project folders and starting the batch files in each of the folders one after another.
It writes a "wufi2dresult.wfd" and saves it automatically in the project folder in which the batch file was executed.
To compare multiple results in one Graph it would require to manually rename the .wfd files before. Is it possible to re-write the code in a way that the .wfd file will be named after the project-folder automatically? That would be really helpful for future analysis! Thank you and many greetings

Re: Batch processing of multiple calculations

Posted: Wed Apr 05, 2023 3:26 am -1100
by Christian Bludau
Hi,
the name for the result file is defined in the header of the input.dat:

Code: Select all

WFD - TRANSIENT HEAT & FLUID TRANSPORT
wufi2dresult <------------------------------------------------------------rename here
F F F F F F T T T
61320 1500 2 2 2 2 1 10 3 5 F
3600.000 5.0E-005 1E5
The name should be set by WUFI 2D according to the project name. It seems to be a bug, that the name is not set any longer according to the project name. But if you calculate using the GUI, the wfd-file is renamed for saving. I will see if I can rename it to the name of the folder after calculation is finished.

Christian

Re: Batch processing of multiple calculations

Posted: Wed Apr 05, 2023 5:11 am -1100
by Christian Bludau
I added a new batch to the zip in the original topic which asks for renaming:
viewtopic.php?f=15&t=2005

Christian