  Knitting interloops one-dimensional yarns into three-dimensional fabrics that
exhibit behaviours beyond their constitutive materials. How extensibility and
anisotropy emerge from the hierarchical organisation of yarns into knitted
fabrics has long been unresolved. We sought to unravel the mechanical roles of
tensile mechanics, assembly and dynamics arising from the yarn level on fabric
nonlinearity by developing a yarn-based dynamical model. This physically
validated model captures the fundamental mechanical response of knitted
fabrics, analogous to flexible metamaterials and biological fiber networks due
to geometric nonlinearity within such hierarchical systems. Fabric anisotropy
originates from observed yarn-yarn rearrangements during alignment dynamics and
is topology-dependent. This yarn-based model also provides a design space of
knitted fabrics to embed functionalities by varying geometric configuration and
material property in instructed procedures compatible to machine manufacturing.
Our hierarchical approach to build up a knitted fabrics computationally
modernizes an ancient craft and represents a first step towards mechanical
programmability of knitted fabrics in wide engineering applications.
