Read an txt.file from ABAQUS
Read an txt.file from ABAQUS
(OP)
Dear all.
I would like to know how can I take the information out of ABQUS in a txt. file ( temperature node vs time) and then use it in matlab as this.The solution from ABAQUS is like this
temperature(ºC)
node 123 node 456 node 778
x(time)
0 0 0 0
1 0 0 0
2 1 0 0
3 1 1 0
4 1 1 1
When I open in matlab ,I make some mathematical operations and then I extract the minimal value from the temperature and its position and node , the answer is always the same first position , because Matlab asumes that the minimal value is in the first node since the first node is 123 .
Well , I appreciated if you could help me with this!!!!!
Thanks in advanced
kind regars,
paulis
I would like to know how can I take the information out of ABQUS in a txt. file ( temperature node vs time) and then use it in matlab as this.The solution from ABAQUS is like this
temperature(ºC)
node 123 node 456 node 778
x(time)
0 0 0 0
1 0 0 0
2 1 0 0
3 1 1 0
4 1 1 1
When I open in matlab ,I make some mathematical operations and then I extract the minimal value from the temperature and its position and node , the answer is always the same first position , because Matlab asumes that the minimal value is in the first node since the first node is 123 .
Well , I appreciated if you could help me with this!!!!!
Thanks in advanced
kind regars,
paulis
RE: Read an txt.file from ABAQUS
I don't understand the problem.
Is it reading the file or sorting the data?
To read in the file try something like this:
--
clear all; clc;
file='abaqus.txt';
fid=fopen(file);
data=textscan(fid,'%f %f %f %f','HeaderLines',3,'Delimiter',' ','MultipleDelimsAsOne',1);
fclose(fid);
data % cell
[data{:}] % matrix
--
all the best
nschlange
RE: Read an txt.file from ABAQUS
Thank you so much! I am working with this kind of file , because I want to discover the slowest heating point from a piece of food with some outside thermal load. I can extract an txt .file from abaqus like temperature node vs time. So I have to know which is the slowest heating point= which is the slowest heating node and its temperature.
kind regards,
Paulis
RE: Read an txt.file from ABAQUS
I'm still missing the point.
Is my work done or do you need further advice?
If so, what is the slowest heating node in this example?
all the best
nschlange
RE: Read an txt.file from ABAQUS
Can you tell me how you extract a text file from ABAQUS? The need just came up and I was trying to use Fortran to read the results but if they can be written to a text file which can be read by Matlab then that will make life so much easier!! Please let me know!
Thanks :)
RE: Read an txt.file from ABAQUS
fdat=fopen('gsinvrt.inp','r');
fout=fopen('cut3.inp','w');
%aca
nod=96373;
tline = fgetl(fdat);
pos=strfind(tline,'*Node');
while length(pos)==0
tline = fgetl(fdat);
pos=strfind(tline,'*Node');
end
nodos=fscanf(fdat,'%d, %f, %f, %f',[4 nod]);
k=nodos(1,:);x=nodos(2,:);y=nodos(3,:);z=nodos(4,:);
clear nodos;
well , good luck!!!!!!
kisses
Paula