Back

Gravity

sofa::component::mechanicalload::Gravity
ContextObject
Doc (from source)

Gravity in world coordinates. Override the default gravity */

Abstract (AI generated)

The Gravity component applies a specified gravitational force vector in world coordinates to mechanical objects within the simulation, allowing users to override default gravity settings.

Metadata
module
Sofa.Component.MechanicalLoad
namespace
sofa::component::mechanicalload
include
sofa/component/mechanicalload/Gravity.h
inherits
  • ContextObject
description

The IntegrateEndEvent is an event within the SOFA framework that signifies the completion of the integrate detection step by the is an abstract base class within the SOFA framework that provides the foundational structure for topology-related components. It does not directly contribute to any governing equations or operators such as mass matrix $\vec{g}$, stiffness matrix $m$, internal force wzxhzdk:2, residual wzxhzdk:3, etc., nor does it define any constitutive or kinematic laws. Instead, its role is primarily structural and hierarchical within the SOFA scene graph.IntegrateVisitor. This event does not directly contribute to any specific mathematical or physical equations or operators in the FEM simulation pipeline. Instead, it serves as a coordination mechanism for other components within the simulation scenario.


Role in the Global FEM Pipeline


In the context of the global FEM pipeline, IntegrateEndEvent is part of the time integration phase. Specifically, it signals that the integrate detection step has been completed, which can include tasks such as updating the state variables (e.g., displacements and velocities) based on the current system configuration.


Numerical Methods or Discretization Choices


The IntegrateEndEvent itself does not encode any numerical methods or discretization choices. It is purely a signaling mechanism that can be used to trigger subsequent steps in the simulation, such as advancing to the next time step, updating constraints, or performing post-processing tasks.


Broad Variational / Lagrangian Mechanics Framework


Within the broader variational and Lagrangian mechanics framework, IntegrateEndEvent is not directly involved with any specific equations of motion, constitutive laws, or variational principles. Its primary role is to ensure that different components within the simulation can synchronize their operations based on the completion of a particular integration step.


Summary


The IntegrateEndEvent does not contribute to the governing equations, constitutive laws, stiffness matrices, internal forces, or residuals in the FEM pipeline. Instead, it facilitates coordination and synchronization among different components within the SOFA simulation framework.


Data Fields
NameTypeDefaultHelp
f_gravity sofa::type::Vec3 Gravity in the world coordinate system
Methods
void apply () virtual
{
  "name": "Gravity",
  "namespace": "sofa::component::mechanicalload",
  "module": "Sofa.Component.MechanicalLoad",
  "include": "sofa/component/mechanicalload/Gravity.h",
  "doc": "Gravity in world coordinates.\n\nOverride the default gravity */",
  "inherits": [
    "ContextObject"
  ],
  "templates": [],
  "data_fields": [
    {
      "name": "f_gravity",
      "type": "sofa::type::Vec3",
      "xmlname": "gravity",
      "help": "Gravity in the world coordinate system"
    }
  ],
  "links": [],
  "methods": [
    {
      "name": "apply",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    }
  ],
  "description": "The **Gravity** component in SOFA is responsible for applying gravitational force to the simulation within world coordinates. It allows users to override the default gravity settings and specify custom gravity values. This component inherits from `ContextObject` and defines an essential data field, `f_gravity`, which represents the gravity vector in the world coordinate system.\n\n### Role and Purpose:\nThe Gravity component provides a means to simulate gravitational effects on objects within the simulation environment. It is particularly useful for scenarios where realistic physical interactions are required, such as simulating falling objects or the influence of gravity on soft tissues.\n\n### Interactions with Other Components:\nThe `Gravity` component interacts with the simulation context through its `apply()` method. This method modifies the gravity setting in the node's context, affecting how other mechanical components within the scene respond to gravitational forces. The interaction is indirect; the gravity value set by this component influences how mechanical objects and constraints behave during the simulation.\n\n### Practical Usage Guidance:\n- Use the `gravity` data field (`f_gravity`) to specify the desired gravity vector in world coordinates.\n- This component should be added to a node within the SOFA scene graph where gravitational effects need to be applied. The specified gravity will affect all mechanical components under that node's context.",
  "maths": "<maths_description>\n\n### Governing Equations or Operators:\n\nThe **Gravity** component in SOFA modifies the gravitational force acting on mechanical objects within a simulation. The gravitational force is typically represented as a constant acceleration vector \\(\\vec{g}\\) in world coordinates, which influences the motion of all mechanical components under its context.\n\n#### Gravitational Force:\nThe gravitational force applied to an object with mass \\(m\\) can be expressed as:\n\n\begin{equation}\n    \\vec{F}_g = m \\cdot \\vec{g},\n\tag{1}\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\ndisplayed math equation (numbered)\n\nwhere \\(\\vec{g}\\) is the gravitational acceleration vector in world coordinates, which can be specified as a 3D vector (e.g., \\([0, -9.81, 0]\\) for Earth's gravity pointing downwards).\n\n### Constitutive Relations:\nThe **Gravity** component does not introduce any additional constitutive relations beyond the standard gravitational force equation described above.\n\n### Role in FEM or Other Numerical Methods:\nIn the context of finite element methods (FEM) or other numerical integration schemes, the gravitational force acts as an external body force that influences the motion and deformation of mechanical objects. The force is typically applied to all nodal points within a domain, affecting their position and velocity over time.\n\n### Role in FSI Simulations:\nThe **Gravity** component plays a critical role in fluid-structure interaction (FSI) simulations by providing an external body force that influences the motion of both fluids and structures. In such simulations, gravity can affect the distribution of forces within the system and lead to coupled dynamic responses.\n\n### Summary of Role:\nThe **Gravity** component modifies the gravitational acceleration vector \\(\\vec{g}\\), which is then used in subsequent computations involving mechanical objects' dynamics and interactions within a simulation environment. This external force affects the overall motion, deformation, and interaction behavior of the simulated system, particularly in gravity-sensitive scenarios such as fluid-structure interactions.\n\n</maths_description>",
  "abstract": "The Gravity component applies a specified gravitational force vector in world coordinates to mechanical objects within the simulation, allowing users to override default gravity settings.",
  "sheet": "# Gravity\n\n**Overview:**\n\nThe **Gravity** component is responsible for applying a specified gravitational force vector \\\\( \\vec{g} \\\\), defined in world coordinates, to all mechanical objects within its context. This allows users to customize the gravitational effects on the simulation environment.\n\n**Mathematical Model:*\n\nThe gravitational force applied to an object with mass \\\\( m \\\\) is given by:\n\n\begin{equation}\n    \\vec{F}_g = m \\cdot \\vec{g},\n\\end{equation}\n\nwhere \\\\( \\vec{g} \\\\) is the gravitational acceleration vector in world coordinates. This force acts as an external body force influencing the motion and deformation of mechanical objects within the simulation.\n\n**Parameters and Data:*\n\n- **f_gravity (gravity):**\n  - *Type:* `sofa::type::Vec3`\n  - *Description:* Specifies the gravity vector in world coordinates. The default value is `[0, -9.81, 0]`, representing Earth's gravitational acceleration pointing downwards."
}