Hello I'm following the example. But I always get the following error: >> Script_Job1_A2M
Simulation Started
Simulation Finished
Obtaining desired output data by Abaqus2Matlab
Error using exploreFieldOdb (line 109)
The file Job1_A2M.odb does not exist
Error in Script_Job1_A2M (line 59)
out=exploreFieldOdb(odb_name);
I am using win 7 32 bit. Matlab R2013b native 32 bit. Abaqus 6.11-1. You help me fix it with. Thank you
Hello,
You have to run Abaqus2Matlab on a 64 bit Windows PC, in order for it to work correctly.
Also, it seems that you have sent some images that for some reason I cannot see. You can send me your codes and other stuff at gpapazafeiropoulos@yahoo.gr if you want, in order for me to help you, if possible.
Best,
George
Hello
thank you for reply. but I don't do true. please help me.
Press the Write in put button to see error message in Command window
Please wait, Abaqus2Matlab is being installed on this PC...
Abaqus2Matlab has been installed
Warning: No options related to results file (*.fil)
> In Abaqus2Matlab_GUI_v01>read_input at 1889
In Abaqus2Matlab_GUI_v01>Load_input_button_Callback at 121
In gui_mainfcn at 96
In Abaqus2Matlab_GUI_v01 at 42
In @(hObject,eventdata)Abaqus2Matlab_GUI_v01('Load_input_button_Callback',hObject,eventdata,guidata(hObject))
Error using win_open_mex
There is no application associated with the given file name extension.
Error in winopen (line 59)
win_open_mex(pathstr, filename);
Error in Abaqus2Matlab_GUI_v01>Button_write_input_Callback (line 253)
winopen([current_folder '\A2M_GUI_Output\' filename_new '_A2M.inp']);
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in Abaqus2Matlab_GUI_v01 (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
@(hObject,eventdata)Abaqus2Matlab_GUI_v01('Button_write_input_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
When the generate post-processing script button is pressed, an error occurs in the command window. The graph does not appear as an example.
>> Script_Job1_A2M
Simulation Started
Simulation Finished
Obtaining desired output data by Abaqus2Matlab
Error using exploreFieldOdb (line 109)
The file Job1_A2M.odb does not exist
Error in Script_Job1_A2M (line 59)
out=exploreFieldOdb(odb_name);
Also in the working directory of abaqus as follows:
📷
📷
Here are some lines of code added to scripts to draw graphs like video tutorials
COORDmtx=cell2mat(COORD);
SINVmtx=cell2mat(SINV);
MISES=SINVmtx(:,1);
(xq,yq)=meshgrid(0:0.1:60,0:0.1:60);
vq=griddata(COORDmtx(:,1),COORDmtx(:,2),MISES,xq,yq,'cubic');
surf(xq,yq,vq,'EdgeColor','none');
hold on
colorbar
S=reshape(odbOut_s(length(odbOut_S)/2+1:end),14,{})';
MISESobd=S(:,11);
📷
% If using this code for research or industrial purposes please cite:
% G. Papazafeiropoulos, M. Muniz-Calvente, E. Martinez-Paneda
% Abaqus2Matlab: a suitable tool for finite element post-processing.
% Advances in Engineering Software. Vol. 105, pp 9-16 (2017)
% DOI:10.1016/j.advengsoft.2017.01.006
% % G. Papazafeiropoulos, M. Muniz Calvente, E. Martinez-Paneda
% % % Abaqus2Matlab@gmail.com
% www.abaqus2matlab.com
%close all
clear
% Change the current directory
S = mfilename('fullpath');
f = filesep;
ind=strfind(S,f);
S1=S(1:ind(end)-1);
cd(S1) ;
%% 1st STEP - Run one FEM model
Inp_file= 'Job1_A2M';
disp('Simulation Started')
% Run the input file with Abaqus
% Initialize sw (boolean switch) as true
system(['abaqus job=' Inp_file]);
sw=true;
tic;
while sw
% Pause Matlab execution in order for the lck file to be created
pause(0.5);
% While the lck file exists, pause Matlab execution. If it is
% deleted, exit the while loop and proceed.
while exist([Inp_file '.lck'],'file')==2
pause(0.1)
% the lck file has been created and Matlab halts in this loop.
% Set sw to false to break the outer while loop and continue
% the code execution.
sw=false;
end
% In case that the lck file cannot be detected, then terminate
% infinite execution of the outer while loop after a certain
% execution time limit (5 sec)
if sw && (toc>5)
sw=false;
end
end
% NOTE: Alternatively, you can replace lines 27 to 49 by system(['abaqus job=' Inp_file ' interactive'])
disp('Simulation Finished')
%% 2st STEP - Postprocess Abaqus results file with Abaqu2Matlab
% Obtain the desired output data
disp('Obtaining desired output data by Abaqus2Matlab')
% NOTE: Some output variables are Matlab Cells, If you are not confortable working with Cells, you can use cell2mat()
% Explore the field output contained in AbaqusInputFile.odb
odb_name='Job1_A2M.odb';
out=exploreFieldOdb(odb_name);
% You have selected "output,field" but any specific variable related to nodes has been selected.
% It is an example of how to read from Odb the node outputs (Coordinates).
odb_name='Job1_A2M.odb';
stepName='Step-1';
nsetName= 'False' ;
instanceName= 'False' ;
indOut='False'; %(no dat file)
indOut='True'; %(create dat file)
outputVar='COORD';%Coordinates
[odbOut_COORD,odbDat_COORD,rpyOut_COORD]=readNodeFieldOdb(odb_name,stepName,instanceName,nsetName,outputVar,indOut);
% Read the field output contained in AbaqusInputFile.odb
odb_name='Job1_A2M.odb';
stepName='Step-1';
elsetName= 'False' ;
instanceName= 'False' ;
indOut='False'; %(no dat file)
indOut='True'; %(create dat file)
outputVar='S';
[odbOut_S,odbDat_S,rpyOut_S]=readElementFieldOdb(odb_name,stepName,instanceName,elsetName,outputVar,indOut);
% Explore the history output contained in AbaqusInputFile.odb
odb_name='Job1_A2M.odb';
out=exploreHistoryOdb(odb_name);
COORD=readFil([ Inp_file '.fil' ],8);%Obtain the Coordinates(COORD);
SINV=readFil([ Inp_file '.fil' ],12);%Obtain the Stress Invariant(SINV);
COORDmtx=cell2mat(COORD);
SINVmtx=cell2mat(SINV);
MISES=SINVmtx(:,1);
(xq,yq)=meshgrid(0:0.1:60,0:0.1:60);
vq=griddata(COORDmtx(:,1),COORDmtx(:,2),MISES,xq,yq,'cubic');
surf(xq,yq,vq,'EdgeColor','none');
hold on
colorbar
S=reshape(odbOut_s(length(odbOut_S)/2+1:end),14,{})';
MISESobd=S(:,11);
>
Hello,
Have you checked if the odb file exists in your working directory?
Is the Abaqus analysis run successfully before Abaqus2Matlab tries to read the odb file?
Best,
George