Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Phase 1 - predictor
As mentioned above, the predictor for the state-vector q bases the guess q q for the next step as a function of previous values. The number of previous states included in the extrapolation, and the order of extrapolation is determined in phase four. In order to start the simulation, the solver uses some special routines and small step sizes in order to obtain a state history to for the extrapolation.
t n 3
t n 2
t n 1
tn
t n 1
Time
Phase 2
corrector phase
The corrector phase evaluates the predicted value. The purpose of this evaluation is to obtain the t evaluates the correct state vector for the next time-step ( t n 1 ). The cost function G q , q, set of equations describing constraints (reaction forces), applied forces, and user written differential equations for positions (formulation i3) or position and velocity (formulation si2). The correct value is found by using a modified Newton-Raphson algorithm to minimize the output of Gq , q ,t . If the corrector failes in obtaining a corrected value within HMAX attempts, the solver returns to the predictor phase to attempt with a new time-step.
If this requirement is met, the corrected state-vector is accepted. The ERROR value has a very direct connection to the precision of the output, as for some setup and simple models, the value of the error refers directly to the unit system used for modelling. The ADAPTIVITY was previously used to relax the error-checking, but is with new improvements of the solver less used. It is worth noticing, that the ADAPTIVITY can have severe influence when the solver is forced to use very small time-steps! If the new state vector failes to comply with the ERROR requirement, the solver returns to phase 1 to attempt once again.
Phase 4
Preparation phase
This phase prepares the solver for the next time step. It determines the size of the time-step, the number of previous states to be used for predicting the next state (predictor order), it saves data to the output file.
Nov. 27 31 2007 Jens Bay Madsen Default setting is based on solver command inputs -> 5sec/500 step = HMAX_default = 0.01s ERROR Accuracy of solution Se phase 3 MAXIT Max number of iteration in phase 2. General comment: Never set higher than 10 if the NR have not converged after 10 iterations it is better to reduce step-size. ADAPTIVITY Relaxing error-checking. See phase 3. FORMULATION Different ways of formulating the set of equations. i3 (default) has only error checking on positions, whereas si2 includes error-checking on velocities. i3 is more compact = faster solution, for small time-steps the jacobian become illconditioned! si2 better accuracy on velocities. Stable for all time-step! Generally a switch from i3 to si2 can be followed by a larger error tolerance (test it!) INTERPOLATE ON/OFF Interpolate is used in phase four, when the solver writes to the output file. If OFF, the solver MUST match a time-step with the output write time. When ON, the solver will interpolate to find values for output steps when not matched by a solver step. Advantage: Some solver behave very bad with large variation in time-step (especially WSTIFF) noticable as peaks in the accelaration output. SCALE PATTERN FOR JACOBIAN The Jacobian used by the NR is not generated for every iteration in phase 2. By pattern for Jacobian the update of the jacobian can be altered.
Error tuning
1. Run a simulation with fx ERROR = 1E-3 (mm) 2. Plot a displacement of interest
Nov. 27 31 2007 Jens Bay Madsen 3. Run a new simulation with 10 times finer ERROR (1E-4) and plot the displacement from 2. 4. Repeat step 2 and 3 until there no longer are any significant difference in the results. 5. Select the larger ERROR setting of the two latest simulations.
Hmax tuning
1. Run a simulation with fx HMAX = 0.01s 2. Plot acceleration of interest 3. Run a new simulation with 2-3 times finer HMAX 4. Repeat until there are no longer a significant difference in simulation output 5. Select the larger HMAX of the last two simulations.