Calling .inp file into MATLAB

54 次查看(过去 30 天)
anant mehrotra
anant mehrotra 2019-11-12
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.

回答(1 个)

per isakson
per isakson 2019-11-14
" .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 个评论
anant mehrotra
anant mehrotra 2019-11-14
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

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by