Implementing Continuous Tow Shearing Algorithm for Complex Composite Manufacturing
An exploration of defect-free fiber placement for complex composite parts, based on recent research from the University of Bristol.
Introduction
Manufacturing complex composite parts with curved fiber paths has always been challenging.
The conventional Automated Fiber Placement (AFP) process often produces defects like wrinkles, gaps, and overlaps when laying down carbon fiber tows on curved surfaces.
These defects can significantly impact the structural performance of composite parts.
A groundbreaking paper from the Bristol Composites Institute (University of Bristol) presents a novel approach called Continuous Tow Shearing (CTS) that enables defect-free fiber steering on complex 3D surfaces.
The researchers developed a new head control algorithm that uses both in-plane shear and out-of-plane twisting deformations to manipulate carbon fiber tows, effectively eliminating common manufacturing defects.
In this article, I'll share my Python implementation of the core algorithms described in the paper, showing how to generate optimized toolpaths for CTS manufacturing of composite parts.
The Bristol University Research
The paper, published in Composites Part A in April 2024, demonstrates a remarkable improvement over traditional AFP methods.
While AFP struggles with steering radii below 250mm due to in-plane bending deformation, the CTS approach achieves defect-free layup even with much tighter curves.
The key innovation is modeling the fiber tow as a pin-jointed strip (PJS) that can both shear in-plane and twist out-of-plane.
This allows the tow to follow complex curved paths while maintaining consistent fiber lengths - eliminating the root cause of typical manufacturing defects.
Python Implementation
Let's walk through implementing the core algorithms in Python. The complete code is available on [GitHub](https://github.com/yvanblanchard/CTS).
Building the Free-form Surface
First, we need to create a doubly-curved surface that will serve as our manufacturing tool. The paper uses a saddle-like shape with controlled curvature:
class Surface:
def __init__(self):
# Surface parameters from paper Fig. 6
self.length = 544.0 # mm (X dimension)
self.width = 394.0 # mm (Y dimension)
self.height = 110.0 # mm (Z dimension)
# Shape parameters
self.A = 0.5 # amplitude coefficient
self.B = 0.3 # twist coefficient
def evaluate(self, u, v):
"""Evaluate surface point at parameters (u,v)"""
u_norm = u / (self.width/2)
v_norm = v / (self.length/2)
# Calculate saddle shape with twist
z_saddle = self.height * self.A * (u_norm**2 - v_norm**2)
z_twist = self.height * self.B * (u_norm * v_norm)
return np.array([u, v, z_saddle + z_twist])
Generating Reference Path and Shifting Direction
The reference path defines where we want to place fibers. We use a quadratic Bézier curve projected onto our surface:
def generate_reference_path(surface, step_length=25.0, num_points=10):
"""Generate reference path with enforced step length"""
current_point = surface.evaluate(0, 0)
reference_points = [current_point]
# Define base direction with controlled curvature
base_direction = np.array([0, 1, 0])
for i in range(num_points - 1):
direction = base_direction + np.array([0.1 * np.sin(i * np.pi/5), 0, 0])
direction = direction / np.linalg.norm(direction)
next_point = current_point + direction * step_length
reference_points.append(next_point)
return np.array(reference_points)
Recommended by LinkedIn
Pin-Jointed Strip Algorithm
The core of the CTS approach is the pin-jointed strip model that maintains consistent tow width while allowing shear deformation:
class PinJointedStrip:
def __init__(self, surface, tow_width, segment_length):
self.surface = surface
self.w = tow_width
self.d = segment_length
def find_Q_point(self, P_current, P_next, Q_prev):
"""Find next Q point using sphere intersection method"""
# Get intersection circle parameters
C0, r0, v = self.sphere_intersector.find_intersection_circle(
P_next, Q_prev, self.w, self.d)
if C0 is None:
return None
# Calculate surface intersection point
Q = self.find_surface_intersection(C0, r0, v)
return Q
Analyzing Path Curvature
To ensure manufacturability, we analyze the (discrete) curvature along the generated paths, and then plot the curvature radius for potential wrinkles defects identification:
def calculate_curvature_from_points(points):
"""Calculate curvature using three consecutive points method"""
radii = np.zeros(len(points))
for i in range(1, len(points)-1):
p1, p2, p3 = points[i-1:i+2]
# Calculate vectors and distances
a = np.linalg.norm(p2 - p1)
b = np.linalg.norm(p3 - p2)
c = np.linalg.norm(p3 - p1)
# Calculate radius using triangle area method
s = (a + b + c) / 2.0
area = np.sqrt(s * (s-a) * (s-b) * (s-c))
if area > 1e-10:
radii[i] = (a * b * c) / (4.0 * area)
else:
radii[i] = float('inf')
return radii
Visualization
Finally, we visualize the results using Plotly for interactive 3D plotting:
def visualize_intersection(self, P_points, Q_points, reference_path):
"""Create interactive 3D visualization"""
fig = go.Figure()
# Add surface
X, Y, Z = self.create_surface_mesh()
fig.add_trace(go.Surface(x=X, y=Y, z=Z))
# Add paths with curvature coloring
radii = calculate_curvature_from_points(reference_path)
# Add reference path points
fig.add_trace(go.Scatter3d(
x=ref_path[:,0], y=ref_path[:,1], z=ref_path[:,2],
mode='markers+lines'
))
fig.show()
Results and Future Work
The implementation successfully generates toolpaths that maintain consistent fiber spacing and orientation while following complex curved paths on doubly-curved surfaces.
The script can highlights the intermediate construction data (intersection spheres, etc), to ease debug, especially when dealing with other complex base surface or reference paths.
The curvature analysis helps identify potential manufacturing challenges and optimize the paths accordingly.
One key area for future work is integrating the fiber direction information with Finite Element Analysis (FEA) tools.
This would enable structural optimization that accounts for both manufacturing constraints and mechanical performance requirements.
This idea would be to map the true fiber directions on a structural mesh for Calculix open-source solver.
Conclusion
The Continuous Tow Shearing approach represents a significant advancement in composite manufacturing technology. By implementing the algorithms in Python, we can:
1. Generate optimized toolpaths for any complex geometries, easily by scripting
2. Analyze manufacturability through curvature calculations
3. Visualize results, compare with other manuafcturing process paths (AFP)
The next step will be to develop additional feature to transfer manufacturing data for structural analysis (FEA).
The code implementation is available here. For more details about the original research, refer to the paper "Continuous tow shearing for the automated manufacture of defect-free complex 3D geometry composite parts" from the Bristol Composites Institute.
Instructif !
Gustavo Asai
Amazing!