/// <inheritdoc /> public override Matrix GetGlobalStifnessMatrix() { //step 1 : get points in local system //step 2 : get local stiffness matrix //step 3 : expand local stiffness matrix //step 4 : get global stiffness matrix //step 1 var ls = GetLocalPoints(); var xs = new [] { ls[0].X, ls[1].X, ls[2].X }; var ys = new [] { ls[0].Y, ls[1].Y, ls[2].Y }; //step 2 var kl = CstElement.GetStiffnessMatrix(xs, ys, this._thickness, this.ElasticModulus, this.PoissonRatio, this._formulationType); //step 3 var currentOrder = new [] { new FluentElementPermuteManager.ElementLocalDof(0, DoF.Dx), new FluentElementPermuteManager.ElementLocalDof(0, DoF.Dy), new FluentElementPermuteManager.ElementLocalDof(1, DoF.Dx), new FluentElementPermuteManager.ElementLocalDof(1, DoF.Dy), new FluentElementPermuteManager.ElementLocalDof(2, DoF.Dx), new FluentElementPermuteManager.ElementLocalDof(2, DoF.Dy), }; var kle = FluentElementPermuteManager.FullyExpand(kl, currentOrder, 3); var lambda = GetTransformationMatrix(); var tr = Matrix.DiagonallyRepeat(lambda.Transpose(), 6); // eq. 5-16 page 78 (87 of file) //step 4 : get global stiffness matrix var buf = tr.Transpose() * kle * tr; //eq. 5-15 p77 return(buf); }
private Matrix GetLocalMembraneStiffnessMatrix() { //cst //step 1 : get points in local system //step 2 : get local stiffness matrix //step 3 : expand local stiffness matrix //step 4 : get global stiffness matrix //step 1 var ls = GetLocalPoints(); var xs = new[] { ls[0].X, ls[1].X, ls[2].X }; var ys = new[] { ls[0].Y, ls[1].Y, ls[2].Y }; //step 2 var kl = CstElement.GetStiffnessMatrix(xs, ys, this._thickness, this.ElasticModulus, this.PoissonRatio, this._formulationType); //step 3 var currentOrder = new[] { new ElementPermuteHelper.ElementLocalDof(0, DoF.Dx), new ElementPermuteHelper.ElementLocalDof(0, DoF.Dy), new ElementPermuteHelper.ElementLocalDof(1, DoF.Dx), new ElementPermuteHelper.ElementLocalDof(1, DoF.Dy), new ElementPermuteHelper.ElementLocalDof(2, DoF.Dx), new ElementPermuteHelper.ElementLocalDof(2, DoF.Dy), }; var kle = ElementPermuteHelper.FullyExpand(kl, currentOrder, 3); return(kle); }
private MembraneStressTensor GetMembraneInternalForce(LoadCombination combination) { //Note: membrane internal force is constant //step 1 : get transformation matrix //step 2 : convert globals points to locals //step 3 : convert global displacements to locals //step 4 : calculate B matrix and D matrix //step 5 : M=D*B*U //Note : Steps changed... var trans = this.GetTransformationMatrix(); var lp = GetLocalPoints(); var g2l = new Func <Vector, Vector>(glob => (trans.Transpose() * glob.ToMatrix()).ToVector()); //var l2g = new Func<Vector, Vector>(local => (trans*local.ToMatrix()).ToPoint()); var d1g = this.nodes[0].GetNodalDisplacement(combination); var d2g = this.nodes[1].GetNodalDisplacement(combination); var d3g = this.nodes[2].GetNodalDisplacement(combination); //step 3 var d1l = new Displacement(g2l(d1g.Displacements), g2l(d1g.Rotations)); var d2l = new Displacement(g2l(d2g.Displacements), g2l(d2g.Rotations)); var d3l = new Displacement(g2l(d3g.Displacements), g2l(d3g.Rotations)); var uCst = Matrix.OfVector(new[] { d1l.DX, d1l.DY, d2l.DX, d2l.DY, /**/ d3l.DX, d3l.DY }); var dbCst = CstElement.GetDMatrix(_elasticModulus, _poissonRatio, _formulationType); var bCst = CstElement.GetBMatrix(lp.Select(i => i.X).ToArray(), lp.Select(i => i.Y).ToArray()); var sCst = dbCst * bCst * uCst; var buf = new MembraneStressTensor(); buf.Sx = sCst[0, 0]; buf.Sy = sCst[1, 0]; buf.Txy = sCst[2, 0]; return(buf); } private PlateBendingStressTensor GetBendingInternalForce(double localX, double localY, LoadCombination cmb) { //step 1 : get transformation matrix //step 2 : convert globals points to locals //step 3 : convert global displacements to locals //step 4 : calculate B matrix and D matrix //step 5 : M=D*B*U //Note : Steps changed... var trans = this.GetTransformationMatrix(); var lp = GetLocalPoints(); var g2l = new Func <Vector, Vector>(glob => (trans.Transpose() * glob.ToMatrix()).ToVector()); //var l2g = new Func<Vector, Vector>(local => (trans*local.ToMatrix()).ToPoint()); var d1g = this.nodes[0].GetNodalDisplacement(cmb); var d2g = this.nodes[1].GetNodalDisplacement(cmb); var d3g = this.nodes[2].GetNodalDisplacement(cmb); //step 3 var d1l = new Displacement(g2l(d1g.Displacements), g2l(d1g.Rotations)); var d2l = new Displacement(g2l(d2g.Displacements), g2l(d2g.Rotations)); var d3l = new Displacement(g2l(d3g.Displacements), g2l(d3g.Rotations)); var uDkt = Matrix.OfVector(new[] { d1l.DZ, d1l.RX, d1l.RY, /**/ d2l.DZ, d2l.RX, d2l.RY, /**/ d3l.DZ, d3l.RX, d3l.RY }); var dbDkt = DktElement.GetDMatrix(this._thickness, this._elasticModulus, this._poissonRatio); var b = DktElement.GetBMatrix(localX, localY, lp.Select(i => i.X).ToArray(), lp.Select(i => i.Y).ToArray()); var mDkt = dbDkt * b * uDkt; //eq. 32, batoz article var buf = new PlateBendingStressTensor(); buf.Mx = mDkt[0, 0]; buf.My = mDkt[1, 0]; buf.Mxy = mDkt[2, 0]; return(buf); } #endregion #region stresses /// <summary> /// Gets the internal stress at defined location. /// tensor is in local coordinate system. /// </summary> /// <param name="localX">The X in local coordinate system (see remarks).</param> /// <param name="localY">The Y in local coordinate system (see remarks).</param> /// <param name="combination">The load combination.</param> /// <param name="probeLocation">The probe location for the stress.</param> /// <param name="thickness">The location for the bending stress. Maximum at the shell thickness</param> /// <returns>Stress tensor of flat shell, in local coordination system</returns> /// <remarks> /// for more info about local coordinate of flat shell see page [72 of 166] (page 81 of pdf) of "Development of Membrane, Plate and Flat Shell Elements in Java" thesis by Kaushalkumar Kansara freely available on the web /// </remarks> public FlatShellStressTensor GetInternalStress(double localX, double localY, LoadCombination combination, double thickness, SectionPoints probeLocation) { var buf = new FlatShellStressTensor(); if ((this._behaviour & PlaneElementBehaviour.ThinPlate) != 0) { buf.MembraneTensor = GetMembraneInternalForce(combination); } if ((this._behaviour & PlaneElementBehaviour.Membrane) != 0) { buf.BendingTensor = GetBendingInternalForce(localX, localY, combination); } buf.UpdateTotalStress(thickness, probeLocation); return(buf); } #endregion #region strains public StrainTensor GetMembraneInternalStrain(LoadCombination combination) { //Note: membrane internal force is constant //step 1 : get transformation matrix //step 2 : convert globals points to locals //step 3 : convert global displacements to locals //step 4 : calculate B matrix //step 5 : e=B*U //Note : Steps changed... var trans = this.GetTransformationMatrix(); var lp = GetLocalPoints(); var g2l = new Func <Vector, Vector>(glob => (trans.Transpose() * glob.ToMatrix()).ToVector()); //var l2g = new Func<Vector, Vector>(local => (trans*local.ToMatrix()).ToPoint()); var d1g = this.nodes[0].GetNodalDisplacement(combination); var d2g = this.nodes[1].GetNodalDisplacement(combination); var d3g = this.nodes[2].GetNodalDisplacement(combination); //step 3 var d1l = new Displacement(g2l(d1g.Displacements), g2l(d1g.Rotations)); var d2l = new Displacement(g2l(d2g.Displacements), g2l(d2g.Rotations)); var d3l = new Displacement(g2l(d3g.Displacements), g2l(d3g.Rotations)); var uCst = Matrix.OfVector(new[] { d1l.DX, d1l.DY, d2l.DX, d2l.DY, /**/ d3l.DX, d3l.DY }); var bCst = CstElement.GetBMatrix(lp.Select(i => i.X).ToArray(), lp.Select(i => i.Y).ToArray()); var ECst = bCst * uCst; var buf = new StrainTensor(); buf.S11 = ECst[0, 0]; buf.S22 = ECst[1, 0]; buf.S12 = ECst[2, 0]; return(buf); }