**compute_predefined_levelset#

Description#

This command is used to generate levelsets (scalar field given at nodes of the FE mesh) defining cracks with classical geometries in an xfem analysis.

In this case the discontinuity is described by 2 levelsets \(\phi\) and \(\psi\), where (see figure):

  • \(\phi\) is the signed distance of a node to the crack plane,

  • \(\psi\) is signed the distance to the crack front of the orthogonal projection of a node on the crack plane.

such that points for which \(\phi=\psi=0\) are located on the crack front, and positive \(\psi\) values correspond to nodes ahead of the front.

../../_images/levelset.svg

Syntax#

**compute_predefined_levelset \(~\,\) *type (circular``|``elliptic``|``line) \(~\,\) [ *rho radius ] \(~\,\) *center c \(~\,\) *normal (n) \(~\,\) [ *rho2 minor_radius ] \(~\,\) [ *direction (d) ] \(~\,\) [ *do_fem_output ] \(~\,\) [ *elset_name name ] \(~\,\) [ *elset_distance dist ] \(~\,\) [ *phi_name phi_file ] \(~\,\) [ *psi_name psi_file ]

*type

is used to specify the crack geometry (predefined types available are: circular, elliptic, line),

radius

is the radius (circular cracks) or the major radius value (elliptic cracks). It has no effect for line cracks.

(c)

is a vector defining the position of the center for circular or elliptic cracks. In the case of line cracks, the coordinates of a point on the crack front is expected.

(n)

is a vector defining the normal to the crack plane (see figure above),

rho2

is needed to specify the minor radius value for elliptic cracks.

*direction

defines a vector (d) whose meaning is the following, depending on the particular geometry:

  • the direction of the minor axis for an elliptic crack. Note that in this case (d) is expected to be orthogonal to (n) (otherwise an error occurs).

  • a vector parallel to the crack front for line cracks. The sign of this vector also defines the crack propagation direction in this case, as described on the following figure: \(\psi>0\) is

    obtained in direction (t) = (d) \(\wedge\) (n)

../../_images/line_crack.svg
*do_fem_output

allows the generation of FE results with \((\phi,\psi)\) values calculated on nodes of the input mesh (see the example for the iso-contours generated).

*elset_name

creates an elset (with name ename) containing elements situated within a distance of less than dist from the crack front.

*phi_name and *psi_name

allows to redefine the names of the output ASCII files used to store the levelset values on the mesh nodes (default names are “phi.dat” and “psi.dat”). Those files are used to define the discontinuity by the ***xfem_crack_mode command.

Example#

**compute_predefined_levelset
 *type circular
 *center (1.0 0.5 0.5)
 *normal (0. 0. 1.0)
 *rho 0.2
 *do_fem_output
../../_images/phi.svg

Fig. 5 \(\phi:\) distance to the crack plane#

../../_images/psi.svg

Fig. 6 \(\psi:\) distance to the crack front#