Skip to content

Melt pool

openwaam.meltpool.MeltPoolConfig dataclass

Domain, physics switches and numerical settings of the melt-pool solver. SI units.

Source code in openwaam/meltpool/solver.py
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@dataclass
class MeltPoolConfig:
    """Domain, physics switches and numerical settings of the melt-pool solver. SI units."""
    lx: float = 24e-3
    ly: float = 6e-3
    lz: float = 9e-3
    h: float = 0.3e-3
    substrate_thickness: float = 4e-3
    two_d: bool = False          # x-z slice (one cell in y)
    symmetry_y: bool = True      # 3-D: model half the bead, torch on the y = 0 plane
    slab_width: float = 6e-3     # 2-D only: width the arc/feed is spread over
    # shielding gas (treated as incompressible; density is a numerical choice,
    # larger than real hot argon to keep the pressure solve well conditioned)
    rho_gas: float = 5.0
    cp_gas: float = 520.0
    k_gas: float = 0.05
    mu_gas: float = 5e-5
    # The arc plasma flow is not modelled. Velocity on gas-dominated faces
    # (metal fraction below one half) is relaxed toward rest over this time,
    # so the gas only transmits pressure and makes room for the metal: the
    # role the void region plays in one-fluid free-surface codes. Without it
    # sub-grid films ride the gas across the plate. 0 switches it off.
    gas_relaxation_time: float = 1e-4
    T_ambient: float = 300.0
    T_initial: float = 300.0
    h_conv: float = 20.0
    # torch
    torch_x0: float = 5e-3
    torch_y0: float = 0.0
    arc_on_time: float = 1e9     # arc and feed stop after this time
    sigma_q: float = 2.5e-3      # Gaussian radius of the heat flux
    sigma_p: float = 2.5e-3      # Gaussian radius of the arc pressure
    sigma_j: float = 2.0e-3      # Gaussian radius of the current density
    arc_pressure: bool = True
    lorentz: bool = True
    marangoni: bool = True
    evaporation: bool = True
    surface_tension: bool = True
    # contact line on frozen metal: "neutral" = 90 degree contact angle (the
    # solid is a wall for the surface-tension force); "complete" = the liquid
    # wets solid metal fully and spreading is limited only by freezing
    wetting: str = "neutral"
    # contact angle on frozen metal in degrees, through the liquid, used with
    # wetting = "neutral": 90 is the neutral wall; smaller wets, larger does not
    contact_angle: float = 90.0
    gravity: float = -9.81
    # metal transfer: "surface" feeds metal continuously onto the pool under the
    # wire (robust on any grid); "droplets" launches resolved droplets (needs
    # h <= droplet_diameter / 8); "none" is an autogenous arc
    transfer: str = "surface"
    transfer_radius: float | None = None    # default 0.75 x wire diameter
    droplet_diameter: float | None = None   # default 1.2 x wire diameter
    droplet_speed: float = 1.0
    droplet_superheat: float = 600.0        # K above liquidus
    arc_length: float = 3e-3
    # numerics
    cfl: float = 0.25
    dt_max: float = 2e-4
    # Mushy zone. Metal stops flowing altogether once its solid fraction reaches
    # coherency_fraction. 0.3 with a drag constant of 1e9 was chosen on one measured
    # bead and checked on two more (docs/validation.md); before 0.7 these were 0.95 and 1e7.
    darcy_constant: float = 1e9
    coherency_fraction: float = 0.3
    thinc_beta: float = 2.5
    smooth_passes: int = 2
    remove_flotsam: bool = True    # recycle detached sub-grid wisps of metal through the feed
    height_function: bool = True   # height-function curvature where the stencil allows
    p_tol: float = 1e-5
    p_maxit: int = 2000
    far_field_length: float = 8e-3   # conduction distance to ambient through cut walls; 0 = adiabatic

openwaam.meltpool.MeltPoolSim

Free-surface melt-pool simulation of one bead.

Create it from a material, a process and a config, call run(t_end), then read bead_metrics(), pool_dimensions() and diagnostics() or write the fields with to_vtk(path).

arc_force property

Total force the arc and the metal transfer put on the pool, N. The torch feels the same force in the opposite direction.

bead_metrics(x_range=None)

Bead geometry averaged over cross-sections in x_range (m).

height: reinforcement above the original surface width: width of the deposit at the original surface penetration: depth of the fusion boundary below the original surface

pool_dimensions()

Length, width and depth of the liquid region (below the wire tip).

set_arc(current, voltage=None)

Set the instantaneous arc current (and voltage). Heat flux, arc pressure and Lorentz force follow; the wire feed does not change.

surface_height(x, y, radius=None)

Height of the metal surface above the bottom of the domain, averaged over a disc under the wire (what the arc 'sees').