Model.blocknodeupdate#

Model.blocknodeupdate(name, function, type, start, end, number, factor)#

Updates the finite difference nodes in a finite difference block.

Parameters:
  • name (hwString) – The name of the block.

  • function (int) –

    0 - add nodes to an index.

    1 - remove nodes from an index.

    2 - remove all nodes from an index.

  • type (int) –

    The index. Not used, if function is 2.

    0 - i

    1 - j

    2 - k

  • start (double) – The starting position of the nodes to be added or removed. Not used, if function is 2.

  • end (double) – The ending position of the nodes to be added or removed. Not used, if function is 2.

  • number (int) – The number of nodes to add. Not used, if function is 1 or 2.

  • factor (double) – The expansion factor. Not used, if function is 1 or 2.

Example#

Add 50 nodes uniformly in the k direction to an existing block named block1#
import hm

model = hm.Model()

model.blocknodeupdate(
    name="block1", function=0, type=2, start=-10.0, end=110.0, number=50, factor=1.0
)