Skip to content

Coupling and pipeline

openwaam.cosim.CouplingConfig dataclass

How the arm and the melt pool talk to each other.

Robot -> process The torch position in the fluid solver is the tool-tip position of the simulated arm at that instant (tracking error, weave attenuation and structural vibration included). The torch height sets the contact-tip-to-work distance (CTWD).

Process -> robot * The pool surface computed by the fluid solver, under the wire, closes the CTWD: CTWD = set-point + (tool-tip height - surface height). * Self-regulation of a constant-voltage arc: a longer stick-out heats the wire more and the current drops. By default the current comes from the wire-melting relation of the process (Process.equilibrium_current) at the extension CTWD - arc_length, scaled so that it equals the process current at the set-point. Setting dI_dctwd (A/m) replaces that by the straight line I = I0 + dI_dctwd (CTWD - set). Heat input, arc pressure and Lorentz force in the fluid solver follow. * Through-the-arc height control: the controller infers CTWD from the (filtered) current, as arc-voltage/current height sensing does, and moves the torch up or down to hold the set-point. * The reaction of the arc and of the metal transfer acts on the torch as an external force (it is small; it is there so that nobody has to take that on trust).

Source code in openwaam/cosim.py
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
@dataclass
class CouplingConfig:
    """How the arm and the melt pool talk to each other.

    Robot -> process
        The torch position in the fluid solver is the tool-tip position of the
        simulated arm at that instant (tracking error, weave attenuation and
        structural vibration included). The torch height sets the
        contact-tip-to-work distance (CTWD).

    Process -> robot
        * The pool surface computed by the fluid solver, under the wire, closes
          the CTWD: CTWD = set-point + (tool-tip height - surface height).
        * Self-regulation of a constant-voltage arc: a longer stick-out heats
          the wire more and the current drops. By default the current comes
          from the wire-melting relation of the process (Process.equilibrium_current)
          at the extension CTWD - arc_length, scaled so that it equals the
          process current at the set-point. Setting dI_dctwd (A/m) replaces
          that by the straight line I = I0 + dI_dctwd (CTWD - set).
          Heat input, arc pressure and Lorentz force in the fluid solver follow.
        * Through-the-arc height control: the controller infers CTWD from the
          (filtered) current, as arc-voltage/current height sensing does, and
          moves the torch up or down to hold the set-point.
        * The reaction of the arc and of the metal transfer acts on the torch
          as an external force (it is small; it is there so that nobody has to
          take that on trust).
    """
    ctwd_set: float = 0.015            # m
    dI_dctwd: Optional[float] = None   # A/m. None: from wire melting (about -2 A/mm at 140 A and
    #                                    -4 A/mm at 200 A for 1.2 mm steel). Versions before 0.8 used -4000.
    arc_length: float = 0.003          # m; extension = CTWD - arc_length. The response is instantaneous.
    self_regulation: bool = True
    height_control: bool = True
    height_gain: float = 3.0           # 1/s
    height_rate_limit: float = 0.005   # m/s
    sensor_time_constant: float = 0.1  # s, low-pass on the current signal
    control_rate: float = 50.0         # Hz
    arc_reaction_force: bool = True
    robot_dynamics: str = "flexible"   # "flexible" | "ideal" | "none" (torch follows the command exactly)

openwaam.cosim.RobotMeltPoolCoSim

One bead laid by the arm, with the fluid solver and the arm advancing together and exchanging data every fluid time step.

run(t_end=None, frames=0, outdir=None, verbose=True, on_step=None)

on_step(cosim, tool_tip, ctwd, current, dz) is called after every fluid step.

save(res, outdir)

Write figures, the melt-pool animation, a VTK file and the summary.

openwaam.cosim.run_cosimulation(material, process, toolpath, bead_width, arm='abb_irb2600', part_frame=None, thermal_cfg=None, outdir='out/cosim', n_frames=40, ds=0.002, verbose=True)

Plan, execute in PyBullet, run the thermal model on the executed motion, and record the scene. Returns a dict with the trajectory, the execution statistics and the thermal model.

openwaam.pipeline.run_case(case, outdir='out', stages=('meltpool', 'plan', 'thermal', 'distortion'), verbose=True)

Run the requested stages and write figures, VTK files, robot programs and report.json into outdir. Returns the report dictionary.

openwaam.pipeline.run_cosim(case, outdir='out', verbose=True)

Robot and melt-pool solver advanced together, coupled both ways (case keys: material, process, meltpool, cosim).