  We introduce a new Lagrangian smooth-particle method to model the growth and
drift of pebbles in protoplanetary disks. The Lagrangian nature of the model
makes it especially suited to follow characteristics of individual (groups of)
particles, such as their composition. In this work we focus on the water
content of solid particles. Planetesimal formation via streaming instability is
taken into account, partly based on previous results on streaming instability
outside the water snowline that were presented in Schoonenberg & Ormel (2017).
We validate our model by reproducing earlier results from the literature and
apply our model to steady-state viscous gas disks (with constant gas accretion
rate) around stars with different masses. We also present various other models
where we explore the effects of pebble accretion, the fragmentation velocity
threshold, the global metallicity of the disk, and a time-dependent gas
accretion rate. We find that planetesimals preferentially form in a local
annulus outside the water snowline, at early times in the lifetime of the disk
($\lesssim$$10^{5} \: \rm{yr}$), when the pebble mass fluxes are high enough to
trigger the streaming instability. During this first phase in the planet
formation process, the snowline location hardly changes due to slow viscous
evolution, and we conclude that assuming a constant gas accretion rate is
justified in this first stage. The efficiency of converting the solids
reservoir of the disk to planetesimals depends on the location of the water
snowline. Cooler disks with a closer-in water snowline are more efficient at
producing planetesimals than hotter disks where the water snowline is located
further away from the star. Therefore, low-mass stars tend to form
planetesimals more efficiently, but any correlation may be overshadowed by the
spread in disk properties.
