Skip to content

Does the viscous azimuthal term have the divergence-side 1/r in 3D cylindrical? #1910

Description

@sbryngelson

Raising this as a question rather than a confirmed bug — the viscous cylindrical assembly is more involved than the scalar case I was working on, and I have not verified it numerically.

Context. In MFC's 3D cylindrical mode (grid_geometry == 3) the third coordinate is θ and dz is in radians, so a physical azimuthal derivative needs a 1/r: once for the gradient, once for the divergence.

While adding Fourier heat conduction (#1906) the θ-direction flux was initially wrong by exactly for this reason. The fix folds both metric factors into the face spacing, and a ring-by-ring convergence study confirmed it (the recovered θ contribution goes from scaling as to being flat in r).

The question. m_viscous.fpp divides grad_z by y_cc(k) in several places, which supplies the gradient-side 1/r. But the divergence side in m_rhs.fpp applies 1._wp/dz(l) with no y_cc factor on this path — whereas the advection path for the same direction uses inv_ds = 1._wp/(dz(k)*y_cc(q)).

If that reading is right, the viscous azimuthal terms carry one 1/r where they need two, and would be off by a factor of r in 3D cylindrical. If instead the second factor is folded in somewhere I did not find, this is a non-issue and worth a comment saying where.

A θ-direction convergence check on a 3D cylindrical viscous case against a known solution would settle it. The setup added in #1906 (examples/3D_cyl_azimuthal_conduction_convergence) is a template: uniform pressure, zero velocity, a profile varying in θ whose exact answer is known, measured in a single time step so nothing else contributes.

Not touched in #1906, which restricts itself to the conduction term.

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