Abaqus 利用FindAt函数根据坐标查找面
(2016-05-14 13:58:01)
标签:
abaqusfindatpython |
分类: Abaqus技术及二次开发 |
findAt initially uses the ACIS tolerance of 1E-6. As a result,
findAt returns any face that is at the arbitrary point specified or
at a distance of less than 1E-6 from the arbitrary point. If
nothing is found, findAt uses the tolerance for imprecise geometry
(applicable only for imprecise geometric entities). The arbitrary
point must not be shared by a second face. If two faces intersect
or coincide at the arbitrary point, findAt chooses the first face
that it encounters, and you should not rely on the return value
being consistent.
Required argument
coordinates
findAt returns either a Face object or a sequence of Face
objects based on the type of input.
If coordinates is a sequence of Floats, findAt returns the
Face object at that point.
If you omit the coordinates keyword argument, findAt accepts
as arguments a sequence of pairs of sequences describing each
face's coordinate and normal, and findAt returns a sequence of Face
objects at the given locations. If you omit the coordinates keyword
argument, you must also omit the normal argument.
faces = f.findAt(((-16.438578, -41.835673, -24.19804),
),
示例:
a = mdb.models['Model-1'].rootAssembly
s1 = a.instances['Part-1-1'].faces
side1Faces1 = s1.getSequenceFromMask(mask=('[#20 ]', ),
)
region = a.Surface(side1Faces=side1Faces1,
name='Surf-1')
mdb.models['Model-1'].Pressure(name='Load-1',
createStepName='Step-1',
######选择一个面加载
a = mdb.models['Model-1'].rootAssembly
s1 = a.instances['Part-1-1'].faces
side1Faces1 = s1.findAt(((0.0,0.0,200.0),))
region = a.Surface(side1Faces=side1Faces1,
name='Surf-1')
mdb.models['Model-1'].Pressure(name='Load-1',
createStepName='Step-1',
######选择两个个面加载
a = mdb.models['Model-1'].rootAssembly
s1 = a.instances['Part-1-1'].faces
side1Faces1 =
s1.findAt(((0.0,0.0,200.0),),((0.0,5.0,100.0),))
region = a.Surface(side1Faces=side1Faces1,
name='Surf-1')
mdb.models['Model-1'].Pressure(name='Load-1',
createStepName='Step-1',
######选择一个面施加约束
a = mdb.models['Model-1'].rootAssembly
f1 = a.instances['Part-1-1'].faces
faces1 = f1.findAt(((0.0,0.0,0.0),))
region = a.Set(faces=faces1, name='Set-1')
mdb.models['Model-1'].DisplacementBC(name='BC-1',
createStepName='Step-1',
mdb.models['Model-1'].boundaryConditions['BC-1'].move('Step-1',
'Initial')
######选择两个面施加约束
a = mdb.models['Model-1'].rootAssembly
f1 = a.instances['Part-1-1'].faces
faces1 =
f1.findAt(((0.0,0.0,200.0),),((0.0,5.0,100.0),))
region = a.Set(faces=faces1, name='Set-1')
mdb.models['Model-1'].DisplacementBC(name='BC-1',
createStepName='Step-1',
mdb.models['Model-1'].boundaryConditions['BC-1'].move('Step-1',
'Initial')