Opened 13 years ago
Last modified 13 years ago
#1693 closed defect (fixed)
M.M.M.E.Elementary.LineForceWithTwoMasses fails to compile
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Martin Sjölund, Frenkel TUD, Martin Sjölund, Willi Braun |
Description
Gets usub_real_array, but the expression is scalar (something wrong with simplify, scalarization or when transforming this to a residual exp)
{{{ usub_real_array(&DIVISION((($PjointUPS$PaxisCylinder$Psize$lB1$rB * xloc[28]) - ($P$DER$PjointUPS$PaxisCylinder$Psize$lB1$rB * $Pbody2$Pv_0$lB2$rB)),
($PjointUPS$PaxisCylinder$Psize$lB1$rB * $PjointUPS$PaxisCylinder$Psize$lB1$rB),
"(jointUPS.axisCylinder.size[1] * $DER.body2.v_0[2] - $DER.jointUPS.axisCylinder.size[1] * body2.v_0[2]) /
(jointUPS.axisCylinder.size[1] * jointUPS.axisCylinder.size[1]) because jointUPS.axisCylinder.size[1] * jointUPS.axisCylinder.size[1] == 0"));}}}
Change History (2)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
resolved in 11293
use type of expression for mul when calculate the derivative of DIV_ARRAY_SCALAR
thanks to the new debugger :)
Root of the equation is
p, li { white-space: pre-wrap; }
%%(font-family: 'Courier New,courier') der_rAxis_a_L = (%%%%(font-family: 'Courier New,courier'; color: #ff0000) Frames.resolve2%%%%(font-family: 'Courier New,courier') (frame_a.R,%%%%(font-family: 'Courier New,courier'; color: #ff0000) der%%%%(font-family: 'Courier New,courier') (rAxis_0)) -%%%%(font-family: 'Courier New,courier'; color: #ff0000) cross%%%%(font-family: 'Courier New,courier') (frame_a.%%
%%(font-family: 'Courier New,courier') R.w, rAxis_a))/axisLength;%%
lowering:
{jointUPS.der_rAxis_a_L[1],jointUPS.der_rAxis_a_L[2],jointUPS.der_rAxis_a_L[3]} = (Modelica.Mechanics.MultiBody.Frames.resolve2(Modelica.Mechanics.MultiBody.Frames.Orientation({{jointUPS.frame_a.R.T[1,1],jointUPS.frame_a.R.T[1,2],jointUPS.frame_a.R.T[1,3]},{jointUPS.frame_a.R.T[2,1],jointUPS.frame_a.R.T[2,2],jointUPS.frame_a.R.T[2,3]},{jointUPS.frame_a.R.T[3,1],jointUPS.frame_a.R.T[3,2],jointUPS.frame_a.R.T[3,3]}},{jointUPS.frame_a.R.w[1],jointUPS.frame_a.R.w[2],jointUPS.frame_a.R.w[3]}),{der(jointUPS.rAxis_0[1]),der(jointUPS.rAxis_0[2]),der(jointUPS.rAxis_0[3])}) - {jointUPS.frame_a.R.w[2] * jointUPS.rAxis_a[3] - jointUPS.frame_a.R.w[3] * jointUPS.rAxis_a[2],jointUPS.frame_a.R.w[3] * jointUPS.rAxis_a[1] - jointUPS.frame_a.R.w[1] * jointUPS.rAxis_a[3],jointUPS.frame_a.R.w[1] * jointUPS.rAxis_a[2] - jointUPS.frame_a.R.w[2] * jointUPS.rAxis_a[1]}) / jointUPS.axisLength
{jointUPS.der_rAxis_a_L[1],jointUPS.der_rAxis_a_L[2],jointUPS.der_rAxis_a_L[3]} = Modelica.Mechanics.MultiBody.Frames.resolve2(Modelica.Mechanics.MultiBody.Frames.Orientation({{1.0,0.0,0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}},{0.0,0.0,0.0}),{der(jointUPS.rAxis_0[1]),der(jointUPS.rAxis_0[2]),der(jointUPS.rAxis_0[3])}) / jointUPS.axisCylinder.size[1]
inline functions:
inline scalar array equations:
$DER.jointUPS.der_rAxis_a_L[2] = (jointUPS.axisCylinder.size[1] * $DER.body2.v_0[2] - $DER.jointUPS.axisCylinder.size[1] * body2.v_0[2]) / (jointUPS.axisCylinder.size[1] * jointUPS.axisCylinder.size[1])