  We present idealized numerical simulations of prestellar gravitational
collapse of a moderate initial filamentary perturbation with an additional
central ellipsoidal enhancement (a core) considering a uniform, and a
stratified background, the latter representing flattened clouds. Both
simulations maintain the filamentary structure during the collapse, developing
a hierarchical accretion flow from the cloud to the plane; from there to the
filament, and from the filament to the core. The flow changes direction
smoothly at every step of the hierarchy, with no density divergence nor a shock
developing at the filament's axis during the studied prestellar evolution. The
flow drives accretion onto the central core and drains material from the
filament, slowing down the growth of the latter. As a consequence, the ratio of
the central density of the core to the filament density increases in time,
diverging at the time of singularity formation in the core. The stratified
simulation produces the best match for observed Plummer-like radial column
density profiles of filaments, while the uniform simulation does not produce a
flat central density profile. This result supports recent suggestions that MCs
may be preferentially flattened structures. We examine the possibility that the
filamentary flow might approach a quasi-stationary regime in which the radial
accretion onto the filament is balanced by the longitudinal accretion onto the
core. A simple argument suggests that such a stationary state may be an
attractor for the system. Our simulations, do not attain this stationary stage,
but appear to be approaching it during the prestellar stage.
