This article describes how a simulation using Power on Demand (PoD) licensing can be configured to run for a specified amount of time, preventing an unexpected use of PoD hours. Reaching the end of credit on a user-created PoD key will not automatically kill the job, instead this will consume the credit on the main PoD key.
To prevent this, a stopping criteria based on the total solver elapsed time report can be implemented. Using this whilst running in batch mode will ensure that the license server is disconnected when the run is finished, preventing any unexpected use of PoD hours. To do this you should follow the steps below:
- Create a total solver elapsed time report.
- Create a monitor from the above report.
- Create a stopping criteria from the monitor, which stops the iterations when a maximum time limit has been reached. Specify the maximum limit to be the time you wish to use the PoD license for. In Steady Simulations keep the Stop Inner Iterations selected, for Unsteady simulations deselect the Stop Inner Iterations.
When the stopping criteria is reached running in batch mode, the simulation will stop, save and disconnect from the license server. To ensure this is the case, you will have to enable
Autosave Batch Runs in File > Autosave. You should note that the total solver elapsed time report will only compute the time the solver is running for. This will not include the time for processes such as mesh generation, loading, saving or partitioning which all use up PoD credit. Due to this, a conservative value should be used for the maximum time limit.
To submit a job in batch, an example MS-DOS command is shown below:
"C:\Program Files\CD-adapco\11.06.010\STAR-CCM+11.06.010\star\bin\starccm+.exe" "-batch" "-np" "2"
"C:\Users\test\Documents\1.sim"Where
"C:\Users\test\Documents\1.sim" is the file path of the simulation file to be used.
The above workflow is intended for simulations in which it is known that they will run until the defined stopping criteria is reached. For simulations where other stopping criteria may be reached prior to the one defined in this article, or for instances where PoD is used for pre or post processing, it is not so suitable. In these instances it is recommended to consider the server idle time out option as described in
Will STAR-CCM+ Licenses time out if idle?See also:
How to avoid unexpected usage of PoD hoursClient-Server Setup > Client-Server Connections > Configuring the Server to Shutdown When Idle