26
ME751 Advanced Computational Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison

ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

  • Upload
    others

  • View
    12

  • Download
    1

Embed Size (px)

Citation preview

Page 1: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

ME751 Advanced Computational

Multibody Dynamics

November 7, 2016

Antonio RecueroUniversity of Wisconsin-Madison

Page 2: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Quote of the Day

“A vote is like a rifle: its usefulness depends upon the character of the user.”

― Theodore Roosevelt

2

Page 3: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Before we get started…

On Friday, we learned: Review of isoparametric elements –what it means Introduce the Absolute Nodal Coordinate Formulation Define constraints with ANCF finite elements and rigid bodies

This lecture… Define constraints with ANCF finite elements and rigid bodies ANCF cable element kinematics ANCF cable element strains ANCF cable element inertia forces Introduce Chrono’s bilinear ANCF shell element

3

Page 4: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Constraints to Rigid Bodies

4

Example. Crankshaft mechanism with ANCF beam Beam has the following coordinates

Position vector (3D) ry cross section plane rz cross section plane ry perpendicular to rz in the undeformed configuration

Beam cross section

, where is local direction of the finite elementi ii

rr

Page 5: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Constraints to Rigid Bodies

5

Beam cross sectionRevolute

Position

Local vector in flexible body is parallel to local vector in rigid body: Their global direction define the mechanical joint’s axis of revolution

Where are local vectors of body 1 perpendicular to joint axis

1 1 1 1 1 1 1 1( , , , , ) Pb b y z b b C R θ r r r R A θ u r 0

T1 1 1 1 1 1

T1 1 1 1 1 1

C( , ) 0

C( , ) 0

b y b y

b y b y

θ r A θ f r

θ r A θ g r1 1, g f

Page 6: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Constraints to Rigid Bodies

6

Beam cross section

Problem Obtain same equations for prismatic joint Obtain Jacobian of both revolute and prismatic constraints assuming only

bodies in the system are those 3 of the crankshaft (be reminded body 2 is the flexible body)

Page 7: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Constraints to Rigid Bodies

7

Constraint relationships and their derivatives can be obtained also for flexible body/flexible body constraints

Key to defining these joints is Identify what flexible body coordinates represent. E.g. Do they define

a fiber orientation? Do they contain a vector perpendicular to the beam cross section?

Constraints to ANCF bodies also define boundary conditions. These constraints are not straightforward to come up with because of the relations between them and the strains, which often define the boundary conditions.

Page 8: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

ANCF Cable: Virtual Work of Elastic Forces

8

• Have one position vector gradient pointing along the beam centerline

• Account for axial and bending strains

• Nodal coordinates

• Shape functions:

Position field of an ANCF beam element T T

1 3 3 2 3 3 3 3 3 4 3 3 1 2s s s s r I I I I q q S q

Beam longitudinal position vector gradient

x x r S q

T T,( )

T

j j j xt q r r

2 31

2 32

2 33

2 34

1 3 +2

2

3 2

s

s l

s

s l

, 0,...,1x l

Page 9: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

ANCF Cable: Virtual Work of Elastic Forces

9

de x xL

W EA EI x

The virtual of the elastic forces for the gradient-deficient beam element may be defined as

where T

31 1 and =2

x xxx x x

x

r r

r rr

are the axial Green-Lagrange strain and bending curvature

• Calculation of strain variations for virtual work

• For bending curvature:

• Quiz: How many bending curvatures does a 3D beam have?

T T1 1 2

xx x x x

rr r e r ee e

33

2

, ,

1

x xxx xx x

x

f f gg

f gg fg

r rr r r

r

e ee e e

T

T

T

3 1T T T2 23

x xx x xx x xx

x xx x xx

x xx x xx

xx x x x x

f

g

r r r r r re er r r r

e e r r r r

rr r r r re e e

Page 10: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

ANCF Cable: Equations of Motion

10

The generalized internal force may be written as…

, ,12 1 12 1 12 1

1T T2

2

1 d 3 d

x

i i ie e b e a

xx x x

L L

f gEI g f x EA xg

e e

Q Q Q

rr r re e e

12 12

1 1 d , 2 2

where d constant

T T

V

T

V

T V

A x

r r e Me

M S S

