Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Abaqus Error: Feature found, expecting tuple

Status
Not open for further replies.

VictorAntona

Industrial
Feb 1, 2014
6
Hi, I'm doing a Python Abaqus model and I need to use a reference point as a region in a BC. So, I have defined my reference point with this code:

refpoint1= proyectilPart.ReferencePoint (point= (0.0,0.0,0.0))
region = regionToolset.Region(referencePoints=refpoint1)

'ProyectilPart' is the part where i put my RF. I've got to create the RF, but I have a mistake in the second line because Abaqus send to me this error advertisement:"TypeError: referencePoints; found Feature, expecting tuple"

I don't know what I have to change, if someone can help me I'll thank him so much.

Thank you, and any help it will be well appreciated.
 
Replies continue below

Recommended for you

Hi,

Please try:
Code:
region = regionToolset.Region(referencePoints=(refpoint1,))

Regards,
Bartosz
 
akabarten, thank you for the answer, but I've tried your code and now I received this message: "referencePoints[0]; found Feature, expecting tuple"

Please, if you or anybody has another idea, please answer me.

Thank you.
 
Hi,

Do you mind to share the script so I can run on my side?

Regards,
Bartosz
 
Sure, I share my code.

Right now, the code can be run and I have added "##" in the lines that I have the problems and a little note explaining it.


from abaqus import *
from abaqusConstants import *
import regionToolset

backwardCompatibility.setValues(includeDeprecated=True, reportDeprecated=False)

session.viewports['Viewport: 1'].setValues(displayedObject=None)

#----------------------------------------------------------------------

#Create model

mdb.models.changeKey(fromName='Model-1', toName='Impact')
shellModel = mdb.models['Impact']

#-----------------------------------------------------------------------
#Create the shell

import sketch
import part

shellProfileSketch = shellModel.ConstrainedSketch(name='Shell CS Profile',sheetSize=5)
shellProfileSketch.rectangle(point1=(0,0), point2=(0.1,0.1))
shellPart=shellModel.Part(name='Placa',dimensionality=THREE_D, type=DEFORMABLE_BODY)
shellPart.BaseSolidExtrude(sketch=shellProfileSketch, depth=0.004)

#Create proyectil

import sketch
import part

proyectilProfileSketch = shellModel.ConstrainedSketch(name='proyectilProfileSketch',sheetSize=5.0)
proyectilProfileSketch.ConstructionLine(point1=(0.0,-100.0), point2=(0.0,100.0))
proyectilProfileSketch.Line(point1=(0,0), point2=(0.0065,0))
proyectilProfileSketch.Line(point1=(0.0065,0), point2=(0.0065,0.025))
proyectilProfileSketch.Line(point1=(0.0065,0.025), point2=(0,0.025))

proyectilPart= shellModel.Part(name='Proyectil', dimensionality=THREE_D, type=ANALYTIC_RIGID_SURFACE)
proyectilPart.AnalyticRigidSurfRevolve(sketch=proyectilProfileSketch)

#Create Reference point

refpoint1= proyectilPart.ReferencePoint (point= (0.0,0.0,0.0))


##HERE IS THE PROBLEMATIC LINE, I DON'T KNOW WHAT I HAVE TO CHANGE
##region = regionToolset.Region(referencePoints=(refpoint1,))


#-----------------------------------------------------------------------

#Create shell material material

import material
import odbMaterial

shellMaterial=shellModel.Material(name='Aluminio')
shellMaterial.Density(table=((7850, ), ))
shellMaterial.Elastic(table=((2e+11,0.33), ))
shellMaterial.InelasticHeatFraction(fraction=0.9)
shellMaterial.InelasticHeatFraction
shellMaterial.Plastic(hardening=JOHNSON_COOK, table=((231.7E+06, 1147.7E+06, 0.546, 0.94, 1800, 293), ), rate=ON)
shellMaterial.plastic.RateDependent(table=((0.046694, 0.002), ), type=JOHNSON_COOK)
shellMaterial.SpecificHeat(table=((452, ), ))

#Create the section

import section

shellSection = shellModel.HomogeneousSolidSection(name='Shell Section', material='Aluminio')
shell_region = (shellPart.cells,)
shellPart.SectionAssignment(region=shell_region, sectionName='Shell Section')

