Pat
Computes the atrial pressure with sigmoids Computes Pat(t)
The `Pat` component computes atrial pressure over time using sigmoid functions, providing dynamic boundary conditions essential for cardiac hemodynamics simulations.
- module
- EpioneSofaPlugin
- namespace
- sofa::component
- include
- haemodynamics/Pat.h
- inherits
-
- BaseObject
- description
The Pat component in the SOFA framework computes the atrial pressure over time using sigmoid functions. The mathematical model is designed to simulate the behavior of atrial pressure with respect to time, leveraging parameters that define the initial and maximum pressures, heart period, and coefficients for the sigmoid functions.
Governing Equations and Operators
The atrial pressure $P_{ ext{at}}(t)$ at any given time $t$ is computed using a combination of sigmoid functions. The general form of the computation can be represented as:
egin{align}
P_{\text{at}}(t) &= f(t; p_0, p_{\text{max}}, T, t_1, t_2, t_3, \alpha_1, \alpha_2)
ag{1}\end{align}
where $f$ is a function that combines sigmoidal terms to model the time-varying atrial pressure. The parameters are defined as follows:
- Initial Atrial Pressure ($p_0$): This is the starting value of the atrial pressure at $t=0$, denoted by
pat_0. - Maximum Atrial Pressure ($p_{\text{max}}$): The peak value that the atrial pressure can reach, denoted by
pat_max. - Heart Period ($T$): This is the duration of one heart cycle in seconds, represented by
heart_period. - Time Points for Sigmoidal Calculation ($t_1$, $t_2$, $t_3$): These are specific time points within a cardiac cycle used to compute the sigmoid functions, denoted by
t1,t2, andt3respectively. - Sigmoid Coefficients ($\alpha_1$, $\alpha_2$): Parameters that define the shape of the sigmoid curves, represented by
alpha1andalpha2.
Role in FEM Pipeline
The Pat component does not directly contribute to standard FEM operators such as mass matrix $M$, stiffness matrix $K$, or internal force $f_{\text{int}}$. Instead, it provides a time-dependent boundary condition for atrial pressure. This can be integrated into the larger simulation pipeline by providing dynamic boundary conditions that influence the overall behavior of deformable models representing cardiac tissue.
Numerical Methods and Discretization Choices
The component computes the atrial pressure at discrete time points using the sigmoid functions. The specific implementation details are not provided, but generally, this involves evaluating the sigmoid functions at each time step $t$ during simulation:
egin{align}
P_{\text{at}}(t) &= p_0 + (p_{\text{max}} - p_0) \cdot \left[\frac{1}{1+e^{-\alpha_1(t-t_1)}} - \frac{1}{1+e^{-\alpha_2(t-t_3)}}\right]
ag{2}\end{align}
where the sigmoid functions are centered around $t_1$ and $t_3$, with the shape controlled by coefficients $\alpha_1$ and $\alpha_2$. The time step at which this pressure is computed aligns with the global simulation time stepping.
Variational / Lagrangian Mechanics Framework
Although Pat does not directly involve variational formulations or FEM operators, it contributes to the overall dynamic behavior of a cardiac model by providing time-dependent boundary conditions. These boundary conditions are essential for simulating realistic physiological scenarios where atrial pressure varies over time.
Constraint Handling and Mapping
The component does not implement any constraints or mappings in the traditional FEM sense but rather provides a dynamic value that can be used as an external force or boundary condition in other components of the simulation framework.
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
pat_0 |
Real | |
Initial atrial pressure (Pa) |
pat_max |
Real | |
Max atrial pressure (Pa) |
heart_period |
Real | |
Heart period (s) |
t1 |
Real | |
First (start) time for sigmoids (see implementation) |
t2 |
Real | |
Second (middle) time for sigmoids (see implementation) |
t3 |
Real | |
Third (last) time for sigmoids (see implementation) |
alpha1 |
Real | |
First coefficient for sigmoids (see implementation) |
alpha2 |
Real | |
Second coefficient for sigmoids (see implementation) |
pressure |
Real | |
Atrial pressure (Pa) |
d_Pat_constant |
bool | |
If true, will not compute Pat -> Pat(t)=0 |
Methods
void
init
()
virtual
Real
compute_pat
(Real t)
void
handleEvent
(sofa::core::objectmodel::Event * event)
virtual
{
"name": "Pat",
"namespace": "sofa::component",
"module": "EpioneSofaPlugin",
"include": "haemodynamics/Pat.h",
"doc": "Computes the atrial pressure with sigmoids\n\nComputes Pat(t)",
"inherits": [
"BaseObject"
],
"templates": [],
"data_fields": [
{
"name": "pat_0",
"type": "Real",
"xmlname": "pat_0",
"help": "Initial atrial pressure (Pa)"
},
{
"name": "pat_max",
"type": "Real",
"xmlname": "pat_max",
"help": "Max atrial pressure (Pa)"
},
{
"name": "heart_period",
"type": "Real",
"xmlname": "heart_period",
"help": "Heart period (s)"
},
{
"name": "t1",
"type": "Real",
"xmlname": "t1",
"help": "First (start) time for sigmoids (see implementation)"
},
{
"name": "t2",
"type": "Real",
"xmlname": "t2",
"help": "Second (middle) time for sigmoids (see implementation)"
},
{
"name": "t3",
"type": "Real",
"xmlname": "t3",
"help": "Third (last) time for sigmoids (see implementation)"
},
{
"name": "alpha1",
"type": "Real",
"xmlname": "alpha1",
"help": "First coefficient for sigmoids (see implementation)"
},
{
"name": "alpha2",
"type": "Real",
"xmlname": "alpha2",
"help": "Second coefficient for sigmoids (see implementation)"
},
{
"name": "pressure",
"type": "Real",
"xmlname": "pressure",
"help": "Atrial pressure (Pa)"
},
{
"name": "d_Pat_constant",
"type": "bool",
"xmlname": "Pat_constant",
"help": "If true, will not compute Pat -> Pat(t)=0"
}
],
"links": [],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "compute_pat",
"return_type": "Real",
"params": [
{
"name": "t",
"type": "Real"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "handleEvent",
"return_type": "void",
"params": [
{
"name": "event",
"type": "sofa::core::objectmodel::Event *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `Pat` component in the SOFA framework, part of the EpioneSofaPlugin module, is designed to compute atrial pressure over time using sigmoid functions. This component inherits from `BaseObject`, indicating its role as a core simulation object within the scene graph architecture. It primarily interacts with other components through event handling and parameter configurations. The key parameters include initial (`pat_0`), maximum (`pat_max`) atrial pressures, heart period (`heart_period`), time points for sigmoid calculations (`t1`, `t2`, `t3`), coefficients for the sigmoids (`alpha1`, `alpha2`), and a flag to disable dynamic computation (`d_Pat_constant`). The component provides methods for initialization (`init`) and computing atrial pressure at any given time (`compute_pat`). It also handles events through `handleEvent`, facilitating communication with other components. Practical usage involves setting up the necessary parameters in the scene graph, ensuring the atrial pressure model is correctly configured for simulations involving cardiac hemodynamics.",
"maths": "The `Pat` component in the SOFA framework computes the atrial pressure over time using sigmoid functions. The mathematical model is designed to simulate the behavior of atrial pressure with respect to time, leveraging parameters that define the initial and maximum pressures, heart period, and coefficients for the sigmoid functions.\n\n### Governing Equations and Operators\nThe atrial pressure $P_{\text{at}}(t)$ at any given time $t$ is computed using a combination of sigmoid functions. The general form of the computation can be represented as:\n\n\begin{align*}\n P_{\\text{at}}(t) &= f(t; p_0, p_{\\text{max}}, T, t_1, t_2, t_3, \\alpha_1, \\alpha_2)\n\tag{1}\\end{align*}\nwhere $f$ is a function that combines sigmoidal terms to model the time-varying atrial pressure. The parameters are defined as follows:\n\n- **Initial Atrial Pressure ($p_0$)**: This is the starting value of the atrial pressure at $t=0$, denoted by `pat_0`.\n- **Maximum Atrial Pressure ($p_{\\text{max}}$)**: The peak value that the atrial pressure can reach, denoted by `pat_max`.\n- **Heart Period ($T$)**: This is the duration of one heart cycle in seconds, represented by `heart_period`.\n- **Time Points for Sigmoidal Calculation ($t_1$, $t_2$, $t_3$)**: These are specific time points within a cardiac cycle used to compute the sigmoid functions, denoted by `t1`, `t2`, and `t3` respectively.\n- **Sigmoid Coefficients ($\\alpha_1$, $\\alpha_2$)**: Parameters that define the shape of the sigmoid curves, represented by `alpha1` and `alpha2`.\n\n### Role in FEM Pipeline\nThe `Pat` component does not directly contribute to standard FEM operators such as mass matrix $M$, stiffness matrix $K$, or internal force $f_{\\text{int}}$. Instead, it provides a time-dependent boundary condition for atrial pressure. This can be integrated into the larger simulation pipeline by providing dynamic boundary conditions that influence the overall behavior of deformable models representing cardiac tissue.\n\n### Numerical Methods and Discretization Choices\nThe component computes the atrial pressure at discrete time points using the sigmoid functions. The specific implementation details are not provided, but generally, this involves evaluating the sigmoid functions at each time step $t$ during simulation:\n\n\begin{align*}\n P_{\\text{at}}(t) &= p_0 + (p_{\\text{max}} - p_0) \\cdot \\left[\\frac{1}{1+e^{-\\alpha_1(t-t_1)}} - \\frac{1}{1+e^{-\\alpha_2(t-t_3)}}\\right]\n\tag{2}\\end{align*}\n\nwhere the sigmoid functions are centered around $t_1$ and $t_3$, with the shape controlled by coefficients $\\alpha_1$ and $\\alpha_2$. The time step at which this pressure is computed aligns with the global simulation time stepping.\n\n### Variational / Lagrangian Mechanics Framework\nAlthough `Pat` does not directly involve variational formulations or FEM operators, it contributes to the overall dynamic behavior of a cardiac model by providing time-dependent boundary conditions. These boundary conditions are essential for simulating realistic physiological scenarios where atrial pressure varies over time.\n\n### Constraint Handling and Mapping\nThe component does not implement any constraints or mappings in the traditional FEM sense but rather provides a dynamic value that can be used as an external force or boundary condition in other components of the simulation framework.",
"abstract": "The `Pat` component computes atrial pressure over time using sigmoid functions, providing dynamic boundary conditions essential for cardiac hemodynamics simulations.",
"sheet": "# Pat\n\n## Overview\nThe `Pat` component is part of the EpioneSofaPlugin module in SOFA. It inherits from `BaseObject`, indicating its role as a core simulation object within the scene graph architecture. The primary function of this component is to compute atrial pressure over time using sigmoid functions, providing dynamic boundary conditions essential for simulating realistic physiological scenarios involving cardiac hemodynamics.\n\n## Mathematical Model\nThe atrial pressure $P_{\\text{at}}(t)$ at any given time $t$ is computed using a combination of sigmoid functions. The general form of the computation can be represented as:\n\n\begin{align*}\n P_{\\text{at}}(t) &= p_0 + (p_{\\text{max}} - p_0) \\cdot \\left[\\frac{1}{1+e^{-\\alpha_1(t-t_1)}} - \\frac{1}{1+e^{-\\alpha_2(t-t_3)}}\\right]\n\tag{1}\n\\end{align*}\n\nwhere the parameters are defined as follows:\n- **Initial Atrial Pressure ($p_0$)**: This is the starting value of the atrial pressure at $t=0$, denoted by `pat_0`.\n- **Maximum Atrial Pressure ($p_{\\text{max}}$)**: The peak value that the atrial pressure can reach, denoted by `pat_max`.\n- **Heart Period ($T$)**: This is the duration of one heart cycle in seconds, represented by `heart_period`.\n- **Time Points for Sigmoidal Calculation ($t_1$, $t_2$, $t_3$)**: These are specific time points within a cardiac cycle used to compute the sigmoid functions, denoted by `t1`, `t2`, and `t3` respectively.\n- **Sigmoid Coefficients ($\\alpha_1$, $\\alpha_2$)**: Parameters that define the shape of the sigmoid curves, represented by `alpha1` and `alpha2`.\n\n## Parameters and Data\nThe significant data fields exposed by the component are:\n- `pat_0`: Initial atrial pressure (Pa)\n- `pat_max`: Max atrial pressure (Pa)\n- `heart_period`: Heart period (s)\n- `t1`, `t2`, `t3`: Time points for sigmoid calculations\n- `alpha1`, `alpha2`: Coefficients for the sigmoids\n- `pressure`: Atrial pressure (Pa)\n- `d_Pat_constant`: If true, will not compute Pat -> Pat(t)=0"
}