You can dynamically resize the Size and Resolution of a fluid container using the fluid Auto Resize attributes. See Dynamically resize a fluid container.
To set a fluid container to dynamically resize
Auto Resize Threshold uses the current Density value in the second row of voxels from the containers edge to resize the fluid. See Auto Resize Threshold.
If your fluid container expands beyond the point you want, increase the Auto Resize Threshold value. If the fluid container contracts too quickly, decrease the value.
For example, in an animated fluid effect, such as a missile vapor trail in which the fluid density dissipates quickly, use a low Auto Resize Threshold values. For a fire or flame effect in which the fluid density is relatively high, use a high Auto Resize Threshold value.
Use other Auto Resize attributes to modify the behavior of the resized fluid, such as turning on Resize To Emitter so that the container moves and resizes to include an animated emitter. See Auto Resize.