carputils.mesh
.block_boundary_condition
orphan: |
---|
carputils.mesh.
block_boundary_condition
(block, entity, index, coord, lower=True, bath=False, verbose=False)Generate a boundary condition definition for a Block
.
Given a Block
, generate a set of openCARP options defining a boundary
condition on one of the faces of the mesh. The face at the lower or upper
bound of the specified coordinate is ‘encased’ in a box surrounding the
selected surface at half its resolution.
For example, for the default origin-centred box of size (1,1,1) and resolution 0.1:
>>> geom = Block()
calling block_boundary_condition()
with coord=’x’ and lower=False:
>>> block_boundary_condition(geom, 'stimulus', 0, 'x', False)
will generate a BC for 0.45<=x<=0.55, -0.55<=y<=0.55 and -0.55<=z<=0.55.