byuflowlab / GXBeam.jl

Pure Julia Implementation of Geometrically Exact Beam Theory
MIT License
87 stars 18 forks source link

Clear definition of stiffness matrix #28

Closed RibeiroAndre closed 1 year ago

RibeiroAndre commented 3 years ago

Sorry if this is dumb, but can you please tell me the definition of the stiffness matrix the code requires? I tried using this one: https://link.springer.com/content/pdf/bbm%3A978-3-319-56493-7%2F1.pdf (A3), but it seems incorrect. Thanks a lot!

taylormcd commented 3 years ago

While I work on better documentation for this, refer to the GEBT code manual (which is not the same as this code, but is based on the same theory and uses the same stiffness matrix). Here's a link: https://www.google.com/url?sa=t&source=web&rct=j&url=http://analyswift.com/wp-content/uploads/2012/11/GEBTManual.pdf&ved=2ahUKEwivssSI9cfxAhWYtJ4KHZAeB1QQFjAAegQIBBAC&usg=AOvVaw2EE_9JdVj6B5E7hU87-Uz7 I'll provide more details when I'm in front of my computer.

RibeiroAndre commented 3 years ago

Well, that manual also doesn't really specify the coefficients =]. Based on your examples, it should be this: compliance = Diagonal([1/(EA), 1/(GAy), 1/(GAz), 1/(GJ), 1/(EIyy), 1/(EIzz)]) But the turbine blade example has a full matrix (i.e., not a diagonal one), so I'm not sure what's happening there.

Also, do I understand correctly that the stiffness/compliance matrices are in global csys? I did some tests and that seems to be the case. So if I have a beam in the Z direction, I need to flip the elements in the matrix. The manual you mentioned says something about a cosine function. So I need to apply a rotation matrix to the quadrants of the stiffness/compliance matrices? Can you maybe share an example? Thanks a lot!

taylormcd commented 3 years ago

I'm back at my computer now so I can give a better answer. The stiffness matrix here is the cross sectional stiffness matrix and describes the relationship between resultant stresses and strains. For simple cross-sections made of isotropic materials (which covers most of the examples in this package, but few real problems) the matrix is diagonal (no coupling terms) and may be calculated by hand. For general cross sections it must be calculated using a cross section analysis tool such as VABS, BECAS, NuMAD/BPE, or PreComp.

The stiffness/compliance matrices are specified in the local frame, not the global frame, but the definition of the local frame defaults to the global frame if the transformation matrix from the local to the global frame is not specified. For a beam with local x-axis [x1,x2,x3], y-axis [y1,y2,y3], and z-axis [z1,z2,z3] this transformation matrix is

[
x1 y1 z1
x2 y2 z2
x3 y3 z3
]
RibeiroAndre commented 3 years ago

Thanks a lot. I think I get it and I found the transformation part in the examples, so I should be able to work from that. Have a nice week!

taylormcd commented 3 years ago

I'm going to keep this open for now until I update the documentation.

RibeiroAndre commented 3 years ago

Sorry to bother you again, but would you mind helping me out with the mass matrix as well? I got some inertia info for a beam and I'm having trouble converting it to the GXBeam format. I was given Ixx, Iyy, Izz, Ixy, Ixz, Iyz, where X is chordwise, Y spanwise, Z up. All of them are in kg m2. Your examples show the mass matrix as: Diagonal([ρA, ρA, ρA, ρJ, ρIyy, ρIzz]) From a dimensional analysis standpoint, the 6 elements are split in two groups, so my coefficients would be in the top-left or bottom-right quadrant (I'd say bottom-right). I tried this (among many other things):

0 0 0 0   0   0
0 0 0 0   0   0
0 0 0 0   0   0
0 0 0 Iyy Iyz Ixy
0 0 0 Iyz Izz Ixz
0 0 0 Ixy Ixz Ixx

And I get reasonable bending frequencies for the eigenvalues, but the torsion is way off. Can you give me some advice?

Side note, I actually was given the masses on nodes, not elements, and with a small offset from the center. Is there an easy way to achieve this, or would I need to create small stiff elements about the size of the offset plus super small elements with the lumped masses? Thanks a lot!

taylormcd commented 3 years ago

The mass matrix defines the relationship between linear and angular momentum and velocity. It's elements are derived by Hodges in "Nonlinear Composite Beam Theory". The elements of the mass matrix are defined on the Getting Started page of the documentation. You'll need to convert your lumped mass inertia properties to inertial properties for each beam section. To model the offset, I would just choose an appropriate center of mass.

As a side note, while the code allows rows of zeros in the mass matrix, these actually get replaced with corresponding rows of the identity matrix. Upon reflection though, I should probably throw an error in those cases.

RibeiroAndre commented 3 years ago

Thanks a lot. I somehow forgot about that part of the docs... My results weren't terrible because my actual [1,1], [2,2], [3,3] values were around 0.5, so the default 1 wasn't too far off. On the other hand, I need to multiply [4,4] by ~100 to get my torsional mode frequency in the right ballpark. Not sure what's happening there. If the bending frequencies are good, then [5,5] and [6,6] are likely ok, so [4,4] should also be decent if I set it to [5,5]+[6,6]. I'll keep digging, but I wanted to mention it here in case you had some ideas. Thanks again!