Computer implemented method for simulating the behavior of a knitted fabric at yarn level, the method comprising: - retrieving structural information of the knitted fabric made of knit and/or purl stitches, said structural information at least comprising the layout of the knitted fabric including density of the stitches in course and wale directions and z a type of each stitch; - applying boundary conditions at a plurality of time steps; - representing each knit or purl stitch using four contact nodes, located at the end two stitch contacts, of the stitches, between pair of loops, wherein each contact node is described by a 3D position coordinate (x) representing the position of the contact node and two sliding coordinates (u, v) representing arc lengths of two yarns, of the stitches, in contact; - measuring forces on each contact node based on a force model, the forces being measured on both the 3D position coordinate (x) and the sliding coordinates (u, v) of the contact node, and the force model at least including wrapping forces to capture an interaction of yarns at the stitches; - calculating a movement of each contact node at the plurality of time steps using equations of motion derived using the Lagrange-Euler equations, and numerically integrated over time, wherein the equations of motion account for mass density distributed uniformly along yarns, as well as the measured forces and the boundary conditions; and - providing a computer graphic display of a yarn-level representation of the knitted fabric comprising a nonlinear deformation resulting from the calculated movement; wherein the retrieved structural information of the knitted fabric includes stitch wrapping stiffness (k w) as an empirically set stiffness, and wherein for the force model the wrapping forces at each stitch contact include the computation of an elastic potential V according to the following equation: V = 1 2 k w L ψ − ψ 0 2 wherein ψ is the wrapping angle, ψ 0 is the rest angle and L is the rest length of a respective stitch contact of said two stitch contacts. - retrieving structural information of the knitted fabric made of knit and/or purl stitches, said structural information at least comprising the layout of the knitted fabric including density of the stitches in course and wale directions and z a type of each stitch; - applying boundary conditions at a plurality of time steps; - representing each knit or purl stitch using four contact nodes, located at the end two stitch contacts, of the stitches, between pair of loops, wherein each contact node is described by a 3D position coordinate (x) representing the position of the contact node and two sliding coordinates (u, v) representing arc lengths of two yarns, of the stitches, in contact; - measuring forces on each contact node based on a force model, the forces being measured on both the 3D position coordinate (x) and the sliding coordinates (u, v) of the contact node, and the force model at least including wrapping forces to capture an interaction of yarns at the stitches; - calculating a movement of each contact node at the plurality of time steps using equations of motion derived using the Lagrange-Euler equations, and numerically integrated over time, wherein the equations of motion account for mass density distributed uniformly along yarns, as well as the measured forces and the boundary conditions; and - providing a computer graphic display of a yarn-level representation of the knitted fabric comprising a nonlinear deformation resulting from the calculated movement; wherein the retrieved structural information of the knitted fabric includes stitch wrapping stiffness (k w) as an empirically set stiffness, and wherein for the force model the wrapping forces at each stitch contact include the computation of an elastic potential V according to the following equation: V = 1 2 k w L ψ − ψ 0 2 wherein ψ is the wrapping angle, ψ 0 is the rest angle and L is the rest length of a respective stitch contact of said two stitch contacts.