166
MBDyn Theory and Developer’s Manual Version 1.X-Devel Pierangelo Masarati Dipartimento di Ingegneria Aerospaziale Politecnico di Milano May 4, 2013

MBDyn Theory and Developer’s Manual Version 1.X-Devel

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MBDyn Theory and Developer’s Manual Version 1.X-Devel

MBDyn Theory

and Developer’s Manual

Version 1.X-Devel

Pierangelo Masarati

Dipartimento di Ingegneria Aerospaziale

Politecnico di Milano

May 4, 2013

Page 2: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Contents

1 Introduction 7

2 Parsing 82.1 HighParser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.1.1 Traditional Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.1.2 Table-Driven Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.2 LowParser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.3 MathParser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3 Solvers 123.1 Matrix classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.2 Sparse matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.3 Linear solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.4 Non linear solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.5 Parallel solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.5.1 Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4 Orientation Handling 144.1 Euler Angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.2 Orientation Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5 Integration 175.1 Nodal rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

6 Solution Phases 186.1 Initial Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186.2 Initial Value Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

6.2.1 Initial Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196.2.2 Dummy Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216.2.3 Regular Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

6.3 Inverse Dynamics Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216.3.1 Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216.3.2 Fully Actuated, Collocated Problem . . . . . . . . . . . . . . . . . . . . . . . . . . 226.3.3 Fully Actuated, Non-Collocated Problem . . . . . . . . . . . . . . . . . . . . . . . 236.3.4 Underdetermined, Underactuated but Collocated Problem . . . . . . . . . . . . . . 236.3.5 Underdetermined, Overcontrolled Problem . . . . . . . . . . . . . . . . . . . . . . . 25

1

Page 3: MBDyn Theory and Developer’s Manual Version 1.X-Devel

7 Data Structure 287.1 Constitutive Laws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287.2 ExpandableRowVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

8 Nodes 318.1 Structural Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

8.1.1 Dynamic Structural Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318.1.2 Static Structural Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348.1.3 Dummy Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358.1.4 Relative Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358.1.5 Motion Expressed in a Relative Reference Frame . . . . . . . . . . . . . . . . . . . 378.1.6 Dynamics in a Relative Reference Frame . . . . . . . . . . . . . . . . . . . . . . . . 388.1.7 Airstream Velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398.1.8 Implementation Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408.1.9 Pseudo-Velocities Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

9 Constraints 459.1 Algebraic Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

9.1.1 Clamp Joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469.1.2 Distance Joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479.1.3 Distance Joint With Offsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489.1.4 Spherical hinge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499.1.5 Revolute hinge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509.1.6 Inline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539.1.7 Drive Hinge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559.1.8 Drive Displacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569.1.9 Drive Displacement Pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589.1.10 Imposed Displacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599.1.11 Imposed Displacement Pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609.1.12 Total Joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619.1.13 Total Pin Joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679.1.14 Gimbal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709.1.15 Screw Joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729.1.16 Strapdown Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

9.2 Deformable Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789.2.1 Rod With Offsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789.2.2 Deformable Hinge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819.2.3 Deformable Displacement Joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919.2.4 Deformable Joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 979.2.5 Deformable Axial Joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

9.3 Viscous Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1049.4 Modal Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

9.4.1 Kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1059.4.2 Physics: Orthogonality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1089.4.3 Simplifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1099.4.4 Invariants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1109.4.5 Interfacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

10 Beam Element 114

2

Page 4: MBDyn Theory and Developer’s Manual Version 1.X-Devel

11 Shell Element 11511.1 Variational principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

11.1.1 Strain Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11611.2 Finite element discretization and notation . . . . . . . . . . . . . . . . . . . . . . . . . . . 11711.3 Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11811.4 Structural Damping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11911.5 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

11.5.1 Orientation interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11911.5.2 Position interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12011.5.3 Enhancing strains interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12111.5.4 Compatible strains interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12211.5.5 ANS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12311.5.6 Forces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12411.5.7 Jacobian matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12511.5.8 Residual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

12 Aerodynamic Elements 12712.1 Linearization of 2D Aerodynamic Forces and Moments . . . . . . . . . . . . . . . . . . . . 12712.2 Numerical Linearization of Sectional Forces . . . . . . . . . . . . . . . . . . . . . . . . . . 12912.3 Aerodynamic Forces with Internal States . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12912.4 Aerodynamic body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13012.5 Aerodynamic Beam (3 Nodes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13112.6 Aerodynamic Beam (2 Nodes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13412.7 Unsteady aerodynamics model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

12.7.1 Perturbation of the Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14012.7.2 Perturbation of the aerodynamic forces . . . . . . . . . . . . . . . . . . . . . . . . 14312.7.3 Perturbation of the aerodynamic moments . . . . . . . . . . . . . . . . . . . . . . . 14412.7.4 Finite difference version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14412.7.5 Perturbation of the equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14612.7.6 Perturbation of the aerodynamic forces . . . . . . . . . . . . . . . . . . . . . . . . 14712.7.7 Perturbation of the aerodynamic moments . . . . . . . . . . . . . . . . . . . . . . . 148

12.8 Rotor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14812.8.1 Uniform Inflow Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15012.8.2 Glauert Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15012.8.3 Mangler-Squire Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15112.8.4 Dynamic Inflow Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

13 Forces 15513.1 Abstract Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

13.1.1 Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15513.1.2 Abstract Internal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

13.2 Structural Forces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15513.2.1 Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15513.2.2 Couple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

13.3 Modal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15513.4 External . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

13.4.1 External Structural . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15613.4.2 External Structural Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15713.4.3 External Modal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15813.4.4 External Modal Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

3

Page 5: MBDyn Theory and Developer’s Manual Version 1.X-Devel

13.4.5 Client Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

14 Hydraulic Library 16014.1 Hydraulic Fluids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16014.2 Hydraulic Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16014.3 Hydraulic Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

14.3.1 Accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16014.3.2 Actuator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16014.3.3 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16114.3.4 Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16114.3.5 Dynamic Pipe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16114.3.6 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

4

Page 6: MBDyn Theory and Developer’s Manual Version 1.X-Devel

List of Figures

9.1 3D screw thread sketch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759.2 2D screw thread sketch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

11.1 Shell finite element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

5

Page 7: MBDyn Theory and Developer’s Manual Version 1.X-Devel

List of Tables

12.1 Coefficients of the Wagner indicial response approximation of Theodorsen’s function ([1, 2])13812.2 Glauert inflow model (source: Leishman [2]) . . . . . . . . . . . . . . . . . . . . . . . . . . 151

6

Page 8: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 1

Introduction

This document describes the formulation MBDyn, the free general-purpose multibody dynamics software,relies on. It also describes implementation-related aspects.

The document is far from complete; in fact, its preparation started at a late stage of the project, whenmany parts of the software were already completed and in use. From that time on, many modificationsand improvements have been steadily documented and, occasionally, the theory manual anticipated thedevelopment (as should always happen, I know).

The Developers committed themselves to keeping it at least up to date with new developments;undocumented stuff should be documented as soon as it needs modifications or refactoring.

Alessandro Fumagalli, Marco Morandini and Mattia Mattaboni contributed significantly to this doc-ument.

7

Page 9: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 2

Parsing

In MBDyn there are different levels of parsing. Input file parsing suffers from a scattered and occasionallyoutdated design. The need to preserve backwards compatibility with existing models restrained so farfrom entirely redesign it, although selected improvements occur over time.

MBDyn provides support for the implementation of new functionalities, and to parse their input.Parsing is delegated to a dedicated object, the MBDynParser, which inherits from the HighParser, ahigher-level parsing object with bits of MBDyn’s syntax built-in in a somewhat modular way. It exploitsthe functionalities of the LowParser, a lower-level parsing object that deals with tokenizing an inputstream based on the expected tokens. Whenever appropriate (e.g. whenever a number is expected),control is delegated to the MathParser, which allows to parse and evaluate sequences of mathematicalexpressions, including variable declaration and definition. Variables are saved in a table as soon as theyappear, and can be used by subsequent expressions when the mathematical parser is called again.

The traditional approach to data parsing consists in defining a table of keywords that are looked upand, based on the corresponding key code, by executing the appropriate code in a switch-case block.

The code is being gradually moved to a newer approach based on sets of associative arrays that mapkeywords to the functional objects that are used to parse the related items.

Although no significant improvement results in parsing of existing data types, this approach allowsto register new data types run-time, e.g. from a run-time loaded module, thus easing the extension andthe customization of the code.

2.1 HighParser

2.1.1 Traditional Usage

The HighParser class and its descendants use a KeyTable object containing a list of legal keywords to re-turn a valid keyword index when HighParser::GetWord(), and significantly HighParser::GetDescription()are invoked. The KeyTable can be changed during parsing. KeyTable is a class. Its constructor takes apointer to an array of strings and a reference to the HighParser object. The last string in the array mustbe null. The KeyTable class constructor keeps track of previous KeyTable objects in the HighParser,and restores them upon destruction.

The suggested usage inside a stacked call sequence of parsing functions is

Part *

read_part(HighParser& HP)

// prepare names

8

Page 10: MBDyn Theory and Developer’s Manual Version 1.X-Devel

enum KeyWord KEYWORD1, KEYWORD2, KEYWORD_LAST ;

char *key_table_array[] = "keyword1", "keyword2", 0 ;

// build KeyTable class

KeyTable k(HP, key_table_array);

Part *returned_object = 0;

// parse input

do

switch (KeyWord(HP.GetWord()))

default:

// do something...

break;

case KEYWORD1:

// ...and build returned_object

return returned_object;

while (true);

void

read_all(HighParser& HP)

// prepare names

enum KeyWord KEY1, KEY2, PART, KEY_LAST ;

char *keytable[] = "key1", "key2", "part", 0 ;

// build KeyTable class

KeyTable k(HP, keytable);

// do something

Part *part = 0;

do

switch (KeyWord(HP.GetWord()))

default:

// do something...

break;

case PART:

// read part

Part *part = read_part(HP);

break;

while (true);

Here the KeyTable set by function read_all() is automatically restored after the call to read_part();read_part() temporarily changes the KeyTable used by the parser.

2.1.2 Table-Driven Usage

The table-driven usage is based on defining a functional object that is able to parse a data type:

class Datum

public:

9

Page 11: MBDyn Theory and Developer’s Manual Version 1.X-Devel

virtual ~Datum(void) ;

;

struct DatumRead

virtual ~DatumRead(void) ;

virtual Datum *Read(MBDynParser &HP) const = 0;

;

and a container for its descendants:

typedef std::string KeyType;

typedef std::map<KeyType, DatumRead *> DatumMapType;

DatumMapType DatumMap;

Then, a functional object for each specific datum type is derived from DatumRead . . .

class MyDatum : public Datum

// ...

public:

Datum(int);

// ...

struct MyDatumRead : public DatumRead

Datum *Read(MBDynParser &HP) const

return new MyDatum(HP.GetInt());

;

;

. . . and stored exactly once into the associative container by means of a dedicated helper:

bool

SetDatumRead(KeyType key, DatumRead *rf)

return DatumMap.insert(DatumMapType::value_type(key, rf)).second;

// somewhere early in the code ...

SetDatumRead("mydatum", new MyDatumRead);

// note: somewhere else later, in the code, place

for (DatumMapType::iterator i = DatumMap.begin();

i != DatumMap.end();

i++)

delete i->second;

DatumMap.clear();

The parsing function is something like

Datum *

ReadDatum(MBDynParser &HP)

10

Page 12: MBDyn Theory and Developer’s Manual Version 1.X-Devel

KeyType key(HP.GetStringWithDelims());

if (key.c_str() == 0)

// error ...

return 0;

DatumMapType::iterator i = DatumMap.find(key);

if (i == DatumMap.end())

// error ...

return 0;

return i->second->Read(HP);

Only the MyDatum portions need be added for each new datum type; they can be declared, defined andregistered anywhere in the code, including in run-time loaded modules.

Currently, drives, constitutive laws and scalar functions are handled according to this scheme; exam-ples are provided in modules/module-drive/, modules/module-constlaw/ and modules/module-scalarfunc/.More types will be reworked accordingly.

2.2 LowParser

...

2.3 MathParser

...

11

Page 13: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 3

Solvers

...

3.1 Matrix classes

3.2 Sparse matrices

3.3 Linear solvers

LinearSolver classes wraps linear solversSolutionManagers classes deals with the solution of linear systems. They own a pointer to a LinearSolver,where they allocate the underlying linear solver. SolutionManager::MatrInitialize() is called when thestructure of the underlying spares matrix changes. SolutionManager::MatrReset(), is called to deletea factorization. It usually calls LinearSolver::Reset(). The matrix has to be explicitly zeroed before aJacobian matrix assembly.

3.4 Non linear solvers

...

3.5 Parallel solver

3.5.1 Partitioning

iTotVertices is equal to the sum of nodes and elements. It is made in this way because we want thepartitioner to generate a twofold subdivision:

• a subdivision related to elements; this subdivision is done in order to share the computational loadduring the assembly phase;

• a subdivision related to nodes, which is necessary for the solving phase with the substructuringmethod.

12

Page 14: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Of course this two partitions must be connected, so we build created a graph which is made of nodesand elements as vertex. The connection between vertexes are only between nodes and elements. Thereis no node to node or element to element connection.

pVertexWgts contains what we call the computational weight of each entity, so nodes have weight nullwhile elements has a weight related to the dimension of the submatrix of the Jacobian matrix assembledby each one of them.

pCommWgts contains the communication weights (see metis documentation) which are a measure ofthe quantity of data which needs to be sent if the i-th vertex is part of an interface between differentpartitions. This means that nodes have a CommWgts equal to the number of DOFs, while elements havea weight equal to any internal DOFs they possess.

13

Page 15: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 4

Orientation Handling

The orientation of structural nodes is handled by storing the orientation matrix of each node, andupdating it during prediction and correction by incremental orientations.

The code uses Gibbs-Rodrigues parameters to account for incremental rotations. These parametersallow very efficient implementation, since they only require few algebraic operations to obtain the ori-entation matrix and related entities. However, they require the absolute value of the orientation to belimited; this requirement is usually overcome by accuracy requirements, so it is not viewed as a stronglimitation.

One main advantage of this approach is that only three parameters are required to handle orientations.A main drawback of this approach is that it is quite difficult to keep track of how large a change inorientation occurred to a given node, since simply converting the orientation matrix into any otherrepresentation of a finite rotation typically results in the minimal rotation that yields that matrix.

MBDyn can output rotations in the following representations:

• Euler angles according to the 123 sequence;

• the orientation vector;

• the orientation matrix.

4.1 Euler Angles

Consider an orientation expressed by matrix R. It can be expressed as the result of a precise sequenceof rotations about three distinct axes. The 123 sequence means that matrix R is obtained as a sequenceof three rotations: the first about axis 1; the second about axis 2 as it results after the first rotation; thethird about axis 3 as it results after the second rotation, namely:

R1 =

1 0 00 cosα − sinα0 sinα cosα

, (4.1)

R2 =

cosβ 0 sinβ0 1 0

− sinβ 0 cosβ

, (4.2)

R3 =

cos γ − sin γ 0sin γ cos γ 00 0 1

, (4.3)

14

Page 16: MBDyn Theory and Developer’s Manual Version 1.X-Devel

piled up, must equal R:

R = R1R2R3 (4.4)

=

cosβ cos γ − cosβ sin γ sinβsinα sinβ cos γ + cosα sin γ − sinα sinβ sin γ + cosα cos γ − sinα cosβ− cosα sinβ cos γ + sinα sin γ cosα sinβ sin γ + sinα cos γ cosα cosβ

.

The angles can then be computed by means of a simple, partially recursive algorithm:

α = − tan−1

(

R23

R33

)

(4.5)

β = tan−1

(

R13

cosαR33 − sinαR23

)

(4.6)

γ = tan−1

(

cosαR21 + sinαR31

cosαR22 + sinαR32

)

(4.7)

The use of the function atan2(double dSin, double dCos) eliminates the risk of divisions by zero orof excessive loss of precision.

4.2 Orientation Vector

An orientation matrix can be represented as a finite rotation about an axis, in the form

R = I + sinφ n× + (1− cosφ)n× n× (4.8)

where φ is the amplitude of the rotation and n is the unit vector that represents the rotation axis.Simple algebra manipulation shows that the trace of the orientation matrix corresponds to

tr (R) = tr (I) + (1− cosφ) tr (n× n× ) (4.9)

= 3− 2 (1− cosφ) , (4.10)

since

n× n× = nnT − I, (4.11)

so

cosφ =tr (R)− 1

2. (4.12)

At the same time, the skew-symmetric portion of R is

skw (R) = sinφ n× , (4.13)

so

ax (skw (R)) = sinφ n (4.14)

which yields the amplitude of the rotation,

sinφ = norm (ax (skw (R))) , (4.15)

15

Page 17: MBDyn Theory and Developer’s Manual Version 1.X-Devel

and the direction of the rotation axis,

n =1

sinφax (skw (R)) , (4.16)

while φ can be computed from its sine and cosine as

φ = tan−1

(

sinφ

cosφ

)

. (4.17)

16

Page 18: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 5

Integration

differential variable: a variable is declared differential in SimulationEntity::GetDofType() by returning DofOrder::DIFFERENTIAL.The increment of the value of a differential variable is equal to ∆x = dCoef∆x. When writing theJacobian matrix, this must be considered; as a consequence, for an equation f = 0 (the residual is−f) the linearization is f/x + f/x ∗ dCoef) ∗∆x = −f , as dCoef ∗∆x = ∆x.

algebraic variable: a variable is declared algebraic in SimulationEntity::GetDofType() by returning DofOrder::ALGEBRAIC.The increment of the value of an algebraic variable is the increment of the variable.

differential equation: an equation is declared differential in SimulationEntity::GetEqType() by returning DofOrder::DIFFERENTIAL.An equation f = 0 must be declared differential if f/x is not null. The residual is −f , and its lin-

earization is:(f/x + f/x ∗ dCoef

)∗∆x = −f .

algebraic equation: an equation is declared algebraic in SimulationEntity::GetEqType() by returning DofOrder::ALGEBRAIC.An equation f = 0 can be declared algebraic iff f/x is structurally null (e.g. regardless of the valuesthe state may assume) and x is not algebraic. If an equation f (x, t) = 0 is declared differential,the residual is −f , and its linearization is: f/x ∗ dCoef ∗∆x = −f . If the equation can be declaredalgebraic, it can be divided by dCoef: f/dCoef = 0, with residual −f/dCoef, and linearizationf/x ∗∆x = −f/dCoef. This helps scaling the equations. Clearly, this has no sense if x is algebraic,or if f/x 6= 0.

5.1 Nodal rotation

The rotational DOF unknown during AssRes() and AssJac() are the increment of (Gibbs-Rodrigues)rotation parameters with respect to the reference configuration. Of course the increment of the parameteris ∆g = dCoef∆g. The increment of angular velocity is ∆ω = G∆g+∆Gg−ωref ×G∆g, where G(g)is the tensor relating gδ to δg, and ωref is the nodal reference angular velocity (Wref). We assume G = Iand ∆G = 0, so that ∆ω = ∆g − ωref ×∆g and so ∆ω = ∆g − ωref ×∆g ∗ dCoef.

17

Page 19: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 6

Solution Phases

6.1 Initial Assembly

This phase only involves some of the structural elements. It is intended to ensure that the initialconfiguration and velocity complies with the constraint equations. It is not performed if the control

data block contains the statement skip initial joint assembly.To allow non-compliant system analysis, the initial configuration and velocity can be changed by this

phase. To this purpose, the nodal positions, orientations, velocities and angular velocities are groundedby dummy springs, acting as penalty functions. The springs can be set on a node basis, and separatelyfor configuration and velocity, to allow to selectively enforce the initial configuration.

The problem can be stated as follows:

Kx+ φT/xλφ +ATλA =Kx0 + f (6.1)

Cv + φT/xµ = Cv0 (6.2)

φ (x, t) = 0 (6.3)

A (x, t)v + b (x, t) = 0 (6.4)

φ/xv + φ/t = 0 (6.5)

where Equation (6.3) and (6.4) respectively contain the holonomic and non-holonomic constraint equa-tions. The solution of this problem leads to the direct determination of an initial configuration andvelocity that complies with the constraints.

Unfortunately, this requires the implementation of more constraints than required by the regularsolution phases, namely the time derivative of the algebraic constraints that depend only on the config-uration.

NOTE: this is a work in progress. A new procedure is being considered, which requires onlythe use of the constraint equation φ and its Jacobian matrix φ/x.

The problem that is solved with the new procedure is:

• solve for configuration and holonomic constraints first

Kx+ φT/xλφ =Kx0 + f (6.6)

φ (x, t) = 0 (6.7)

18

Page 20: MBDyn Theory and Developer’s Manual Version 1.X-Devel

• then solve for non-holonomic ones,

Cv +ATλA = Cv0 (6.8)

A (x, t)v + b (x, t) = 0 (6.9)

keeping the configuration x fixed, so that only the configuration is required to comply with theconstraint equations, and the same constraint Jacobian matrix and residual of the regular stepsare required;

• finally, after convergence, the following equation is considered:

φ/xv + φ/t = 0 (6.10)

which uses the Jacobian matrix of the constraint equations; only the derivative of the time-dependent constraints is required.

The number of rows of matrix φ/x is equal to the number of degrees of freedom that are constrained,so typically the matrix must be underdetermined. It can be decomposed as

φT/x = QR =

[Q1 Q2

][R1

0

]

(6.11)

so

QT1 v +R−T1 φ/t = 0 (6.12)

becomes a compatibility test for the initial velocities. There are two possible choices:

1. the initial configuration assessment fails if the given initial velocities, after the correctionoccurring during the position and orientation assessment and correction phase, do not passtest (6.12);

2. the initial velocities v are corrected into vc by projecting them in the space that is compatiblewith the constraints, e.g.:

vc = v −Q1

(QT

1 v +R−T1 φ/t

)(6.13)

The initial assembly procedure can be repeated until test (6.12) passes.

A consistent implementation of this approach is not available yet; it requires the availability of the timederivatives of the constraint equations, which is an open issue since it is not well understood what is thephysical meaning of knowing the time derivatives of a constraint. Implementation issues are still openas well.

6.2 Initial Value Problem

6.2.1 Initial Derivatives

The so-called “derivatives” phase can be thought as computing the initial value of the highest orderderivatives at t = t0 before any iteration starts. For simplicity, think of an explicit Ordinary DifferentialEquation (ODE) problem like

y = f(y, t) (6.14)

19

Page 21: MBDyn Theory and Developer’s Manual Version 1.X-Devel

with the initial value of t(0) = t0 and y(0) = y0; then, the computation of y(0) is trivial. Now, theactual problem is Differential Algebraic (DAE) and implicit, i.e. something like

f(y,y, t) = 0 (6.15)

(actually, it’s a bit more complicated, since it’s index 3), and we still need to compute the derivativesy(0) of the differential variables, and the algebraic variables as well, which in the above representationare hidden in the y. During the regular solution phase (i.e. the Newton iteration) we solve a problem ofthe form

f/y∆y + f/y∆y = −f (6.16)

and, according to the integration formula that we are using,

∆y = dCoef ·∆y (6.17)

where dCoef = b0h is essentially the time step h times some coefficient b0 specific for the integrationformula; it is 1/2 for Crank-Nicolson, 2/3 for BDF and so on. So the actual iteration is

(f/y + dCoef · f/y

)∆y = −f . (6.18)

To avoid the need to implement a dedicated routine to compute the initial value of y, we iterateover the above reported problem, ideally with a time step of 0, which means that f/y is not considered.However, since the problem is differential algebraic, the Jacobian matrix f/y can be structurally singular,so the time step must be greater than 0, but small enough to let the correction

∆y = dCoef ·∆y (6.19)

be negligible with respect to ∆y.Assuming the above is true, during this phase the update procedure of the Newton iteration is

modified. Instead of computing

y(i+1) = y(i) +∆y (6.20a)

y(i+1) = y(i) + dCoef ·∆y, (6.20b)

the “derivatives” update actually consists in

y(i+1) = y(i) +∆y (6.21a)

y(i+1) = y(i); (6.21b)

namely, the initial value of y is preserved. This corresponds to performing a Newton iteration with an in-complete Jacobian matrix. For this purpose, nodes and elements that need to take this into account whenupdating internal states can provide a DerivativesUpdate method (declared in SimulationEntity).

To conclude, the “derivatives coefficient” defined in the input file is the “dCoef” of Eq. (6.18), whichcan be interpreted as the time step of a “fake” initial step that is used to compute the initial valueof the highest order derivatives. It should be as small as possible, but too small makes the problemill-conditioned (and 0 makes it structurally singular). The default value is usually fine (it rarely needsto be set, unless something really strange is going on).

If the initial derivatives phase requires more than one iteration this may mean that the system isimpulsively loaded with inappropriate initial values of states; In this case, the number of iterations canbe increased, by setting

20

Page 22: MBDyn Theory and Developer’s Manual Version 1.X-Devel

derivatives coefficient: 1e-9;

derivatives tolerance: 1e-6;

derivatives max iterations: 10;

in the initial value block. If the solution does not converge, you should enable iterations output,adding

output: iterations;

in the initial value block. If you notice that the error settled to some value, and does not reduceas iterations progress, this means that the incomplete update of Eqs. (6.21) is preventing the problemfrom converging, because the initial value of y is compatible with the constraints but does not satisfyequilibrium.

In this case, one can play with the derivatives coefficient parameter, to emphasize the “inertia”terms instead of the “elastic” ones, or simply increase the derivatives tolerance so that the solutionwith the current derivatives coefficient is considered converged. The latter choice may result in a“rough” behavior of the solution during the initial steps of the simulation.

6.2.2 Dummy Steps

TODO

6.2.3 Regular Steps

TODO

6.3 Inverse Dynamics Problem

In principle, an inverse dynamics problem consists in computing the ‘torques’ (actuator forces) requiredto comply with equilibrium for a given configuration (position, velocity and acceleration) of the entiresystem.

In practice, in many cases the motion of the system is not directly known in terms of the coordinatesthat are used to describe it, but rather in terms of the prescribed motion of the ‘joints’ (the actuators)that apply the unknown torques. As a consequence, an inverse kinematics problem needs to be solvedfirst, to determine the configuration of the system up to the acceleration level as a function of the motionprescribed to the end effector up to the acceleration level. Section 6.3.2 deals with the case of a fullyactuated problem, i.e. a problem whose motion is completely prescribed in terms of joint coordinates.Section 6.3.4 deals with the case of an underactuated problem, i.e. a problem whose motion is onlypartially prescribed in terms of joint coordinates.

In many cases, even the motion of the actuators is not directly known. On the contrary, the motionof another part of the system (called the ‘end effector’) is prescribed, and the actuators’ motion requiredto move the end effector as prescribed needs to be computed. As a consequence, the inverse kinematicsproblem is driven by the motion prescribed to the end effector rather than directly to the joints. Thiscase is specifically dealt with in Section 6.3.5.

6.3.1 Nomenclature

In the following, x are the n coordinates that describe the motion of the system;

φ (x) = 0 (6.22)

21

Page 23: MBDyn Theory and Developer’s Manual Version 1.X-Devel

are b so-called ‘passive’ constraints, namely those that describe the assembly of the system;

ϑ (x) = θ (6.23)

are j so-called ‘joint coordinates’, namely those that describe the motion θ of the joints, with φ/xϑ+/x ≡ 0;

ψ (x) = α(t) (6.24)

are c so-called ‘control constraints’, namely equations that prescribe the motion of the end effector, withφ/xψ

+/x ≡ 0. When the joint motion is directly prescribed, θ ≡ α(t) and thus ϑ(x) ≡ ψ(x). In some

cases, a partial overlap may exist between the two sets of equations.

6.3.2 Fully Actuated, Collocated Problem

In this case, ψ(x) ≡ ϑ(x) and c = j = n− b.

Inverse Kinematics: Position Subproblem

φ (x) = 0 (6.25a)

ψ (x) = α (6.25b)

using Newton-Raphson:

[φ/x

ψ/x

]

∆x =

−φ (x)α−ψ (x)

. (6.26)

Inverse Kinematics: Velocity Subproblem

φ/xx = 0 (6.27a)

ψ/xx = α (6.27b)

or[φ/x

ψ/x

]

x =

. (6.28)

Inverse Kinematics: Acceleration Subproblem

φ/xx = −(φ/xx

)

/xx (6.29a)

ψ/xx = α−(ψ/xx

)

/xx (6.29b)

or

[φ/x

ψ/x

]

x =

−(φ/xx

)

/xx

α−(ψ/xx

)

/xx

. (6.30)

22

Page 24: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Inverse Dynamics Subproblem

Mx+ φT/xλ+ψT

/xc = f (6.31)

or

[φ/x

ψ/x

]T λ

c

= f −Mx. (6.32)

The matrix of the Newton-Raphson problem for the position is identical to the matrices of the linearproblems for the velocity and the acceleration, while the inverse dynamics problem uses its transpose, sothe same factorization can be easily reused.

6.3.3 Fully Actuated, Non-Collocated Problem

In this case, ψ(x) 6= ϑ(x), but still c = j = n− b.

Inverse Kinematics: Position, Velocity and Acceleration Subproblems

The position, velocity and acceleration subproblems that define the inverse kinematics problem areidentical to those of the collocated case of Section 6.3.2.

Inverse Dynamics Subproblem

Mx+ φT/xλ+ ϑT

/xc = f (6.33)

or

[φ/x

ϑ/x

]T λ

c

= f −Mx. (6.34)

The inverse dynamics problem uses a different matrix from the transpose of that that was used for theinverse kinematics subproblems.

6.3.4 Underdetermined, Underactuated but Collocated Problem

In this case, again ψ(x) ≡ ϑ(x) but c = j < n− b.

Inverse Kinematics: Position Subproblem

Constraint equations:

φ (x) = 0 (6.35a)

ψ (x) = α(t) (6.35b)

with φ/x and ψ/x rectangular, full row rank. The problem is underdetermined; as a consequence, somecriteria are needed to find an optimal solution.

The problem can be augmented by

K (x− x0) + φT/xλ+ψT

/xµ = 0 (6.36)

23

Page 25: MBDyn Theory and Developer’s Manual Version 1.X-Devel

This nonlinear problem is solved for x, λ and µ to convergence (K, φ/x and ψ/x may further dependon x). It corresponds to a least-squares solution for x− x0, where the quadratic form

Jx =1

2(x− x0)

TK (x− x0) (6.37)

is minimized subjected to φ = 0 and ψ = α, and weighted by matrix K; x0 is a reference solution.Matrix K can further depend on x.

The reference solution x0 can be used to further control the quality of the solution. For example, itmay represent a prescribed tentative, although possibly incompatible, trajectory. Another option consistsin augmenting Jx with another quadratic form

Jx =1

2(x− x0)

TK (x− x0) + wx

1

2(x− xprev)

TM (x− xprev) (6.38)

where xprev is the value of x at the previous time step. This modified quadratic form weights the rate ofchange of x within two consecutive steps. As a consequence, minimal position changes (i.e. velocities),weighted by the mass of the system, are sought. The corresponding problem is

K (x− x0) + wxM (x− xprev) + φT/xλ+ψT

/xµ = 0 (6.39a)

φ (x) = 0 (6.39b)

ψ (x) = α, (6.39c)

or

(K + wxM)x+ φT/xλ+ψT

/xµ =Kx0 + wxMxprev (6.40a)

φ (x) = 0 (6.40b)

ψ (x) = α. (6.40c)

Using Newton-Raphson:

K + wxM φT/x ψT

/x

φ/x 0 0ψ/x 0 0

∆x∆λ∆µ

=

K (x0 − x) + wxM (xprev − x)− φT/xλ−ψT

/xµ

−φ (x)α(t)−ψ (x)

(6.41)

Inverse Kinematics: Velocity Subproblem

Constraint first derivative:

R (x− x0) + φT/xλ+ψT

/xµ = 0 (6.42a)

φ/xx = 0 (6.42b)

ψ/xx = α. (6.42c)

In analogy with the position constraint case, it corresponds to minimizing the quadratic form

Jx =1

2(x− x0)

TR (x− x0) , (6.43)

which can be augmented as well, resulting in

Jx =1

2(x− x0)

TR (x− x0) + wx

1

2(x− xprev)

TM (x− xprev) , (6.44)

24

Page 26: MBDyn Theory and Developer’s Manual Version 1.X-Devel

to minimize the velocity increment between two consecutive time steps. The corresponding problem is

(R+ wxM) x+ φT/xλ+ψT

/xµ = Rx0 + wxMxprev (6.45a)

φ/xx = 0 (6.45b)

ψ/xx = α, (6.45c)

or

R+ wxM φT/x ψT

/x

φ/x 0 0ψ/x 0 0

x

λ

µ

=

Rx0 + wxMxprev

. (6.46)

The constraint derivative problem is linear in x; the same symbols λ and µ are used for the multiplierssince they are ineffective (their value is never used). The problems can be solved sequentially. Only incase K ≡ R and wx ≡ wx both problems use the same matrix and thus the same factorization can bereused.

Inverse Dynamics Subproblem

The second derivative of the constraint cannot be resolved as in the fully actuated case, otherwise it couldyield accelerations that cannot be imposed by the constraints. On the contrary, the inverse dynamicsproblem of Eq. (6.31) is directly solved, yielding both the accelerations and the torques,

Mx+ φ/xλ+ψ/xc = f (6.47a)

φ/xx = −(φ/xx

)

/xx (6.47b)

ψ/xx = α−(ψ/xx

)

/xx (6.47c)

or

M φT/x ψT

/x

φ/x 0 0ψ/x 0 0

x

λ

c

=

f

−(φ/xx

)

/xx

α−(ψ/xx

)

/xx

(6.48)

As a consequence, the same structure of the inverse kinematic problems is achieved, and the last problemof Eq. (6.48) directly yields both accelerations and multipliers.

6.3.5 Underdetermined, Overcontrolled Problem

In this case, ψ(x) 6= ϑ(x), c < n− b, j = n− b, which implies c < j. This is the case, for example, of aninverse biomechanics problem, where each degree of freedom is a joint commanded by a set of muscles.The inverse kinematics problem is solved by prescribing the motion of some part (e.g. a hand or a foot) inorder to determine an ‘optimal’ (e.g. in terms of maximal ergonomy) motion. Then, an inverse dynamicsproblem is computed by freeing the part whose motion was initially prescribed, and by computing thetorque required by all joints.

Inverse Kinematics: Position and Velocity Subproblems

The constraint and its first derivative are dealt with as in Section 6.3.4.

25

Page 27: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Inverse Kinematics: Acceleration Subproblem

Constraint second derivative:

M (x− x0) + φT/xλ+ψT

/xµ = 0 (6.49a)

φ/xx = −(φ/xx

)

/xx (6.49b)

ψ/xx = α−(ψ/xx

)

/xx. (6.49c)

In analogy with the position constraint case, it corresponds to minimizing the quadratic form

Jx =1

2(x− x0)

TM (x− x0) , (6.50)

which can be augmented as well, resulting in

Jx =1

2(x− x0)

TM (x− x0) + wx

1

2(x− xprev)

TM (x− xprev) , (6.51)

to minimize the acceleration increment between two consecutive time steps. The corresponding problemis

(1 + wx)Mx+ φT/xλ+ψT

/xµ =Mx0 + wxMxprev (6.52a)

φ/xx = −(φ/xx

)

/xx (6.52b)

ψ/xx = α−(ψ/xx

)

/xx, (6.52c)

or

(1 + wx)M φT/x ψT

/x

φ/x 0 0ψ/x 0 0

x

λ

µ

=

Mx0 + wxMxprev

−(φ/xx

)

/xx

α−(ψ/xx

)

/xx

. (6.53)

Inverse Dynamics Subproblem

The inverse dynamics subproblem is identical to that of the fully determined, non-collocated case,Eq. (6.33).

Implementation

• during ‘position’ inverse kinematics substep:

– assemble φ/x and φT/x for passive constraints

– assemble ψ/x and ψT/x for prescribed motion

– assemble equations related to ϑ/x as c = 0 to neutralize them

– assemble dummy springs

– optionally assemble mass matrix contribution weighted by w/x

• during ‘velocity’ inverse kinematics substep:

– assemble φ/x and φT/x for passive constraints

– assemble ψ/x and ψT/x for prescribed motion

26

Page 28: MBDyn Theory and Developer’s Manual Version 1.X-Devel

– assemble equations related to ϑ/x as c = 0 to neutralize them

– assemble dummy dampers

– optionally assemble mass matrix contribution weighted by w/x

• during ‘acceleration’ inverse kinematics substep:

– assemble φ/x and φT/x for passive constraints

– assemble ψ/x and ψT/x for prescribed motion

– assemble equations related to ϑ/x as c = 0 to neutralize them

– assemble mass matrix contribution, optionally weighted by (1 + w/x)

• during inverse dynamics substep:

– assemble φ/x and φT/x for passive constraints

– assemble ϑ/x and ϑT/x for torques

– assemble equations related to ψ/x as µ = 0 to neutralize them

– assemble other elements (external forces, springs, etc.)

27

Page 29: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 7

Data Structure

(This chapter is a mess.)

7.1 Constitutive Laws

Code that uses constitutive laws requires

f = f (ǫ, ǫ, t, . . .) (7.1)

where f can be 1, 3, and 6 dimensional. Similarly, ǫ and ǫ respectively are 1, 3, and 6 dimensional(scalar, Vec3, and Vec6).

The ConstitutiveLaw provides

GetF() = f (ǫ, ǫ, t, . . .) (7.2a)

GetFDE() =∂f

∂ǫ(7.2b)

GetFDEPrime() =∂f

∂ǫ(7.2c)

The values returned by these methods are updated by a call to Update().

7.2 ExpandableRowVector

ExpandableRowVector is a class that supports the computation of nested Jacobian matrices.Consider a scalar y that depends on a set of variables k, namely y = y (k). The generic variable ki,

in turn, may be directly a subset of the variables of the problem, x, with ki = xj , or depend on themeither directly, namely ki = ki (x), or indirectly, namely ki = ki (k

′ (x)) and so on, with as many levelsof recursion as needed, namely

∂y

∂xj=∑

i

∂y

∂ki

i′

∂ki∂k′i′

. . .∑

j

∂k(n)

i(n)

∂xj

. (7.3)

The computation of the contribution of y to the Jacobian matrix of the problem requires the capabilityto assemble the partial derivatives of y with respect to the variables x in the appropriate locations.

The ExpandableRowVector allows to associate each partial derivative of y with respect to the variablesk it depends on, namely y/ki

, to either

28

Page 30: MBDyn Theory and Developer’s Manual Version 1.X-Devel

a) its index, if ki is directly a variable of the problem, ki → xj , or

