Houdini 20.5 Nodes Dynamics nodes

Particle Fluid Solver dynamics node

Evolves an object as a particle fluid object.

This node type is deprecated. It is scheduled to be deleted in an upcoming revision of Houdini.

Use the POP Fluid node instead.

(Since version 17.5.)

On this page

The Particle Fluid Solver DOP evolves an object dynamically as a particle fluid.

Changing from Metre Kilogram Second(MKS) to Centimetre Kilogram Second(CKS)

MKS is a physical system of units that expresses any given measurement using fundamental units of the metre, kilogram, and/or second. Unfortunately, the particle fluid object/solver does not expose the correct units to update its defaults so it does not change automatically. Going from MKS to CKS, you need to manually adjust the offending parms. The value given is the result of converting to CKS, the value in the parentheses is the scale factor used:

Particle Fluid Object

  • Particle Separation: 10 (* 100)

  • Rest Density: 1e-3 (/ 1003)

Particle Fluid Emitter

  • Size: 100 x 100

  • Velocity: 100,0,0

Particle Fluid Solver

  • Gas Constant: 0.025 (* 100 and / 1003)

  • Viscosity: 0 (*10)

Gravity

  • 981 (* 100)

    When converted to CKS, all new gravity nodes will have this proper value

The * 100 makes the meter measures become centimetre measures.

The / (100*100*100) is necessary because density measures kg/m3 and we are now measuring the denominator in centimetres.

Gas Constant is a force, so like Gravity, is * 100. However, the particle fluid solver applies forces to the density, not to the mass, so while our mass is the same (since kg == kg), our density isn’t, so the 1003 factor shows up again.

If you want CGS (centimetre grams seconds), rest density should be 1, the gas constant 25, and viscosity increased by a factor of 100 compared to the MKS system.

Parameters

Substeps

Min Substeps

The Particle Fluid solver will always enforce this minimum number of substeps.

This should only rarely need to be changed.

Max Substeps

The Particle Fluid solver will not break the simulation down in to more substeps than this.

It is a very good idea to always have a maximum to ensure frames will be finished regardless of their complexity. Lowering the ceiling can ensure a maximum computation time at the expense of accuracy.

CFL Condition

The CFL condition is a factor used to automatically determine what size substep the scene requires. The idea is to control the distance that a particle in the particle fluid object can travel in a given substep.

When this parameter is set to 0.5, for instance, the solver will set the length of each substep such that no particle travels more than 50% of its particle separation in a given substep.

Internal Forces

Tip

Use the point attribute “fluid_forcescale” to control the magnitude of internal fluid forces acting on each particle individually.

This is useful when attempting to control the behavior of fluid particles using POPs, as the internal forces can be scaled back to allow for better control of the particles.

Enable Pressure Force

Enables or disables pressure forces within the particle fluid object being evolved.

Pressure forces act to push particles apart or pull them together to bring them closer to the rest density stored in the particle fluid object.

Pressure Type

The type of pressure force to apply to the system.

Gas Pressure

Applies a fairly simple pressure force which tends to allow for a fairly high degree of compressibility in the evolving fluid.

Liquid Pressure

Applies a somewhat more complicated pressure force which ensures a more liquid-like particle distribution with less compressibility.

Gas Constant

Controls the magnitude of pressure forces applied between pairs of particles.

This parameter effectively controls the compressibility of the fluid. The default value has been chosen because it responds well when settling under standard gravity forces.

If the fluid is required to settle under a gravity force different from the default gravity force, this parameter should be adjusted accordingly. For instance, if the magnitude of the gravity force is scaled up five times, then this parameter should also be scaled up five times.

Enable Viscosity Force

Enables or disables viscosity forces acting between pairs of particles.

Viscosity has the effect of smoothing the particle velocity field, and a highly viscous fluid will appear thicker and less willing to flow than a fluid with low viscosity.

Enable Surface Tension Force

Enables or disables surface tension forces acting between pairs of particles.

Surface tension has the effect of pulling in particles close to the fluid surface. This tends to round out the particle field.

Enable Elastic Force

Enables or disables elastic forces acting between pairs of particles.

Elastic forces act as spring-like bonds between pairs of particles that push particles apart when they get too close together, and pull them together when they get too far apart.

Elasticity Constant

