artisynth.core.femmodels
Class FemUtilities

java.lang.Object
  extended by artisynth.core.femmodels.FemUtilities

public class FemUtilities
extends java.lang.Object

Provides some general utilities for FEM computations. Some of these involve the B matrix formed from the shape function gradient dNdx. If this gradient is represented as g, and if the stress tensor is represented with the vector

   sigma = [ sxx syy szz sxy syz sxz ]
 
then the B matrix takes the form
      [ gx  0  0 ]           00 11 22 01 12 02
      [  0 gy  0 ]
      [  0  0 gz ]     T   [ gx  0  0 gy  0 gz ]
  B = [ gy gx  0 ]    B  = [  0 gy  0 gx gz  0 ]
      [  0 gz gy ]         [  0  0 gz  0 gy gx ]
      [ gz  0 gx ]
 


Constructor Summary
FemUtilities()
           
 
Method Summary
static void addDilationalStiffness(Matrix3d K, double[] Kp, MatrixBlock GT_i, MatrixBlock GT_j)
          Adds dilational stiffness to the node-to-node stiffness matrix Kij.
static void addDilationalStiffness(Matrix3d K, double kp, Vector3d intGi, Vector3d intGj)
          Adds dilational stiffness to the node-to-node stiffness matrix Kij.
static void addDilationalStiffness(Matrix3d K, MatrixNd Rinv, MatrixBlock GT_i, MatrixBlock GT_j)
          Adds dilational stiffness to the node-to-node stiffness matrix Kij.
static void addIncompressibilityStiffness(Matrix3d K, double s, Vector3d intGi, Vector3d intGj)
          Adds stiffness for the incompressibility constraint to the node-to-node stiffness matrix Kij.
static void addMaterialStiffness(Matrix3d K, Vector3d gi, double E, double nu, Vector3d gj, double dv)
          Adds a weighted node-to-node stiffness to the matrix Kij via the formula
static void addMaterialStiffness(Matrix3d K, Vector3d gi, Matrix6d D, SymmetricMatrix3d sig, Vector3d gj, double dv)
          Adds a weighted node-to-node stiffness to the matrix Kij via the formula
static void addPressureStiffness(Matrix3d K, Vector3d gi, double p, Vector3d gj, double dv)
          Adds pressure stiffness to the matrix Kij via the formula
static void addStressForce(Vector3d f, Vector3d g, SymmetricMatrix3d sig, double dv)
          Adds the force on a node resulting from a given stress and shape function gradient g.
static void addToIncompressConstraints(MatrixBlock blk, double[] H, Vector3d GNx, double dv)
          Adds H^T GNx dv to a matrix block, where H is a row vector of weight values, and dv is a volume differential.
static FemNode3d[][] triangulate6NodeFace(FaceNodes3d face)
           
static FemNode3d[][] triangulate8NodeFace(FaceNodes3d face)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FemUtilities

public FemUtilities()
Method Detail

addStressForce

public static void addStressForce(Vector3d f,
                                  Vector3d g,
                                  SymmetricMatrix3d sig,
                                  double dv)
Adds the force on a node resulting from a given stress and shape function gradient g. This is done by computing f = B^T sig, where B is the matrix formed from the shape function gradient.


addMaterialStiffness

public static void addMaterialStiffness(Matrix3d K,
                                        Vector3d gi,
                                        Matrix6d D,
                                        SymmetricMatrix3d sig,
                                        Vector3d gj,
                                        double dv)
Adds a weighted node-to-node stiffness to the matrix Kij via the formula
  Kij = Bi^T D Bj + (gi^T sig gj) I
 
where gi and gj are the gradients for shape functions i and j, Bi and Bj are the B matrices formed from gi and gj, D is the derivative of the constitutive relationship, and dv is the weighting term.


addMaterialStiffness

public static void addMaterialStiffness(Matrix3d K,
                                        Vector3d gi,
                                        double E,
                                        double nu,
                                        Vector3d gj,
                                        double dv)
Adds a weighted node-to-node stiffness to the matrix Kij via the formula
  Kij = Bi^T D Bj dv
 
where gi and gj are the gradients for shape functions i and j, Bi and Bj are the B matrices formed from gi and gj, D is the linear stiffness relationship associated with Youngs modulus E and Poissons ratio nu, and dv is the weighting term.


addPressureStiffness

public static void addPressureStiffness(Matrix3d K,
                                        Vector3d gi,
                                        double p,
                                        Vector3d gj,
                                        double dv)
Adds pressure stiffness to the matrix Kij via the formula
  Kij = Bi^T D Bj
 
where gi and gj are the gradients for shape functions i and j, Bi and Bj are the B matrices formed from gi and gj, and D is created from the pressure p according to D_ii = -p and D_ij = p for i != j and i, j < 3.


addDilationalStiffness

public static void addDilationalStiffness(Matrix3d K,
                                          double kp,
                                          Vector3d intGi,
                                          Vector3d intGj)
Adds dilational stiffness to the node-to-node stiffness matrix Kij. This is calculated via the formula
  Kij += kp (intGi intGj^T)
 
where intGi and intGj are the integrals (over the element) of the gradients for shape functions i and j, and kp is (typically) the bulkModulus divided by the restVolume.


addDilationalStiffness

public static void addDilationalStiffness(Matrix3d K,
                                          double[] Kp,
                                          MatrixBlock GT_i,
                                          MatrixBlock GT_j)
Adds dilational stiffness to the node-to-node stiffness matrix Kij. This is calculated via the formula
  Kij += GT_i Kp GT_j^T
 
where GT_i and GT_j are the incompressibility constraints for nodes i and j and Kp is a diagonal matrix of stiffness pressures.


addDilationalStiffness

public static void addDilationalStiffness(Matrix3d K,
                                          MatrixNd Rinv,
                                          MatrixBlock GT_i,
                                          MatrixBlock GT_j)
Adds dilational stiffness to the node-to-node stiffness matrix Kij. This is calculated via the formula
  Kij += GT_i Rinv GT_j^T
 
where GT_i and GT_j are the incompressibility constraints for nodes i and j and Kp is a diagonal matrix of stiffness pressures.


addIncompressibilityStiffness

public static void addIncompressibilityStiffness(Matrix3d K,
                                                 double s,
                                                 Vector3d intGi,
                                                 Vector3d intGj)
Adds stiffness for the incompressibility constraint to the node-to-node stiffness matrix Kij. This is calculated via the formula
  Kij += kp (intGi intGj^T - intGj intGi^T)
 
where intGi and intGj are the integrals (over the element) of the gradients for shape functions i and j, and s is (typically) the determinant of F times the current pressure.


addToIncompressConstraints

public static void addToIncompressConstraints(MatrixBlock blk,
                                              double[] H,
                                              Vector3d GNx,
                                              double dv)
Adds H^T GNx dv to a matrix block, where H is a row vector of weight values, and dv is a volume differential. It is assumed that the matrix block has a row size of 3.


triangulate8NodeFace

public static FemNode3d[][] triangulate8NodeFace(FaceNodes3d face)

triangulate6NodeFace

public static FemNode3d[][] triangulate6NodeFace(FaceNodes3d face)