|
|
The Pulse engine is discretized into the main human physiological systems. Details about the design and architecture of Pulse systems can be found in the [system methodology document] (https://pulse.kitware.com/_system_methodology.html).
|
|
|
The Pulse engine is discretized into the main human physiological systems. Details about the design and architecture of Pulse systems can be found in the [system methodology document](https://pulse.kitware.com/_system_methodology.html).
|
|
|
|
|
|
In this post, we will cover how to modify the system circuits and compartments. For information on modifying Actions and Conditions associated with Systems see the pages below:
|
|
|
|
... | ... | @@ -7,11 +7,11 @@ In this post, we will cover how to modify the system circuits and compartments. |
|
|
|
|
|
Modifying/Adding Circuits Elements
|
|
|
----------------------------------
|
|
|
Most Pulse systems contain at least one fluid (gas or liquid) or thermal lumped parameter circuit. Functionality to define circuit nodes, paths, and elements is included in the CDM and the Pulse platform includes a circuit solver to determine the state of all circuit parameters each time-step. Details about Pulse circuits can be found in the [circuit methodology document] (https://pulse.kitware.com/_circuit_methodology.html).
|
|
|
Most Pulse systems contain at least one fluid (gas or liquid) or thermal lumped parameter circuit. Functionality to define circuit nodes, paths, and elements is included in the CDM and the Pulse platform includes a circuit solver to determine the state of all circuit parameters each time-step. Details about Pulse circuits can be found in the [circuit methodology document](https://pulse.kitware.com/_circuit_methodology.html).
|
|
|
|
|
|
### Nodes and Paths
|
|
|
|
|
|
To add a new node or path, you much first find the circuit's node/path class in the [PulseCircuit header file] (https://gitlab.kitware.com/physiology/engine/blob/master/engine/cpp/Controller/Circuits.h) and add the new name. For example, to add a path named "NewPath" to the respiratory system you would add the following:
|
|
|
To add a new node or path, you much first find the circuit's node/path class in the [PulseCircuit header file](https://gitlab.kitware.com/physiology/engine/blob/master/engine/cpp/Controller/Circuits.h) and add the new name. For example, to add a path named "NewPath" to the respiratory system you would add the following:
|
|
|
```
|
|
|
class RespiratoryPath
|
|
|
{
|
... | ... | @@ -21,7 +21,7 @@ To add a new node or path, you much first find the circuit's node/path class in |
|
|
};
|
|
|
```
|
|
|
|
|
|
The node/path can be added to the circuit in the system's controller setup method using *CreateNode* or *CreatePath*. For example, adding our "NewPath" to the respiratory circuit in the [controller] (https://gitlab.kitware.com/physiology/engine/blob/master/engine/cpp/Controller/Controller.cpp) would look like this:
|
|
|
The node/path can be added to the circuit in the system's controller setup method using *CreateNode* or *CreatePath*. For example, adding our "NewPath" to the respiratory circuit in the [controller](https://gitlab.kitware.com/physiology/engine/blob/master/engine/cpp/Controller/Controller.cpp) would look like this:
|
|
|
```
|
|
|
void PulseController::SetupRespiratory()
|
|
|
{
|
... | ... | @@ -33,7 +33,7 @@ void PulseController::SetupRespiratory() |
|
|
|
|
|
### Elements
|
|
|
|
|
|
Elements (i.e., resistances, compliances, pressure sources, etc.) can be added to any circuit path. Note that there may only be one element per path. Elements can be removed and added during the simulation, but are generally initialized at startup and the instantaneous values are modified while running. The baseline value should represent the unmodified original homeostatic value. For example, to add a resistance of 1 cmH2O-s/L to the "NewPath" we created in the respiratory system you would do the following in the [controller] (https://gitlab.kitware.com/physiology/engine/blob/master/engine/cpp/Controller/Controller.cpp):
|
|
|
Elements (i.e., resistances, compliances, pressure sources, etc.) can be added to any circuit path. Note that there may only be one element per path. Elements can be removed and added during the simulation, but are generally initialized at startup and the instantaneous values are modified while running. The baseline value should represent the unmodified original homeostatic value. For example, to add a resistance of 1 cmH2O-s/L to the "NewPath" we created in the respiratory system you would do the following in the [controller](https://gitlab.kitware.com/physiology/engine/blob/master/engine/cpp/Controller/Controller.cpp):
|
|
|
```
|
|
|
NewPath.GetResistanceBaseline().SetValue(1.0, FlowResistanceUnit::cmH2O_s_Per_L);
|
|
|
```
|
... | ... | @@ -50,7 +50,7 @@ A compartment represents the fluid dynamics of an anatomical organ or equipment |
|
|
|
|
|
Details about compartments can be found in the [Compartment Interface](https://pulse.kitware.com/physeng.html#CompartmentsInterface).
|
|
|
|
|
|
To add a new compartment, you much first find the compartment's class in the [PulsePhysiologyEngine header file] (https://gitlab.kitware.com/physiology/engine/-/tree/master/src/cpp/cpm/PulsePhysiologyEngine.h) and add the new name. For example, to add a compartment named "NewCompartment" to the Cardiovascular system you would add the following:
|
|
|
To add a new compartment, you much first find the compartment's class in the [PulsePhysiologyEngine header file](https://gitlab.kitware.com/physiology/engine/-/tree/master/src/cpp/cpm/PulsePhysiologyEngine.h) and add the new name. For example, to add a compartment named "NewCompartment" to the Cardiovascular system you would add the following:
|
|
|
|
|
|
```
|
|
|
class VascularCompartment
|
... | ... | |