Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tophmatthews committed Oct 3, 2019
1 parent 985cb69 commit 7512f62
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
37 changes: 37 additions & 0 deletions framework/doc/content/source/bcs/ADFunctionNeumannBC.md
@@ -0,0 +1,37 @@
# ADFunctionNeumannBC

!syntax description /BCs/ADFunctionNeumannBC

## Description

`ADFunctionNeumannBC` is a generalization of [`ADNeumannBC`](/ADNeumannBC.md) which is used
for imposing flux boundary conditions on systems of partial
differential equations (PDEs) where the flux is represented by a
spatially- and temporally-varying MOOSE [`Function`](/Functions/index.md). That is, for a
PDE of the form
\begin{equation}
\begin{aligned}
-\nabla^2 u &= f && \quad \in \Omega \\
u &= g(t,\vec{x}) && \quad \in \partial \Omega_D \\
\frac{\partial u}{\partial n} &= h(t,\vec{x}) && \quad \in \partial \Omega_N,
\end{aligned}
\end{equation}
where $\Omega \subset \mathbb{R}^n$ is the domain, and $\partial
\Omega = \partial \Omega_D \cup \partial \Omega_N$ is its boundary, a
`ADFunctionNeumannBC` object can be used to impose condition (3) if the
function is well-defined for all relevant times and $\vec{x} \in
\partial \Omega_N$. In this case, the `function` parameter corresponds
to a MOOSE `Function` object which represents the mathematical
function $h(t,\vec{x})$, and the user must define one or more sidesets
corresponding to the boundary subset $\partial \Omega_N$ via the
`boundary` parameter.

## Example Input Syntax

!listing test/tests/bcs/ad_function_neumann_bc/test.i block=BCs

!syntax parameters /BCs/ADFunctionNeumannBC

!syntax inputs /BCs/ADFunctionNeumannBC

!syntax children /BCs/ADFunctionNeumannBC
36 changes: 36 additions & 0 deletions framework/doc/content/source/bcs/ADNeumannBC.md
@@ -0,0 +1,36 @@
# ADNeumannBC

!syntax description /BCs/ADNeumannBC

## Description

`ADNeumannBC` is the simplest type of `ADIntegratedBC`, and is used for
imposing flux boundary conditions on systems of partial differential
equations (PDEs). This class is appropriate to use for PDEs of the
form
\begin{equation}
\begin{aligned}
-\nabla^2 u &= f && \quad \in \Omega \\
u &= g && \quad \in \partial \Omega_D \\
\frac{\partial u}{\partial n} &= h && \quad \in \partial \Omega_N,
\end{aligned}
\end{equation}
where $\Omega \subset \mathbb{R}^n$ is the domain, and $\partial
\Omega = \partial \Omega_D \cup \partial \Omega_N$ is its boundary. In
this case, a `ADNeumannBC` object is used to impose the condition (3) on
the subset of the boundary denoted by $\partial \Omega_N$. The `value`
parameter corresponds to the constant $h$, and the user must define
one or more sidesets corresponding to the boundary subset $\partial
\Omega_N$. The normal derivative notation is $\frac{\partial
u}{\partial n} \equiv \nabla u \cdot \hat{n}$, where $\hat{n}$ is the
outward unit normal to $\partial \Omega_N$.

## Example Input Syntax

!listing test/tests/bcs/ad_1d_neumann/1d_neumann.i start=[./right] end=[../] include-end=true

!syntax parameters /BCs/ADNeumannBC

!syntax inputs /BCs/ADNeumannBC

!syntax children /BCs/ADNeumannBC
2 changes: 2 additions & 0 deletions framework/src/bcs/ADFunctionNeumannBC.C
Expand Up @@ -9,6 +9,8 @@

#include "ADFunctionNeumannBC.h"

#include "Function.h"

registerADMooseObject("MooseApp", ADFunctionNeumannBC);

defineADValidParams(ADFunctionNeumannBC,
Expand Down

0 comments on commit 7512f62

Please sign in to comment.