ISAAR.MSolve.IGA/Elements/TSplineKirchhoffLoveShellElementMaterial.cs
/// <summary>
/// This method calculates the stresses of the element.
/// </summary>
/// <param name="element">An element of type <see cref="TSplineKirchhoffLoveShellElementMaterial"/></param>
/// <param name="localDisplacements">A <see cref="double"/> array containing the displacements for the degrees of freedom of the element.</param>
/// <param name="localdDisplacements">A <see cref="double"/> array containing the displacements change for the degrees of freedom of the element.</param>
/// <returns>A <see cref="Tuple{T1,T2}"/> of the stresses and strains of the element.</returns>
This method calculates the stresses of the element.
This method calculates the stresses of the element .
public Tuple<double[], double[]> CalculateStresses(IElement element, double[] localDisplacements, double[] localdDisplacements)
		{
			var shellElement = (TSplineKirchhoffLoveShellElementMaterial)element;
			var elementControlPoints = shellElement.ControlPoints.ToArray();
			for (var j = 0; j < _materialsAtThicknessGp.Keys.Count; j++)
			{
				var jacobianMatrix = CalculateJacobian(elementControlPoints, _tsplines, j);
				var hessianMatrix = CalculateHessian(elementControlPoints, _tsplines, j);
				var surfaceBasisVector1 = CalculateSurfaceBasisVector1(jacobianMatrix, 0);
				var surfaceBasisVector2 = CalculateSurfaceBasisVector1(jacobianMatrix, 1);
				var surfaceBasisVector3 = new[]
				{
					surfaceBasisVector1[1] * surfaceBasisVector2[2] - surfaceBasisVector1[2] * surfaceBasisVector2[1],
					surfaceBasisVector1[2] * surfaceBasisVector2[0] - surfaceBasisVector1[0] * surfaceBasisVector2[2],
					surfaceBasisVector1[0] * surfaceBasisVector2[1] - surfaceBasisVector1[1] * surfaceBasisVector2[0]
				};
				var norm = surfaceBasisVector3.Sum(t => t * t);
				var J1 = Math.Sqrt(norm);
				var surfaceBasisVectorDerivative1 = CalculateSurfaceBasisVector1(hessianMatrix, 0);
				var surfaceBasisVectorDerivative2 = CalculateSurfaceBasisVector1(hessianMatrix, 1);
				var surfaceBasisVectorDerivative12 = CalculateSurfaceBasisVector1(hessianMatrix, 2);
				var Bmembrane = CalculateMembraneDeformationMatrix(_tsplines, j, surfaceBasisVector1, surfaceBasisVector2, elementControlPoints);
				var Bbending = CalculateBendingDeformationMatrix(surfaceBasisVector3, _tsplines, j, surfaceBasisVector2,
					surfaceBasisVectorDerivative1, surfaceBasisVector1, J1, surfaceBasisVectorDerivative2,
					surfaceBasisVectorDerivative12, elementControlPoints);
				var membraneStrain = new double[Bmembrane.GetLength(0)];
				var bendingStrain = new double[Bmembrane.GetLength(0)];
				for (var i = 0; i < Bmembrane.GetLength(1); i++)
				{
					for (var k = 0; k < Bmembrane.GetLength(0); k++)
					{
						membraneStrain[i] += Bmembrane[k, i] * localDisplacements[k];
						bendingStrain[i] += Bbending[k, i] * localDisplacements[k];
					}
				}
				foreach (var keyValuePair in _materialsAtThicknessGp[_materialsAtThicknessGp.Keys.ToList()[j]])
				{
					var thicknessPoint = keyValuePair.Key;
					var material = keyValuePair.Value;
					var gpStrain = new double[bendingStrain.Length];
					var z = -thicknessPoint.Zeta;
					for (var i = 0; i < bendingStrain.Length; i++)
					{
						gpStrain[i] += membraneStrain[i] + bendingStrain[i] * z;
					}
					material.UpdateMaterial(gpStrain);
				}
			}
			return new Tuple<double[], double[]>(new double[0], new double[0]);
		}