b) to another ExpandableRowVector that contains the partial derivatives of the corresponding ki withrespect to the variables it depends on.

Since the assembly of the contributions to the Jacobian matrix of the problem is usually done usingsubmatrices, within an element the association between a coefficient and a problem variable is not donebased on the absolute numbering of the variable, but rather on a local numbering within the submatrix.The submatrix in turn will take care of mapping local indexing to global indexing when it is assembledto the global Jacobian matrix of the problem.

When the variable ki directly corresponds to the problem variable xj , the ExpandableRowVector

provides a method to associate one of its elements to the problem variable indexing within the submatrix.So, if ki → xj , and the global index j corresponds to index ip in the submatrix,

v.Set(y/ki, i, ip)

simultaneously sets the value y/kiand the variable subindex ip of the i-th element of vector v.

Alternatively, the method

v.SetIdx(i, ip)

associates the variable subindex ip to the i-th element of the vector.When ki is a function of a set of variables, and its partial derivatives with respect to those variables

are stored in another ExpandableRowVector w, the method

v.Link(i, &w)

allows to associate vector w to the i-th element of vector v.As soon as v is assembled, it can be contributed to a specific equation (row) of a Jacobian matrix.For example, calling the method

void

Add(FullSubMatrixHandler& WM,

const integer eq,

const doublereal c = 1.) const

of vector v corresponds to

for (integer j = 1; j <= n; j++)

WM(eq, idx(j)) += c*v(j);

where idx is the vector that contains the submatrix indexes of the elements of v, as set by the SetIdx()method.

If another ExpandableRowVector is linked to the i-th element of vector v, the related operation onthe submatrix is propagated recursively as

for (integer j = 1; j <= n; j++)

if ( /* linked to another ExpandableRowVector */ )

// propagate operation

xm(j)->Add(WM, eq, c*v(j));

else

WM(eq, idx(j)) += c*v(j);

29

Page 31: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where xm is the container of the pointers to the linked ExpandableRowVector.Blocks of equations can be added simultaneously using the method

void

Add(FullSubMatrixHandler& WM,

const std::vector<integer>& eq,

const std::vector<doublereal>& cc,

const doublereal c = 1.) const

The same operation illustrated above is performed on each equation whose subindex is stored in thearray eq, weighed by the coefficients stored in the array cc.

A similar method allows to build a subvector. Its use is currently undocumented.

Example.

ExpandableRowVector v(4);

ExpandableRowVector w(2);

FullSubMatrixHandler m(6, 9);

w.Set(10., 1, 8);

w.Set(20., 2, 9);

v.Set(1., 1, 4);

v.Set(2., 2, 5);

v.Set(3., 3, 6);

v.Set(10., 4);

v.Link(4, &w);

v.Add(m, 5, 1.);

// col. 1 2 3 4 5 6 7 8 9

// m(5, :) = 0., 0., 0., 1., 2., 3., 0., 100., 200.

std::vector<integer> eq(3);

std::vector<doublereal> cc(3);

eq[0] = 1; cc[0] = 1.;

eq[1] = 2; cc[1] = 2.;

eq[2] = 3; cc[2] = 3.;

v.Add(m, eq, cc, 1.);

// col. 1 2 3 4 5 6 7 8 9

// m(1, :) = 0., 0., 0., 1., 2., 3., 0., 100., 200.

// m(2, :) = 0., 0., 0., 2., 4., 6., 0., 200., 400.

// m(3, :) = 0., 0., 0., 3., 6., 9., 0., 300., 600.

30

Page 32: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 8

Nodes

8.1 Structural Nodes

Structural nodes provide the kinematics unknowns and the corresponding equilibrium equations.

8.1.1 Dynamic Structural Nodes

The dynamic structural node also provides momentum and momenta moment unknowns, and the equa-tions that represent their definition in terms of the inertia properties and the node’s kinematics:

β = mxCM

= m (x+ ω × b)= mx+ ω × s (8.1a)

γ = γCM + b× β= JCMω + b× β= s× x+ Jω, (8.1b)

where

b =s

m(8.2)

is the distance between the node and the CM of the body, which is constant in the reference frame ofthe node for a rigid body, and J = JCM +mb× b× T .

The contribution to the equations of motion (Newton-Euler) is

fin = β (8.3a)

min = γCM + b× fin= γ − (ω × b)× β= γ −m (ω × b)× (x+ ω × b)= γ +mx× (ω × b)= γ +mx× (x+ ω × b)= γ + x× β (8.3b)

31

Page 33: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The perturbation of the momentum and momenta moment definitions yields

δβ = mδx− s× δω − ω × s× θδ (8.4a)

δγ = s× δx+ Jδω + (x× s× − (Jω)× + Jω × )θδ (8.4b)

The perturbation of the inertia force and moment yields

δfin = δβ (8.5a)

δmin = δγ − β × δx+ x× δβ (8.5b)

Accelerations

Since momentum and momenta moments are used as the unknowns that take care of inertia, linear andangular accelerations are not directly available from the simulation. They are computed, on demand, aspostprocessing from the derivatives of the definitions of the momentum and the momenta moment.

The differentiation of Equations (8.1) yields

β = mx+ ω × s+ ω × ω × s (8.6a)

γ = (ω × s)× x+ s× x+ ω × Jω + Jω. (8.6b)

As a consequence, the linear and angular accelerations are computed as

ω = J−1CM

(

γ − b× β + x× β − ω × JCMω)

(8.7)

x =1

m

(

β − ω × s− ω × ω × s)

=

(

1

mI + b×T J−1CMb×

)

β − b×T J−1CMγ − b×T J−1CM (x× β − ω × JCMω) , (8.8)

namely

x

ω

=M−1

β

γ

+

[−b×T

I

]

J−1CM (x× β − ω × JCMω) (8.9)

Note on the inverse of the mass matrix

The mass matrix is

M =

[mI s× T

s× J

]

(8.10)

Its inverse is

M−1 =

(mI − s× TJ−1s×

)−1 − 1

ms× T

(

J − 1

ms× s× T

)−1

− 1

m

(

J − 1

ms× s× T

)−1

s×(

J − 1

ms× s× T

)−1

=

1

mI + b× TJ−1CMb× −b× TJ−1CM

−J−1CMb× J−1CM

. (8.11)

32

Page 34: MBDyn Theory and Developer’s Manual Version 1.X-Devel

In fact, according to the matrix inversion lemma,

(mI − s× TJ−1s×

)−1=

1

mI + b× TJ−1CMb× (8.12)

(NOTE: simplifications when using updated-updated formulas).

Perturbation of momentum and momenta moment derivatives

According to Eqs. (8.4), the perturbation of the linear and angular velocity is

δxδω

=M−1

(δβδγ

−[

−ω × s×x× s× − (Jω)× + Jω ×

]

θδ

)

(8.13a)

The perturbation of the momentum and momenta moment derivatives is

δβ = mδx− s× δω − (ω × s)× δω − ω × s× δω − ω × s× θδ − ω × ω × s× θδ (8.14a)

δγ = s× δx+ Jδω + (ω × s)× δx+ x× s× δω + ω × Jδω − (Jω)× δω

+ x× ω × s× θδ + x× s× θδ − ω × (Jω)× θδ + ω × Jω × θδ − (Jω)× θδ + Jω × θδ.(8.14b)

As a consequence,

δxδω

=M−1

(

β

γ

−[

0(ω × s)×

]

δx−[

− (ω × s)× − ω × s×x× s× + ω × J − (Jω)×

]

δω

−[

−ω × s× − ω × ω × s×x× ω × s× + x× s× − ω × (Jω)× + ω × Jω × − (Jω)× + Jω ×

]

θδ

)

(8.15)

(NOTE: simplifications when using updated-updated formulas).

Variable Mass Momentum:

β = mxCM (8.16)

with

xCM = x+ ω × b+R ˙b. (8.17)

β = mxCM + mxCM (8.18)

Eq. (8.3a) becomes

fin = β − mxCM. (8.19)

Only the portion of β related to the change in mass is subtracted from the inertia forces; the portion

related to the change in mass distribution,˙b, is retained.

Momenta moment:

γ = γCM + b× β= JCMω + b×mxCM (8.20)

33

Page 35: MBDyn Theory and Developer’s Manual Version 1.X-Devel

γCM = ω × JCMω + JCMω +(JCM variable geometry/t + JCM variable mass/t

)ω (8.21)

γ = γCM + b× β + b× β= ω × JCMω + JCMω +

(JCM variable geometry/t + JCM variable mass/t

+(

ω × b+R ˙b)

× β + b× (mxCM + mxCM) (8.22)

Inertia moment of the whole body

min = γCM + b× β= γ − b× β= ω × JCMω + JCMω +

(JCM variable geometry/t + JCM variable mass/t

+ b× (mxCM + mxCM) (8.23)

Inertia moment of the whole body minus the mass that is lost

min = γ − b× β − JCM variable mass/tω − b× mxCM (8.24)

Only the portion of γ related to the change in mass is subtracted from the inertia forces; the portionrelated to the change in mass distribution, JCM variable geometry/t, is retained.

Actually, in the constant mass code, the term b× β is written as −v × β, exploiting its structure:

b× β = m (ω × b)× (v + ω × b)= m (ω × b)× v= m (v + ω × b)× v= β × v (8.25)

In the variable mass case, this can be written as

b× β = m(

ω × b+R ˙b)

×(

v + ω × b+R ˙b)

= β × v +m(

R˙b)

×(

v + ω × b+R ˙b)

+m (ω × b)×R ˙b

= β × v +m(

R˙b)

× v (8.26)

The correction term β×v is already applied to the equations of motion by the AutomaticStructuralElem

element associated to the underlying node; the correction term m(

R˙b)

× v must be explicitly applied

by the DynamicVariableBody element.

Linearization: currently the DynamicVariableBody element does not contribute to the Jacobianmatrix with respect to the variable inertia properties; only the original contribution of the constantinertia properties element is provided. This implies that the residual is exact to the required tolerance,while the Jacobian matrix is not; convergence should not be compromised as soon as moderate inertiavariations are used.

8.1.2 Static Structural Nodes

Static structural nodes represent a degeneration of the dynamic ones, when the inertia is structurallynull. In that case, no momentum nor momenta moment definition equations are instantiated, and theirderivatives are always null. As a consequence, static nodes only instantiate their equilibrium equations.

34

Page 36: MBDyn Theory and Developer’s Manual Version 1.X-Devel

8.1.3 Dummy Nodes

Dummy nodes are special structural nodes that do not directly participate in the analysis. In fact, theydo not provide degrees of freedom; they rather present information associated to other structural nodesin a different manner, which is output in the .mov file much like if they were regular nodes.

Offset Dummy Node. The offset dummy structural node outputs the configuration of a referenceframe that is rigidly offset from a base node (subscript b) by bh and oriented by matrix Rh according tothe transformation

x = xb +Rbbh (8.27a)

R = RbRh (8.27b)

x = xb + ωb ×Rbbh (8.27c)

ω = ωb (8.27d)

x = xb + (ωb × + ωb × ωb × )Rbbh (8.27e)

ω = ωb (8.27f)

Reference Frame Dummy Node. The reference frame dummy structural node outputs the con-figuration of the base node (subscript b) in the reference frame of a reference node (subscript r), optionallyoffset by bh and with an orientation relative to r provided by matrix Rh, according to the transformation

x = RTh

(RT

r (xb − xr)− bh)

(8.28a)

R = RThR

Tr Rb (8.28b)

x = RThR

Tr (xb − xr − ωr × (xb − xr)) (8.28c)

ω = RThR

Tr (ωb − ωr) (8.28d)

x = RThR

Tr (xb − xr − (ωr × + ωr × ωr × ) (xb − xr)− 2ωr × (xb − xr)) (8.28e)

ω = RThR

Tr (ωb − ωr − ωr × ωb) (8.28f)

Pivot Reference Frame Dummy Node. The pivot reference frame dummy node is a variantof the reference frame dummy node that outputs the configuration of the base node, expressed in thereference frame of the reference node, as if it were attached to the pivot node (subscript p), optionallyoffset by bk and with an orientation relative to p provided by matrix Rk, according to the transformation

x = xp +Rp (Rkx+ bk) (8.29a)

R = RpRkR (8.29b)

˙x = xp + ωp ×Rp (Rkx+ bk) +RpRkx (8.29c)

ω = ωp +RpRkω (8.29d)

ˆx = xp + (ωp × + ωp × ωp × )Rp (Rkx+ bk) + 2ωp ×RpRkx+RpRkx (8.29e)

ˆω = ωp + ωp ×RpRkω +RpRkω (8.29f)

8.1.4 Relative Motion

MBDyn uses the absolute coordinates of the nodes, and their absolute orientation, to define the motion.Whenever the representation of the motion in a relative reference frame is required or convenient, itneeds to be computed from the absolute one that is computed inside the code.

35

Page 37: MBDyn Theory and Developer’s Manual Version 1.X-Devel

This is possible either run-time, by adding dummy structural nodes, or off-line, as a post-processing.For this purpose, the script abs2rel.awk is provided to convert the contents of the .mov file into thecorresponding motion relative to a given node.

Absolute motion as function of relative (tilde) and reference (0) motion:

R = R0R (8.30a)

x = x0 +R0x (8.30b)

ω = ω0 +R0ω (8.30c)

x = x0 + ω0 ×R0x+R0˙x (8.30d)

ω = ω0 + ω0 ×R0ω +R0˙ω (8.30e)

x = x0 + ω0 ×R0x+ ω0 × ω0 ×R0x+ 2ω0 ×R0˙x+R0

¨x (8.30f)

Relative motion (tilde) as function of absolute and reference (0) motion:

R = RT0R (8.31a)

x = RT0 (x− x0) (8.31b)

ω = RT0 (ω − ω0) (8.31c)

˙x = RT0 (x− x0 − ω0 ×R0x)

= RT0 (x− x0)−

(RT

0 ω0

)× x (8.31d)

˙ω = RT0 (ω − ω0 − ω0 ×R0ω)

= RT0 (ω − ω0)−

(RT

0 ω0

)× ω (8.31e)

¨x = RT0

(

x− x0 − ω0 ×R0x− ω0 × ω0 ×R0x− 2ω0 ×R0˙x)

= RT0 (x− x0)−

(RT

0 ω0

)× x

−(RT

0 ω0

)×(RT

0 ω0

)× x− 2

(RT

0 ω0

)× ˙x (8.31f)

Perturbation, assuming reference motion is imposed:

θδ = R0θδ (8.32a)

δx = R0δx (8.32b)

δω = R0δω (8.32c)

δx = ω0 ×R0δx+R0δ ˙x (8.32d)

δω = ω0 ×R0δω +R0δ ˙ω (8.32e)

δx = ω0 ×R0δx+ ω0 × ω0 ×R0δx+ 2ω0 ×R0δ ˙x+R0δ ¨x

= (ω0 × + ω0 × ω0 × )R0δx+ 2ω0 ×R0δ ˙x+R0δ ¨x (8.32f)

36

Page 38: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Perturbation, when reference motion is independent:

θδ = θ0δ +R0θδ (8.33a)

δx = δx0 + θ0δ ×R0x+R0δx

= δx0 − (R0x)× θ0δ +R0δx (8.33b)

δω = δω0 + θ0δ ×R0ω +R0δω

= δω0 − (R0ω)× θ0δ +R0δω (8.33c)

δx = δx0 + δω0 ×R0x+ ω0 × θ0δ ×R0x+ ω0 ×R0δx

+ θ0δ ×R0˙x+R0δ ˙x

= δx0 − (R0x)× δω0 −(

ω0 × (R0x)× +(

R0˙x)

×)

θ0δ

+ ω0 ×R0δx+R0δ ˙x (8.33d)

δω = δω0 + δω0 ×R0ω + ω0 × θ0δ ×R0ω + ω0 ×R0δω

+ θ0δ ×R0˙ω +R0δ ˙ω

= δω0 − (R0ω)× δω0 −(

ω0 × (R0ω)× +(

R0˙ω)

×)

θ0δ

+ ω0 ×R0δω +R0δ ˙ω (8.33e)

δx = δx0

+ δω0 ×R0x+ ω0 × θ0δ ×R0x+ ω0 ×R0δx

+ δω0 × ω0 ×R0x+ ω0 × δω0 ×R0x

+ ω0 × ω0 × θ0δ ×R0x+ ω0 × ω0 ×R0δx

+ 2δω0 ×R0˙x+ 2ω0 × θ0δ ×R0

˙x+ 2ω0 ×R0δ ˙x

+ θ0δ ×R0¨x+R0δ ¨x

= δx0 − (R0x)× δω0

−(

(ω0 ×R0x)× + ω0 × (R0x)× + 2(

R0˙x)

×)

δω0

−(

(ω0 × + ω0 × ω0 × ) (R0x)× + 2ω0 ×(

R0˙x)

× +(

R0¨x)

×)

θ0δ

+ (ω0 × + ω0 × ω0 × )R0δx+ 2ω0 ×R0δ ˙x+R0δ ¨x (8.33f)

8.1.5 Motion Expressed in a Relative Reference Frame

An alternative, useful case is given by representing the absolute motion in a relative reference frame:

R = RT0R (8.34a)

x = RT0 (x− x0) (8.34b)

ω = RT0 ω (8.34c)

x = RT0 x (8.34d)

ω = RT0 ω (8.34e)

x = RT0 x (8.34f)

37

Page 39: MBDyn Theory and Developer’s Manual Version 1.X-Devel

8.1.6 Dynamics in a Relative Reference Frame

The rationale is that MBDyn is based on the assumption that the kinematics of the nodes and theirequations of motion are formulated in the global reference frame. However, in some cases one may wantto express the motion of the nodes in a relative reference frame.

The following discussion is intended to modify the inertial contribution to the equilibrium in orderto reformulate the dynamical problem in a relative reference frame, whose motion is imposed. Theconstraints and the deformable components are unaffected, as they already intrinsically based on relativekinematics.

Momentum and momenta moments

β = mx0 + ω0 × s0 +R0β (8.35a)

γ = s× (x0 + ω0 ×R0x) + Jω0 +R0γ (8.35b)

where

s0 = R0s0 (8.36)

s0 = s+mx (8.37)

s = R0s (8.38)

J = R0JRT0 (8.39)

Momentum and momenta moments derivative

β = mx0 + (ω0 × + ω0 × ω0 × )R0s0 + 2ω0 ×R0β +R0˙β (8.40a)

γ = s× (x0 + ω0 ×R0x)

+ s×(

x0 + (ω0 × + ω0 × ω0 × )R0x+ ω0 ×R0˙x)

+ ω0 × Jω0 + Jω0 +R0

(

ω × J − Jω ×)

RT0 ω0

+ ω0 ×R0γ +R0˙γ (8.40b)

Inertia forces and moments projected in the relative frame

f in = RT0 β

= mx0 +(ω0 × + ω0 × ω0 ×

)s0 + 2ω0 × β +

˙β︸︷︷︸

relative momentum

(8.41a)

min = RT0 (γ + x× β)

= s×(

x0 +(ω0 × + ω0 × ω0 ×

)x+ ω0 × ˙x

)

+ ω0 × Jω0 + J ω0 +(

ω × J − Jω ×)

ω0

+ ˙x× ω0 × s+ ω0 × γ + ˙x× β + ˙γ︸ ︷︷ ︸

relative momenta moment

(8.41b)

The contributions

f∗

in = 2ω0 × β +˙β (8.42a)

m∗in = ω0 × γ + ˙x× β + ˙γ (8.42b)

38

Page 40: MBDyn Theory and Developer’s Manual Version 1.X-Devel

belong to the automatic structural element associated to each dynamic node. As such, they arecomputed once for all irrespective of the number of rigid bodies that are connected to the node. Theremaining contributions are computed by each rigid body.

Perturbation, assuming reference motion is imposed:

δf in =(ω0 × + ω0 × ω0 ×

) (

mδx− s× θδ)

(8.43a)

+ 2ω0 × δβ + δ˙β (8.43b)

δmin =((

x0 +(ω0 × + ω0 × ω0 ×

)x+ ω0 × ˙x

)

× s×

+ (ω0 + ω)×(

Jω0 × −(

Jω0

)

×)

+ J(ω0 + ω0 × ω

)× −

(

J(ω0 + ω0 × ω

))

×

− ˙x× ω0 × s×)

θδ

+(

Jω0 × −(

Jω0

)

×)

δω

+ s×(ω0 × + ω0 × ω0 ×

)δx

+(

s× ω0 × − (ω0 × s)× − β ×)

δ ˙x

+ ω0 × δγ + ˙x× δβ + δ ˙γ (8.43c)

To summarize:

δf in

δmin

=

[I 00 I

]

δ˙β

δ ˙γ

+

[2ω0 × 0˙x× ω ×

]

δβδγ

+

[0 0

(

s× ω0 × − (ω0 × s)× − β ×) (

Jω0 × −(

Jω0

)

×)

]

δ ˙xδω

+

[m(ω0 × + ω0 × ω0 ×

)

s×(ω0 × + ω0 × ω0 ×

)

]

δx

+

−(ω0 × + ω0 × ω0 ×

)s×

(

x0 +(ω0 × + ω0 × ω0 ×

)x+ ω0 × ˙x

)

× s×− ˙x× ω0 × s× + ω ×

(

Jω0 × −(

Jω0

)

×)

+J(ω0 + ω0 × ω

)× −

(

J(ω0 + ω0 × ω

))

×

θδ (8.44)

8.1.7 Airstream Velocity

Aerodynamic elements need the absolute velocity of specific points in order to evaluate the boundaryconditions for the computation of the aerodynamic forces.

The velocity of the airstream at a given absolute location x is

vas = vas(x, t) , (8.45)

which results from the superimposition of a time-dependent airstream velocity and of a time- and space-dependent gust velocity,

vas = vas0(t) + vg(x, t) . (8.46)

39

Page 41: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The velocity of point x with respect to the air at point x itself is thus

va = x− vas. (8.47)

When the motion of the point is expressed in the relative reference frame, the position of the point isexpressed by Eq. (8.30d). The velocity of Eq. (8.47) becomes

va = x0 + ω0 ×R0x+R0˙x− vas. (8.48)

This velocity, projected in the relative reference frame, is

va = RT0 va

= x0 + ω0 × x+ ˙x− vas. (8.49)

When referring aerodynamic elements to the relative frame, the equivalent airstream speed is thus

vas equivalent = vas − x0 − ω0 × x, (8.50)

so that the velocity of the air at point x is computed as

va = ˙x− vas equivalent, (8.51)

in analogy with Eq. (8.47). This allows to confine the relative reference frame modification of theaerodynamic forces in the computation of the airstream velocity.

8.1.8 Implementation Notes

Kinematics

The relative reference frame dynamics is under development. In the current design, the whole model issubjected to a single relative reference frame. The “ground” is intended to be rigidly connected to therelative reference frame (e.g. all “pin” joints and the “clamp” joint). Deformable elements and kinematicconstraints do not discriminate between absolute and relative reference frame, since they only deal withthe relative kinematics of the nodes they connect.

The relative frame motion is delegated to the DataManager. The StructNode is responsible forproviding a pointer to a RigidBodyKinematics object that describes the relative frame motion.

The kinematic parameters received in input with the rigid body kinematics card in the control

data section are intended expressed in the global reference frame. Note however that the calls to theGet*() methods of the RigidBodyKinematics class return them in the relative reference frame, namelypre-multiplied by the transpose of the orientation matrix:

GetR() : R0 = exp (abs_orientation_vector× )

| abs_orientation (8.52a)

GetX() : x0 = RT0 abs_position (8.52b)

GetW() : ω0 = RT0 abs_angular_velocity (8.52c)

GetV() : x0 = RT0 abs_velocity (8.52d)

GetWP() : ω0 = RT0 abs_angular_acceleration (8.52e)

GetXPP() : x0 = RT0 abs_acceleration (8.52f)

40

Page 42: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Dynamics

The equations of motion (force and moment equilibrium) and the definitions of the momentum andmomenta moment are not altered.

The AutomaticStructElem element takes care of the portion of relative frame inertia forces thatdepends on the momentum and on the momenta moment. The DynamicBody element takes care ofthe remaining portion of relative frame inertia forces. The StaticBody element has been modifiedaccordingly.

Air Properties

The AirProperties element takes care of the relative frame motion in order to project the absolutereference frame airstream velocity into the relative reference frame, according to Section 8.1.7.

All other built-in aerodynamic elements should naturally inherit the correct air velocity at the refer-ence points.

Future Development

Future development may allow to have multiple relative reference frame submodels, connected to eachother and to the absolute reference frame submodel, if any, by dedicated algebraic constraints.

8.1.9 Pseudo-Velocities Approach

NOTE: this is not currently implemented, nor foreseen.The pseudo-velocities approach consists in replacing the momentum and momenta moment definitions

with the definitions of the angular and linear velocities,

v = x (8.53a)

ω = ax(

RRT)

(8.53b)

An advantage is that this approach allows an easier implementation of constraint stabilization.Kinematics:

R := node orientation matrix (8.54a)

x := node position (8.54b)

Angular and linear velocity, ω and v:

ω = ax(

RRT)

(8.55a)

v = x (8.55b)

Inertia forces and moments:

fin = mvCM (8.56a)

min = ω × JCMω + JCMω + s× vCM (8.56b)

41

Page 43: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where

s static moment with respect to the node position (8.57a)

JCM inertia tensor with respect to the center of mass (8.57b)

xCM = x+1

ms position of the center of mass (8.57c)

vCM = v +1

mω × s velocity of the center of mass (8.57d)

vCM = v +1

m(ω × + ω × ω × ) s (8.57e)

Perturbation

δs = θδ × s (8.58a)

δJCM = θδ × JCM − JCMθδ × (8.58b)

δxCM = δx+1

mδs

= δx− 1

ms× θδ (8.58c)

vCM = δv +1

mδω × s+ 1

mω × δs

= δv − 1

ms× δω − 1

mω × s× θδ (8.58d)

δvCM = δv +1

m(δω × s+ δω × ω × s+ ω × δω × s+ (ω × + ω × ω × ) δs)

= δv − 1

ms× δω − 1

m((ω × s)× + ω × s× ) δω

− 1

m(ω × + ω × ω × ) s× θδ (8.58e)

Inertia forces and moments with respect to nodal quantities:

fin = mvCM

= mv + (ω × + ω × ω × ) s (8.59a)

min = ω × JCMω + JCMω + s× vCM

= s× v + Jω + ω × Jω (8.59b)

with

J = JCM − 1

ms× s× (8.60)

the inertia tensor with respect to the node.Perturbation:

δfin = mδv − s× δω − ((ω × s)× + ω × s× ) δω

− (ω × + ω × ω × ) s× θδ (8.61a)

δmin = s× δv + Jδω + (ω × J − (Jω)× ) δω

+ (ω × (Jω × − (Jω)× ) + Jω × − (Jω)× + v × s× )θδ (8.61b)

42

Page 44: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Relative frame kinematics:

R = R0R (8.62a)

x = x0 +R0x (8.62b)

ω = ω0 +R0ω (8.62c)

v = v0 + ω0 ×R0x+R0v (8.62d)

ω = ω0 + ω0 ×R0ω +R0˙ω (8.62e)

v = v0 + (ω0 × + ω0 × ω0 × )R0x+ 2ω0 ×R0v +R0˙v (8.62f)

Perturbation:

θδ = R0θδ (8.63a)

δx = R0δx (8.63b)

δω = R0δω (8.63c)

δv = ω0 ×R0δx+R0δv (8.63d)

δω = ω0 ×R0δω +R0δ ˙ω (8.63e)

δv = (ω0 × + ω0 × ω0 × )R0δx+ 2ω0 ×R0δv +R0δ ˙v (8.63f)

Relative frame kinematics projected in the relative frame:

R = R (8.64a)

x = RT0 x0 + x (8.64b)

ω = RT0 ω0 + ω (8.64c)

v = RT0 v0 + ω0 × x+ v (8.64d)

ω = RT0 ω0 + ω0 × ω + ˙ω (8.64e)

v = RT0 v0 +

(ω0 × + ω0 × ω0 ×

)x+ 2ω0 × v + ˙v (8.64f)

Perturbation projected in the relative frame:

θδ = θδ (8.65a)

δx = δx (8.65b)

δω = δω (8.65c)

δv = ω0 × δx+ δv (8.65d)

δω = ω0 × δω + δ ˙ω (8.65e)

δv =(ω0 × + ω0 × ω0 ×

)δx+ 2ω0 × δv + δ ˙v (8.65f)

Inertia forces and moments with respect to nodal quantities, in a relative frame:

f in = mvCM (8.66a)

min = s× vCM + ω × JCMω + JCMω (8.66b)

43

Page 45: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Perturbation

δf in = mδvCM

= mδ ˙v + 2mω0 × δv +m(ω0 × + ω0 × ω0 ×

)δx

− s× δ ˙ω − (s× ω0 × + ω × s× − (s× ω)× ) δω

−(ω × + ω × ω ×

)s× θδ (8.67a)

δmin = s× δvCM + δs× vCM

+ JCMδω +(

ω × JCM −(

JCMω)

×)

δω

+(

ω ×(

JCMω × −(

JCMω)

×)

+ JCMω × −(

JCMω)

×)

θδ

= s× δ ˙v

+ 2s× ω0 × δv

+ s×(ω0 × + ω0 × ω0 ×

)δx

+ Jδ ˙ω

+(

Jω0 × + ω × J −(

Jω)

×)

δω

+(

Jω × −(

Jω)

× + ω ×(

Jω × −(

Jω)

×)

+ v × s×)

θδ (8.67b)

To summarize:

δf in

δmin

=

[mI −s×s× J

]δ ˙v

δ ˙ω

+

[2mω0 × − (s× ω0 × + ω × s× − (s× ω)× )

2s× ω0 ×(

Jω0 × + ω × J −(

Jω)

×)

]δvδω

+

[m(ω0 × + ω0 × ω0 ×

)

s×(ω0 × + ω0 × ω0 ×

)

]

δx

+

[−(ω × + ω × ω ×

)s×

(

J ω × −(

Jω)

× + ω ×(

Jω × −(

Jω)

×)

+ v × s×)

]

θδ (8.68)

44

Page 46: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 9

Constraints

9.1 Algebraic Constraints

Consider a holonomic constraint equation of the form

φ (q, t) = 0 (9.1)

Its time derivative and perturbation yields

δd

dt

(µTφ

)= δµTφ+ δφT µ+ δµT φ+ δφTµ

= δµTφ+ δqTφT/qµ+ δµT

(φ/qq + φ/t

)

+(

δqTφT/q + δqT

(φ/qq + φ/t

)T

/q

)

µ

= δqTφT/qµ

+ δqT((φ/qq + φ/t

)T

/qµ+ φT

/qµ)

+ δµTφ

+ δµT(φ/qq + φ/t

)(9.2)

Its linearization yields

(

δd

dt

(µTφ

))

= δqT(

φT/q∆µ+

(

φT/qµ

)

/q∆q

)

+ δqT((φ/qq + φ/t

)T

/q∆µ+ φ/q∆µ+

(φ/q∆q

)T

/qµ

+((φ/qq + φ/t

)T

/qµ+ φT

/qµ)

/q∆q

)

+ δµTφ/q∆q

+ δµT(

φ/q∆q +(φ/qq + φ/t

)

/q∆q)

(9.3)

An unconstrained problem of the form

Mq − p = 0 (9.4a)

p = F (q, q, t) (9.4b)

45

Page 47: MBDyn Theory and Developer’s Manual Version 1.X-Devel

becomes

Mq − p+ φT/qµ = 0 (9.5a)

p+(φ/qq + φ/t

)T

/qµ+ φT

/qµ = F (q, q, t) (9.5b)

φ = 0 (9.5c)

φ/qM−1p+ φ/t = 0, (9.5d)

where q =M−1p has been used in Eq. (9.5d). Actually, µ is independent of µ; µ by definition is zeroif the exact solution is considered. So µ is redefined as µ = λ:

Mq − p+ φT/qµ = 0 (9.6a)

p+(φ/qq + φ/t

)T

/qµ+ φT

/qλ = F (q, q, t) (9.6b)

φ = 0 (9.6c)

φ/qM−1p+ φ/t = 0. (9.6d)

If µ = 0 then a conventional DAE of index 3 results, i.e.

Mq − p = 0 (9.7a)

p+ φT/qλ = F (q, q, t) (9.7b)

φ = 0, (9.7c)

while the previous form is known as stabilized index 2 form. The latter is typically used throughoutMBDyn, while the former is used in the initial assembly and, occasionally, in specific constraints.

9.1.1 Clamp Joint

The clamp joint (Clamp) imposes the position and the orientation of a node.

Files. It is implemented in filesmbdyn/struct/genj.h

mbdyn/struct/genj.cc

Definitions.

dc = x− x0 (9.8)

θc = ax(exp−1

(RRT

0

))(9.9)

Constraint Equation.

dc = 0 (9.10)

θc = 0 (9.11)

Perturbation.

δdc = δx (9.12)

δθc = Γ−1(θc)θδ (9.13)

46

Page 48: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Forces.

f = λ (9.14a)

m = Γ−T (θc)µdef= µ (9.14b)

Linearization.

0 00 0I 00 I

∆xθ∆

+

I 00 I

0 00 0

∆λ∆µ

= −

−λ−µ−dc−θc

(9.15)

since Γ(θc)θc = θc.

9.1.2 Distance Joint

The distance joint (DistanceJoint) imposes the distance between two nodes, which may depend on timeand other states of the problem.

Variants. There is a variant with offsets (DistanceJointWithOffset), discussed in Section 9.1.3.

Files. It is implemented in filesmbdyn/struct/distance.h

mbdyn/struct/distance.cc

Definitions.

d = x2 − x1 (9.16)

d =√dTd (9.17)

u =d

d(9.18)

Limitations.

d > 0 (9.19)

Constraint Equation.

d√uTu = d (9.20)

Forces.

F1 = αu (9.21a)

F2 = −αu (9.21b)

47

Page 49: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Linearization.

α

dI −α

dI −u

−αdI

α

dI u

−uT uT 0

δx1

δx2

δα

=

αu

−αu

d(

1−√uTu

)

(9.22)

Constraint Equation Derivative.

duT u = 0 (9.23)

Force Derivatives.

F1 = αu+ αu (9.24a)

F2 = −αu− αu (9.24b)

where

u =x2 − x1

d− u d

d(9.25)

Linearization.

α

dI

α

dI − α

dI −α

dI −u −u

− αdI −α

dI

α

dI

α

dI u u

−uT −uT uT uT 0 0

δx1

δx1

δx2

δx2

δαδα

=

αu+ αu

−αu− αu

duT u

(9.26)

9.1.3 Distance Joint With Offsets

The distance joint with offset (DistanceJointWithOffset) imposes the distance between two points thatrigidly offset from the respective nodes. It is a variant of the distance joint (DistanceJoint) discussedin Section 9.1.2.

Files. It is implemented in filesmbdyn/struct/distance.h

mbdyn/struct/distance.cc

Definitions.

d = x2 + b2 − x1 − b1 (9.27)

d =√dTd (9.28)

u =d

d(9.29)

Limitations:

d > 0 (9.30)

48

Page 50: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Constraint equation

d√uTu = d (9.31)

Forces:

F1 = αu (9.32a)

M1 = αb1 × u (9.32b)

F2 = −αu (9.32c)

M2 = −αb2 × u (9.32d)

Linearization:

α

dI −α

db1 × −α

dI

α

db2 × −u

α

db1 × −α

d(b1 + d)× b1 × −α

db1 ×

α

db1 × b2 × −b1 × u

−αdI

α

db1 ×

α

dI −α

db2 × u

−αdb2 ×

α

db2 × b1 ×

α

db2 × −α

d(b2 − d)× b2 × b2 × u

−uT − (b1 × u)T uT (b2 × u)T 0

δx1

δg1δx2

δg2δα

=

αuαb1 × u−αu

−αb2 × ud(

1−√uTu

)

(9.33)

Constraint Equation Derivative

duT u = 0 (9.34)

Forces:

F1 = αu+ αu (9.35a)

M1 = α (ω1 × b1)× u+ αb1 × u+ αb1 × u (9.35b)

F2 = −αu− αu (9.35c)

M2 = −α (ω2 × b2)× u− αb2 × u− αb2 × u (9.35d)

Linearization: TODO c©.

9.1.4 Spherical hinge

The spherical hinge joint (SphericalHingeJoint) constrains the positions of two points, that may berigidly offset from two nodes, to be coincident.

Variants. There exists a pinned version (SphericalPinJoint, TODO c©).

49

Page 51: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Files. It is implemented in filesmbdyn/struct/spherj.h

mbdyn/struct/spherj.cc

Joint data.

b1, b2 (9.36)

where:b1, b2 offset of connection point from nodes 1, 2 in node reference;

Constraint equations (normalized1 by dCoef)

(x2 + b2)− (x1 + b1) = 0 (9.37)

where:x1, x2 position of nodes 1, 2;R1, R2 orientation of nodes 1, 2.

b1 = R1b1, b2 = R2b2 offset of connection point from nodes 1, 2 in global frameResidual vector:

node1 momentum : 1− 3 − = F

node1 angular momentum : 4− 6 − = (R1 · d1)× Fnode2 momentum : 7− 9 + = F

node2 angular momentum : 10− 12 + = (R2 · d2)× Fconstraint : 13− 15 = ((x1 +R1 · d1)− (x2 +R1 · d2))/dCoef

where:F constraint reaction force.

9.1.5 Revolute hinge

The revolute hinge joint (PlaneHingeJoint) constrains the positions of two points, that may be rigidlyoffset from two nodes, to be coincident. It also constrains their orientations to keep the respective axis3 parallel.

Variants. There exist a pinned version (RevolutePinJoint, TODO c©), a version that does not con-strain the position (RevoluteRotationJoint), and a version which imposes the relative angular velocityabout axis 3 (AxialRotationJoint).

Files. It is implemented in filesmbdyn/struct/planej.h

mbdyn/struct/planej.cc

Joint data.

d1,d2,Rh1,Rh2 (9.38)

where:d1, d2: offset of nodes 1,2 in node reference;

1When purely algebraic constraints are considered, to improve the scaling of the matrix, the constraint equation can bedivided by dCoef, the coefficient related to the integration method illustrated in Equation (6.19).

50

Page 52: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Rh1, Rh2: joint relative orientation wrt. nodes 1,2 (FIXME).

Constraint equations (normalized by dCoef)

(x1 +R1 · d1)− (x2 +R1 · d2) = 0

(R1 ·Rh1)[3] · (R2 ·Rh2)[2] = 0

(R1 ·Rh1)[3] · (R2 ·Rh2)[1] = 0

where:x1, x2: positions of nodes 1,2;R1, R2: orientation of nodes 1, 2.

Residual vector:

node1 momentum : 1− 3 − = F

node1 angular momentum : 4− 6 − = (R1 · d1)× F +

(R2 ·Rh2)[2]× (R1 ·Rh1)[3] ∗M [1] +

(R1 ·Rh1)[3]× (R2 ·Rh2)[1] ∗M [2]

node2 momentum : 7− 9 + = F

node2 angular momentum : 10− 12 + = (R2 · d2)× F +

(R2 ·Rh2)[2]× (R1 ·Rh1)[3] ∗M [1] +

(R1 ·Rh1)[3]× (R2 ·Rh2)[1] ∗M [2]

constraint : 13− 15 = ((x1 +R1 · d1)− (x2 +R1 · d2))/dCoefconstraint : 16 = ((R1 ·Rh1)[3] · (R2 ·Rh2)[2])/dCoef

constraint : 17 = ((R1 ·Rh1)[3] · (R2 ·Rh2)[1])/dCoef

where:F : constraint reaction force;M : constraint moment reaction (third component null).

Friction:

• add third component of constraint moment M

• add a constraint equation; this could be one of the following:

– direct definition of M [3] in function of relative velocity, friction coefficient and F

– impose null relative velocity

• optionally add internal states dynamic z (for friction)

51

Page 53: MBDyn Theory and Developer’s Manual Version 1.X-Devel

add third component of constraint moment M

Residual vector:

node1 momentum : 1− 3 − = F

node1 angular momentum : 4− 6 − = (R1 · d1)× F +

(R2 ·Rh2)[2]× (R1 ·Rh1)[3] ∗M [1] +

(R1 ·Rh1)[3]× (R2 ·Rh2)[1] ∗M [2] +

(R1 ·Rh1)[3] ∗M [3]

node2 momentum : 7− 9 + = F

node2 angular momentum : 10− 12 + = (R2 · d2)× F +

(R2 ·Rh2)[2]× (R1 ·Rh1)[3] ∗M [1] +

(R1 ·Rh1)[3]× (R2 ·Rh2)[1] ∗M [2] +

(R1 ·Rh1)[3] ∗M [3]

constraint : 13− 15 = ((x1 +R1 · d1)− (x2 +R1 · d2))/dCoefconstraint : 16 = ((R1 ·Rh1)[3] · (R2 ·Rh2)[2])/dCoef

constraint : 17 = ((R1 ·Rh1)[3] · (R2 ·Rh2)[1])/dCoef

friction : 18 = M [3]− f(F , v, friction coef)

= (rel velocity)[3]

(optional) friction states : 19... = z − g(z, v)

where v is the relative velocity v = r ∗ (ω1 − ω2) · (R1 ·Rh1)[3]. The constraint is based on positions.This means that during integration (ω1 − ω2) will NOT have exactly the direction (R1 ·Rh1)[3]. Wechoose to disregard this error. The friction moment should be along (R1 ·Rh1)[3].r is the joint radius.CHECK THIS!!!Explicit form of friction moment contribution (FIXME: remove vector (R1 · Rh1)[3] and write scalarequation???):f(F , rel velocity): M [3] = sh c(||F ||, fc(v, z, z)) ∗ (R1 ·Rh1)[3] ∗ ||F || ∗ fc(v, z, z),with Rh1 constant.Variation of friction moment contribution:

δ(M [3](R1 ·Rh1)[3]) = M [3] ∗ (Rδ1 ×R1)[3] +

(R1 ·Rh1)[3]) ∗ δM [3]

= M [3] ∗RT1 · (Rδ1×)[3] +

(R1 ·Rh1)[3]) ∗ δM [3]

