Difference between revisions of "3D Cracks"

From OSUPDOCS
Jump to navigation Jump to search
Line 70: Line 70:


* <tt>(length)</tt> - the triangular facets defined above are subdivided into smaller triangular facets with maximum edge length given by this parameter. This length should be smaller than a grid cell, such as half a grid cell.
* <tt>(length)</tt> - the triangular facets defined above are subdivided into smaller triangular facets with maximum edge length given by this parameter. This length should be smaller than a grid cell, such as half a grid cell.
* <tt>(czm)</tt> (or <tt>(czmname)</tt>) - all facets created can optionally be assigned a [[Traction Laws|traction law]]. Scripted files choose the law by material ID. XML files must use material number.
* <tt>(czm)</tt> (or <tt>(czmname)</tt>) - all facets created can optionally be assigned a [[Traction Laws|traction law]]. Scripted files choose the law by material ID. In XML files, you specify an optional [[Traction Laws|traction law]] by number in <tt>(czm)</tt> or by name in <tt>(czmname)</tt>. If both are used, the name takes precedence.


Some notes on defining 3D cracks as as follows:
Some notes on defining 3D cracks as as follows:


# Crack mesh may deviate from the entered <tt>(length)</tt> to get better proportioned elements.
# Crack meshes may deviate from the entered <tt>(length)</tt> to get better proportioned elements.
# Crack meshes work best if facets are similarly sized or to control resolution best, start with the largest ones.
# Crack meshes work best if defined facets are similarly sized. If different sizes facets are used, it is best to start with the largest ones.
# The code to optimize cracks works best if each new facet has two new edges. If needed, a facet with only one new edge is allowed. Except for the first facet, new added should have three new edges
# The code to optimize cracks works best if each new facet has two new edges. If needed, a facet with only one new edge is allowed. Except for the first facet, added facets should have three new edges
# The crack mesh must use all defined keypoints. An error occurs if any are left unused.
# The crack mesh must use all defined key points. An error occurs if any are left unused.
# No edge connecting two keypoints can be used in more than two facets (''i.e.'', an edge can only be in two facets).
# No edge connecting two key points can be used in more than two facets (''i.e.'', an edge can only be shared by two facets).
# In XML files, each <tt><CrackList></tt> block can have only one <tt><Mesh></tt> block.


=== Meshing Algorithm ===


The subordinate elements to the `Mesh` command define crack points on the crack surface (in the `NodeList` block) and connects those points with triangular elements (in the `ElementList` block). The three points in each `elem` command refer to three points by number in the `NodeList` (numbers are assigned automatically starting with 1).
The following steps outline the algorithm for dividing each facet into subfacets:


if czm is provided it is traction law applied to each segment in the meshed area. In direct XML, czmname='name' can be used instead,
# Check if edges of each new facet were in a previous facet. If yes, use the intervals from the previous facet. If it was used in two previous facets, an error occurs.
 
# For new edges, use following steps to divide into intervals for smaller facets:
If length is provided, the edges of the element are divided up into more segments and the element is meshed into subelements as follows. First create edge objects by
#* The preferred number is <tt>int(length/edgeLength)+1</tt>.
 
#* If all edges are new, find the pair (0-1) or (1-2) that are closest and match other to 0 or 1. May downgrade resolution of 0 if 1-2 pair is used.
# Searching for existing edges, use if found, but edge used a third time is an error
# Decide on number of intervals for new edges
#* Preferred number is int(length/segLength)+1. Perhaps add a preference to keep them all the same.
#* If all new- find the pair (0-1) or (1-2) that are close and match other to 0 or 1. My downgrade resolution of 0 is 1-2 pair is used.
#* If one was existing - match other two to it
#* If one was existing - match other two to it
#* If two existing - match new one to an existing edge. This case may not get all edges with the same number of inrtervalis
#* If two existing - match new one to an existing edge. This case may not get all edges with the same number of intervals
#* If three present look for two matching and use. If all differ an error. Note that can be fixed by defining triangles in order that does not surround any area.
#* If three present look for two matching and use. If all differ an error. Note that can be fixed by defining triangles in order that does not surround any area.


New class for edge that will store start and end segment and sequence of interior segments. It will also count number of times the edge is used in the mesh
The meshing process is then:
 
Meshing:


# Create segments along any new edges
# Create segments along any new edges
Line 105: Line 101:
#* Create triangle strip of facets under that line, but if n-1<=0, just divide into two facets
#* Create triangle strip of facets under that line, but if n-1<=0, just divide into two facets
# When done, if n-s>0, connect each one to tip of the triangle
# When done, if n-s>0, connect each one to tip of the triangle
 
# Cause an error if any crack points were not connected to the crack (because their index is needed)
When crack is done, throw an error if any crack points were not connected to the crack (because their index is needed)

Revision as of 23:04, 28 January 2022

3D cracks are currently in development and available only in OSParticulas. This page explains how to add them to 3D MPM simulations.

Introduction

3D cracks are defined by a collection of triangular facets. The corners and located using crack key points. Each facet can option input a traction law.

Planar Crack Definition

