ComputationalPhysiology / simcardems

Simula Cardiac ElectroMechanics Solver
http://computationalphysiology.github.io/simcardems
GNU Lesser General Public License v2.1
11 stars 11 forks source link

Unable to apply traction and spring values #135

Closed IlsevanHerck closed 1 year ago

IlsevanHerck commented 1 year ago

Expected Behavior

The traction (Neumann boundary condition) and spring (Robin boundary condition) can be set from the command line. These values should change the boundary conditions on the right side of the slab-mesh.

Actual Behavior

The values can be set and are passed to boundary_conditions.py, but are not applied to the mesh. The Dirichlet boundary conditions (for example --fix_right_plane) can be set from the command line.

Steps to Reproduce the Problem

  1. python3 -m simcardems run -o "results" -T 200 --traction 10 "demos/geometries/slab.h5"
  2. Compare results to simulation without traction applied. The results will be identical.

Specifications

IlsevanHerck commented 1 year ago

@finsberg Could this be due to the boundary conditions being applied to different parts of the mesh (facets vs nodes)?

finsberg commented 1 year ago

The problem is that we have actually forgotten to apply the external work. Compare https://github.com/ComputationalPhysiology/simcardems/blob/85990487e0d0376a4febf310a9f31a7475840772/src/simcardems/mechanics_model.py#L84 with https://github.com/finsberg/pulse/blob/38a5a50ab03901743c9db531acba3f3bc1d1237a/pulse/mechanicsproblem.py#L244