public override IsoPoint[] GetInternalForceDiscretationPoints() { var buf = new List <IsoPoint>(); var isoPoint = new IsoPoint(); if (_forceIsoLocation.Length > 0) { isoPoint.Xi = _forceIsoLocation[0]; } if (_forceIsoLocation.Length > 1) { isoPoint.Eta = _forceIsoLocation[1]; } if (_forceIsoLocation.Length > 2) { isoPoint.Lambda = _forceIsoLocation[2]; } buf.Add(isoPoint); return(buf.ToArray()); }
public double GetMagnitudeAt(Element targetelement, IsoPoint location) { return(_severityFunction.Evaluate(location.Xi)); throw new NotImplementedException(); }
protected PartialNonUniformLoad(SerializationInfo info, StreamingContext context) : base(info, context) { _coordinationSystem = (CoordinationSystem)(int)info.GetValue("_coordinationSystem", typeof(int)); _startLocation = (IsoPoint)info.GetValue("_startLocation", typeof(IsoPoint)); _endLocation = (IsoPoint)info.GetValue("_endLocation", typeof(IsoPoint)); _direction = (Vector)info.GetValue("_direction", typeof(Vector)); _severityFunction = (Mathh.Polynomial)info.GetValue("_direction", typeof(Mathh.Polynomial)); }
protected PartialNonUniformLoad(SerializationInfo info, StreamingContext context) : base(info, context) { _magnitudesAtNodes = (double[])info.GetValue("_magnitudesAtNodes", typeof(double[])); _startLocation = (IsoPoint)info.GetValue("_startLocation", typeof(IsoPoint)); _endLocation = (IsoPoint)info.GetValue("_endLocation", typeof(IsoPoint)); _startMagnitude = (double)info.GetValue("_startMagnitude", typeof(double)); _endMagnitude = (double)info.GetValue("_endMagnitude", typeof(double)); _direction = (Vector)info.GetValue("_direction", typeof(Vector)); }
/// <summary> /// Sets the isoparametric location of concentrated force. /// </summary> /// <param name="isoCoords">The isoparametric coordiation components (xi, eta, gamma).</param> private void SetIsoLocation(params double[] isoCoords) { _forceIsoLocation = new IsoPoint(isoCoords[0], isoCoords[1], isoCoords[2]); /* * for (var i = 0; i < isoCoords.Length; i++) * { * if (i >= _forceIsoLocation.Length) * break; * * _forceIsoLocation[i] = isoCoords[i]; * }*/ }
public void LoadEquivalentNodalLoads_ConcentratedLod_eulerbernoullybeam_dirY_My_End() { var l = 4.0; var w = 2.0; var a = l; var nodes = new Node[2]; nodes[0] = (new Node(0, 0, 0) { Label = "n0" }); nodes[1] = (new Node(l, 0, 0) { Label = "n1" }); var elm = new BarElement(nodes[0], nodes[1]) { Label = "e0" }; var f = new Force(0, 0, 0, 0, w, 0); var loc = new IsoPoint(elm.LocalCoordsToIsoCoords(a)[0]); var u1 = new Loads.ConcentratedLoad(f, loc, CoordinationSystem.Global); var hlpr = new ElementHelpers.EulerBernoulliBeamHelper(ElementHelpers.BeamDirection.Y, elm); var loads = hlpr.GetLocalEquivalentNodalLoads(elm, u1); var d0 = Force.Zero; var d1 = loads[1] - f; Assert.IsTrue(Math.Abs(d0.Forces.Length) < 1e-5, "invalid value"); Assert.IsTrue(Math.Abs(d0.Moments.Length) < 1e-5, "invalid value"); Assert.IsTrue(Math.Abs(d1.Forces.Length) < 1e-5, "invalid value"); Assert.IsTrue(Math.Abs(d1.Moments.Length) < 1e-5, "invalid value"); }
/// <summary> /// Gets the iso location of points that internal force in those points are discrete only due to element. /// </summary> /// <returns>list of iso locations</returns> public IsoPoint[] GetInternalForceDiscretationPoints() { var buf = new List <IsoPoint>(); foreach (var node in nodes) { var x = (node.Location - nodes[0].Location).Length; var xi = LocalCoordsToIsoCoords(x)[0]; buf.Add(new IsoPoint(xi)); } //Note: internal loads are not accounted /* * foreach (var load in this.loads) * { * if (load.Case != loadCase) * continue; * * var pts = load.GetInternalForceDiscretationPoints(); * * buf.AddRange(pts); * } */ var b2 = new List <IsoPoint>(); foreach (var point in buf.OrderBy(i => i.Xi)) { var pt = new IsoPoint(point.Xi); if (!b2.Contains(pt)) { b2.Add(pt); } } return(b2.ToArray()); }
public double[] GetMagnitudesAt(Element targetelement, IsoPoint location) { //var buf = 0.0;//new double[EndMagnitude.Length]; //var dims = StartMagnitude.Length; //var n = Math.Min(dims, isoCoords.Length); throw new NotImplementedException(); /* * //for (var i = 0; i < n; i++) * { * //var startOffset = this.StartLocation[0]; * //var endOffset = this.EndLocation[0]; * var startMag = this.StartMagnitude; * var endMag = this.EndMagnitude; * * var p0 = new Point(StartLocation.Xi, StartLocation.Eta, StartLocation.Lambda); * var p1 = new Point(EndLocation.Xi, EndLocation.Eta, EndLocation.Lambda); * * var v = (p1 - p0); * * * //var * * var xi0 = -1 + startOffset; * var xi1 = 1 - endOffset; * * var q0 = startMag; * var q1 = endMag; * * var m = (q0 - q1) / (xi0 - xi1); * * var magnitude = q0 + m * (isoCoords[i] - xi0); * buf[i] = magnitude; * } * * return buf; */ }
public GeneralStressTensor GetLocalStressAt(Element targetElement, Displacement[] localDisplacements, params double[] isoCoords) { //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 pt = new IsoPoint(isoCoords); var tr = targetElement.GetTransformationManager(); var locals = localDisplacements;// tr.TransformGlobalToLocal(globalDisplacements); var b = GetBMatrixAt(targetElement, isoCoords); var d = GetDMatrixAt(targetElement, isoCoords); var u1l = locals[0]; var u2l = locals[1]; var u3l = locals[2]; var uDkt = targetElement.MatrixPool.Allocate(new[] { u1l.DZ, u1l.RX, u1l.RY, /**/ u2l.DZ, u2l.RX, u2l.RY, /**/ u3l.DZ, u3l.RX, u3l.RY }); var mDkt = d * b * uDkt; //eq. 32, batoz article var bTensor = new BendingStressTensor(); bTensor.M11 = mDkt[0, 0]; bTensor.M22 = mDkt[1, 0]; bTensor.M21 = bTensor.M12 = mDkt[2, 0]; var buf = new GeneralStressTensor(bTensor); return(buf); }
public double GetMagnitudeAt(Element targetelement, IsoPoint location) { var afterStart = location.Xi >= _startLocation.Xi && location.Eta >= _startLocation.Eta && location.Lambda >= _startLocation.Lambda; var beforeEnd = location.Xi <= _endLocation.Xi && location.Eta <= _endLocation.Eta && location.Lambda <= _endLocation.Lambda; if (afterStart && beforeEnd) { return(_severityFunction.Evaluate(location.Xi, location.Eta, location.Lambda)); } return(0); throw new NotImplementedException(); }
public ConcentratedLoad(Force force, IsoPoint forceIsoLocation, CoordinationSystem coordinationSystem) { Force = force; ForceIsoLocation = forceIsoLocation; CoordinationSystem = coordinationSystem; }
/* * private void SetIsoLocation(double xi) * { * SetIsoLocation(new double[] { xi, 0, 0 }); * } * * private void SetIsoLocation(double xi, double eta) * { * SetIsoLocation(new double[] { xi, eta, 0 }); * } * * private void SetIsoLocation(double xi, double eta, double gamma) * { * SetIsoLocation(new double[] { xi, eta, gamma }); * } */ #endregion #region Deserialization Constructor protected ConcentratedLoad(SerializationInfo info, StreamingContext context) : base(info, context) { _forceIsoLocation = (IsoPoint)info.GetValue("_forceIsoLocation", typeof(IsoPoint)); _force = (Force)info.GetValue("_force", typeof(Force)); _coordinationSystem = (CoordinationSystem)(int)info.GetValue("_coordinationSystem", typeof(int)); }