Skip to content

k2 and k4 in the artificial damping settings have had no effect since #45 #347

Description

@1-Bort-1

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions