Houdini 21.0 Nodes Copernicus nodes

Flow Project Non-Divergent Multigrid Copernicus node

Removes divergent components from a 2-dimensional vector field.

On this page

This node projects out divergent components of a UV layer that result in expansion or contraction. The result is a valid velocity field for an incompressible flow in two dimensions, and this operator is used for this purpose inside of Flow Block.

As a basic example, using the Distort operator to deform an image with a general direction field changes the distribution of colours, as some source areas are stretched out while others are shrunk. On the other hand, if that direction field is first passed through Flow Project Non-Divergent Multigrid, the resulting distorted image will have swirling motion applied around sinks and sources (instead of falling into or out of them). This will produce an image that has roughly the same amount of each colour as the original one.

The node can optionally take in a goal divergence layer. Positive areas of this image will produce areas of expansion in the result, while negative areas give rise to sinks. Additionally, there are inputs for a collider. The collision Mono image should be a mask: values of 1 indicate where the collider is. collisionv should store the velocity of the collider, which the pressure projection will attempt to match. Note that this uses a soft approach to incorporating collisions; if the produced velocity field is not matching the collider well enough, this operator can be iterated multiple times for better convergence.

Parameters

Collision Iterations

Number of collision iterations to perform. Higher iterations will result in better avoidance of the collision object, but will increase execution times.

Multigrid Iterations

Number of multigrid iterations to perform. Higher iterations will result in matching the goal divergence better, but will increase execution times.

X Borders

State of borders on the left and right sides of the image. Open borders allow flow to leave the image’s bounds without resistance. Closed borders act like solid walls. When set to Periodic, flow leaving through the right side re-enters on the left side (and vice versa).

Y Borders

State of borders on the bottom and top sides of the image. Open borders allow flow to leave the image’s bounds without resistance. Closed borders act like solid walls. When set to Periodic, flow leaving throgh the top side re-enters on the bottom side (and vice versa).

Inputs

v

Initial velocity field to correct.

goaldiv

Goal divergence field. The output velocity field will have sources where goaldiv is positive and sinks where it is negative.

collision

A mask layer specifying where the collider is present. Values of 1 in this layer indicate areas occuppied by the collider.

collisionv

Velocity field for the collider. If collision is provided, but there is no collisionv, then the collider will be assumed stationary.

Outputs

v

Corrected velocity field after pressure projection

pressure

The velocity field is corrected by adding the gradient of a scalar field to it. This output contains that scalar field. In the context of fluid simulations, this auxilliary scalar field corresponds to the fluid’s internal pressure.

See also

Copernicus nodes