Mass matrix easily obtained from kinetic energy

Gravity forces

dg gV

Tg

W V m

m

F r g S e g S e

Q S g

Equations of motion after assembling finite elements

e g Me Q Q

Page 11: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

ANCF Fully Parameterized Beam

11

• Fully parameterized beam: The most straightforward beam element• 2 nodes; one position vector and three position vector gradients: x, y, and z• An elastic line approach has been used to alleviate Poisson locking (we’ll see

more in next classes)• It allows for 3D definition of elastic forces

• Severe locking; i.e. bad convergence properties• Correct results not achieved even with fine discretization or• Need many elements to obtain correct results

Interpolation:

• Linear in y and z (cross section plane)• Poisson locking: Poisson effect

• Cubic in longitudinal direction• Shear locking

• FE locking: Excessive (unwanted) stiffness in some FE deformation modes

Page 12: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Shear deformable ANCF beam

12

• Developed in Nachbagauer et al, 2013, “Structural and Continuum Mechanics Approaches for a 3D Shear Deformable ANCF Beam Finite Element: Application to Static and Linearized Dynamic Examples”, JCND, Vol. 8, 021004-1

• Avoid locking issues• Can use structural (Reissner) and continuum-based approaches• Describe two bending strains, two shears, torsion, and stretch

Page 13: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Shear deformable ANCF beam

13

1 2 1 3 1

4 5 4 6 4

7 8 7 9 7

1 , , First node2

1 , , Second node2

1 1 , , Third node

s s s s s

s s s s s

s s s s s

1

1

1 2 9

3

......

y

z

s s s

rr

r I I I

r

• Quadratic shape functions in longitudinal direction

• Linear interpolation over the cross section

• Reference of SF taken at the center of the element –node 3.

Page 14: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Shear deformable ANCF beam: Structural Mechanics

14

2

2 3 2 3

2

1 diag( , , ) diag( , , ) d2

L

SM T T

L

U EA GAk GAk GJ EI EI

Γ Γ κ κ

Using SM approach, the elastic energy of the element is

Stretch and shear Bending and torsion

1) Create a coord. syst. at cross section

2) Stretch and shear defined as

3) Bending and torsion

31 21 1 3 3 2 2

1 3 2

, ; , ; , ; y z z z y z ee ee e r r e e r e e r r r

e e e

1 1 2 2 3 31, , , T T Tx x x x x

re r e r e r r

3 2

0 3 1

2 1

0' 0 , axial( )

0

T

k A A κ k

cs 1 2 3[ ]A e e e

Not a coordinate vector for this element!

Page 15: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Shear deformable ANCF beam: Structural Mechanics

15

• Previous strain measures must be objective (they are!)

• Inertia matrix calculation is straightforward

• Generalized internal force must account for cross section area frame: Not as easy as CB approach

• This element has been validated for:• Small deformation (analytical solution)• Large deformation: Torsional moment (180 deg. twist)• Eigenfrequencies: Analytical solution of Timoshenko beam

• It has more coordinates. Additional cross section elastic energy must be introduced (not accounted for previously)

Page 16: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Shear deformable ANCF beam: Continuum-Based

16Accounts for distorted initial configurations

Page 17: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Shear deformable ANCF beam: Continuum-Based

17

Become shear modulus G

Page 18: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Shear deformable ANCF beam: Continuum-Based

18

Page 19: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Chrono implementation of ANCF cable element

19

In general, the equations of motion of an assembled FE system…

In Chrono, these forces are obtained on a per-element basis. That is, each system’s finite element is interrogated for internal forces, inertia forces, gravity, Jacobian of internal forces, and possibly other forces (e.g. pressure)

e g a Me Q Q Q

Co-rotational formulation Bar element, Euler beam, Hexa8, Hexa20, Tetra4, Tetra10

ANCF Cable element, Beam element, Shell elements (isotropic,

orthotropic, composite) Other

EAS brick element (isotropic and hyperelastic Mooney-Rivlin), Brick9 (plasticity)

Page 20: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

Chrono implementation of ANCF cable element

20

ANCF elements are in the module Chrono::FEA Corotational: Bar element, Euler beam, Hexa8, Hexa20,

Tetra4, Tetra10, ANCF cable, ANCF beam, ANCF shell, bricks, etc.

