  Recently, seven Earth-sized planets were discovered around the M-dwarf star
TRAPPIST-1. Thanks to transit-timing variations, the masses and therefore the
bulk densities of the planets have been constrained, suggesting that all
TRAPPIST-1 planets are consistent with water mass fractions on the order of
10%. These water fractions, as well as the similar planet masses within the
system, constitute strong constraints on the origins of the TRAPPIST-1 system.
In a previous work, we outlined a pebble-driven formation scenario. In this
paper we investigate this formation scenario in more detail. We used a
Lagrangian smooth-particle method to model the growth and drift of pebbles and
the conversion of pebbles to planetesimals through the streaming instability.
We used the N-body code \texttt{MERCURY} to follow the composition of
planetesimals as they grow into protoplanets by merging and accreting pebbles.
This code is adapted to account for pebble accretion, type-I migration, and gas
drag. In this way, we modelled the entire planet formation process (pertaining
to planet masses and compositions, not dynamical configuration). We find that
planetesimals form in a single, early phase of streaming instability. The
initially narrow annulus of planetesimals outside the snowline quickly broadens
due to scattering. Our simulation results confirm that this formation pathway
indeed leads to similarly-sized planets and is highly efficient in turning
pebbles into planets ($\sim$50% solids-to-planets conversion efficiency). [...]
The water content of planets resulting from our simulations is on the order of
10%, and our results predict a `V-shaped' trend in the planet water fraction
with orbital distance: from relatively high (innermost planets) to relatively
low (intermediate planets) to relatively high (outermost planets).
