Skip to content

Models and equations

OpenWAAM has three models that hand results to each other.

Scale Module Resolves Typical size and cost
Melt pool openwaam.meltpool free surface, flow, melting and freezing of one bead 25 x 6 x 9 mm, 0.2-0.4 mm cells, minutes to an hour
Part openwaam.partscale temperature history, distortion and residual stress of a whole build 100-500 mm, 1-2 mm voxels, minutes
Cell openwaam.robot bead spacing, toolpath, robot joint motion, programs seconds

The melt-pool model predicts the bead cross-section. The bead sets layer height and step-over for the toolpath. The robot planner turns the toolpath into the motion the arm can execute. The part-scale thermal model follows that motion, and the distortion model is built on the thermal model's geometry.

1. Melt-pool model

One-fluid volume-of-fluid formulation. alpha is the volume fraction of metal (solid or liquid) in a cell; the rest is shielding gas.

Mass and momentum (incompressible, variable density)

div u = 0
rho (du/dt + u . grad u) = -grad p + div(mu grad u) + rho g
                           - rho_m beta (T - T_l) g alpha      buoyancy
                           - A(T, alpha) u                     mushy-zone drag
                           + f_sigma + f_M + f_arc + f_L       below

with rho = alpha rho_m + (1 - alpha) rho_g. Staggered grid, explicit second-order limited upwind advection, explicit viscosity, and a pressure projection div((1/(rho + dt A)) grad p) = div u* / dt solved by preconditioned conjugate gradients. Putting the drag inside the projection coefficient means frozen metal is a true no-flow region, not a region that the pressure can push through.

Mushy zone. A = C S^2 / ((1 - S)^3 + 1e-3) with S the solid fraction (Carman-Kozeny form). Faces with S >= 0.95 are blocked outright.

Free surface. THINC/WLIC direction-split advection (Xiao et al. 2005; Yokoi 2007) with the dilatation correction of Weymouth and Yue (2010), which keeps metal volume conserved to the tolerance of the pressure solve.

Surface tension. Continuum surface force (Brackbill et al. 1992) on cell faces, discretised the same way as the pressure gradient so a static drop is in balance. Curvature comes from height functions where a 3 x 3 x 7 stencil is a clean graph, and from the smoothed volume fraction elsewhere.

f_sigma = sigma(T) kappa grad(phi) w
f_M     = dsigma/dT (grad T - n (n . grad T)) |grad phi| w      Marangoni
f_arc   = P_arc exp(-r^2 / 2 sigma_p^2) grad(phi) w,   P_arc = mu0 I^2 / (4 pi^2 sigma_j^2)

w = 2 rho / (rho_m + rho_g) puts the force on the metal side of the smeared interface.

Contact line. phi is alpha in fluid cells. With wetting: neutral (default) frozen metal is treated as a wall for these forces: phi is extended into the solid with zero normal gradient, so the liquid surface meets solid metal at 90 degrees. With wetting: complete phi = alpha everywhere, liquid wets solid metal fully and only freezing stops it spreading. Real bead toes sit in between and depend on surface condition; this is the single largest modelling choice for bead width and height.

Lorentz force. Closed-form solution for a Gaussian current density entering a plate of thickness L (Kou and Sun 1985; Tsao and Wu 1988):

F_r = -mu0 I^2 / (4 pi^2 sigma_j^2 r) exp(-r^2/2 sigma_j^2) (1 - exp(-r^2/2 sigma_j^2)) (1 - z/L)^2
F_z =  mu0 I^2 / (4 pi^2 L r^2) (1 - exp(-r^2/2 sigma_j^2))^2 (1 - z/L)

Energy. Volumetric enthalpy E = alpha rho_m h_m(T) + (1 - alpha) rho_g c_g T is advected with the same fluxes as alpha, so metal carries its own enthalpy across the interface. h_m(T) is piecewise linear with the latent heat spread between solidus and liquidus, and is inverted exactly for T.

dE/dt + div(u E) = div(k grad T) + q_arc - q_loss
  • q_arc: Gaussian flux P_s / (2 pi sigma_q^2) exp(-r^2 / 2 sigma_q^2) on the pool surface.
  • q_loss: convection, radiation and Hertz-Knudsen evaporation, applied through |grad alpha|.
  • Cut side and bottom walls of the plate conduct to ambient over a length far_field_length.

Metal transfer and the power split. The wire feeds metal volume at pi d_w^2 / 4 * WFS. It arrives at liquidus + droplet_superheat, which accounts for P_d = m_dot (h(T_drop) - h(T_amb)) of the arc power; the surface flux carries the remainder P_s = eta V I - P_d. Two modes:

  • transfer: surface (default) adds the metal continuously to the pool surface under the wire and applies the droplet impact momentum as an extra pressure. Works on any grid.
  • transfer: droplets launches spherical droplets at the detachment frequency. Needs about eight cells across a droplet.

