# idaholab/moose

Merge pull request #13161 from jiangwen84/inclined_bc_action

Add inclined no displacement bc ACTION
bwspenc committed Apr 11, 2019
2 parents f263fc4 + 5b8c8ec commit 0ea7a33cca18d9f98c37bb5db9e6e669406f1dd8
 @@ -0,0 +1,5 @@ # InclinedNoDisplacementBC Action ## Description The InclinedNoDisplacementBC Action is used to create a set of InclinedNoDisplacementBC for a string of displacement variables. See the description, example use, and parameters on the [InclinedNoDisplacementBC](/InclinedNoDisplacementBC/index.md) action system page.
 @@ -0,0 +1,11 @@ # PenaltyInclinedNoDisplacementBC !syntax description /BCs/PenaltyInclinedNoDisplacementBC ## Description PenaltyInclinedNoDisplacementBC is a IntegratedBC used for enforcing inclined boundary conditions $\mathbf{u}\cdot \mathbf{normal} = 0$ for mechanics problems. With a penalty method, the residual is given as \begin{equation} \mathcal{R}_i = \alpha(\mathbf{u}\cdot \mathbf{normal})\mathbf{normal}(\text{component})\psi_i \end{equation} where $\alpha$ is the penalty parameter and component corresponds to the direction in which to apply the residual. The normal directly comes from the surface normal defined in a mesh.
 @@ -0,0 +1,21 @@ # Inclined No Displacement Boundary Condition Action System !syntax description /BCs/InclinedNoDisplacementBC/InclinedNoDisplacementBCAction ## Description The InclinedNoDisplacementBCAction Action, given in the input file as simply InclinedNoDisplacementBC, is designed to simplify the input file when several variables have the same inclined no displacement boundary condition [Inclined no displacement boundary condition](PenaltyInclinedNoDisplacementBC.md) applied in the normal component. ## Example Input Syntax !listing modules/tensor_mechanics/test/tests/inclined_bc/inclined_bc_action.i block=BCs/InclinedNoDisplacementBC !syntax parameters /BCs/InclinedNoDisplacementBC/InclinedNoDisplacementBCAction ## Associated Actions !syntax list /BCs/InclinedNoDisplacementBC objects=True actions=False subsystems=False !syntax list /BCs/InclinedNoDisplacementBC objects=False actions=False subsystems=True !syntax list /BCs/InclinedNoDisplacementBC objects=False actions=True subsystems=False
 @@ -0,0 +1,36 @@ //* This file is part of the MOOSE framework //* https://www.mooseframework.org //* //* All rights reserved, see COPYRIGHT for full restrictions //* https://github.com/idaholab/moose/blob/master/COPYRIGHT //* //* Licensed under LGPL 2.1, please see LICENSE for details //* https://www.gnu.org/licenses/lgpl-2.1.html #ifndef INCLINEDNODISPLACEMENTBCACTION_H #define INCLINEDNODISPLACEMENTBCACTION_H #include "Action.h" class InclinedNoDisplacementBCAction : public Action { public: InclinedNoDisplacementBCAction(const InputParameters & params); virtual void act() override; protected: /// displacement variables std::vector _displacements; /// number of displacement variables unsigned int _ndisp; /// auxvariables to save residuals std::vector _save_in; }; template <> InputParameters validParams(); #endif // INCLINEDNODISPLACEMENTBCACTION_H
 @@ -7,24 +7,24 @@ //* Licensed under LGPL 2.1, please see LICENSE for details //* https://www.gnu.org/licenses/lgpl-2.1.html #ifndef PENALTYINCLINEDBC_H #define PENALTYINCLINEDBC_H #ifndef PENALTYINCLINEDNODISPLACEMENTBC_H #define PENALTYINCLINEDNODISPLACEMENTBC_H #include "IntegratedBC.h" class PenaltyInclinedBC; class PenaltyInclinedNoDisplacementBC; class Function; template <> InputParameters validParams(); InputParameters validParams(); /** * Weakly enforce an inclined BC (u\dot n = 0) using a penalty method. */ class PenaltyInclinedBC : public IntegratedBC class PenaltyInclinedNoDisplacementBC : public IntegratedBC { public: PenaltyInclinedBC(const InputParameters & parameters); PenaltyInclinedNoDisplacementBC(const InputParameters & parameters); protected: virtual Real computeQpResidual() override; @@ -39,7 +39,7 @@ class PenaltyInclinedBC : public IntegratedBC std::vector _disp_var; private: Real _p; Real _penalty; }; #endif