Mathech » Blog » Abaqus FEA Simulation » User Subroutines » Welding Simulation Along an Elliptical Path in Abaqus Using a DFLUX Subroutine

Welding Simulation Along an Elliptical Path in Abaqus Using a DFLUX Subroutine

Welding-Simulation-for-Elliptical-Cross-section-pipe-in-Abaqus-using-Dflux-Subroutine-1.webp — Abaqus welding simulation of an elliptical cross-section pipe with an end-to-end joint and a moving heat source along an elliptical welding path.

Moving-heat-source welding simulation is one of the most powerful capabilities in Abaqus for predicting residual stress, distortion, and the thermal history of welded components. Most tutorials demonstrate a heat source traveling in a straight line or a circle, because those paths are easy to parameterize. Real fabrication, however, often follows more complex geometries- flanges, nozzle attachments, and sealing welds that trace an ellipse.

An elliptical weld path introduces a subtlety that trips up many engineers: the torch does not move at a constant angular rate. If you naively write angle = ω·t, the heat source will race through the sharply curved ends of the ellipse and crawl along the flatter sides, giving you the wrong heat input per unit length and an unphysical weld pool.

This article explains the correct formulation and provides a complete, tested DFLUX subroutine that keeps the travel speed constant along an ellipse.

Why an Ellipse Is Not Just a Stretched Circle

For a circle of radius RRR, arc length and angle are proportional: s=Rθs = R\theta. Move at angular speed ω=v/R\omega = v/Rω=v/R and the linear speed is automatically constant.

Moving welding heat source traveling along an elliptical path around an elliptical cross-section pipe in Abaqus.

For an ellipse with semi-axes aea_e​ and beb_e​, the position is:

yc(θ)=aecosθ,zc(θ)=besinθy_c(\theta) = a_e\cos\theta, \qquad z_c(\theta) = b_e\sin\theta

The speed at which the point travels as θ\theta increases is the magnitude of the derivative:

drdθ=ae2sin2θ+be2cos2θ\left|\frac{d\mathbf{r}}{d\theta}\right| = \sqrt{a_e^2\sin^2\theta + b_e^2\cos^2\theta}

This quantity changes with position — it equals beb_ebe​ at the ends of the major axis and aea_eae​ along the minor axis. Because there is no closed-form inverse of the elliptic arc-length integral, we must handle it numerically.

Geometry of an elliptical cross-section pipe showing the major and minor axes and pipe length used in the Abaqus welding simulation.

The physical requirement is a constant travel speed vv, so the arc length covered must satisfy:

s(θ)=0θae2sin2ϕ+be2cos2ϕ  dϕ=vts(\theta) = \int_0^{\theta}\sqrt{a_e^2\sin^2\phi + b_e^2\cos^2\phi}\; d\phi = v\,t

The simulation therefore has to:

  1. Compute the total perimeter of the ellipse.
  2. Convert the current analysis time into an arc length, s=vts = v\,t.
  3. Invert s(θ)s(\theta) to recover the parametric angle θ\theta.
  4. Build a local weld frame (travel direction + transverse + depth) at that point.
  5. Evaluate the Goldak double-ellipsoid flux.

Abaqus DFLUX Workflow for a Moving Heat Source on an Elliptical Weld Path

How the Fortran subroutine keeps the torch at constant travel speed around an ellipse using arc-length parameterisation, then applies the Goldak double-ellipsoid heat distribution at every integration point.

  • Abaqus
  • Fortran DFLUX
  • Heat Transfer
  • Goldak Model
  • Welding Simulation
  1. Initialise flux and validate the load type

    Zero the flux on every call and exit unless Abaqus is requesting a body flux, so unrelated load types are never overwritten.

    FLUX(1) = 0.D0
    IF (JLTYP .NE. 1) RETURN
  2. Declare path, source and process parameters

    Ellipse semi-axes, Goldak ellipsoid dimensions, arc power, efficiency and travel speed are set in one place for easy calibration.

    ae = 0.05 m, be = 0.03 m  (major Ø 0.1 m, minor Ø 0.06 m)
    Q = 1218 W, η = 0.7, a = 0.010, b = 0.008, cf = 0.004, cr = 0.0093
    ff = 0.6, fr = 1.4, v = 0.002 m/s
  3. Compute the ellipse perimeter by Simpson integration

    An ellipse has no closed-form perimeter, so the arc-length integrand is integrated over 0 to 2π with N = 720 panels.

    P = ∫0 √( ae² sin²θ + be² cos²θ ) dθ  ≈  0.2549 m
  4. Convert analysis time to travelled distance

    Distance grows linearly with time at the prescribed travel speed, then wraps within one perimeter so multi-pass circumferential welds continue seamlessly.

    S = v · t  →  S = S − P · ⌊S / P⌋   (one lap ≈ 127.4 s)
  5. Invert arc length to parametric angle

    Constant angular velocity would give a variable travel speed on an ellipse, so s(θ) is inverted numerically: march through sub-arcs to bracket S, then refine with Newton–Raphson.

    θk+1 = θk + ( S − s(θk) ) / |r′(θk)|   (≤ 20 iterations)
  6. Locate the source centre and build the local weld frame

    Place the torch on the ellipse, then form the unit tangent (travel direction) and unit normal (transverse direction) at that point.

    yc = ae cos θ,   zc = be sin θ
    t = (−ae sin θ, be cos θ) / |r′|    n = (be cos θ, ae sin θ) / |r′|
  7. Project the integration point into Goldak coordinates

    The offset between COORDS and the source centre is projected onto the rotating frame. Here the path lies in the 2–3 plane and depth is measured along axis 1.

    ξ = Δy·ty + Δz·tz    η = Δy·ny + Δz·nz    ζ = COORDS(1)
  8. Select the front or rear ellipsoid half

    The sign of ξ decides which half of the double ellipsoid applies, giving the steep leading gradient and the elongated trailing tail.

    IF ( ξ ≥ 0 ) THEN front ELSE rear
    • Front half

      ff = 0.6  ·  cf = 0.004 m

    • Rear half

      fr = 1.4  ·  cr = 0.0093 m

  9. Evaluate the Goldak double-ellipsoid flux

    Apply the Gaussian volumetric distribution with the selected fraction and semi-axis, then return the value in FLUX(1).

    q(ξ, η, ζ) = [ 6√3 · fi · η Q / ( a · b · ci · π√π ) ] · exp(−3ξ²/ci²) · exp(−3η²/a²) · exp(−3ζ²/b²)