52

Page 54: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Variation of friction moment contribution component:

δM [3] = sh c(||F ||, fc(v, z, z)) ∗ fc(v, z, z) ∗F

||F || · δF +

sh c(||F ||, fc(v, z, z)) ∗ (R1 ·Rh1)[3] ∗ ||F || ∗ ∂fc∂v

∗ δv +

||F || ∗ fc(v, z, z) ∗∂sh c(||F ||, fc(v, z, z))

∂||F ||∂||F ||∂F

· δF +

||F || ∗ fc(v, z, z) ∗∂sh c(||F ||, fc(v, z, z))

∂fc(v, z, z)∗ ∂fc∂v

∗ δv

=

sh c(||F ||, fc(v, z, z)) ∗ fc(v, z, z) F||F ||||F || ∗ fc(v, z, z) ∗ ∂sh c(||F ||, fc(v, z, z))

∂||F ||

· δF +

(sh c(||F ||, fc(v, z, z)) ∗ ||F ||||F || ∗ fc(v, z, z) ∗ ∂sh c(||F ||, fc(v, z, z))

∂fc(v, z, z)

)

∂fc∂v

∗ δv∂fc∂z

∗ δz∂fc∂z

∗ δz

where

• v = r ∗ (ω1 − ω2) · (R1 ·Rh1)[3] so that

δv = d ∗ (R1 ·Rh1)[3] · (δω1 − δω2) +

d ∗ (ω1 − ω2) · (Rδ1 ×R1 ·Rh1)[3]

= d ∗ (R1 ·Rh1)[3] · (δω1 − δω2) +

d ∗ (ω1 − ω2) ·RTh1 ·RT

1 · (Rδ1×)[3]

• sh c(||F ||, fc(v, z, z)) = r ∗ Cα(α(constants, fc(v, z, z), ||F ||, fc(v, z, z))) 1√

1 + f2c (v, z, z)

• α(constants, fc(v, z, z), ||F ||, fc(v, z, z)) = sin−1

(√

2 ∗ 31 ∗ ||F ||E ∗ b ∗

1 + f2c (v, z, z)

r′/rr′ − r

)

• for very low joint loads (angle of contact α < 20o, i.e. about less that 1% of the joint allowableload) we can safely assume Cα ≈ 1 so that

sh c(||F ||, fc(v, z, z)) ≈ r ∗ 1√

1 + f2c (v, z, z),

∂sh c(||F ||, fc(v, z, z))∂||F || = 0

and∂sh c(||F ||, fc(v, z, z))

∂fc(v, z, z)= −r ∗ (1 + f2c (v, z, z))

−3/2 ∗ fc(v, z, z)

9.1.6 Inline

This joint forces a point rigidly attached to node b to slide along a line rigidly attached to node a, thusremoving 2 degrees of freedom.

53

Page 55: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Files. It is implemented in filesmbdyn/struct/inline.h

mbdyn/struct/inline.cc

Definitions. Orientation of line

Rv = RaRv (9.39)

the axis is along local axis 3 of matrix Rv, e3, while directions e1, e2 are constrained.Origin of line

xp = xa + p = xa +Rap (9.40)

Sliding point

xq = xb + q = xb +Rbq (9.41)

Constraint equations: distance between sliding point xq and axis null in local directions e1, e2,namely

eTi d = 0, (9.42)

with i = 1, 2 and d = xq − xp. After simple manipulation,

eTi (xb + q − xa)− eTi p = 0. (9.43)

Perturbation:

(ei × (xb + q − xa))Tθaδ + e

Ti (δxb − q × θbδ − δxa) = 0 (9.44)

Forces and moments:

fa = −∑

i=1,2

eiλi (9.45a)

ma =∑

i=1,2

ei × (xb + q − xa)λi (9.45b)

fb =∑

i=1,2

eiλi (9.45c)

mb = −∑

i=1,2

ei × qλi (9.45d)

Linearization

[

−eTi (ei × (xb + q − xa))T

eTi − (ei × q)T]

δxa

θaδδxb

θbδ

= 0 (9.46)

54

Page 56: MBDyn Theory and Developer’s Manual Version 1.X-Devel

δfa = −∑

i=1,2

(eiδλi − λiei × θaδ) (9.47a)

δma =∑

i=1,2

(ei × (xb + q − xa) δλi + λi (xb + q − xa)× ei × θaδ + λiei × (δxb − q × θbδ − δxa))

(9.47b)

δfb =∑

i=1,2

(eiδλi − λiei × θaδ) (9.47c)

δmb = −∑

i=1,2

(ei × qδλi + λiq × ei × θaδ − λiei × q × θbδ) (9.47d)

or

δfaδma

δfbδmb

=

−e1 −e2e1 × (xb + q − xa) e2 × (xb + q − xa)

e1 e2−e1 × q −e2 × q

δλ1δλ2

+

0∑

i=1,2 λiei × 0 0

−∑i=1,2 λiei ×∑

i=1,2 λi (xb + q − xa)× ei ×∑

i=1,2 λiei × −∑i=1,2 λiei × q ×0 −∑i=1,2 λiei × 0 0

0 −∑i=1,2 λiq × ei × 0∑

i=1,2 λiei × q ×

δxa

θaδδxb

θbδ

(9.48)

9.1.7 Drive Hinge

This joint (DriveHingeJoint) forces two nodes to assume a relative orientation given by a rotation vectorθ, whose direction with respect to node 1 represents the rotation axis, and whose amplitude representsthe magnitude of the rotation.

Variants. There exist no variants, although a pinned version may be of use (TODO c©).

Files. It is implemented in filesmbdyn/struct/drvhinge.h

mbdyn/struct/drvhinge.cc

Definitions.

Rrel = RT1R2

θ = ax(exp−1 (Rrel)

)

Limitations:

‖θ‖ < π (9.49)

Constraint equation

θ − θ0 = 0 (9.50)

Couples:

M1 = −R1α

M2 = R1α

55

Page 57: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Linearization:

(R1α)× 0 −R1

− (R1α)× 0 R1

−Γ (θ)−1RT

1 Γ (θ)−1RT

1 0

δg1δg2δα

=

R1α

−R1α

θ0 − θ

(9.51)

The linearization of the reaction moments contribution to the moment equilibrium equations of the nodesis straightforward. The linearization of the constraint equation is a bit more complicated. According tothe definition of θ, its linearization yields

δθ = Γ (θ)−1

ax(δRrelR

Trel

)

= Γ (θ)−1

ax(δRT

1R1 +RT1 δR2R

T2R1

)

= Γ (θ)−1

ax(RT

1 θ1δ × TR1 +RT1 θ2δ ×R1

)

= Γ (θ)−1

ax(−RT

1 θ1δ ×R1 +RT1 θ2δ ×R1

)

= Γ (θ)−1

ax(RT

1 (θ2δ − θ1δ)×R1

)

= Γ (θ)−1RT

1 (θ2δ − θ1δ)

according to the updated-updated2 simplifications, θiδuu= δgi, thus resulting in

θδ = Γ (θ)−1RT

1 (δg2 − δg1) (9.52)

note that Γ (θ)−1

does not simplify to I because θ in general is a finite rotation.

9.1.8 Drive Displacement

This joint (DriveDisplacementJoint) constrains the relative position of a point optionally offset fromnode b with respect to a point optionally offset from node a, so that their relative position matches avalue that is imposed in node a reference frame; the imposed vector may depend on time and other statesduring the simulation.

Variants. There exists a pinned version (DriveDisplacementPinJoint), discussed in Section 9.1.9.

Files. It is implemented in filesmbdyn/struct/drvdisp.h

mbdyn/struct/drvdisp.cc

Constraint Equation. The constraint equation is

φ = xb + fb − xa − fa − v = 0 (9.53)

or, based on the initial assumptions,

φ = xb + fb − xa −Ra

(

fa + v)

= 0 (9.54)

The perturbation of the constraint equation yields

δφ = δxb − fb × θbδ − δxa + d× θaδ (9.55)

2In the following, the operatoruu= will be used to indicate the updated-updated approximation.

56

Page 58: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where d = Ra

(

fa + v)

. The contribution of the constraint to the equilibrium equations is

Fa

Ca

Fb

Cb

=

−λ−d× λλ

fb × λ

(9.56)

where λ is the reaction force in the global reference frame.The contribution of forces and moments and of the constraint equation to the Jacobian matrix is

0 0 0 0 −I0 −λ× d× 0 0 −d×0 0 0 0 I

0 0 0 λ× fb × fb ×−I d× I −fb × 0

δxa

θaδδxb

θbδδλ

(9.57)

The derivative of the constraint equation is

φ = xb + ωb × fb − xa − ωa × d− d (9.58)

where d = Ra˙v; its perturbation yields

δφ = δxb + δωb × fb + ωb × θbδ × fb − δxa − δωa × d− ωa × θaδ × d− θaδ × d. (9.59)

57

Page 59: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The contributions to the Jacobian matrix and residual of the initial assembly are

0 0 0 0 −I0 −λ× d× − µ× d×+(ωa × µ)× d× 0 0 −d×0 0 0 0 I

0 0 0 λ× fb × − (ωb × µ)× fb × fb ×−I d× I −fb × 00 0 0 0 00 −µ× d× 0 0 00 0 0 0 00 0 0 µ× fb × 0

0 d× + ωa × d× 0 −ωb × fb × 0

δxa

θaδδxb

θbδδλ

+

0 0 0 0 0

0 −d× µ× 0 0 −d× + d× ωa ×0 0 0 0 00 0 0 fb × µ× −fb × ωb ×0 0 0 0 00 0 0 0 −I0 0 0 0 −d×0 0 0 0 I

0 0 0 0 fb ×−I d× I −fb × 0

δxa

δωa

δxb

δωb

δµ

=

λ

d× λ− d× ωa × µ+ d× µ−λ

−fb × λ+ fb × ωb × µxa + d− xb − fb

µ

d× µ−µ

−fb × µxa + ωa × d+ d− xb − ωb × fb

(9.60)

9.1.9 Drive Displacement Pin

This joint (DriveDisplacementPinJoint) is the“pinned”variant of the drive displacement joint (DriveDisplacementJoint)discussed in Section 9.1.8. It imposes the absolute position v of a point optionally connected to a nodeby a rigid offset f :

φ = x+ f − x0 − v = 0 (9.61)

The perturbation of the constraint equation yields

δφ = δx− f × θδ (9.62)

The contribution of the constraint to the equilibrium equations isF

C

=

λ

f × λ

(9.63)

where λ is the reaction force in the absolute reference frame.

58

Page 60: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The contribution of forces and moments and of the constraint equation to the Jacobian matrix is

0 0 I

0 λ× f × f×I −f × 0

δxθδδλ

(9.64)

The derivative of the constraint equation is

φ = x+ ω × f − v; (9.65)

its perturbation yields

δφ = δx− f × δω − ω × f × θδ (9.66)

The contributions to the Jacobian matrix and residual of the initial assembly are

0 0 I

0 λ× f × − (ω × µ)× f × f ×I −f × 00 0 00 µ× f × 00 −ω × f × 0

δxθδδλ

0 0 00 f × µ× −f × ω ×0 0 00 0 I

0 0 f ×I −f × 0

δxδωδµ

=

−λ−f × λ+ f × ω × µx0 + v − x− f

−µ−f × µ

v − x− ω × f

(9.67)

9.1.10 Imposed Displacement

The imposed displacement joint (ImposedDisplacementJoint) is similar to the drive displacement joint(DriveDisplacementPinJoint), discussed in Section 9.1.9, but the relative displacement v, a scalarpossibly dependent on the time and on other states of the problem, is imposed only in direction ea,relative to node a.

Variants. There exists a pinned version (ImposedDisplacementPinJoint), discussed in Section 9.1.11.

Files. It is implemented in filesmbdyn/struct/impdisp.h

mbdyn/struct/impdisp.cc

Constraint equation.

φ = eTa (xb + fb − xa − fa)− v = 0, (9.68)

or, based on the initial assumptions,

φ = eTa (xb + fb − xa)−(

eTa fa + v)

= 0, (9.69)

or

φ = eTa d−(

eTa fa + v)

= 0, (9.70)

59

Page 61: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where d = xb + fb − xa and ea is constant in the reference frame of node a. The perturbation of theconstraint equation yields

δφ = eTa (δxb − fb × θbδ − δxa) + (ea × (xb + fb − xa))Tθaδ, (9.71)

or

δφ = eTa (δxb − fb × θbδ − δxa) + (ea × d)T θaδ. (9.72)

The contribution of the constraint to the equilibrium equations is

Fa

Ca

Fb

Cb

=

−eaλ−d× eaλeaλ

fb × eaλ

(9.73)

where λ is the reaction force (a scalar).The contribution of forces and moments and of the constraint equation to the Jacobian matrix is

0 λea × 0 0 −ea−λea × λd× ea × λea × −λea × fb × −d× ea

0 −λea × 0 0 ea0 −λfb × ea × 0 λea × fb × fb × ea

−eTa − (d× ea)T eTa (fb × ea)T

0

δxa

θaδδxb

θbδδλ

(9.74)

The constraint derivative is

φ = eTa (xb + ωb × fb − xa) + dT (ωa × ea)− v = 0, (9.75)

or

φ = eTa d+ dT (ωa × ea)− v = 0, (9.76)

with d = xb + ωb × fb − xa. Its linearization yields

δφ = eTa δxb − eTa δxa + (fb × ea)T δωb − (d× ea)T δωa

+ (ωa × ea)T δxb − (ωa × ea)T δxa

+ (fb × ea × (ωb − ωa))Tθbδ +

(

ea ×(

d− ωa × d))T

θaδ (9.77)

9.1.11 Imposed Displacement Pin

The imposed displacement pin joint (ImposedDisplacementPinJoint) is the “pinned” variant of theimposed displacement joint (ImposedDisplacementJoint) discussed in Section 9.1.10.

In this case, the direction e is referred to the absolute frame, so it does no longer depend on the stateof the problem.

Variants. There exists a version that imposes the relative displacement of two nodes along a directionthat is fixed with respect to one of them (ImposedDisplacementJoint), discussed in Section 9.1.10.

60

Page 62: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Files. It is implemented in filesmbdyn/struct/impdisp.h

mbdyn/struct/impdisp.ccThe constraint equation is

φ = eT (x+ f − x0)− v = 0, (9.78)

or

φ = eTd− v = 0, (9.79)

where d = x+ f − x0. The perturbation of the constraint equation yields

δφ = eT (δxb − fb × θbδ) . (9.80)

The contribution of the constraint to the equilibrium equations is

F

C

=

f × eλ

(9.81)

where λ is the reaction force (a scalar).The contribution of forces and moments and of the constraint equation to the Jacobian matrix is

0 0 e

0 λe× f × f × eeT (f × e)

T0

δxθδδλ

(9.82)

The constraint derivative is

φ = eT (x+ ω × f)− v = 0, (9.83)

or

φ = eT d− v = 0, (9.84)

Its linearization yields

0 0 0 0 e 00 λe× f × 0 0 f × e 00 0 0 0 0 e

0 µe× f × 0 0 0 f × eeT (f × e)

T0 0 0 0

0 − (f × ω × e)T eT (f × e)T 0 0

δxθδδxδωδλδµ

(9.85)

9.1.12 Total Joint

This joint (TotalJoint) forces two nodes to assume an imposed relative position and orientation aboutselected axes. Both imposed position and orientation are specified in the reference frame of node 1. Thejoint consists in 6 equations, 3 for positions and 3 for orientation, that can be selectively turned on oroff to enforce a constraint on that DOF.

Variants. There exists a pinned version of this joint that imposes the absolute position and orientationof a node (TotalPinJoint). It is discussed in Section 9.1.13.

61

Page 63: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Files. It is implemented in filesmbdyn/struct/totalj.h

mbdyn/struct/totalj.cc

Definitions. The position of the nodes with respect to the global reference frame are x1 and x2. Thematrices that describe the orientation of the nodes with respect to the global reference frame are R1

and R2. An offset is allowed for the location of the points where the relative position is constrained; theoffsets f1 and f2 are rigidly connected to the nodes, so in the global reference frame their expression is

f1 = R1f1 (9.86a)

f2 = R2f2. (9.86b)

The position constraint may be expressed in a reference frame that is rigidly connected to node 1, R1h,whose orientation in the global reference frame is

R1h = R1R1h. (9.87)

Similarly, the orientation constraint may be expressed in a reference frame that is rigidly connected toboth nodes by matrices R1hr and R2hr, whose orientation in the global reference frame is

R1hr = R1R1hr (9.88a)

R2hr = R2R2hr. (9.88b)

The relative position and orientation may refer to different local reference frames to increase the versatilityof the element.

It is essential to notice that the differentiation of the constraint orientation matrices does not affectthe relative orientation between the constraint and each node, namely matrices R1hr and R2hr, whichare constant. As a consequence,

δR1hr = δR1R1hr

= θ1δ ×R1R1hr

= θ1δ ×R1hr (9.89a)

δR2hr = θ2δ ×R2hr, (9.89b)

and

R1hr = ω1 ×R1hr (9.90)

R2hr = ω2 ×R2hr. (9.91)

The same is true for the relative position orientation matrix, R1h.

Orientation Constraint. The relative orientation is expressed by matrix

Rrel = RT1hrR2hr (9.92)

The desired relative orientation can be expressed by means of a rotation vector θ0; the correspondingrotation matrix is

R0 = exp (θ0 × ) . (9.93)

62

Page 64: MBDyn Theory and Developer’s Manual Version 1.X-Devel

This operation can always be performed with no ambiguity, regardless of the amplitude of θ0. However,the same is not true for the inverse operation, namely

θ0 = ax(exp−1 (R0)

), (9.94)

which can only yield the minimal θ0 corresponding to R0, with the indetermination corresponding to anarbitrary amount of complete revolutions.

The equality

θ = θ0 (9.95)

implies that

Rrel = R0. (9.96)

Equation (9.96) can be rewritten as

RrelRT0 = I, (9.97)

and thus Eq. (9.95), after defining

Rδ = RrelRT0 , (9.98)

is equivalent to

ax(exp−1

(Rδ))

= 0. (9.99)

In general, the difference between the desired rotation θ0 and the current relative rotation vector betweennodes 1 and 2,

θ = ax(exp−1

(RT

1hrR2hr

))(9.100)

through the previous redefinition can be expressed as

θδ = ax(exp−1

(RT

1hrR2hrRT0

))(9.101)

and is equivalent to

θδ = θ − θ0 (9.102)

when θδ = 0.

Position Constraint. The desired relative position is imposed by means of a vector x0 defined inthe relative position constraint reference frame of node 1. The relative position is represented by vectorx, defined as

x = RT1h (x2 + f2 − x1 − f1) ; (9.103)

the constraint equations for the relative position are:

x = x0. (9.104)

In analogy with the definition of θδ, a vector xδ can be used to express the constraint on the positionDOFs,

xδ = x− x0. (9.105)

63

Page 65: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Constraint Equations. The resulting constraint equations are:

xδ = 0 (9.106a)

θδ = 0. (9.106b)

Any component of xδ and θδ can be selectively set to zero to enforce a constraint on that degree offreedom. The axis about which the constraint is applied can be arbitrarily defined with respect to thenode orientation by appropriately setting the constant relative orientation matrix of each node, both forposition (R1h) and for orientation (R1hr and R2hr). For imposed rotations, an arbitrary amplitude ofthe rotation about the constraint axis can be imposed by means of the components of vector θ0. Thesame is true for positions, by means of v.

Alternatively, equations related to any of the components of xδ and θδ can be omitted, thus omittingthe constraint along or about the corresponding axis. The corresponding value of xδ and θδ could beused to apply moments based on the relative position/orientation of the nodes, e.g. linear/rotationalsprings or dampers. In this case, the singularity problem on rotations is back: the norm of the relativerotation must not exceed π, i.e.

∣∣θδ∣∣ < π. Note that the relative rotation is computed with respect to

θ0, so an anelastic (or imposed) rotation can be easily applied to the spring, resulting in an imposedrotation with stiffness.

Linearization. First, the perturbation of xδ,

δxδ = RT1h (δx2 − b2 × θ2δ − δx1 + b1 × θ1δ) (9.107)

is computed, where

b1 = x2 + f2 − x1 (9.108a)

b2 = f2. (9.108b)

Note that, since the constraint equations are defined by setting to zero any components of the vector xδ,the related Jacobian matrix contribution is obtained by selecting the corresponding columns of matrixR1h.

Then, the perturbation of θδ results from

θδδ × = δRδRδT

= RT1hrθ1δ ×T R1hr +R

T1hrθ2δ ×R1hr

= RT1hr (θ2δ − θ1δ)×R1hr, (9.109)

which implies

θδδ = RT1hr (θ2δ − θ1δ) . (9.110)

Note that, since the constraint equations are defined by setting to zero any components of the vector θδ,the related Jacobian matrix contribution is obtained by selecting the corresponding columns of matrixR1hr.

After calling λx and λθ the Lagrange multipliers respectively related to the relative position andorientation constraints, and noticing that in the global reference frame they become

λx = R1hλx (9.111a)

λθ = R1hrλθ, (9.111b)

64

Page 66: MBDyn Theory and Developer’s Manual Version 1.X-Devel

the contribution of the constraint reactions to the equilibrium equations of the participating nodes is

F1 = −λx (9.112a)

C1 = −b1 × λx − λθ (9.112b)

F2 = λx (9.112c)

C2 = b2 × λx + λθ. (9.112d)

Due to the simplifications related to the updated-updated approach, the contribution of the constraintequations and of the equilibrium to the Jacobian matrix is:

0 λx × 0 0 −R1h 0−λx × b1 × λx × + λθ × λx × −λx × b2 × −b1 ×R1h −R1hr

0 −λx × 0 0 R1h 00 −b2 × λx × − λθ × 0 λx × b2 × b2 ×R1h R1hr

−RT1h RT

1hb1 × RT1h −RT

1hb2 × 0 00 −RT

1hr 0 RT1hr 0 0

δx1

θ1δδx2

θ2δ

δλx

δλθ

=

λx

b1 × λx + λθ

−λx

−b2 × λx − λθ

−xδ

−θδ

. (9.113)

The updated-updated form is obtained by simply replacing θ1δ and θ2δ with δg1 and δg2, respectively.

Summary

• each component of the relative position/orientation can be subjected to separate constraint condi-tions;

• an ideal constraint results from activating the constraint equation on that degree of freedom andsetting to zero, or to any desired, time dependent value the relative position/orientation of thatcomponent;

• a deformable constraint results from deactivating the constraint equation on that degree of freedom,possibly adding a constitutive law based on that error and possibly on its derivative (currently, thisrequires a separate instance of a deformable element); in this case, the norm of the amplitude ofthe relative orientation is limited to π;

• the imposed relative orientation goes in matrix R0 by means of a rotation vector θ0 which can betime dependent; there is no limitation on the amplitude of that rotation;

• friction can be added as well on those components that are not constrained;

• an interesting option, left as a future development, consists in leaving all the constraint equationsalways in place, and activate/deactivate them based on some trigger.

Future Development: Velocity/Acceleration

The time derivative of vector xδ yields

vδ = x− v0 = RT1h (x2 + ω2 × f2 − x1 − ω1 × (x2 + f2 − x1))− v0. (9.114)

65

Page 67: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Its linearization yields

δvδ = δx

= RT1hδx2

−RT1hδx1

−RT1hf2 × δω2

+RT1h (x2 + f2 − x1)× δω1

−RT1hω1 × δx2

+RT1hω1 × δx1

−RT1h (ω2 − ω1)× f2 × θ2δ

+RT1h (x2 + ω2 × f2 − x1 − ω1 × (x2 + f2 − x1))× θ1δ

uu= RT

1hδx2

−RT1hδx1

−RT1hf2 × δg2

+RT1h (x2 + f2 − x1)× δg1

−RT1hω1 × δx2

+RT1hω1 × δx1

+RT1h ((f2 × ω2)× + ω1 × f2 × )θ2δ

+RT1h ((x2 + ω2 × f2 − x1)× − ω1 × (x2 + f2 − x1)× )θ1δ. (9.115)

The time derivative of matrix Rδ yields the constraint equation on the angular velocity

ωδ × = RδRδT

= RT1hr (ω2 − ω1)×R1hr −Rδω0 ×RδT , (9.116)

which results in

ωδ = RT1hr (ω2 − ω1)−Rδω0, (9.117)

where ω0 is the derivative of the imposed orientation,

ω0 = θ0. (9.118)

Note that if the angular velocity constraint is the derivative of an orientation constraint, Rδ = I, so, bysetting ωδ = 0, Equation (9.117) becomes

ω0 = RT1hr (ω2 − ω1) . (9.119)

Otherwise, Equation (9.117) represents a non-holonomic constraint. In this case, Rδ is again the identitymatrix, although resulting from an unknown R0, which is the result of integrating the dynamics of theproblem with the non-holonomic constraint represented by Equation (9.119). In fact,

R0 = RT1hrR2hr (9.120)

is the definition of the relative orientation resulting from imposing the constraint of Equation (9.119).

66

Page 68: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The perturbation of Equation (9.119) results in

δ(RT

1hr (ω2 − ω1))= RT

1hr (δω2 − δω1 + (ω2 − ω1)× θ1δ)uu= RT

1hr (δg2 − δg1 − ω2 × δg2 + ω2 × δg1) (9.121)

Further time differentiation of the constraint equation results in

ωδ = RT1hr (ω2 − ω1 − ω1 × ω2)− ωδ ×Rδω0 −Rδω0. (9.122)

Similarly, if the angular acceleration constraint is the derivative of an orientation or an angular velocityconstraint, then Rδ = I, ωδ = 0, respectively, and, by setting ωδ = 0, Equation (9.122) becomes

ω0 = RT1hr (ω2 − ω1 − ω1 × ω2) . (9.123)

9.1.13 Total Pin Joint

This joint (TotalPinJoint) forces a node to assume an imposed absolute position and orientation aboutselected axes. Both imposed position and orientation are specified in the global reference frame, option-ally re-oriented by a constant orientation. The joint consists in 6 equations, 3 for positions and 3 fororientation, that can be selectively turned on or off to enforce a constraint on that DOF.

Variants. This joint is a variant of the TotalJoint, described in Section 9.1.12.

Files. It is implemented in filesmbdyn/struct/totalj.h

mbdyn/struct/totalj.cc

Definitions. The position of the node with respect to the global reference frame is xn, while theabsolute position of the constraint is xc. The matrix that expresses the orientation of the node withrespect to the global reference frame is Rn. An offset is allowed for the location of the points where theabsolute position is constrained; the offset fn is rigidly connected to the node, so in the global referenceframe its expression is

fn = Rnfn (9.124)

The position constraint may be expressed in a reference frame, whose orientation in the global referenceframe isRch. Later on, it will occasionally be convenient to express the absolute position of the constraint,xc, in the reference frame Rch, namely

