Hello,
I have a textile which I need to export as a volume mesh to abaqus. I have the python script for the textile. I just need to rotate it by 45 degrees and export as a volume mesh. When I rotate it fails to generate the mesh. Can you please help me with this?
# Create a textile
Textile = CTextile()
wl= 6.6
width=3
x=(6.6-2*width)/4
#x=0.15
d=5.5e-6
N=2000
n=0.4
p =6.6/4 #A quarter of the weave length
a = 0.01425 #amplitude
c = 0.25 #Middle nodes
h = 0.014
ys=2*x+(wl-4*x)/2
hf=0
R= 80
#Yarn 1
yarn=CYarn()
yarn.AddNode(CNode(XYZ(-p+hf, p+hf, a)))
yarn.AddNode(CNode(XYZ(p+hf, p+hf, -a)))
yarn.AddNode(CNode(XYZ(3*p+hf, p+hf, a)))
yarn.AssignInterpolation(CInterpolationBezier())
yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse((wl-4*x)/2 , 2*a, n, 0)))
yarn.SetResolution(R)
yarn.AddRepeat(XYZ(wl, 0, 0))
yarn.AddRepeat(XYZ(0, wl, 0))
Textile.AddYarn(yarn)
#Yarn2
yarn=CYarn()
yarn.AddNode(CNode(XYZ(-p+hf, 3*p+hf, -a)))
yarn.AddNode(CNode(XYZ(p+hf, 3*p+hf, a)))
yarn.AddNode(CNode(XYZ(3*p+hf, 3*p+hf, -a)))
yarn.AssignInterpolation(CInterpolationBezier())
yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse((wl-4*x)/2 , 2*a, n, 0)))
yarn.SetResolution(R)
yarn.AddRepeat(XYZ(wl, 0, 0))
yarn.AddRepeat(XYZ(0, wl, 0))
Textile.AddYarn(yarn)
#Yarn3
yarn=CYarn()
yarn.AddNode(CNode(XYZ(p+hf, -p+hf, -a)))
yarn.AddNode(CNode(XYZ(p+hf, p+hf, a)))
yarn.AddNode(CNode(XYZ(p+hf,3*p+hf, -a)))
yarn.AssignInterpolation(CInterpolationBezier())
yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse((wl-4*x)/2 , 2*a, n, 0)))
yarn.SetResolution(R)
yarn.AddRepeat(XYZ( 0, wl, 0))
yarn.AddRepeat(XYZ(wl, 0, 0))
Textile.AddYarn(yarn)
#Yarn4
yarn=CYarn()
yarn.AddNode(CNode(XYZ(3*p+hf, -p+hf, a)))
yarn.AddNode(CNode(XYZ(3*p+hf, p+hf, -a)))
yarn.AddNode(CNode(XYZ(3*p+hf,3*p+hf, a)))
yarn.AssignInterpolation(CInterpolationBezier())
yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse((wl-4*x)/2 , 2*a, n, 0)))
yarn.SetResolution(R)
yarn.AddRepeat(XYZ( 0, wl, 0))
yarn.AddRepeat(XYZ(wl, 0, 0))
Textile.AddYarn(yarn)
Textile.AssignDomain(CDomainPlanes(XYZ(0, 0, -2*a), XYZ(9.3338, 9.3338, 2*a)))
AddTextile("Singleply", Textile)
Not creating a mesh
Moderators: Martin, Developers
Re: Not creating a mesh
Hi,
Are you trying to create a periodic mesh? I rotated the textile by 45 degrees using the Rotate Textile option (45 degrees about the z axis) and then generated a volume mesh with no problem. If I select the periodic option then it crashes (whether or not it's rotated). This is probably because the domain that you have selected doesn't represent a repeating unit cell (nevertheless it shouldn't crash and I will investigate that).
Not sure if I've answered your question?
Best wishes,
Louise
Are you trying to create a periodic mesh? I rotated the textile by 45 degrees using the Rotate Textile option (45 degrees about the z axis) and then generated a volume mesh with no problem. If I select the periodic option then it crashes (whether or not it's rotated). This is probably because the domain that you have selected doesn't represent a repeating unit cell (nevertheless it shouldn't crash and I will investigate that).
Not sure if I've answered your question?
Best wishes,
Louise
Re: Not creating a mesh
Hey,
No I'm not trying to produce a periodic mesh. I just need a mesh produced so I can export to Abaqus. I tried a several times but all it produces is like a 1 KB input file with no mesh details. Can you please tell me how you were able to produce the mesh?
Milinda
No I'm not trying to produce a periodic mesh. I just need a mesh produced so I can export to Abaqus. I tried a several times but all it produces is like a 1 KB input file with no mesh details. Can you please tell me how you were able to produce the mesh?
Milinda
Re: Not creating a mesh
Hi Milinda,
Sorry for the delay in replying - I was on holiday last week.
I ran your script, used the rotate option to rotate by 45 degrees about the z-axis and checked the Rotate domain option. I then used the File->Export->Volume Mesh option with the default settings which produced the .inp file etc. The mesh created and loaded in Abaqus is shown here: If it doesn't manage to create the mesh then it's possible that you're running into memory issues - what computer are you running TexGen on?
Best wishes,
Louise
Sorry for the delay in replying - I was on holiday last week.
I ran your script, used the rotate option to rotate by 45 degrees about the z-axis and checked the Rotate domain option. I then used the File->Export->Volume Mesh option with the default settings which produced the .inp file etc. The mesh created and loaded in Abaqus is shown here: If it doesn't manage to create the mesh then it's possible that you're running into memory issues - what computer are you running TexGen on?
Best wishes,
Louise
Re: Not creating a mesh
Hi,
Thank you for getting back. I was able to export the other models that I made and the computer is a Dell XPS tower (32 GB RAM).
The thing is, I do not want the domain to be rotated. When I checked the rotate domain option it gave a mesh but when I try it otherwise it fails to produce a mesh. I would really appreciate it if you can take another look at this.
Thank you,
Milinda
Thank you for getting back. I was able to export the other models that I made and the computer is a Dell XPS tower (32 GB RAM).
The thing is, I do not want the domain to be rotated. When I checked the rotate domain option it gave a mesh but when I try it otherwise it fails to produce a mesh. I would really appreciate it if you can take another look at this.
Thank you,
Milinda
Re: Not creating a mesh
Hi Milinda,
I will have to investigate why this isn't working. I tried generating a mesh for a rotated weave (without rotating the domain) using the default settings in the 2D wizard and that worked fine so I think it must be something specific to your model. I'm about to go away to a conference so will take a look at it when I get back.
Best wishes,
Louise
I will have to investigate why this isn't working. I tried generating a mesh for a rotated weave (without rotating the domain) using the default settings in the 2D wizard and that worked fine so I think it must be something specific to your model. I'm about to go away to a conference so will take a look at it when I get back.
Best wishes,
Louise
Re: Not creating a mesh
Hi Louise,
I had some other rotated models that I was able to generate the mesh too. But this one is not working. I will wait for your reply. Thanks a lot for the help.
Regards,
Milinda
I had some other rotated models that I was able to generate the mesh too. But this one is not working. I will wait for your reply. Thanks a lot for the help.
Regards,
Milinda
Re: Not creating a mesh
Hi Louise,
I just want to give some more input so you can see where it goes wrong. What I want to do is have a repetitive unit cell for the composite rotated by 45 degrees and when I calculate the necessary lengths and input in TexGen, it crashes. But when I change the lengths by a little bit and try, it produces the mesh for the rotated composite. But I'm trying to go with the Unit Cell Approach and it doesn't produce a mesh.
Hope the conference went well.
Waiting for your input on the issue.
Thank you,
Regards,
Milinda
I just want to give some more input so you can see where it goes wrong. What I want to do is have a repetitive unit cell for the composite rotated by 45 degrees and when I calculate the necessary lengths and input in TexGen, it crashes. But when I change the lengths by a little bit and try, it produces the mesh for the rotated composite. But I'm trying to go with the Unit Cell Approach and it doesn't produce a mesh.
Hope the conference went well.
Waiting for your input on the issue.
Thank you,
Regards,
Milinda
Re: Not creating a mesh
Hi Milinda,
I haven't had a chance to debug this yet but have just taken another look. On my system it is possible to create the volume mesh for this textile without periodic boundary conditions and import it into Abaqus. It crashes if I try to create PBCs, however I would not expect this to be successful anyway (but still shouldn't crash!) as, once the textile is rotated it is no longer periodic. I think that if you don't want to use the rotated domain then you will need to work out what boundary conditions you want to use. There are no longer matching node sets on opposite faces of the domain so you may have to work out how the pattern now repeats and work out some sort of staggered boundary conditions.
I'll investigate the crash when I have the chance but I think you probably just need to generate the mesh without the boundary conditions and work out how you need to use it.
Hope that helps,
Louise
I haven't had a chance to debug this yet but have just taken another look. On my system it is possible to create the volume mesh for this textile without periodic boundary conditions and import it into Abaqus. It crashes if I try to create PBCs, however I would not expect this to be successful anyway (but still shouldn't crash!) as, once the textile is rotated it is no longer periodic. I think that if you don't want to use the rotated domain then you will need to work out what boundary conditions you want to use. There are no longer matching node sets on opposite faces of the domain so you may have to work out how the pattern now repeats and work out some sort of staggered boundary conditions.
I'll investigate the crash when I have the chance but I think you probably just need to generate the mesh without the boundary conditions and work out how you need to use it.
Hope that helps,
Louise
Re: Not creating a mesh
Thanks a lot!!! I have tried other geometries and they worked in producing a mesh. I wasn't sure what was going on though. Thanks again.