544         for (
int iCnt = 1; iCnt <= 6; iCnt++)
 
  546                 WorkMat.
PutRowIndex(iCnt, intShaftMomentumIndex + iCnt);
 
  547                 WorkMat.
PutColIndex(iCnt, intShaftPositionIndex + iCnt);
 
  548                 WorkMat.
PutRowIndex(iCnt+6,intBearingMomentumIndex + iCnt);
 
  549                 WorkMat.
PutColIndex(iCnt+6,intBearingPositionIndex + iCnt);
 
  571         const Vec3 v_R2 = R2.
MulTV( X1 - X2 + R1 * o1_R1 ) - o2_R2;
 
  576                 Vec3 e_R2 = v_R2 + d1_R2 * lambda;
 
  579                 if ( e_R2(1) == 0.0 && e_R2(2) == 0.0 )
 
  580             e_R2(1) = std::numeric_limits<doublereal>::epsilon() * 
m_bdat.
d * 
m_bdat.
Psi / 2.;
 
  582                 const Vec3 v_dot_R2 = R2.
MulTV( X1_dot - X2_dot + omega2.
Cross(X2 - X1) + ( omega1 - omega2 ).
Cross( R1 * o1_R1 ) );
 
  586         Vec3 e_dot_R2 = R2.
MulTV( X1_dot - X2_dot + omega1.
Cross( R1 * o1_R1 ) - omega2.
Cross( R2 * o2_R2 )
 
  590                 if ( e_dot_R2(1) == 0.0 && e_dot_R2(2) == 0.0 )
 
  591             e_dot_R2(1) = std::numeric_limits<doublereal>::epsilon() * 
m_bdat.
d * 
m_bdat.
Psi / 2.;
 
  593                 const Vec3 lambda_d1_R1 = 
Vec3(0.,0.,lambda);
 
  594                 const Vec3 l1_R1 = o1_R1 + lambda_d1_R1;
 
  595                 const Vec3 l1_I = R1 * l1_R1;
 
  596         const Vec3 l2_R2 = o2_R2 + e_R2;
 
  600                 const doublereal e_[2] = { e_R2(1), e_R2(2) }, e_dot_[2] = { e_dot_R2(1), e_dot_R2(2) };
 
  604                                                                                                                   { 0., 1., 0., 0., 0., 0. } }; 
 
  606                                                                                                                   { 0., 0., 0., 1., 0., 0. } }; 
 
  608                                                                                                                   { 0., 0., 0., 0., 0., 1. } }; 
 
  617                 doublereal eps, eps_dot, delta, SoD, SoV, my, beta;
 
  619         hydrodynamic_plain_bearing_force_dv(
m_bdat, omega_proj, omega_projd, e_, ed, e_dot_, e_dotd, k, kd, eps, eps_dot, delta, SoD, SoV, my, beta, 
NBDIRSMAX);
 
  629                 dF2_R2_de_R2(1,1) = kd[0][0]; dF2_R2_de_R2(1,2) = kd[0][1]; dF2_R2_de_R2(1,3) = 0.;
 
  630                 dF2_R2_de_R2(2,1) = kd[1][0]; dF2_R2_de_R2(2,2) = kd[1][1]; dF2_R2_de_R2(2,3) = 0.;
 
  631                 dF2_R2_de_R2(3,1) =       0.; dF2_R2_de_R2(3,2) =               0.; dF2_R2_de_R2(3,3) = 0.;
 
  635                 dF2_R2_de_dot_R2(1,1) = kd[0][2]; dF2_R2_de_dot_R2(1,2) = kd[0][3]; dF2_R2_de_dot_R2(1,3) = 0.;
 
  636                 dF2_R2_de_dot_R2(2,1) = kd[1][2]; dF2_R2_de_dot_R2(2,2) = kd[1][3]; dF2_R2_de_dot_R2(2,3) = 0.;
 
  637                 dF2_R2_de_dot_R2(3,1) =           0.; dF2_R2_de_dot_R2(3,2) =            0; dF2_R2_de_dot_R2(3,3) = 0.;
 
  639                 Vec3 dF2_R2_domega1_proj;       
 
  641                 dF2_R2_domega1_proj(1) = kd[0][4];
 
  642                 dF2_R2_domega1_proj(2) = kd[1][4];
 
  643                 dF2_R2_domega1_proj(3) =           0.;
 
  645                 Vec3 dF2_R2_domega2_proj;       
 
  647                 dF2_R2_domega2_proj(1) = kd[0][5];
 
  648                 dF2_R2_domega2_proj(2) = kd[1][5];
 
  649                 dF2_R2_domega2_proj(3) =       0.;
 
  659                 dM2_R2_de_R2(1,1) =       0.;   dM2_R2_de_R2(1,2) =       0.;   dM2_R2_de_R2(1,3) = 0.;
 
  660                 dM2_R2_de_R2(2,1) =       0.;   dM2_R2_de_R2(2,2) =       0.;   dM2_R2_de_R2(2,3) = 0.;
 
  661                 dM2_R2_de_R2(3,1) = kd[2][0];   dM2_R2_de_R2(3,2) = kd[2][1];   dM2_R2_de_R2(3,3) = 0.;
 
  665                 dM2_R2_de_dot_R2(1,1) =           0.;   dM2_R2_de_dot_R2(1,2) =           0.;   dM2_R2_de_dot_R2(1,3) = 0.;
 
  666                 dM2_R2_de_dot_R2(2,1) =           0.;   dM2_R2_de_dot_R2(2,2) =           0.;   dM2_R2_de_dot_R2(2,3) = 0.;
 
  667                 dM2_R2_de_dot_R2(3,1) = kd[2][2];       dM2_R2_de_dot_R2(3,2) = kd[2][3];       dM2_R2_de_dot_R2(3,3) = 0.;
 
  669                 Vec3 dM2_R2_domega1_proj;       
 
  671                 dM2_R2_domega1_proj(1) = 0.;
 
  672                 dM2_R2_domega1_proj(2) = 0.;
 
  673                 dM2_R2_domega1_proj(3) = kd[2][4];
 
  675                 Vec3 dM2_R2_domega2_proj;       
 
  677                 dM2_R2_domega2_proj(1) = 0.;
 
  678                 dM2_R2_domega2_proj(2) = 0.;
 
  679                 dM2_R2_domega2_proj(3) = kd[2][5];
 
  684                 dF2_R2_de_R2 *= alpha;
 
  685                 dF2_R2_de_dot_R2 *= alpha;
 
  686                 dF2_R2_domega1_proj *= alpha;
 
  687                 dF2_R2_domega2_proj *= alpha;
 
  690                 dM2_R2_de_R2 *= alpha;
 
  691                 dM2_R2_de_dot_R2 *= alpha;
 
  692                 dM2_R2_domega1_proj *= alpha;
 
  693                 dM2_R2_domega2_proj *= alpha;
 
  697                 const Vec3 F2_I = R2 * F2_R2;
 
  698                 const Vec3 M2_I = R2 * ( l2_R2.
Cross( F2_R2 ) + M2_R2 );
 
  699                 const Vec3 F1_I = -F2_I;
 
  700                 const Vec3 M1_I = -l1_I.