Controls the magnitude of elastic forces acting between pairs of particles.

Plasticity Constant

As the fluid evolves the rest lengths of bonds between pairs of particles is allowed to change as the fluid is stretched or compressed.

This parameter controls the magnitude of changes to these elastic rest lengths. A larger plasticity constant results in a larger deformation of pairwise elastic bonds when the particle set is stretched or compressed.

Plastic Yield Ratio

Controls the amount of deformation that can be resisted by an elastic bond between a pair of particles.

For instance, if this parameter is set to 0.3, then an elastic bond can be stretched or compressed by 30% of its rest length before it begins to deform.

Clamp Number of Springs

Limits the number of particle to particle springs that are created. Since all particles need to have the same size attribute, without clamping many particles close together might result in significant memory usage.

Max Springs

The maximum number of springs that can attach to any one particle. If a particle has more close neighbors than this, they are connected in a closest-first basis.

Use Particle IDs

Determines if the particle springs should store particle id numbers or point numbers. Point numbers are faster to work with, but if points are deleted the springs become invalid.

Advanced

This tab controls details related to the numerical simulation algorithms used to solve the fluid.

Simulation Method

The numerical simulation method used to control the fluid simulation. See the helpcard for the Gas Integrator DOP for more information on these methods.

Error Tolerance

Tolerance for error in certain simulation methods. See the helpcard for the Gas Integrator DOP for more information on these methods.

Substep Repetition Tolerance

Tolerance for substep repetition, which is performed by certain simulation methods. See the helpcard for the Gas Integrator DOP for more information on these methods.

Advection Method

The technique used to update particle positions. Standard

Particle positions are updated directly using the current particle velocity and time step length.

XSPH

Particle positions are updated using a velocity which is blended between each particle’s current velocity and the average velocity of its neighbors.

XSPH Constant

When Advection Method is set to “XSPH”, this constant controls the degree of blending between a particle’s velocity and the velocity of its neighbors. A value of zero ignores neighbor velocities entirely, while larger values increasingly make use of neighbor velocities.

Build Neighbour List

To accelerate repeated searches for close particles, a per-particle list of close particles can be built. This consumes a fair bit of memory, however.

Integrate Orientation

When this toggle is disabled, the integrator only affects the position and velocity attributes of particles in response to values set in the force attribute by the node’s input solvers.

When this toggle is enabled, the integrator also affects the orientation and angular velocity attributes of particles in response to values set in the torque attribute by the node’s input solvers.

Enable Collision Detection

Enables collision detection/response between particles in the system and rigid body objects.

Distribution

When distributing a particle fluid simulation it is important that each machine uses the same number of substeps. These distribution parameters will synchronize the substeps.

Tracker Address

What machine will run the simtracker.py process for synchronization. If this is blank, there will be no attempt at synchronization or data transfer.

Tracker Port

The port specified when starting the simtracker.py process for communication.

Job Name

The job name to describe this synchronization or data exchange event. By using different job names one can have machines part of separate data-exchange and synchronization events.

Slice/Peer

The slice number that this machine should report itself as. Each machine connecting under the job name should have its own unique slice number. Sometimes this can be inferred from the operation so this parameter will be absent.

Number of Slice/Number of Peers

Total number of machines that have to synchronize. Sometimes this can be determined from the operation, so this parameter will be absent.

Parameter Operations

Each data option parameter has an associated menu which specifies how that parameter operates.

Use Default

Use the value from the Default Operation menu.

Set Initial

Set the value of this parameter only when this data is created. On all subsequent timesteps, the value of this parameter is not altered. This is useful for setting up initial conditions like position and velocity.

Set Always

Always set the value of this parameter. This is useful when specific keyframed values are required over time. This could be used to keyframe the position of an object over time, or to cause the geometry from a SOP to be refetched at each timestep if the geometry is deforming.

You can also use this setting in conjunction with the local variables for a parameter value to modify a value over time. For example, in the X Position, an expression like $tx + 0.1 would cause the object to move 0.1 units to the right on each timestep.

Set Never

Do not ever set the value of this parameter. This option is most useful when using this node to modify an existing piece of data connected through the first input.

For example, an RBD State DOP may want to animate just the mass of an object, and nothing else. The Set Never option could be used on all parameters except for Mass, which would use Set Always.

