Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read an txt.file from ABAQUS

Status
Not open for further replies.

paulis

Chemical
May 31, 2008
18
0
0
DE
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
 
Replies continue below

Recommended for you

Hi pauli,

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
 
Dear nschlange,

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 B-)
 
Dear Paulis,

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
 
Hi Paulis,

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 :)
 
Dear RM 447 , what I did is to read the inp.file from abaqus in matlab. i give an example to read the inp file

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

 
Status
Not open for further replies.
Back
Top