about the stiffness matrix
Moderators: silvia, selimgunay, Moderators
-
- Posts: 93
- Joined: Thu Feb 12, 2009 8:31 pm
- Location: The University of Tokyo
about the stiffness matrix
Hello, I am trying to make a new 2D element which containes 2 nodes and has 4 degrees of freedom (2 translational DOFs and 1 rotational DOF for the first node and 1 rotational DOF for the second). Therefore the stiffness matrix of the element is 4 by 4. But how can I tell global stiffness integrator that the first 3*3 matrix within the 4*4 stiffness matrix are for the first node and the rest of it is for the second node?
Thank you very much in advance!
Thank you very much in advance!
Re: about the stiffness matrix
you shouldn't need too (though i could be wrong). just make sure the 2 nodes have 3 and 1 dof respectively.
if the nodes have both 3 dof, your ele matrix must be 6x6, with 0's in cols and rows for the translational dof of node 2.
if the nodes have both 3 dof, your ele matrix must be 6x6, with 0's in cols and rows for the translational dof of node 2.
-
- Posts: 93
- Joined: Thu Feb 12, 2009 8:31 pm
- Location: The University of Tokyo
Re: about the stiffness matrix
Thank you for your reply Frank! I was doing the same as what you said. I made the output matrix be 6x6 and constrained the translational DOFs of node 2 in OpenSees input TCL script (using "fix 2 1 1 0" command). It worked fined but I actually need to build a much more complex model with many external nodes but with only translational or rotional DOFs relevant. So I actually need to constrain a large number of DOFs in TCL script manually, which is annoying and easy to make mistake.
I found that some elements such as 2D zerolength element outputs 2x2 stiffness matrix instead of outputing 6x6 matrix, but I can't figure out how it tells the system which 2DOFs it means. If I can do the same thing, my work can really be much easier and more reliable.
Thank you Frank!
I found that some elements such as 2D zerolength element outputs 2x2 stiffness matrix instead of outputing 6x6 matrix, but I can't figure out how it tells the system which 2DOFs it means. If I can do the same thing, my work can really be much easier and more reliable.
Thank you Frank!
Re: about the stiffness matrix
the ele simply asks the nodes how many dofs and then follows the convention: if 2d the first 2 are translational. if 3d the first 3 are translational and rest ignored (0 values)
-
- Posts: 93
- Joined: Thu Feb 12, 2009 8:31 pm
- Location: The University of Tokyo
Re: about the stiffness matrix
Thank you for your reply Frank! But the only two DOFs for the 2D zerolength element are both rotational DOFs, I think there's actually a way to tell the system which DOF it means. There are some other elements such as Joint2D element which does not follow the "x y Rz" or "x y z Rx Ry Rz" DOF rule either.
Re: about the stiffness matrix
you need to look at the setDomain and setTran1d code, everything is done based on the numDOF at the nodes and the dirn the user passes in for
the particular material. remeber the user defines the material & dirn in which it acts.
this is the setDomain code in the zeroLength
if (dimension == 1 && dofNd1 == 1) {
numDOF = 2;
theMatrix = &ZeroLengthM2;
theVector = &ZeroLengthV2;
elemType = D1N2;
}
else if (dimension == 2 && dofNd1 == 2) {
numDOF = 4;
theMatrix = &ZeroLengthM4;
theVector = &ZeroLengthV4;
elemType = D2N4;
}
else if (dimension == 2 && dofNd1 == 3) {
numDOF = 6;
theMatrix = &ZeroLengthM6;
theVector = &ZeroLengthV6;
elemType = D2N6;
}
...
..
// create the basic deformation-displacement transformation matrix for the element
// for 1d materials (uniaxial materials)
if ( numMaterials1d > 0 )
this->setTran1d( elemType, numMaterials1d );
}
and then the setTran1d routine:
case D1N2:
if (dirType == TRANS)
tran(i,1) = transformation(indx,0);
break;
case D2N4:
if (dirType == TRANS) {
tran(i,2) = transformation(indx,0);
tran(i,3) = transformation(indx,1);
}
break;
case D2N6:
if (dirType == TRANS) {
tran(i,3) = transformation(indx,0);
tran(i,4) = transformation(indx,1);
tran(i,5) = 0.0;
} else if (dirType == ROTATE) {
tran(i,3) = 0.0;
tran(i,4) = 0.0;
tran(i,5) = transformation(indx,2);
..
}
the particular material. remeber the user defines the material & dirn in which it acts.
this is the setDomain code in the zeroLength
if (dimension == 1 && dofNd1 == 1) {
numDOF = 2;
theMatrix = &ZeroLengthM2;
theVector = &ZeroLengthV2;
elemType = D1N2;
}
else if (dimension == 2 && dofNd1 == 2) {
numDOF = 4;
theMatrix = &ZeroLengthM4;
theVector = &ZeroLengthV4;
elemType = D2N4;
}
else if (dimension == 2 && dofNd1 == 3) {
numDOF = 6;
theMatrix = &ZeroLengthM6;
theVector = &ZeroLengthV6;
elemType = D2N6;
}
...
..
// create the basic deformation-displacement transformation matrix for the element
// for 1d materials (uniaxial materials)
if ( numMaterials1d > 0 )
this->setTran1d( elemType, numMaterials1d );
}
and then the setTran1d routine:
case D1N2:
if (dirType == TRANS)
tran(i,1) = transformation(indx,0);
break;
case D2N4:
if (dirType == TRANS) {
tran(i,2) = transformation(indx,0);
tran(i,3) = transformation(indx,1);
}
break;
case D2N6:
if (dirType == TRANS) {
tran(i,3) = transformation(indx,0);
tran(i,4) = transformation(indx,1);
tran(i,5) = 0.0;
} else if (dirType == ROTATE) {
tran(i,3) = 0.0;
tran(i,4) = 0.0;
tran(i,5) = transformation(indx,2);
..
}