idaholab / moose

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

Access to conjugate variables at nodes with BCs #1030

Closed bwspenc closed 10 years ago

bwspenc commented 10 years ago

In MOOSE, boundary conditions modify the residual vector, which is driven to zero by the solver. The sum of the increments applied to the residual by those boundary conditions is the conjugate to the solution variable at those boundaries (e.g. force/displacement for solid mechanics, integrated flux/temperature in heat transfer). There is currently no way to access this because the BCs modify the residual, but the increment applied to the residual is not saved.

We need to access the conjugate to the solution variable at boundaries for many reasons, including the following examples: Contact forces are needed to implement frictional sliding and pressure-dependent heat transfer, and are often the desired outcome of contact calculations. Nodal reaction forces at Dirichlet boundary conditions are often the desired outcome of structural mechanics calculations. Similarly, fluxes are often of interest in thermal analyses. It is also often helpful to have access to the vector of nodal forces applied by pressure loads. Using the norm of the reaction force vector as a reference quantity for a relative convergence tolerance is more reliable than using the initial residual norm, which is what we currently do.

Solid mechanics codes typically provide access to a variety of force variables for output. The main ones are the reaction force (due to Dirichlet BCs), contact force (due to contact), and external force (due to force or integrated traction (Neumann) BCs). An implementation of a capability to access conjugate variables in MOOSE should provide access to these three types of conjugate variables.

friedmud commented 10 years ago

I'm not opposed to this... and have actually thought about it in the past. One thing though:

I don't understand how to get the reaction forces at DirichletBCs. It's not the residual there (that would be zero once the problem is solved). Can you expand on what it would be? It's actually something more like evaluating the boundary integral that comes out of the integration by parts of the stress divergence equation and reporting it's residual at the nodes... right?

jasondhales commented 10 years ago

Yes.

The simplest thing to do, at least initially, would be to evaluate the residual sans the kinematic bcs and write that vector of forces to the results file. This would then include external loads like pressure, reaction loads, and a bunch of zeroes in the interior.

mooseframework commented 10 years ago

"Nodal reaction forces at Dirichlet boundary conditions are often the desired outcome of structural mechanics calculations." I would back the comment by Ben.

In Marmot we would like to have this feature as well. As the grains evolve under applied stress we would like to monitor the reaction forces as a function of time at Dirichlet boundary conditions.

friedmud commented 10 years ago

In 4cb5e2a9f87973dba738584db39f7db935b65ce5:

adding the ability for kernels and bcs to save their residual contributions to an auxiliary variable closes #1030 #708 #722 #1150
friedmud commented 10 years ago

In 4fe4ef048c38d1234ae26a50384878f1b4340c77:

add missing files ref #1030 #708 #722 #1150
friedmud commented 10 years ago

In 9cf1d8b91d0edb28ed97b5ec4580126bfc46779f:

disable unstable tests ref #1030