public Tuple < double [ ] , double [ ] > CalculateStresses ( IElement element , double [ ] localDisplacements , double [ ] localdDisplacements ) { var shellElement = ( TSplineKirchhoffLoveShellElementMaterial ) element ; var elementControlPoints = shellElement . ControlPoints . ToArray ( ) ; for ( var j = 0 ; j < _materialsAtThicknessGp . Keys . Count ; j ++ ) { var jacobianMatrix = CalculateJacobian ( elementControlPoints , _tsplines , j ) ; var hessianMatrix = CalculateHessian ( elementControlPoints , _tsplines , j ) ; var surfaceBasisVector1 = CalculateSurfaceBasisVector1 ( jacobianMatrix , 0 ) ; var surfaceBasisVector2 = CalculateSurfaceBasisVector1 ( jacobianMatrix , 1 ) ; var surfaceBasisVector3 = new [ ] { surfaceBasisVector1 [ 1 ] * surfaceBasisVector2 [ 2 ] - surfaceBasisVector1 [ 2 ] * surfaceBasisVector2 [ 1 ] , surfaceBasisVector1 [ 2 ] * surfaceBasisVector2 [ 0 ] - surfaceBasisVector1 [ 0 ] * surfaceBasisVector2 [ 2 ] , surfaceBasisVector1 [ 0 ] * surfaceBasisVector2 [ 1 ] - surfaceBasisVector1 [ 1 ] * surfaceBasisVector2 [ 0 ] } ; var norm = surfaceBasisVector3 . Sum ( t => t * t ) ; var J1 = Math . Sqrt ( norm ) ; var surfaceBasisVectorDerivative1 = CalculateSurfaceBasisVector1 ( hessianMatrix , 0 ) ; var surfaceBasisVectorDerivative2 = CalculateSurfaceBasisVector1 ( hessianMatrix , 1 ) ; var surfaceBasisVectorDerivative12 = CalculateSurfaceBasisVector1 ( hessianMatrix , 2 ) ; var Bmembrane = CalculateMembraneDeformationMatrix ( _tsplines , j , surfaceBasisVector1 , surfaceBasisVector2 , elementControlPoints ) ; var Bbending = CalculateBendingDeformationMatrix ( surfaceBasisVector3 , _tsplines , j , surfaceBasisVector2 , surfaceBasisVectorDerivative1 , surfaceBasisVector1 , J1 , surfaceBasisVectorDerivative2 , surfaceBasisVectorDerivative12 , elementControlPoints ) ; var membraneStrain = new double [ Bmembrane . GetLength ( 0 ) ] ; var bendingStrain = new double [ Bmembrane . GetLength ( 0 ) ] ; for ( var i = 0 ; i < Bmembrane . GetLength ( 1 ) ; i ++ ) { for ( var k = 0 ; k < Bmembrane . GetLength ( 0 ) ; k ++ ) { membraneStrain [ i ] += Bmembrane [ k , i ] * localDisplacements [ k ] ; bendingStrain [ i ] += Bbending [ k , i ] * localDisplacements [ k ] ; } } foreach ( var keyValuePair in _materialsAtThicknessGp [ _materialsAtThicknessGp . Keys . ToList ( ) [ j ] ] ) { var thicknessPoint = keyValuePair . Key ; var material = keyValuePair . Value ; var gpStrain = new double [ bendingStrain . Length ] ; var z = - thicknessPoint . Zeta ; for ( var i = 0 ; i < bendingStrain . Length ; i ++ ) { gpStrain [ i ] += membraneStrain [ i ] + bendingStrain [ i ] * z ; } material . UpdateMaterial ( gpStrain ) ; } } return new Tuple < double [ ] , double [ ] > ( new double [ 0 ] , new double [ 0 ] ) ; }
This method calculates the stresses of the element.
This method calculates the stresses of the element .
A  of the stresses and strains of the element.
A of the stresses and strains of the element .
element
IElement
An element of type
An element of type
localDisplacements
double[]
A  array containing the displacements for the degrees of freedom of the element.
A array containing the displacements for the degrees of freedom of the element .
localdDisplacements
double[]
A  array containing the displacements change for the degrees of freedom of the element.
A array containing the displacements change for the degrees of freedom of the element .