Robotran C Documentation
Functions
euler_implicit.c File Reference

This file implements the functions of the Euler Implicit integrator in C. Warning : not working yet. More...

#include "integrator.h"
#include "MBSfun.h"
#include "mbs_message.h"
#include "mbs_dirdyn.h"
#include "mbs_dirdyn_struct.h"
#include "mbs_euler_implicit.h"
#include "useful_functions.h"
#include "nrfct.h"

Functions

int euler_implicit (double y[], double dydx[], int n, double *x, double h, double yout[], int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *mbs_dd)
 Euler Implicit integrator implementation. More...
 

Detailed Description

This file implements the functions of the Euler Implicit integrator in C. Warning : not working yet.

Creation date: April 2018

Author
Sebastien Timmermans

@source Arnold M. et al, Linearly implicit time integration methods in real-time applications: DAEs and stiff ODEs Multibody System Dynamics, 2007, 17:99-117

(c) Universite catholique de Louvain

Function Documentation

◆ euler_implicit()

int euler_implicit ( double  y[],
double  dydx[],
int  n,
double *  x,
double  h,
double  yout[],
int(*)(double, double[], double[], MbsData *, MbsDirdyn *)  derivs,
MbsData s,
MbsDirdyn mbs_dd 
)

Euler Implicit integrator implementation.

@source (adapted from) Arnold M. et al, Linearly implicit time integration methods in real-time applications: DAEs and stiff ODEs Multibody System Dynamics, 2007, 17:99–117

Parameters
ystate vector of variable
dydxderivative of y by x
nnumber of variables
xcurrent time value, at which the function needs to be computed
htime step
youtsolution of the incremented variables
derivsthe function computing f'
sthe MbsData structure of the model on which dirdyn analysis is computed.
mbs_ddthe MbsDirdyn structure related to the integration.
Returns
error_code Return a negative number if something went wrong, 0 otherwise

calls an external function

A = (- h* Jv - h*h * Jp )

A = ( I - * Jv - h * h * Jp)

add 1/h in diagonal terms (identity matrix)

Compute the product : Jp * Xv

B = qdd + h * Jp * Xv

delta p = Xv + h * delta v

with delta v = B

Xv (n+1) with delta v = B

Xp (n+1)