Abstract Viscous fluids are ubiquitous, and reproducing their damped motions has been in demand for many applications. The most prevalent approach to simulating viscous fluids is based on the Navier–Stokes equations and necessitates viscosity integration. However, to simulate viscous fluids in a numerically stable manner, using explicit viscosity integration severely restricts time steps and requires an excessively long period for computation. In this paper, we propose a novel particle-based Lagrangian method for efficiently simulating viscous fluids by adopting position-based constraints. Our method uses the geometric configuration of particles for the positional constraints to approximate the dynamics of viscous fluids using position-based dynamics; thus the method can plausibly generate their motions while allowing for the use of much larger time steps than those previously adopted in the viscous fluid simulations. We also propose an associated boundary-handling scheme for position-based fluids to precisely specify boundary conditions for the constraints. Additionally, we reproduce elastic deformations of materials by controlling the constraints and incorporate thermal conduction into our framework to simulate resultant changes in particle properties and phase transition in the materials. By adjusting parameters, our method can encompass complex motions of fluids with different properties in a unified framework. Several examples demonstrate the effectiveness as well as versatility of our method.