/// <summary> /// Gets the stress of a shell element (combination of a membrane + bending element) as the combination of both stresses /// </summary> /// <param name="shellThickness">The location where you want to calculate the bending stress (max at shellthickness)</param> /// <param name="probeLocation">The location of the stress probe. Top of thickness/shell, bottom or envelope (max abs of both). </param> public void UpdateTotalStress(double shellThickness, SectionPoints probeLocation) { switch (probeLocation) { case SectionPoints.Envelope: { CauchyStressTensor top = MembraneTensor + BendingStressTensor.ConvertBendingStressToCauchyTensor(BendingTensor, shellThickness, 1); CauchyStressTensor bottom = MembraneTensor + BendingStressTensor.ConvertBendingStressToCauchyTensor(BendingTensor, shellThickness, -1); if (Math.Abs(CauchyStressTensor.GetVonMisesStress(top)) > Math.Abs(CauchyStressTensor.GetVonMisesStress(bottom))) { this.TotalStressTensor = top; } else { this.TotalStressTensor = bottom; } break; } case SectionPoints.Top: { this.TotalStressTensor = MembraneTensor + BendingStressTensor.ConvertBendingStressToCauchyTensor(BendingTensor, shellThickness, 1); break; } case SectionPoints.Bottom: { this.TotalStressTensor = MembraneTensor + BendingStressTensor.ConvertBendingStressToCauchyTensor(BendingTensor, shellThickness, -1); break; } default: break; } }
private void BuildCharts() { if (!(_source.GraphData?.Profile?.Count > 0)) { HeightPoints.Clear(); SectionPoints.Clear(); return; } CreateOrUpdateChartSeries(HeightPoints, _source.GraphData.Profile); _sectionNamesLookup.Clear(); for (int i = 0; i < _source.Results.Count; i++) { _sectionNamesLookup[i] = _source.Results[i].SectionStartName; } CreateOrUpdateChartSeries(SectionPoints, _source.GraphData.SectionLabels); }
/// <summary> /// Gets the internal stress at defined location. /// tensor is in local coordinate system. /// </summary> /// <param name="isoLocation">The location for the stress probe in iso coordinates. Order: x,y,z. Maximum bending stress at the shell thickness (z=1.0). Must be withing 0 and 1.</param> /// <param name="combination">The load combination.</param> /// <param name="probeLocation">The probe location for the stress.</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 CauchyStressTensor GetInternalStress(double[] isoLocation, LoadCase cse, SectionPoints probeLocation) { //added by rubsy92 if (isoLocation[2] < 0 || isoLocation[2] > 1.0) { throw new Exception("z must be between 0 and 1. 0 is the centre of the plate and 1 is on the plate surface. Use the section points to get the top/bottom.") { }; } var helpers = GetHelpers(); var gst = new GeneralStressTensor(); var tr = this.GetTransformationManager(); var ld = this.Nodes.Select(i => tr.TransformGlobalToLocal(i.GetNodalDisplacement(cse))).ToArray(); for (var i = 0; i < helpers.Count(); i++) { var st = helpers[i].GetLocalInternalStressAt(this, ld, isoLocation); gst += st; } var buf = new CauchyStressTensor(); buf += gst.MembraneTensor; { var lambda = 0.0; switch (probeLocation) { case SectionPoints.Envelope: { var thickness = Section.GetThicknessAt(isoLocation); //top var bufTop = new CauchyStressTensor(); bufTop += gst.MembraneTensor; bufTop += BendingStressTensor.ConvertBendingStressToCauchyTensor(gst.BendingTensor, thickness, 1.0); //bottom var bufBottom = new CauchyStressTensor(); bufBottom += gst.MembraneTensor; bufBottom += BendingStressTensor.ConvertBendingStressToCauchyTensor(gst.BendingTensor, thickness, -1.0); if (Math.Abs(CauchyStressTensor.GetVonMisesStress(bufTop)) > Math.Abs(CauchyStressTensor.GetVonMisesStress(bufBottom))) { buf = bufTop; } else { buf = bufBottom; } break; } case SectionPoints.Top: { lambda = 1.0; var thickness = Section.GetThicknessAt(isoLocation); buf += BendingStressTensor.ConvertBendingStressToCauchyTensor(gst.BendingTensor, thickness, lambda); break; } case SectionPoints.Bottom: { lambda = -1.0; var thickness = Section.GetThicknessAt(isoLocation); buf += BendingStressTensor.ConvertBendingStressToCauchyTensor(gst.BendingTensor, thickness, lambda); break; } default: break; } } return(buf); }
/// <summary> /// Gets the internal stress at defined location. /// tensor is in local coordinate system. /// </summary> /// <param name="isoLocation">The location for the stress probe in iso coordinates. Order: x,y,z. Maximum bending stress at the shell thickness (z=1.0). Must be withing 0 and 1.</param> /// <param name="combination">The load combination.</param> /// <param name="probeLocation">The probe location for the stress.</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 CauchyStressTensor GetInternalStress(double[] isoLocation, LoadCombination combination, SectionPoints probeLocation) { var helpers = GetHelpers(); var gst = new GeneralStressTensor(); var tr = this.GetTransformationManager(); var ld = this.Nodes.Select(i => tr.TransformGlobalToLocal(i.GetNodalDisplacement(combination))).ToArray(); for (var i = 0; i < helpers.Count(); i++) { var st = helpers[i].GetLocalInternalStressAt(this, ld, isoLocation); gst += st; } var buf = new CauchyStressTensor(); buf += gst.MembraneTensor; { var lambda = 0.0; switch (probeLocation) { case SectionPoints.Envelope: { var thickness = Section.GetThicknessAt(isoLocation); //top var bufTop = new CauchyStressTensor(); bufTop += gst.MembraneTensor; bufTop += BendingStressTensor.ConvertBendingStressToCauchyTensor(gst.BendingTensor, thickness, 1.0); //bottom var bufBottom = new CauchyStressTensor(); bufBottom += gst.MembraneTensor; bufBottom += BendingStressTensor.ConvertBendingStressToCauchyTensor(gst.BendingTensor, thickness, -1.0); if (Math.Abs(CauchyStressTensor.GetVonMisesStress(bufTop)) > Math.Abs(CauchyStressTensor.GetVonMisesStress(bufBottom))) { buf = bufTop; } else { buf = bufBottom; } break; } case SectionPoints.Top: { lambda = 1.0; var thickness = Section.GetThicknessAt(isoLocation); buf += BendingStressTensor.ConvertBendingStressToCauchyTensor(gst.BendingTensor, thickness, lambda); break; } case SectionPoints.Bottom: { lambda = -1.0; var thickness = Section.GetThicknessAt(isoLocation); buf += BendingStressTensor.ConvertBendingStressToCauchyTensor(gst.BendingTensor, thickness, lambda); break; } default: break; } } return(buf); }
/// <summary> /// Gets the internal stress at defined location. /// tensor is in local coordinate system. /// </summary> /// <param name="isoLocation">The location for the stress probe in iso coordinates. Order: x,y,z. Maximum bending stress at the shell thickness (z=1.0). Must be withing 0 and 1.</param> /// <param name="combination">The load combination.</param> /// <param name="probeLocation">The probe location for the stress.</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[] isoLocation, LoadCombination combination, SectionPoints probeLocation) { if (isoLocation[2] < 0 || isoLocation[2] > 1.0) { throw new Exception("z must be between 0 and 1. 0 is the centre of the plate and 1 is on the plate surface. Use the section points to get the top/bottom.") { }; } var helpers = GetHelpers(); var buf = new FlatShellStressTensor(); for (var i = 0; i < helpers.Count(); i++) { if (helpers[i] is Q4MembraneHelper) { buf.MembraneTensor = ((Q4MembraneHelper)helpers[i]).GetLocalInternalStress(this, combination, isoLocation).MembraneTensor; } else if (helpers[i] is DkqHelper) { buf.BendingTensor = ((DkqHelper)helpers[i]).GetBendingInternalStress(this, combination, isoLocation).BendingTensor; } } buf.UpdateTotalStress(_section.GetThicknessAt(new double[] { isoLocation[0], isoLocation[1] }) * isoLocation[2], probeLocation); return(buf); }