REACTIVE FLUID VOLUME FLUX output from Abaqus to Matlab (Record key 109)
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\109.inp'],[S(1:a(end)-1),'\109.inp'],'f')
Run the input file 109.inp with Abaqus
!abaqus job=109
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('109.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('109.fil');
Obtain the desired output data
out = Rec109(Rec)
out = 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0.122500000000000 2.000000000000000 -0.122500000000000 3.000000000000000 -0.122500000000000 4.000000000000000 0.122500000000000 5.000000000000000 0.122500000000000 6.000000000000000 -0.122500000000000 7.000000000000000 -0.122500000000000 8.000000000000000 0.122500000000000 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0 1.000000000000000 0 2.000000000000000 0 3.000000000000000 0 4.000000000000000 0 5.000000000000000 0 6.000000000000000 0 7.000000000000000 0 8.000000000000000 0
Verify output
Check number of attributes
nAttr=size(out,2)
nAttr = 2
Check the number of entries
nEntr=size(out,1)
nEntr = 168
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/