Default Operation

For any parameters with their Operation menu set to Use Default, this parameter controls what operation is used.

This parameter has the same menu options and meanings as the Parameter Operations menus, but without the Use Default choice.

Make Objects Mutual Affectors

All objects connected to the first input of this node become mutual affectors.

This is equivalent to using an Affector DOP to create an affector relationship between * and * before connecting it to this node. This option makes it convenient to have all objects feeding into a solver node affect each other.

Group

When an object connector is attached to the first input of this node, this parameter can be used to choose a subset of those objects to be affected by this node.

Data Name

Indicates the name that should be used to attach the data to an object or other piece of data. If the Data Name contains a “/” (or several), that indicates traversing inside subdata.

For example, if the Fan Force DOP has the default Data Name “Forces/Fan”. This attaches the data with the name “Fan” to an existing piece of data named “Forces”. If no data named “Forces” exists, a simple piece of container data is created to hold the “Fan” subdata.

Different pieces of data have different requirements on what names should be used for them. Except in very rare situations, the default value should be used. Some exceptions are described with particular pieces of data or with solvers that make use of some particular type of data.

Unique Data Name

Turning on this parameter modifies the Data Name parameter value to ensure that the data created by this node is attached with a unique name so it will not overwrite any existing data.

With this parameter turned off, attaching two pieces of data with the same name will cause the second one to replace the first. There are situations where each type of behavior is desirable.

If an object needs to have several Fan Forces blowing on it, it is much easier to use the Unique Data Name feature to ensure that each fan does not overwrite a previous fan rather than trying to change the Data Name of each fan individually to avoid conflicts.

On the other hand, if an object is known to have RBD State data already attached to it, leaving this option turned off will allow some new RBD State data to overwrite the existing data.

Solver Per Object

The default behavior for solvers is to attach the exact same solver to all of the objects specified in the group. This allows the objects to be processed in a single pass by the solver, since the parameters are identical for each object.

However, some objects operate more logically on a single object at a time. In these cases, one may want to use $OBJID expressions to vary the solver parameters across the objects. Setting this toggle will create a separate solver per object, allowing $OBJID to vary as expected.

Setting this is also required if stamping the parameters with a Copy Data DOP.

Inputs

Fluid to Solve

The simulation object to evolve as a particle fluid.

Prequel Solvers

Note

This input has be deprecated. Solvers connected to this input are now run at the same time as solvers connected to the Sequel Solvers input (the Prequel Solvers input is processed first).

Sequel Solvers

Additional solvers to apply at the end of each substep in the simulation that do not directly affect the particle fluid object itself.

Solvers such as the Particle Fluid Emitter or Particle Fluid Sink should be connected here.

Additional Force Solvers

Additional solvers that apply forces to the particle fluid object; that is, solvers that modify the force point attribute of particles in the object. An example of such a solver is the Gas Vorticle Forces node.

Outputs

First Output

The operation of this output depends on what inputs are connected to this node. If an object stream is input to this node, the output is also an object stream containing the same objects as the input (but with the data from this node attached).

If no object stream is connected to this node, the output is a data output. This data output can be connected to an Apply Data DOP, or connected directly to a data input of another data node, to attach the data from this node to an object or another piece of data.

Examples

Particle fluid buoyancy

This example demonstrates how to couple the Particle Fluid with an RBD object so they both affect each other. The result is a buoyant sphere.

ViscoelasticExample

This example demonstrates the use of viscous and elastic forces in a particle-based fluid to generate viscoelastic fluid behaviour. The result is a fluid-like object that tends to resist deformation and retain its shape.

ViscousFlow

This example demonstrates highly viscous fluid flow using particle-based fluids. Fluids of this form could be used to simulate slowly-flowing fluids such as lava or mud.

WorkflowExample

This somewhat complicated example is meant to demonstrate a simple workflow for simulating, storing, surfacing and rendering a particle fluid simulation. Three geometry nodes in the example are named Step 1, Step 2 and Step 3 according to the order in which they are to be used. They write out particle geometry to disk, read the geometry in and surface it, and read the surfaced geometry from disk, respectively. The example also has shaders and a camera built in so that it can be easily rendered.

The fluid animated in this scene models a highly-elastic gelatin-like blob of fluid.

See also

Dynamics nodes