#-------------------------------------------------------------------------

#Create assembly

import assembly

shellAssembly = shellModel.rootAssembly
shellInstance = shellAssembly.Instance(name='Shell Instance', part=shellPart, dependent=ON)

proyectilInstance = shellAssembly.Instance(name='Proyectil Instance', part=proyectilPart, dependent=ON)
shellAssembly. rotate(instanceList=('Proyectil Instance',), axisPoint= (0,0,0), axisDirection= (0.001,0,0), angle=(90))
shellAssembly. translate(instanceList=('Proyectil Instance',), vector=(0.05,0.05,0.0045))

#Identify surfaces for the interactions

shell_top_surface_point = (0.05,0.05,0.004)
shell_top_surface = shellInstance.faces.findAt((shell_top_surface_point, ))

proyectil_botton_surface_point = (0.05,0.05,0.0045)
proyectil_botton_surface = proyectilInstance.faces.findAt((proyectil_botton_surface_point, ))

proyectil_top_surface_point = (0.05,0.05,0.0295)
proyectil_top_surface = proyectilInstance.faces.findAt((proyectil_top_surface_point, ))

proyectil_side_surface_point = (0.0565,0.05,0.01)
proyectil_side_surface = proyectilInstance.faces.findAt((proyectil_side_surface_point, ))
#--------------------------------------------------------------------------

#Create the step

import step

shellModel.ExplicitDynamicsStep(name='Impact', previous='Initial', timePeriod=0.001)

#--------------------------------------------------------------------------

#Create interaction

frictionless_interaction= shellModel.ContactProperty('Frictionless')
frictionless_interaction.TangentialBehavior(formulation=PENALTY, fraction=0.005, table=((0.1, ), ))
frictionless_interaction.NormalBehavior(pressureOverclosure=HARD)

set_seq = proyectil_botton_surface
set_seq += proyectil_top_surface
set_seq += proyectil_side_surface

shellRegion = regionToolset.Region(side1Faces=shell_top_surface)
proyectilRegion= regionToolset.Region(side1Faces=set_seq)

shellModel.SurfaceToSurfaceContactExp(name='Interaction', createStepName='Impact', master=shellRegion, slave=proyectilRegion, sliding=FINITE, interactionProperty='Frictionless', mechanicalConstraint=PENALTY, weightingFactorType=SPECIFIED, weightingFactor=1)

#---------------------------------------------------------------------------

#Create the field output request

shellModel.fieldOutputRequests.changeKey(fromName='F-Output-1', toName='Selected Field Outputs')
shellModel.FieldOutputRequest(name='Selected Field Outputs', createStepName='Impact', numIntervals=60)
shellModel.fieldOutputRequests['Selected Field Outputs'].setValues(variables=('PE', 'PEEQ', 'S', 'STATUS', 'TRIAX', 'U', 'V'))

#--------------------------------------------------------------------------

#Create the history output request

#shellModel.HistoryOutputRequest(name='Default History Outputs', createStepName='Impact', variables=PRESELECT)

#---------------------------------------------------------------------------

#Create the boundary condition

#Create encaster

fixed_end_face_pt_x= 0
fixed_end_face_pt_y= 0.05
fixed_end_face_pt_z= 0.002
fixed_end_face_pt = (fixed_end_face_pt_x, fixed_end_face_pt_y, fixed_end_face_pt_z)
fixed_end_face = shellInstance.faces.findAt((fixed_end_face_pt, ))
fixed_end_face_region=regionToolset.Region(faces=fixed_end_face)
shellModel.EncastreBC(name='Encaster one', createStepName='Impact', region=fixed_end_face_region)

fixed_end_face_pt_x= 0.05
fixed_end_face_pt_y= 0
fixed_end_face_pt_z= 0.002
fixed_end_face_pt = (fixed_end_face_pt_x, fixed_end_face_pt_y, fixed_end_face_pt_z)
fixed_end_face = shellInstance.faces.findAt((fixed_end_face_pt, ))
fixed_end_face_region=regionToolset.Region(faces=fixed_end_face)
shellModel.EncastreBC(name='Encaster two', createStepName='Impact', region=fixed_end_face_region)