If the crack has a parallelogram shape, you can define with a few commands. In scripted files, the commands are:

NewCrack (x0),(y0),(z0),(k0)
CrackKeypoint (x1),(y1),(z1),(k1)
CrackKeypoint (x2),(y2),(z2),(k2)
CrackPlane (k0),(k1),(k2),(length),(czmID)

In XML files, a parallelogram crack is defined with one command in a <CrackList> element:

<CrackList>
  <Plane V0x='(x0)' V0y='(y0)' V0z='(z0)' V1x='(x1)' V1y='(y1)' V1z='(z1)'
         V2x='(x2)' V2y='(y2)' V2z='(z2)' length='(length)' mat='(czmnum)' matname='(czmname)'></Plane>
</CrackList>

where

  • (xn),(yn),(zn) - for n = 0, 1, and 2 defines three points and (kn) in scripted files are key point labels (which have to be unique). The defined crack will be parallelogram with edges along point 0 to 1 and along point 0 to 2.
  • (length) - is preferred maximum length for facet edges. The parallelogram is divided into triangular facets with the maximum facet edge length given by this parameter. Typically this value should be smaller than a grid cell, such as half of a grid cell.
  • (czmID) - is optional traction law material ID to add a traction law to the entire crack plane. Scripted files can use the material ID.
  • (czmnum) or tt>(czmname) - in XML files, you specify an optional traction law by number or name. If both are used, the name takes precedence.

General 3D Crack Definition

In scripting software, arbitrary crack surfaces a constructed from a series of connected triangular facets. The defining commands are:

NewCrack (x),(y),(z),(id)
CrackKeypoint (x),(y),(z),(id)
   ...
CrackFacet (id1),(id2),(id3),(length),(czm)
   ...

In XML files, an arbitrary cracks is defined with a <Mesh> block:

<CrackList>
  <Mesh>
    <NodeList>
      <pt x='(x)' y='(y)' z='(z)'/>
      <pt x='(x)' y='(y)' z='(z)'/>
        ...
    </NodeList>
    <ElementList>
      <elem type='1' length='(length)' czm='(czm)' czmname='(czmname)'>(nd1),(nd2),(nd3)</elem>
        ...
    </ElementList>
  </Mesh>
</CrackList>

Both the above methods define a collection of crack points or nodes on the crack with coordinates ((x),(y),(z)). In scripts files, each key point is assigned and (id) when can be any string. In XML files, key points are numbered starting at 1 by order in the <NodeList> block.

Once the key points are defined, they are connected by triangular facets. Scripted files use CrackFacet commands where (id1),(id2),(id3) specify three key points using their IDs. XML files use <elem> commands where (nd1),(nd2),(nd3) specify three key points by number in the <NodeList> block. The two remaining parameters are:

  • (length) - the triangular facets defined above are subdivided into smaller triangular facets with maximum edge length given by this parameter. This length should be smaller than a grid cell, such as half a grid cell.
  • (czm) (or (czmname)) - all facets created can optionally be assigned a traction law. Scripted files choose the law by material ID. In XML files, you specify an optional traction law by number in (czm) or by name in (czmname). If both are used, the name takes precedence.

Some notes on defining 3D cracks as as follows:

  1. Crack meshes may deviate from the entered (length) to get better proportioned elements.
  2. Crack meshes work best if defined facets are similarly sized. If different sizes facets are used, it is best to start with the largest ones.
  3. The code to optimize cracks works best if each new facet has two new edges. If needed, a facet with only one new edge is allowed. Except for the first facet, added facets should have three new edges
  4. The crack mesh must use all defined key points. An error occurs if any are left unused.
  5. No edge connecting two key points can be used in more than two facets (i.e., an edge can only be shared by two facets).
  6. In XML files, each <CrackList> block can have only one <Mesh> block.

Meshing Algorithm

The following steps outline the algorithm for dividing each facet into subfacets:

  1. Check if edges of each new facet were in a previous facet. If yes, use the intervals from the previous facet. If it was used in two previous facets, an error occurs.
  2. For new edges, use following steps to divide into intervals for smaller facets:
    • The preferred number is int(length/edgeLength)+1.
    • If all edges are new, find the pair (0-1) or (1-2) that are closest and match other to 0 or 1. May downgrade resolution of 0 if 1-2 pair is used.
    • If one was existing - match other two to it
    • If two existing - match new one to an existing edge. This case may not get all edges with the same number of intervals
    • If three present look for two matching and use. If all differ an error. Note that can be fixed by defining triangles in order that does not surround any area.

The meshing process is then:

  1. Create segments along any new edges
  2. Set segments of each edge as no in the crack and if czmID>0 set its traction law
  3. Start with edge having unique number of internal segments (or same if all the same), call it n. Let s be number of internal segments with equal intervals, then loop for i from 1 to s
    • Create n-i segments along line connect segment i of each edge
    • Create triangle strip of facets under that line, but if n-1<=0, just divide into two facets
  4. When done, if n-s>0, connect each one to tip of the triangle
  5. Cause an error if any crack points were not connected to the crack (because their index is needed)