Back

HexahedralFEMForceField

The `HexahedralFEMForceField` is a specialized force field component in SOFA's solid mechanics module, designed to compute finite element forces based on hexahedral elements (cubes). It inherits from the `BaseLinearElasticityFEMForceField`, which provides foundational linear elasticity functionality. This component is primarily used for simulating soft tissue biomechanics through corotational formulations, as described in a 2005 paper by Nesme et al. on interactive simulations of biological tissues. The force field operates with two main methods: large displacements and polar decomposition, selectable via the `method` data field. The large displacement method accounts for significant deformations beyond small rotation approximations, while the polar decomposition method provides a more geometrically accurate representation by decomposing deformations into rotations and stretches. The `HexahedralFEMForceField` interacts with other SOFA components through its API methods like `addForce`, `addDForce`, and others which are part of core mechanical operations. It requires topology information to define hexahedron elements and calculates forces based on the current state of these elements. The component is configured using various data fields, such as `d_method` for specifying the method (large or polar), and internal structures like `d_hexahedronInfo` that store per-element stiffness matrices and other precomputed values. The initialization process (`init`, `reinit`) sets up these internal structures based on the topology of the hexahedrons defined in the scene. For practical usage, one needs to specify the method for computing forces (either "large" or "polar") and ensure that a proper topology with hexahedral elements is provided. The component then integrates seamlessly into SOFA's force computation pipelines, contributing to overall mechanical behavior of simulated objects.