xc = RTchxc. (9.125)

Similarly, the orientation constraint may be expressed in a reference frame that is rigidly connected tothe node by matrix Rnhr, whose orientation in the global reference frame is

Rnhr = RnRnhr, (9.126)

while the absolute orientation is described by the constant matrix Rchr. The absolute position andorientation may refer to different local reference frames to increase the versatility of the element.

67

Page 69: MBDyn Theory and Developer’s Manual Version 1.X-Devel

It is essential to notice that the differentiation of the constraint orientation matrices does not affectthe relative orientation between the constraint and the node, namely matrix Rnhr, which is constant.As a consequence,

δRnhr = δRnRnhr

= θnδ ×RnRnhr

= θnδ ×Rnhr, (9.127)

and

Rnhr = ωn ×Rnhr. (9.128)

The same is true for the relative position orientation matrix, Rnh.

Orientation Constraint. The matrix that expresses the relative orientation is

Rrel = RTchrRnhr (9.129)

The desired relative orientation is expressed in analogy with the TotalJoint.In general, the difference between the desired rotation θ0 and the current absolute orientation of the

node,

θ = ax(exp−1

(RT

chrRnhr

))(9.130)

through the redefinition of Eq. (9.98) can be expressed as

θδ = ax(exp−1

(RT

chrRnhrRT0

))(9.131)

and is equivalent to

θδ = θ − θ0 (9.132)

when θδ = 0.

Position Constraint. The desired absolute position is imposed by means of a vector x0 defined inthe absolute position constraint reference frame Rch. The absolute position is represented by vector x,defined as

x = RTch (xn + fn − xc)

= RTch (xn + fn)− xc; (9.133)

the constraint equations for the relative position are:

x = x0. (9.134)

In analogy with the definition of θδ, a vector xδ can be used to express the constraint on the positionDOFs,

xδ = x− x0. (9.135)

Constraint Equations. The resulting constraint equations are identical to Eqs. (9.106a, 9.106b),related to the TotalJoint, as illustrated at page 64; the same considerations apply.

68

Page 70: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Linearization. First, the perturbation of xδ,

δxδ = RTch (δxn − fn × θnδ) (9.136)

is computed. Note that, since the constraint equations are defined by setting to zero any componentsof the vector xδ, the related Jacobian matrix contribution is obtained by selecting the correspondingcolumns of matrix Rch.

Then, the perturbation of θδ results from

θδδ × = δRδRδT

= RTchrθnδ ×Rchr, (9.137)

which implies

θδδ = RTchrθnδ. (9.138)

Note that, since the constraint equations are defined by setting to zero any components of the vector θδ,the related Jacobian matrix contribution is obtained by selecting the corresponding columns of matrixRchr.

After calling λx and λθ the Lagrange multipliers respectively related to the relative position andorientation constraints, and noticing that in the global reference frame they become

λx = Rchλx (9.139a)

λθ = Rchrλθ, (9.139b)

the contribution of the constraint reactions to the equilibrium equations of the participating nodes is

Fn = λx (9.140a)

Cn = fn × λx + λθ. (9.140b)

Due to the simplifications related to the updated-updated approach, the contribution of the constraintequations and of the equilibrium to the Jacobian matrix is:

0 0 Rch 0

0 λx × fn × fn ×Rch Rchr

RTch −RT

chfn × 0 0

0 RTchr 0 0

δxn

θnδ

δλx

δλθ

=

−λx

−fn × λx − λθ

−xδ

−θδ

. (9.141)

The updated-updated form is obtained by simply replacing θnδ with δgn.

Stabilized Form

Equations.

Rchµx = 0 (9.142a)

fn ×Rchµx +Rchrµθ = 0 (9.142b)

Rchλx = 0 (9.142c)

−fn × ωn ×Rchµx −Rchr

(Rδω0

)× µθ

+ fn ×Rchλx +Rchrλθ = 0 (9.142d)

RTch (xn + fn)− x0 = 0 (9.142e)

ax(exp−1

(Rδ))

= 0 (9.142f)

RTch (xn + ωn × fn)− x0 = 0 (9.142g)

RTchrωn −Rδω0 = 0 (9.142h)

69

Page 71: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Linearization.

Rchδµx = 0 (9.143a)

− (fn ×Rchµx)× θnδ + fn ×Rchδµx +Rchrδµθ = 0 (9.143b)

Rchδλx = 0 (9.143c)

(fn × ωn ×Rchµx)× θnδ + fn × (Rchµx)× δωn

− fn × ωn ×Rchδµx

− (Rchrµθ)×(RnhrR

T0 ω0

)× θnδ −Rchr

(Rδω0

)× δµθ

− (fn ×Rchλx)× θnδ + fn ×Rchδλx +Rchrδλθ = 0 (9.143d)

RTchδxn −RT

chfn × θnδ = 0 (9.143e)

RTchrθnδ = 0 (9.143f)

RTchδxn −RT

chfn × δωn −RTchωn × fn × θnδ = 0 (9.143g)

RTchrδωn +RT

chr

(RnhrR

T0 ω0

)× θnδ = 0 (9.143h)

Summary

The same considerations formulated for the TotalJoint apply.

9.1.14 Gimbal

This element implements an ideal gimbal joint. It is discussed in [3]. A gimbal is a joint that allows therotation between two nodes about two orthogonal axes. The angular velocity about the remaining axisis preserved regardless of the relative angle between the two nodes. It is essentially equivalent to twoCardano joints3 each of which accounts for half of the relative orientation.

Variants. This joint is only defined in the variant that constrains the relative rotation between twonodes. It may need to be combined with another joint that constrains the (relative) position of therelated nodes, and with a deformable hinge to provide some stiffness or damping.

Files. It is implemented in filesmbdyn/struct/gimbal.h

mbdyn/struct/gimbal.cc

Definitions. The relative orientation between the nodes is made of three steps, described by

Rrel = RTaRb (= Rab) (9.144a)

= exp (ϑe2 × ) exp (ϕe1 × ) exp (ϑe2 × ) (= R (ϑ, ϕ)) (9.144b)

where

exp (ϑe2 × ) = I + sinϑe2 × + (1− cosϑ) e2 × e2 × (9.145a)

exp (ϕe1 × ) = I + sinϕe1 × + (1− cosϕ) e1 × e1 × (9.145b)

and ei are the unit vectors in directions i = 1, 2, 3.

3Or “universal joints”; this is also known as a double Hooke joint.

70

Page 72: MBDyn Theory and Developer’s Manual Version 1.X-Devel

This represents a sequence of mutually orthogonal rotations, symmetrical with respect to the mid ofthe central rotation, and thus consisting in a sequence of two Cardano joints in the “W” arrangement,which is homokinetic.The constraint equation is obtained by equating the relative orientation matrices of Equations (9.144a,9.144b):

Rab = R (ϑ, ϕ) , (9.146)

or, which is equivalent,

RabR (ϑ, ϕ)T= I. (9.147)

As a consequence, the rotation vector

θ = ax(

exp−1(

RabR (ϑ, ϕ)T))

, (9.148)

corresponding to the orientation matrix at the left-hand side of Equation (9.147), must vanish:

θ = 0. (9.149)

Lagrange multipliers approach:

0 = δ(λTθ

)

= δλTθ + δθTλ, (9.150)

where

δθ = Γ (θ)−1θδ. (9.151)

Note, that by definition θ must be zero, so Γ (θ) ∼= I. Without any simplification, Equation (9.150)results in

0 = δ(λTθ

)(9.152a)

= δλTθ + θTδ Γ (θ)−Tλ. (9.152b)

To eliminate the Γ (θ)−T

term, the multipliers can be redefined as

λ = Γ (θ)−Tλ. (9.153)

The perturbation θδ results from

θδ × = δexp (θ × ) exp (θ × )T

= δ(

RTaRbexp (ϑe2 × )

Texp (ϕe1 × )

Texp (ϑe2 × )

T)

·(

RTaRbexp (ϑe2 × )

Texp (ϕe1 × )

Texp (ϑe2 × )

T)T

= RTa (θbδ − θaδ)×Ra

− δϑRTaRb

((

I + exp (ϑe2 × )Texp (ϕe1 × )

T)

e2

)

×RTb Ra

− δϕRTaRb

(

exp (ϑe2 × )Te1

)

×RTb Ra (9.154)

71

Page 73: MBDyn Theory and Developer’s Manual Version 1.X-Devel

which yields

θδ = RTa (θbδ − θaδ)−RT

aRb (δϑwϑ + δϕwϕ) (9.155)

with

wϑ =(

I + exp (ϑe2 × )Texp (ϕe1 × )

T)

e2

= sinϕ sinϑe1 + (1 + cosϕ) e2 − sinϕ cosϑe3 (9.156a)

wϕ = exp (ϑe2 × )Te1

= cosϑe1 + sinϑe3. (9.156b)

Linearization

−(

Raλ)

× 0 Ra(

Raλ)

× 0 −Ra

RTa −RT

a 0

−(

(Rbwϑ)×(

Raλ))T (

(Rbwϑ)×(

Raλ))T (

RTaRbwϑ

)T

−(

(Rbwϕ)×(

Raλ))T (

(Rbwϕ)×(

Raλ))T (

RTaRbwϕ

)T

θa∆θb∆

∆λ

0 00 0

RTaRbwϑ RT

aRbwϕ(RT

aRbwϑ/ϑ

)Tλ

(RT

aRbwϑ/ϕ

)Tλ

(RT

aRbwϕ/ϑ

)Tλ

(RT

aRbwϕ/ϕ

)Tλ

∆ϑ∆ϕ

=

−Raλ

Raλ

θ

−(RT

aRbwϑ

)Tλ

−(RT

aRbwϕ

)Tλ

(9.157)

where

wϑ/ϑ = sinϕ cosϑe1 + sinϕ sinϑe3 (9.158a)

wϑ/ϕ = cosϕ sinϑe1 − sinϕe2 − cosϕ cosϑe3 (9.158b)

wϕ/ϑ = − sinϑe1 + cosϑe3 (9.158c)

wϕ/ϕ = 0. (9.158d)

9.1.15 Screw Joint

Author: Mauro Manetti and Marco MorandiniThe screw joint is a combination of:

• an in line joint, that constrains one point to move along a line attached to another point:

eT1hx (x2 + f2 − x1 − f1) = 0

eT1hy (x2 + f2 − x1 − f1) = 0

72

Page 74: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where e1hi is the i-th column of matrix R1R1h

ejhi =(

RjRjh

)

[i] (9.159)

xj is the position of node j and fj is the offset of the joint with respect node j, both in theabsolute coordinate system; the offset is constant with respect to the reference frame of the joint,so fj = Rj fj .

• a revolute rotation joint, that constrains the relative orientation of two nodes to be a rotation aboutan axis that is fixed with respect to the two bodies:

eT2hxe1hz = 0

eT2hye1hz = 0

• a linear relationship between the relative rotation about the common axis and the relative positionalong the common axis:

p

2π(θ − θ0)− eT1hz (d− d0) = 0 (9.160)

where the nodes distance vectors d and d0 can be written as:

d = x2 + f2 − x1 − f1d0 = x20 + f20 − x10 − f10

while p represents the distance between the nodes along axis e1hz corresponding to one revolutionabout the same axis.

The rotation θ is formulated as

θ =RT1h3ax

(exp−1

(RT

1R2

))

=RT1h3R

T1 ax

(exp−1

(R2R

T1

))

=eT1hzax(exp−1

(R2R

T1

))(9.161)

where R1h3 is the third axis of the constant relative orientation of node 1, while e1hz is the screw jointaxis. To overcome the limitation |θ| < π, an appropriate unwrap angle function has been implementedin the code, so allowing to compute the right residual of Equation (9.160).

The virtual perturbation of Equation (9.161) can be expressed as

δθ = RT1h3Γ (θ)

−1RT

1 (θ2δ − θ1δ) (9.162)

so the virtual perturbation of Equation (9.160)

p

2πeT1hzΓ (θ)

−1RT

1 (θ2δ − θ1δ)− eT1hzd× θ1δ−eT1hz (δx2 − f2 × θ2δ − δx1 + f1 × θ1δ) = 0 (9.163)

yields the contribution of the constraint to the forces and moments acting on the constrained nodes:

F1 = e1hzλ (9.164)

C1 =(

− p

2πR1Γ (θ)

−TR1h3 + f1 × e1hz

)

λ (9.165)

F2 = −e1hzλ (9.166)

C2 =( p

2πR1Γ (θ)

−TR1h3 − f2 × e1hz

)

λ (9.167)

73

Page 75: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where λ is the Lagrange multiplier that here assumes the meaning of reaction force along the screw axis.The problem linearization requires the already computed virtual perturbation of the constraint equa-

tion (see Equation (9.163)) and the constraint forces and couples virtual perturbation:

δF1 =− λe1hz × θ1δ + e1hzδλ (9.168)

δC1 =λ

[p

(

R1Γ (θ)−TR1h3

)

× θ1δ−p

2πR1Γ (θ)

−TL(

−θ,Γ (θ)−TR1h3

)

Γ (θ)−1RT

1 (θ2δ − θ1δ)+

e1hz × f1 × θ1δ − f1 × e1hz × θ1δ]

+

C1

λδλ (9.169)

δF2 =λe1hz × θ1δ − e1hzδλ (9.170)

δC2 =λ

[

− p

(

R1Γ (θ)−TR1h3

)

× θ1δ+p

2πR1Γ (θ)

−TL(

−θ,Γ (θ)−TR1h3

)

Γ (θ)−1RT

1 (θ2δ − θ1δ)−

e1hz × f2 × θ2δ + f2 × e1hz × θ1δ]

+

C2

λδλ (9.171)

where the operator L() has been introduced according to the following definition

δΓ(θ)Ta = −L(−θ,a)δθ (9.172)

which can be manipulated to obtain the needed relation

δ(Γ(θ)TΓ(θ)−Ta) =δΓ(θ)TΓ(θ)−Ta+

Γ(θ)T δΓ(θ)−Ta+

Γ(θ)TΓ(θ)−T δa = δa (9.173)

δΓ(θ)−Ta =δΓ(θ)−TL(−θ,Γ(θ)−Ta

)δθ (9.174)

Now a contribution useful to obtain previous results will be reported

δ(

R1Γ(θ)−1R1h3

)

=δR1Γ(θ)−T R1h3 +R1δΓ(θ)

−T R1h3

=−(

R1Γ(θ)−T R1h3

)

×

θ1δ +R1Γ(θ)−TL(−θ,Γ(θ)−T R1h3)δθ

This joint formulation can be improved to take into account the presence of friction. Figures (9.1)and (9.2) show sketches useful to identify the forces acting on the screw thread. In the figures the caseof a screw which is raising a load F is presented, the equilibrium equation can be written for the verticaland the horizontal directions to obtain

F + µFn sinα = Fn cos γncosα (9.175)

P = µFn cosα+ Fn cos γn sinα (9.176)

74

Page 76: MBDyn Theory and Developer’s Manual Version 1.X-Devel

α γ

Fn

γn

α

ScrewCenterLine

r

Ff

P

A

B

C

D

E

O

G

H

D'

O'

F

Figure 9.1: 3D screw thread sketch.

where F is the load, or the force, along the screw axis, P the force acting to rotate the screw, i.e. thetorque moment over the mean thread radius r, Fn is the thread normal reaction, α the lead angle, andγn the angle between the vectors OC and OB represented in Figure (9.1). Inside the code all the screwfriction formulation is developed in function of the angle γn for convenience, anyway the usual screwinformations relate the thread angle 2γ, so the joint requires as input the half thread angle γ. Lookingat the Figure 9.1 it is possible to find the relation between these two angles

BC = AE = OA tan γ = OB cosα tan γ (9.177)

so

tan γn =BC

OB= cosα tan γ ⇒ γn = tan−1(cosα tan γ). (9.178)

From Equations (9.175) and (9.176) is possible to retrive the relation between the screw raising torqueCr and the axial force F

Cr = rF

(cos γn sinα+ µ cosα

cos γn cosα− µ sinα

)

. (9.179)

It is easy to find the previous relation in presence of a lowering torque

Cl = rF

(cos γn sinα− µ cosα

cos γn cosα+ µ sinα

)

. (9.180)

from which it is possible to understand the torque dependency from the versus of the friction force µFn.A general discriminant to apply the right formula can be linked to the versus of the relative velocityv between the internal and external thread and the sign of the constraint Lagrange multiplier λ which

75

Page 77: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Ff = µFn

Fncosγn

F

α

P

O

Figure 9.2: 2D screw thread sketch

represents the versus of the axial screw force

C = rF

(cos γn sinα+ sign(vλ)µ cosα

cos γn cosα− sign(vλ)µ sinα

)

. (9.181)

Inside the code sign(vλ) will be embedded in the friction coefficient computation µ = µ(v,F ), so in thefollowing for brevity it will be removed from equations introducing the notation C = C(µ).

The torque acting on the screw for the friction presence can now be computed as

Cfrc(µ) = C(µ)−C(0) = rF

[µ sec γn(1 + tan2 α)

1− µ sec γn tanα

]

. (9.182)

Equation (9.182) can be used to add the torque friction contribution to the couples acting on the con-strained nodes reported in Equations (9.165) and (9.167)

C1frc= C1 −Cfrc(µ) = C1 − rF1

[µ sec γn(1 + tan2 α)

1− µ sec γn tanα

]

(9.183)

C2frc= C2 −Cfrc(µ) = C2 − rF2

[µ sec γn(1 + tan2 α)

1− µ sec γn tanα

]

(9.184)

At this point the only further required informations regard the relative velocity v and the virtualvariation of the friction torque contribution. Starting from the already used formula

δθ = Γ(θ)−1RT1 (θ2δ − θ1δ) (9.185)

it is possible to write the following relation

θ = Γ(θ)−1RT1 (Γ(θ2)θ2 − Γ(θ1)θ1). (9.186)

The angular velocity vector is defined as

ωθ = Γ(θ)θ = Γ(θ)Γ(θ)−1RT1 (Γ(θ2)θ2 − Γ(θ1)θ1) = R

T1 (ω2 − ω1) (9.187)

76

Page 78: MBDyn Theory and Developer’s Manual Version 1.X-Devel

from which the angular velocity modulus with sign can be obtained

ωθ = RT1h3ωθ = RT

1h3RT1 (ω2 − ω1). (9.188)

Now the relative velocity on the screw thread, along the friction force direction, can be written as

v = ωθr cosα = RT1h3R

T1 (ω2 − ω1)r cosα. (9.189)

The virtual perturbation of the friction couple is required to write the linearized problem

δCfrc =δF r

[µ sec γn(1 + tan2 α)

1− µ sec γn tanα

]

+

F r

[

sec γn(1 + tan2 α)

1− µ sec γn tanα+µ sec γn(1 + tan2 α)

(1− µ sec γn tanα)2 sec γn tanα

]

δµ

=r

[µ sec γn(1 + tan2 α)

1− µ sec γn tanα

]

δF + F r

[

µ sec γn(1 + tan2 α)

(1− µ sec γn tanα)2

]

δµ (9.190)

where the friction coefficient virtual variation is automatically computed by the code, once provided theF and µ virtual perturbations

δµ = δµ(δF , δv). (9.191)

Anyway the screw axial forces virtual variations have already been reported in Equations 9.168 and9.170, so to complete the problem description is just required the definition of the relative velocityvirtual perturbation

δv =RT1h3δR

T1 (ω2 − ω1)r cosα+ RT

1h3RT1 (δω2 − δω1)r cosα

=r cosαRT1h3R

T1 (ω2 − ω1)× θ1δ + r cosαRT

1h3 (δω2 − δω1) . (9.192)

Physics. In other words, node 1 is the screw and node 2 is the bolt; neglecting the offset, the forcealong the screw axis is related to the couple about the same axis by the relationship

C = − p

2πF (9.193)

which results from a power balance

Cωθ + Fvlin = 0 (9.194)

in terms of relative linear (vlin) and angular (ωθ) velocity, with the kinematic relationship

vlin =p

2πωθ (9.195)

9.1.16 Strapdown Sensor

This constraint imposes the acceleration and the angular velocity of a node in a relative frame attachedto the node itself.

x = xn + ωn × b+ ωn × ωn × b (9.196a)

ω = ωn (9.196b)

77

Page 79: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where b = Rnb is the offset of the accelerometer from the node.The acceleration and the angular velocity in the reference frame of the node, as output from the

strapdown sensor, respectively are x and ω. The constraint equations are

x = Rnx (9.197a)

ω = Rnω (9.197b)

The acceleration of the point where the strapdown sensor is placed is

x =

(

1

mI + f × TJ−1CMf ×

)

β − f × TJ−1CMγ − f × TJ−1CM (xn × β − ωn × JCMωn)

+ b× TJ−1CM

(

γ − f × β + xn × β − ωn × JCMωn

)

+ ωn × ωn × b

=

(

1

mI + (f − b)× TJ−1CMf ×

)

β − (f − b)× TJ−1CMγ

− (f − b)× TJ−1CM (xn × β − ωn × JCMωn) + ωn × ωn × b (9.198)

Note: this constraint is extremely simpler when the node is in the center of mass (f = 0), and thestrapdown sensor is in the node (b = 0).

9.2 Deformable Constraints

Definitions

f1 = R1f1

f2 = R2f2

R1h = R1R1h

R2h = R2R2h

where Ri is the current orientation of node i, Rih is a constant re-orientation of the joint with respectto node i, so Rih is the orientation of the joint with respect to the global frame; fi is the offset of thejoint with respect to node i in the node reference frame, so fi is the offset of the joint with respect tonode i in the global frame, and xi + fi is the position of the joint with respect to the global frame.

Equilibrium equations are obtained by means of the Virtual Work Principle (VWP). While the un-known orientation parameters depend on the parametrization in use, and typically are Gibbs-Rodriguesparameters according to the updated-updated approach, equilibrium is written in terms of the equationsconjugated to perturbations of relative rotation, namely:

δL =∑

δxTi Fi + θiδMi = 0 (9.199)

9.2.1 Rod With Offsets

Distance vector between pin points

l = x2 + f2 − x1 − f1 (9.200)

scalar distance

l =√lT l (9.201)

78

Page 80: MBDyn Theory and Developer’s Manual Version 1.X-Devel

strain

ε =l

l0− 1 (9.202)

strain rate

ε =l

l0(9.203)

where

l =1

llT l (9.204a)

l = x2 + ω2 × f2 − x1 − ω1 × f1 (9.204b)

scalar force

f = f (ε, ε) (9.205)

nodal forces and moments result from the VWP according to

δL = δlT f (9.206a)

= δlTl

lf (9.206b)

= (δx2 − f2 × θ2δ − δx1 + f1 × θ1δ)Tl

lf (9.206c)

force vector

F =l

lf (9.207)

nodal forces and moments

F1 = −F (9.208a)

M1 = −f1 × F (9.208b)

F2 = F (9.208c)

M2 = f2 × F (9.208d)

equation linearization

δF1 = −δF (9.209a)

δM1 = −f1 × δF − F × f1 × θ1δ (9.209b)

δF2 = δF (9.209c)

δM2 = f2 × δF + F × f2 × θ2δ (9.209d)

force linearization

δF =f

l

(

I − llT

l2

)

δl+l

lδf (9.210)

scalar force linearization

δf =∂f

∂εδε+

∂f

∂εδε (9.211)

79

Page 81: MBDyn Theory and Developer’s Manual Version 1.X-Devel

strain linearization

δε =1

l0δl (9.212)

where

δl =1

llT δl (9.213a)

δl = δx2 − f2 × θ2δ − δx1 + f1 × θ1δ (9.213b)

strain rate linearization

δε =1

l0δl (9.214)

where

δl =lT

lδl+

lT

l

(

I − llT

l2

)

δl (9.215a)

δl = δx2 − f2 × δω2 − ω2 × f2 × θ2δ− δx1 + f1 × δω1 + ω1 × f1 × θ1δ (9.215b)

to summarize:

δF =Klδl+Klδl (9.216)

with

Kl =f

lI +

(1

l2l0

∂f

∂ε− ε

l3∂f

∂ε− f

l3

)

llT +1

l2l0

∂f

∂εllT (9.217a)

Kl =1

l2l0

∂f

∂εllT (9.217b)

according to the simplifications of the updated-updated approach,

θiδuu= δgi (9.218a)

δωiuu= δgi − ω × δgi (9.218b)

recalling that

δz = cδz (9.219)

the linearization of the force becomes

δF =(cKl +Kl

)δx2

+(−(cKl +Kl

)f2 × + cKl (f2 × ω2)×

)δg2

−(cKl +Kl

)δx1

−(−(cKl +Kl

)f1 × + cKl (f1 × ω1)×

)δg1 (9.220)

80

Page 82: MBDyn Theory and Developer’s Manual Version 1.X-Devel

9.2.2 Deformable Hinge

The deformable hinge applies to two nodes an internal moment that may depend on their relativeorientation and angular velocity by means of a 3D constitutive law. It is discussed in [4]. Two variantsof this joint are presented:

• the one historically implemented in MBDyn, called “attached”, considers the constitutive law andthe resulting moment attached to node 1;

• the other one, called “invariant”, defines an intermediate orientation that is halfway between thatof the two nodes, and considers the constitutive law and the resulting moment attached to thatintermediate orientation; as a consequence, the resulting internal moment does not depend on thenode sequence even when anisotropic constitutive laws are considered.

The relative rotation vector is computed in analogy with the drive hinge joint (DriveHingeJoint).

θ = ax(exp−1

(RT

1hR2h

))(9.221)

where R1h, R2h are the matrices that express the orientation of each side of the hinge in the globalreference frame, defined as

R1h = R1R1h (9.222a)

R2h = R2R2h (9.222b)

and R1h, R2h are the matrices that express the orientation of each side of the hinge with respect to thecorresponding node. The perturbation of R1h, R2h yields

δR1h = θ1δ ×R1R1h = θ1δ ×R1h (9.223a)

δR2h = θ2δ ×R2R2h = θ2δ ×R2h (9.223b)

since matrices R1h, R2h are constant.Since the relative orientationRT

1hR2h is a rotation about an axis parallel to θ, θ itself does not changewhen it is referred to any intermediate orientation between I and RT

1hR2h, namely

RT1hR2hθ = θ. (9.224)

The same applies for any relative orientation tensor built from a rotation vector αθ parallel to θ, whatevervalue the scalar α assumes.

The relative angular velocity is defined as the derivative of the relative orientation matrix

ω × =d

dt

(RT

1hR2h

) (RT

1hR2h

)T

=(

RT1hR2h +RT

1hR2h

)

RT2hR1h

= RT1hω1 ×T R1h +RT

1hω2 ×R1h

= RT1h (ω2 − ω1)×R1h (9.225)

so

ω = RT1h (ω2 − ω1) (9.226)

81

Page 83: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Attached Deformable Hinge

The constitutive law is defined attached to the reference frame of node 1; the value of the relative rotationvector, θ, does not vary, according to what stated earlier.

The perturbation of θ yields

θδ = RT1h (θ2δ − θ1δ) (9.227)

which, according to the simplifications of the updated-updated approach, becomes

θδuu= RT

1h (δg2 − δg1) (9.228)

The perturbation of the relative angular velocity of Equation (9.226), according to the simplificationsof the updated-updated approach, yields

δω = RT1h ((ω2 − ω1)× θ1δ + δω2 − δω1)

uu= RT

1h ((ω2 − ω1)× δg1 + δg2 − ω2 × δg2 − δg1 + ω1 × δg1)

= RT1h (δg2 − δg1 − ω2 × (δg2 − δg1)) . (9.229)

The internal moment M is computed as function of the relative rotation and velocity

M = M (θ,ω) . (9.230)

The nodal moments result from the VWP as

δL = θTδ M

= (θ2δ − θ1δ)T R1hM , (9.231)

which states that the internal moment is applied to each node after pre-multiplication by R1h

Mi = (−1)iR1hM (θ,ω) . (9.232)

Its linearization yields

δMi = (−1)iR1h

(

M/θδθ + M/ωδω)

−Mi × θ1δ (9.233)

The complete linearized problem is

[M/ω −M/ω

−M/ω M/ω

]δω1

δω2

+

[−M/ω (ω2 − ω1)× 0M/ω (ω2 − ω1)× 0

]θ1δθ2δ

+

[M/θ −M/θ

−M/θ M/θ

]θ1δθ2δ

+

[M × 0−M × 0

]θ1δθ2δ

=

M

−M

, (9.234)

where

M/θ = R1hM/θΓ (θ)−1RT

1h (9.235a)

M/ω = R1hM/ωRT1h. (9.235b)

82

Page 84: MBDyn Theory and Developer’s Manual Version 1.X-Devel

According to the simplifications of the updated-updated approach, the linearization becomes[M/ω −M/ω

−M/ω M/ω

]δg1δg2

+

[−M/ωω2 × M/ωω2 ×M/ωω2 × −M/ωω2 ×

]δg1δg2

+

[M/θ −M/θ

−M/θ M/θ

]δg1δg2

+

[M × 0−M × 0

]δg1δg2

uu=

M

−M

. (9.236)

Invariant Deformable Hinge

The rotation θ = θ/2 is used to define an intermediate reference frame for the joint, whose orientationwith respect to node 1 is

R = exp

(1

2exp−1

(RT

1hR2h

))

= exp(

θ ×)

(9.237)

The orientation of the intermediate reference frame with respect to node 2 is defined by −θ, i.e. RT .The orientation of the intermediate frame with respect to the global frame is thus

R = R1hR (9.238a)

= R2hRT (9.238b)

The perturbation of R is

δR = θδ × R (9.239)

where

δθ =1

2δθ (9.240)

and thus

θδ = Γ(

θ) 1

2Γ (θ)

−1θδ (9.241)

Another interesting result is obtained by considering that the perturbation of the relative orientationmatrix must be equal to the perturbation of the square of the half-relative orientation, namely

θδ × = δ(

RR)(

RR)T

= θδ × + Rθδ × RT (9.242)

and thus

θδ =(

I + R)

θδ (9.243)

The matrix(

I + R)

has very interesting properties.

83

Page 85: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Property 1.

(

I + R)

RT =(

I + RT)

(9.244)

Property 2.

RT(

I + R)

=(

I + RT)

(9.245)

Property 3.

(

I + RT)

R =(

I + R)

(9.246)

Property 4.

R(

I + RT)

=(

I + R)

(9.247)

Property 5. As a consequence of Equations (9.244, 9.247),

R(

I + R)

RT =(

I + R)

(9.248)

which basically means that the transformation(

I + R)

is coaxial with the rotation described by matrix

R. A similar property exists for matrix(

I + RT)

(e.g. by transposing Equation (9.248)), while the

following

Property 6.

RT(

I + R)

R =(

I + R)

(9.249)

is true as a consequence of Equations (9.245, 9.246).

Property 7. Another interesting property is

I −(

I + R)−1

=(

I + RT)−1

. (9.250)

This can be easily proved by considering that, according to Equation (9.247),

(

I + R)−1

=(

R(

I + RT))−1

=(

I + RT)−1

RT , (9.251)

and, as a consequence,

I =(

I + RT)−1 (

I + RT)

(9.252)

which reduces again to the identity matrix.

84

Page 86: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Property 8.

(

I + R)T

=(

I + RT)

(9.253)

Property 9.

(

I + R)−T

=(

I + RT)−1

(9.254)

Property 10. As a consequence of Equations (9.244–9.247),

R(

I + R)

= R1h

(

I + RT)

(9.255)

and

R(

I + RT)−1

= R1h

(

I + R)−1

(9.256)

and all other combinations.

It is convenient to define

I = R(

I + R)−1

RT . (9.257)

According to Equations (9.243) and (9.227), the perturbation of the intermediate relative rotationvector yields

θδ =(

I + R)−1

θδ

=(

I + R)−1

RT1h (θ2δ − θ1δ)

=(

I + RT)−1

RT (θ2δ − θ1δ) . (9.258)

The perturbation of R, according to Equations (9.238a) and (9.238b), respectively yields

δRRT = θ1δ ×+R1hθδ ×RT1h

= θ2δ ×−Rθδ × RT , (9.259)

so

θδ = θ1δ +R1hθδ Eq. (9.238a)

= θ1δ +R1h

(

I + R)−1

RT1h (θ2δ − θ1δ)

= θ1δ + R(

I + R)−1

RT (θ2δ − θ1δ)

= θ2δ − Rθδ Eq. (9.238b)

= θ2δ − R(

I + R)−1

RT1h (θ2δ − θ1δ)

= θ2δ − R(

I + RT)−1

RT (θ2δ − θ1δ)

= Iθ2δ + ITθ1δ (9.260)

85

Page 87: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The perturbation of matrix I yields

δI = δR(

I + R)−1

RT

+ R δ(

I + R)−1

RT

+ R(

I + R)−1

δRT (9.261a)

= θδ × I − R(

I + R)−1

θδ × R(

I + R)−1

RT + Iθδ × T

= θδ × I − R(

I + R)−1

RT1hR1h

︸ ︷︷ ︸

I

θδ ×RT1hR1h

︸ ︷︷ ︸

I

R(

I + R)−1

RT − Iθδ ×

= θδ × I − R(

I + R)−1

RT1h

︸ ︷︷ ︸

IT

R1hθδ ×RT1h

︸ ︷︷ ︸

(R1hθδ)×

R︷ ︸︸ ︷

R1hR(

I + R)−1

RT

︸ ︷︷ ︸

I

−Iθδ ×

= θδ × I − IT

R1h

(

I + R)−1

RT1h

︸ ︷︷ ︸

I

(θ2δ − θ1δ)

× I − Iθδ ×

=(

Iθ2δ + ITθ1δ

)

× I − IT(

I (θ2δ − θ1δ))

× I − I(

Iθ2δ + ITθ1δ

)

× (9.261b)

The perturbation of matrix I is generally useful when multiplying a generic vector v, resulting in

δIv =((

Iv × −(

Iv)

×)

IT − IT(

Iv)

× I)

θ1δ

+((

Iv × −(

Iv)

×)

I + IT(

Iv)

× I)

θ2δ

= I1(v)θ1δ + I2(v)θ2δ (9.262a)

δ(

IT)

v =((

ITv × −(

ITv)

×)

IT + IT(

Iv)

× I)

θ1δ

+((

ITv × −(

ITv)

×)

I − IT(

Iv)

× I)

θ2δ

=(

IT)

1(v)θ1δ +

(

IT)

2(v)θ2δ. (9.262b)

Relative Rotation Vector. The relative rotation vector is θ; by definition, this does not dependon the reference frame that is considered, among those intermediate between node 1 and 2, since it iscoaxial to any rotation intermediate between the orientations of the two nodes; in detail

RTθ = θ, (9.263)

since θ is co-axial to θ by construction.

86

Page 88: MBDyn Theory and Developer’s Manual Version 1.X-Devel

This implies that

δθ = δ(

RTθ)

= RT(

θ × θδ + δθ)

= RT(

θ × Γ(

θ)

δθ + δθ)

= RT

(

2θ × Γ(

θ) δθ

2+ δθ

)

= RT(

θ × Γ(

θ)

+ I)

δθ

= δθ, (9.264)

since, by definition,

I + θ × Γ(

θ)

= R. (9.265)

The perturbation of the relative rotation vector θ,

δθ = δθ, (9.266)

is used as perturbation of the measure of the straining of the joint.

Relative Angular Velocity. The relative angular velocity between the two nodes, in the intermediatereference frame R, is

ω = RT (ω2 − ω1) , (9.267)

which corresponds to that of the attached case, Eq. (9.226), but projected in the material frame by RT

instead of the reference frame of node 1,R1h. The linearization of the angular velocity of Equation (9.267)

87

Page 89: MBDyn Theory and Developer’s Manual Version 1.X-Devel

yields

δω = RT(

(ω2 − ω1)×(

θ1δ +R1hθδ

)

+ δω2 − δω1

)

= RT (δω2 − δω1)

