[MBDyn-users] Rotor dynamics linear/non linear solver

Pierangelo Masarati masarati at aero.polimi.it
Wed Mar 20 09:27:12 CET 2013

On 03/18/2013 02:27 PM, Rafael Rey Gayo wrote:
> Thank you to Resch and Pierangelo for their fast and helpful answers.
> To continue with the trend:
> I fully agree it is a numerical problem and related to the condition
> number of the Jacobian matrix ( I am more a FE guy, but this problem
> with their "magic words" "pivot ratio were familiar to me). I have run
> to obtain the matrix condition number and it is around 1e12
> (increasing to 1e+80 just before crashing).
> The model does not have intrinsically any high non linearities (this
> is, there is no contact defined, I have a couple of deformable hinges
> but with linear behaviour, etc).

The only reason I can see for such a behavior is that the system is 
approaching some singularity and, as it does not converge, some 
parameters (typically the rotation parameters) grow unbounded giving the 
very large condition number.

> My initial value section is typically as this:
> begin: initial value;
> 	initial time: 0.;
> 	final time: 3.5;
> 	time step: 5.0e-4;

As a quick cross-check: you should use at least 100 steps per revolution 
(i.e. time step ~ 60/RPM/100); something in between 100 and 200 should 

> 	method: ms, 0.6;

The method is fine; as a quick check, you could try

  	method: bdf;

> 	max iterations: 30;
> 	tolerance: 1.e-6;

As an unfortunate legacy, the tolerance is the L2 norm of the residual 
without any scaling (some gross scaling option is available, but 
experimental and little tested, AFAIK).  So, depending on the contents 
of your equations, you may want to tweak the value of the tolerance.  In 
similar analyses (full-scale helicopter and wind tunnel model rotors 
with hundreds of equations values up to 1e-2 may be needed for "decent" 

> 	newton raphson: modified,2;

I'd either try

	newton raphson: true;

until the analysis is robust, and then move to something

  	newton raphson: modified, 5; # or more

when a single Jacobian matrix or max 2 suffice for convergence

> 	strategy: factor,0.8,1,1.5,4,5,20;
> 	min time step : 1e-15;
> 	max time step : 2.5e-3;

I'd use fixed time step until the convergence issues are solved.

> 	derivatives coefficient: 1.e-4;
> 	derivatives max iterations: 50;
> 	derivatives tolerance: 4.27;

In most cases, you can do whatever needed to pass the "derivatives" 
phase; the only penalty is that a poor convergence will trigger some 
non-physical transient in the first steps of the analysis.

> end: initial value;
> Things out of normal could be the derivatives tolerance that normally
> does not converge very well. Nevertheless I understand that any
> convergence problem here it is attenuated along the time.
> I tried different method section as:
> 	method: ms, 0.6 or method:crank nicolson or method:hope,0.4 or third
> order or bdf. When I tried implicit euler I always obtained a
> segmentation fault.

I could not confirm the segmentation fault; apart from this, there is no 
point in using anything but "ms" or "bdf"; first-order methods do not 
have any appeal, while the third order one is experimental and 
essentially broken.  Crank-Nicolson is only meaningful when used for ODE 
problems (with many caveats); it is only present for experimental 
purposes, and because it is needed for the first time step, since 
multistep methods like "ms" and "bdf" are not self-starting.

> I tried as well the non linear solver section with: newton raphson
> (always better with modified,2 than with true), matrix free (no change
> with respect newton raphson). I tried as well 'tolerance: 1.e-6, test,
> norm, scale;' and no results.

You need to provide scaling parameters, otherwise it is equivalent to L2 

> At the end for every new collective and cyclic condition that I wanted
> to test without any air velocity I have to struggle with the initial
> time step, beginning times when the collective and cyclic changes
> begin and the strategy parameter to obtain convergence. And when I
> applied air relative speed things get worse.
> This has improved a lot since I use 'linear solver: naive, colamd;'.

"naive" has been the default linear solver for quite a while; however, 
only recently we discovered that "colamd" was not enabled by default, 
and without that parameter the solver behaves very poorly.

> Of course i still get problems when the rotor is near of partial stall
> condition (awesome the MBDYN capability to solve the change of
> linearity at high cyclic angles) but for the 'low load conditions'
> (linear response both in collective and cyclic) that I am really
> interested in, I always get convergence.
> I am using MBDYN 1.5.4. I think I have compiled without the UMFPACK
> (problems installing the library). I have around 260 equations.

I never had problems with that library; I currently use ubuntu (11) and 
it comes in the libsuitesparse-dev; you need to specify 
CPPFLAGS=-I/usr/include/suitesparse at configure time to find the header 

> I am sorry I can not include model file but it is still industry
> proprietary. We are trying to get permission and we will be glad to
> "open" it with an explanation document.
> Any new help would be more than welcome.
> PD. Pierangelo, I have answer to mbdyn-users at mbdyn.org because I
> understand it is the more effective way. If not, please tell me.

Best, p.

Pierangelo Masarati
Associate Professor
Dipartimento di Scienze e Tecnologie Aerospaziali
Politecnico di Milano

More information about the MBDyn-users mailing list