MATLAB Answers

0

Calling .inp file into MATLAB

Asked by anant mehrotra on 12 Nov 2019 at 15:20
Latest activity Commented on by anant mehrotra on 14 Nov 2019 at 18:36
Hello, I am trying to pass as an input the .inp file created in Abaqus and using the same to modify some geometrical data of my created model and obtain results thereafter. So far, I have tried using 'Import Data' and select the .inp file and changing the headers from number to text. Then simply using it as a function. But it tells me there is some problem with the delimiter when I try to call the function in my main script.
I believe once I have the entire .inp file in my workspace as table where I can go speicifically and make changes, the problem is solved. But so far I am unable to call my .inp file properly into the main script. Apart from thie " Generate function " and using the input file, is there any other way to approach ?
Thankin you in anticipation.

  0 Comments

Sign in to comment.

1 Answer

Answer by per isakson
on 14 Nov 2019 at 18:29

" .inp file created in Abaqus" is that a text file like the sample below? If so, Matlab itself together with its toolboxes don't provide a function to read and parse this type of files.
Google found Abaqus2Matlab, but it doesn't have the function you look for - as far as I can find.
I search the FEX for: Abaqus, but didn't find a function that reads inp-files.
"the entire .inp file in my workspace as table" that seems impossible to me. What would that table look like?
*HEADING
SEAN MOLLOY
FINITE ELEMENT ANALYSIS OF PRESSURIZED LEANING ARCH SHELLS
TWO ARCHES WITH 4800 ELEMENTS EACH
15 DEGREE TILT ANGLE
SPAN = 25 m, HEIGHT = 17 m, RADIUS = 0.4 m
**
*PREPRINT,MODEL=NO,HISTORY=NO,ECHO=NO
**
**node definition
**
*NODE, NSET=NARCH1
1, -12.875431, 0.035724, 0.133323
2, -12.862639, 0.134507, 0.101985
3, -12.825133, 0.224123, 0.063697
4, -12.765470, 0.298466, 0.021069
...
*NODE, NSET=NARCH2
4825, -12.875431, 9.564124, 0.133323
4826, -12.862639, 9.465341, 0.101985
4827, -12.825133, 9.375725, 0.063697
...
...
**
** element definition
**
*ELEMENT, ELSET=ELARCH1, TYPE=S4R
1,1,25,26,2
2,2,26,27,3
3,3,27,28,4
...
*ELEMENT,TYPE=S3R,ELSET=ELBASE2B
10225,10202,10203,10201
10226,10203,10204,10201
10227,10204,10205,10201
...
**
** node set and element set definitions
**
*NSET,NSET=LEFTEND1,GENERATE
1,24
*NSET,NSET=RGHTEND1,GENERATE
4801,4824
*NSET,NSET=LEFTEND2,GENERATE
4825,4848
*NSET,NSET=RGHTEND2,GENERATE
9625,9648
*ELSET,ELSET=BASES
LEFTEND1,RGHTEND1,LEFTEND2,RGHTEND2
*ELSET,ELSET=ELALL
ELARCH1,ELARCH2
*NSET,NSET=NALL
NARCH1,NARCH2,ENDS
*NSET,NSET=APEX
2424
7248
et cetera

  1 Comment

anant mehrotra on 14 Nov 2019 at 18:36
Yes, more or less the same. The generic input file .inp created by Abaqus. The file is a text file, yes you are correct. It does look kind of similar to it. I mainly need that it reads geometrical parameters properly.
As far as reading nodes and elements go, it depends on my mesh and finer the mesh, the connected set elements and everything becomes large. More so, the coordinates would always be the same, node1 - x and y for a 2D model.
I think I might have to write a code to read what specifically I require and only work on it and then later change it manually, my .imp file and send it back to Abaqus for postprocessing.
Thank you for you suggestion

Sign in to comment.