+ RT (ω2 − ω1)×R1h

(

I + R)−1

RT1hθ2δ

+ RT (ω2 − ω1)×(

I −R1h

(

I + R)−1

RT1h

)

θ1δ

= RT (δω2 − δω1)

+ RT (ω2 − ω1)× R(

I + R)−1

RTθ2δ

+ RT (ω2 − ω1)× R(

I −(

I + R)−1)

RTθ1δ

= RT (δω2 − δω1)

+ ω ×((

I + R)−1

RTθ2δ +

(

I −(

I + R)−1)

RTθ1δ

)

= RT (δω2 − δω1)

+ ω ×((

I + R)−1

RTθ2δ +(

I + RT)−1

RTθ1δ

)

= RT(

δω2 − δω1 + (ω2 − ω1)×(

Iθ2δ + ITθ1δ

))

(9.268)

since

R(

I + R)

RT =(

I + R)

(9.269)

and thus(

I + R)−1

= R−T(

I + R)−1

R−1

= R(

I + R)−1

RT , (9.270)

where Equation (9.250) has been used.

Intermediate Angular Velocity. Consider now

ω × =˙RRT

= ω1 ×+R1hω ×RT1h

= ω2 ×−Rω × RT , (9.271)

where ω is the angular velocity associated to the differentiation of matrix R with respect to time:

ω = ˙RRT . (9.272)

A relationship between that derivative and the remaining angular velocities results from

ω × =d

dt

(

RR)(

RR)T

= ω × + Rω × RT , (9.273)

88

Page 90: MBDyn Theory and Developer’s Manual Version 1.X-Devel

so

ω =(

I + R)

ω; (9.274)

as a consequence,

ω =(

I + R)−1

RT1h (ω2 − ω1) . (9.275)

The absolute velocity of the intermediate orientation results in

ω = Iω2 + ITω1; (9.276)

its perturbation becomes

δω = δ(

Iω2 + ITω1

)

= Iδω2 + IT δω1

+

(

Iω2 × + ITω1 ×)

I

−(

Iω2 + ITω1

)

× I+I(

IT (ω2 − ω1))

× IT

θ2δ

+

(

Iω2 × + ITω1 ×)

IT

−(

Iω2 + ITω1

)

× IT

−I(

IT (ω2 − ω1))

× IT

θ1δ

= Iδω2 + IT δω1 + I2θ2δ + I1θ1δ

uu= Iδg2 + I

T δg1 +(

I2 − Iω2 ×)

δg2 +(

I1 − ITω1 ×)

δg1 (9.277)

Equilibrium Equations. The nodal moment results from the VWP, considering the perturbation ofthe relative orientation θδ,

δL = θT

δ M

= (θ2δ − θ1δ)T RM , (9.278)

which corresponds to

Mi = (−1)iRM

(θ,ω

). (9.279)

It depends on the relative rotation vector θ = RTθ = θ, and on the relative angular velocity ω, illustratedby Equation (9.267), expressed in the intermediate reference frame.

Equilibrium Perturbation. The perturbation of the moment then yields

δMi = (−1)iR(

M/θδθ + M/ωδω)

−Mi × R(

I + R)−1

RTθ2δ

−Mi × R(

I + RT)−1

RTθ1δ

= (−1)iR(

M/θδθ + M/ωδω)

−Mi ×(

Iθ2δ + ITθ1δ

)

. (9.280)

89

Page 91: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The complete linearized problem is[M/ω −M/ω

−M/ω M/ω

]δω1

δω2

+

[−M/ω (ω2 − ω1)× IT −M/ω (ω2 − ω1)× IM/ω (ω2 − ω1)× IT M/ω (ω2 − ω1)× I

]θ1δθ2δ

+

[M/θ −M/θ

−M/θ M/θ

]θ1δθ2δ

+

[M × IT M × I−M × IT −M × I

]θ1δθ2δ

=

M

−M

(9.281)

where

M/θ = RM/θΓ (θ)−1RT

1h (9.282a)

M/ω = RM/ωRT . (9.282b)

Accounting for the simplifications of the updated-updated approach, it becomes[M/ω −M/ω

−M/ω M/ω

]δg1δg2

+

−M/ω

(

ω2 × IT + ω1 × I)

M/ω

(

ω2 × IT + ω1 × I)

M/ω

(

ω2 × IT + ω1 × I)

−M/ω

(

ω2 × IT + ω1 × I)

δg1δg2

+

[M/θ −M/θ

−M/θ M/θ

]δg1δg2

+

[M × IT M × I−M × IT −M × I

]δg1δg2

uu=

M

−M

(9.283)

Note on attached vs. invariant deformable hinge

The moment applied by the attached formulation to node 1, in the global reference frame, is

Ma = R1hMa (θ) , (9.284)

while the moment applied by the invariant formulation to node 1, in the global reference frame, is

Mi = RMi (θ)

= R1hRMi

(

RTθ)

, (9.285)

since RTθ = θ. This means that whatever formula is used for the constitutive law, in the invariant case,it is equivalent to using an attached formula with a constitutive law re-oriented by R,

Ma (θ) = RMi

(

RTθ)

; (9.286)

similar considerations apply to the viscous portion of the constitutive law. This transformation shouldbe kept in mind when determining the properties of the deformable component. In fact, exchanging thelocations where the constitutive law is evaluated implies a transformation of the constitutive matrix; incase a linear elastic constitutive law,

Mi = Kiθ, (9.287)

90

Page 92: MBDyn Theory and Developer’s Manual Version 1.X-Devel

with a constant (symmetric, positive definite) Ki matrix, is used for the invariant formula, which appearsto be a natural solution for simple elastic hinges, it is equivalent to a nonlinear elastic constitutive lawwhen transposing it into the attached formulation. The two formulas are coincident, and independentfrom θ, only in case of an isotropic spring, namely Ki = kI.

A “natural” solution, for a geometrically and materially symmetrical component, behaves the samewhen the order of the nodes is swapped. This corresponds to the “invariant” formula for the deformablehinge. However, typical experiments to determine the mechanical behavior of a component would ratherconsist in straining it while measuring the resulting loads at one or both ends, not in the intermediatelocation where the constitutive law would be naturally applied. As a consequence, a “natural” procedurefor the determination of the constitutive law would consist in determining the Ma (θ) law first; then,assuming the moment can be expressed in the form

RT1hMa (θ) = Ma (θ) , (9.288)

matrix R would be computed from the measured relative rotation of the extremities of the component,θ = θ/2, and the constitutive law Mi (θ) would be computed as

Mi

(

RTθ)

= RTMa (θ) (9.289)

to yield the invariant constitutive law.

9.2.3 Deformable Displacement Joint

The deformable displacement joint applies an internal force to two nodes at a specified point that maybe offset from the nodes. The force may depend on the relative position and velocity of the nodes at thepoint of application through a 3D constitutive law.

The points whose relative displacement represents the measure of the straining can be offset from thenodes by rigid offsets f1 and f2, which are defined in the reference frame of the respective nodes. So theoffsets in the global reference frame are

f1 = R1f1 (9.290a)

f2 = R2f2. (9.290b)

The constitutive law is expressed in a reference frame that may be rotated from that of the node by rigidrotations R1h and R2h. So the orientations of the constitutive law in the global reference frame are

R1h = R1R1h (9.291a)

R2h = R2R2h. (9.291b)

As for the deformable hinge, the constitutive law of this joint may be either attached to one nodeor defined in an intermediate reference frame that accounts for the relative orientation of the two nodes,so that the order in which the nodes are defined becomes irrelevant.

The relative position in the absolute reference frame, d, is

d = x2 + f2 − x1 − f1. (9.292)

The relative velocity is

d = x2 + ω2 × f2 − x1 − ω1 × f1. (9.293)

91

Page 93: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Attached Deformable Displacement Joint

The “attached” form of the deformable displacement joint is obtained by projecting the relative positiond in a reference frame attached to node 1:

d = RT1hd (9.294)

The relative velocity is

˙d = RT

1h

(

d− ω1 × d)

, (9.295)

but it can be replaced by

˙d = RT

1h

(

d1 − ω1 × d1)

, (9.296)

where

d1 = x2 + f2 − x1 (9.297a)

d1 = x2 + ω2 × f2 − x1, (9.297b)

since the relative velocity associated to the rotation of f1, the offset of the reference point attached tonode 1, is zero by definition. The linearization of the distance yields

δd = RT1h (δd− d× θ1δ)

= RT1h (δx2 − f2 × θ2δ − δx1 + f1 × θ1δ) +RT

1hd× θ1δ= RT

1h (δx2 − f2 × θ2δ − δx1 + (x2 + f2 − x1)× θδ1)= RT

1h (δx2 − f2 × θ2δ − δx1 + d1 × θ1δ)uu= RT

1h (δx2 − f2 × δg2 − δx1 + d1 × δg1) (9.298)

while the linearization of the relative velocity yields

δ˙d = RT

1h

(

δd+ d× δω1 − ω1 × δd+(

d− ω1 × d)

× θ1δ)

= RT1h

δx2 − f2 × δω2 − δx1 + d1 × δω1

− ω1 × δx2 − (ω2 − ω1)× f2 × θ2δ+ ω1 × δx1 +

(

d− ω1 × d)

× θ1δ

uu= RT

1h

δx2 − f2 × δg2 − δx1 + d1 × δg1− ω1 × δx2 − ((ω2 × f2)× − ω1 × f2 × ) δg2

+ ω1 × δx1 +(

d1 × − ω1 × d1 ×)

δg1

(9.299)

The nodal forces and moments result from the VWP

δL = δdT F

= (δx2 − f2 × θ2δ − δx1 + d1 × θ1δ)T R1hF , (9.300)

which corresponds to

Fi = (−1)iR1hF

(

d,˙d)

(9.301a)

Mi = di × Fi (9.301b)

92

Page 94: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where d1 has already been defined, and

d2 = f2; (9.302)

note that

ω2 × f2 = ω2 × d2= d2. (9.303)

Their linearization yields

δFi = (−1)iR1h

(

F/dδd+ F/˙dδ˙d)

− Fi × θ1δ (9.304a)

δMi = di × δFi − Fi × δdi (9.304b)

The complete linearized problem, after applying the updated-updated approximation, is

F/˙d

−F/˙dd1 × −F

/˙d

F/˙dd2 ×

d1 × F/˙d

−d1 × F/˙dd1 × −d1 × F/

˙d

d1 × F/˙dd2 ×

−F/˙d

F/˙dd1 × F

/˙d

−F/˙dd2 ×

−d2 × F/˙d

d2 × F/˙dd1 × d2 × F/

˙d

−d2 × F/˙dd2 ×

δx1

δg1δx2

δg2

+

−F/˙dω1 ×

−d1 × F/˙dω1 ×

F/˙dω1 ×

d2 × F/˙dω1 ×

δx1 +

−F/˙d

(

d1 × − ω1 × d1 ×)

−d1 × F/˙d

(

d1 × − ω1 × d1 ×)

F/˙d

(

d1 × − ω1 × d1 ×)

d2 × F/˙d

(

d1 × − ω1 × d1 ×)

δg1

+

F/˙dω1 ×

d1 × F/˙dω1 ×

−F/˙dω1 ×

−d2 × F/˙dω1 ×

δx2 +

F/˙d

(

d2 × − ω1 × d2 ×)

d1 × F/˙d

(

d2 × − ω1 × d2 ×)

−F/˙d

(

d2 × − ω1 × d2 ×)

−d2 × F/˙d

(

d2 × − ω1 × d2 ×)

δg2

+

F/d −F/dd1 × −F/d F/dd2 ×d1 × F/d −d1 × F/dd1 × −d1 × F/d d1 × F/dd2 ×−F/d F/dd1 × F/d −F/dd2 ×

−d2 × F/d d2 × F/dd1 × d2 × F/d −d2 × F/dd2 ×

δx1

δg1δx2

δg2

+

0 F × 0 0−F × d1 × F × F × −F × d2 ×

0 −F × 0 00 −d2 × F × 0 F × d2 ×

δx1

δg1δx2

δg2

=

F

d1 × F−F

−d2 × F

(9.305)

where

F/˙d= R1hF/

˙dRT

1h (9.306a)

F/d = R1hF/dRT1h (9.306b)

93

Page 95: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Invariant Deformable Displacement Joint

The invariant form of the deformable displacement joint assumes that the constitutive properties ofthe component, that explicitly depend only on the relative position of the nodes, is defined in a referenceframe that is intermediate between those of node 1 and 2, much like the invariant form of the deformablehinge joint.

The distance between the two reference points, expressed in the global reference frame, is pulled backin the intermediate material reference frame by the transpose of matrix R

d = RTd (9.307)

The relative velocity is

˙d =

˙RTd+ RT d

= RT(

d− ω × d)

; (9.308)

for a discussion of the properties of the entities that appear in Eq. (9.276) see Section 9.2.2.The perturbation of the relative position yields

δd = RT(

δd+ d× θδ)

(9.309)

where

δd = δx2 − f2 × θ2δ − δx1 + f1 × θ1δuu= δx2 − f2 × δg2 − δx1 + f1 × δg1 (9.310a)

θδ = Iθ2δ + ITθ1δ

uu= Iδg2 + I

T δg1, (9.310b)

and thus

δd = RT(

δx2 +(

d× I − f2 ×)

θ2δ − δx1 +(

d× IT + f1 ×)

θ1δ

)

uu= RT

(

δx2 +(

d× I − f2 ×)

δg2 − δx1 +(

d× IT + f1 ×)

δg1

)

. (9.311)

The perturbation of the relative velocity yields

δ˙d = RT

(

δd+ d× δω − ω × δd+(

d− ω × d)

× θδ)

(9.312)

where

δd = δx2 − f2 × δω2 − ω2 × f2 × θ2δ − δx1 + f1 × δω1 + ω1 × f1 × θ1δuu= δx2 − f2δg2 + (f2 × ω2)× δg2 − δx1 + f1δg1 − (f1 × ω1)× δg1. (9.313)

94

Page 96: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The computation of δω has been illustrated in Section 9.2.2. Thus,

δ˙d = RT

(

δx2 − f2 × δω2 − ω2 × f2 × θ2δ − δx1 + f1 × δω1 + ω1 × f1 × θ1δ

+ d×(

Iδω2 + IT δω1 + I2θ2δ + I1θ1δ

)

− ω × (δx2 − f2 × θ2δ − δx1 + f1 × θ1δ)+(

d− ω × d)

×(

Iθ2δ + ITθ1δ

))

= RT(

δx2 − δx1 +(

d× I − f2 ×)

δω2 +(

d× IT + f1 ×)

δω1

− ω × δx2 + ω × δx1

+(

(ω − ω2)× f2 × + d× I2 +(

d− ω × d)

× I)

θ2δ

+(

− (ω − ω1)× f1 × + d× I1 +(

d− ω × d)

× IT)

θ1δ

)

uu= RT