Cross( F2_I ) - R2 * M2_R2;
 
  703                 const Mat3x3& dv_R2_dX1 = R2_T;                         
 
  719                                                 - dd1_R2_dg1.
GetRow(3) * (2. * v_R2(3) / 
std::pow(d1_R2(3), 3) * d1_dot_R2(3))
 
  728                 const Mat3x3 dv_R2_dX2 = -R2_T;
 
  743                                                 - dd1_R2_dg2.
GetRow(3) * (2. * v_R2(3) / 
std::pow( d1_R2(3), 3) * d1_dot_R2(3))
 
  750                 const Mat3x3& dv_dot_R2_dX1_dot = R2_T;
 
  761                 const Mat3x3 dv_dot_dX2_dot = -R2_T;
 
  772                 const Mat3x3 de_R2_dX1 = dv_R2_dX1 + d1_R2.
Tens( dlambda_dX1 );
 
  774                 const Mat3x3 de_R2_dg1 = dv_R2_dg1 + d1_R2.
Tens(dlambda_dg1) + dd1_R2_dg1 * lambda;
 
  776                 const Mat3x3 de_R2_dX2 = dv_R2_dX2 + d1_R2.
Tens(dlambda_dX2);
 
  778                 const Mat3x3 de_R2_dg2 = dv_R2_dg2 + d1_R2.
Tens( dlambda_dg2 ) + dd1_R2_dg2 * lambda;
 
  781                 const Vec3 domega1_proj_dg1_dot = R2.