For best results, use together with MKL module (linear solver) Visualization possible through Irrlicht (online) or

postprocessing through GNUPlot, Paraview, Pov-Ray, etc.

For some reason, implemented in its entirety in a header file: ChElementBeamANCF.h

Page 21: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

a. Mass matrixclass ChElementBeamANCF : public ChElementBeam, public ChLoadableU, public ChLoadableUVW {protected:std::vector<std::shared_ptr<ChNodeFEAxyzD> > nodes;

std::shared_ptr<ChBeamSectionCable> section;ChMatrixNM<double, 12, 1> m_GenForceVec0;ChMatrixNM<double, 12, 12> m_JacobianMatrix; ///< Jacobian matrix (Kfactor*[K] + Rfactor*[R])ChMatrixNM<double, 12, 12> m_MassMatrix; ///< mass matrix

public:ChElementBeamANCF() {

nodes.resize(2);m_use_damping = false; ///< flag to add internal damping and its Jacobianm_alpha = 0.0; ///< scaling factor for internal damping

// this->StiffnessMatrix.Resize(this->GetNdofs(), this->GetNdofs());// this->MassMatrix.Resize(this->GetNdofs(), this->GetNdofs());

}

bool m_use_damping; ///< Boolean indicating whether internal damping is addeddouble m_alpha; ///< Scaling factor for internal damping

virtual ~ChElementBeamANCF() {}

virtual int GetNnodes() override { return 2; }virtual int GetNdofs() override { return 2 * 6; }virtual int GetNodeNdofs(int n) override { return 6; }

virtual std::shared_ptr<ChNodeFEAbase> GetNodeN(int n) { return nodes[n]; }21

Page 22: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

a. Mass matrix/// This material can be shared between multiple beams.class ChApiFea ChBeamSectionCable : public ChBeamSection {public:double Area;double I;double E;double density;double rdamping;

ChBeamSectionCable() {E = 0.01e9; // default E stiffness: (almost rubber)

SetDiameter(0.01); // defaults Area, I

density = 1000; // default density: waterrdamping = 0.01; // default raleygh damping.

}

virtual ~ChBeamSectionCable() {}

22

Page 23: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

a. Mass matrix

23

virtual void ShapeFunctions(ChMatrix<>& N, double xi) {double l = this->GetRestLength();

N(0) = 1 - 3 * pow(xi, 2) + 2 * pow(xi, 3);N(1) = l * (xi - 2 * pow(xi, 2) + pow(xi, 3));N(2) = 3 * pow(xi, 2) - 2 * pow(xi, 3);N(3) = l * (-pow(xi, 2) + pow(xi, 3));

};

/// Fills the N shape function derivative matrix with the/// values of shape function derivatives at abscyssa 'xi'./// Note, xi=0 at node1, xi=+1 at node2./// NOTE! to avoid wasting zero and repeated elements, here/// it stores only the four values in a 1 row, 4 columns matrix!virtual void ShapeFunctionsDerivatives(ChMatrix<>& Nd, double xi) {

double l = this->GetRestLength();

Nd(0) = (6.0 * pow(xi, 2.0) - 6.0 * xi) / l;Nd(1) = 1.0 - 4.0 * xi + 3.0 * pow(xi, 2.0);Nd(2) = -(6.0 * pow(xi, 2.0) - 6.0 * xi) / l;Nd(3) = -2.0 * xi + 3.0 * pow(xi, 2.0);

};

virtual void ShapeFunctionsDerivatives2(ChMatrix<>& Ndd, double xi) {double l = this->GetRestLength();Ndd(0) = (12 * xi - 6) / pow(l, 2);Ndd(1) = (-4 + 6 * xi) / l;Ndd(2) = (6 - 12 * xi) / pow(l, 2);Ndd(3) = (-2 + 6 * xi) / l;

};

S

xS

xxS

Page 24: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

a. Mass matrix

24

