PORE OR ACOUSTIC PRESSURE output from Abaqus to Matlab (Record key 18)

In this example a simple Abaqus model is analysed and results are retrieved by postprocessing the results *.fil file generated by Abaqus using Matlab. For more information please see the Documentation of Abaqus2Matlab toolbox.

Contents

Run Abaqus model

Change current directory to Abaqus working directory

a = strfind(S,'\');
cd(S(1:a(end)-1))

Copy the input file to be run by Abaqus into the Abaqus working directory

copyfile([S,'\AbaqusInputFiles\18.inp'],[S(1:a(end)-1),'\18.inp'],'f')

Run the input file 18.inp with Abaqus

!abaqus job=18

Pause Matlab execution to give Abaqus enough time to create the lck file

pause(10)

If the lck file exists then halt Matlab execution

while exist('18.lck','file')==2
  pause(0.1)
end

Postprocess Abaqus results file with Matlab

Assign all lines of the fil file in an one-row string (after Abaqus analysis terminates)

Rec = Fil2str('18.fil');

Obtain the desired output data

out = Rec18(Rec)
out =

                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
                   0
  10.539567947387701
  10.539567947387701
   2.824068546295166
   2.824068546295166
   2.662693262100220
   9.937306404113770
   2.662693262100220
   9.937306404113770
   2.824068546295166
   2.824068546295166
  10.539567947387701
  10.539567947387701
   9.931544303894043
   2.661149263381958
   9.936950683593750
   2.662598133087158
 -11.830126762390140
 -11.830126762390140
  -3.169872999191284
  -3.169872999191284
  -1.901923775672913
  -7.098076343536377
  -1.901923775672913
  -7.098076343536377
  -3.169872999191284
  -3.169872999191284
 -11.830126762390140
 -11.830126762390140
  -7.098076343536377
  -1.901923775672913
  -7.098076343536377
  -1.901923775672913

Verify output

Check number of attributes

nAttr=size(out,2)
nAttr =

     1

Check the number of entries

nEntr=size(out,1)
nEntr =

    60

Check class of output

cOut=class(out)
cOut =

double

____________________________________________________
Copyright (c) 2016 by George Papazafeiropoulos
Captain, Infrastructure Engineer, Hellenic Air Force
Civil Engineer, M.Sc., Ph.D. candidate, NTUA
Email: gpapazafeiropoulos@yahoo.gr
Website: http://users.ntua.gr/gpapazaf/