GetCol(3);
 
  784                 const Vec3 domega2_proj_dg2_dot = R2.
GetCol(3);
 
  786                 const Mat3x3 dF2_R2_dX1 = dF2_R2_de_R2 * de_R2_dX1 + dF2_R2_de_dot_R2 * de_dot_R2_dX1;
 
  788                 const Mat3x3 dF2_R2_dg1 = dF2_R2_de_R2 * de_R2_dg1 + dF2_R2_de_dot_R2 * de_dot_R2_dg1
 
  789                                                                 + dF2_R2_domega1_proj.
Tens(domega1_proj_dg1);
 
  790                 const Mat3x3 dF2_R2_dX2 = dF2_R2_de_R2 * de_R2_dX2 + dF2_R2_de_dot_R2 * de_dot_R2_dX2;
 
  791                 const Mat3x3 dF2_R2_dg2 = dF2_R2_de_R2 * de_R2_dg2 + dF2_R2_de_dot_R2 * de_dot_R2_dg2
 
  792                                                                 + dF2_R2_domega1_proj.
Tens(domega1_proj_dg2) + dF2_R2_domega2_proj.
Tens(domega2_proj_dg2);
 
  794                 const Mat3x3 dF2_I_dX1 = R2 * dF2_R2_dX1;
 
  795                 const Mat3x3 dF2_I_dg1 = R2 * dF2_R2_dg1;
 
  796                 const Mat3x3 dF2_I_dX2 = R2 * dF2_R2_dX2;
 
  799                 const Mat3x3 dF1_I_dX1 = -dF2_I_dX1;
 
  800                 const Mat3x3 dF1_I_dg1 = -dF2_I_dg1;
 
  801                 const Mat3x3 dF1_I_dX2 = -dF2_I_dX2;
 
  802                 const Mat3x3 dF1_I_dg2 = -dF2_I_dg2;
 
  804                 const Mat3x3 dM2_R2_dX1 = dM2_R2_de_R2 * de_R2_dX1 + dM2_R2_de_dot_R2 * de_dot_R2_dX1;
 
  805                 const Mat3x3 dM2_I_dX1 = R2 * ( -F2_R2.Cross(de_R2_dX1) + l2_R2.
Cross(dF2_R2_dX1) + dM2_R2_dX1 );
 
  807                 const Mat3x3 dM2_R2_dg1 = dM2_R2_de_R2 * de_R2_dg1 + dM2_R2_de_dot_R2 * de_dot_R2_dg1 + dM2_R2_domega1_proj.
Tens(domega1_proj_dg1);
 
  808                 const Mat3x3 dM2_I_dg1 = R2 * ( -F2_R2.Cross(de_R2_dg1) + l2_R2.
Cross(dF2_R2_dg1) + dM2_R2_dg1 );
 
  810                 const Mat3x3 dM2_R2_dX2 = dM2_R2_de_R2 * de_R2_dX2 + dM2_R2_de_dot_R2 * de_dot_R2_dX2;
 
  811                 const Mat3x3 dM2_I_dX2 = R2 * ( -F2_R2.Cross( de_R2_dX2 ) + l2_R2.
Cross(dF2_R2_dX2) + dM2_R2_dX2 );
 
  813                 const Mat3x3 dM2_R2_dg2 = dM2_R2_de_R2 * de_R2_dg2 + dM2_R2_de_dot_R2 * de_dot_R2_dg2
 
  814                                                                 + dM2_R2_domega1_proj.
Tens(domega1_proj_dg2) + dM2_R2_domega2_proj.
Tens(domega2_proj_dg2);
 
  816                                                                 + R2 * ( -F2_R2.Cross(de_R2_dg2) + l2_R2.
Cross(dF2_R2_dg2) + dM2_R2_dg2 );
 
  818                 const Mat3x3 dM1_I_dX1 = ( R2 * F2_R2 ).
Cross( R1.
GetCol(3) ).Tens( dlambda_dX1 )
 
  819                                                            - l1_I.
Cross( R2 * dF2_R2_dX1 ) - R2 * dM2_R2_dX1;
 
  822                                                                 - l1_I.
Cross( R2 * dF2_R2_dg1 ) - R2 * dM2_R2_dg1;
 
  825                                                            - l1_I.
