idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.75k stars 1.05k forks source link

AuxVariable for velocity should be used in Kernel #9260

Closed aeslaughter closed 7 years ago

aeslaughter commented 7 years ago

Description of the enhancement or error report

We compute velocity as an Aux but then duplicate the velocity calculation in the kernel. We should just couple in the Aux in the heat equation and perhaps use a higher-order monomial to curb the lose of resolution.

Rationale for the enhancement or information for reproducing the error

It is confusing in the tutorial to compute velocity twice, so we shouldn't.

Identified impact

(i.e. Internal object changes, limited interface changes, public API change, or a list of specific applications impacted)

friedmud commented 7 years ago

Ummm.... how is this working? You switched the Aux to be working at nodes... but the AuxKernel needs the gradient!

There is a reason why we don't simply couple to the aux velocity field! It's because there is no way to compute the Aux field accurately. It's just there for output / visualization.

The Kernel should be (remain) coupled directly to the gradient of pressure.

aeslaughter commented 7 years ago

I believe all MONOMIALS are elemental based on this line in AuxKernel.C

  _is_nodal = _assembly.getFE(feType(),
_sys.mesh().dimension())->get_continuity() != DISCONTINUOUS;

On Thu, Jun 22, 2017 at 8:41 PM, Derek Gaston notifications@github.com wrote:

Ummm.... how is this working? You switched the Aux to be working at nodes... but the AuxKernel needs the gradient!

There is a reason why we don't simply couple to the aux velocity field! It's because there is no way to compute the Aux field accurately. It's just there for output / visualization.

The Kernel should be (remain) coupled directly to the gradient of pressure.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_idaholab_moose_issues_9260-23issuecomment-2D310555744&d=DwMFaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=kslCwyywiVHytu9TVaaCiNsrHmrXgVOafyBK8mZCamQ&s=ucHQCwJ09_2FLFQ5wPi1TuopW5drVLLrTq__74QOuNo&e=, or mute the thread https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAU1VXEQnJ3pp-2DnmiI3Hhx9ZHyB6qVbnks5sGyXOgaJpZM4Ny8Ic&d=DwMFaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=kslCwyywiVHytu9TVaaCiNsrHmrXgVOafyBK8mZCamQ&s=ib9giJNLR7AR_1jNx7sgfPXsoaYcP40dkqnCidTJkq4&e= .

friedmud commented 7 years ago

Yes: but you changed it to Nodal (Lagrange)... even though the AuxKernel is using gradients. That shouldn't work... On Mon, Jun 26, 2017 at 10:42 AM Andrew E Slaughter < notifications@github.com> wrote:

I believe all MONOMIALS are elemental based on this line in AuxKernel.C

_is_nodal = _assembly.getFE(feType(),
_sys.mesh().dimension())->get_continuity() != DISCONTINUOUS;

On Thu, Jun 22, 2017 at 8:41 PM, Derek Gaston notifications@github.com wrote:

Ummm.... how is this working? You switched the Aux to be working at nodes... but the AuxKernel needs the gradient!

There is a reason why we don't simply couple to the aux velocity field! It's because there is no way to compute the Aux field accurately. It's just there for output / visualization.

The Kernel should be (remain) coupled directly to the gradient of pressure.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_idaholab_moose_issues_9260-23issuecomment-2D310555744&d=DwMFaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=kslCwyywiVHytu9TVaaCiNsrHmrXgVOafyBK8mZCamQ&s=ucHQCwJ09_2FLFQ5wPi1TuopW5drVLLrTq__74QOuNo&e= , or mute the thread < https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAU1VXEQnJ3pp-2DnmiI3Hhx9ZHyB6qVbnks5sGyXOgaJpZM4Ny8Ic&d=DwMFaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=kslCwyywiVHytu9TVaaCiNsrHmrXgVOafyBK8mZCamQ&s=ib9giJNLR7AR_1jNx7sgfPXsoaYcP40dkqnCidTJkq4&e=

.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/idaholab/moose/issues/9260#issuecomment-311080039, or mute the thread https://github.com/notifications/unsubscribe-auth/AA1JMfEN3toSve9leUxnVwiZW6P-bpi6ks5sH8NigaJpZM4Ny8Ic .

andrsd commented 7 years ago

The diff shows FIRST MONOMIAL, not LAGRANGE.