(

δx2 − δx1 +(

d× I − f2 ×)

δg2 +(

d× IT + f1 ×)

δg1

− ω × δx2 + ω × δx1

+

(

IT (ω1 − ω2))

× f2 × −(

d× I − f2 ×)

ω2 ×+d× I2 +

(

d− ω × d)

× I

δg2

+

(

I (ω1 − ω2))

× f1 × −(

d× IT + f1 ×)

ω1 ×+d× I1 +

(

d− ω × d)

× IT

δg1

(9.314)

The force and the moment result from the VWP

δL = δdT F

=(

δd+ d× θδ)T

RF

=(

δx2 +(

d× I − f2 ×)

θ2δ − δx1 +(

d× IT + f1 ×)

θ1δ

)T

RF (9.315)

and, after defining

F = RF(

d,˙d)

, (9.316)

are

F1 = −F (9.317a)

M1 = −(

f1 × + Id×)

F (9.317b)

F2 = F (9.317c)

M2 =(

f2 × − ITd×)

F . (9.317d)

Their linearization, after defining

δF = R(

F/dδd+ F/˙dδ˙d)

− F × θδ, (9.318)

95

Page 97: MBDyn Theory and Developer’s Manual Version 1.X-Devel

yields

δF1 = −δF (9.319a)

δM1 =(

f1 × + Id×)

δF − δf1 × F − δId× F − Iδd× F (9.319b)

δF2 = δF (9.319c)

δM2 =(

f2 × − ITd×)

δF + δf2 × F − δITd× F − IT δd× F (9.319d)

After setting

F/d = RF/dRT (9.320a)

F/˙d= RF

/˙dRT (9.320b)

and

A1 =(

f1 × + Id×)

(9.321a)

A2 =(

f2 × − ITd×)

(9.321b)

B1 =((

I (ω1 − ω2))

× f1 × + d× I1 +(

d− ω × d)

× IT)

(9.321c)

B2 =((

IT (ω1 − ω2))

× f2 × + d× I2 +(

d− ω × d)

× I)

(9.321d)

the complete linearized problem is

F/˙d

F/˙dAT

1 −F/˙d

−F/˙dAT

2

A1F/˙d

A1F/˙dAT

1 −A1F/˙d

−A1F/˙dAT

2

−F/˙d

−F/˙dAT

1 F/˙d

F/˙dAT

2

−A2F/˙d

−A2F/˙dAT

1 A2F/˙d

A2F/˙dAT

2

δx1

δω1

δx2

δω2

+

−F/˙dω × −F

/˙dB1 F

/˙dω × −F

/˙dB2

−A1F/˙dω × −A1F

/˙dB1 A1F

/˙dω × −A1F

/˙dB2

F/˙dω × F

/˙dB1 −F

/˙dω × F

/˙dB2

A2F/˙dω × A2F

/˙dB1 −A2F

/˙dω × A2F

/˙dB2

δx1

θ1δδx2

θ2δ

+

F/d F/dAT1 −F/d −F/dA

T2

A1F/d A1F/dAT1 −A1F/d −A1F/dA

T2

−F/d −F/dAT1 F/d F/dA

T2

−A2F/d −A2F/dAT1 A2F/d A2F/dA

T2

δx1

θ1δδx2

θ2δ

+

0 F × IT

−IF × A1F × IT− ITF × f1 × − I1(d×F )

0 −F × IT

−ITF × −A2F × IT− ITF × f1 × −

(

IT)

1(d×F )

δx1

θ1δ

+

0 F × I

IF × A1F × I − IF × f2 × − I2(d×F )

0 −F × I

ITF × −A2F × I + IF × f2 × +(

IT)

2(d×F )

δx2

θ2δ

=

F

A1F

−F

−A2F

(9.322)

96

Page 98: MBDyn Theory and Developer’s Manual Version 1.X-Devel

When the updated-updated approach is considered, after defining

B1 = B1 +AT1 ω1 × (9.323a)

B2 = B2 −AT2 ω2 × , (9.323b)

one obtains

F/˙d

F/˙dAT

1 −F/˙d

−F/˙dAT

2

A1F/˙d

A1F/˙dAT

1 −A1F/˙d

−A1F/˙dAT

2

−F/˙d

−F/˙dAT

1 F/˙d

F/˙dAT

2

−A2F/˙d

−A2F/˙dAT

1 A2F/˙d

A2F/˙dAT

2

δx1

δg1δx2

δg2

+

−F/˙dω × −F

/˙dB1 F

/˙dω × −F

/˙dB2

−A1F/˙dω × −A1F

/˙dB1 A1F

/˙dω × −A1F

/˙dB2

F/˙dω × F

/˙dB1 −F

/˙dω × F

/˙dB2

A2F/˙dω × A2F

/˙dB1 −A2F

/˙dω × A2F

/˙dB2

δx1

δg1δx2

δg2

+

F/d F/dAT1 −F/d −F/dA

T2

A1F/d A1F/dAT1 −A1F/d −A1F/dA

T2

−F/d −F/dAT1 F/d F/dA

T2

−A2F/d −A2F/dAT1 A2F/d A2F/dA

T2

δx1

δg1δx2

δg2

+

0 F × IT

−IF × A1F × IT− ITF × f1 × − I1(d×F )

0 −F × IT

−ITF × −A2F × IT− ITF × f1 × −

(

IT)

1(d×F )

δx1

δg1

+

0 F × I

IF × A1F × I − IF × f2 × − I2(d×F )

0 −F × I

ITF × −A2F × I + IF × f2 × +(

IT)

2(d×F )

δx2

δg2

uu=

F

A1F

−F

−A2F

(9.324)

9.2.4 Deformable Joint

The deformable joint applies an internal force and an internal moment to two nodes at a specified pointthat may be offset from the nodes; the force and the moment may depend on the relative position andvelocity at the point of application and on the relative rotation vector and angular velocity of the nodesthrough a 6D constitutive law.

Although it may appear as a combination of the Deformable Hinge and the Deformable Displace-ment Joint, and despite some commonality of code, it is a bit more general because the internal forceand moment may depend on the relative displacement and orientation, i.e. the displacements and theorientations are coupled. However, if a simple linear diagonal constitutive law is used, the same resultwith a bit less overhead is obtained by using a combination of a deformable hinge and a deformabledisplacement joint.The deformable joint equations can be computed by combining those of the deformable hinge (Sec-tion 9.2.2) and of the deformable displacement joint (Section 9.2.3), considering that both the force Fand the moment M simultaneously depend on the relative displacement, d, the relative orientation, θ,

and their time derivatives,˙d and ω.

97

Page 99: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Attached Deformable Joint

Internal force and moment:

Fi = (−1)iR1hF

(

d,θ,˙d,ω

)

(9.325a)

Mi = di × Fi + (−1)iR1hM

(

d,θ,˙d,ω

)

. (9.325b)

Their linearization, after defining

F/d = R1hF/dRT1h (9.326a)

F/˙d= R1hF/

˙dRT

1h (9.326b)

F/θ = R1hF/θΓ (θ)−1RT

1h (9.326c)

F/ω = R1hF/ωRT1h (9.326d)

M/d = R1hM/dRT1h (9.326e)

M/˙d= R1hM/

˙dRT

1h (9.326f)

M/θ = R1hM/θΓ (θ)−1RT

1h (9.326g)

M/ω = R1hM/ωRT1h, (9.326h)

98

Page 100: MBDyn Theory and Developer’s Manual Version 1.X-Devel

yields the viscous contribution to perturbation,

F/˙d

d1 × F/˙d+M

/˙d

−F/˙d

−d2 × F/˙d−M

/˙d

δx1 +

−F/˙dd1 × + F/ω

−d1 ×

(

F/˙dd1 × − F/ω

)

−M/˙dd1 × +M/ω

F/˙dd1 × − F/ω

d2 ×

(

F/˙dd1 × − F/ω

)

+M/˙dd1 × −M/ω

δg1

+

−F/˙d

−d1 × F/˙d−M

/˙d

F/˙d

d2 × F/˙d+M

/˙d

δx2 +

F/˙dd2 × − F/ω

d1 ×

(

F/˙dd2 × − F/ω

)

+M/˙dd2 × −M/ω

−F/˙dd2 × + F/ω

−d2 ×

(

F/˙dd2 × − F/ω

)

−M/˙dd2 × +M/ω

δg2

+

−F/˙dω1 ×

(

d1 × F/˙d+M

/˙d

)

ω1 ×

F/˙dω1 ×

(

d2 × F/˙d+M

/˙d

)

ω1 ×

δx1

+

−F/˙d

(

d1 × − ω1 × d1 ×

)

− F/ωω2 ×

(

d1 × F/˙d+M

/˙d

)(

d1 × − ω1 × d1 ×

)

(

d1 × F/ω +M/ω

)

ω2 ×

F/˙d

(

d1 × − ω1 × d1 ×

)

+ F/ωω2 ×(

d2 × F/˙d+M

/˙d

)(

d1 × − ω1 × d1 ×

)

+(

d2 × F/ω +M/ω

)

ω2 ×

δg1

+

F/˙dω1 ×

(

d1 × F/˙d+M

/˙d

)

ω1 ×

−F/˙dω1 ×

(

d2 × F/˙d+M

/˙d

)

ω1 ×

δx2

+

F/˙d

(

d2 × − ω1 × d2 ×

)

+ F/ωω2 ×(

d1 × F/˙d+M

/˙d

)(

d2 × − ω1 × d2 ×

)

+(

d1 × F/ω +M/ω

)

ω2 ×

−F/˙d

(

d2 × − ω1 × d2 ×

)

− F/ωω2 ×

(

d2 × F/˙d+M

/˙d

)(

d2 × − ω1 × d2 ×

)

+(

d2 × F/ω +M/ω

)

ω2 ×

δg2 (9.327)

the elastic contribution to perturbation,

F/d

d1 × F/d +M/d

−F/d

−d2 × F/d −M/d

δx1 +

−F/dd1 × + F/θ

−d1 ×

(

F/dd1 × − F/θ

)

−M/dd1 × +M/θ

F/dd1 × − F/θ

d2 ×

(

F/dd1 × − F/θ

)

+M/dd1 × −M/θ

δg1

+

−F/d

−d1 × F/d −M/d

F/d

d2 × F/d +M/d

δx2 +

F/dd2 × − F/θ

d1 ×

(

F/dd2 × − F/θ

)

+M/dd2 × −M/θ

−F/dd2 × + F/θ

−d2 ×

(

F/dd2 × − F/θ

)

−M/dd2 × +M/θ

δg2 (9.328)

and a common contribution to perturbation,

0 F × 0 0

−F × d1 × F × +M × F × −F × d2 ×

0 −F × 0 0

0 −d2 × F × −M × 0 F × d2 ×

δx1

δg1δx2

δg2

uu=

F

d1 × F +M

−F

−d2 × F −M

(9.329)

99

Page 101: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The contribution of Eq. (9.329) is always present. The contribution of Eq. (9.328) is present in the elasticand in the viscoelastic variants of the joint. The contribution of Eq. (9.327) is present in the viscous andin the viscoelastic variants of the joint.

Invariant Deformable Joint

The force and the moment, after defining

F = RF(

d,˙d,θ,ω

)

(9.330a)

M = RM(

d,˙d,θ,ω

)

, (9.330b)

are

F1 = −F (9.331a)

M1 = −(

f1 × + Id×)

F −M (9.331b)

F2 = F (9.331c)

M2 =(

f2 × − ITd×)

F +M . (9.331d)

Their linearization, after defining

F/d = RF/dRT (9.332a)

F/˙d= RF

/˙dRT (9.332b)

F/θ = RF/θΓ (θ)−1RT

1h (9.332c)

F/ω = RF/ωRT (9.332d)

M/d = RM/dRT (9.332e)

M/˙d= RM

/˙dRT (9.332f)

M/θ = RM/θΓ (θ)−1RT

1h (9.332g)

M/ω = RM/ωRT , (9.332h)

and exploiting the definitions of Eqs (9.321) and

C1 = (ω2 − ω1)× IT (9.333a)

C2 = (ω2 − ω1)× I, (9.333b)

100

Page 102: MBDyn Theory and Developer’s Manual Version 1.X-Devel

yields

F/˙d

F/˙dAT

1 + F/ω

A1F/˙d

A1

(

F/˙dAT

1 + F/ω

)

+M/˙dAT

1 +M/ω

−F/˙d

−F/˙dAT

1 − F/ω

−A2F/˙d

−A2

(

F/˙dAT

1 + F/ω

)

−M/˙dAT

1 −M/ω

δx1

δω1

+

−F/˙d

−F/˙dAT

2 − F/ω

−A1F/˙d

−A1

(

F/˙dAT

2 + F/ω

)

−M/˙dAT

2 −M/ω

F/˙d

F/˙dAT

2 + F/ω

A2F/˙d

A2

(

F/˙dAT

2 + F/ω

)

+M/˙dAT

2 +M/ω

δx2

δω2

+

−F/˙dω × −F

/˙dB1 − F/ωC1

−A1F/˙dω × −A1

(

F/˙dB1 + F/ωC1

)

−M/˙dB1 −M/ωC1

F/˙dω × F

/˙dB1 + F/ωC1

A2F/˙dω × A2

(

F/˙dB1 + F/ωC1

)

+M/˙dB1 +M/ωC1

δx1

θ1δ

+

F/˙dω × −F

/˙dB2 − F/ωC2

A1F/˙dω × −A1

(

F/˙dB2 + F/ωC2

)

−M/˙dB2 −M/ωC2

−F/˙dω × F

/˙dB2 + F/ωC2

−A2F/˙dω × A2

(

F/˙dB2 + F/ωC2

)

+M/˙dB2 +M/ωC2

δx2

θ2δ

+

F/d F/dAT1 + F/θ

A1F/d A1

(

F/dAT1 + F/θ

)

+M/dAT1 +M/θ

−F/d −F/dAT1 − F/θ

−A2F/d −A2

(

F/dAT1 + F/θ

)

−M/dAT1 −M/θ

δx1

θ1δ

+

−F/d −F/dAT2 − F/θ

−A1F/d −A1

(

F/dAT2 + F/θ

)

−M/dAT2 −M/θ

F/d F/dAT2 + F/θ

A2F/d A2

(

F/dAT2 + F/θ

)

+M/dAT2 +M/θ

δx2

θ2δ

+

0 F × IT

−IF × (A1F × +M × ) IT− ITF × f1 × − I1(d×F )

0 −F × IT

−ITF × − (A2F × +M × ) IT− ITF × f1 × −

(

IT)

1(d×F )

δx1

θ1δ

+

0 F × I

IF × (A1F × +M × ) I − IF × f2 × − I2(d×F )

0 −F × I

ITF × − (A2F × +M × ) I + IF × f2 × +(

IT)

2(d×F )

δx2

θ2δ

=

F

A1F +M

−F

−A2F −M

(9.334)

101

Page 103: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The updated-updated form is

F/˙d

F/˙dAT

1 + F/ω

A1F/˙d

A1

(

F/˙dAT

1 + F/ω

)

+M/˙dAT

1 +M/ω

−F/˙d

−F/˙dAT

1 − F/ω

−A2F/˙d

−A2

(

F/˙dAT

1 + F/ω

)

−M/˙dAT

1 −M/ω

δx1

δg1

+

−F/˙d

−F/˙dAT

2 − F/ω

−A1F/˙d

−A1

(

F/˙dAT

2 + F/ω

)

−M/˙dAT

2 −M/ω

F/˙d

F/˙dAT

2 + F/ω

A2F/˙d

A2

(

F/˙dAT

2 + F/ω

)

+M/˙dAT

2 +M/ω

δx2

δg2

+

−F/˙dω × −F

/˙dB1 − F/ωC1

−A1F/˙dω × −A1

(

F/˙dB1 + F/ωC1

)

−M/˙dB1 −M/ωC1

F/˙dω × F

/˙dB1 + F/ωC1

A2F/˙dω × A2

(

F/˙dB1 + F/ωC1

)

+M/˙dB1 +M/ωC1

δx1

δg1

+

F/˙dω × −F

/˙dB2 − F/ωC2

A1F/˙dω × −A1

(

F/˙dB2 + F/ωC2

)

−M/˙dB2 −M/ωC2

−F/˙dω × F

/˙dB2 + F/ωC2

−A2F/˙dω × A2

(

F/˙dB2 + F/ωC2

)

+M/˙dB2 +M/ωC2

δx2

δg2

+

F/d F/dAT1 + F/θ

A1F/d A1

(

F/dAT1 + F/θ

)

+M/dAT1 +M/θ

−F/d −F/dAT1 − F/θ

−A2F/d −A2

(

F/dAT1 + F/θ

)

−M/dAT1 −M/θ

δx1

δg1

+

−F/d −F/dAT2 − F/θ

−A1F/d −A1

(

F/dAT2 + F/θ

)

−M/dAT2 −M/θ

F/d F/dAT2 + F/θ

A2F/d A2

(

F/dAT2 + F/θ

)

+M/dAT2 +M/θ

δx2

δg2

+

0 F × IT

−IF × (A1F × +M × ) IT− ITF × f1 × − I1(d×F )

0 −F × IT

−ITF × − (A2F × +M × ) IT− ITF × f1 × −

(

IT)

1(d×F )

δx1

δg1

+

0 F × I

IF × (A1F × +M × ) I − IF × f2 × − I2(d×F )

0 −F × I

ITF × − (A2F × +M × ) I + IF × f2 × +(

IT)

2(d×F )

δx2

δg2

=

F

A1F +M

−F

−A2F −M

(9.335)

with

C1 = C1 + ω1 × (9.336a)

C2 = C2 − ω2 × . (9.336b)

102

Page 104: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Note that

C1 = (ω2 − ω1)× IT + ω1 × = ω1 × I + ω2 × IT (9.337a)

C2 = (ω2 − ω1)× I − ω2 × = −ω1 × I − ω2 × IT , (9.337b)

so C2 = −C1.

9.2.5 Deformable Axial Joint

Strain:

θ = ax(exp−1

(RT

1hR2h

))(9.338)

ǫ = ez · θ (9.339)

Strain rate:

ǫ = ez ·RT1h (ω2 − ω1) (9.340)

Virtual perturbation/linearization of strain:

δǫ = ez ·RT1h (θ2δ − θ1δ) = eTz (θ2δ − θ1δ) (9.341)

Linearization of strain rate:

δǫ = ez ·RT1h ((ω2 − ω1)× θ1δ + δω2 − δω1) = e

Tz ((ω2 − ω1)× θ1δ + δω2 − δω1) (9.342)

Virtual work:

δL = δǫm (ǫ, ǫ) = (θ2δ − θ1δ)T R1hezm = (θ2δ − θ1δ)T ezm (9.343)

Loads (residual contribution):

m1 = ezm (9.344a)

m2 = −ezm (9.344b)

Linearization:

δ (ezm) = −mez × θ1δ + ez(m/ǫδǫ+m/ǫδǫ

)(9.345)

Jacobian matrix contributions:

m

[ez ×−ez ×

]

θ1δ +m/ǫ

[eze

Tz −ezeTz

−ezeTz ezeTz

]θ1δθ2δ

+m/ǫ

([eze

Tz −ezeTz

−ezeTz ezeTz

]δω1

δω2

+

[−ezeTz (ω2 − ω1)×eze

Tz (ω2 − ω1)×

]

θ1δ

)

=

ez−ez

m (9.346)

With the updated-updated approximation:

m

[ez ×−ez ×

]

δg1 +m/ǫ

[eze

Tz −ezeTz

−ezeTz ezeTz

]δg1δg2

+m/ǫ

([eze

Tz −ezeTz

−ezeTz ezeTz

]δg1δg2

+

[eze

Tz ω2 × −ezeTz ω2 ×

−ezeTz ω2 × ezeTz ω2 ×

]δg1δg2

)

uu=

ez−ez

m

(9.347)

Note: ezeTz ω2 × = ez (ez × ω2)

T.

103

Page 105: MBDyn Theory and Developer’s Manual Version 1.X-Devel

9.3 Viscous Body

This element implements the behavior of a viscous body, namely a force and a moment that depend onthe absolute linear and angular velocity of a node, projected in the reference frame of the node. Thiselement allows, for example, to implement the aerodynamics of a flight-mechanics rigid-body model,whose aerodynamic forces and moments depend on the absolute linear and angular velocity, projectedin the reference frame of the body, by means of an appropriate constitutive law.

The force and moment are defined as

f = RRhf (9.348a)

m = RRhm+ o× f (9.348b)

where

o = Ro, (9.349)

f = f (v, ω) (9.350a)

m = m (v, ω) (9.350b)

and

v = RThR

T (x+ ω × o) (9.351a)

ω = RThR

Tω. (9.351b)

The linearization of the force and moment yields

δf = f/vδv + f/ωδω (9.352a)

δm = m/vδv + m/ωδω (9.352b)

with

δv = RThR

T (δx+ δω × o+ ω × θδ × o) uu= RT

hRT (δx− o× δg + (o× ω)× δg) (9.353a)

δω = RThR

T (δω + ω × θδ) uu= RT

hRT δg (9.353b)

The linearization of the nodal forces and moments yields

δf = θδ × f +RRhδf (9.354a)

δm = θδ ×m+RRhδm+ o×RRhδf , (9.354b)

namely

[f/v f/ω − f/vo×

m/v + o× f/v m/ω −m/vo× + o×(f/ω − f/vo×

)

]δxδω

+

[f/ωω × − f/vω × o×

m/ωω × −m/vω × o× + o×(f/ωω × − f/vω × o×

)

]

θδ

+

[−f ×−m×

]

θδ =

δfδm

(9.355)

104

Page 106: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where

f/v = RRhf/vRThR

T (9.356a)

f/ω = RRhf/ωRThR

T (9.356b)

m/v = RRhm/vRThR

T (9.356c)

m/ω = RRhm/ωRThR

T (9.356d)

The updated-updated approximation yields

[f/v f/ω − f/vo×

m/v + o× f/v m/ω −m/vo× + o×(f/ω − f/vo×

)

]δxδg

+

[f/v (o× ω)×(

m/v + o× f/v)(o× ω)×

]

δg +

[−f ×−m×

]

δg =

δfδm

(9.357)

9.4 Modal Element

9.4.1 Kinematics

Position of an arbitrary point P

xP = x0 + fP + uP (9.358)

where x0 is the position of the point that describes the global motion of the body, fP is the relativeposition of the point when the body is undeformed, and uP is the relative displacement of the pointwhen the body is deformed.

It can be rewritten as

xP = x0 +R0

(

fP + uP

)

(9.359)

where R0 is the global orientation matrix of the body, and the tilde (·) indicates entities expressed inthe reference frame attached to the body.

The deformation of the body is expressed by a linear combination of M displacement (and rotation,for those models that consider them, like beam trusses) shapes

uP =∑

j=1,M

UPjqj = UPq (9.360)

where UPj is the vector containing the components of the j-th displacement shape related to point P ,and qj is the j-th mode multiplier.

The orientation of the generic point P is

RP = R0RP (9.361)

and, assuming a representation of the relative orientation by a linear combination of rotation shapes

φ =∑

j=1,M

VPjqj = VPq (9.362)

it results in a linearized orientation

RP∼= R0 (I + (VPq)× ) (9.363)

105

Page 107: MBDyn Theory and Developer’s Manual Version 1.X-Devel

which is no longer orthogonal, because of matrix

RP = I + (VPq)× (9.364)

which represents a linearized rotation.The first and second derivatives of position and orientation yield:

xP = x0 + ω0 ×R0

(

fP +UPq)

+R0UP q (9.365a)

ωP = ω0 +R0VP q (9.365b)

xP = x0 + ω0 ×R0

(

fP +UPq)

+ ω0 × ω0 ×R0

(

fP +UPq)

+ 2ω0 ×R0UP q +R0UP q (9.365c)

ωP = ω0 + ω0 ×R0VP q +R0VP q (9.365d)

The virtual perturbation of the position and orientation of the generic point P are:

δxP = δx0 + δφ0 ×R0

(

fP +UPq)

+R0UP δq (9.366a)

δφP = δφ0 +R0VP δq (9.366b)

Without significant losses in generality, from now on it is assumed that the structure of the problemis given in form of lumped inertia parameters in specific points, corresponding to FEM nodes, and thatthe position of each node corresponds to the center of mass of each lumped mass. A model made of NFEM nodes is considered. The nodal mass of the i-th FEM node is

Mi =

[miI 00 Ji

]

(9.367)

There is no strict requirement for matrix Ji to be diagonal.The inertia forces and moments acting on each FEM node are:

Fi = −mixi (9.368a)

Ci = −RiJiRTi ωi (9.368b)

and the virtual work done by the inertia forces is

δL =∑

i=1,N

(δxT

i Fi + δφTi Ci

)(9.369)

which results in

δL =

δx0

δφ0

δq

T

Mxx Mxφ Mxq

Mφφ Mφq

sym. Mqq

x0

ω0

q

+

Fx

Fq

(9.370)

106

Page 108: MBDyn Theory and Developer’s Manual Version 1.X-Devel

with

Mxx = I∑

i=1,N

mi (9.371a)

Mxφ = R0

i=1,N

mi

(

fi +Uiq)

×T RT0 (9.371b)

Mxq = R0

i=1,N

miUi (9.371c)

Mφφ = R0

i=1,N

(

mi

(

fi +Uiq)

×(

fi +Uiq)

×T +RiJiRTi

)

RT0 (9.371d)

Mφq = R0

i=1,N

(

mi

(

fi +Uiq)

×Ui + RiJiRTi Vi

)

(9.371e)

Mqq =∑

i=1,N

(

miUTi Ui + V

Ti RiJiR

Ti Vi

)

(9.371f)

Fx =∑

i=1,N

mi

(

ω0 × ω0 ×R0

(

fi +Uiq)

+ 2ω0 ×R0Uiq)

(9.371g)

Fφ =∑

i=1,N

R0

(

mi

(

fi +Uiq)

×(

ω0 × ω0 ×R0

(

fi +Uiq)

+ 2ω0 ×R0Uiq)

+ RiJiRTi R

T0 ω0 ×R0Viq

)

(9.371h)

Fq =∑

i=1,N

(

miUTi R

T0

(

ω0 × ω0 ×R0

(

fi +Uiq)

+ 2ω0 ×R0Uiq

+ V Ti RiJiR

Ti R

T0 ω0 ×R0Viq

)

(9.371i)

107

Page 109: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The Mjk terms can be rewritten to highlight contributions of order 0, 1, and higher:

Mxx = I

i=1,N

mi

(9.372a)

Mxφ = R0

i=1,N

mifi

+

i=1,N

miUi

q

×T RT0 (9.372b)

Mxq = R0

i=1,N

miUi

(9.372c)

Mφφ = R0

i=1,N

(

mifi × fi ×T +Ji

)

+∑

i=1,N

(

mifi × (Uiq)×T +mi (Uiq)× fi ×T +Ji (Viq)×T +(Viq)× Ji

)

+∑

i=1,N

(mi (Uiq)× (Uiq)×T +(Viq)× Ji (Viq)×T

)

RT0 (9.372d)

Mφq = R0

i=1,N

(

mifi ×Ui + JiVi

)

+∑

i=1,N

(mi (Uiq)×Ui + Ji (Viq)×T Vi + (Viq)× JiVi

)

+∑

i=1,N

(Viq)× Ji (Viq)×T Vi

(9.372e)

Mqq =∑

i=1,N

(miU

Ti Ui + V

Ti JiVi

)

+∑

i=1,N

(V Ti Ji (Viq)×T Vi + V

Ti (Viq)× JiVi

)

+∑

i=1,N

V Ti (Viq)× Ji (Viq)×T Vi (9.372f)

9.4.2 Physics: Orthogonality

Some noteworthy entities appear in the above equations, which may partially simplify under specialcircumstances.

The overall mass of the body

m =∑

i=1,N

mi (9.373)

The static (first order) inertia moment

Sxφ =∑

i=1,N

mifi (9.374)

108

Page 110: MBDyn Theory and Developer’s Manual Version 1.X-Devel

vanishes if point x0 is the center of mass of the undeformed body.Similarly, the static (first order) inertia moment computed with the modal displacement shapes

Sxq =∑

i=1,N

miUi (9.375)

vanishes if the mode shapes have been inertially decoupled from the rigid body displacements. In fact,the decoupling of the rigid and the deformable modes is expressed by

i=1,N

xTr miUi =

xTr

i=1,N

miUi = 0 (9.376)

where xTr describes three independent rigid translations, which, for the arbitrariety of xr, implies the

above Equation (9.375).In the same case, also the zero-order terms of the coupling between the rigid body rotations and the

modal variables,

Sφq =∑

i=1,N

(

mifi ×Ui + JiVi

)

(9.377)

also vanishes. In fact, the decoupling of the rigid and the deformable modes is expressed by

i=1,N

(

miφTr fi ×Ui + φ

Tr JiVi

)

=

φTr

i=1,N

(

mifi ×Ui + JiVi

)

= 0 (9.378)

where φTr describes three independent rigid rotations, and φT

r fi× describes the corresponding displace-ments, which, for the arbitrariety of φr, implies the above Equation (9.377).

The second order inertia moment is

J =∑

i=1,N

(

mifi × fi ×T +Ji

)

(9.379)

It results in a diagonal matrix if the orientation of the body is aligned with the principal inertia axes.The modal mass matrix is

m =∑

i=1,N

(miU

Ti Ui + V

Ti JiVi

)(9.380)

It is diagonal if only the normal modes are considered.

9.4.3 Simplifications

The problem, as stated up to now, already contains some simplifications. First of all, those related tothe lumped inertia model of a continuum; moreover, those related to the mode superposition to describethe straining of the body which, in the case of the FEM node rotation, yields a non-orthogonal linearizedrotation matrix.

Further simplifications are usually accepted in common modeling practice, where some of the higherorder terms are simply discarded.

109

Page 111: MBDyn Theory and Developer’s Manual Version 1.X-Devel

When only the 0-th order coefficients are used in matricesMuv, the dynamics of the body are writtenreferred to the undeformed shape. This approximation can be quite drastic, but in some cases it may bereasonable, if the reference straining, represented by q, remains very small throughout the simulation.This approximation is also required when the only available data are the global inertia properties (e.g.m, the postion of the center of mass and the inertia matrix J), and the modal mass matrix m.

More refined approximations include higher order terms: for example, the first and second ordercontributions illustrated before. This corresponds to using finer and finer descriptions of the inertiaproperties of the system, corresponding to computing the inertia properties in the deformed conditionwith first and second order accuracy, respectively.

9.4.4 Invariants

The dynamics of the deformed body can be written without any detailed knowledge of the mass distri-bution, provided some aggregate information can be gathered in so-called invariants. They are:

1. Total mass (scalar)

I1 =∑

i=1,N

mi (9.381)

where mi is the mass of the i-th FEM node4.

2. Static moment (matrix 3× 1)

I2 =∑

i=1,N

mifi (9.382)

3. Static coupling between rigid body and FEM node displacements (matrix 3×M)

I3 =∑

i=1,N

miUi (9.383)

where the portion related to the k-th mode is computed by summation of the contribute of eachFEM node, obtained by multiplying the FEM node mass mi by the three components of the modaldisplacement Uik of the k-th mode.

4. Static coupling between rigid body rotations and FEM node displacements (matrix 3×M)

I4 =∑

i=1,N

(

mifi ×Ui + JiVi

)

(9.384)

where the portion related to the k-th mode is computed by summation of the contribute of eachFEM node, obtained by multiplying the FEM node mass mi by the cross product of the FEM nodeposition fi and the three components of the modal displacement Uik of the k-th mode.

5. Static coupling between FEM node displacements (matrix 3×M ×M)

I5j =∑

i=1,N

miUij ×Ui (9.385)

where the portion related to the j-th mode is computed by summation of the contribute of eachFEM node, obtained by multiplying the FEM node mass mi by the cross product of the threecomponents of the FEM node j-th modal displacement Uij and the three components of the k-thmodal displacement Uik.

4Although the input format, because of NASTRAN legacy, allows each global direction to have a separate mass value,invariants assume that the same value is given, and only use the one associated to component 1.

110

Page 112: MBDyn Theory and Developer’s Manual Version 1.X-Devel

6. Modal mass matrix (matrix M ×M)

I6 =∑

i=1,N

(miU

Ti Ui + V

Ti JiVi

)(9.386)

7. Inertia matrix (matrix 3× 3)

I7 =∑

i=1,N

(

mifi × fi ×T +Ji

)

(9.387)

8. (matrix 3×M × 3)

I8j =∑

i=1,N

mifi ×Uij × T (9.388)

9. (matrix 3×M ×M × 3)

I9jk =∑

i=1,N

miUij ×Uik × (9.389)

10. (matrix 3×M × 3)

I10j =∑

i=1,N

Vij × Ji (9.390)

11. (matrix 3×M)

I11 =∑

i=1,N

JiVi (9.391)

Using the invariants, the contributions to the inertia matrix of the body become

Mxx = I I1 (9.392a)

Mxφ = R0 (I2 + I3q)×RT0 (9.392b)

Mxq = R0I3 (9.392c)

Mφφ = R0

(I7 +

(I8j + IT

8j

)qj + I9jkqjqk

)RT

0 (9.392d)

Mφq = R0

I4 + I5jqj +∑

i=1,N

(Ji (Viq)×T Vi + (Viq)× JiVi

)

+∑

i=1,N

(Viq)× Ji (Viq)×T Vi

(9.392e)

Mqq = I6+∑

i=1,N

(V Ti Ji (Viq)×T Vi + V

Ti (Viq)× JiVi

)

+∑

i=1,N

V Ti (Viq)× Ji (Viq)×T Vi (9.392f)

111

Page 113: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where summation over repeated indices is assumed. The remaining summation terms could be also castinto some invariant form; however, in common practice (e.g. in ADAMS) they are simply neglected,under the assumption that the finer the discretization, the smaller the FEM node inertia, so that linearand quadratic terms in the nodal rotation become reasonably small, yielding

Mxx = I I1 (9.393a)

Mxφ = R0 (I2 + I3q)×RT0 (9.393b)

Mxq = R0I3 (9.393c)

Mφφ = R0

(I7 +

(I8j + IT

8j

)qj + I9jkqjqk

)RT

0 (9.393d)

Mφq = R0 (I4 + I5jqj) (9.393e)

Mqq = I6 (9.393f)

In some cases, the only remaining quadratic term in I9jk is neglected as well.

9.4.5 Interfacing

The basic interface between the FEM and the multibody world occurs by clamping regular multibodynodes to selected nodes on the FEM mesh. Whenever more sophisticated interfacing is required, forexample connecting a multibody node to a combination of FEM nodes, an FEM node equivalent to thedesired aggregate of nodes should either be prepared at the FEM side, for example by means of RBEs,or at the FEM database side, for example by averaging existing mode shapes according to the desiredpattern, into an equivalent FEM node5.

The clamping is imposed by means of a coincidence and a parallelism constraint between the locationsand the orientations of the two points: the multibody node N and the FEM node P , according to theexpressions

xN + fN = xP (9.394)

ax(exp−1

(RT

NRP

))= 0 (9.395)

which becomes

xN +RN fN − x0 −R0

(

fP +UPq)

= 0 (9.396)

ax(exp−1

(RT

NR0 (I + (VPq)× )))

= 0 (9.397)

The reaction forces exchanged are λ in the global frame, while the reaction moments are RNα in thereference frame of node N :

FN = λ (9.398)

MN = fN × λ+RNα (9.399)

FP = −λ (9.400)

MP = −RNα (9.401)

The force and the moment apply on the rigid body displacement and rotation, and on the modal equationsas well, according to

δxTPFP

+ δφTPMP

=

δx0

δφ0

δq

T

−λ−(

R0

(

fP +UPq))

× λ−RNα

−UTPR

T0 λ− V T

P RT0RNα

(9.402)

5For example, to constrain the displacement of a FEM node P that represents the weighing of the displacement of a setof FEM nodes according to a constant weighing matrix WP ∈ R

3n×3, simply use UP = W TP U .

112

Page 114: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The linearization of the constraint yields

[

−I fN × I −(

R0

(

fP +UPq))

× R0UP

0 −Γ (θ)−1RT

N 0 Γ (θ)−1RT

N Γ (θ)−1RT

NR0VP

]

δxN

δgNδx0

δg0δq

=

(9.396)(9.397)

(9.403)

Note that Γ (θ)−1 ∼= I since θ → 0 when the constraint is satisfied. The linearization of forces and

moments yields

0 00 −λ× fN × + (RNα)×0 00 − (RNα)×0 −V T

P RT0 (RNα)×

δxN

δgN

(9.404)

+

0 0 00 0 00 0 0

0 λ×(

R0

(

fP +UPq))

× −λ×R0UP

0 UTPR

T0 λ× + V T

P RT0 (RNα)× 0

δx0

δg0δq

+

−I 0−fN × −RN

I 0(

R0

(

fP +UPq))

× RN

UTPR

T0 V T

P RT0RN

δλδα

=

λ

fN × λ+RNα

(9.402)

113

Page 115: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 10

Beam Element

TODO

114

Page 116: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 11

Shell Element

Authors: Marco Morandini and Riccardo Vescovini

11.1 Variational principle

The formulation refers to the modified Hu-Washizu variational functional. The linearization of thefunctional is written as:

δW +∆δW = 0 (11.1)

with:

δW =

A

(δǫTσ + δǫTσ

)dA (11.2)

with

σ = σ (ǫ+ ǫ) (11.3)

A linear (visco)elastic stress-strain relationship is considered,

σ = C (ǫ+ ǫ) +E(

ǫ+ ˙ǫ)

(11.4)

FIXME: ˙ǫ? Direi di no! and:

∆δW =

A

(δǫTC (∆ǫ+∆ǫ) + δǫTC (∆ǫ+∆ǫ) + ∆δǫTσ

)dA (11.5)

where:

• C and E are the linear viscoelastic constitutive law matrices (integrated along the shell thickness)

• ǫ is the vector of the compatible strains (resulting from the strain-displacement relations)

• ǫ is the vector of the enhancing strains (EAS)

• σ is the vector of forces and moments per unit length

115

Page 117: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The enhancing strains ǫ are interpolated within the element.The compatible strains ǫ are defined as:

ǫ12×1

=

ǫ1ǫ2κ1

κ2

(11.6)

where:

ǫk = T Ty,k − ek (11.7)

where the comma followed by the index represents the derivation with respect to the k-th arc-lengthcoordinate.T is the orientation and y is the position vector both in the deformed configuration, and ek = e1k, e2k, e3k,with eik = δik.

κk = T Tκk − T T0 κ

0k (11.8)

with:

κk× = T,kTT (11.9)

11.1.1 Strain Rate

The compatible strain derivatives ǫ are defined as:

ǫ12×1

=

˙ǫ1˙ǫ2˙κ1

˙κ2

(11.10)

where:

d

dtǫk = T Ty,k + T T y,k = −T Tω × y,k + T T y,k (11.11)

and

d

dtκk = T Tκk + T T κk = −T Tω × κk + T T κk. (11.12)

Since

d

dt(T,k) =

d

dt(κk × T ) = κk × T + κk × ω × T (11.13)

(T ),k = (ω × T ),k = ω,k × T + ω × κk × T (11.14)

then

κk ×+κk × ω× = ω,k ×+ω × κk× (11.15)

i.e.

κk = ω,k + ω × κk (11.16)

116

Page 118: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Thus

d

dtκk = T Tω,k (11.17)

The vector σ is:

σ =

n1

n2

m1

m2

(11.18)

11.2 Finite element discretization and notation

The shell elements has four nodes, numbered counterclockwise starting from the upper right node, asshown in Figure 11.1. In the natural domain, the coordinate system is identified by the coordinates ξ1

Figure 11.1: Shell finite element

and ξ2, both varying in the range [−1, 1].In the following, the notation

ξ = (ξ1, ξ2) (11.19)

will be used. Four points are defined at the element’s mid-sides. They are used in the context of theANS approach. In particular, they are denoted by the set of coordinates:

ξa = (ξ1a, ξ2a)ξb = (ξ1b, ξ2b)ξc = (ξ1c, ξ2c)ξd = (ξ1d, ξ2d)

(11.20)

The following convention is adopted:

• the subscript n denotes a nodal variable

• ξi means ξ evaluated in a generic integration point

• ξA means ξ evaluated in one of the four shear evaluation points

• ξ0 means ξ evaluated at the origin

117

Page 119: MBDyn Theory and Developer’s Manual Version 1.X-Devel

According to the numbering of the nodes, the bilinear shape functions defined at element level are:

L1(ξ) =1

4(1 + ξ1) (1 + ξ2) (11.21a)

L2(ξ) =1

4(1− ξ1) (1 + ξ2) (11.21b)

L3(ξ) =1

4(1− ξ1) (1− ξ2) (11.21c)

L4(ξ) =1

4(1 + ξ1) (1− ξ2) (11.21d)

The degrees of freedom associated to each element are 24 nodal position and orientation parametercomponents, collected in vector q:

δq24×1

=

δynϕδn

=

δy1ϕδ1

δy2ϕδ2

δy3ϕδ3

δy4ϕδ4

∆q24×1

=

δynϕ∆n

=

∆y1ϕ∆1

∆y2ϕ∆2

∆y3ϕ∆3

∆y4ϕ∆4

(11.22)

and 7 internal degrees of freedom related to the assumed strain (EAS) and collected in vector β.The total number of degrees of freedom is 31.

11.3 Linearization

The virtual variation of the compatible strains ǫ is

δǫ =

δǫ1δǫ2δκ1

δκ2

(11.23)

In particular, the virtual variations of the linear deformation ǫk is:

δǫk = δ(T Ty,k

)=

n∑

i=1

T Ty,k ×ΦnLnϕδn +

n∑

i=1

T TLn,kδyn (11.24)

where:

Φn = T ΓΓ−1n TT

(11.25)

The virtual variations of the curvatures κk is:

δκk = δ(T Tκk

)=

n∑

i=1

T Tκk ×ΦnLnϕδn +

n∑

i=1

T TKknϕδn (11.26)

where:

Kkn = TL (ϕ, ϕ,k) Γ−1n T

TLn +ΦnLn,k (11.27)

118

Page 120: MBDyn Theory and Developer’s Manual Version 1.X-Devel

the term Ln,k is the derivative of the n-th shape function with respect to the k-th arc-length coordinate.The last term of Eq. 11.5 requires the evaluation of the terms:

nk ·∆δǫk = nk ·∆δ(T Ty,k

)=

4∑

m,n=1

ϕδnΦTnLny,k × (Tnk)×ΦmLmϕ∆n+

+

4∑

m,n=1

ϕδnΦTnLn (Tnk)× Lm,k∆yn+

−4∑

m,n=1

δynLn,k (Tnk)×ΦmLmϕ∆m

(11.28)

mk ·∆δκk =mk ·∆δ(T Tκk

)=

4∑

m,n=1

ϕδnLnΦTnκk × (Tmk)×ΦmLmϕ∆m+

+

4∑

m,n=1

ϕδnLnΦTn (Tmk)×ΦmLm,kϕ∆m

(11.29)

11.4 Structural Damping

Consistently formulated structural damping requires to express the time derivatives of strain and curva-ture. A linear contribution to internal force and moment fluxes is considered,

σ += Eǫ (11.30)

The discretized strain rate is

d

dtǫk = T Ty,k ×

n∑

i=1

ΦiLiωi + TT

n∑

i=1

Ln,kyi (11.31)

The discretized curvature rate is

d

dtκk = T T

n∑

i=1

Ln,kωi (11.32)

11.5 Implementation

Having shown the variational principle and the linearization of strains and curvatures, it is then possibleto develop the procedure to derive the Jacobian matrix and the residual.

11.5.1 Orientation interpolation

In the initial configuration it is built the matrix:

iTan = RTn [t1nt2nt3n] (11.33)

with Rn node orientation, and tin vectors tangent to the element surface.So:

Tn = RniTan (11.34)

119

Page 121: MBDyn Theory and Developer’s Manual Version 1.X-Devel

It is then calculated:

Tavg =1

4

4∑

n=1

Tn (11.35)

which is in general a not orthogonal matrix.An orthogonal matrix can be obtained by applying:

T = Rot (VecRot (Tavg)) (11.36)

which is then used to calculate the nodal rotation:

Rn = TTTn (11.37)

and:

ϕn = VecRot(

Rn

)

(11.38)

The nodal values of ϕn are interpolated by means of the shape functions:

ϕ (ξi) =

4∑

i=1

Ln (ξi) ϕn (11.39)

from which is obtained the rotation matrix at the integration point:

R (ξi) = Rot (ϕ (ξi)) (11.40)

and finally the orientation at the integration point:

T (ξi) = TR (ξi) (11.41)

The virtual variation of ϕ at the integration point is related to the nodal values by:

ϕδ (ξi) =4∑

n=1

Φn (ξi)Ln (ξi)ϕδn (11.42)

with:

Φn (ξi) = T Γ (ϕ (ξi)) Γ−1 (ϕn)T

T(11.43)

Similarly the virtual variation of ϕ can be obtained at the shear evaluation points as:

ϕδ (ξA) =

4∑

n=1

Φn (ξA)Ln (ξA)ϕδn (11.44)

11.5.2 Position interpolation

The nodal positions are so interpolated as:

y =

4∑

n=1

Lnyn (11.45)

120

Page 122: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The derivatives with respect to the generic coordinate ξk at the integration points is:

∂x (ξi)

∂ξk=

4∑

n=1

∂Ln (ξi)

∂ξkxn (11.46)

It is then possible to build the matrix:

Sαβ (ξi)2×2

=

t01 (ξi)1×3

∂x (ξi)∂ξ13×1

t01 (ξi)∂x (ξi)∂ξ2

t02 (ξi)∂x (ξi)∂ξ1

t02 (ξi)∂x (ξi)∂ξ2

(11.47)

observing that T0 (ξi) =[t01 (ξi) t

02 (ξi) t

03 (ξi)

].

With the same procedure are derived Sαβ (ξ0) and Sαβ (ξA).

LαB (ξi)4×2

=

∂L1 (ξi)∂ξ1

∂L1 (ξi)∂ξ2

∂L2 (ξi)∂ξ1

∂L2 (ξi)∂ξ2

∂L3 (ξi)∂ξ1

∂L3 (ξi)∂ξ2

∂L4 (ξi)∂ξ1

∂L4 (ξi)∂ξ2

(11.48)

Lαβ (ξi)4×2

= LαB (ξi)S−1αβ (ξi) (11.49)

which is the matrix giving the variation of the shape functions Ln with respect the the arc-lengthcoordinates:

Lαβ =

L1,1 L1,2

L2,1 L2,2

L3,1 L3,2

L4,1 L4,2

(11.50)

In order to perform the integration in the isoparametric domain the area element need to be calculated.In particular, the determinant of the Jacobian of the transformation between the physical and the naturaldomain has to be calculated. It is:

α (ξi) = detSαβ (ξi) α (ξA) = detSαβ (ξA) (11.51)

11.5.3 Enhancing strains interpolation

The virtual variation and increments of the enhancing strains ǫ are interpolated as:

δǫ12×1

(ξi) = P12×7

(ξi) δβ7×1

∆ǫ (ξi) = P (ξi)∆β (11.52)

where β is the vector collecting the the strains parameters, while the expression of the matrix P isderived in the next.The EAS approach here adopted considers the enhancing of the membrane strains only, i.e. ǫ11, ǫ12, ǫ21and ǫ22. Shear strains and bending strains are not enhanced.The interpolation is performed in the natural domain adopting the shape functions:

H (ξi)4×7

=

ξ1i ξ1iξ2i 0 0 0 0 00 0 ξ2i ξ1iξ2i 0 0 00 0 0 0 ξ1i ξ1iξ2i 00 0 0 0 0 ξ1iξ2i ξ2i

(11.53)

121

Page 123: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The interpolation is reported in the physical domain with a push-forward operation with the transfor-mation matrix M0, defined as:

M04×4

=

s1,1s1,1 s1,2s1,2 s1,2s1,1 s1,1s1,2s2,1s2,1 s2,2s2,2 s2,2s2,1 s2,1s2,2s1,1s2,1 s1,2s2,2 s1,1s2,2 s1,2s2,1s1,1s2,1 s1,2s2,2 s1,2s2,1 s1,1s2,2

(11.54)

where the generic term si,k is the element (i, k) of the matrix Sαβ (ξ0).

P (ξi)12×7

=α (ξ0)

α (ξi)P

12×4M−T

04×4

H (ξi)4×7

(11.55)

where P is a permutation matrix defined as:

P12×4

=

1 0 0 00 0 1 00 0 0 00 0 0 10 1 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 0

(11.56)

which has the places the enhanced strains in the corresponding positions of the global vector of membraneand bending strains ǫ.

11.5.4 Compatible strains interpolation

The virtual variations of the linear deformation ǫk at the i-th integration point is obtained from Eq. 11.24:

δǫk (ξi) = δ(

T (ξi)Ty,k (ξi)

)

=

n∑

i=1

T (ξi)Ty,k (ξi)×Φn (ξi)Ln (ξi)ϕnδ +

n∑

i=1

T (ξi)TLαβ (ξi) (n, k) (ξi) δyn

(11.57)

where Lαβ (ξi) (n, k) denotes the element (n, k) of the matrix Lαβ (ξi).The virtual variation of the curvatures κk at the i-th integration point is derived from Eq. 11.26:

δκk (ξi) = δ(

T (ξi)Tκk (ξi)

)

=

n∑

i=1

T (ξi)Tκk (ξi)×Φn (ξi)Ln (ξi)ϕnδ +

n∑

i=1

T (ξi)TKkn (ξi)ϕnδ

(11.58)

where:

Φn (ξi) = T Γ (ϕ (ξi)) Γ−1n T

T(11.59)

122

Page 124: MBDyn Theory and Developer’s Manual Version 1.X-Devel

and:

Kkn (ξi) = TL (ϕ (ξi) , ϕ,k (ξi)) Γ−1n T

TLn (ξi) +Φn (ξi)Lαβ (ξi) (n, k) (ξi) (11.60)

The derivative of the the vector ϕ with respect to the k-th arc-length coordinate can be expressed asfunction of the nodal values as:

ϕ,k (ξi) =4∑

n=1

Lαβ (ξi) (n, k)ϕn (11.61)

The curvatures are given by:

κk (ξi) = T Γ (ϕ (ξi)) ϕ,k (ξi) (11.62)

and the derivative of the position vector is:

y,k (ξi) =4∑

i=1

Lαβ (ξi) (n, k)yn (11.63)

The compatible strains can so be expressed as function of the nodal variables q by considering Eqs. 11.57and 11.58:

δǫ = Bδq (11.64)

with:

B (ξi)12×24

=[B1 (ξi) B2 (ξi) B3 (ξi) B4 (ξi)

](11.65)

and:

Bn (ξi)12×6

=

T (ξi)TLαβ (ξi) (n, 1) T (ξi)

Ty,1 (ξi)×Φn (ξi)Ln (ξi)

T (ξi)TLαβ (ξi) (n, 2) T (ξi)

Ty,2 (ξi)×Φn (ξi)Ln (ξi)

0 T (ξi)Tκ1 (ξi)×Φn (ξi)Ln (ξi) + T (ξi)

TK1n (ξi)

0 T (ξi)Tκ2 (ξi)×Φn (ξi)Ln (ξi) + T (ξi)

TK2n (ξi)

(11.66)

11.5.5 ANS

The ANS technique is applied to prevent shear locking. Here the ANS is applied to shear strains only,i.e. ǫ1 and ǫ2 The approach consists in interpolating the shear strains in the mid-sides of the element inthe natural domain. Such interpolated strains are then used to derive the shear strains at the integrationpoints.The use of the ANS technique leads a re-definition of:

• the two rows of the B matrix relative to shear strains

• the shear strains

The compatible strains are:

ǫ1 =

ǫ11ǫ12ǫ1

ǫ2 =

ǫ21ǫ22ǫ2

(11.67)

123

Page 125: MBDyn Theory and Developer’s Manual Version 1.X-Devel

At first, the compatible strains are evaluated at the shear evaluation points of Figure 11.1. This is donereferring to Eq. 11.7

ǫk (ξA) = T (ξA)Ty,k (ξA)− ek (11.68)

The matrix B of Eq. 11.65 is built also in the shear evaluation points for the membrane strains only,

and is indicated as B

B (ξA)6×24

=[

B1 (ξA) B2 (ξA) B3 (ξA) B4 (ξA)]

(11.69)

with:

Bn (ξA)6×6

=

[

T (ξA)TLαβ (ξA) (n, 1) T (ξA)

Ty,1 (ξA)×Φn (ξA)Ln (ξA)

T (ξA)TLαβ (ξA) (n, 2) T (ξA)

Ty,2 (ξA)×Φn (ξA)Ln (ξA)

]

(11.70)

The rows relative to the shear strains ǫ1 and ǫ2 are collected in:

B3 (ξA)4×24

=

B (ξa) (3, :)

B (ξb) (3, :)

B (ξc) (3, :)

B (ξd) (3, :)

B6 (ξA)4×24

=

B (ξa) (6, :)

B (ξb) (6, :)

B (ξc) (6, :)

B (ξd) (6, :)

(11.71)

where B (ξa) (k, :) is used to denote all the element of the k-th row of B (ξa).

The matrices B3 and B6 are interpolated to obtain the values at the integration points.

B3 (ξi) =1

2

[1 + ξ2i 0 1− ξ2i 0

]B3 (ξA) (11.72)

B6 (ξi) =1

2

[1 + ξ1i 0 1− ξ1i 0

]B6 (ξA) (11.73)

The resulting matrices B3 and B6 replace the corresponding rows of the matrix B of Eq. 11.65.The second step in the application of the ANS technique is the interpolation of the shear strains:

ǫ1 (ξi) =1

2(1 + ξ2i) ǫ1 (ξa) +

1

2(1− ξ2i) ǫ1 (ξc) (11.74a)

ǫ2 (ξi) =1

2(1− ξ1i) ǫ2 (ξb) +

1

2(1 + ξ1i) ǫ2 (ξd) (11.74b)

The so interpolated strains ǫ1 and ǫ2 are then inserted into the proper position in the vector ǫ respectively.

11.5.6 Forces

Strains and curvatures can be calculated as:

ǫk (ξi) = T (ξi)Ty,k (ξi)− ek (11.75)

κk = T (ξi)Tκk (ξi)− T T

0 (ξi)κ0k (ξi) (11.76)

where T0 and κ0k are calculated at the first step.

The total strain is the sum of the compatible and the enhancing strains:

ǫt (ξi) = ǫ (ξi) + ǫ (ξi) (11.77)

124

Page 126: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The resulting forces are easily computed by means of the constitutive law:

σ (ξi) = C (ξi) ǫt (ξi) (11.78)

which is:

σ (ξi) =

n1 (ξi)n2 (ξi)m1 (ξi)m2 (ξi)

(11.79)

11.5.7 Jacobian matrix

The second variation of the variational principle of Eq. 11.5 gives the Jacobian matrix. In particular,the finite element discretization is here presented for the five different terms of Eq. 11.5.The first term is:

A

δǫTC∆ǫdA =

= δqT4∑

i=1

B (ξi)TC (ξi)B (ξi)α (ξi)wi∆q

= δqTKm∆q

(11.80)

The second term is:∫

A

δǫTC∆ǫdA =

= δβT4∑

i=1

P (ξi)TC (ξi)B (ξi)α (ξi)wi∆q

= δβTKβq∆q

(11.81)

The third term is:∫

A

δǫTC∆ǫdA =

= δqTKTβq∆β

(11.82)

The fourth term is:∫

A

δǫTC∆ǫdA =

= δβT4∑

i=1

P (ξi)TC (ξi)P (ξi)α (ξi)wi∆β

= δβTKββ∆β

(11.83)

The fifth term is:∫

A

∆δǫTσdA =

= δqT4∑

i=1

D (ξi)TG (ξi)D (ξi)α (ξi)wi∆q

= δqTKg∆q

(11.84)

125

Page 127: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where this last expression is obtained starting from Eqs. 11.28 and 11.29, and where:

D (ξi)15×24

=[D1 (ξi) D2 (ξi) D3 (ξi) D4 (ξi)

](11.85)

with:

Dn (ξi)15×6

=

Lαβ (ξi) (n, 1) I 0Lαβ (ξi) (n, 2) I 0

0 K1n (ξi)0 K2n (ξi)0 Φn (ξi)Ln (ξi)

(11.86)

Hh (ξi) = T (ξi)n1 (ξi)⊗ y,1 (ξi)− T (ξi)n1 · y,1 (ξi) I++ T (ξi)n2 (ξi)⊗ y,2 (ξi)− T (ξi)n2 · y,2 (ξi) I++ T (ξi)m1 (ξi)⊗ κ1 (ξi)− T (ξi)m1 · κ1 (ξi) I+

+ T (ξi)m2 (ξi)⊗ κ2 (ξi)− T (ξi)m2 · κ2 (ξi) I

(11.87)

G (ξi)15×15

=

0 0 0 0 −T (ξi)n1 (ξi)0 0 0 0 −T (ξi)n2 (ξi)0 0 0 0 −T (ξi)n1 (ξi)0 0 0 0 00 0 0 0 0

T (ξi)n1 (ξi) T (ξi)n2 (ξi) T (ξi)m1 (ξi) T (ξi)m2 (ξi) Hh (ξi)

(11.88)

11.5.8 Residual

The residual comes from the finite element approximation of Eq. 11.2.The first term is:

A

δǫTσdA =

= δqT4∑

i=1

B (ξi)Tσ (ξi)α (ξi)wi

= δqT rd

(11.89)

The second term is:∫

A

δǫTσdA =

= δβT4∑

i=1

P (ξi)Tσ (ξi)α (ξi)wi

= δβT rβ

(11.90)

The resulting governing equations are then:

(Km +Kg)∆q +KTβq∆β = −rd (11.91a)

Kβq∆q +Kββ∆β = −rβ (11.91b)

126

Page 128: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 12

Aerodynamic Elements

Aerodynamic elements apply aerodynamic forces to structural nodes.This section is not intended to give details about the aerodynamic models adopted but mainly discuss

the computation of the contributions to the Jacobian matrix of the aerodynamic elements.

Files. 2D aerodnamic elements are implemented in filesmbdyn/aero/aeroelem.h

mbdyn/aero/aeroelem.cc2D aerodynamic models are implemented in files

mbdyn/aero/aerodata.h

mbdyn/aero/aerodata.cc

mbdyn/aero/aerodata_impl.h

mbdyn/aero/aerodata_impl.cc

12.1 Linearization of 2D Aerodynamic Forces and Moments

MBDyn’s built-in 2D aerodynamics computes aerodynamic forces fa/ξ and moments ca/ξ per unit span,in a relative frame at station ξ, based on the instantaneous value of linear and angular velocity boundaryconditions, respectively v and ω, expressed in the same relative frame, namely

fa/ξ = fa/ξ (v, ω, ξ) (12.1a)

ca/ξ = ca/ξ (v, ω, ξ) . (12.1b)

The boundary conditions are computed by projecting the effective linear and angular velocity atstation ξ, respectively v (ξ) and ω (ξ), in the reference frame of the aerodynamic forces, namely

v (ξ) = RT (ξ)v (ξ) (12.2a)

ω (ξ) = RT (ξ)ω (ξ) , (12.2b)

where R (ξ) is the matrix that expresses the local orientation of the aerodynamic section at station ξ.In detail, the effective linear velocity at an arbitrary station is the combination of the absolute velocity

resulting from the kinematics of the model, of an airstream velocity that may depend on the absolutelocation of a reference point and on time, and of a contribution resulting from an inflow model, namely

v (ξ) = vkin (ξ) + v∞ (x (ξ) , t) + vinflow (x (ξ)) . (12.3)

127

Page 129: MBDyn Theory and Developer’s Manual Version 1.X-Devel

It is assumed that the last two contributions do not depend on the state of the problem, or only dependon it in a loose manner, and thus do not directly participate in the linearization of the aerodynamicforces and moments.

Their linearization yields

δv = RT (ξ) (δvkin (ξ) + v (ξ)× θδ (ξ)) (12.4a)

δω = RT (ξ) (δω (ξ) + ω (ξ)× θδ (ξ)) , (12.4b)

where

θδ (ξ) = ax(δR (ξ)RT (ξ)

). (12.5)

By means of numerical integration, the force and moment per unit span are integrated into discretecontributions to the force and the moment applied to the appropriate node equilibrium. This is usuallydone by multiplying each force and moment per unit span contribution by an appropriate referencelength coefficient. As a consequence, in the following force and moment contributions will be considered,namely

fa = fa (v, ω, ξ) (12.6a)

ca = ca (v, ω, ξ) . (12.6b)

As already mentioned, each weighted sectional force and moment contribution is applied to the appro-priate node after projection in the global reference frame. The contribution to the force and momentequilibrium of the n-th node is

∆fn = R (ξ) fa (12.7a)

∆cn = R (ξ) ca + (x (ξ)− xn)×∆fn. (12.7b)

Their linearization yields

δ∆fn = −∆fn × θδ (ξ) +R (ξ) δfa (12.8a)

δ∆cn = −∆cn × θδ (ξ) +R (ξ) δca −∆fn × (δx (ξ)− δxn)

+ (x (ξ)− xn)×(

−∆fn × θδ (ξ) +R (ξ) δfa

)

, (12.8b)

which can be summarized asδ∆fnδ∆cn

=

[−∆fn ×

−∆cn × − (x (ξ)− xn)×∆fn ×

]

θδ (ξ)

+

[0

−∆fn ×

]

(δx (ξ)− δxn)

+

[I 0

(x (ξ)− xn)× I

]

R (ξ) δfaR (ξ) δca

. (12.9)

It is assumed that the Jacobian matrix of the sectional force and moment with respect to the linearand angular velocity is either available or can be computed by numerical differentiation. The resultingforce and moment perturbation is

δfaδca

=

[

fa/v fa/ωca/v ca/ω

]δvδω

. (12.10)

The computation of the matrix of Eq. (12.10) is delegated to the AeroData class.Each type of element determines how the sectional force and moment contributions are applied to

the nodes, and how the sectional boundary conditions at each section are computed from the kinematicsof the nodes.

128

Page 130: MBDyn Theory and Developer’s Manual Version 1.X-Devel

12.2 Numerical Linearization of Sectional Forces

Consider an arbitrary submatrix of the Jacobian matrix of Eq. (12.10), J = p/q. Its generic element,the c-th component of p derived by the r-th component of q, is

Jrc =∂pr∂qc

. (12.11)

A forward difference approach is used, namely

Jrc ∼=pr (q +∆qec)− pr (q)

∆q, (12.12)

where ec is the unit vector along the c-th component, and ∆q is a suitably chosen perturbation. Alter-natively, a centered difference approach can be used, namely

Jrc ∼=pr (q +∆qec)− pr (q −∆qec)

2∆q. (12.13)

The perturbation is

∆q = ε ‖q‖+ ν. (12.14)

Since the boundary condition q is perturbed in order to determine an equivalent perturbation of angleof attack, a resolution of few tenth of degree is deemed sufficient. As a consequence, ε > 0 must be a“small” number that, in case ec is orthogonal to q, yields an angle of the order of a tenth of a degree. Thedefault value is ε = 10−3. However, in order to avoid divisions by too small numbers, the perturbationis corrected by another “small” parameter, ν > 0. The default value is ν = 10−9.

12.3 Aerodynamic Forces with Internal States

Consider the case of a model of the aerodynamic forces that requires the use of internal states q, namely

fa = fa (v, ω, q) (12.15a)

ca = ca (v, ω, q) (12.15b)

0 = g (v, ω, q, q) . (12.15c)

Usually, the dynamic model of the aerodynamics is differential, and thus its perturbation yields a lin-earized state-space system,

δg = g/vδv + g/ωδω + g/qδq + g/qδq (12.16a)

δfa = fa/vδv + fa/ωδω + fa/qδq (12.16b)

δca = ca/vδv + ca/ωδω + ca/qδq, (12.16c)

where, with respect to δg, the terms δv and δω play the role of the input, while δq plays the role of thestate; δfa, δca play the role of the output.

In those cases, the underlying aerodynamic model has to deal with g, Eq. (12.15c), and its perturba-tion δg, Eq. (12.15c).

However, the aerodynamic elements have to:

1. provide the underlying aerodynamic model the Jacobian submatrices required to compute δv andδω from the perturbations of the nodal position, orientation, and linear and angular velocity thatare needed to deal with δg, Eq. (12.15c);

2. account for the contribution of the Jacobian matrices δfa/q and δca/q respectively required byEqs. (12.16b) and (12.16c).

129

Page 131: MBDyn Theory and Developer’s Manual Version 1.X-Devel

12.4 Aerodynamic body

The aerodynamic body element applies aerodynamic forces to the structural node it is connected to,based on the relative velocity between an aerodynamic surface attached to the node and the airstream.

The boundary conditions are related to the rigid body motion of the node, so

R (ξ) = RnRaRt (ξ) (12.17a)

b (ξ) = Rn

(

b0 +Ra (b (ξ) e1 + ξe3))

(12.17b)

ω (ξ) = ωn (12.17c)

vkin (ξ) = vn + ωn × b (ξ) , (12.17d)

where Rn is the orientation of the node, Ra is the relative orientation of the aerodynamics with respectto the node, Rt is the pretwist matrix, vn is the absolute velocity of the node, ωn is the absolute angularvelocity of the node, b0 is an offset between the node and the reference location of the aerodynamic body,and b (ξ) is the chordwise location of the point where the boundary conditions are evaluated.

Their linearization is straightforward:

θδ (ξ) = θnδ (12.18a)

δb (ξ) = −b (ξ)× θnδ (12.18b)

δω (ξ) = δωn (12.18c)

δvkin (ξ) = δvn − b (ξ)× δωn − ωn × b (ξ)× θnδ. (12.18d)

Eq. (12.7b) can be rewritten as

∆cn = R (ξ)(

ca + o (ξ)× fa)

, (12.19)

where o (ξ) = RT (ξ) (x (ξ)− xn), the offset between the point where the force is applied and the node,in the reference frame of the node, does not depend on the kinematics of the system, since the body isrigid. Its linearization yields

δ∆cn = −∆cn × θδ (ξ) +R (ξ)(

δca + o (ξ)× δfa

)

, (12.20)

since δo (ξ) ≡ 0. So the linearized force and moment is

δ∆fnδ∆cn

= −[

∆fn ×∆cn ×

]

θnδ +

[I 0

o (ξ)× I

]

R (ξ) δfaR (ξ) δca

. (12.21)

with o (ξ) = R (ξ) o (ξ).The linearization of the boundary conditions yields

δv (ξ)δω (ξ)

=

[RT (ξ) 0

0 RT (ξ)

]([v (ξ)× − ωn × b (ξ)×

ωn ×

]

θnδ

+

[I −b (ξ)×0 I

]δvnδωn

)

(12.22a)

uu=

[RT (ξ) 0

0 RT (ξ)

]([(v (ξ) + b (ξ)× ωn)×

0

]

δgn

+

[I −b (ξ)×0 I

]δxn

δgn

)

. (12.22b)

130

Page 132: MBDyn Theory and Developer’s Manual Version 1.X-Devel

After defining

fa/v = R (ξ) fa/vRT (ξ) (12.23a)

fa/ω = R (ξ) fa/ωRT (ξ) (12.23b)

ca/v = R (ξ) ca/vRT (ξ) (12.23c)

ca/ω = R (ξ) ca/ωRT (ξ) , (12.23d)

the linearization becomes[

fa/vo (ξ)× fa/v + ca/v

]

δxn

+

[fa/ω − fa/vb (ξ)×

o (ξ)× fa/ω + ca/ω −(o (ξ)× fa/v + ca/v

)b (ξ)×

]

δgn

+

[fa/v (v (ξ) + b (ξ)× ωn)×(

o (ξ)× fa/v + ca/v)(v (ξ) + b (ξ)× ωn)×

]

δgn

−[

∆fn ×∆cn ×

]

δgnuu=

δ∆fnδ∆cn

. (12.24)

12.5 Aerodynamic Beam (3 Nodes)

The aerodynamic beam3 element applies aerodynamic forces to the nodes of a three node structuralbeam element.

The aerodynamic forces/moments acting on each node are computed based on the relative velocity ofa set of locations along the beam and the airstream. The kinematic quantities of the beam are computedbased on an interpolation of the kinematics of the three nodes.

Kinematics Interpolation. Note: this part is common to all elements that use the three-node beamdiscretization and interpolation model. The generic field variable p (x) is interpolated using parabolicfunctions related to the value of the field variable at three locations that in general can be offset fromthe nodes,

p (ξ) =∑

i=1,2,3

Ni (ξ)pi, (12.25)

with

N1 =1

2ξ (ξ − 1) (12.26a)

N2 = 1− ξ2 (12.26b)

N3 =1

2ξ (ξ + 1) . (12.26c)

Orientation at an arbitrary location ξ:

R (ξ) = R2aR (θ (ξ)) (12.27)

θ (ξ) =∑

i=1,3

Ni (ξ)θ2←i = N1 (ξ)θ2←1 +N3 (ξ)θ2←3 (12.28)

θ2←i = ax(exp−1

(RT

2aRia

)). (12.29)

131

Page 133: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Orientation is dealt with specially, given its special nature. The orientation of the mid node is used as areference, and the orientation parameters that express the relative orientation between each of the endnodes and the mid node are interpolated. The interpolated orientation parameters are used to computethe interpolated relative orientation matrix, which is then pre-multiplied by the orientation matrix of themid node. Summation in this case occurs on i = 1, 3 only because by definition θ2←2 = ax(exp−1((I)) ≡0.

Since the Euler-Rodrigues orientation parameters are used (the so-caller ‘rotation vector’), the mag-nitude of the relative orientation between each end node and the mid node must be limited (formally, toπ, but it should be less for accuracy).

Position at an arbitrary location ξ:

x (ξ) =∑

i=1,2,3

Ni (ξ) (xi + oi) , (12.30)

with oi = Rioi.Angular velocity at an arbitrary location ξ:

ω (ξ) =∑

i=1,2,3

Ni (ξ)ωi. (12.31)

Velocity at an arbitrary location ξ:

vkin (ξ) =∑

i=1,2,3

Ni (ξ) (vi + ωi × oi) . (12.32)

Perturbation of Interpolated Kinematics. Orientation perturbation at an arbitrary location ξ:

δθ (ξ) =∑

i=1,3

Ni (ξ) δθ2←i (12.33)

δθ2←i = Γ−1 (θ2←i)θ(2←i)δ (12.34)

θ(2←i)δ = RT2a (θiδ − θ2δ) (12.35)

θδ (ξ) = θ2δ +∑

i=1,3

R2aΓ (θ (ξ))Ni (ξ)Γ−1 (θ2←i)R

T2a (θiδ − θ2δ)

=

I −R2aΓ (θ (ξ))∑

i=1,3

Ni (ξ)Γ−1 (θ2←i)R

T2a

θ2δ

+R2aΓ (θ (ξ))N1Γ−1 (θ2←1)R

T2aθ1δ

+R2aΓ (θ (ξ))N3Γ−1 (θ2←3)R

T2aθ3δ

=∑

i=1,2,3

Θi (ξ)θiδ, (12.36)

with

Θi (ξ) = R2aΓ (θ (ξ))NiΓ−1 (θ2←i)R

T2a i = 1 and 3 (12.37a)

Θ2 (ξ) = I −Θ1 (ξ)−Θ3 (ξ) (12.37b)

playing the role of shape functions.In fact, note that, when N1 = 1 and N3 = 0, then Θ1 = I, Θ2 = Θ3 = 0 and θδ (ξ) = θ1δ, while,

when N1 = 0 and N3 = 1, then Θ1 = Θ2 = 0, Θ3 = I and θδ (ξ) = θ3δ. Finally, when N1 = N3 = 0,then Θ1 = Θ3 = 0, Θ2 = I and θδ (ξ) = θ2δ. Moreover,

i=1,2,3 Θi (ξ) = I ∀ξ.

132

Page 134: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Position perturbation at an arbitrary location ξ:

δx (ξ) =∑

i=1,2,3

Ni (ξ) (δxi + θiδ × oi) . (12.38)

Angular velocity perturbation at an arbitrary location ξ:

δω (ξ) =∑

i=1,2,3

Niδωi

uu=

i=1,2,3

Ni (δgi − ωi × δgi) . (12.39)

Velocity perturbation at an arbitrary location ξ:

δvkin (ξ) =∑

i=1,2,3

Ni (ξ) (δvi + δωi × oi + ωi × δoi)

=∑

i=1,2,3

Ni (ξ) (δvi − oi × δωi − ωi × oi × θiδ)

uu=

i=1,2,3

Ni (ξ) (δxi − oi × δgi − (ωi × oi)× δgi) . (12.40)

Boundary Conditions Perturbation. Angular velocity perturbation:

δω (ξ) = RT (ξ)∑

i=1,2,3

(Ni (ξ) δωi + ω (ξ)×Θi (ξ)θiδ)

uu= RT (ξ) (Ni (ξ) δgi + (ω (ξ)×Θi (ξ)−Ni (ξ)ωi × ) δgi) . (12.41)

Velocity perturbation:

δv (ξ) = RT (ξ) (Ni (ξ) δvi −Ni (ξ)oi × δωi

+ (v (ξ)×Θi (ξ)−Ni (ξ)ωi × oi × )θiδ)uu= RT (ξ) (Ni (ξ) δxi −Ni (ξ)oi × δgi

+ (v (ξ)×Θi (ξ)−Ni (ξ) (ωi × oi)× ) δgi) . (12.42)

They can be summarized as

δv (ξ)δω (ξ)

=

[RT (ξ) 0

0 RT (ξ)

]∑

i=1,2,3

(

Ni (ξ)

[I −oi ×0 I

]δviδωi

+

[v (ξ)×Θi (ξ)−Ni (ξ)ωi × oi ×

ω (ξ)×Θi (ξ)

]

θiδ

)

uu=

[RT (ξ) 0

0 RT (ξ)

]∑

i=1,2,3

(

Ni (ξ)

[I −oi ×0 I

]δxi

δgi

+

[v (ξ)×Θi (ξ)−Ni (ξ) (ωi × oi)×ω (ξ)×Θi (ξ)−Ni (ξ)ωi ×

]

δgi

)

. (12.43)

133

Page 135: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Contribution to Jacobian Matrix. After defining

fa/v = R (ξ) fa/vRT (ξ) (12.44a)

fa/ω = R (ξ) fa/ωRT (ξ) (12.44b)

ca/v = R (ξ) ca/vRT (ξ) (12.44c)

ca/ω = R (ξ) ca/ωRT (ξ) (12.44d)

Bv = v (ξ)×Θi (ξ)−Ni (ξ) (ωi × oi)× (12.44e)

Bω = ω (ξ)×Θi (ξ)−Ni (ξ)ωi × (12.44f)

dn (ξ) = x (ξ)− xn, (12.44g)

the contribution of the i-th node’s motion to the equilibrium of the n-th node (i = 1, 2, 3, n = 1, 2, 3) is

Ni (ξ)

[fa/v

dn (ξ)× fa/v + ca/v

]

δxi

+Ni (ξ)

[fa/ω − fa/voi ×

dn (ξ)× fa/ω + ca/ω −(dn (ξ)× fa/v + ca/v

)oi ×

]

δgi

+

[fa/vBv + fa/ωBω

dn (ξ)×(fa/vBv + fa/ωBω

)+ ca/vBv + ca/ωBω

]

δgi

+

[0

− (Ni − δni)∆fn ×

]

δxi

+

[−∆fn ×Θi (ξ)

− (dn (ξ)×∆fn × +∆cn × )Θi (ξ) + ∆fn ×Nioi ×

]

δgi

uu=

δ∆fnδ∆cn

, (12.45)

where δni is Dirac’s delta, which is 1 when i = n, and 0 otherwise.

12.6 Aerodynamic Beam (2 Nodes)

The aerodynamic beam2 element applies aerodynamic forces to the nodes of a two node structural beamelement.

The aerodynamic forces/moments acting on each node are computed based on the relative velocity ofa set of locations along the beam and the airstream. The kinematic quantities of the beam are computedbased on an interpolation of the kinematics of the three nodes.

Kinematics Interpolation. Note: this part is common to all elements that use the two-node beamdiscretization and interpolation model. The generic field variable p (x) is interpolated using linear func-tions related to the value of the field variable at two locations that in general can be offset from thenodes,

p (ξ) =∑

i=1,2

Ni (ξ)pi, (12.46)

with

N1 =1

2(1− ξ) (12.47a)

N2 =1

2(1 + ξ) . (12.47b)

134

Page 136: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Orientation at an arbitrary location ξ:

R (ξ) = Rmidexp (θ (ξ)× ) (12.48)

Rmid = R1aexp(θ ×

)= R2aexp

(θ ×

)T(12.49)

θ =1

2ax(exp−1

(RT

1aR2a

))(12.50)

θ (ξ) =∑

i=1,2

Ni (ξ)θmid←i = N1 (ξ) θmid←1 +N2 (ξ)θmid←2 (12.51)

θmid←1 = −θ (12.52)

θmid←2 = θ. (12.53)

Orientation is dealt with specially, given its special nature. The orientation of the mid point is used as areference, and the orientation parameters that express the relative orientation between each of the endnodes and the mid point are interpolated. The interpolated orientation parameters are used to computethe interpolated relative orientation matrix, which is then pre-multiplied by the orientation matrix ofthe mid point.

Since the Euler-Rodrigues parametrization is used (the so-called ‘rotation vector’), the magnitude ofthe relative orientation between each end node must be limited (formally, to π, but it should be less foraccuracy).

Note that since the generic orientationR(ξ) is the result of a sequence of orientations about a commonaxis θ, it can be conveniently rewritten as

R (ξ) = R1aexp(θ ×

)exp

(((N2 (ξ)−N1 (ξ))θ

)×)

= R1aexp(((1 +N2 (ξ)−N1 (ξ))θ

)×). (12.54)

In fact, when ξ = −1, N1 = 1 and N2 = 0, then R (ξ) = R1a , while when ξ = 1, N1 = 0 and N2 = 1,then R (ξ) = R2a .

Position at an arbitrary location ξ:

x (ξ) =∑

i=1,2

Ni (ξ) (xi + oi) , (12.55)

with oi = Rioi.Angular velocity at an arbitrary location ξ:

ω (ξ) =∑

i=1,2

Ni (ξ)ωi. (12.56)

Velocity at an arbitrary location ξ:

vkin (ξ) =∑

i=1,2

Ni (ξ) (vi + ωi × oi) . (12.57)

Perturbation of Interpolated Kinematics. Orientation perturbation at an arbitrary location ξ:

θδ (ξ) =1 +N2 (ξ)−N1 (ξ)

2θ2δ +

1 +N1 (ξ)−N2 (ξ)

2θ1δ (12.58)

=∑

i=1,2

Ni (ξ)θiδ, (12.59)

135

Page 137: MBDyn Theory and Developer’s Manual Version 1.X-Devel

with

Ni (ξ) =1 +Ni (ξ)−N3−i (ξ)

2. (12.60a)

Note, however, that according to Eqs. (12.47), the shape functions of Eq. (12.60a) are Ni (ξ) = Ni (ξ).Position perturbation at an arbitrary location ξ:

δx (ξ) =∑

i=1,2

Ni (ξ) (δxi + θiδ × oi) . (12.61)

Angular velocity perturbation at an arbitrary location ξ:

δω (ξ) =∑

i=1,2

Niδωi

uu=∑

i=1,2

Ni (δgi − ωi × δgi) . (12.62)

Velocity perturbation at an arbitrary location ξ:

δvkin (ξ) =∑

i=1,2

Ni (ξ) (δvi + δωi × oi + ωi × δoi)

=∑

i=1,2

Ni (ξ) (δvi − oi × δωi − ωi × oi × θiδ)

uu=∑

i=1,2

Ni (ξ) (δxi − oi × δgi − (ωi × oi)× δgi) . (12.63)

Boundary Conditions Perturbation. Angular velocity perturbation:

δω (ξ) = RT (ξ)∑

i=1,2

(Ni (ξ) δωi + ω (ξ)×Ni (ξ)θiδ)

uu= RT (ξ)

i=1,2

(Ni (ξ) δgi + (Niω (ξ)−Ni (ξ)ωi)× δgi)

= RT (ξ)∑

i=1,2

Ni (ξ) (δgi + (ω (ξ)− ωi)× δgi) . (12.64)

Velocity perturbation:

δv (ξ) = RT (ξ) (Ni (ξ) δvi −Ni (ξ)oi × δωi

+ (Ni (ξ)v (ξ)× −Ni (ξ)ωi × oi × )θiδ)uu= RT (ξ) (Ni (ξ) δxi −Ni (ξ)oi × δgi

+ (Ni (ξ)v (ξ)−Ni (ξ)ωi × oi)× δgi)

= RT (ξ)Ni (ξ) (δxi − oi × δgi + (v (ξ)− ωi × oi)× δgi) . (12.65)

136

Page 138: MBDyn Theory and Developer’s Manual Version 1.X-Devel

They can be summarized as

δv (ξ)δω (ξ)

=

[RT (ξ) 0

0 RT (ξ)

]∑

i=1,2

(

Ni (ξ)

[I −oi ×0 I

]δviδωi

+

[Ni (ξ)v (ξ)× −Ni (ξ)ωi × oi ×

Ni (ξ)ω (ξ)×

]

θiδ

)

uu=

[RT (ξ) 0

0 RT (ξ)

]∑

i=1,2

(

Ni (ξ)

[I −oi ×0 I

]δxi

δgi

+

[(Ni (ξ)v (ξ)−Ni (ξ)ωi × oi)×(Ni (ξ)ω (ξ)−Ni (ξ)ωi)×

]

δgi

)

=

[RT (ξ) 0

0 RT (ξ)

]∑

i=1,2

Ni (ξ)

([I −oi ×0 I

]δxi

δgi

+

[(v (ξ)− ωi × oi)×(ω (ξ)− ωi)×

]

δgi

)

. (12.66)

i

Contribution to Jacobian Matrix. After defining

fa/v = R (ξ) fa/vRT (ξ) (12.67a)

fa/ω = R (ξ) fa/ωRT (ξ) (12.67b)

ca/v = R (ξ) ca/vRT (ξ) (12.67c)

ca/ω = R (ξ) ca/ωRT (ξ) (12.67d)

Bv = (Ni (ξ)v (ξ)−Ni (ξ)ωi × oi)×= Ni (ξ) (v (ξ)− ωi × oi)× (12.67e)

Bω = (Ni (ξ)ω (ξ)−Ni (ξ)ωi)×= Ni (ξ) (ω (ξ)− ωi)× (12.67f)

dn (ξ) = x (ξ)− xn, (12.67g)

the contribution of the i-th node’s motion to the equilibrium of the n-th node (i = 1, 2, n = 1, 2) is

Ni (ξ)

[fa/v

dn (ξ)× fa/v + ca/v

]

δxi

+Ni (ξ)

[fa/ω − fa/voi ×

dn (ξ)× fa/ω + ca/ω −(dn (ξ)× fa/v + ca/v

)oi ×

]

δgi

+

[fa/vBv + fa/ωBω

dn (ξ)×(fa/vBv + fa/ωBω

)+ ca/vBv + ca/ωBω

]

δgi

+

[0

− (Ni − δni)∆fn ×

]

δxi

+

[−Ni (ξ)∆fn ×

−Ni (ξ) (dn (ξ)×∆fn × +∆cn × ) + ∆fn ×Nioi ×

]

δgi

uu=

δ∆fnδ∆cn

, (12.68)

where δni is Dirac’s delta, which is 1 when i = n, and 0 otherwise.

137

Page 139: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Table 12.1: Coefficients of the Wagner indicial response approximation of Theodorsen’s function ([1, 2])approx. 1 approx. 2

A1 0.165 0.165A2 0.335 0.335b1 0.0455 0.041b2 0.3 0.32

12.7 Unsteady aerodynamics model

(Author: Mattia Mattaboni)The 2D unsteady aerodynamics loads are computed implementing the Theodorsen theory in state-spaceform using the Wagner approximation of the Theodorsen function.

fa =1

2ρvT vccfa (y (v, ω, q) , U∞) (12.69a)

ca =1

2ρvT vc2cca (y (v, ω, q) , U∞) (12.69b)

0 = g (v, ω, q, q) = q −A (U∞) q −B (U∞)u (v, ω) , (12.69c)

where ρ is the air density, c the airfoil chord and y is

y = C (U∞) q +D (U∞)u (v, ω) . (12.70)

Matrix A is

A =

0 1 0 0 0 0

−b1b2

(

2U∞

c

)2− (b1 + b2)

(

2U∞

c

)

0 0 0 0

0 0 −2ωPD −ω2PD 0 0

0 0 1 0 0 00 0 0 0 −2ωPD −ω2

PD0 0 0 0 1 0

, (12.71)

where A1, A2, b1 and b2 are the coefficients of the Theodorsen function approximation (Table 12.1 from[1] and [2]), ωPD is the frequency of the pseudo-derivative algorithm

L(

f)

= sL (f)− f (0) ∼= s

(1 + s/ωPD)2L (f) (12.72)

(where f (0) can be neglected under broad assumptions), and

U∞ =√

v2x + v2y. (12.73)

Matrix B is

B = BTu (U∞) , (12.74)

where

B =

0 0 01 0 00 1 00 0 00 0 10 0 0

, (12.75)

138

Page 140: MBDyn Theory and Developer’s Manual Version 1.X-Devel

and

Tu =

0 1[

1 −d1/4

U∞

1 −d3/4

U∞

]−1

=

0 1

1d3/4−d1/4

[d3/4 −d1/4U∞ −U∞

]

. (12.76)

B =

0 00 1

1d3/4−d1/4

d3/4 − 1d3/4−d1/4

d1/4

0 01

d3/4−d1/4U∞ − 1

d3/4−d1/4U∞

0 0

(12.77)

u =

tan−1(−Vy−ωzd1/4

Vx

)

tan−1(−Vy−ωzd3/4

Vx

)

(12.78)

Matrix C is

C =

(A1 +A2) b1b2(2U∞

c

)2(A1b1 +A2b2)

(2U∞

c

)0 0 0 0

0 0 ω2PD 0 0 0

0 0 0 0 ω2PD 0

0 0 0 0 0 0

. (12.79)

Matrix D is

D = DTu (U∞) , (12.80)

where

D =

(1−A1 −A2) 0 00 0 00 0 00 0 1

. (12.81)

D =

0 (1−A1 −A2)0 00 0

1d3/4−d1/4

U∞ − 1d3/4−d1/4

U∞

. (12.82)

cfa =

−cdcl0

= clookupfa

(y) + Tfay. (12.83)

cca =

00cm

= clookupca (y) + Tcay. (12.84)

The second part is the noncirculatory effect.

139

Page 141: MBDyn Theory and Developer’s Manual Version 1.X-Devel

cNCl

cNCm

= T1T2 (U∞)y = T y, (12.85)

where

T1 =

[

1 0

−a+ 12

2 1

]

, (12.86)

and

T2 =Clα

2

c

2

[

0 1U∞

− ca2U2

0

0 a2U∞

− c4U2

(18 + a2

)− 1

4U∞

]

. (12.87)

T =Clα

2

c

2

[0 1

U∞

− ca2U2

0

0 − 14U∞

(ca

8U2∞

− c32U2

)

− 14U∞

]

(12.88)

Tfa =Clα

2

c

2

0 1U∞

− ca2U2

0

0 0 0 00 0 0 0

(12.89)

Tca =Clα

2

c

2

0 0 0 00 0 0 0

0 − 14U∞

(ca

8U2∞

− c32U2

)

− 14U∞

(12.90)

Finally,

cfa = clookupfa(y1) +

0clα2

c2U∞

(

y2 − ca2U∞

y3

)

0

. (12.91)

cca = clookupca (y1) +

00

clα2

c2U∞

(

− 14y2 +

(ca

8U∞

− c32U∞

)

y3 − 14y4

)

. (12.92)

12.7.1 Perturbation of the Equations

Perturbation of g with respect to v

The perturbation of g is

g/v = −(A/U∞

q +B/U∞u)U∞/v −Bu/v. (12.93)

where, according to the previous definition of the matrices, the derivatives are

A/U∞=

0 0 0 0 0 0−b1b2 8

c2U∞ − (b1 + b2)2c 0 0 0 0

0 0 0 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

(12.94)

140

Page 142: MBDyn Theory and Developer’s Manual Version 1.X-Devel

B/U∞=

0 00 00 00 01

d3/4−d1/4− 1

d3/4−d1/4

0 0

(12.95)

U∞/v =[

vx

U∞

vy

U∞

0]

(12.96)

u/v =

vy+ωzd1/4

v2x+v2

y+ω2zd

21/4

+2vyωzd1/4

−vx

v2x+v2

y+ω2zd

21/4

+2vyωzd1/40

vy+ωzd3/4

v2x+v2

y+ω2zd

23/4

+2vyωzd3/4

−vx

v2x+v2

y+ω2zd

23/4

+2vyωzd3/40

(12.97)

The explicit computation of each term of Eq. 12.93 yields

(AU∞q +BU∞

u)U∞/v =

0−b1b2 8

c2U∞q1 − (b1 + b2)2c q2

00

u1−u2

d3/4−d1/4

0

vx

U∞

vx

U∞

0

(12.98)

=

0 0 0(−b1b2 8

c2U∞q1 − (b1 + b2)2c q2)

vx

U∞

(−b1b2 8

c2U∞q1 − (b1 + b2)2c q2) vy

U∞

0

0 0 00 0 0

(

u1−u2

d3/4−d1/4

)

vx

U∞

(

u1−u2

d3/4−d1/4

)

vy

U∞

0

0 0 0

(12.99)

for the first, while the second yields

Bu/v =

0 0 0Bu/v (2, 1) Bu/v (2, 2) 0Bu/v (3, 1) Bu/v (3, 2) 0

0 0 0Bu/v (5, 1) Bu/v (5, 2) 0

0 0 0

(12.100)

The non-null terms are

Bu/v (2, 1) = u/v (2, 1) (12.101)

Bu/v (2, 2) = u/v (2, 2) (12.102)

Bu/v (3, 1) = B (3, 1)u/v (1, 1) +B (3, 2)u/v (2, 1) (12.103)

Bu/v (3, 2) = B (3, 1)u/v (1, 2) +B (3, 2)u/v (2, 2) (12.104)

141

Page 143: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Bu/v (3, 1) = B (5, 1)u/v (1, 1) +B (5, 2)u/v (2, 1) (12.105)

Bu/v (3, 2) = B (5, 1)u/v (1, 2) +B (5, 2)u/v (2, 2) (12.106)

So, the Jacobian matrix g/v is

g/v =

0 0 0g/v (2, 1) g/v (2, 2) 0g/v (3, 1) g/v (3, 2) 0

0 0 0g/v (5, 1) g/v (5, 2) 0

0 0 0

, (12.107)

where the matrix elements are

g/v (2, 1) = −(

−b1b28

c2U∞q1 − (b1 + b2)

2

cq2

)vxU∞

− u/v (2, 1) (12.108)

g/v (2, 2) = −(

−b1b28

c2U∞q1 − (b1 + b2)

2

cq2

)vyU∞

− u/v (2, 2) (12.109)

g/v (3, 1) = −(B (3, 1)u/v (1, 1) +B (3, 2)u/v (2, 1)

)(12.110)

g/v (3, 2) = −(B (3, 1)u/v (1, 2) +B (3, 2)u/v (2, 2)

)(12.111)

gv (3, 1) = −(

u1 − u2d3/4 − d1/4

)

vxU∞

−(B (5, 1)u/v (1, 1) +B (5, 2)u/v (2, 1)

)(12.112)

gv (3, 2) = −(

u1 − u2d3/4 − d1/4

)

vyU∞

−(B (5, 1)u/v (1, 2) +B (5, 2)u/v (2, 2)

)(12.113)

Perturbation of g with respect to ω

The perturbation of g yields

g/ω = −Bu/ω. (12.114)

Where

u/ω =

0 0

−vxd1/4

v2x+v2

y+ω2zd

21/4

+2vyωzd1/4

0 0−vxd3/4

v2x+v2

y+ω2zd

23/4

+2vyωzd3/4

(12.115)

Thus,

g/ω =

0 0 00 0 g/ω (2, 3)0 0 g/ω (3, 3)0 0 00 0 g/ω (5, 3)0 0 0

(12.116)

where

g/ω (2, 3) = −u/ω (2, 3) (12.117)

g/ω (5, 3) = −(B (3, 1)u/ω (1, 3) +B (3, 2)u/ω (2, 3)

)(12.118)

g/ω (5, 3) = −(B (5, 1)u/ω (1, 3) +B (5, 2)u/ω (2, 3)

)(12.119)

142

Page 144: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Perturbation of g with respect to q

The perturbation of g yields

g/q = −A (12.120)

Perturbation of g with respect to q

The perturbation of g yields

g/q = I (12.121)

12.7.2 Perturbation of the aerodynamic forces

Perturbation of fa with respect to v

fa/v = ρccfa[vx vy vz

]+

1

2ρvT vc

(

cfa/yy/v + cfa/U∞

U∞/v

)

(12.122)

where

y/v =(C/U∞

q +D/U∞u)U∞/v +Du/v (12.123)

C/U∞=

(A1 +A2) b1b28c2U∞ (A1b1 +A2b2)

2c 0 0 0 0

0 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

(12.124)

D/U∞=

0 00 00 01

d3/4−d1/4− 1

d3/4−d1/4

(12.125)

cfa/U∞

=

0Clα

2c2

1U2

(

−y2 + caU∞

y3

)

0

(12.126)

cfa/y=

dclookupd

dα 0 0 0dclookupl

dαClα

2c

2U∞

− clα2

c2a4U2

0

0 0 0 0

(12.127)

Perturbation of fa with respect to ω

fa/ω =1

2ρvT vc

(

cfa/yy/ω

)

(12.128)

where

y/ω =Du/ω (12.129)

143

Page 145: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Perturbation of fa with respect to q

fa/q =1

2ρvT vc

(

cfa/yy/q

)

(12.130)

where

y/q = C (12.131)

Perturbation of fa with respect to q

fa/q = 0 (12.132)

12.7.3 Perturbation of the aerodynamic moments

Perturbation of ca with respect to v

ca/v = ρc2cca[vx vy vz

]+

1

2ρvT vc2

(

cca/yy/v + cca/U∞

U∞/v

)

(12.133)

cca/U∞

=

00

clα2

c2

14U2

(

y2 −(

caU∞

− c4U∞

)

y3 + y4

)

(12.134)

cca/y=

0 0 0 00 0 0 0

dclookupm

dα − 14clα2

c2U∞

clα2

c2U∞

(ca

8U∞

− c32U∞

)

− 14clα2

c2U∞

(12.135)

Perturbation of ca with respect to ω

ca/ω =1

2ρvT vc2

(

cca/yy/ω

)

(12.136)

Perturbation of ca with respect to q

ca/q =1

2ρvT vc2

(

cca/yy/q

)

(12.137)

Perturbation of ca with respect to q

ca/q = 0 (12.138)

12.7.4 Finite difference version

A reduced state-space model, with just 2 states instead of 6 states, can be used deleting the pseudo-derivative algorithm and computing the derivate using the backward finite diffenence.

The set of equations that descibes the unsteady aerodynamic loads is still the same:

fa =1

2ρvT vccfa (y (v, ω, q) , U∞) (12.139a)

ca =1

2ρvT vc2cca (y (v, ω, q) , U∞) (12.139b)

0 = g (v, ω, q, q) = q −A (U∞) q −Bu (v, ω) , (12.139c)

144

Page 146: MBDyn Theory and Developer’s Manual Version 1.X-Devel

where ρ is the air density, c the airfoil chord and y is defined as:

y = C (U∞) q +Du (v, ω) . (12.140)

In this case the matrix A is:

A =

[0 1

−b1b2

(

2U∞

c

)2− (b1 + b2)

(

2U∞

c

)

]

, (12.141)

where A1, A2, b1 and b2 are the coefficients of the Theodorsen function approximation (Table 12.1 from[1] and [2]),

The matrix B is simply:

B =

[01

]

, (12.142)

Whereas the input of the system u is the angle of attack computed at the 3/4 chord point:

u = tan−1(−Vy − ωzd3/4

Vx

)

(12.143)

The C matrix is:

C =[

(A1 +A2) b1b2(2U∞

c

)2(A1b1 +A2b2)

(2U∞

c

)]

. (12.144)

and the D matrix:

D =[(1−A1 −A2)

]. (12.145)

Using the otuput y of this SISO state-space model as input for the lookup table the circulatory part ofthe unsteady loads is computed.

The non-circulatory part is computed starting from the angle of attack computed at 1/4 chord (u1)and 3/4 chord (u2):

αpivot

α

=

[

1 −d1/4

U∞

1 −d3/4

U∞

]−1

u1u2

=1

d3/4 − d1/4

[d3/4 −d1/4U∞ −U∞

]u1u2

(12.146)

where:

u =

tan−1(−Vy−ωzd1/4

Vx

)

tan−1(−Vy−ωzd3/4

Vx

)

(12.147)

Thus, the aerodynamic coefficients result:

cfa = clookupfa(y) +

0clα2

c2U∞

(

αpivot − ca2U∞

α)

0

. (12.148)

cca = clookupca (y) +

00

clα2

c2U∞

(

− 14 αpivot +

(ca

8U∞

− c32U∞

)

α− 14 α)

. (12.149)

In order to compute the aerodynamic coefficients αpivot and α are necessary and they can be computedusing the backward finite difference:

αpivot

α

=1

∆t

(αpivot

α

k

−αpivot

α

k−1

)

(12.150)

145

Page 147: MBDyn Theory and Developer’s Manual Version 1.X-Devel

12.7.5 Perturbation of the equations

Perturbation of g with respect to v

The perturbation of g is:

g/v = −A/U∞qU∞/v −Bu/v. (12.151)

where, accordingly with the previous definition of the matrices the derivatives are:

A/U∞=

[0 0

−b1b2 8c2U∞ − (b1 + b2)

2c

]

(12.152)

U∞/v =[

vx

U∞

vy

U∞

0]

(12.153)

u/v =[

vy+ωzd3/4

v2x+v2

y+ω2zd

23/4

+2vyωzd3/4

−vx

v2x+v2

y+ω2zd

23/4

+2vyωzd3/40]

(12.154)

We can now explicitly perform the computation of each term of Eq. 12.151:

AU∞qU∞/v =

0

−b1b2 8c2U∞q1 − (b1 + b2)

2c q2

vx

U∞

vx

U∞

0

(12.155)

=

[0 0 0

(−b1b2 8

c2U∞q1 − (b1 + b2)2c q2)

vx

U∞

(−b1b2 8

c2U∞q1 − (b1 + b2)2c q2) vy

U∞

0

]

(12.156)

wheres the second is:

Bu/v =

[0 0 0

u/v (1, 1) u/v (1, 2) 0

]

(12.157)

So, the jacobian matrix g/v results:

g/v =

[0 0 0

g/v (2, 1) g/v (2, 2) 0

]

(12.158)

where the matrix elements are:

g/v (2, 1) = −(

−b1b28

c2U∞q1 − (b1 + b2)

2

cq2

)vxU∞

− u/v (1, 1) (12.159)

g/v (2, 2) = −(

−b1b28

c2U∞q1 − (b1 + b2)

2

cq2

)vyU∞

− u/v (1, 2) (12.160)

Perturbation of g with respect to ω

The perturbation of g is:

g/ω = −Bu/ω. (12.161)

Where:

u/ω =[

0 0−vxd3/4

v2x+v2

y+ω2zd

23/4

+2vyωzd3/4

]

(12.162)

Thus, it results:

g/ω =

[0 0 00 0 −u/ω (1, 3)

]

(12.163)

146

Page 148: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Perturbation of g with respect to q

The perturbation of g is simply:

g/q = −A (12.164)

Perturbation of g with respect to q

The perturbation of g is simply:

g/q = I (12.165)

12.7.6 Perturbation of the aerodynamic forces

Perturbation of fa with respect to v

fa/v = ρccfa[vx vy vz

]+

1

2ρvT vc

(

cfa/yy/v + cfa/U∞

U∞/v

)

(12.166)

where:

y/v = C/U∞qU∞/v +Du/v (12.167)

C/U∞=[(A1 +A2) b1b2

8c2U∞ (A1b1 +A2b2)

2c

](12.168)

cfa/U∞

=

0Clα

2c2

1U2

(

−αpivot +caU∞

α)

0

(12.169)

cfa/y=

dclookupd

dαdclookupl

dα0

(12.170)

where the dependence of αpivot, α and α is neglected.

Perturbation of fa with respect to ω

fa/ω =1

2ρvT vc

(

cfa/yy/ω

)

(12.171)

where:

y/ω =Du/ω (12.172)

Perturbation of fa with respect to q

fa/q =1

2ρvT vc

(

cfa/yy/q

)

(12.173)

where:

y/q = C (12.174)

147

Page 149: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Perturbation of fa with respect to q

fa/q = 0 (12.175)

12.7.7 Perturbation of the aerodynamic moments

Perturbation of ca with respect to v

ca/v = ρc2cca[vx vy vz

]+

1

2ρvT vc2

(

cca/yy/v + cca/U∞

U∞/v

)

(12.176)

cca/U∞

=

00

clα2

c2

14U2

(

αpivot −(

caU∞

− c4U∞

)

α+ α)

(12.177)

cca/y=

00

dclookupm

(12.178)

where again the dependence of αpivot, α and α is neglected.

Perturbation of ca with respect to ω

ca/ω =1

2ρvT vc2

(

cca/yy/ω

)

(12.179)

Perturbation of ca with respect to q

ca/q =1

2ρvT vc2

(

cca/yy/q

)

(12.180)

Perturbation of ca with respect to q

ca/q = 0 (12.181)

12.8 Rotor

Definitions. Axis 3 is the rotor’s axis. v is the composition of the velocity of the ‘aircraft’ node andof the airstream speed, if any, projected in the reference frame of the ‘aircraft’ node, namely

v = RTcraft (−vcraft + v∞) . (12.182)

148

Page 150: MBDyn Theory and Developer’s Manual Version 1.X-Devel

v12 =√

v21 + v22 (12.183a)

v =√

v21 + v22 + v23 =√vT v (12.183b)

sinαd = −v3/v (12.183c)

cosαd = v12/v (12.183d)

ψ0 = tan−1(v2v1

)

(12.183e)

vtip = ΩR (12.183f)

µ = cosαdv

vtip(12.183g)

Note: v ≥ 0 and v12 ≥ 0 by definition; as a consequence, cosαd ≥ 0, while the sign of sinαd depends onwhether the flow related to the absolute motion of the rotor enters the disk from above (> 0) or frombelow (< 0). vtip > 0 by construction (Ω = ‖ω‖, and no induced velocity is computed if Ω is below athreshold). As a consequence, µ ≥ 0.

Ground effect. If defined, according to [5],

uIGE = kGEuOGE (12.184a)

k = 1− 1

z2(12.184b)

z = max

(h

R,1

4

)

(12.184c)

where h is the component along axis 3 of the ‘ground’ node of distance between the ‘aircraft’ and the‘ground’ node, assuming the ‘aircraft’ node is located at the hub center.

Reference Induced Velocity. The reference induced velocity u is computed by solving the implicitproblem

f = λu − Ct

2√

µ2 + λ2= 0, (12.185)

with

Ct =T

ρπR4Ω2(12.186a)

λu =u

vtip(12.186b)

λ =v sinαd + u

vtip= µ tanαd + λu; (12.186c)

T is the component of the aerodynamic force of the rotor along the shaft axis. The value of λu isinitialized using the reference induced velocity u at the previous step/iteration. Only when u = 0 andCt 6= 0, u is initialized using its nominal value in hover,

u = sign (T )

‖T‖2ρA

. (12.187)

149

Page 151: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The problem is solved by means of a local Newton iteration. The Jacobian of the problem is

∂f

∂λu= 1 +

Ct

2 (µ2 + λ2)3/2

λ. (12.188)

The solution,

∆λu = −(∂f

∂λu

)−1

f, (12.189)

is added to λu as λu+ = η∆λu, where 0 < η ≤ 1 is an optional relaxation factor (by default, η = 1).

Corrections. The reference induced velocity is corrected by separately correcting the inflow andadvance parameters, namely

λ∗ =λ

k2H(12.190a)

µ∗ =µ

kFF(12.190b)

(by default, kH = 1 and kFF = 1). The reference induced velocity is then recomputed as

u∗ = (1− ρ) kGEvtipCt

2√

µ∗2 + λ∗2+ ρu∗prev, (12.191)

where 0 ≤ ρ < 1 is a memory factor (by default, ρ = 0).Note: in principle, multiple solutions for λu are possible. However, only one solution is physical.

Currently, no strategy is put in place to ensure that only the physical solution is considered.

12.8.1 Uniform Inflow Model

The induced velocity is equal to its reference value, u∗, everywhere.

12.8.2 Glauert Model

In forward flight (when µ > 0.15) the inflow over the rotor disk can be approximated by:

λi = λ0

(

1 + kxx

R+ ky

y

R

)

(12.192)

= λ0 (1 + kxr cosψ + kyr sinψ) , (12.193)

where the mean induced velocity λ0 is computed as shown in the previous section, while r =√

x2 + y2/Ris the nondimensional radius.

In literature a lot of expressions for the kx and ky coefficients have been proposed by different authors,as summarized in table 12.2. Up to now in MBDyn the following expressions are implemented:

kx =4

3

(1− 1.8µ2

)tan

χ

2(12.194)

ky = 0, (12.195)

FIXME: e diversa dalle espressioni riportate sul Leishman!

150

Page 152: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Table 12.2: Glauert inflow model (source: Leishman [2])Author(s) kx kyColeman et al. (1945) tan χ

2 0

Drees (1949) 43

(1−cosχ−1.8µ2)sinχ −2µ

Payne (1959) 43 (µ/λ/(1.2 + µ/λ)) 0

White & Blake (1979)√2 sinχ 0

Pitt & Peters (1981) 15π23 tan χ

2 0Howlett (1981) sin2 χ 0

where χ is the wake skew angle:

χ = tan−1(µ

λ

)

. (12.196)

TODO: check, dovrebbe essere equivalente all’espressione di Leishman ma sarebbe meglioverificare!!!

Note: the Glauert inflow model exactly matches the uniform inflow model when the advance ratio isnull (in hover). In fact, when µ = 0 then χ = kx = 0. The inflow is thus uniform over the rotor disk,and equal to λ0.

12.8.3 Mangler-Squire Model

The Mangler-Squire model is developed under the high speed assumption and it should be used only foradvance ratio grater than 0.1.

In the original formulation the induced velocity is computed as:

λi =

(2CT

µ

)[

c02

−∞∑

n=1

cn(r, αd) cosnψ

]

, (12.197)

since the advance ratio µ appears in the denominator this expression is not valid in hover. Bramwell [6]proposed a different expression for the induced velocity:

λi = 4λ0

[

c02

−∞∑

n=1

cn(r, αd) cosnψ

]

, (12.198)

where λ0 is the mean inflow computed as shown before. In this way the Mangler-Squire inflow modelmakes sense also in hover. MBDyn uses the latter version.

The expression of the cn coefficients depends on the form of the rotor disk loading. Mangler andSquire developed the theory for two fundamental forms: Type I (elliptical loading) and Type III (aloading that vanishes at the edges and at the center of the disk). The total loading is finally obtainedby a linear combination of Type I and Type III loadings (see [2]).

MBDyn uses just a Type III loading, and the resulting expressions for the cn coefficients are:

c0 =15

8η(1− η2

), (12.199)

where η =√1− r2, and r =

x2 + y2/R is the nondimensional radius.

c1 = −15π

256

(5− 9η2

)[(1− η2

)(1− sinαd

1 + sinαd

)] 12

, (12.200)

151

Page 153: MBDyn Theory and Developer’s Manual Version 1.X-Devel

c3 =45π

256

[(1− η2

)(1− sinαd

1 + sinαd

)] 32

, (12.201)

and cn = 0 for odd values of n ≥ 0.For even values:

cn = (−1)n2−1

15

8

[

η + n

n2 − 1

˙9η2 + n2 − 6

n2 − 9+

n2 − 9

] [(1− η

1 + η

)(1− sinαd

1 + sinαd

)]n2

, (12.202)

Note: the version proposed by Bramwell [6] makes sense also in hover but gives different results withrespect to the uniform inflow and the Glauert inflow models. Let assume αd = π/2, it follows that cn = 0for n ≥ 1. Therefore the induced velocity does not depend on the azimuthal position ψ but only on theradial position r, so the inflow is not uniform, but the mean inflow is still λ0.

12.8.4 Dynamic Inflow Model

The dynamic inflow model implemented in MBDyn has been developed by Pitt and Peters [7]. Here themodel is just briefly described together with the MBDyn implementation peculiarities.

The inflow dynamics is represented by a simple first-order linear model:

Mλ+L−1λ = c, (12.203)

where λ is a vector with 3 elements:

λ =

λ0λsλc

, (12.204)

the induced velocity on the rotor disk is finally obtained as function of the azimuthal angle ψ and the

non dimensional radial position r =

√x2+y2

R using the following equation:

uind(r, ψ) = ΩR(λ0 + λsr sinψ + λcr cosψ). (12.205)

The right-hand term in equation 12.203 contains the thrust, roll moment and pitch moment coefficients:

c =

CT

CL

CM

=

TρAΩ2R2

LρAΩ2R3

MρAΩ2R3

, (12.206)

while λ is derived with respect a non-dimensional time Ωt:

λ =dλ

d(Ωt). (12.207)

Equation 12.203 could be rewritten as:

Mλ+ΩL−1λ = Ωc, (12.208)

where now the dot represents the (dimensional) time derivative. The latter is the form implemented inMBDyn.

152

Page 154: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Matrix L is defined as:

L = L ·K =

1

20

15π

64tan

χ

2

0 − 4

2 cos2χ

2

0

15π

64tan

χ

20 −

4(2 cos2χ

2− 1)

2 cos2χ

2

1

VT1

Vm1

Vm

, (12.209)

where χ is wake skew angle defined as:

χ = tan−1µ

λ, (12.210)

where

µ =V∞ cosαd

ΩR, (12.211)

and

λ =V∞ sinαd

ΩR+u0indΩR

, (12.212)

where u0ind is the steady uniform induced velocity computed as described in the uniform inflow modelsection. The elements in matrix K matrix are respectively:

VT =√

λ2 + µ2, (12.213)

and

Vm =

µ2 + λ

(

λ+u0indΩR

)

λ2 + µ2(12.214)

Note: matrix L is slightly different from matrix L in Pitt and Peters’ paper [7] becausehere the first column elements are divided by VT while the second and third columnselements by Vm, whereas in matrix L an unique value v is used for all the elements inthe matrix. The Vm term corresponds to the steady lift mass-flow parameter defined inthe Pitt and Peters paper, while the VT corresponds to the no lift mass-flow parameter,because λ + ν = λ and ν = u0ind/(ΩR). Moreover in the Pitt and Peters work the elementsare function of α = tan−1 λ

µ , the relation between α and χ is:

α =π

2− χ. (12.215)

So,

sinα = cosχ = cos(χ

2+χ

2

)

= cos2χ

2− sin2

χ

2= 2 cos2

χ

2− 1, (12.216)

1− sinα

1 + sinα=

2− 2 cos2 χ2

2 cos2 χ2

=

2 sin2 χ2

2 cos2 χ2

= tanχ

2. (12.217)

153

Page 155: MBDyn Theory and Developer’s Manual Version 1.X-Devel

That means that the only difference in the MBDyn implementation is related to matrix K.In MBDyn the inversion of the L matrix is formulated analytically; matrix L∗ is defined as:

L∗ = ΩL−1 = Ω

l33

l11l33 − l13l310 − l13

l11l33 − l13l31

01

l220

− l31

l11l33 − l13l310

l11

l11l33 − l13l31

. (12.218)

Finally, matrix M is defined as:

M =

128

75π0 0

0 − 16

45π0

0 0 − 16

45π

. (12.219)

Note: this choice of matrixM corresponds to the mixed uncorrected-corrected (followingthe authors’ nomenclature) M-matrix proposed by Pitt and Peters in their paper.

154

Page 156: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 13

Forces

13.1 Abstract Force

13.1.1 Abstract

13.1.2 Abstract Internal

13.2 Structural Forces

13.2.1 Force

Absolute

Follower

Absolute Internal

Follower Internal

13.2.2 Couple

Absolute

Follower

Absolute Internal

Follower Internal

13.3 Modal

13.4 External

The external structural force element allows MBDyn to cooperate with external solvers by defining ameta-element that applies forces and moments to a set of structural nodes. The forces and moments areprovided by an external solver, called the peer. MBDyn provides the peer information about the motionof the nodes participating in the set.

155

Page 157: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Optionally, an additional layer of field mapping can be interposed. In this case, the motion of thenodes is transformed in the motion of a set of intermediate points, which is further mapped into themotion of the points known by the peer by means of a linear mapping.

The forces at the mapped points returned by the peer are mapped back into forces and moments forthe structural nodes participating in the set of the element.

13.4.1 External Structural

The external structural and external structural mapping forces can be formulated directly in the absoluteframe, or referred to a reference node. In the former case, operations are straightforward; in the latterone, the kinematics are first expressed in the reference frame of the reference node and then sent to thepeer along with the motion of the reference node. The latter returns nodal forces and moments orientedaccording to the reference frame of the reference node. The additional operations performed by themapping variant are discussed separately in a subsequent section. The orientation of the reference nodeis Rr; the position is xr.

The orientation of the generic node i is

Ri = RrRi. (13.1)

The relative orientation passed to the peer solver is

Ri = RTr Ri. (13.2)

The position of the generic node i is

xi = xr +Rrxi. (13.3)

The relative position passed to the peer solver is

xi = RTr (xi − xr) . (13.4)

The angular velocity of the generic node i is

ωi × = RiRTi = RrR

Tr +RrRiR

T

i RTr = ωr × +Rrωi ×RT

r . (13.5)

The relative angular velocity passed to the peer solver is

ωi = RTr (ωi − ωr) . (13.6)

The velocity of the generic node i is

xi = xr + ωr ×Rrxi +Rrxi. (13.7)

The relative velocity passed to the peer solver is

xi = RTr (xi − xr)−

(RT

r ωr

)× xi (13.8)

TODO: accelerationsThe virtual work done by the forces applied to the nodes is

δL = δxr · fr + θrδ ·mr +∑

i

(δxi · f i + θiδ ·mi

). (13.9)

156

Page 158: MBDyn Theory and Developer’s Manual Version 1.X-Devel

The virtual rotation of the generic node i is

δRiRTi = θiδ × = δRrR

Tr +RrδRiR

T

i RTr = θrδ × +Rrθiδ ×RT

r . (13.10)

The relative virtual rotation is thus

θiδ = RTr (θiδ − θrδ) . (13.11)

The virtual displacement of the generic node i is

δxi = δxr + θrδ ×Rrxi +Rrδxi. (13.12)

The relative virtual displacement is thus

δxi = RTr (δxi − δxr) + xi ×

(RT

r θrδ). (13.13)

The virtual work becomes

δL = δxr · fr + θrδ ·mr +∑

i

(δxi ·Rrf i + θiδ ·Rrmi − δxr ·Rrf i − θrδ ·Rr

(mi + xi × f i

)).

(13.14)

The force and moment acting on the generic node i are

fi = Rrf i (13.15)

mi = Rrmi. (13.16)

The moment is always intrinsically referred to the current position of the node. The force and momentacting on the reference node are

f = fr −∑

i

Rrf i (13.17)

m =mr −∑

i

Rr

(mi + xi × f i

). (13.18)

The moment is always intrinsically referred to the current position of the node.In principle, f andm should be identically zero, unless the reference node is specifically loaded. This

fact can be exploited by setting use reference node forces to no, which results in ignoring f andm.

13.4.2 External Structural Mapping

The external structural mapping case differs from the previous one in the fact that two additionalintermediate layers are added. The first layer computes the motion of a set of points rigidly connectedto the nodes that participate in the set. Each node n can have an arbitrary number of associated pointsp, whose position in the reference frame of the node is onp. The position of point p associated to noden is

xnp = xn +Rnonp. (13.19)

The position xnp, instead of xi, must be used to compute the relative position. Orientations are notmapped.

157

Page 159: MBDyn Theory and Developer’s Manual Version 1.X-Devel

As soon as the positions, velocities (and accelerations, if needed) of the points are computed andcollected in vectors denoted by the subscript (·)mbdyn, they are mapped into the corresponding quantitiesof the peer, denoted by the subscript (·)peer, using a linear transformation H, namely

xpeer =Hxmbdyn (13.20)

xpeer =Hxmbdyn (13.21)

δxpeer =Hδxmbdyn. (13.22)

The work done in the peer domain must be equal by the work done in MBDyn’s; this implies

δLmbdyn = δxmbdyn · fmbdyn = δxpeer · fpeer = δLpeer, (13.23)

which yields

δxmbdyn · fmbdyn = δxmbdyn ·HTfpeer, (13.24)

and thus, thanks to the arbitrariness of virtual displacements,

fmbdyn =HTfpeer. (13.25)

The forces fmbdyn corrrespond to the points of the intermediate mapping layer. They are transformedinto the corresponding nodal forces and moments considering the work done by the virtual perturbationof Eq. (13.19),

δxnp = δxn − (Rnonp)× θnδ, (13.26)

namely

δLn =∑

p

δxnp · fnp =∑

p

(δxn · fnp + θnδ · (Rnonp)× fnp) . (13.27)

The corresponding nodal force and moment are

fn =∑

p

fnp (13.28)

mn =∑

p

(Rnonp)× fnp. (13.29)

The moment is always intrinsically referred to the current position of the node.When a reference node is defined, all symbols in the expressions of the nodal force and moment

must bear an overbar (·), to indicate that they are relative and thus need to be further transformed aspreviously shown for the external structural force element.

13.4.3 External Modal

13.4.4 External Modal Mapping

13.4.5 Client Library

The peer side of the communication protocol has been implemented in a set of client libraries. At thecore there is libmbc, a library written in C that performs the core operations. Declarations are providedin the header file mbc.h.

A high-level interface is provided in C++ in libmbcxx. Declarations are provided in the header filembcxx.h.

Another interface is provided in Python, in module _mbc_py.so. The corresponding Python code isdefined in mbc_py_interface.py.

158

Page 160: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Socket-Based Protocol

Each communication is prefixed by a uint8_t value that indicates the type of operation being performed.It is optionally followed by a message. Legal values are

• ES_REGULAR_DATA

• ES_GOTO_NEXT_STEP

• ES_ABORT

• ES_REGULAR_DATA_AND_GOTO_NEXT_STEP

• ES_NEGOTIATION

• ES_OK

The corresponding numerical value is defined in mbc.h.Operations are:

• negotiation: the client tells the server what

• kinematics exchange: the master sends the motion

• forces exchange: the peer receives the loads

159

Page 161: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Chapter 14

Hydraulic Library

14.1 Hydraulic Fluids

14.2 Hydraulic Nodes

14.3 Hydraulic Elements

14.3.1 Accumulator

The accumulator defines two internal states x and v that represent the position and the velocity ofthe cap that, in a conventional gas device, separates the fluid and the gas. However, both the gravityeffect and a linear spring effect can be considered as well, and any combination of reaction forces can bemodeled by setting the appropriate parameters: g for a gravity device, pg0 for a gas device, and k for alinear spring device.

0 = q

mv + kx = −mg +Ap (p− pg)− f0 −1

2ρAce

(A

Ap

)2

|v| v

− step (xmin − x) (c1 (x− xmin) + c2v + c3v)

− step (x− xmax) (c1 (x− xmax) + c2v + c3v)

x = v

where pg = pg0

(l

l−x

and q = ρAv.

14.3.2 Actuator

The hydraulic actuator element couples the hydraulic library with the structural library. It connects thedisplacement of two structural nodes to the flow through two hydraulic nodes, and the pressure at twohydraulic nodes to the forces applied at two structural nodes. In the spirit of the multibody analysisphilosophy, this element provides the essential connection between structural and hydraulic nodes; theconstraints between the structural nodes, and other flow elements, e.g. leakages between the chambers,must be added by the user.

160

Page 162: MBDyn Theory and Developer’s Manual Version 1.X-Devel

14.3.3 Definitions

In the following, (·)s1 and (·)s2 refer to structural nodes 1 and 2, and (·)h1 and (·)h2 refer to hydraulicnodes 1 and 2. The structural node labeled as 1 is assumed as the cylinder, and its orientation determinesthe axis of the actuator. The relative orientation of the actuator is defined by the unit vector v, and theabsolute orientation is Rs1v. It is assumed that appropriate kinematic constraints allow only a relativedisplacement of the structural nodes along the axis v, and the only relative rotation, if any, is about theaxis itself. This can be obtained by combining an inline joint with a revolute rotation or a prismaticjoint.

14.3.4 Equations

0 = −F0 = −fs1 × F0 = F

0 = fs2 × F0 = qh1

0 = qh2

ph1 = Ph1

ph2 = Ph2

The first four equations apply the force resulting from the hydraulic pressure to the structural nodes; thefifth and the sixth apply the flow resulting from the actuator kinematics to the flow balance equations ofthe hydraulic nodes. The last two equations are required to associate two scalar differential unknownsto the hydraulic node pressures, because the flow definitions require the derivative of the pressure, whilethe hydraulic nodes are defined as scalar algebraic.

The force is defined as

F = (Ah1ph1 −Ah2ph2) (Rs1v) (14.1)

The distance between the structural nodes, along the actuator axis, is

l = (Rs1v)T(xs2 + fs2 − xs1 − fs1) (14.2)

The relative velocity of the structural nodes, along the actuator axis, is

l = (Rs1v)T(xs2 − xs1 + ωs1 × (xs2 − xs1) + (ωs2 − ωs1)× fs2) (14.3)

The flow at the two hydraulic nodes is

qh1 = Ah1

(

l∂ρh1∂p

Ph1 + ρh1d

)

qh2 = Ah2

(

(L− l)∂ρh2∂p

Ph2 − ρh2d

)

where ρ is the fluid density (different fluids in the chambers are allowed), and L is the total length of theactuator. In case stroke limitations must be enforced, the kinematic constraints must account for them.

14.3.5 Dynamic Pipe

Finite Volume dynamic pipe.

161

Page 163: MBDyn Theory and Developer’s Manual Version 1.X-Devel

14.3.6 Definitions

The dynamic pipe is formulated according to the finite volume approach. The pipe is discretized bymeans of the pressures and the flow at the two ends, which are interpolated linearly. The mass and themomentum balance equations are written by cutting the pipe in two halves and adding the contributionof each resulting subvolume to the respective nodal equations.

Consider the mass conservation and the momentum balance equations for a one-dimensional flow:

D

Dt(dm) = 0, (14.4)

D

Dt(dQ) = df. (14.5)

When a rigid pipe is considered, the total derivativeD/Dt of the test mass dm = ρAdx of Equation (14.4)yields

D

Dt(dm) =

∂t(dm) + v

∂x(dm) , (14.6)

which results in

q/x +Aρ/t = 0, (14.7)

where q = ρAv is the mass flow. Consider now the momentum equation (14.5); the total derivative ofthe momentum dQ = vdm yields

D

Dt(dQ) =

(

q/t + (qv)/x

)

dx, (14.8)

while the pressure gradient and the viscous contributions can be isolated from the force per unit lengthon the right hand side:

df = −Adp+ fvdx+ df∗, (14.9)

so, by neglecting the deformability of the pipe and the extra forces df∗ acting on the fluid, the momentumbalance equation yields

q/t + (qv +Ap)/x = fv, (14.10)

which can be reduced to the pressure and flow unknowns simply by recalling the definition of the flow:

q/t +

(q2

ρA+Ap

)

/x

= fv. (14.11)

A flexible pipe has been considered as well; the formulation is not reported for simplicity, because such alevel of detail is required only for very specialized problems, and a first approximation can be obtainedby altering the bulk modulus of the fluid.

The pipe is discretized by considering a finite volume approach, based on the use of constant stepwise(Heavyside) test functions with arbitrary trial functions. In the present case, linear trial functions havebeen considered both for the flow and for the pressure:

q (x) =

[

1− ξ

2

1 + ξ

2

]q1q2

,

p (x) =

[

1− ξ

2

1 + ξ

2

]p1p2

,

162

Page 164: MBDyn Theory and Developer’s Manual Version 1.X-Devel

with ξ = ξ (x) ∈ [−1, 1] and dξ/dx = 2/ (b− a). The discrete form of the pipe equations results in

q (b)− q (a) = −∫ b

a

∂ρ

∂pp/t dx,

b− a

2

(

q (b)/t + q (a)/t

)

+

(

q (b)2

ρ (b)A+Ap (b)

)

−(

q (a)2

ρ (a)A+Ap (a)

)

=

∫ b

a

fv dx;

by dividing the pipe in two portions, and by considering the domains [−1, 0] and [0, 1] for ξ in eachportion, the discrete equations of the finite volume pipe become

−1

2(q1 + q2)−

∂ρ (−1/2)

∂p

L

8(3p1 + p2) = φ1,

1

2(q1 + q2)−

∂ρ (1/2)

∂p

L

8(p1 + 3p2) = φ2,

L

8(3q1 + q2) +

(q1 + q2)2

4ρ (0)A− q21ρ (−1)A

+A

2(p2 − p1) =

L

2

∫ 0

−1

fv dξ,

L

8(q1 + 3q2) +

q22ρ (1)A

− (q1 + q2)2

4ρ (0)A

+A

2(p2 − p1) =

L

2

∫ 1

0

fv dξ,

where φ1 and φ2 are the contributions of the two portions of pipe to the respective nodal flow balanceequations. The integral of the time derivative of the density is numerically computed. The integral ofthe viscous forces per unit length is numerically performed as well, accounting for the flow regime inthe pipe as function of the Reynolds number. In fact, for the forces per unit length, the dependencyon the flow is considered linear for 0 < Re < 2000, and quadratic for Re > 4000, while a polynomialfitting of the transition behavior, accounting also for the rate of the Reynolds number, is modeled for2000 < Re < 4000.

Equations

0 =1

2(q1 + q2) +AL

∂ρ

∂p 1

(3

8P1 +

1

8P2

)

0 = −1

2(q1 + q2) +AL

∂ρ

∂p 2

(1

8P1 +

3

8P2

)

0 = −L(3

8q1 +

1

8q2

)

−(1

2(q1 + q2)

)21

ρmA+ q21

1

ρ1A− A

2(p2 − p1)− f1

0 = −L(1

8q1 +

3

8q2

)

− q221

ρ2A+

(1

2(q1 + q2)

)21

ρmA− A

2(p2 − p1)− f2

p1 = P1

p2 = P2

163

Page 165: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Bibliography

[1] Richard L. Bielawa. Rotary Wing Structural Dynamics and Aeroelasticity. AIAA, Washington, DC,1992.

[2] J. Gordon Leishman. Principles of helicopter aerodynamics. Cambridge University Press, 2 edition,2006.

[3] Pierangelo Masarati and Marco Morandini. An ideal homokinetic joint formulation for general-purpose multibody real-time simulation. Multibody System Dynamics, 20(3):251–270, October 2008.doi:10.1007/s11044-008-9112-8.

[4] Pierangelo Masarati and Marco Morandini. Intrinsic deformable joints. To be published.

[5] I. C. Cheeseman and N. E. Bennett. The effect of ground on a helicopter rotor in forward flight. TR3021, NASA, 1955.

[6] A. R. S. Bramwell. Helicopter Dynamics. Edward Arnold, London, 1976.

[7] Dale M. Pitt and David A. Peters. Theoretical prediction of dynamic-inflow derivatives. Vertica,5:21–34, 1981.

164

Page 166: MBDyn Theory and Developer’s Manual Version 1.X-Devel

Pierangelo MasaratiDipartimento di Ingegneria Aerospaziale, Politecnico di Milanovia La Masa 34, 20156 Milano, ItalyTel.: ++39 02 2399 8309Fax: ++39 02 2399 8334E-mail: [email protected]: http://www.aero.polimi.it/~mbdyn/Web: http://www.aero.polimi.it/~masarati/Web: http://www.aero.polimi.it/~masarati/MBDyn-input/manual/index.html

165