Skip to content

Hyperbolic cleaning damps psi once per spatial direction #1993

Open

Description

@sbryngelson

In s_compute_rhs (src/simulation/m_rhs.fpp, the if (hyper_cleaning) block around line 762), the damping term

rhs_vf(eqn_idx%psi)%sf(j, k, l) = rhs_vf(eqn_idx%psi)%sf(j, k, l) - q_prim_vf(eqn_idx%psi)%sf(j, k, l)/hyper_cleaning_tau

sits inside the dimensional-splitting loop do id = 1, num_dims (line ~683). It is therefore added num_dims times per RHS evaluation, so the effective damping time is hyper_cleaning_tau/num_dims rather than hyper_cleaning_tau (halved in 2D, a third in 3D; hyper cleaning is prohibited in 1D).

Expected: the source term -psi/tau is applied once per RHS evaluation. Moving the block out of the id loop (after END: Dimensional Splitting Loop) would do that. This changes results for every hyper_cleaning = T case, so the hyper-cleaning goldens (B4DC99F9, EC8F87D9, F057F8E6) and possibly the recommended hyper_cleaning_tau values in examples/*hyper_cleaning* would need revisiting.

Related: #1987 fixes which psi value the damping reads (stale q_prim_vf vs. current-stage q_prim_qp), but keeps the term inside the loop.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions