MATLAB: Running Abaqus from Matlab

abaqusdos

Hi All, I have a MATLAB script that generates an .inp file that is sent to the Abaqus solver through the command window by using the line of code below:
dos(abaqus job=job.inp) %or
!abaqus job=job
The high level script is a while-loop and because it involves several iterations, Abaqus inputs files with different names are generated at pre-specified intervals (e.g. job1.inp, job2.inp, job3.inp, etc all created in the working folder). The challenge I am having is how to send these input files with different names to the command window. I have observed that the ‘dos’ statement above can only take ONE input value after the ‘=’ . Please your advice on how to solve this problem will be appreciated. Thanks in advance.

Best Answer

The following works under Linux. The command system should work to replace either dos or unix.
n = 3;
for k = 1:n
jobname{k} = ['job', num2str(k)];
end
for k = 1:n
cmd_str = ['abaqus job=', jobname{k}, ' input=', jobname{k}, '.inp interactive'];
disp(cmd_str);
system(cmd_str);
end
outputs:
abaqus job=job1 input=job1.inp interactive
abaqus job=job2 input=job2.inp interactive
abaqus job=job3 input=job3.inp interactive
Does this work for you?