abstract
The `HexahedralFEMForceField` computes finite element forces based on hexahedral elements using corotational formulations for large displacements or polar decomposition methods. It inherits from `BaseLinearElasticityFEMForceField`, providing linear elasticity functionality.
sheet
# HexahedralFEMForceField ## Overview The `HexahedralFEMForceField` is a specialized force field component in SOFA's solid mechanics module, designed to compute finite element forces based on hexahedral elements. It inherits from the `BaseLinearElasticityFEMForceField`, providing foundational linear elasticity functionality. This component supports both large displacement and polar decomposition methods for accurate biomechanical simulations. ## Mathematical Model The `HexahedralFEMForceField` computes finite element forces based on hexahedral elements using corotational formulations or polar decomposition methods. The primary operators it contributes to include: - **Internal Force Vector**: \( f_{int} \) - **Stiffness Matrix**: \( K_e \) (element stiffness matrix) ### Constitutive and Kinematic Laws Involved 1. **Material Stiffness**: - The material stiffness tensor is computed using Young's modulus \( E \) and Poisson's ratio \( u \). - The elastic moduli are given by the constitutive equation for linear elasticity, with the stiffness matrix \( M \): \[ M = \frac{E}{1- u^2} \begin{bmatrix} 1 & \nu & \nu & 0 & 0 & 0 \\ \nu & 1 & \nu & 0 & 0 & 0 \\ \nu & \nu & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & (1- u)/2 & 0 & 0 \\ 0 & 0 & 0 & 0 & (1- u)/2 & 0 \\ 0 & 0 & 0 & 0 & 0 & (1- u)/2 \end{bmatrix} \] - This stiffness matrix is used to calculate the element stiffness matrix \( K_e \) through integration over the hexahedron volume. 2. **Strain Measures**: - The strain measures are derived from nodal displacements and Jacobian matrices for each hexahedron. 3. **Stress Tensors**: - Stress tensors are computed as \( oldsymbol{ au} = M : oldsymbol{ abla u} \), where \( oldsymbol{u} \) is the displacement vector and \( M \) is the material stiffness matrix. 4. **Strain Measures**: - The strain measures are computed using the deformation gradient \( F = I + abla u \). ### Role in the Global FEM Pipeline 1. **Assembly**: - Computes per-element stiffness matrices and internal forces based on nodal displacements. - Stiffness matrix contributions from individual hexahedra are assembled into a global stiffness matrix using connectivity information. - Internal force contributions are added to the global residual vector during assembly. 2. **Time Integration**: - Implements implicit time integration schemes, such as Backward Euler, where internal forces and stiffness matrices are computed at each timestep. 3. **Nonlinear Solve**: - Participates in nonlinear iterations by computing tangent stiffness matrices \( K_e \) during the Newton-Raphson method. 4. **Linear Solve**: - Contributes to the linear system solve, where global stiffness matrix and residual vector are used to compute nodal displacements. ### Numerical Methods or Discretization Choices 1. **Hexahedral Elements**: - Uses hexahedral (cubic) elements for spatial discretization, with 8 vertices per element. 2. **Quadrature and Integration**: - Utilizes numerical integration over the volume of each hexahedron to compute stiffness matrices and internal forces. - The integration process accounts for large deformations through corotational formulations. 3. **Corotational Formulation**: - Decomposes deformation into rigid rotations and stretches, enabling accurate modeling of large displacements. ### Variational / Lagrangian Mechanics Framework Fit 1. **Weak Form Discretization**: - The weak form is discretized by integrating over hexahedral volumes to compute element stiffness matrices and internal forces. 2. **Variational Principle**: - Implements the principle of virtual work, where internal virtual work due to stresses equals external virtual work due to applied forces. 3. **Lagrangian Mechanics**: - Fits into a Lagrangian mechanics framework by computing generalized coordinates and their derivatives for nodal displacements and velocities. ## Parameters and Data The `HexahedralFEMForceField` does not expose any significant data fields, as it inherits most of its parameters from the parent class. However, it supports two methods for force computation: - **Large Displacement Method**: Accounts for significant deformations beyond small rotation approximations. - **Polar Decomposition Method**: Provides a more geometrically accurate representation by decomposing deformations into rotations and stretches. ## Dependencies and Connections The `HexahedralFEMForceField` requires topology information to define hexahedron elements. It interacts with other SOFA components through its API methods like `addForce`, `addDForce`, and others, which are part of core mechanical operations. ## Practical Notes - Ensure that a proper topology with hexahedral elements is provided for accurate force computation. - The component integrates seamlessly into SOFA's force computation pipelines, contributing to the overall mechanical behavior of simulated objects.
description
The `HexahedralFEMForceField` is a specialized force field component in SOFA's solid mechanics module, designed to compute finite element forces based on hexahedral elements (cubes). It inherits from the `BaseLinearElasticityFEMForceField`, which provides foundational linear elasticity functionality. This component is primarily used for simulating soft tissue biomechanics through corotational formulations, as described in a 2005 paper by Nesme et al. on interactive simulations of biological tissues. The force field operates with two main methods: large displacements and polar decomposition, selectable via the `method` data field. The large displacement method accounts for significant deformations beyond small rotation approximations, while the polar decomposition method provides a more geometrically accurate representation by decomposing deformations into rotations and stretches. The `HexahedralFEMForceField` interacts with other SOFA components through its API methods like `addForce`, `addDForce`, and others which are part of core mechanical operations. It requires topology information to define hexahedron elements and calculates forces based on the current state of these elements. The component is configured using various data fields, such as `d_method` for specifying the method (large or polar), and internal structures like `d_hexahedronInfo` that store per-element stiffness matrices and other precomputed values. The initialization process (`init`, `reinit`) sets up these internal structures based on the topology of the hexahedrons defined in the scene. For practical usage, one needs to specify the method for computing forces (either "large" or "polar") and ensure that a proper topology with hexahedral elements is provided. The component then integrates seamlessly into SOFA's force computation pipelines, contributing to overall mechanical behavior of simulated objects.
maths
### Mathematical and Physical Description of `HexahedralFEMForceField` #### Governing Equations and Operators The `HexahedralFEMForceField` computes finite element forces based on hexahedral elements. The primary operators it contributes to include: - **Internal Force Vector**: \( f_{int} \) - **Stiffness Matrix**: \( K_e \) (element stiffness matrix) #### Constitutive and Kinematic Laws Involved 1. **Material Stiffness**: - The material stiffness tensor is computed using Young's modulus \( E \) and Poisson's ratio \( u \). - The elastic moduli are given by the constitutive equation for linear elasticity, with the stiffness matrix \( M \): \[ M = \frac{E}{1-\nu^2} \begin{bmatrix} 1 & \nu & \nu & 0 & 0 & 0 \\ \nu & 1 & \nu & 0 & 0 & 0 \\ \nu & \nu & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & (1-\nu)/2 & 0 & 0 \\ 0 & 0 & 0 & 0 & (1-\nu)/2 & 0 \\ 0 & 0 & 0 & 0 & 0 & (1-\nu)/2 \end{bmatrix} \] - This stiffness matrix is used to calculate the element stiffness matrix \( K_e \) through integration over the hexahedron volume. 2. **Strain Measures**: - The strain measures are derived from nodal displacements and Jacobian matrices for each hexahedron. 3. **Stress Tensors**: - Stress tensors are computed as \( oldsymbol{ au} = M : oldsymbol{ abla u} \), where \( oldsymbol{u} \) is the displacement vector and \( M \) is the material stiffness matrix. 4. **Strain Measures**: - The strain measures are computed using the deformation gradient \( F = I + \nabla u \). #### Role in the Global FEM Pipeline 1. **Assembly**: - Computes per-element stiffness matrices and internal forces based on nodal displacements. - Stiffness matrix contributions from individual hexahedra are assembled into a global stiffness matrix using connectivity information. - Internal force contributions are added to the global residual vector during assembly. 2. **Time Integration**: - Implements implicit time integration schemes, such as Backward Euler, where internal forces and stiffness matrices are computed at each timestep. 3. **Nonlinear Solve**: - Participates in nonlinear iterations by computing tangent stiffness matrices \( K_e \) during the Newton-Raphson method. 4. **Linear Solve**: - Contributes to the linear system solve, where global stiffness matrix and residual vector are used to compute nodal displacements. #### Numerical Methods or Discretization Choices 1. **Hexahedral Elements**: - Uses hexahedral (cubic) elements for spatial discretization, with 8 vertices per element. 2. **Quadrature and Integration**: - Utilizes numerical integration over the volume of each hexahedron to compute stiffness matrices and internal forces. - The integration process accounts for large deformations through corotational formulations. 3. **Corotational Formulation**: - Decomposes deformation into rigid rotations and stretches, enabling accurate modeling of large displacements. #### Variational / Lagrangian Mechanics Framework Fit 1. **Weak Form Discretization**: - The weak form is discretized by integrating over hexahedral volumes to compute element stiffness matrices and internal forces. 2. **Variational Principle**: - Implements the principle of virtual work, where internal virtual work due to stresses equals external virtual work due to applied forces. 3. **Lagrangian Mechanics**: - Fits into a Lagrangian mechanics framework by computing generalized coordinates and their derivatives for nodal displacements and velocities. ### Summary The `HexahedralFEMForceField` is designed to handle finite element simulations using hexahedral elements, with robust support for both large displacement and polar decomposition formulations. It integrates seamlessly into SOFA's simulation pipeline by contributing stiffness matrices and internal forces that are assembled and solved within the global FEM framework.
{
  "name": "HexahedralFEMForceField",
  "main": {
    "name": "HexahedralFEMForceField",
    "namespace": "sofa::component::solidmechanics::fem::elastic",
    "module": "Sofa.Component.SolidMechanics.FEM.Elastic",
    "include": "sofa/component/solidmechanics/fem/elastic/HexahedralFEMForceField.h",
    "doc": "Hexahedral finite elements.\n\nCompute Finite Element forces based on hexahedral elements.\nCorotational hexahedron from\n@Article{NMPCPF05,\n  author       = \"Nesme, Matthieu and Marchal, Maud and Promayon, Emmanuel and Chabanas, Matthieu and Payan, Yohan and Faure, Fran\\c{c}ois\",\n  title        = \"Physically Realistic Interactive Simulation for Biological Soft Tissues\",\n  journal      = \"Recent Research Developments in Biomechanics\",\n  volume       = \"2\",\n  year         = \"2005\",\n  keywords     = \"surgical simulation physical animation truth cube\",\n  url          = \"http://www-evasion.imag.fr/Publications/2005/NMPCPF05\"\n}\nindices ordering (same as in HexahedronSetTopology):\n    Y  7---------6\n    ^ /         /|\n    |/    Z    / |\n    3----^----2  |\n    |   /     |  |\n    |  4------|--5\n    | /       | /\n    |/        |/\n    0---------1-->X",
    "inherits": [
      "BaseLinearElasticityFEMForceField"
    ],
    "templates": [
      "sofa::defaulttype::Vec3Types"
    ],
    "data_fields": [],
    "links": [],
    "methods": [
      {
        "name": "setMethod",
        "return_type": "void",
        "params": [
          {
            "name": "val",
            "type": "int"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "init",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "reinit",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "addForce",
        "return_type": "void",
        "params": [
          {
            "name": "mparams",
            "type": "const core::MechanicalParams *"
          },
          {
            "name": "f",
            "type": "DataVecDeriv &"
          },
          {
            "name": "x",
            "type": "const DataVecCoord &"
          },
          {
            "name": "v",
            "type": "const DataVecDeriv &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "addDForce",
        "return_type": "void",
        "params": [
          {
            "name": "mparams",
            "type": "const core::MechanicalParams *"
          },
          {
            "name": "df",
            "type": "DataVecDeriv &"
          },
          {
            "name": "dx",
            "type": "const DataVecDeriv &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getPotentialEnergy",
        "return_type": "SReal",
        "params": [
          {
            "name": "",
            "type": "const core::MechanicalParams *"
          },
          {
            "name": "",
            "type": "const DataVecCoord &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "addKToMatrix",
        "return_type": "void",
        "params": [
          {
            "name": "matrix",
            "type": "sofa::linearalgebra::BaseMatrix *"
          },
          {
            "name": "kFact",
            "type": "SReal"
          },
          {
            "name": "offset",
            "type": "unsigned int &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "buildStiffnessMatrix",
        "return_type": "void",
        "params": [
          {
            "name": "matrix",
            "type": "core::behavior::StiffnessMatrix *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "buildDampingMatrix",
        "return_type": "void",
        "params": [
          {
            "name": "",
            "type": "core::behavior::DampingMatrix *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "draw",
        "return_type": "void",
        "params": [
          {
            "name": "vparams",
            "type": "const core::visual::VisualParams *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "computeElementStiffness",
        "return_type": "void",
        "params": [
          {
            "name": "K",
            "type": "ElementStiffness &"
          },
          {
            "name": "M",
            "type": "const MaterialStiffness &"
          },
          {
            "name": "nodes",
            "type": "const type::Vec<8, Coord> &"
          }
        ],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "integrateStiffness",
        "return_type": "Mat33",
        "params": [
          {
            "name": "signx0",
            "type": "int"
          },
          {
            "name": "signy0",
            "type": "int"
          },
          {
            "name": "signz0",
            "type": "int"
          },
          {
            "name": "signx1",
            "type": "int"
          },
          {
            "name": "signy1",
            "type": "int"
          },
          {
            "name": "signz1",
            "type": "int"
          },
          {
            "name": "u",
            "type": "const Real"
          },
          {
            "name": "v",
            "type": "const Real"
          },
          {
            "name": "w",
            "type": "const Real"
          },
          {
            "name": "J_1",
            "type": "const Mat33 &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "computeMaterialStiffness",
        "return_type": "void",
        "params": [
          {
            "name": "m",
            "type": "MaterialStiffness &"
          },
          {
            "name": "youngModulus",
            "type": "double"
          },
          {
            "name": "poissonRatio",
            "type": "double"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "computeForce",
        "return_type": "void",
        "params": [
          {
            "name": "F",
            "type": "Displacement &"
          },
          {
            "name": "Depl",
            "type": "const Displacement &"
          },
          {
            "name": "K",
            "type": "const ElementStiffness &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "initLarge",
        "return_type": "void",
        "params": [
          {
            "name": "i",
            "type": "const int"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "computeRotationLarge",
        "return_type": "void",
        "params": [
          {
            "name": "r",
            "type": "Transformation &"
          },
          {
            "name": "edgex",
            "type": "Coord &"
          },
          {
            "name": "edgey",
            "type": "Coord &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "accumulateForceLarge",
        "return_type": "void",
        "params": [
          {
            "name": "f",
            "type": "WDataRefVecDeriv &"
          },
          {
            "name": "p",
            "type": "RDataRefVecCoord &"
          },
          {
            "name": "i",
            "type": "const int"
          }
        ],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "initPolar",
        "return_type": "void",
        "params": [
          {
            "name": "i",
            "type": "const int"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "computeRotationPolar",
        "return_type": "void",
        "params": [
          {
            "name": "r",
            "type": "Transformation &"
          },
          {
            "name": "nodes",
            "type": "type::Vec<8, Coord> &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "accumulateForcePolar",
        "return_type": "void",
        "params": [
          {
            "name": "f",
            "type": "WDataRefVecDeriv &"
          },
          {
            "name": "p",
            "type": "RDataRefVecCoord &"
          },
          {
            "name": "i",
            "type": "const int"
          }
        ],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "createHexahedronInformation",
        "return_type": "void",
        "params": [
          {
            "name": "",
            "type": "Index"
          },
          {
            "name": "t",
            "type": "HexahedronInformation &"
          },
          {
            "name": "",
            "type": "const core::topology::BaseMeshTopology::Hexahedron &"
          },
          {
            "name": "",
            "type": "const int &"
          },
          {
            "name": "",
            "type": "const int &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      }
    ]
  },
  "desc": {
    "description": "The `HexahedralFEMForceField` is a specialized force field component in SOFA's solid mechanics module, designed to compute finite element forces based on hexahedral elements (cubes). It inherits from the `BaseLinearElasticityFEMForceField`, which provides foundational linear elasticity functionality. This component is primarily used for simulating soft tissue biomechanics through corotational formulations, as described in a 2005 paper by Nesme et al. on interactive simulations of biological tissues.\n\nThe force field operates with two main methods: large displacements and polar decomposition, selectable via the `method` data field. The large displacement method accounts for significant deformations beyond small rotation approximations, while the polar decomposition method provides a more geometrically accurate representation by decomposing deformations into rotations and stretches.\n\nThe `HexahedralFEMForceField` interacts with other SOFA components through its API methods like `addForce`, `addDForce`, and others which are part of core mechanical operations. It requires topology information to define hexahedron elements and calculates forces based on the current state of these elements.\n\nThe component is configured using various data fields, such as `d_method` for specifying the method (large or polar), and internal structures like `d_hexahedronInfo` that store per-element stiffness matrices and other precomputed values. The initialization process (`init`, `reinit`) sets up these internal structures based on the topology of the hexahedrons defined in the scene.\n\nFor practical usage, one needs to specify the method for computing forces (either \"large\" or \"polar\") and ensure that a proper topology with hexahedral elements is provided. The component then integrates seamlessly into SOFA's force computation pipelines, contributing to overall mechanical behavior of simulated objects."
  },
  "maths": {
    "maths": "### Mathematical and Physical Description of `HexahedralFEMForceField`\n\n#### Governing Equations and Operators\n\nThe `HexahedralFEMForceField` computes finite element forces based on hexahedral elements. The primary operators it contributes to include:\n- **Internal Force Vector**: \\( f_{int} \\)\n- **Stiffness Matrix**: \\( K_e \\) (element stiffness matrix)\n\n#### Constitutive and Kinematic Laws Involved\n\n1. **Material Stiffness**:\n   - The material stiffness tensor is computed using Young's modulus \\( E \\) and Poisson's ratio \\( \nu \\).\n   - The elastic moduli are given by the constitutive equation for linear elasticity, with the stiffness matrix \\( M \\):\n     \\[ M = \\frac{E}{1-\\nu^2} \\begin{bmatrix}\n     1 & \\nu & \\nu & 0 & 0 & 0 \\\\\n     \\nu & 1 & \\nu & 0 & 0 & 0 \\\\\n     \\nu & \\nu & 1 & 0 & 0 & 0 \\\\\n     0 & 0 & 0 & (1-\\nu)/2 & 0 & 0 \\\\\n     0 & 0 & 0 & 0 & (1-\\nu)/2 & 0 \\\\\n     0 & 0 & 0 & 0 & 0 & (1-\\nu)/2\n     \\end{bmatrix} \\]\n   - This stiffness matrix is used to calculate the element stiffness matrix \\( K_e \\) through integration over the hexahedron volume.\n\n2. **Strain Measures**:\n   - The strain measures are derived from nodal displacements and Jacobian matrices for each hexahedron.\n\n3. **Stress Tensors**:\n   - Stress tensors are computed as \\( \boldsymbol{\tau} = M : \boldsymbol{\nabla u} \\), where \\( \boldsymbol{u} \\) is the displacement vector and \\( M \\) is the material stiffness matrix.\n\n4. **Strain Measures**:\n   - The strain measures are computed using the deformation gradient \\( F = I + \\nabla u \\).\n\n#### Role in the Global FEM Pipeline\n\n1. **Assembly**:\n   - Computes per-element stiffness matrices and internal forces based on nodal displacements.\n   - Stiffness matrix contributions from individual hexahedra are assembled into a global stiffness matrix using connectivity information.\n   - Internal force contributions are added to the global residual vector during assembly.\n\n2. **Time Integration**:\n   - Implements implicit time integration schemes, such as Backward Euler, where internal forces and stiffness matrices are computed at each timestep.\n\n3. **Nonlinear Solve**:\n   - Participates in nonlinear iterations by computing tangent stiffness matrices \\( K_e \\) during the Newton-Raphson method.\n\n4. **Linear Solve**:\n   - Contributes to the linear system solve, where global stiffness matrix and residual vector are used to compute nodal displacements.\n\n#### Numerical Methods or Discretization Choices\n\n1. **Hexahedral Elements**:\n   - Uses hexahedral (cubic) elements for spatial discretization, with 8 vertices per element.\n\n2. **Quadrature and Integration**:\n   - Utilizes numerical integration over the volume of each hexahedron to compute stiffness matrices and internal forces.\n   - The integration process accounts for large deformations through corotational formulations.\n\n3. **Corotational Formulation**:\n   - Decomposes deformation into rigid rotations and stretches, enabling accurate modeling of large displacements.\n\n#### Variational / Lagrangian Mechanics Framework Fit\n\n1. **Weak Form Discretization**:\n   - The weak form is discretized by integrating over hexahedral volumes to compute element stiffness matrices and internal forces.\n\n2. **Variational Principle**:\n   - Implements the principle of virtual work, where internal virtual work due to stresses equals external virtual work due to applied forces.\n\n3. **Lagrangian Mechanics**:\n   - Fits into a Lagrangian mechanics framework by computing generalized coordinates and their derivatives for nodal displacements and velocities.\n\n### Summary\nThe `HexahedralFEMForceField` is designed to handle finite element simulations using hexahedral elements, with robust support for both large displacement and polar decomposition formulations. It integrates seamlessly into SOFA's simulation pipeline by contributing stiffness matrices and internal forces that are assembled and solved within the global FEM framework."
  },
  "summary": {
    "abstract": "The `HexahedralFEMForceField` computes finite element forces based on hexahedral elements using corotational formulations for large displacements or polar decomposition methods. It inherits from `BaseLinearElasticityFEMForceField`, providing linear elasticity functionality.",
    "sheet": "# HexahedralFEMForceField\n\n## Overview\nThe `HexahedralFEMForceField` is a specialized force field component in SOFA's solid mechanics module, designed to compute finite element forces based on hexahedral elements. It inherits from the `BaseLinearElasticityFEMForceField`, providing foundational linear elasticity functionality. This component supports both large displacement and polar decomposition methods for accurate biomechanical simulations.\n\n## Mathematical Model\nThe `HexahedralFEMForceField` computes finite element forces based on hexahedral elements using corotational formulations or polar decomposition methods. The primary operators it contributes to include:\n- **Internal Force Vector**: \\( f_{int} \\)\n- **Stiffness Matrix**: \\( K_e \\) (element stiffness matrix)\n\n### Constitutive and Kinematic Laws Involved\n1. **Material Stiffness**:\n   - The material stiffness tensor is computed using Young's modulus \\( E \\) and Poisson's ratio \\( \nu \\).\n   - The elastic moduli are given by the constitutive equation for linear elasticity, with the stiffness matrix \\( M \\):\n     \\[ M = \\frac{E}{1-\nu^2} \\begin{bmatrix}\n     1 & \\nu & \\nu & 0 & 0 & 0 \\\\\n     \\nu & 1 & \\nu & 0 & 0 & 0 \\\\\n     \\nu & \\nu & 1 & 0 & 0 & 0 \\\\\n     0 & 0 & 0 & (1-\nu)/2 & 0 & 0 \\\\\n     0 & 0 & 0 & 0 & (1-\nu)/2 & 0 \\\\\n     0 & 0 & 0 & 0 & 0 & (1-\nu)/2\n     \\end{bmatrix} \\]\n   - This stiffness matrix is used to calculate the element stiffness matrix \\( K_e \\) through integration over the hexahedron volume.\n\n2. **Strain Measures**:\n   - The strain measures are derived from nodal displacements and Jacobian matrices for each hexahedron.\n\n3. **Stress Tensors**:\n   - Stress tensors are computed as \\( \boldsymbol{\tau} = M : \boldsymbol{\nabla u} \\), where \\( \boldsymbol{u} \\) is the displacement vector and \\( M \\) is the material stiffness matrix.\n\n4. **Strain Measures**:\n   - The strain measures are computed using the deformation gradient \\( F = I + \nabla u \\).\n\n### Role in the Global FEM Pipeline\n1. **Assembly**:\n   - Computes per-element stiffness matrices and internal forces based on nodal displacements.\n   - Stiffness matrix contributions from individual hexahedra are assembled into a global stiffness matrix using connectivity information.\n   - Internal force contributions are added to the global residual vector during assembly.\n\n2. **Time Integration**:\n   - Implements implicit time integration schemes, such as Backward Euler, where internal forces and stiffness matrices are computed at each timestep.\n\n3. **Nonlinear Solve**:\n   - Participates in nonlinear iterations by computing tangent stiffness matrices \\( K_e \\) during the Newton-Raphson method.\n\n4. **Linear Solve**:\n   - Contributes to the linear system solve, where global stiffness matrix and residual vector are used to compute nodal displacements.\n\n### Numerical Methods or Discretization Choices\n1. **Hexahedral Elements**:\n   - Uses hexahedral (cubic) elements for spatial discretization, with 8 vertices per element.\n\n2. **Quadrature and Integration**:\n   - Utilizes numerical integration over the volume of each hexahedron to compute stiffness matrices and internal forces.\n   - The integration process accounts for large deformations through corotational formulations.\n\n3. **Corotational Formulation**:\n   - Decomposes deformation into rigid rotations and stretches, enabling accurate modeling of large displacements.\n\n### Variational / Lagrangian Mechanics Framework Fit\n1. **Weak Form Discretization**:\n   - The weak form is discretized by integrating over hexahedral volumes to compute element stiffness matrices and internal forces.\n\n2. **Variational Principle**:\n   - Implements the principle of virtual work, where internal virtual work due to stresses equals external virtual work due to applied forces.\n\n3. **Lagrangian Mechanics**:\n   - Fits into a Lagrangian mechanics framework by computing generalized coordinates and their derivatives for nodal displacements and velocities.\n\n## Parameters and Data\nThe `HexahedralFEMForceField` does not expose any significant data fields, as it inherits most of its parameters from the parent class. However, it supports two methods for force computation:\n- **Large Displacement Method**: Accounts for significant deformations beyond small rotation approximations.\n- **Polar Decomposition Method**: Provides a more geometrically accurate representation by decomposing deformations into rotations and stretches.\n\n## Dependencies and Connections\nThe `HexahedralFEMForceField` requires topology information to define hexahedron elements. It interacts with other SOFA components through its API methods like `addForce`, `addDForce`, and others, which are part of core mechanical operations.\n\n## Practical Notes\n- Ensure that a proper topology with hexahedral elements is provided for accurate force computation.\n- The component integrates seamlessly into SOFA's force computation pipelines, contributing to the overall mechanical behavior of simulated objects."
  }
}