BiVSlice

Module: devtests.mechanics.bivslice.run

Section author: Gernot Plank <gernot.plank@medunigraz.at>, Christoph Augustin <christoph.augustin@medunigraz.at> andMatthias Gsell <matthias.gsell@medunigraz.at>

This example provides pure mechanics and electromechanics examples on a slice biventricular geometry. The main use of this example is to test coupling of biventricular setups with a circulatory system.

Problem Setup

This problem generates a slice biventricular mesh using the carputils.mesh.BiVSlice class. The biventricular slice is tesselated into tetrahedra as shown below:

../../_images/bivslice_mesh.png

In all experiment types in this example, the top and bottom surfaces of the slice are constrained to lie in the same plane with Dirichlet boundary conditions, and an additional three nodes on the bottom (z=0) surface are constrained such that free body rotation and translation is prevented. Two nodes on the x axis are prevented from moving in the y direction, and one node on the y axis is prevented from moving in the x direction:

../../_images/ring_rigid_bc.png

Experiments

Several experiments are defined:

  • active-free - Run an active contraction simulation without constraints on cavity size or pressure
  • active-iso - Run an active contraction simulation with an isovolumetric cavity constraint
  • active-pv-loop - Run an active contraction stimulation with pressure/flux constraints imposed by Windkessel or circulatory models coupled to both RV and LV cavity. In this case both left and right ventricular cavities are coupled to a 3-element Windkessel model
../../_images/bivslice_wk_coupling.png

Tests

bivslice-pv-loop-wk-fast

Tags: FAST MECHANICS PARALLEL

Checks:

  • Compare against stored reference: max_error(cav.LV.csv)
  • Compare against stored reference: max_error(cav.RV.csv)
  • Compare against stored reference: max_error(x.dynpt.gz)

Last run: 2024-02-29 01:04:17.430405, revision {‘base’: ‘cbf8efd0’}, dependency revisions {PT_C: 31642c1e,cvsys: 593686bc,eikonal: 5fbbfda3,elasticity: 4d92ddfc}

Runtime: 0:00:33.596640
**** ALL FAILED ****
  FAIL max_error(cav.LV.csv): 0.125
  FAIL max_error(cav.RV.csv): 0.125
  ERROR max_error(x.dynpt.gz):
ValueError: operands could not be broadcast together with shapes (39897,) (12870,)
Backtrace:
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 175, in __call__
    return self.check(*args, **kwargs)
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 218, in check
    cost = self.cost(refdata.flatten(), testdata.flatten())
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/cost.py", line 36, in max_error
    return np.max(np.abs(array1 - array2))

Last passed: No passes found in history (earliest 2024-02-01 01:04:45.693600)

bivslice-pv-loop-wk-medium

Tags: MEDIUM MECHANICS PARALLEL

Checks:

  • Compare against stored reference: max_error(cav.LV.csv)
  • Compare against stored reference: max_error(cav.RV.csv)
  • Compare against stored reference: max_error(x.dynpt.gz)

Last run: 2024-02-29 01:04:51.065814, revision {‘base’: ‘cbf8efd0’}, dependency revisions {PT_C: 31642c1e,cvsys: 593686bc,eikonal: 5fbbfda3,elasticity: 4d92ddfc}

Runtime: 0:01:45.943682
**** ALL FAILED ****
  FAIL max_error(cav.LV.csv): 0.03200000000000358
  FAIL max_error(cav.RV.csv): 0.08600000000001273
  ERROR max_error(x.dynpt.gz):
ValueError: operands could not be broadcast together with shapes (263466,) (128520,)
Backtrace:
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 175, in __call__
    return self.check(*args, **kwargs)
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 218, in check
    cost = self.cost(refdata.flatten(), testdata.flatten())
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/cost.py", line 36, in max_error
    return np.max(np.abs(array1 - array2))

Last passed: No passes found in history (earliest 2024-02-01 01:05:19.090617)

bivslice-pv-loop-CA-fast

Tags: FAST MECHANICS PARALLEL

Checks:

  • Compare against stored reference: max_error(cav.LV.csv)
  • Compare against stored reference: max_error(cav.RV.csv)
  • Compare against stored reference: max_error(x.dynpt.gz)

Last run: 2024-02-29 01:06:37.072060, revision {‘base’: ‘cbf8efd0’}, dependency revisions {PT_C: 31642c1e,cvsys: 593686bc,eikonal: 5fbbfda3,elasticity: 4d92ddfc}

Runtime: 0:00:33.887314
**** ALL FAILED ****
  FAIL max_error(cav.LV.csv): 2.100999999999999
  FAIL max_error(cav.RV.csv): 0.9080000000000013
  ERROR max_error(x.dynpt.gz):
ValueError: operands could not be broadcast together with shapes (39897,) (12870,)
Backtrace:
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 175, in __call__
    return self.check(*args, **kwargs)
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 218, in check
    cost = self.cost(refdata.flatten(), testdata.flatten())
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/cost.py", line 36, in max_error
    return np.max(np.abs(array1 - array2))

Last passed: No passes found in history (earliest 2024-02-01 01:07:01.079278)

bivslice-pv-loop-CA-medium-mesh

Tags: MEDIUM MECHANICS PARALLEL

Checks:

  • Compare against stored reference: max_error(cav.LV.csv)
  • Compare against stored reference: max_error(cav.RV.csv)
  • Compare against stored reference: max_error(x.dynpt.gz)

Last run: 2024-02-29 01:07:11.012079, revision {‘base’: ‘cbf8efd0’}, dependency revisions {PT_C: 31642c1e,cvsys: 593686bc,eikonal: 5fbbfda3,elasticity: 4d92ddfc}

Runtime: 0:07:05.360563
**** ALL FAILED ****
  ERROR max_error(cav.LV.csv):
ValueError: operands could not be broadcast together with shapes (41720,) (33210,)
Backtrace:
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 175, in __call__
    return self.check(*args, **kwargs)
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 218, in check
    cost = self.cost(refdata.flatten(), testdata.flatten())
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/cost.py", line 36, in max_error
    return np.max(np.abs(array1 - array2))
  ERROR max_error(cav.RV.csv):
ValueError: operands could not be broadcast together with shapes (41720,) (33210,)
Backtrace:
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 175, in __call__
    return self.check(*args, **kwargs)
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 218, in check
    cost = self.cost(refdata.flatten(), testdata.flatten())
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/cost.py", line 36, in max_error
    return np.max(np.abs(array1 - array2))
  ERROR max_error(x.dynpt.gz):
ValueError: operands could not be broadcast together with shapes (2184840,) (0,)
Backtrace:
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 175, in __call__
    return self.check(*args, **kwargs)
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/check.py", line 218, in check
    cost = self.cost(refdata.flatten(), testdata.flatten())
  File "/data/prassl_src/carpautotest/repos/carputils/carputils/testing/cost.py", line 36, in max_error
    return np.max(np.abs(array1 - array2))

Last passed: No passes found in history (earliest 2024-02-01 01:07:34.458489)

bivslice-active-fast

Tags: FAST MECHANICS PARALLEL

Checks:

  • Compare against stored reference: max_error(x.dynpt.gz)

Last run: 2024-02-29 01:14:16.626506, revision {‘base’: ‘cbf8efd0’}, dependency revisions {PT_C: 31642c1e,cvsys: 593686bc,eikonal: 5fbbfda3,elasticity: 4d92ddfc}

Runtime: 0:00:21.324108
ALL PASSED
  PASS max_error(x.dynpt.gz): 0.0078125