Cross( R2 * dF2_R2_dX2 ) - R2 * dM2_R2_dX2;
 
  831                 const Mat3x3 dF2_R2_dX1_dot = dF2_R2_de_dot_R2 * de_dot_R2_dX1_dot;
 
  832                 const Mat3x3 dF2_I_dX1_dot = R2 * dF2_R2_dX1_dot;
 
  834                 const Mat3x3 dF2_R2_dg1_dot = dF2_R2_de_dot_R2 * de_dot_R2_dg1_dot + dF2_R2_domega1_proj.
Tens( domega1_proj_dg1_dot );
 
  835                 const Mat3x3 dF2_I_dg1_dot = R2 * dF2_R2_dg1_dot;
 
  837                 const Mat3x3 dF2_R2_dX2_dot = dF2_R2_de_dot_R2 * de_dot_R2_dX2_dot;
 
  838                 const Mat3x3 dF2_I_dX2_dot = R2 * dF2_R2_dX2_dot;
 
  840                 const Mat3x3 dF2_R2_dg2_dot = dF2_R2_de_dot_R2 * de_dot_R2_dg2_dot + dF2_R2_domega2_proj.
Tens( domega2_proj_dg2_dot );
 
  841                 const Mat3x3 dF2_I_dg2_dot = R2 * dF2_R2_dg2_dot;
 
  843                 const Mat3x3 dF1_I_dX1_dot = -dF2_I_dX1_dot;
 
  844                 const Mat3x3 dF1_I_dg1_dot = -dF2_I_dg1_dot;
 
  845                 const Mat3x3 dF1_I_dX2_dot = -dF2_I_dX2_dot;
 
  846                 const Mat3x3 dF1_I_dg2_dot = -dF2_I_dg2_dot;
 
  848                 const Mat3x3 dM2_R2_dX1_dot = dM2_R2_de_dot_R2 * de_dot_R2_dX1_dot;
 
  849                 const Mat3x3 dM2_I_dX1_dot = R2 * ( l2_R2.
Cross( dF2_R2_dX1_dot) + dM2_R2_dX1_dot );
 
  851                 const Mat3x3 dM2_R2_dg1_dot = dM2_R2_de_dot_R2 * de_dot_R2_dg1_dot + dM2_R2_domega1_proj.
Tens( domega1_proj_dg1_dot );
 
  852                 const Mat3x3 dM2_I_dg1_dot = R2 * ( l2_R2.
Cross( dF2_R2_dg1_dot ) + dM2_R2_dg1_dot );
 
  854                 const Mat3x3 dM2_R2_dX2_dot = dM2_R2_de_dot_R2 * de_dot_R2_dX2_dot;
 
  855                 const Mat3x3 dM2_I_dX2_dot = R2 * ( l2_R2.
Cross(dF2_R2_dX2_dot) + dM2_R2_dX2_dot );
 
  857                 const Mat3x3 dM2_R2_dg2_dot = dM2_R2_de_dot_R2 * de_dot_R2_dg2_dot + dM2_R2_domega2_proj.
Tens(domega2_proj_dg2_dot);
 
  858                 const Mat3x3 dM2_I_dg2_dot = R2 * ( l2_R2.
Cross( dF2_R2_dg2_dot ) + dM2_R2_dg2_dot );
 
  860                 const Mat3x3 dM1_I_dX1_dot = -l1_I.
Cross( R2 * dF2_R2_dX1_dot ) - R2 * dM2_R2_dX1_dot;
 
  861                 const Mat3x3 dM1_I_dg1_dot = -l1_I.
Cross( R2 * dF2_R2_dg1_dot ) - R2 * dM2_R2_dg1_dot;
 
  862                 const Mat3x3 dM1_I_dX2_dot = -l1_I.
Cross( R2 * dF2_R2_dX2_dot ) - R2 * dM2_R2_dX2_dot;
 
  863                 const Mat3x3 dM1_I_dg2_dot = -l1_I.
Cross( R2 * dF2_R2_dg2_dot ) - R2 * dM2_R2_dg2_dot;
 
  873                 WorkMat.
Sub(  1,  1, dF1_I_dX1_dot + dF1_I_dX1 * dCoef );
 
  874                 WorkMat.
Sub(  1,  4, dF1_I_dg1_dot + dF1_I_dg1 * dCoef );
 
  875                 WorkMat.
