In an earlier post, we saw how *CASE keywords can help us perform sequential and sequential+dependent simulations. But here I want to talk a little more about the LSCASEDRIVER program itself. LSCASEDRIVER is a simple yet powerful utility that is sometimes built into the LS-DYNA executable, but it can also be used in a standalone mode. Its main job is to read the input supplied to it and look for *CASE keywords and write multiple input files based on the the content in each CASE block. As you know, CASE blocks can be input to form a binary tree and this nested information is parsed and output into individual input files by the LSCASEDRIVER program. The argument to run LSCASEDRIVER is as simple as:
prompt> lscasedrive -k main_input_file arguments_to_tell_the_dyna_commands INPUT
Here “-k” option tells LSCASEDRIVE to output the parsed input files. INPUT is mandatory as this string, which can be positioned anywhere after the main input file is used by LSCASEDRIVE to substitute the individually created files based on the case ID. The command to run LS-DYNA can be arbitrary which gives us flexibility to embed any commands we may use to execute LS-DYNA. The following is an example to run the cases using an mpp version of LS-DYNA:
prompt> lscasedriver -k main_input_file_with_case_definitions.k mpirun -np 2 /path/to/mpp/executable i=INPUT memory1=200000 memory2=000 pfile=customfile
1.0 The case ids used in *CASE_BEGIN_ID must be an integer
2.0 INCLUDE keywords are parsed such that the contents of that file is included in the individual case input files such as “case0.inp”, “case1.inp”, etc. This may sometimes bloat the case files in which cases the user can use *INCLUDE_TRANSFORM which avoids the parsing of the included file.