Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Abaqus script issue

Status
Not open for further replies.

schopenhauer

Marine/Ocean
Mar 17, 2018
12
0
0
GB
Hello everybody,

I have been doing so many simulations for pipes lately that I decided to create a very simple plugin for Abaqus to create 1/4 section models. I didn't have any experience or knowledge building scripts for Abaqus but with the manual, the *.rpy file and a bit of imagination I got what I wanted. But, something is failing that I'm not able to solve. When I want to submit the job, the following error message appears:

The region selected for the following loads contains invalid geometry or mesh components for the load type. Pressure.

I suspect that this is related with the definition of the load in the script:
#Pressure
inner_face_center = (Ri/2,(Ri**2-(Ri/2)**2)**.5, pipe_length/2)
inner_face = myInstance.faces.findAt((inner_face_center,) )
pressureRegion = (inner_face,)
myModel.Pressure(name='Pressure', createStepName='Load_step', region=pressureRegion, magnitude=Pi)

But it is weird because I used the same technique to apply the boundary conditions without any problems:
#z symmetry
left_side_center = ((Ri+Ro)/2,1,0)
right_side_center = ((Ri+Ro)/2,1,pipe_length)
left_face = myInstance.faces.findAt((left_side_center,) )
right_face = myInstance.faces.findAt((right_side_center,) )
Zsym_region = (left_face, right_face)
myModel.ZsymmBC(name='BC-1', createStepName='Initial', region=Zsym_region, localCsys=None)
#x symmetry
xxx_side_center = (0,(Ri+Ro)/2, pipe_length/2)
xxx_face = myInstance.faces.findAt((xxx_side_center,) )
Xsym_region = (xxx_face,)
myModel.XsymmBC(name='BC-2', createStepName='Initial', region=Xsym_region, localCsys=None)
#y symmetry
yyy_side_center = ((Ri+Ro)/2, 0, pipe_length/2)
yyy_face = myInstance.faces.findAt((yyy_side_center,) )
Ysym_region = (yyy_face,)
myModel.YsymmBC(name='BC-3', createStepName='Initial', region=Ysym_region, localCsys=None)

Finally, by editing the step and selecting the same surface, the analysis is able to run. Any ideas what is happening with the code?

Many thanks!
 
Replies continue below

Recommended for you

Correct. A surface is not the same as a face. A surface contains an information about a direction, which is needed for contact or a pressure load.
A face used in a boundary conditions is finally nothing else than it's nodes. There is no direction needed.

Apply a pressure load in the GUI and look in the .rpy what the commands are.
 
FEA way, Mustaine3, thank you very much for your quick answers.

Indeed, the problem was the surface definition, a different method had to be used. If you use the *.rpy command starightaway, you will get the following command:

side1Faces1 = s1.getSequenceFromMask(mask=('[#4 ]', ), )

Which is not very useful, you first need to pass the line

session.journalOptions.setValues(replayGeometry=COORDINATE, recoverGeometry=COORDINATE)

into Abaqus, to get the more useful

side1Faces1 = s1.findAt(((39.914602, 2.612383, 66.666667), )).

All together, the pressure definition is done by

#Pressure
s1 = myAssembly.instances[part_name].faces
inner_face = s1.findAt(((Ri/2,(Ri**2-(Ri/2)**2)**.5, pipe_length/2), ))
pressureRegion = regionToolset.Region(side1Faces=inner_face)
myModel.Pressure(name='Pressure', createStepName='Load_step', region=pressureRegion, magnitude=Pi)

I hope this helps others with similar problems. And again, I'm very grateful for all the help received.

Cheers!



 
You can change the way A/CAE reports the selected geometry. Enter this in the A/CAE CLI to switch the method.

session.journalOptions.replayGeometry
session.journalOptions.setValues(replayGeometry=INDEX)
 
Status
Not open for further replies.
Back
Top