Robotran C Documentation
Functions
w_methods.c File Reference

This file implements the functions of the W Methods integrator in C. Warning : should be tested. More...

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

Functions

int w_methods (double y[], double dydx[], int n, double x, double h, double yout[], int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *mbs_dd)
 W Methods integrator implementation. More...
 

Detailed Description

This file implements the functions of the W Methods integrator in C. Warning : should be tested.

Creation date: June 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

◆ w_methods()

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

W Methods 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)

partial

useless if s<2

sum alpha + gamma

Jp * Xv

Complete right-hand term B

B = f + h * Jp * Xv gamma +

delta p = Xv + h * delta v