-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
This issue serves as an overview of the desired features of the new Reduced Lung Module, necessary development steps, progress, ...
General Structure/Idea
The new Reduced Lung module shall offer capabilities to simulate zero-dimensional "elements" described through black box state equations. The coupling between elements is denoted in a graph-like structure connecting them with suitable state equations. Suitable boundary conditions close the whole system of equations. This allows a somewhat discontinuous evaluation of elements; only connections in the graph structure contain coupling information.
Currently planned element types:
- Airways (single airways are represented as tubes with flow and pressure quantities given at their inlet and outlet. Inlets and outlets are coupled with other elements to describe the airflow properties in the lung.)
- Resistive airways (only flow resistance)
- Viscoelastic RLC airways (flow resistance, air inertance, viscoelastic airway wall)
- Terminal Units (terminal units comprise the respiratory zone attached to a terminal airway, i.e., the respiratory airways and alveolar ducts. They are described via state equations relating transmural pressure to volumetric strain. Viscoelasticity is described using suitable rheological models, and elasticity is described using different hyperelastic functions.
- Rheological models
- Kelvin-Voigt (spring and dashpot in parallel)
- 4-Element-Maxwell (Kelvin-Voigt with additional Maxwell body (spring and dashpot in series) in parallel)
- Elasticity models
- Linear elasticity (constant elastance E)
- Nonlinear Ogden hyperelasticity
- Rheological models
Coupling equations (allow connection of two elements (Connection) or three elements (Bifurcations) for now:
- Kirchhoff conditions (equality of pressure and mass balance at coupling point)
- Energy conservation (equality of total pressure and mass balance at coupling point)
Boundary conditions (need to be prescribed for every element that is only connected to at most one other element):
- Arbitrary functions for pressure at boundaries
- Arbitrary functions for flow at boundaries
- (Non-)linear state equations for pleural pressure depending on the system's state
Further potential additions (after the basic infrastructure):
- Alveolar recruitment/derecruitment
- Reduced-dimensional scalar transport for oxygen and carbon dioxide
- Forward Automatic Differentiation for enhanced Bayesian simulation runs
- Coupling to different modules (e.g., poroelasticity) in 4C
Realization
The nonlinear system of equations is solved with a Newton-Raphson iteration. All discretized state equations, coupling equations, and boundary conditions are assembled in a Jacobi matrix and solved for the primary variables (pressures and flows in the different elements). The whole procedure is primarily independent of the 4C infrastructure acting on the elements. Only solver and input/output functionality is used.
Infrastructure Implementation
- Read and process input
- (for the start) Use standard input from the current red_airways format and extract relevant information
- Write a new input processing pipeline
- Create mpi distribution for the system matrix, solution vector, and rhs vector
- (for the start) Obtain existing element and node distribution from red_airways discretization and create Epetra maps based on the new concept
- Directly create distribution from the input
- Create functionality for the variable combination of state equations, couplings, and boundary conditions and their identification in the system matrix
- Find flexible and performant ways to order and identify the system of equations
- Allow a flexible increase with new equations and state variables
- Create infrastructure for the solution process
- Create time integration loop and nested nonlinear iteration loop
- Interface 4C solvers
- Postprocessing
- Write output with 4C functionality