fixed_end_face_pt_x= 0.05
fixed_end_face_pt_y= 0.1
fixed_end_face_pt_z= 0.002
fixed_end_face_pt = (fixed_end_face_pt_x, fixed_end_face_pt_y, fixed_end_face_pt_z)
fixed_end_face = shellInstance.faces.findAt((fixed_end_face_pt, ))
fixed_end_face_region=regionToolset.Region(faces=fixed_end_face)
shellModel.EncastreBC(name='Encaster three', createStepName='Impact', region=fixed_end_face_region)

fixed_end_face_pt_x= 0.1
fixed_end_face_pt_y= 0.05
fixed_end_face_pt_z= 0.002
fixed_end_face_pt = (fixed_end_face_pt_x, fixed_end_face_pt_y, fixed_end_face_pt_z)
fixed_end_face = shellInstance.faces.findAt((fixed_end_face_pt, ))
fixed_end_face_region=regionToolset.Region(faces=fixed_end_face)
shellModel.EncastreBC(name='Encaster four', createStepName='Impact', region=fixed_end_face_region)

#Proyectil displacement

fixed_end_face_pt_x= 0.05
fixed_end_face_pt_y= 0.05
fixed_end_face_pt_z= 0.004
fixed_end_face_pt = (fixed_end_face_pt_x, fixed_end_face_pt_y, fixed_end_face_pt_z)
fixed_end_face = shellInstance.faces.findAt((fixed_end_face_pt, ))
fixed_end_face_region=regionToolset.Region(faces=fixed_end_face)



##HERE IT IS THE LINE WHERE I HAVE TO USE THE RP AS A REGION
##shellModel.DisplacementBC(name='Proyectile displacement', createStepName='Impact', region=region, u1=0, u3=0, ur1=0, ur2=0, ur3=0)




#Predefined Field, Temperature

fixed_end_face_pt_x= 0.05
fixed_end_face_pt_y= 0.05
fixed_end_face_pt_z= 0.004
fixed_end_face_pt = (fixed_end_face_pt_x, fixed_end_face_pt_y, fixed_end_face_pt_z)
fixed_end_face = shellInstance.faces.findAt((fixed_end_face_pt, ))
fixed_end_face_region=regionToolset.Region(faces=fixed_end_face)

#shellModel.Temperature(name='Temperature', createStepName='Impact', region=fixed_end_face_region, distributionType=UNIFORM, crossSectionDistribution=CONSTANT_THROUGH_THICKNESS)

#-----------------------------------------------------------------------------------------------------------------------------------------------------------

#Create the mesh

import mesh

shell_inside_xcoord=0
shell_inside_ycoord=0
shell_inside_zcoord=0

elemType1 =mesh.ElemType(elemCode=C3D8R, elemLibrary=STANDARD, kinematicSplit=AVERAGE_STRAIN, secondOrderAccuracy=OFF, hourglassControl=DEFAULT, distortionControl=DEFAULT)
shellCells=shellPart.cells
selectedShellCells=shellCells.findAt((shell_inside_xcoord, shell_inside_ycoord, shell_inside_zcoord),)
shellMeshRegion=(selectedShellCells,)
shellPart.setElementType(regions=shellMeshRegion, elemTypes=(elemType1,))
shellPart.seedPart(size=0.001, deviationFactor=0.01)
shellPart.generateMesh()


#---------------------------------------------------------------------------------------------------------------------------------------------------------------

#Create and run the job

import job

mdb.Job(name='ShellImpactJob', model='Impact', type=ANALYSIS, explicitPrecision=SINGLE, nodalOutputPrecision=SINGLE, description='Job simulates a proyectile impact', parallelizationMethodExplicit=DOMAIN, multiprocessingMode=DEFAULT, numDomains=1, userSubroutine='', numCpus=1, memory=50, memoryUnits=PERCENTAGE, scratch='', echoPrint=OFF, modelPrint=OFF, contactPrint=OFF, historyPrint=OFF)

mdb.jobs['ShellImpactJob'].submit(consistencyChecking=OFF)

mdb.jobs['ShellImpactJob'].waitForCompletion()

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor