# Sourcing

Before you can start simulating you need to get fluid into the system!

There are two way to source.

The first and easiest is to use the **Source Shape node** that comes with the HDA asset library. The tool gives you primitive shapes to source with. The advantage to using these shapes over volumes is that they are much faster to source from. However, they are limited in their simple shapes. To help this, the tool does give the the option to modify the shape using noise fields to make the source more organic. You connect these shapes to the **fourth input** of the solver.

The other way to source is by connecting **volumes or VDBs** directly into the** first input** of the solver. You can make these sources any way you want. Make sure to properly name all of your volumes as other names will not be compatible. It is case sensitive and should always be lower case.

**density****temperature****fuel****vel***(VDB vector type)***vel.x, vel.y, vel.z***(Houdini volumes type or a split vector VDB type)*

One common mistake is not including a **temperature field** in your source. This will cause the simulation to not work because no temperature equals no buoyancy, and no buoyancy means no motion. However, you can still have motion in your sim if you have initial velocities in your source using the vel fields.

The** second input **is for collisions. You need to give it a field named “collision” to mark regions where your collider exists, a field named “collisiontemperature” if you want your collider to influence the fluid upon collision, and if its a moving collider, a field named “collisionvel, or collisionvel.x, collisionvel.y, collisionvel.z”. Make sure the interior of the collision field has a value of 1 and the outside a value of 0. Remember that collisions are not compatible with multigrid project non divergent. If you plan on using collision you must change the solver to 1x type multigrid projection.

The** third input** is what I call the influence source. This is an extra source you can use to add custom turbulence and forces. It accepts a temperature, fuel, and vel field and this can be anything you want. It is just a utility.

On the solver node itself under the **sourcing tab** you can find parameters that control all of the inputs you give it. These are all multipliers on the original values. You can specify the type of sourcing per field by choosing add, replace, or maximum.

**Add** will add the source field to the sim field.

**Replace** will replace any voxel values where the source overlaps with the source’s value.

**Maximum** will choose the value of the field that has the higher value.

You can also control the time scale of the sourcing per field. This is useful if you need to control the exact timing of values.

**Time Step** will add the value of the input per second.

**Frame Step** will add the value of the input per frame.

**None** will add the value every time the solver cooks including substeps.

**Solver Time Step** is the same as time step but will also take the solver time scale into consideration.

**Solver Frame Step** is the same as frame step but will also take the solver time scale into consideration.

Collision type inputs always perform a replace operation in order to behave properly and give the right result.

There is also an extra HDA that comes with the solver called the **PSEUDO fluid source node**. This is a utility that helps covert volumes into the most efficient form for the solver node. Actually, if you look inside the solver HDA you will find this node. All it is really doing is converting the volumes into a form the solver can understand. It has three inputs identical to the solver and it will output a point cloud. You can then connect this directly to the first input of the solver and all three input will be passed down to it so don’t worry about the other two inputs on the solver when using this node.

Remember to** link the source node to the solver** using the the **solver node parameter** on the source node. This is important because the source node needs to fetch information from the solver node.

The benefit to using this rather than connecting volumes to the solver directly is that this point cloud cached out to disk and then connected to the solver is much **faster** for it to process. Note that the point cloud that is created by this node is **tied to the division size of the solver**. If you cache it out and then change your division size you will need to recache the source.