Back

PhaseManager

sofa::component::engine::PhaseManager
DataEngine
Doc (from source)

Computes the next phase of the ventricle cardiac cycle

Abstract (AI generated)

The `PhaseManager` computes the next phase of the ventricular cardiac cycle by updating pressures and flow rates based on current physiological conditions.

Metadata
module
EpioneSofaPlugin
namespace
sofa::component::engine
include
haemodynamics/PhaseManager.h
inherits
  • DataEngine
description

The PhaseManager does not directly implement governing equations like those seen in traditional FEM simulations. However, its role is to manage the transition between different phases of the cardiac cycle based on specific pressure and flow rate conditions: component in the SOFA framework is designed to manage the simulation of the ventricular cardiac cycle. It operates by updating various physiological parameters related to pressures and flow rates, critical for simulating heart dynamics. This component does not directly contribute to the core FEM operators such as mass matrix $M$, stiffness matrix $K$, or internal forces $f_{int}$. Instead, it focuses on the time-dependent behavior of the cardiac cycle phases, which are essential for a complete physiological simulation.

Governing Equations and Operators

The

Constitutive and Kinematic Laws

The

Role in the Global FEM Pipeline

While


Numerical Methods and Discretization Choices


The component does not employ traditional numerical methods such as finite element discretization. Instead, it relies on a state machine-like approach to update physiological parameters based on discrete phases:
- State Update: During each call to doUpdate, the component computes new values for $P_v$, $P_{ar}$, and $Q$ corresponding to the next phase of the cardiac cycle.

Integration into Variational / Lagrangian Mechanics Framework

Although not directly part of the variational formulation, PhaseManager complements the broader framework by providing essential physiological data for cardiovascular simulations. It ensures that the simulation accurately reflects the dynamic changes in pressure and flow across different phases of the cardiac cycle:
- Simulation Dynamics: By updating the pressures and flow rates at each step, PhaseManager contributes to the overall fidelity of heart motion simulation.

In summary, the PhaseManager is a specialized component that manages time-dependent physiological states for cardiovascular simulations within the SOFA framework. It ensures that pressure and flow rate conditions are correctly updated during each phase transition, supporting real-time or high-fidelity cardiac dynamics.

