Starting from:

$30

FMNN05 - assignment2 - Solved

This assignment has 10 tasks.

Task 1
 

Read the mathematical description of the squeezer in publication [2] (see also the literature list on the course’s home page).

Task 2
 

Download the file squeezer.py from the course’s project page. Modify it, so that it fits to Assimulo’s problem class.

Task 3
 

In Reference [2], Eq. (7.7) a possible choice of consistent initial conditions is given.

Try to construct these initial values by using Newton’s method or a corresponding Scipy method in the way as described in Ref [2], p. 535.

Task 4
 

1

The code squeezer.py describes the equations of motion in residual form. The constraints are given as index-3 constraints. Write a corresponding function squeezer2, which is based on index-2 constraints, i.e. constraints on velocity level.

Task 5
 

Simulate with Assimulo/IDA both problem formulations until tf = 0.03 sec . In case of simulation problems, you might want to exclude the algebraic variables (λ and if needed even the velocity components, see below.) from the error test by using the method attribute algvar.

The tolerances, in particular atol, control the error test as well as the convergence test for the Newton iteration. Define atol as a vector and set the components corresonding to algebraic variables to something big (e.g. 1.e5).

If this does not remove convergence failures do the same with the velocity components.

Task 6
 

Plot the solution and compare in particular the Lagrange multipliers.

Task 7
 

Evaluate the run time statistics.

Task 8
 

Test even an explicit Runge-Kutta method from Assimulo on the index 1 problem as described in [2] or in the lecture.

Don’t hesitate to ask for help in case you run into problems.

Lycka till!


More products