Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Import of NASTRAN punch files

919 views
Skip to first unread message

Stephan Lippert

unread,
Aug 30, 2007, 10:47:02 AM8/30/07
to
Hi,

I am searching for an import routine to read NASTRAN punch
files for postprocessing into MATLAB. Think I am not the
only one, so there should be something available. However,
I did not find anything ...

Does anybody know where to get simple and free import
routines? Commercial programs like IMAT would be somehow
overengineered for my tasks.

Thanks a lot,
Stephan

Paul

unread,
Sep 24, 2007, 10:50:32 AM9/24/07
to
"Stephan Lippert" <s.li...@tu-harburg.de> wrote in message
<fb6l96$rtm$1...@fred.mathworks.com>...

Stephan,

There is a Matlab toolbox called IMAT that does that among
other things. In addition there is an ongoing sharing of
Matlab/Nastran interface tools on a Yahoo discussion list
called nastrandmap. The link is:

http://tech.groups.yahoo.com/group/nastrandmap/

Good luck!

-Paul Blelloch

Message has been deleted

camilo dousdebes

unread,
Jun 16, 2011, 4:21:02 AM6/16/11
to
"Stephan Lippert" wrote in message <fb6l96$rtm$1...@fred.mathworks.com>...

hi i have been working in read the PUNCH file of nastran with matlab. after a few hours of work i arrive to read the file in 4 hours. but, is not sufficient (too much time to read a file), so i tried another code based in ' textscan' function. the main problem with this file is the size, is to big enougth to crash the matrix size, so i made sub matrix structure. each time that you work with this, it is necesary to to work with matrix not more big than 4000x4000. finally i arrived to read the PCH file in 60 seconds by the next code:
---------------------------------------------------------------------------------------
clear all

fid=fopen('your_file.pch','r');
block_size = 100;

a=1;
while ~feof(fid)
tline = textscan(fid,'%s',block_size,'delimiter','\n');
e = 1;
while e<=length(tline{1,1})
l = length(tline{1,1}{e,1});
for k = 1:(ceil(l/8))
b = k*8;
if (l)>=b
PCH{a,1}{e,k} = tline{1,1}{e,1}((b-7):b);
else
PCH{a,1}{e,k} = tline{1,1}{e,1}((b-7):(l));
end
end
e = e+1;
end
a = a+1;
end
fclose(fid);
----------------------------------------------------------------------------------------------
i hope this will help you.

Camilo

Bilen Oytun Peksel

unread,
Sep 22, 2011, 1:12:10 AM9/22/11
to
http://www.mathworks.com/matlabcentral/fileexchange/32954
"Stephan Lippert" wrote in message <fb6l96$rtm$1...@fred.mathworks.com>...
0 new messages