SolverSettings.k2, SolverSettings.k4 and Solver.artificial_damping = (k2, k4) are read and passed around (src/solver.jl:166, 212, 1214), but nothing uses them. The only function that did, calculate_artificial_damping, was deleted in 0c6efde (#45). With artificial_damping: true, the solver calls smooth_circulation!(damp, gamma, 0.1, 0.5) with hard-coded factors (src/solver.jl:1072), so changing k2/k4 in YAML or in the constructor has no effect.
Two ways to end it; both change public settings, so the choice is yours:
A) Remove k2, k4 and the artificial_damping NamedTuple (BREAKING: YAML keys and a keyword argument go away).
B) Route them into smooth_circulation!. But its two factors (smoothness threshold, damping fraction) don't correspond to the second- and fourth-difference coefficients k2/k4 meant, so this would give the names a new meaning.
My recommendation is A, since nothing has read these values since February 2025.
Found while reviewing #328.
SolverSettings.k2,SolverSettings.k4andSolver.artificial_damping = (k2, k4)are read and passed around (src/solver.jl:166, 212, 1214), but nothing uses them. The only function that did,calculate_artificial_damping, was deleted in 0c6efde (#45). Withartificial_damping: true, the solver callssmooth_circulation!(damp, gamma, 0.1, 0.5)with hard-coded factors (src/solver.jl:1072), so changingk2/k4in YAML or in the constructor has no effect.Two ways to end it; both change public settings, so the choice is yours:
A) Remove
k2,k4and theartificial_dampingNamedTuple (BREAKING: YAML keys and a keyword argument go away).B) Route them into
smooth_circulation!. But its two factors (smoothness threshold, damping fraction) don't correspond to the second- and fourth-difference coefficientsk2/k4meant, so this would give the names a new meaning.My recommendation is A, since nothing has read these values since February 2025.
Found while reviewing #328.