The Constraint class imposes linear kinematic relations between different degrees of freedom in the model. This object provides member functions that allow
In the figure an example of a rigid diaphragm node k is shown in which two slave degree-of-freedom at node p and q denoted by \(U_\textrm{1}^{\textrm{p}}\) and \(U_\textrm{1}^{\textrm{q}}\) in the direction 1 are represented as a function of \(u_\textrm{1}\), \(u_\textrm{2}\), and \(u_\textrm{3}\) master degree-of-freedom.
REFERENCE:
The python 01-Pre_Process/Method/Attach.py file provides with an interface to populate the Entities
dictionary. A Constraint can be created using the addConstraint() function. This function will transform the provided information into json format to be parse in the Run-Analysis.
addConstraint(tag, name, attributes):
Example
A CONSTRAINT can be defined using the python interface as follows:
SVL.addConstraint(tag=-2, name='Equal', attributes={'stag': 4, 'sdof': 1, 'mtag': 3, 'mdof': 1})
Application
Please refer to the D07-ST_Lin_2DConstrainedBuilding_Elastic_Frame2.py file located at 03-Validations/01-Debugging/ to see an example on how to define equal constraint using the addConstraint function.
Also there are built-in constraints for the case of Rigid Diaphragm, Rigid Body or Rigid Links are available. These constraints can be easily constructed using the following functions implemented at 01-Pre_Process/Method/Attach.py:
addDiaphragm(tag, attributes):
Application
Please refer to the H05-ST_Lin_3DBuildingDiaphragm_ElasticPStress_Frame2_Shell4.py file located at 03-Validations/01-Debugging/ to see an example on how to define equal constraint using the addDiaphragm function.
addRigidLink(tag, attributes):
Application
Please refer to the E05-ST_Lin_2DRigidLink_Elastic_Frame2.py file located at 03-Validations/01-Debugging/ to see an example on how to define equal constraint using the addRigidLink function.
The python 01-Pre_Process/Method/Compute.py file transform a rigid link, diaphragm, and rigid body fields into SVL constraints.
ApplyConstraints():
This function enforces all constraints defines as rigid link, diaphragm, rigid body at the same time.
Example
The diaphragm constraints are enforced using the python interface as follows:
SVL.DiaphragmConstraints()
All special constraints such as rigid link, diaphragm, rigid body can be enforced at the same time as follows:
SVL.ApplyConstraints()
On the contrary, the 01-Pre_Process/Method/Remove.py file provides with an interface to depopulate the Entities
dictionary. For example, to remove an already define Constraint, Rigid Link, Diaphragm, or Rigid Body use:
The C++ 02-Run_Process/01-Node/Constraint.cpp file provides the class implementation. A Constraint is created using the built-in json parse-structure provided in the Driver.hpp. A Constraint is defined inside the "Constraint" json field indicating its "Tag" as follows,
{ "Constraints": { "Tag": { "name" : str, "attributes": { "stag" : int, "mtag" : [ ], "factor" : [ ] } } } }
Variable | Description |
---|---|
Tag | A unique ( \(\leq -2\)) constraint number identifier. |
name | The constraint name: Equal, Diaphragm, RigidLink, RigidBody. |
stag | The associated total degree of freedom identifier (slave) of the constraint. |
mtag | Free-degree-of-freedom identifiers (masters) to be combined. |
factor | Coefficient values for each degree of freedom. |
Tag
number ( \(\leq -2\)) identifier must coincide with the constrained free-degree-of-freedom number. A CONSTRAINT of the form: \(U_{12} = 1.0 \, u_{5}\) is constructed as:
{ "Constraints": { "-3": { "name" : Equal, "attributes": { "stag" : 12, "mtag" : [5], "factor" : [1.0] } } } }A CONSTRAINT of the form: \(U_{24} = 1.0 \, u_{12} + 4.0 \, u_{14}\) is constructed as:
{ "Constraints": { "-5": { "name" : General, "attributes": { "stag" : 24, "mtag" : [12,14], "factor" : [1.0,4.0] } } } }