Gas phase. The arc plasma jet is not modelled. Velocity on gas-dominated faces is relaxed to rest over gas_relaxation_time, so the gas transmits pressure and makes room for metal but has no dynamics of its own; this is the role the void plays in one-fluid free-surface codes. Detached sub-grid wisps of metal are removed and returned through the feed (volume_recycled reports how much).

Time step. Minimum of the CFL, capillary, viscous and thermal limits.

2. Part-scale thermal model

Finite-volume conduction on a voxel grid, enthalpy form, explicit in time.

dH/dt = div(k grad T) + q_Goldak,     -k dT/dn = h (T - T_inf) + eps sigma_SB (T^4 - T_inf^4)
  • Element birth. A voxel inside a bead's width x layer height section is switched on when the torch passes the nearest point of the path, at liquidus + deposit_superheat.
  • Heat source. Goldak double ellipsoid (Goldak et al. 1984) moving with the torch, renormalised on the active voxels every step so the delivered power is exact on any grid.
  • Energy bookkeeping. The enthalpy of newly born metal is charged against the arc power and the Goldak source carries the rest, so total heat input equals eta V I times arc-on time.
  • Outputs. Temperature and peak-temperature fields, probe histories, interpass temperature per layer, melt-pool size, and the cooling time through a temperature window (800 to 500 C by default).

The torch position and arc state come from a Trajectory. If the robot planner slowed the motion anywhere, the thermal model sees it.

3. Distortion: layer-wise inherent strain

Linear-elastic 8-node bricks with incompatible modes on a coarsened copy of the voxel grid. For each layer (or group of layers), in build order:

  1. activate its elements with an initial strain eps*;
  2. solve K du = f(eps*) with the plate clamped;
  3. add D (B du) to the stress of every active element, and -D eps* to the new ones.

Then the clamps are removed and the unbalanced internal forces are released.

eps* is an input. The default, -(1 - nu) sigma_y / E in-plane, is the shrinkage that leaves a fully restrained layer at yield. For quantitative work calibrate it against a measured deflection or a detailed thermo-mechanical run of a small coupon, which is how the method is used in practice.

4. Robot side

  • Bead model. Parabolic section with area pi d_w^2 WFS / (4 TS). Flat multi-bead layers use a centre distance of 0.738 w (Ding et al. 2015).
  • Toolpaths. Walls, cylinders, raster-filled blocks, per-layer contours, and outlines sliced from an STL.
  • Timing. Acceleration-limited speed profile along the path, stops where the arc switches, slow-down through corners, interpass dwells.
  • Kinematics. Standard DH forward kinematics, geometric Jacobian, damped least-squares inverse kinematics with joint limits. The task is five degrees of freedom (tip position and wire direction); rotation about the wire is left free and used to stay away from joint limits.
  • Checks. Reachability, joint-limit margin, joint speed against limits (with re-timing where a limit would be exceeded), manipulability.
  • Programs. ABB RAPID (Arc option), G-code, joint-space CSV.

Robot dynamics in PyBullet

UrdfArm builds its kinematic chain from the same URDF that PyBullet loads, so planner and physics engine agree (to 1e-6 m in the tests). BulletCell.execute then drives the joints with position-velocity motors, limited to each joint's torque, at 240 Hz against gravity and the links' inertia. The outputs are the executed joint and tool-tip motion, tracking error, peak joint torques and any contact.

The coupling to the process models is one-way, which is the physics of an arc process: the torch does not touch the part, so the part does not load the arm.

planned joints -> PyBullet -> executed tool-tip motion -> thermal model
                                                       -> temperatures painted on the deposit

The deposit enters the scene as collision boxes, one per 10 mm of bead, each created when the torch has laid it. The arm is therefore checked against the part as it exists at that moment, not against the finished shape. A contact counts as a collision if it penetrates or carries load.

Interpass dwells are simulated for half a second and then skipped; the clock still advances by the full dwell.

The upstream IRB 2600 model has no inertial data. The masses, centres of mass, inertias, joint damping and torque limits in the bundled URDF are estimates.

References

  • Brackbill, Kothe, Zemach (1992) J. Comput. Phys. 100, 335.
  • Ding, Pan, Cuiuri, Li (2015) Robot. Comput.-Integr. Manuf. 31, 101.
  • Goldak, Chakravarti, Bibby (1984) Metall. Trans. B 15, 299.
  • Kou, Sun (1985) Metall. Trans. A 16, 203.
  • Rosenthal (1946) Trans. ASME 68, 849.
  • Tsao, Wu (1988) Int. J. Heat Mass Transfer 31, 1999.
  • Weymouth, Yue (2010) J. Comput. Phys. 229, 2853.
  • Xiao, Honma, Kono (2005) Int. J. Numer. Methods Fluids 48, 1023.
  • Yokoi (2007) J. Comput. Phys. 226, 1985.
  • Chen, Yuan, Pan, Zhu, Ma, Ding, Li (2025) Int. J. Extrem. Manuf. 7, 022016 (review of WAAM simulation approaches).