Opened 12 years ago
Closed 10 years ago
#2022 closed enhancement (fixed)
calculate constant values before first pivoting of dynamic states
Reported by: | Jens Frenkel | Owned by: | Jens Frenkel |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.2 |
Component: | Backend | Version: | trunk |
Keywords: | initialization, pivoting | Cc: | Lennart Ochel, Christian Schubert |
Description
The example PlanarMechanicsForTesting.Examples.SingleTrackWithEngine.mos fails with the following error message
0.00000e+000 0.00000e+000 0.00000e+000 0.00000e+000 -9.00000e-001 0.00000e+000 idealWheelRear.v_long idealWheelFront.v_long bodyRear.w assert | assert | Error, singular Jacobian for dynamic state selection at time 0.000000
The selected states are equivalent to dymola and the problem is after analyzing the jacobian for pivoting that the constant parts of the initial system are not calculated before pivoting.
In detail the start value revolute.phi_start of revolute is not propagedet to bodyRear.frame_a.phi and as an result the jacobimatrix is numerical singular in the fist row
bodyFront.w.DERStateSetJac1.dummyVarStateSetJac1 = 0,0,1 6/6 (1): bodyFront.w.DERStateSetJac1.dummyVarStateSetJac1 = bodyRear.w.DERStateSetJac1.bodyRear.w $DER.trail.R[2,1].DERStateSetJac1.dummyVarStateSetJac1 = 0,0,-1 8/8 (1): -$DER.trail.R[2,1].DERStateSetJac1.dummyVarStateSetJac1 = bodyFront.w.DERStateSetJac1.dummyVarStateSetJac1 * cos(bodyFront.frame_a.phi) $DER.trail.R[2,2].DERStateSetJac1.dummyVarStateSetJac1 = 0,0,0 7/7 (1): $DER.trail.R[2,2].DERStateSetJac1.dummyVarStateSetJac1 = (-bodyFront.w.DERStateSetJac1.dummyVarStateSetJac1) * sin(bodyFront.frame_a.phi) $DER.trail.r0[1].DERStateSetJac1.dummyVarStateSetJac1 = 0,0,0.1 10/10 (1): $DER.trail.r0[1].DERStateSetJac1.dummyVarStateSetJac1 = $DER.trail.R[2,2].DERStateSetJac1.dummyVarStateSetJac1 * trail.r[1] + (-$DER.trail.R[2,1].DERStateSetJac1.dummyVarStateSetJac1) * trail.r[2] $DER.chassis.R[2,1].DERStateSetJac1.dummyVarStateSetJac1 = 0,0,1 4/4 (1): -$DER.chassis.R[2,1].DERStateSetJac1.dummyVarStateSetJac1 = bodyRear.w.DERStateSetJac1.bodyRear.w * cos(bodyRear.frame_a.phi) idealWheelFront.v[1].DERStateSetJac1.dummyVarStateSetJac1 = 0,0,0 2/2 (1): idealWheelFront.v[1].DERStateSetJac1.dummyVarStateSetJac1 = idealWheelFront.e0[1] * idealWheelFront.v_long.DERStateSetJac1.idealWheelFront.v_long $DER.revolute.cylinder.rvisobj[1].DERStateSetJac1.dummyVarStateSetJac1 = 0,0,0.1 11/11 (1): $DER.revolute.cylinder.rvisobj[1].DERStateSetJac1.dummyVarStateSetJac1 + $DER.trail.r0[1].DERStateSetJac1.dummyVarStateSetJac1 = idealWheelFront.v[1].DERStateSetJac1.dummyVarStateSetJac1 $DER.chassis.R[2,2].DERStateSetJac1.dummyVarStateSetJac1 = 0,0,0 1/1 (1): $DER.chassis.R[2,2].DERStateSetJac1.dummyVarStateSetJac1 = (-bodyRear.w.DERStateSetJac1.bodyRear.w) * sin(bodyRear.frame_a.phi) $DER.chassis.r0[1].DERStateSetJac1.dummyVarStateSetJac1 = 0,0,1 5/5 (1): $DER.chassis.r0[1].DERStateSetJac1.dummyVarStateSetJac1 = $DER.chassis.R[2,2].DERStateSetJac1.dummyVarStateSetJac1 * chassis.r[1] + (-$DER.chassis.R[2,1].DERStateSetJac1.dummyVarStateSetJac1) * chassis.r[2] bodyRear.v[1].DERStateSetJac1.dummyVarStateSetJac1 = 0,0,0 12/12 (1): bodyRear.v[1].DERStateSetJac1.dummyVarStateSetJac1 + $DER.chassis.r0[1].DERStateSetJac1.dummyVarStateSetJac1 = $DER.revolute.cylinder.rvisobj[1].DERStateSetJac1.dummyVarStateSetJac1 $STATESET1.J[1].DERStateSetJac1.dummyVarStateSetJac1 13/13 (1): $STATESET1.J[1].DERStateSetJac1.dummyVarStateSetJac1 = bodyRear.v[1].DERStateSetJac1.dummyVarStateSetJac1 - idealWheelRear.e0[1] * idealWheelRear.v_long.DERStateSetJac1.idealWheelRear.v_long
A simple solution coult be to calculate all constants (for example simplify the initial system and use the simplified parts) before the first pivoting is done. This would also increase the initialization process because actually all bound parameters are calculated twice. Once in boundparameter function and the second one in initialEquations.
Change History (4)
comment:1 by , 12 years ago
- partial solved in r14800 by disable error message about singulare jacobin for the first call of pivoting and usage of default selection
comment:3 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).