MSC.Software MSC.ADAMS v2005R2

Slides:



Advertisements
Similar presentations
Isoparametric Elements Element Stiffness Matrices
Advertisements

SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Ordinary Differential Equations
EARS1160 – Numerical Methods notes by G. Houseman
Engineering Optimization – Concepts and Applications Engineering Optimization Concepts and Applications Fred van Keulen Matthijs Langelaar CLA H21.1
Chapter 9 Gauss Elimination The Islamic University of Gaza
Isoparametric Elements Element Stiffness Matrices
Motion Analysis (contd.) Slides are from RPI Registration Class.
Manipulator Dynamics Amirkabir University of Technology Computer Engineering & Information Technology Department.
Single Point of Contact Manipulation of Unknown Objects Stuart Anderson Advisor: Reid Simmons School of Computer Science Carnegie Mellon University.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Implicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Solver & Optimization Problems n An optimization problem is a problem in which we wish to determine the best values for decision variables that will maximize.
Ordinary Differential Equations (ODEs)
ME751 Advanced Computational Multibody Dynamics Implicit Integration Methods BDF Methods Handling Second Order EOMs April 06, 2010 © Dan Negrut, 2010 ME751,
Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering University of Toledo Solving ODE.
Curve Modeling Bézier Curves
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Boyce/DiPrima 9th ed, Ch 8.4: Multistep Methods Elementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard.
Section 2: Finite Element Analysis Theory
ME451 Kinematics and Dynamics of Machine Systems
ME451 Kinematics and Dynamics of Machine Systems Numerical Solution of DAE IVP Newmark Method November 1, 2013 Radu Serban University of Wisconsin-Madison.
ME451 Kinematics and Dynamics of Machine Systems Dynamics of Planar Systems December 1, 2011 Solving Index 3 DAEs using Newmark Method © Dan Negrut, 2011.
Integration of 3-body encounter. Figure taken from
ME751 Advanced Computational Multibody Dynamics Section 9.6 February 25, 2010 © Dan Negrut, 2010 ME751, UW-Madison “In China if you are one in a million.
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
Progress in identification of damping: Energy-based method with incomplete and noisy data Marco Prandina University of Liverpool.
11/11/20151 Trusses. 11/11/20152 Element Formulation by Virtual Work u Use virtual work to derive element stiffness matrix based on assumed displacements.
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
ME451 Kinematics and Dynamics of Machine Systems Singular Configurations 3.7 October 07, 2013 Radu Serban University of Wisconsin-Madison.
Large Timestep Issues Lecture 12 Alessandra Nardi Thanks to Prof. Sangiovanni, Prof. Newton, Prof. White, Deepak Ramaswamy, Michal Rewienski, and Karen.
Chapter 9 Gauss Elimination The Islamic University of Gaza
Bolted Joint Assembly. Advanced Solid Body Contact Options Goal – In this workshop, our goal is to study the effect that contact stiffness specification.
Lecture 6 - Single Variable Problems & Systems of Equations CVEN 302 June 14, 2002.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
ME451 Kinematics and Dynamics of Machine Systems Dynamics of Planar Systems December 9, 2010 Solving Index 3 DAEs using Newmark Method © Dan Negrut, 2010.
S3-1 ADM703, Section 3, August 2005 Copyright  2005 MSC.Software Corporation SECTION 3 SUSPENSION SYSTEM.
VEHICLE DYNAMICS SIMULATIONS USING NUMERICAL METHODS VIYAT JHAVERI.
ME451 Kinematics and Dynamics of Machine Systems Dynamics of Planar Systems November 4, 2010 Chapter 6 © Dan Negrut, 2010 ME451, UW-Madison TexPoint fonts.
ADM703b, Section 5, February 2013 Copyright© 2013 MSC.Software Corporation S5 - 1 SECTION 5 STATIC ANALYSIS.
ADM703b, Section 10, February 2013 Copyright© 2013 MSC.Software Corporation S SECTION 10 MODELING ISSUES.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
ME451 Kinematics and Dynamics of Machine Systems Dynamics of Planar Systems December 9, 2010 Solving Index 3 DAEs using Newmark Method © Dan Negrut, 2010.
Advanced Computer Graphics Rigid Body Simulation
INTEGRATOR CLASSIFICATION & CHARACTERISTICS
CHAPTER 3 NUMERICAL METHODS
SECTION 8 INTEGRATOR SETTINGS.
Lesson 8: Basic Monte Carlo integration
Chapter 7. Classification and Prediction
SECTION 4 WASHING MACHINE.
Software Testing.
RECOMMENDED PRACTICES
OSE801 Engineering System Identification Spring 2010
SECTION 8 OVER-RUNNING PULLEY.
Advanced Numerical Methods (S. A. Sahu) Code: AMC 51151
ECE 576 – Power System Dynamics and Stability
Algorithm Analysis CSE 2011 Winter September 2018.
Convergence in Computational Science
MEGN 537 – Probabilistic Biomechanics Ch
Class Notes 18: Numerical Methods (1/2)
Autonomous Cyber-Physical Systems: Dynamical Systems
Algorithm An algorithm is a finite set of steps required to solve a problem. An algorithm must have following properties: Input: An algorithm must have.
Objective of This Course
CSE 245: Computer Aided Circuit Simulation and Verification
Where did we stop? The Bayes decision rule guarantees an optimal classification… … But it requires the knowledge of P(ci|x) (or p(x|ci) and P(ci)) We.
SKTN 2393 Numerical Methods for Nuclear Engineers
Chapter 4 . Trajectory planning and Inverse kinematics
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
GPAT – Chapter 7 Physics.
Modeling and Simulation: Exploring Dynamic System Behaviour
Presentation transcript:

Advanced ADAMS/Solver Seminar Aspects related to Dynamic Analysis in ADAMS MSC.Software MSC.ADAMS v2005R2 Based on original material by Dan Negrut and others

DAY 1. Solution of Non-Linear and Linear Systems of Equations Numerical Methods for the Solution of ODEs Multi-step methods BDF methods Runge-Kutta methods Brief Introduction to Solution of DAEs The I3 and SI2 formulations Equation Formulation Methods in Multibody Dynamics The Cartesian vs. the Recursive Formulation

DAY 2. Ways to improve simulation performance and robustness in ADAMS Integrator Settings Error Handling Modeling Issues Debugging your model in ADAMS/Solver ADAMS User-Subroutines Literature references: MBS and Numerical Methods What’s new in the ADAMS/Solver C++

Appendix. A. Contact computation methodology B. The New HHT Integrator (ADAMS/Solver C++) C. The Cartesion vs. the Recursive Formulation

ADVANCED ADAMS/SOLVER SEMINAR Newton’s Method for solution of Nonlinear Equations

Solving a Non-Linear System The most important algorithm to understand It is used almost in all analysis modes by the ADAMS/Solver Position/Velocity/Acceleration Initial Conditions Acceleration-Force Reconcile Kinematics/Statics/Dynamics Analyses The idea is to solve a non-linear system