Data Fields
NameTypeDefaultHelp
Pv Real Ventricular pressure
Pat Real Atrial pressure
Par Real Arterial pressure
current_phase unsigned int Current phase
next_Pv Real Value of Pv(t+dt) computed by the constraint
next_Par Real Value of Par(t+dt) computed by the constraint
next_Q Real Value of Q(t+dt) computed by the constraint
Methods
void init () virtual
void doUpdate () virtual
Phase cast_phase (int val)
int get_name (Phase phase)
{
  "name": "PhaseManager",
  "namespace": "sofa::component::engine",
  "module": "EpioneSofaPlugin",
  "include": "haemodynamics/PhaseManager.h",
  "doc": "Computes the next phase of the ventricle cardiac cycle",
  "inherits": [
    "DataEngine"
  ],
  "templates": [],
  "data_fields": [
    {
      "name": "Pv",
      "type": "Real",
      "xmlname": "Pv",
      "help": "Ventricular pressure"
    },
    {
      "name": "Pat",
      "type": "Real",
      "xmlname": "Pat",
      "help": "Atrial pressure"
    },
    {
      "name": "Par",
      "type": "Real",
      "xmlname": "Par",
      "help": "Arterial pressure"
    },
    {
      "name": "current_phase",
      "type": "unsigned int",
      "xmlname": "phase",
      "help": "Current phase"
    },
    {
      "name": "next_Pv",
      "type": "Real",
      "xmlname": "next_Pv",
      "help": "Value of Pv(t+dt) computed by the constraint"
    },
    {
      "name": "next_Par",
      "type": "Real",
      "xmlname": "next_Par",
      "help": "Value of Par(t+dt) computed by the constraint"
    },
    {
      "name": "next_Q",
      "type": "Real",
      "xmlname": "next_Q",
      "help": "Value of Q(t+dt) computed by the constraint"
    }
  ],
  "links": [],
  "methods": [
    {
      "name": "init",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "doUpdate",
      "return_type": "void",
      "params": [],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "cast_phase",
      "return_type": "Phase",
      "params": [
        {
          "name": "val",
          "type": "int"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "get_name",
      "return_type": "int",
      "params": [
        {
          "name": "phase",
          "type": "Phase"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    }
  ],
  "description": "The `PhaseManager` is a component in the SOFA framework, specifically within the EpioneSofaPlugin module, designed to compute the next phase of the ventricular cardiac cycle. It inherits from `DataEngine`, indicating its role in processing and generating data relevant to cardiac simulations. The PhaseManager manages various pressures (ventricular, arterial, and atrial) and flow rate as input fields, while also tracking and updating the current phase of the cardiac cycle. This component is crucial for simulating heart dynamics, particularly focusing on the pressure changes and flow rates across different phases of the ventricle's operation.\n\n**Interactions with other components:** `PhaseManager` interacts primarily through its data fields, which can be connected to other components that provide or consume pressure and flow rate information. It likely works in concert with components responsible for simulating cardiac motion, fluid dynamics within the heart chambers, and possibly haptic feedback systems in surgical simulations.\n\n**Practical Usage:** This component should be configured with appropriate initial pressures (Pv, Pat, Par) and phase settings. Its primary method `doUpdate` is called during simulation updates to compute the next state of ventricular pressure (`next_Pv`), arterial pressure (`next_Par`), and flow rate (`next_Q`). The field `current_phase` tracks the ongoing cardiac cycle phase, while methods like `cast_phase` help in interpreting integer values as specific phases.",
  "maths": "The `PhaseManager` component in the SOFA framework is designed to manage the simulation of the ventricular cardiac cycle. It operates by updating various physiological parameters related to pressures and flow rates, critical for simulating heart dynamics. This component does not directly contribute to the core FEM operators such as mass matrix \\(M\\), stiffness matrix \\(K\\), or internal forces \\(f_{int}\\). Instead, it focuses on the time-dependent behavior of the cardiac cycle phases, which are essential for a complete physiological simulation.\n\n### Governing Equations and Operators\nThe `PhaseManager` does not directly implement governing equations like those seen in traditional FEM simulations. However, its role is to manage the transition between different phases of the cardiac cycle based on specific pressure and flow rate conditions:\n- **Ventricular Pressure \\(P_v\\)**: Represents the internal pressure within the ventricle.\n- **Atrial Pressure \\(P_{at}\\)**: Represents the pressure within the atrium.\n- **Arterial Pressure \\(P_{ar}\\)**: Represents the systemic arterial blood pressure.\n\n### Constitutive and Kinematic Laws\nThe `PhaseManager` component does not involve constitutive laws related to material properties or kinematic laws for deformation. Instead, it handles discrete phase transitions based on physiological conditions:\n- **Current Phase**: Tracks the current stage of the cardiac cycle (e.g., diastole, systole).\n- **Next Phases**: Computes the next values of ventricular pressure \\(P_v(t + dt)\\), arterial pressure \\(P_{ar}(t + dt)\\), and flow rate \\(Q(t + dt)\\) based on the current phase.\n\n### Role in the Global FEM Pipeline\nWhile `PhaseManager` is not directly involved in the assembly of global matrices or the nonlinear solve, it plays a critical role in time integration by managing state transitions during each simulation step:\n- **Time Integration**: During each timestep \\(dt\\), `PhaseManager` updates the pressures and flow rates based on the current phase.\n\n### Numerical Methods and Discretization Choices\nThe component does not employ traditional numerical methods such as finite element discretization. Instead, it relies on a state machine-like approach to update physiological parameters based on discrete phases:\n- **State Update**: During each call to `doUpdate`, the component computes new values for \\(P_v\\), \\(P_{ar}\\), and \\(Q\\) corresponding to the next phase of the cardiac cycle.\n\n### Integration into Variational / Lagrangian Mechanics Framework\nAlthough not directly part of the variational formulation, `PhaseManager` complements the broader framework by providing essential physiological data for cardiovascular simulations. It ensures that the simulation accurately reflects the dynamic changes in pressure and flow across different phases of the cardiac cycle:\n- **Simulation Dynamics**: By updating the pressures and flow rates at each step, `PhaseManager` contributes to the overall fidelity of heart motion simulation.\n\nIn summary, the `PhaseManager` is a specialized component that manages time-dependent physiological states for cardiovascular simulations within the SOFA framework. It ensures that pressure and flow rate conditions are correctly updated during each phase transition, supporting real-time or high-fidelity cardiac dynamics.",
  "abstract": "The `PhaseManager` computes the next phase of the ventricular cardiac cycle by updating pressures and flow rates based on current physiological conditions.",
  "sheet": "# PhaseManager\n\n**Overview**\n\nThe `PhaseManager` is a component in the EpioneSofaPlugin module that manages the simulation of the ventricular cardiac cycle. It inherits from `DataEngine`, indicating its role in processing and generating data relevant to cardiac simulations.\n\n**Parameters and Data**\n\n- **Pv**: Ventricular pressure (Real)\n- **Pat**: Atrial pressure (Real)\n- **Par**: Arterial pressure (Real)\n- **current_phase**: Current phase of the cardiac cycle (unsigned int)\n- **next_Pv**: Value of ventricular pressure at the next time step (Real)\n- **next_Par**: Value of arterial pressure at the next time step (Real)\n- **next_Q**: Value of flow rate at the next time step (Real)\n\n**Dependencies and Connections**\n\nThe `PhaseManager` interacts with other components that provide or consume pressure and flow rate information. It likely works in concert with components responsible for simulating cardiac motion, fluid dynamics within heart chambers, and possibly haptic feedback systems in surgical simulations.\n\n**Practical Notes**\n\nThis component should be configured with appropriate initial pressures (Pv, Pat, Par) and phase settings. Its primary method `doUpdate` is called during simulation updates to compute the next state of ventricular pressure (`next_Pv`), arterial pressure (`next_Par`), and flow rate (`next_Q`). The field `current_phase` tracks the ongoing cardiac cycle phase."
}