Step 1 – Compute the Perimeter Numerically

We integrate the arc-length integrand using Simpson’s rule, which converges very quickly for this smooth periodic function. With 720 panels, the perimeter is accurate to roughly 101010^{-10}.

Step 2 – Wrap the Arc Length

For repeated laps, the traveled arc length is wrapped back into one perimeter:

swrapped=sPsPs_{\text{wrapped}} = s – P\left\lfloor \frac{s}{P}\right\rfloor

Step 3 – Invert Arc Length to Angle

We first march through the precomputed sub-arcs to bracket the correct interval, then refine with Newton–Raphson using the exact derivative f(θ)=r(θ)f'(\theta) = |\mathbf{r}'(\theta)|f′(θ)=∣r′(θ)∣.

This converges to machine precision in a handful of iterations.

Step 4 – Build the Local Weld Frame

At the source center, the unit tangent (travel direction) and normal (transverse direction) are:

t=(aesinθ,  becosθ)r,n=(becosθ,  aesinθ)r\mathbf{t} = \frac{(-a_e\sin\theta,\; b_e\cos\theta)}{|\mathbf{r}’|}, \qquad \mathbf{n} = \frac{(b_e\cos\theta,\; a_e\sin\theta)}{|\mathbf{r}’|}

Any material point is then projected onto this frame to get the Goldak local coordinates ξ\xi (along travel), η\eta (transverse), and ζ\zeta (depth).

Understanding the Goldak Parameters

The double-ellipsoid model splits the heat source into a front quadrant and a rear quadrant, each with its own length (cfc_f, crc_r​) and fraction (fff_f​, frf_r​, with ff+fr=2f_f + f_r = 2). This asymmetry captures the steep temperature gradient ahead of the arc and the longer trailing tail behind it.

Goldak double-ellipsoidal heat source parameters used for the elliptical pipe welding simulation in Abaqus.
Welding Parameters for Elliptical pipe
SymbolMeaningValue in example
aaHalf-width (transverse)0.010 m
bbDepth0.008 m
cfc_fFront length0.004 m
crc_rRear length0.0093 m
ff,frf_f,\,f_rFront/rear energy fractions0.6 / 1.4
η\eta (EF)Arc efficiency0.7
QQArc power1218 W
Welding parameters for Goldak Model in Elliptical path

The normalization constant 63/(abcππ)6\sqrt{3}/(abc\,\pi\sqrt{\pi}) guarantees the volume integral of the flux equals the applied power, so energy is conserved regardless of path shape.

Setting Up the Analysis in Abaqus

  1. Define a transient heat transfer step (*Heat Transfer, Transient) with a time increment small enough that the source moves a fraction of its own length per increment — typically Δtcf/v\Delta t \le c_f / vΔt≤cf​/v.
  2. Apply a body flux on the weld region: *Dflux, elset=WELD, BFNU. The NU (non-uniform) flag routes the load to your subroutine.
  3. Link the subroutine at job submission with abaqus job=weld user=dflux.for.
  4. Add radiation and convection on exposed surfaces to recover realistic cooling.
  5. Set the total step time to cover the desired number of laps. For this example the perimeter is about 0.25490.25490.2549 m, so one full lap at v=0.002v = 0.002v=0.002 m/s takes roughly 127.4 s.
Applying a body heat flux to the elliptical pipe welding model in Abaqus to represent the moving welding heat source

Adapting the Subroutine to Your Model

  • Different plane orientation. The code assumes the ellipse lies in the 2–3 plane with COORDS(1) as depth. If your weld sits in the X–Y plane, use COORDS(1) and COORDS(2) for the path and COORDS(3) for depth.
  • Different start point. Replace STG = V*T with STG = S0 + V*T, where S0 is the arc-length offset of your starting position.
  • Off-center ellipse. Add the center coordinates when computing YC and ZC.
  • Reverse direction. Negate the travel speed V or the tangent components.
Temperature distribution during welding simulation of an elliptical pipe in Abaqus.
Temperature Distribution in Elliptical pipe welding

Conclusion

Simulating a welding heat source on an elliptical path requires more than stretching a circular model – it demands correct handling of arc length so the torch maintains constant travel speed. By combining Simpson integration for the perimeter, Newton–Raphson inversion for the angle, and the Goldak double-ellipsoid flux in a clean local frame, this DFLUX subroutine delivers physically accurate heat input for any elliptical weld.

This approach generalizes directly to other parametric curves – splines, racetrack paths, or scan patterns in additive manufacturing ; by swapping the position functions and their derivatives while keeping the same arc-length machinery.

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
Scroll to Top