To define a vector field function in terms of its components, specify the three scalar components inside square brackets separated by commas. Say for example you wanted to set up a field function to initialize the velocity in a reducing pipe, where the velocity would be 2 m/s in the larger diameter and 10 m/s in the smaller diameter, and the diameter changed at x=4. The field function definition would be:
[($$Centroid[0] < 4) ? 2 : 10, 0, 0]