public CrackTipEnrichments2D(ISingleCrack crackDescription, CrackTipPosition tipPosition) : this(crackDescription, tipPosition, new ITipFunction[] { new IsotropicBrittleTipFunctions2D.Func1(), new IsotropicBrittleTipFunctions2D.Func2(), new IsotropicBrittleTipFunctions2D.Func3(), new IsotropicBrittleTipFunctions2D.Func4() }) { }
// TODO: remove this public IReadOnlyList <XContinuumElement2D> GetTipElements(CrackTipPosition tipPosition) { if (tipPosition == CrackTipPosition.Single) { return(tipElements); } else { throw new ArgumentException("Only works for single tip cracks."); } }
// TODO: remove this public TipCoordinateSystem GetTipSystem(CrackTipPosition tip) { if (tip == CrackTipPosition.Single) { return(tipSystem); } else { throw new ArgumentException("Only works for single tip cracks."); } }
// TODO: remove this public CartesianPoint GetCrackTip(CrackTipPosition tipPosition) { if (tipPosition == CrackTipPosition.Single) { return(crackTip); } else { throw new ArgumentException("Only works for single tip cracks."); } }
public TipCoordinateSystem GetTipSystem(CrackTipPosition tipPosition) { if (tipPosition == CrackTipPosition.Start) { return(startTipSystem); } else if (tipPosition == CrackTipPosition.End) { return(endTipSystem); } else { throw new ArgumentException("Invalid tip position"); } }
public CartesianPoint GetCrackTip(CrackTipPosition tipPosition) { if (tipPosition == CrackTipPosition.Start) { return(Vertices.First.Value); } else if (tipPosition == CrackTipPosition.End) { return(Vertices.Last.Value); } else { throw new ArgumentException("Invalid tip position"); } }
public IReadOnlyList <XContinuumElement2D> GetTipElements(CrackTipPosition tipPosition) { if (tipPosition == CrackTipPosition.Start) { return(startTipElements); } else if (tipPosition == CrackTipPosition.End) { return(endTipElements); } else { throw new ArgumentException("Invalid tip position"); } }
public CrackTipEnrichments2D(ISingleCrack crackDescription, CrackTipPosition tipPosition, IReadOnlyList <ITipFunction> enrichmentFunctions) { this.crackDescription = crackDescription; this.tipPosition = tipPosition; this.enrichmentFunctions = enrichmentFunctions; this.Dofs = new EnrichedDof[] { new EnrichedDof(enrichmentFunctions[0], StructuralDof.TranslationX), new EnrichedDof(enrichmentFunctions[0], StructuralDof.TranslationY), new EnrichedDof(enrichmentFunctions[1], StructuralDof.TranslationX), new EnrichedDof(enrichmentFunctions[1], StructuralDof.TranslationY), new EnrichedDof(enrichmentFunctions[2], StructuralDof.TranslationX), new EnrichedDof(enrichmentFunctions[2], StructuralDof.TranslationY), new EnrichedDof(enrichmentFunctions[3], StructuralDof.TranslationX), new EnrichedDof(enrichmentFunctions[3], StructuralDof.TranslationY), }; }
private bool IsTipElement(XContinuumElement2D element, CrackTipPosition tipPosition) { CartesianPoint crackTip, adjacentVertex; if (tipPosition == CrackTipPosition.Start) { crackTip = Vertices.First.Value; adjacentVertex = Vertices.First.Next.Value; } else if (tipPosition == CrackTipPosition.End) { crackTip = Vertices.Last.Value; adjacentVertex = Vertices.Last.Previous.Value; } else { throw new ArgumentException("Tip position can be either start or end"); } var polygon = ConvexPolygon2D.CreateUnsafe(element.Nodes); PolygonPointPosition relativeTipPos = polygon.FindRelativePositionOfPoint(crackTip); if (relativeTipPos == PolygonPointPosition.Inside || relativeTipPos == PolygonPointPosition.OnEdge || relativeTipPos == PolygonPointPosition.OnVertex) { PolygonPointPosition previousVertexPos = polygon.FindRelativePositionOfPoint(adjacentVertex); if (previousVertexPos == PolygonPointPosition.Inside) { throw new NotImplementedException("Problem with blending elements, if the tip element is also " + "enriched with Heaviside. What happens after the crack tip? Based on the LSM, the signed " + "distance of the blending element after the crack tip should have a positive and negative " + "region, however that element is not split by the crack and thus should not have " + "discontinuity in the displacement field"); //return ElementEnrichmentType.Both; } return(true); } return(false); }