virtual void ComputeMassMatrix() {assert(section);

double Area = section->Area;double rho = section->density;class MyMass : public ChIntegrable1D<ChMatrixNM<double, 12, 12> > {public:ChElementBeamANCF* element;ChMatrixNM<double, 3, 12> S;ChMatrixNM<double, 1, 4> N;

/// Evaluate the S'*S at point xvirtual void Evaluate(ChMatrixNM<double, 12, 12>& result, const double x) {

element->ShapeFunctions(N, x);// S=[N1*eye(3) N2*eye(3) N3*eye(3) N4*eye(3)]ChMatrix33<> Si;Si.FillDiag(N(0));S.PasteMatrix(&Si, 0, 0);Si.FillDiag(N(1));S.PasteMatrix(&Si, 0, 3);Si.FillDiag(N(2));S.PasteMatrix(&Si, 0, 6);Si.FillDiag(N(3));S.PasteMatrix(&Si, 0, 9);// perform r = S'*Sresult.MatrTMultiply(S, S);

MyMass myformula;myformula.element = this;

ChQuadrature::Integrate1D<ChMatrixNM<double, 12, 12> >(this->m_MassMatrix, // result of integration will go theremyformula, // formula to integrate0, // start of x1, // end of x4 // order of integration);

this->m_MassMatrix *= (rho * Area * this->length);}

Integration over one dimension (1D)

Arrangement of shape functions in matrix SFour possible values of shape functions: s1,s2, s3,s4

Multiplication of S’S (integrand, dependent on space parameters)

Class that calls the formula above several times to perform numerical integration of the mass matrix

How many times do we need to compute the mass matrix during simulation?

Page 25: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

b. Generalized internal forcesAxial

25

class MyForcesAxial : public ChIntegrable1D<ChMatrixNM<double, 12, 1> > {public:ChElementBeamANCF* element;ChMatrixNM<double, 4, 3>* d; // this is an external matrix, use pointerChMatrixNM<double, 12, 1>* d_dt; // this is an external matrix, use pointerChMatrixNM<double, 3, 12> Sd;ChMatrixNM<double, 1, 4> N;ChMatrixNM<double, 1, 4> Nd;ChMatrixNM<double, 1, 12> strainD;ChMatrixNM<double, 1, 1> strain;ChMatrixNM<double, 1, 3> Nd_d;ChMatrixNM<double, 12, 12> temp;

/// Evaluate (strainD'*strain) at point xvirtual void Evaluate(ChMatrixNM<double, 12, 1>& result, const double x) {

element->ShapeFunctionsDerivatives(Nd, x);

// Sd=[Nd1*eye(3) Nd2*eye(3) Nd3*eye(3) Nd4*eye(3)]ChMatrix33<> Sdi;Sdi.FillDiag(Nd(0));Sd.PasteMatrix(&Sdi, 0, 0);Sdi.FillDiag(Nd(1));Sd.PasteMatrix(&Sdi, 0, 3);Sdi.FillDiag(Nd(2));Sd.PasteMatrix(&Sdi, 0, 6);Sdi.FillDiag(Nd(3));Sd.PasteMatrix(&Sdi, 0, 9);

Nd_d = Nd * (*d);

strainD = Nd_d * Sd;

Declarations needed

x r

Evaluate shape function derivatives at

xx e

Page 26: ME751 Advanced Computational Multibody Dynamics...Multibody Dynamics November 7, 2016 Antonio Recuero University of Wisconsin-Madison Quote of the Day “A vote is like a rifle: its

b. Generalized internal forcesAxial

// strain = (Nd*(d*d')*Nd'-1)*0.5;

strain.MatrMultiplyT(Nd_d, Nd_d);strain(0, 0) += -1;strain(0, 0) *= 0.5;

// Add damping forces if selectedif (element->m_use_damping)

strain(0, 0) += (element->m_alpha) * (strainD * (*d_dt))(0, 0);

result.MatrTMultiply(strainD, strain);// result: strainD'*strain

}};

MyForcesAxial myformulaAx;myformulaAx.d = &d;myformulaAx.d_dt = &vel_vector;myformulaAx.element = this;

ChMatrixNM<double, 12, 1> Faxial;ChQuadrature::Integrate1D<ChMatrixNM<double, 12, 1> >(Faxial, // result of integration will go there

myformulaAx, // formula to integrate0, // start of x1, // end of x5 // order of integration);

Faxial *= -E * Area * length;

Fi = Faxial; 26

Calculation of strain

Optional addition of damping

Result dependent on space parameter

Integration and addition to generalized force vector