@@ -73,9 +73,7 @@ void TriangularShellForceField<DataTypes>::TRQSTriangleHandler::applyCreateFunct
7373// --------------------------------------------------------------------------------------
7474template <class DataTypes >
7575TriangularShellForceField<DataTypes>::TriangularShellForceField()
76- : d_poisson(initData(&d_poisson,(Real)0.45 ," poissonRatio" ," Poisson ratio in Hooke's law" ))
77- , d_young(initData(&d_young,(Real)3000 .," youngModulus" ," Young modulus in Hooke's law" ))
78- , d_thickness(initData(&d_thickness,(Real)0.1 ," thickness" ," Thickness of the plates" ))
76+ : d_thickness(initData(&d_thickness,(Real)0.1 ," thickness" ," Thickness of the plates" ))
7977 , d_membraneElement(initData(&d_membraneElement, " membraneElement" , " The membrane element to use" ))
8078 , d_bendingElement(initData(&d_bendingElement, " bendingElement" , " The bending plate element to use" ))
8179 , d_corotated(initData(&d_corotated, true , " corotated" , " Compute forces in corotational frame" ))
@@ -543,8 +541,8 @@ void TriangularShellForceField<DataTypes>::computeRotation(Transformation& R, co
543541template <class DataTypes >
544542void TriangularShellForceField<DataTypes>::computeMaterialStiffness()
545543{
546- Real E = d_young. getValue ( ),
547- nu = d_poisson. getValue ( ),
544+ Real E = getYoungModulusInElement ( 0 ),
545+ nu = getPoissonRatioInElement ( 0 ),
548546 t = d_thickness.getValue ();
549547
550548 materialMatrix[0 ][0 ] = 1.0 ;
@@ -1131,34 +1129,35 @@ void TriangularShellForceField<DataTypes>::andesTemplate(StiffnessMatrix &K, con
11311129template <class DataTypes >
11321130void TriangularShellForceField<DataTypes>::computeStiffnessMatrixAll3I(StiffnessMatrix &K, TriangleInformation &tinfo)
11331131{
1134- return andesTemplate (K, tinfo, 1.0 , AndesBeta ( 4.0 /9.0 , 1.0 /12.0 , 5.0 /12.0 , 1.0 /2.0 , 0.0 , 1.0 /3.0 , -1.0 /3.0 , -1.0 /12.0 , -1.0 /2.0 , -5.0 /12.0 ) );
1132+ return andesTemplate (K, tinfo, 1.0 , AndesBeta{ 4.0 /9.0 , 1.0 /12.0 , 5.0 /12.0 , 1.0 /2.0 , 0.0 , 1.0 /3.0 , -1.0 /3.0 , -1.0 /12.0 , -1.0 /2.0 , -5.0 /12.0 } );
11351133}
11361134
11371135template <class DataTypes >
11381136void TriangularShellForceField<DataTypes>::computeStiffnessMatrixAll3M(StiffnessMatrix &K, TriangleInformation &tinfo)
11391137{
1140- return andesTemplate (K, tinfo, 1.0 , AndesBeta ( 4.0 /9.0 , 1.0 /4.0 , 5.0 /4.0 , 3.0 /2.0 , 0.0 , 1.0 , -1.0 , -1.0 /4.0 , -3.0 /2.0 , -5.0 /4.0 ) );
1138+ return andesTemplate (K, tinfo, 1.0 , AndesBeta{ 4.0 /9.0 , 1.0 /4.0 , 5.0 /4.0 , 3.0 /2.0 , 0.0 , 1.0 , -1.0 , -1.0 /4.0 , -3.0 /2.0 , -5.0 /4.0 } );
11411139}
11421140
11431141template <class DataTypes >
11441142void TriangularShellForceField<DataTypes>::computeStiffnessMatrixAllLS(StiffnessMatrix &K, TriangleInformation &tinfo)
11451143{
1146- return andesTemplate (K, tinfo, 1.0 , AndesBeta ( 4.0 /9.0 , 3.0 /20.0 , 3.0 /4.0 , 9.0 /10.0 , 0.0 , 3.0 /5.0 , -3.0 /5.0 , -3.0 /20.0 , -9.0 /10.0 , -3.0 /4.0 ) );
1144+ return andesTemplate (K, tinfo, 1.0 , AndesBeta{ 4.0 /9.0 , 3.0 /20.0 , 3.0 /4.0 , 9.0 /10.0 , 0.0 , 3.0 /5.0 , -3.0 /5.0 , -3.0 /20.0 , -9.0 /10.0 , -3.0 /4.0 } );
11471145}
11481146
11491147template <class DataTypes >
11501148void TriangularShellForceField<DataTypes>::computeStiffnessMatrixLSTRet(StiffnessMatrix &K, TriangleInformation &tinfo)
11511149{
1152- return andesTemplate (K, tinfo, 4.0 /3.0 , AndesBeta ( 1.0 /2.0 , 2.0 /3.0 , -2.0 /3.0 , 0.0 , 0.0 , -4.0 /3.0 , 4.0 /3.0 , -2.0 /3.0 , 0.0 , 2.0 /3.0 ) );
1150+ return andesTemplate (K, tinfo, 4.0 /3.0 , AndesBeta{ 1.0 /2.0 , 2.0 /3.0 , -2.0 /3.0 , 0.0 , 0.0 , -4.0 /3.0 , 4.0 /3.0 , -2.0 /3.0 , 0.0 , 2.0 /3.0 } );
11531151}
11541152
11551153// Optimal ANDES membrane element
11561154// See: C. A. Felippa, A study of optimal membrane triangles with drilling freedoms, 2003
11571155template <class DataTypes >
11581156void TriangularShellForceField<DataTypes>::computeStiffnessMatrixAndesOpt(StiffnessMatrix &K, TriangleInformation &tinfo)
11591157{
1160- Real beta0 = helper::rmax (0.5 - 2.0 *d_poisson.getValue ()*d_poisson.getValue (), 0.01 );
1161- return andesTemplate (K, tinfo, 3.0 /2.0 , AndesBeta (beta0, 1.0 , 2.0 , 1.0 , 0.0 , 1.0 , -1.0 , -1.0 , -1.0 , -2.0 ));
1158+ Real poissonRatio = getPoissonRatioInElement (0 );
1159+ Real beta0 = helper::rmax (0.5 - 2.0 * poissonRatio * poissonRatio, 0.01 );
1160+ return andesTemplate (K, tinfo, 3.0 /2.0 , AndesBeta{beta0, 1.0 , 2.0 , 1.0 , 0.0 , 1.0 , -1.0 , -1.0 , -1.0 , -2.0 });
11621161}
11631162
11641163// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 commit comments