Exporting to Abaqus

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
myapa2
Regular
Posts: 21
Joined: Mon Apr 16, 2018 5:35 pm

Exporting to Abaqus

Post by myapa2 »

Hello,

I am creating geometries by scripting in python. I need to export the geometry to Abaqus as well. Earlier when I was not using scripting and just using the GUI I was able to export with Volume mesh and it created different sections in abaqus. But now, when I use scripting, it doesn't give any separate sections. What do you think is the problem?? Thanks.
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Exporting to Abaqus

Post by louisepb »

Hi,

I'm not really clear about what the issue is. Could you either post an illustration of the problem or your script?

Thanks,
Louise
myapa2
Regular
Posts: 21
Joined: Mon Apr 16, 2018 5:35 pm

Re: Exporting to Abaqus

Post by myapa2 »

Hi,

So, earlier when I was making the geometries through the GUI and exported with Volume mesh, I was able to see sections in Abaqus. It's as shows in the figure (with GUI).
But when I write a script and try to export the sections are not created. Also shown in figure (with scripting)
Any help would be appreciated. I'm attaching the script as well. Thank you!
Attachments
When I write a script, it doesn't create sections
When I write a script, it doesn't create sections
With Scripting.jpg (183.35 KiB) Viewed 10191 times
When made with GUI, and do a Volume mesh, Sections are created
When made with GUI, and do a Volume mesh, Sections are created
With GUI.PNG (238.78 KiB) Viewed 10191 times
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Exporting to Abaqus

Post by louisepb »

Hi,

You don't seem to have sent the script. If the volume mesh is created from the GUI without selecting any periodic boundary conditions then no sections are created. Could this be the issue? Are you generating boundary conditions in your script?

Best wishes,
Louise
myapa2
Regular
Posts: 21
Joined: Mon Apr 16, 2018 5:35 pm

Re: Exporting to Abaqus

Post by myapa2 »

Hello,

Really sorry that I had not attached the script. And it seems that I'm not allowed to attach files with certain extensions, So I'm just going to post my script here. I wrote the script, and used the GUI to export (with volume mesh) with periodic boundary conditions. So I ticked the boundary condition box, yes. But I have nothing written in the script related to the boundary conditions in the python file. Is that the problem?


Textile = CTextile()

p = 1.235
a = 0.017
c = 0.25
h = 0.014
wl= 4.94
R= 300

#Yarn 1
yarn=CYarn()
yarn.AddNode(CNode(XYZ(-p, p, a)))
yarn.AddNode(CNode(XYZ(-c, p, h)))
yarn.AddNode(CNode(XYZ(c, p, -h)))
yarn.AddNode(CNode(XYZ(p, p, -a)))
yarn.AddNode(CNode(XYZ(2*p-c, p, -h)))
yarn.AddNode(CNode(XYZ(2*p+c, p, h)))
yarn.AddNode(CNode(XYZ(3*p, p, a)))

yarn.AssignInterpolation(CInterpolationBezier())

yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse(2.248, 0.034, 0.6, 0)))

yarn.SetResolution(R)
yarn.AddRepeat(XYZ(wl, 0, 0))

Textile.AddYarn(yarn)


#Yarn2
yarn=CYarn()
yarn.AddNode(CNode(XYZ(-p, 3*p, -a)))
yarn.AddNode(CNode(XYZ(-c, 3*p, -h)))
yarn.AddNode(CNode(XYZ(c, 3*p, h)))
yarn.AddNode(CNode(XYZ(p, 3*p, a)))
yarn.AddNode(CNode(XYZ(2*p-c, 3*p, h)))
yarn.AddNode(CNode(XYZ(2*p+c, 3*p, -h)))
yarn.AddNode(CNode(XYZ(3*p, 3*p, -a)))

yarn.AssignInterpolation(CInterpolationBezier())
yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse(2.248, 0.034, 0.6, 0)))
yarn.SetResolution(R)
yarn.AddRepeat(XYZ(wl, 0, 0))
Textile.AddYarn(yarn)

#Yarn3
yarn=CYarn()
yarn.AddNode(CNode(XYZ(p, -p, -a)))
yarn.AddNode(CNode(XYZ(p, -c, -h)))
yarn.AddNode(CNode(XYZ(p, c, h)))
yarn.AddNode(CNode(XYZ(p, p, a)))
yarn.AddNode(CNode(XYZ(p, 2*p-c, h)))
yarn.AddNode(CNode(XYZ(p, 2*p+c, -h)))
yarn.AddNode(CNode(XYZ(p,3*p, -a)))

yarn.AssignInterpolation(CInterpolationBezier())
yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse(2.248, 0.034, 0.6, 0)))
yarn.SetResolution(R)
yarn.AddRepeat(XYZ( 0, wl, 0))
Textile.AddYarn(yarn)

#Yarn4
yarn=CYarn()
yarn.AddNode(CNode(XYZ(3*p, -p, a)))
yarn.AddNode(CNode(XYZ(3*p, -c, h)))
yarn.AddNode(CNode(XYZ(3*p, c, -h)))
yarn.AddNode(CNode(XYZ(3*p, p, -a)))
yarn.AddNode(CNode(XYZ(3*p, 2*p-c, -h)))
yarn.AddNode(CNode(XYZ(3*p, 2*p+c, h)))
yarn.AddNode(CNode(XYZ(3*p,3*p, a)))

yarn.AssignInterpolation(CInterpolationBezier())
yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse(2.248, 0.034, 0.6, 0)))
yarn.SetResolution(R)
yarn.AddRepeat(XYZ( 0, wl, 0))
Textile.AddYarn(yarn)


Textile.AssignDomain(CDomainPlanes(XYZ(0, 0, -0.034), XYZ(4.94, 4.94, 0.034)))


AddTextile("Singleply", Textile)
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Exporting to Abaqus

Post by louisepb »

Hi,

I've run your script and if you look in the TexGen Output tab in the Log window after you've done the volume mesh export you'll see that it gives an error message saying 'Unable to generate node sets'. If you look in the inp file you'll see that it's created the nodes, elements and element sets but nothing else. I'll have to investigate this and get back to you.

Best wishes,
Louise
myapa2
Regular
Posts: 21
Joined: Mon Apr 16, 2018 5:35 pm

Re: Exporting to Abaqus

Post by myapa2 »

Hi,

Yes, I can see the nodes in the input file.
Waiting for your reply now. Thanks!
Post Reply