from__future__importabsolute_importfrom__future__importdivisionfrom__future__importprint_functionfromcompas_fea2.baseimportFEADatadocs="""Parameters----------name : str, optional Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file.Attributes----------name : str Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file.x : bool If True, tralations along global x are fixed.y : bool If True, tralations along global y are fixed.z : bool If True, tralations along global z are fixed.xx : bool If True, tralations around global xx are fixed.yy : bool If True, tralations around global yy are fixed.zz : bool If True, tralations around global zz are fixed."""
[docs]class_BoundaryCondition(FEAData):"""Base class for all zero-valued boundary conditions. Note ---- BoundaryConditions are registered to a :class:`compas_fea2.model.Model`. """__doc__+=docsdef__init__(self,axes='global',name=None,**kwargs):super(_BoundaryCondition,self).__init__(name=name,**kwargs)self._axes=axesself.x=Falseself.y=Falseself.z=Falseself.xx=Falseself.yy=Falseself.zz=False@propertydefaxes(self):returnself._axes@axes.setterdefaxes(self,value):self._axes=value@propertydefcomponents(self):return{c:getattr(self,c)forcin['x','y','z','xx','yy','zz']}
[docs]classClampBCXX(PinnedBC):"""A pinned nodal displacement boundary condition clamped in XX. """__doc__+=docsdef__init__(self,name=None,**kwargs):super(ClampBCXX,self).__init__(name=name,**kwargs)self.xx=True
[docs]classClampBCYY(PinnedBC):"""A pinned nodal displacement boundary condition clamped in YY. """__doc__+=docsdef__init__(self,name=None,**kwargs):super(ClampBCYY,self).__init__(name=name,**kwargs)self.yy=True
[docs]classClampBCZZ(PinnedBC):"""A pinned nodal displacement boundary condition clamped in ZZ. """__doc__+=docsdef__init__(self,name=None,**kwargs):super(ClampBCZZ,self).__init__(name=name,**kwargs)self.zz=True
[docs]classRollerBCX(PinnedBC):"""A pinned nodal displacement boundary condition released in X. """__doc__+=docsdef__init__(self,name=None,**kwargs):super(RollerBCX,self).__init__(name=name,**kwargs)self.x=False
[docs]classRollerBCY(PinnedBC):"""A pinned nodal displacement boundary condition released in Y. """__doc__+=docsdef__init__(self,name=None,**kwargs):super(RollerBCY,self).__init__(name=name,**kwargs)self.y=False
[docs]classRollerBCZ(PinnedBC):"""A pinned nodal displacement boundary condition released in Z. """__doc__+=docsdef__init__(self,name=None,**kwargs):super(RollerBCZ,self).__init__(name=name,**kwargs)self.z=False
[docs]classRollerBCXY(PinnedBC):"""A pinned nodal displacement boundary condition released in X and Y. """__doc__+=docsdef__init__(self,name=None,**kwargs):super(RollerBCXY,self).__init__(name=name,**kwargs)self.x=Falseself.y=False
[docs]classRollerBCYZ(PinnedBC):"""A pinned nodal displacement boundary condition released in Y and Z. """__doc__+=docsdef__init__(self,name=None,**kwargs):super(RollerBCYZ,self).__init__(name=name,**kwargs)self.y=Falseself.z=False
[docs]classRollerBCXZ(PinnedBC):"""A pinned nodal displacement boundary condition released in X and Z. """__doc__+=docsdef__init__(self,name=None,**kwargs):super(RollerBCXZ,self).__init__(name=name,**kwargs)self.x=Falseself.z=False