(Solved?) Scripting in HyperStudy to simplify study setup / Scripting DOEs (including output responses from h3d and T01 files)
Hello,
I am currently using DOEs in HyperStudy to run a number of simulations with a set of varying parameters. I use HyperMesh to create the .hm model and use Radioss as the solver. Due to the length of time one model takes to run, my process to set up a study in HS usually goes: import .hm model; define input variables; modify the runtime to something short (just long enough to create a .h3d file and some TH data); then, once the “run definition” step is complete, define the output responses using those files (.h3d and T01). When the setup has been complete, I’ll modify the runtime to the actual time I’m interested in simulating and then create and run the DOE.
This process is not ideal for setting up and running DOEs of multiple different .hm files because it is quite tedious and the time spent waiting for things to load/open adds up quite quickly. I would like to simplify the process, probably by writing a script(s), though HS does not appear to have the same .tcl script advantages that HM does (please correct me if this observation is incorrect).
I have looked at the command1.tcl file created by past HS DOEs I have run and I think I might be able to make use of the commands present (*feoutputwithdata, *feoutputmergeincludefiles, *setvalue parameters, etc.) with some additional ones (*writeh3dwithoptions, etc.) to create my own script which writes a .tcl file that performs the same things that a HS DOE does (at least, in terms of running the models with different values for parameters). However, HS also has the advantage of calculating and summarizing the output response results across all runs, and allowing for export to .xlsx. I post-process this data outside of HS but would need my script (or a secondary script) to grab the data associated with specific output responses at some point.
Thus, my first question is: is there any way I can streamline creating multiple DOEs in HS (they all need to be separate studies – I am using different geometries in the .hm models - and the "run definition" model will have a different runtime than the actual DOE runs), keeping in mind the runtime in the model needs to be modified between setup and the actual DOE runs.
Then, if this is not possible (or doesn’t immediately seem to have a reasonable solution), does it seem feasible to write my own .tcl script (using commands from command1.tcl created by HyperStudy) to mimic what HS does for DOEs? And, is there a solution to automating the collection of data from .h3d and T01 files for specific output responses (I am thinking along the lines of writing something to load the .h3d and T01 files in HyperView, extract and save the data somewhere, close the files, and repeat). With what I know of .tcl scripts and my basic knowledge of Python, I think it’s probably possible to put something together, but maybe you can see something I have neglected that makes this method not feasible (and thus I should just stick with the original, tedious method).
There’s quite a bit here, so I appreciate your time and any suggestions or help you can provide, even if for just a portion of the problem I am attempting to tackle.
Please do let me know if anything requires any clarification.
Thank you in advance.