To generate the ADM file of Adams Car using cmd batch processing, you need to use the command-line interface(CLI) tool provided by Adams Car. The CLI tool for Adams Car can be found in the Adams Car installation directory, usually in the following path:
C:\MSC.Software\Adams\2017\Car\bin\win64\adams_cmd.exe
To generate an ADM file using the CLI tool, you need to write a batch file that contains the CLI commands for Adams Car. Here is a simple example batch file:
@echo off
set ACAMGR=C:\MSC.Software\Adams\2017\Car\bin\win64\acacmgr.exe
set ADAMS_CMD=C:\MSC.Software\Adams\2017\Car\bin\win64\adams_cmd.exe
set WORK_DIR=C:\Path\to\your\working\directory
set MODEL_NAME=your_model_name
REM 生成ADM文件
"%ACAMGR%" -cmd "acadmgen -s %WORK_DIR%\%MODEL_NAME%.acf -x %WORK_DIR%\%MODEL_NAME%.xml -o %WORK_DIR%\%MODEL_NAME%.adm"
REM 运行仿真
"%ADAMS_CMD%" %WORK_DIR%\%MODEL_NAME%.adm -job run -mpi -np 4
In this batch file, some environment variables are set first, and then the ADM file is generated using the acadmgen command. The -s option specifies the path to the input ACF file, the -x option specifies the path to the input XML file, and the -o option specifies the path to the output ADM file. After the ADM file is generated, you can run the emulation using the adams_cmd command.
Whether ACF and XML files can be pre-generated and stored depends on your requirements. If you need to use the same model and simulation parameters in multiple simulations, pre-generating these files and saving them may be a good choice. However, if you need to use different models and simulation parameters in each simulation, you will need to regenerate these files in each simulation.