Newton-Raphson Method In one-dimension: Find the solution x* of the equation: The function is differentiable

Newton-Raphson Method Algorithm Start with initial guess x(0) and then compute x(1), x(2), x(3), etc.

Newton-Raphson Method Geometric Interpretation

Newton-Raphson Example 0107 . 5451 2 004 1 7109 / 3775 1439 3 5838 0678 ) ( = - ¢ x f STEP The exact answer is x* = 1.0

Quasi-Newton Method The only difference is that the same derivative is used for several iterations

Quasi-Newton Method Geometric Interpretation

Newton-Raphson The Multidimensional Case Solve for the non-linear system The algorithm becomes The Jacobian is defined as

Solving Non-linear Equations FINAL CONCLUSIONS Algorithm converges only if initial guess is close to solution Newton-Raphson Algorithm Evaluates Jacobian at each iteration Expensive, but converges fast (quadratic) Corresponds to PATTERN= T: T: T: T: T: T: T: T: T: T In ADAMS, used often in STATICS Quasi-Newton Algorithm Evaluates Jacobian only once in a while Inexpensive, but only converges linearly Corresponds to PATTERN= T:F:F:F:T:F:F:F:T:F In ADAMS, used often in DYNAMICS

The Concepts of Residual and Correction Produce initial configuration, and plug back: Consider Differential Algebraic System: Correct value of states New Residuals:

The Linear Solver in ADAMS Solution of linear systems is required in all analyses modes It is an intermediate step in the Newton’s method At various times, one of FOUR actions invoked for solution Action 1: Setup A is usually a sparse matrix in ADAMS Determine the pattern of non-zeros of the matrix A Obtain a set of typical values in A. Remember the example with the cooking ingredients and use it to explain the symbolic factorization step.

The Linear Solver in ADAMS Action 2: Symbolic Factorization Factor A into a lower and upper triangular matrix A = L U (Gauss factorization) L and U are calculated in terms of the entries in A at a particular moment in time (at least once at the beginning of the simulation…)

The Linear Solver in ADAMS Action 3: Numeric Factorization The numeric values of L and U are calculated given A Done repeatedly during a simulation Action 4: Forward-Backward Substitution L U x = b L y = b U x = y

Symbolic Factorization The basic idea: You have some ingredients, and a recipe is defined to “cook a meal” (do the LU factorization) When the ingredients change too much, the old recipe is not good anymore A new recipe should be established (a new symbolic factorization carried out)

Further Remarks on Linear Solver in ADAMS Speed Calculation of the L and U matrices (symbolic factors) is expensive and is usually done once in the simulation The pivot selection strategy is to minimize “fill-ins” (generate least number of entries in L and U) and give accurate answers Accuracy If a pivot element Lii is near zero, accuracy of solution is poor Robustness If the matrix changes significantly, the preselected pivots can go to zero. ADAMS has to choose a new set of pivots. This is called symbolic refactorization.

Further Remarks on Linear Solver in ADAMS How often an “Action” is taken: Action 1: taken once at the beginning of simulation It might be taken again, if the topology of the model changes (for instance, a constraint becomes redundant all of a sudden – the solver gets a new sparsity pattern for the Jacobian) Action 2: taken at least once at the beginning of the simulation. If the simulation is nice, then the solver will not need to come up with a new “recipe” to cook the LU factorization The user is prompted with a brief message when a symbolic factorization is carried out during the simulation Action 3: taken every time the Jacobian is re-evaluated (remember the PATTERN=T:F:F:F:T:F:F:F:T:F – each T results in a new LU factorization) Action 4: taken every time an iteration is carried out (for both T and F in the PATTERN)

Linear Solvers in ADAMS 2 sparse solvers are available CALAHAN solver <default> HARWELL solver CALAHAN Solver About 30% faster than HARWELL HARWELL Solver Can handle redundant constraints very well Access in ADAMS (undocumented) LSOLVER/HARWELL LSOLVER/CALAHAN

ADVANCED ADAMS/SOLVER SEMINAR Basic Theory on Numerical Solution of ODEs and DAEs

Numerical Integration ~Basic Concepts~ Initial Value Problem: Looking for an approximation to the solution of a differential equation at a sequence of discrete points t0, t1,…

Numerical Integration: Basic Concepts Initial Value Problem Simplified notation: Examples of algorithms Forward Euler Backward Euler

Numerical Methods ~Linearization and Eigenvalues~ Most ODEs are non-linear Insight can be gained by linearizing: Eigenvalues l1, l2 , l3 , … of A provide locally useful qualitative information about behavior of original non-linear ODE This qualitative behavior comes from looking at simple ODE problems such as

Numerical Methods ~Linearization and Eigenvalues~ Solution of z’=lz is In mechanical engineering applications, the eigenvalues are imaginary: l=a+ib Qualitative behavior is induced by value of “a” (real part) and “b” (imaginary part) Over-damped systems (dampers) Under-damped (systems with flexible bodies)

Numerical Integration ~Basic Concepts~ ACCURACY vs. STABILITY

Numerical Integration: ACCURACY Does numerical solution converge as ? IVP Case Study: True solution: Numerical solution (Forward Euler): As Control over accuracy is by means of step-size control ( )

Numerical Integration: STABILITY Does the error in the solution stay bounded? What is the effect of step size on error growth? Case Study: IVP Forward Euler: Backward Euler:

Numerical Integration Stability Constraints on the value of step-size : Forward Euler is stable provided The Backward Euler is stable provided What happens when l is large and negative?

The Impact of Stability Region Size F.Euler B.Euler The step-size should be such that is in the stability region For numerical stiff systems, staying the region of stability: Easy for Backward Euler Hard for Forward Euler

Numerical Integration: PHYSICAL STIFFNESS High frequencies (Im(l) is large when mass small compared to stiffness) High frequency oscillations; takes time to die out because little damping (c2) Mass 2 F(t) k1=10 c1=0.1 Mass 1 k2=10000 c2=0.1

Numerical Integration: NUMERICAL STIFFNESS Damped high frequencies (Re(l) is large and negative) High frequency vibration dies out very quickly Only lower frequency modes are active in system System is classified as stiff when F(t) Mass 1 Mass 2 k2=10000 c2=1000 k1=10 c1=0.1

Numerical Integration: Numerical vs. Physical Stiffness All methods have problems with physically stiff systems Stability issues (for explicit integrators) Convergence issue (for implicit integrators) Numerically stiff systems handled well by stiff integrators (e.g., Backward Euler, BDF integrators)

Numerical Integration: Forward Euler vs. Backward Euler Easier to implement (explicit) Very small ratio Less stable – is limited to take small step-sizes Backward Euler More difficult to implement (implicit) Large ratio More stable – can take very large step-sizes

Numerical Integration: INTEGRATION ERROR eL eG Global Error (eG) The difference between the current solution and the true solution Local Truncation Error (eL) The error introduced in a single step

Classification of Integrators Major: Explicit vs. implicit Stiff vs. non-stiff Minor: Single step vs. multi-step Fixed step size vs. variable step size Variable order vs. fixed order Each has advantages/disadvantages for different classes of problems. Governing differential equations:

Explicit Integrators (multi-step method) General Formula A first order example (Forward Euler) Integration Process is explicit For i = 1…n (advancing the time step) One step process – fast!

Explicit Integrators Advantages Disadvantages Applicability Each step is fast, because solution is not iterative Disadvantages Looks at past history only Low stability properties (limit on size of step-size) Applicability Integration of non-stiff problems f(t,y) is not expensive

Stiff Integrators (multi-step method) General Formula: A first order method (Backward Euler): Integration Process is iterative For i = 1…n (advancing the time step)

Stiff Integrators Advantages Disadvantages Applicability Each step is stable Disadvantages Iterations are expensive Jacobian may not be available Applicability Problems dominated by stability requirements Models with highly damped eigenvalues Models with drastically changing eigen behavior

BDF Integrators Definition: Example: GSTIFF 1st order: 2nd order: 3rd order: 4th order: 5th order:

Single Step Methods (RKF type) Based on Taylor’s series expansion Advantages No reliance on past history Easy to control integration error Disadvantages Many f(t,y) evaluations required per step Applicability Models with contact/discontinuities, where past history is not a reliable guide to future behavior Models where evaluation of f(t,y) is cheap

Numerical Integration: Review of Integrator Types Explicit Vs. Implicit Forward Euler Vs. Backward Euler Single-step Vs. multiple-step Runge-Kutta Vs. Adams-Bashforth Stiffly stable Vs. non-stiffly stable Backward Euler Vs. Forward Euler Fixed step size Vs. variable step size Variable order Vs. fixed order

Equation Solution: Integrators in ADAMS Stiffly stable, multi-step, variable order, variable step Integrators Gstiff Wstiff Non-stiff, variable step integrators ABAM (variable order) Runge-Kutta-Fehlberg 4-5 (constant order) Stiffly stable, multi-step, variable order, fixed step Integrators Constant_BDF

Equation Solution: Integrator Characteristics Stiff integrators Maximum order is 6 Step size limited by accuracy considerations; stability is not a factor Non-stiff integrators Integration step is limited by the inverse of the highest frequency (active or inactive) in the system … stability considerations Are notoriously inefficient for solving stiff problems. Maximum order as high as 12. Can be more accurate than stiff integrators for the same step size

Equation Solution: Which integrator to use? As a default always use GSTIFF Mechanisms dominated by flex bodies, applied forces or damping Typically are numerically stiff. Example: A suspension system Use Gstiff or Wstiff Mechanisms dominated by constraints and small, smooth forces Typically are not numerically stiff. Example: A satellite in orbit. Use ABAM

ADVANCED ADAMS/SOLVER SEMINAR Solution of DAE of Multibody Dynamics

The simplest DAE example: Particle on Circle Index 3 Differential Algebraic Equations

The simplest DAE example: Particle on Circle Second order differential problem reduced to first order problem:

Solution of DAE (DAE: Differential Algebraic Equations) Task: Phase 1: Predict an initial guess Phase 2: Correct the guess Phase 3: Evaluate quality of solution (accept solution) Phase 4: Prepare for next step

Solution of DAE Phase 1: Prediction Predict an initial value using an explicit method Gstiff uses Taylor’s series expansion to predict Wstiff uses Newton divided differences to fit a polynomial through past values of The predictor is simply looking at past values to guess the solution at the next time. The governing equations G are not satisfied. This is simply a good starting point for the next phase.

Solution of DAE Phase 2: Corrector Iterations Use Newton-Raphson, in conjunction with the BDF formula to correct the solution Linearize the equations G about prediction to get: From the BDF formula, , we get by comparing two iterations:

Solution of DAE Phase 2-Corrector Iterations (Contd.) At this point, the only unknown left is Solve for , and then update value of y. Repeat iteration until

2D pendulum: Equations & Jacobian What happens when the step size becomes small?

Solution of DAE Phase 3: Evaluate quality of solution Estimate local truncation error If Accept solution. Go to Phase 4 Reject solution. Repeat step with new step size

Solution of DAE Phase 4: Prepare for next step Update higher order derivatives using BDF formula Used in prediction for the next step Determine step-size h and order k for next step Estimate factor R by which step size can be increased without violating local truncation error at: current order-1: current order: current order+1: Pick order corresponding to Limit value of R

Index 3 DAE: Integrator Issues Integration error test: Cannot include velocities, l’s in error test (but faster solution) Velocities do not satisfy time derivative of the constraints (not as accurate; spikes in solution) Step size issues Jacobian becomes ill-conditioned at small step sizes Corrector convergence issues Corrector may fail to converge when predictions are not good Corrector may fail to converge when Jacobian is ill conditioned

Solution of DAE: Motivation for SI2 Formulation Improve robustness of solutions Decrease corrector failures due to ill-conditioning of Jacobian with small step sizes Reduce spikes in accelerations Improve accuracy of solution More accurate velocities More accurate accelerations

The SI2 Formulation Equations:

2D Pendulum Example: Governing Equations SI2 Index 3

SI2 vs. Index-3

2D Pendulum Jacobian:

Why is SI2 more accurate than Index-3? Recall quantity that was used in Error Test: SI2 Includes displacements and velocities. Velocities are guaranteed to satisfy Error Index-3 Only includes displacements. Velocities are not guaranteed to satisfy Error

Why is SI2 more stable than Index-3 ? Constraint Derivative Equations Require velocities to be tangential to the constraint surface. Removes noise seen in Index-3 Slightly different corrector Solve for hl and hm during corrector equations Jacobian Scaling All differential equations are multiplied by h. So there are no terms of the form 1/h in the Jacobian. Jacobian is stable as step size decreases

ADVANCED ADAMS/SOLVER SEMINAR DAY 2

DAY 2. Ways to improve simulation performance and robustness in ADAMS Integrator Settings Error Handling Modeling Issues Debugging your model in ADAMS/Solver ADAMS User-Subroutines Literature references: MBS and Numerical Methods What’s new in the ADAMS/Solver C++

Integrator Control

Integrator Control: MODIFIED CORRECTOR Optimize convergence criteria Corrector monitors corrections only on: displacements user defined dynamic states Corrector does not monitor corrections on: Velocities Lagrange Multipliers Forces Real-world benefits Contact 200% faster Fewer corrector convergence failures Also recommended for Friction and Durability

Integrator Control: ADAPTIVITY Changes the corrector stopping criteria The change is such that the corrector stopping criteria becomes easier to satisfy The original stopping criteria becomes

Integrator Control: ERROR Specifies the relative and absolute local error tolerance that the integrator must satisfy at each step. For I3 BDF integrators, ADAMS/Solver monitors the integration errors in the displacement and state variables that the other differential equations (DIFFs, LSEs, GSEs, and TFSISOs) define. SI2 also monitors errors in velocities The value of ERROR is units sensitive Default: ERROR=1e-3 Range: ERROR>=0

Integrator Control: HINIT and HMAX Defines the initial time step that the integrator attempts. Default: 1/20 of the output step Specify small value if high initial transients are present in simulation Can use remove spikes in accelerations by giving integrator chance to get to higher order (3 and above) before first output step HINIT Defines the maximum time step that the integrator is allowed to take (can influence accuracy). Default Hmax=DTOUT when interpolation is not done Hmax is unset when interpolation is done Use small HMAX with large ERROR value for the integrator to behave like a constant step-size integrator HMAX

Integrator Control: HMIN Defines the minimum time step that the integrator is allowed to take. Default: 1.0E-6*HMAX for GSTIFF and WSTIFF Machine precision for ABAM, RKF_45, SI2_GSTIFF, HHT For I3, reduce HMIN to small value if the solver requires very small step-sizes

Integrator Control: MAXIT The maximum number of iterations allowed for corrector Default: 10 Range: MAXIT > 0 Tip: if anything, try less iterations rather than more, as too many corrections probably means the prediction is too far from the correction and the step will be rejected Sometimes, for almost linear models, it‘s useful to set MAXIT=7 and PATTERN=F

Integrator Control: INTERPOLATE Specifies that the integrator not control its step size to hit an output point. Therefore, when the integrator crosses an output point, it computes a preliminary solution by interpolating to the output point. It then refines or reconciles the solution to satisfy the equations of motion and constraint. Sometimes helps eliminating spikes in the results at the price of slightly larger CPU times INTERPOLATE=OFF turns off interpolation for the chosen integrator. Default: OFF for GSTIFF (I3, SI2, and SI1) and WSTIFF ON for ABAM and RKF_45

Integrator Control: KMAX Indicates the maximum order that the integrator can use. Accuracy primarily achieved on integrator order, so any modification can adversely affect the integrator’s accuracy and robustness. Useful for models with contact and/or very stiff elements Recommended then to reduce to 2 Default: KMAX =12 (ABAM); KMAX =6 (GSTIFF, WSTIFF, and SI2_GSTIFF)

Integrator Control: PATTERN Controls how often the Jacobian matrix is to be re-evaluated during the correction phase A value of true (T) indicates that ADAMS/Solver is evaluating a new Jacobian matrix for that iteration. A value of false (F) indicates that ADAMS/Solver is using a previously calculated Jacobian matrix as an approximation of the current one. PATTERN=F, will evaluate the Jacobian only when the corrector has not converged. Useful for almost linear problems. In ADAMS/SolverC++ , PATTERN=F causes the adaptive Jacobian to kick in. Setting PATTERN=F:F though causes the solver to not re-evaluate the Jacobian unless the corrector fails. Default: T:F:F:F:T:F:F:F:T:F

Comparison of BDF Integrators in ADAMS GSTIFF BDF coefficients are constant Very efficient implementation for smooth problems Faster, but error introduced with step size changes Frequent step size adjustments can cause stability problems WSTIFF BDF coefficients recomputed when step-size or order changes Produces smoother results (less spikes), but less efficient.

Comparison of BDF Integrators in ADAMS Correction GSTIFF As a default, NEITHER the velocity kinematic constraints , NOR the acceleration kinematic constraints are satisfied. You need to set INTERPOLATE=ON for this to happen, and it only happens at output points. WSTIFF Reconciles velocities and accelerations to satisfy the velocity and acceleration kinematic constraints at output points only. Reconcile: 2 step process Use the solution from the integration step as a starting point. Keep displacements fixed. Refine velocities to satisfy Keep displacements and velocities fixed Re-solve equations of motion to calculate consistent accelerations and Lagrange multipliers

ADVANCED ADAMS/SOLVER SEMINAR Error Handling

ERROR HANDLING Corrector Failures Integration Failures Failure to start simulation Singular Matrices and Symbolic Refactorization Static equilibrium failures

Error Handling: Corrector Failures Why it happens: The Newton-Raphson iterations do not converge to a solution Root Causes: Discontinuous motions and forces (predictor is inaccurate, predicted value not close to solution) Jacobian incorrect and/or ill conditioned Remedies: Ensure all motion inputs, user-defined forces, and user-written differential equations are both continuous and differentiable Increase frequency of Jacobian evaluation using PATTERN Use the modified corrector, or the SI2 formulation Use DEBUG/EPRINT to debug model

Error Handling: Integration Failures Why it happens: Local truncation error for step larger than ERROR specified Root Causes: Too large of step size attempted Non-smooth motion inputs Discontinuous forces Remedies: Review failure message to identify modeling element with most error. Review model to see if this is expected Look for unrealistic forces / accelerations Ensure all motion inputs, user-defined forces, and user-written differential equations are both continuous and differentiable. Beware of using splines to specify displacement motion inputs. Use a STEP5 function to switch a signal on or off. Avoid using IF logic Use HMAX to control the maximum integration step size

Error Handling: Failure to start simulation Why it happens: Integration error can not be satisfied at the very first step Corrector does not converge, regardless of initial step Root Causes: Large initial imbalance caused by external forces Velocities are inconsistent Initial step too large Remedies: Run simulation with DEBUG/EPRINT to understand root cause of failure Perform a static equilibrium, if possible Ramp up FORCEs&MOTIONs, so system starts with small accelerations Make sure velocities are consistent with expected motion Choose smaller HINIT Use the modified corrector

Error Handling: Singular Matrix Why it happens: The Jacobian matrix is not invertible. Some pivots are small/zero. Root causes: Modeling errors Part mass/inertia value is 0; massless part not constrained The system has reached a lock-up configuration I3: Integrator step size is too small Remedies: Fix modeling errors Use modified corrector or SI2 formulation Loosen integration ERROR Re-scale model, so all acceleration/force/torque values have reasonable size Use LSOLVER/HARWELL to try Harwell sparse matrix package

Error Handling: Unexpected spikes in solution Why it happens: An error is introduced into solution by the I3 integrator Root causes: Frequent step size changes Velocities and acelerations are not refined Remedies: Use HMAX to make integrator take constant step sizes Use WSTIFF or INTERPOLATE options Switch to SI2 formulation

Error Handling: Static Equilibrium failures Why it happens: Newton-Raphson iterations could not find solution in less than MAXIT iterations Root Causes: The initial configuration is too far away from the equilibrium configuration Model does not have a static equilibrium position Forces are discontinuous Remedies: Use DEBUG/EPRINT to identify root cause of the failure Examine model, make sure it should achieve static equilibrium Increase STABILITY, MAXIT, ERROR, IMBALANCE & taper them down through successive static solutions Judicious use of ALIMIT and TLIMIT Decrease gravity, achieve equilibrium…gradually increase it Try the new EQUILIBRIUM/DYNAMICS method

ADVANCED ADAMS/SOLVER SEMINAR Modeling Issues

Modeling Issues Discussed in greater detail in ADAMS Primer document Discontinuities Motion Inputs Spline Functions Units Bad practices Good practices

Modeling Issues: Discontinuities Avoid discontinuities!!! Discontinuities do not exist in nature Discontinuities are the root cause of almost all simulation problems Examples of discontinuous functions Min, Max, Int, Dim, Mod, IF Discontinuous displacements and velocities cause corrector and integrator failures Discontinuous accelerations cause integration failures (requires infinite force) Discontinuous forces cause corrector failures

Modeling Issues: Motion Inputs Example Displacement Function Motions should be such that they impose continuous accelerations Inputting measured data Specify Motion as a velocity Function = CUBSPL(id, expression, 0) User subroutines Be very careful with IF logic Avoid discontinuous intrinsic functions like MIN, MAX, MOD etc. Avoid AKISPL in MOTIONS.

Modeling Issues: Spline Functions AKIMA Spline Does not have smooth derivatives Use only in forces Do not use in any type of Motion CUBIC Spline Has two continuous derivatives Preferred to AKIMA Do not specify displacement Motions as Cubic Spline

Modeling Issues: Units Widely separated numbers in a matrix can cause numeric difficulties (conditioning problems) Be careful when using inconsistent units. Make sure units consistency factors are correct Choose units so that model states (displacements, velocities) are reasonable values Length units of millimeters may not be appropriate if you are modeling an aircraft landing on a runway Choose units so that stiffness values are not very big Choose time units appropriate to phenomena being studied

Good Modeling/Simulation Practices Do… Always use DEBUG/EPRINT early in the validation phase of your model/simulation Try hard to eliminate any source of discontinuities in the simulation Always perform an initial static first, when applicable. Approximate forces with smooth, continuous functions Extend the range of spline data beyond the range of need. Add damping so frequencies can die off. Use velocity-based motions if possible (see KBA 9752) Filter experimental data so high frequencies are removed Eliminate the causes for all warnings during a simulation, from the model. A good model will generate no warnings during a simulation. Make sure your results have converged before accepting them as the truth

Bad Modeling/Simulation Practices: Avoid... Redundant constraints. Very high damping coefficients. Using dummy parts Connecting dummy parts with compliant connections (BEAMs, BUSHINGs, etc.) User-subroutines (if possible) Translational spring-dampers with spring length=0 (coincident I-J markers)

RESULTS VALIDATION Assuming that you have set the output step size (DTOUT) appropriately to capture the required phenomena in your model, the following procedure is recommended to ensure accurate and consistent results from MSC.ADAMS Solver 1. Set your desired accuracy (ERROR) by a factor of 10 smaller than your previous run 2. Run a simulation 3. Compare displacement results for a typical output; if they match your last run, reset your accuracy to that of your last run and continue to steps 4-6. Otherwise, repeat steps 1-3. 4. Set the maximum solution step size (HMAX) by a factor of 10 smaller than your previous run. 5. Run a simulation 6. Compare acceleration results for a typical output. If they match your last run, reset HMAX to that of your last run. Otherwise, repeat steps 4 - 6.

ADVANCED ADAMS/SOLVER SEMINAR Debug Issues

Debugging Strategies Always turn on DEBUG/EPRINT Have graphics for visualizing motion Try to understand mechanism from a physical standpoint Use "building blocks" of concepts that worked in the past Use a crawl-walk-run approach Test with small model to isolate problems At first, try to eliminate the user-subroutines from the model

DEBUG/EPRINT (dynamics) The kinematic, dynamic, and quasi-static analyses in ADAMS/Solver involve an iterative process to find the solution of the governing equations of motion, which are non-linear algebraic or differential-algebraic equations in general. The EPRINT argument enables ADAMS/Solver to write out the information pertaining to the solution process in a succinct and understandable format. You can use the information found in EPRINT to help debug models.

DEBUG/EPRINT (dynamics) Recall the first two phases of the DAE solution sequence: Phase 1: a forward step in time (the predictor for dynamics) Phase 2: the solution of the equations of motion (the corrector for dynamics).

DEBUG/EPRINT (dynamics) Information for Phase 1: 1. The step number. This is a running count of the number of steps taken and can be used as a measure of how hard ADAMS/Solver is working. 2. The order of the predictor for dynamics. This corresponds to the order of the polynomial ADAMS/Solver uses to predict the solution at the end of the integration step. 3. The value of time at the beginning of the step. 4. The size of the step.

DEBUG/EPRINT (dynamics) Information for Phase 2: 5. The cumulative number of iterations a running count of the iterations needed to solve the equations of motion and can be used as a measure of how many computations ADAMS/Solver is performing. 6. The iteration number one at the beginning of each step and increments by one until ADAMS/Solver converges to a solution or exceeds the maximum allowable number of iterations. 7. Absolute value of largest equation residual error. this number is an indicator of how far ADAMS/Solver is from a solution. This number should decrease after every iteration in healthy simulations. 8. Modeling element associated with #7. The equation that has the largest equation residual error for the above dataset element. 9. Equation (or component) associated with #8.

DEBUG/EPRINT (dynamics) Information for Phase 2: 10. Value of largest change in a variable. The final iteration should not need to change variables very much. This number is an indicator of how far ADAMS/Solver needs to change variables to approach a solution. Ideally, this number should decrease after every iteration. 11. Dataset element associated #10. 12. Component with the largest change for #11. 13. Jacobian updates If ADAMS/Solver has updated the Jacobian,YES appears under the “Jacobian new?” header.

3. Time at beginning of step 1. Running count of successful steps 2. Order of predicting polynomial 5. Integration step No. 30, Order = 2 Cumulative iterations of From 2.100000000E-01, Step = 1.00000E-02 the corrector: 58 Iteration Residual (or equation error) Change in the Variable Jacobian count Maximum Element/ID Equation Maximum Element/ID Variable new? _____ _______ ____________________ _______ ____________________ ___ 1 -4.1E-08 PART/2 Psi Trq -3.8E-10 PART/2 Y Vel Yes 2 0.0E+00 PART/3 X Force 0.0E+00 PART/3 X Vel Time = 0.220. Step rejected due to impending contact. Limiting order, step-size. Integration step No. 30, Order = 2 Cumulative iterations of From 2.100000000E-01, Step = 1.44255E-03 the corrector: 60 Iteration Residual (or equation error) Change in the Variable Jacobian count Maximum Element/ID Equation Maximum Element/ID Variable new? 1 2.1E+07 CONTACT/1 Fy -2.2E+03 CONTACT/1 Fy Yes 2 -1.4E+03 CONTACT/1 Fy -1.6E+00 PART/3 X Vel 3 -1.4E+03 CONTACT/1 Fy -2.3E-04 PART/2 X Vel 4 -1.4E+03 CONTACT/1 Fy 2.1E-04 PART/3 X Vel 5 -1.4E+03 CONTACT/1 Fy 3.0E+00 PART/3 X Vel Yes All Newton-Raphson updates divided by: 65.715 6 2.1E+07 CONTACT/1 Fy -4.7E+05 CONTACT/1 Fy Time = 0.21144, Step = 1.44255E-03, Iterations = 6. Corrector did not converge. 4. 6. 7. 8. 9. 10. 11. 12. 13. Corrector Information

ADVANCED ADAMS/SOLVER SEMINAR User-Subroutines

General Considerations User-Subroutines: the way in which ADAMS supports users in customizing modeling elements Two types of User-Subroutines: Utility Subroutines User-written Subroutines

Utility Subroutines Execution Control subroutines (ANALYS, MODIFY, DATOUT) Called from CONSUB Data access subroutines (STEP, IMPACT, SYSFNC, SYSARY, SYSPAR, ERRMES, etc.)

User-written Subroutines The place where the user can access state information and define sophisticated expressions for modeling elements Almost all user-written subroutines have two important calling-list arguments: IFLAG DFLAG

User-written Subroutines Why have IFLAG and DFLAG in there? A user-written subroutine is a black box for the solver Numerical methods employed by ADAMS require sensitivity (Jacobian) information IFLAG instrumental in finding out which entries in the Jacobian will have to be computed (non-zero) DFLAG used to indicate call made to the user-subroutine in order to compute a non-zero Jacobian entry

IFLAG Boolean that indicates whether the solver is gathering intelligence (“surveillance mode”) If TRUE, then the Solver is sorting out the dependency of the user-subroutine on internal states: All the SYSFNC and SYSARY calls that you can ever make, must be made during an IFLAG=TRUE call A good opportunity to initialize (“prime”) the subroutine Common source of mistakes

IFLAG What can go wrong? Snippet of SFOSUB call Snippet of SFOSUB call Bad example: … TEST_VALUE = PAR(2)*PAR(4)-1.0 IF ( TEST_VALUE .LE. 0.D0 ) THEN CALL SYSFNC('DZ', IPAR, 3, DZ, ERRFLG) C Go ahead and compute SFOSUB in one way ELSE CALL SYSFNC('VZ', IPAR(3), 2, VZ, ERRFLG) C Go ahead and compute SFOSUB in different way END RETURN Snippet of SFOSUB call Correct handling: … TEST_VALUE = PAR(2)*PAR(4)-1.0 CALL SYSFNC('DZ', IPAR, 3, DZ, ERRFLG) CALL SYSFNC('VZ', IPAR(3), 2, VZ, ERRFLG) IF ( TEST_VALUE .LE. 0.D0 ) THEN C Go ahead and compute SFOSUB in one way ELSE C Go ahead and compute SFOSUB in different way END RETURN

DFLAG What is its role? ADAMS requires solution of non-linear systems: Implicit integration (GSTIFF, WSTIFF, HHT, etc.) Static analysis Etc. Numerical solution of non-linear equations requires Jacobian information User-written subroutines are black boxes Can’t produce Jacobian information analytically* Numerical differencing employed to retrieve Jacobian information

Numerical vs. Analytical Jacobian Computation Assume: Analytical Jacobian: Numerical Differencing: One more call to evaluate needs to be made When the user-subroutine is called to evaluate , DFLAG is set to TRUE

Analytical partials: Why bother? Potential CPU savings – typically cheaper to compute than employing the numerical differencing alternative The solvers like it when the Jacobian information is accurate: the quality of the solution improves, less function evaluations, etc. Good numerical differencing is tricky: Forward vs. Central Differencing What should be the size of the perturbation?

Numerical vs. Analytical Jacobian Computation Numerical Jacobian computation Is typically more costly Produces an approximation of the values (more iterations for convergence in non-linear solver) Analytical Jacobian computation: Not always feasible (large user-written subroutines) In ADAMS/SolverF77, even if you compute analytically, there is no way to feed it back to the solver In ADAMS/SolverC++, there is interface that allows you to send this information back to the solver ADAMS/SolverC++: if a user-written subroutine works with the ADAMS/SolverF77, it will work with ADAMS/SolverC++ as well

The ADAMS/SolverC++ Analytical Jacobian Computation Support In ADAMS/SolverC++, DFLAG is practically obsolete (nevertheless, works like in ADAMS/SolverF77) Call to utility ADAMS_NEEDS_PARTIALS indicates when the solver actually needs to compute a new Jacobian The user can then compute the partials: By hand – most direct, but sometimes tedious Locally managed numerical differentiation (you shortchange the solver) Using ADIFOR – somewhat tricky, possible to hit snags on the way Once the partials are available, they are fed back to the solver via a SYSPAR call

The SYSPAR Utility Subroutine (C++ Solver) Facilitates transfer of derivative information back to the solver Mirrors the SYSFNC and SYSARY calls User chooses how often and what partials to pass back Can speed up simulation

SYSPAR: Further Details (C++ Solver) What gets passed back through the SYSPAR “pipe”? Example - SFOSUB user-written subroutine: Calls SYSFNC twice to get DX(8,12), VX(8,12) Uses DX(8,12), VX(8,12) internally to compute value of force F In this case, the C++ solver needs two partials: If this information is provided back through the SYSPAR pipe, no numerical differencing is done on the SFOSUB

ADVANCED ADAMS/SOLVER SEMINAR MBS and NUMERICAL METHODS LITERATURE.

Multi-Body Dynamics Books E.J. Haug, Computer Aided Kinematics and Dynamics of Mechanical Systems, Part I: Basic Methods, Allyn & Bacon, Boston, 1989. A.A. Shabana, Computational Dynamics, John Wiley & Sons, 1994 P.E. Nikravesh, Computer-aided analysis of mechanical systems, Prentice-Hall, Englewood Cliffs, 1988. Good account of multibody dynamics simulation, and numerical methods related to the solution of the differential-algebraic equations (DAE) of multibody dynamics.

Numerical Methods Books Uri M. Ascher, Linda R. Petzold, Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations, ISBN 0-89871-412-5 – good introductory level book K.E. Brenan, S.L. Campbell, and L.R. Petzold, Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations, Classics in Applied Mathematics Series, SIAM Vol.14 - good introductory level book on the subject of DAE Ernst Hairer, Syvert Paul Nørsett, and Gerhard Wanner, Numerical Methods for the solution of ODE and DAE, Springer Series in Comput. Mathematics (Second revised edition 1993) – tough book, excellent reference though Ernst Hairer, Gerhard Wanner, Solving Ordinary Differential Equations II. Stiff and Differential-Algebraic Problems. Springer Series in Comput. Mathematics, Vol. 14, Springer-Verlag (Second revised edition 1996) – tough book, excellent reference though

ADVANCED ADAMS/SOLVER SEMINAR What’s New in the 2005 ADAMS/Solver C++

What’s new in 2005 ADAMS/Solver C++ Improved Performance for ADAMS/Engine Belt and Chain Models (C++ is now the default solver) HHT and Newmark integrators Adaptive Jacobian pattern 2D model streamlining Shared Memory Parallel (SMP)

What’s new in 2005 ADAMS/Solver C++ Support for ADAMS/Controls Support for ADAMS/Durability Access to Contact Area in CNFSUB & CFFSUB Expanded support for ACTIVATE and DEACTIVATE commands CONTACT,COUPLER, GFORCE, VFORCE, and VTORQUE. SURSUB user-written subroutine for finite surfaces

What’s new in 2005 ADAMS/Solver C++ Extended support for 3D expressions and new simulation statistics parameters: CPU: the current CPU time HSIZE: the current step size ORDER: the current integration order NRHS: the number of function evaluations (or iterations) NJAC: the number of Jacobian evaluations

ADVANCED ADAMS/SOLVER SEMINAR QUESTIONS.

Appendix. A. Contact computation methodology B. The New HHT Integrator (ADAMS/Solver C++) C. The Cartesion vs. the Recursive Formulation

ADVANCED ADAMS/SOLVER SEMINAR Appendix A Contact Computation Methodology

The Important Four Things Computation of contact force requires establishing the following: Application point of contact force Direction of contact force Penetration and its rate of change Algorithm for evaluating magnitude of contact force

Contact Types in ADAMS Two dimensional contacts In the most general case, the contact between two planar curves Curves are specified in the ADAMS input Curves must be in the same plane Three dimensional contacts Complex and time consuming Requires to define geometries for the bodies that enter the contact

Two Dimensional Contact The regions of constant curvature; i.e., convex, or concave are fit inside minimal boxes (rectangles) – preprocessing operation A boxed region on curve C1 can only have one contact with a boxed region on curve C2 Point I defines the contact point on C1 Point J defines the contact point of C2 Contact force application point is I Contact force is equal and opposite for two bodies

Two Dimensional Contact The points I and J are computed as the solution of the 2x2 non-linear system: The solution of the system is the set of curve parameters and that uniquely define the points I and J on C1 and C2, respectively The most common source of problems for 2D contacts is lack of convergence in Newton-Raphson algorithm to solve 2x2 non-linear system Root cause: curves C1 and C2 are not smooth, or have wiggles

Two Dimensional Contact The penetration is computed as The vectors must be parallel A relative velocity between the contact bodies is computed at point I and projected along the direction (quantity denoted by ) The magnitude of the contact force is computed based on and (impact function approach)

Three Dimensional Contacts Significantly more challenging than 2D contacts: Monitoring how the geometries move and checking for contact Determining the contact geometry (volume) Two different approaches to 3D contacts in ADAMS: Parasolids based – very accurate, at a price “Rapid” based – cuts some corners, typically less accurate, but faster Note: Rapid is default in ADAMS

Parasolids based 3D Contact Intersection volume is first determined Point of application for contact force is defined as centroid of intersection volume (“O” , the center of mass) Closest point wrt. “O” is determined: I on body 1, and J on body 2 The penetration is defined as expected to be parallel (c-force direction) Relative velocity at point “O” is projected on to get An Impact, Poisson, or Augmented approach is employed to compute c-force based on and

Parasolids 3D Contacts (Alternative Approach) Joe’s approach: Motivated by bad I and J points produced in Parasolids, as well as sometimes dubious , and directions The idea: Tessellate the contact volume boundary Compute centroid O (very fast) Compute weighted normal, and points I and J Penetration is given as:

Parasolids 3D Contacts (Alternative Approach) V – the volume of penetration A – area of the volume of penetration boundary Note: Joe’s approach is the default What might go wrong with 3D contacts: not parallel (the c-force direction comp.) Fall back on original Parasolids If neither Joe’s, nor Parasolids approach is good, there is no contact for that integration step (!) 99.99% of the cases the very next integration step a contact will be properly established This type of problems cause by (a) non-smooth geometries, or when there is very little penetration between the two bodies

Rapid 3D Contact Developed in-house, as alternative to CPU costly Parasolids approach Idea: All geometries are tessellated once at the beginning of simulation Construct a “best-fit” plane that contains the intersection contour (sometimes not in a plane, that’s why is “best-fit”) Determine the centroid in the best-fit plane Shoot perpedinculars towards the two bodies to determine intersection points I and J (this is fast)

Rapid 3D Contact Penetration is defined as computed as the relative velocity between the bodies Measured at point O Projected along Based on value of and the Impact, Poisson, or Augmented Lagrangean approach is employed to compute c-force

Contacts in ADAMS Further Remarks Contact Output Block C-information is sent out even between output points Points I, J, , , c-force, slop velocity, penetration, etc. set MDI_ADAMS_CONTACT_OUT=Off to suppress output Once c-output block sent out, no output will be sent for a duration of one fourth of output step

Contacts in ADAMS Further Remarks Integrator Issues: When two geometries come in contact for the first time during a contact event, integration step is rejected Integration step is re-started with value of step-size that puts the two bodies only slightly into contact This strategy helps with the corrector Remember you can use modified corrector to help it reach more easily a “converged” configuration Smooth contact geometries and reasonable parameters in CONTACT statement are going to help the integrator

Contact and Friction Longitudinal Friction: At the point of contact (“O”), the relative velocity is computed and projected in the plane perpendicular to (this is the relative tangential velocity) Magnitude of friction force computed based on value of normal force and friction coefficients Friction force is opposite to the relative tangential velocity

Contact and Friction Friction Torque (Rotational Friction) Relative rotational velocity computed at point “O”, and projected along Friction Torque computed as the product between c-force, and a virtual radius With A being the friction contact area, virtual radius is Friction torque in direction opposite of the projected relative rotational velocity

ADVANCED ADAMS/SOLVER SEMINAR Appendix B The New HHT Integrator (ADAMS/Solver C++)

Overview Newmark and HHT methods Newmark method (N.M. Newmark – 1957) One step method designed to integrate directly second order equations of motion: HHT method (H. M. Hilber, T.J.R Hughes, R.L. Taylor –1977) also known as the -method

Newmark & HHT Overview HHT Newmark Method 1st Order (except for the trapezoidal formula) A-stable for HHT 2nd Order A-stable, although uses the same Newmark integration formulas Attractive damping properties controlled through the a parameter

Equations of Motion The Second Order Equations of Motion (EOM): Discretized EOM: Newmark: HHT:

Finished quick introduction of HHT and Newmark Moving on to presenting the Multibody Dynamics Problem

The Problem at Hand The Equations Solved in the HHT Formulation:

What Do We Solve For? Generalized accelerations: Generalized velocities: Generalized positions: Reaction Forces: Action (Applied) Forces: User Defined Variables (Aliases): Solution and its Time Derivative for User Specified First Order Initial Value Problems.

The Discretization of the Equations in HHT The Discretized Equations Solved at each Time-Step tn+1:

Formulation Based on Newmark Integration formulas and Integration formulas for DIFFS, the Jacobian is calculated as: where,

Solving the Discretization Non-Linear System Quasi-Newton Approach to Find the Solution. Corrections Computed as : Correction is then applied as:

The Four Solution Phases Phase 1. Prediction. Phase 2. Correction. How many iterations should I take in quasi-Newton method (the stopping criteria question) Phase 3. Is the solution enough accurate? The error control question Phase 4. How do I select integration step-size h ? The step-size selection question

Phase 2: Correction. I need good approximation of solution of discretization non-linear system This solution is key in estimating local integration error Evaluate speed of convergence x in quasi-Newton solution of non-linear system Based on x compute upper bound on the error in solution of non-linear system

Phase 3: Error Control Error control done for Displacements and Differential (ODE) states Local in nature Compare Exact Solution to Numerical Solution at the End of each Integration Time Step Based on asymptotic expansion of the solution Expansion done at tn to tn+1

Phase 4: Step Size Control Too large of a time step leads to step rejection based on accuracy considerations Too small of a time step leads to unjustified effort (long simulation CPU time) Compute h from the condition that integration error is equal to the user specified error

Notation – number of error controlled states – acceptable integration error (user specified) – dimensionless constant – step-to-step acceleration change

Summary of Key Formulas Notation: Phase 2 – Corrector Stopping Criteria: Phase 3 – Accuracy Check: Phase 4 – Step Size Selection:

Numerical Results Validation: Belt Model 150 Bodies Dimension of the Problem: 3923 equations Length of the Simulation: 200 ms (more than two revolutions of the belt)

Numerical Results Reference Integrator: CPU Time: 5898.3 seconds Stabilized Index 2 DAE Approach Formula Used was BDF Integration Order: Variable Error: e=1E-2 CPU Time: 5898.3 seconds New Integrator: DAE Index 3 Approach Formula Used was Newmark Integration Order: Fixed, 1. Error: e=1E-4 CPU Time: 1386.7 seconds

Numerical Results Comparison: Newmark vs. BDF Stabilized Index 2 Normal Force, Tooth 31

Numerical Results Comparison: Newmark vs. BDF Stabilized Index 2 Tooth 57; X-translational velocity

Numerical Results Comparison: Newmark vs. BDF Stabilized Index 2 Tooth 57; X-translational velocity (DETAIL)

CPU Comparison (C++ vs. C++) Generic Chain Model 3759 equations Tend = 40msec SI2 BDF HHT Newmark 1030.6 438.6 445.7 Generic Belt Model 7242 equations Tend = 40msec SI2 BDF HHT Newmark 4624.1 1127.0 1237.6

CPU Comparison GSTIFF HHT 79h 24h 45min Crawler Model P4-2.4GHz, 512Mb, WinXP Tend = 10 sec

CPU Comparison (C++ vs. C++) P_3d_4000 15689 equations Tend = 75msec SI2 BDF HHT 17656.1 1972.4 A_4500 16258 equations Tend = 120msec SI2 BDF HHT 10250.0 2537.6

Conclusions A set of two integrators has been developed and implemented in ADAMS: HHT (Alpha-Method) Newmark New integrators typically two times faster compared with fastest ADAMS integrator Good behavior for systems with discontinuities and models with flexible bodies In conjunction with 2D part, sped-up engine simulations by 5-10x factor

ADVANCED ADAMS/SOLVER SEMINAR Appendix C The Cartesian vs. The Recursive Formulation

The Cartesian Formulation x zG z OG yG xG “G” – global fixed reference frame y

The Cartesian Formulation A set of absolute coordinates are used to express position and orientation of each rigid body in space Motion is always relative to global reference frame The physical constraints are represented in the formulation

Recursive Formulation Spherical Joint Position of red part is defined relative to the position of blue part in terms of three angles

The Recursive Formulation A set of joint relative coordinates used to express position and orientation of each rigid body in space Motion always relative to the parent body The presence of most of the joints in the model is eliminated analytically Some joints can not be eliminated and they are still present in the formulation

Example 1 – WORST CASE SCENARIO Dynamic Analysis of Pendulum Equations (Cartesian): In addition, there are the constraints: q (x,y) Equations (Recursive):

Example 1 – WORST CASE SCENARIO (Continued) Five equations in Cartesian vs. one equation in Recursive Is it that bad? No, since in the recursive solution you need at the end of each time step to solve an additional linear system to recover the Lagrange multipliers If you have functions that indirectly measure the reaction force in markers (like friction), you can not eliminate the Lagrange multipliers anymore Then, the recursive mimicks the Cartesian formulation

Which formulation is better? It is very misleading to present conclusions based on one trivial example For real-life applications it is impossible to produce a general rule saying that one formulation is always going to be better In the Recursive Formulation there is a hidden cost associated with the computation of the Lagrange multipliers Lagrange multipliers Needed in durability studies Needed if joint forces are referenced in the model Needed in joint-friction

Another Simple Model: Two Bodies and Distance Constraints x1 y1 x2 A z2 B z1 Two bodies, B1 and B2 Distance constraint between points A and B on body B1 and B2, respectively y2

Another Simple Model: Two Bodies and Distance Constraints Recursive Dynamic Equations There are 11 Differential Equations An additional problem needs to be solved to recover the Lagrange multiplier Cartesian Dynamic Equations 12 Differential Equations One Constraint Equation

Further Remarks For real-life models (flex bodies, contact elements, user-defined forces, etc.), the fact that some joints are eliminated from the Recursive formulation is irrelevant Almost never do joints become the bottleneck of a real-life simulation Recursive formulation has a chance at being faster only in heavily joint-dominated models Models of belts, chains, etc.

Further Remarks Two other relevant aspects Ease of use, interfacing to other packages Modeling capabilities ADAMS is EXTREMELY powerful on both these fronts Language support for user-defined constraints (GCON) Available in the ADAMS/Solver C++ Impossible to handle in the Recursive formulation unless this formulation starts introducing Lagrange multipliers User can define own friction model Large pool of numerical methods supported Support for analytic computation of derivatives

Handling of User Defined Subroutines ADAMS Has strong user subroutine support Has support for analytical Jacobian computation of user-defined subroutines RecurDyn Does not have support for analytical Jacobian computation of user-defined subroutines – poor Jacobian quality Numerical differentiation is less accurate, and in a recursive formulation significantly more expensive due to the nature of generalized coordinates considered Note that poor quality Jacobian leads to increased CPU effort in the corrector stage of the implicit integrator

Potential for Parallelism The Cartesian formulation is very suitable for parallelization The Jacobian contribution of all modeling elements can be evaluated in parallel A multi-threaded version of the ADAMS/Solver C++ is available in MSC.ADAMS2005 In the Recursive formulation, the parallelism is bound to the topology chains The Jacobian contribution of a body can not be computed unless the information of the parent body has been computed

Final Conclusions Don’t judge based on simple pendulum model For complex models, the reasons invoked for better performance of Recursive formulation are not actual simulation bottlenecks When taking a decision to invest in simulation software take into consideration: Modeling capabilities Flexibility and extensibility of package Legacy Ability to interface with other CAD/CAE packages