Sub(  1,  7, dF1_I_dX2_dot + dF1_I_dX2 * dCoef );
 
  876                 WorkMat.
Sub(  1, 10, dF1_I_dg2_dot + dF1_I_dg2 * dCoef );
 
  878                 WorkMat.
Sub(  4,  1, dM1_I_dX1_dot + dM1_I_dX1 * dCoef );
 
  879                 WorkMat.
Sub(  4,  4, dM1_I_dg1_dot + dM1_I_dg1 * dCoef );
 
  880                 WorkMat.
Sub(  4,  7, dM1_I_dX2_dot + dM1_I_dX2 * dCoef );
 
  881                 WorkMat.
Sub(  4, 10, dM1_I_dg2_dot + dM1_I_dg2 * dCoef );
 
  883                 WorkMat.
Sub(  7,  1, dF2_I_dX1_dot + dF2_I_dX1 * dCoef );
 
  884                 WorkMat.
Sub(  7,  4, dF2_I_dg1_dot + dF2_I_dg1 * dCoef );
 
  885                 WorkMat.
Sub(  7,  7, dF2_I_dX2_dot + dF2_I_dX2 * dCoef );
 
  886                 WorkMat.
Sub(  7, 10, dF2_I_dg2_dot + dF2_I_dg2 * dCoef );
 
  888                 WorkMat.
Sub( 10,  1, dM2_I_dX1_dot + dM2_I_dX1 * dCoef );
 
  889                 WorkMat.
Sub( 10,  4, dM2_I_dg1_dot + dM2_I_dg1 * dCoef );
 
  890                 WorkMat.
Sub( 10,  7, dM2_I_dX2_dot + dM2_I_dX2 * dCoef );
 
  891                 WorkMat.
Sub( 10, 10, dM2_I_dg2_dot + dM2_I_dg2 * dCoef );
 
  894         std::cerr << __FILE__ << 
":" << __LINE__ << 
":" << __FUNCTION__ << 
":" <<  
"Jac=" << std::endl << WorkMat << std::endl;
 
void PutColIndex(integer iSubCol, integer iCol)
const Vec3 Zero3(0., 0., 0.)
Vec3 Cross(const Vec3 &v) const 
virtual const Mat3x3 & GetRRef(void) const 
GradientExpression< BinaryExpr< FuncPow, LhsExpr, RhsExpr > > pow(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
const MatCross_Manip MatCross
FullSubMatrixHandler & SetFull(void)
virtual const Mat3x3 & GetRCurr(void) const 
doublereal Dot(const Vec3 &v) const 
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const 
const Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
Vec3 GetCol(unsigned short int i) const 
virtual const Vec3 & GetWRef(void) const 
const StructNode * m_pShaft
static const int NBDIRSMAX
Vec3 MulTV(const Vec3 &v) const 
const doublereal * m_alpha
const StructNode * m_pBearing
Vec3 GetRow(unsigned short int i) const 
integer m_iNumGaussPoints
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const 
virtual const Vec3 & GetWCurr(void) const 
Mat3x3 Tens(const Vec3 &v) const 
Mat3x3 MulTM(const Mat3x3 &m) const 
VectorExpression< VectorCrossExpr< VectorLhsExpr, VectorRhsExpr >, 3 > Cross(const VectorExpression< VectorLhsExpr, 3 > &u, const VectorExpression< VectorRhsExpr, 3 > &v)
virtual const Vec3 & GetXCurr(void) const 
virtual void ResizeReset(integer, integer)
DriveOwner m_InitialAssemblyFactor
Mat3x3 Transpose(void) const 
void PutRowIndex(integer iSubRow, integer iRow)
doublereal dGet(const doublereal &dVar) const 
void hydrodynamic_plain_bearing_force_dv(const bearing_data &bdat, const doublereal omega[2], const doublereal omegad[2][NBDIRSMAX], const doublereal e[2], const doublereal ed[2][NBDIRSMAX], const doublereal e_dot[2], const doublereal e_dotd[2][NBDIRSMAX], doublereal k[3], doublereal kd[3][NBDIRSMAX], doublereal &eps, doublereal &eps_dot, doublereal &delta, doublereal &SoD, doublereal &SoV, doublereal &my, doublereal &beta, const int &nbdirs)
virtual const Vec3 & GetVCurr(void) const 
void Sub(integer iRow, integer iCol, const Vec3 &v)