From b4ac193044fb181d1dee17af20ccb1beb1a40892 Mon Sep 17 00:00:00 2001 From: Nuno Nobre Date: Thu, 16 Nov 2023 13:08:05 +0000 Subject: [PATCH] Add docs for the new FE family, bcs and kernels (#26105) --- .../source/bcs/VectorDivPenaltyDirichletBC.md | 26 ++++++++++++++++ .../doc/content/source/kernels/DivField.md | 30 ++++++++++++++++++ .../doc/content/source/kernels/GradField.md | 31 +++++++++++++++++++ .../source/variables/MooseVariableBase.md | 7 +++-- .../doc/content/syntax/Adaptivity/index.md | 8 ++--- 5 files changed, 95 insertions(+), 7 deletions(-) create mode 100644 framework/doc/content/source/bcs/VectorDivPenaltyDirichletBC.md create mode 100644 framework/doc/content/source/kernels/DivField.md create mode 100644 framework/doc/content/source/kernels/GradField.md diff --git a/framework/doc/content/source/bcs/VectorDivPenaltyDirichletBC.md b/framework/doc/content/source/bcs/VectorDivPenaltyDirichletBC.md new file mode 100644 index 000000000000..66bf1c5d2248 --- /dev/null +++ b/framework/doc/content/source/bcs/VectorDivPenaltyDirichletBC.md @@ -0,0 +1,26 @@ +# VectorDivPenaltyDirichletBC + +!syntax description /BCs/VectorDivPenaltyDirichletBC + +## Overview + +`VectorDivPenaltyDirichletBC` enforces, in a weak sense, a Dirichlet boundary +condition on the divergence of a nonlinear vector variable $\vec{u}$ by setting + +\begin{equation} + R_i(\vec{u}) = p($\vec{\psi_i}$ \cdot \hat{n}, (\vec{u} - \vec{u}_0) \cdot \hat{n}) +\end{equation} + +where $p$ is a scalar defining the penalty value, $\vec{\psi_i}$ the test +functions, and $\vec{u} - \vec{u}_0$ is the vector difference between the +current solution and the Dirichlet data. + +## Example Input File Syntax + +!listing coupled_electrostatics.i block=BCs + +!syntax parameters /BCs/VectorDivPenaltyDirichletBC + +!syntax inputs /BCs/VectorDivPenaltyDirichletBC + +!syntax children /BCs/VectorDivPenaltyDirichletBC diff --git a/framework/doc/content/source/kernels/DivField.md b/framework/doc/content/source/kernels/DivField.md new file mode 100644 index 000000000000..b3772ce4c277 --- /dev/null +++ b/framework/doc/content/source/kernels/DivField.md @@ -0,0 +1,30 @@ +# DivField + +!syntax description /Kernels/DivField + +## Overview + +!style halign=left +The DivField object implements the following PDE term for coupled scalar-vector +PDE systems: + +\begin{equation} + k \nabla \cdot \vec{u}, +\end{equation} + +where $k$ is a constant scalar coefficient and $\vec{u}$ is a vector field +variable. Given scalar test functions $\psi_i$, the weak form, in inner-product notation, is given by: + +\begin{equation} + R_i(\vec{u}) = (\psi_i, k \nabla \cdot \vec{u}) \quad \forall \psi_i. +\end{equation} + +## Example Input File Syntax + +!listing coupled_electrostatics.i block=Kernels/divergence + +!syntax parameters /Kernels/DivField + +!syntax inputs /Kernels/DivField + +!syntax children /Kernels/DivField diff --git a/framework/doc/content/source/kernels/GradField.md b/framework/doc/content/source/kernels/GradField.md new file mode 100644 index 000000000000..a9f2a6c80b1e --- /dev/null +++ b/framework/doc/content/source/kernels/GradField.md @@ -0,0 +1,31 @@ +# GradField + +!syntax description /Kernels/GradField + +## Overview + +!style halign=left +The GradField object implements the following PDE term for coupled +scalar-vector PDE systems: + +\begin{equation} + - k \nabla p, +\end{equation} + +where $k$ is a constant scalar coefficient and $p$ is a scalar field variable. +Given vector test functions $\vec{\psi_i}$, the weak form, in inner-product +notation, is given by: + +\begin{equation} + R_i(p) = (\nabla \cdot \vec{\psi_i}, k p) \quad \forall \vec{\psi_i}. +\end{equation} + +## Example Input File Syntax + +!listing coupled_electrostatics.i block=Kernels/gradient + +!syntax parameters /Kernels/GradField + +!syntax inputs /Kernels/GradField + +!syntax children /Kernels/GradField diff --git a/framework/doc/content/source/variables/MooseVariableBase.md b/framework/doc/content/source/variables/MooseVariableBase.md index 061dd9d5218b..97a91f16cb2e 100644 --- a/framework/doc/content/source/variables/MooseVariableBase.md +++ b/framework/doc/content/source/variables/MooseVariableBase.md @@ -55,9 +55,10 @@ single-component are instantiated with the template argument `Real`; these hold variables of finite element families `LAGRANGE`, `MONOMIAL`, `HERMITE`, etc. Multi-component vector finite element variables are instantiated with the template argument `RealVectorValue` and currently encompass the finite element -families `NEDELEC_ONE` and `LAGRANGE_VEC`. The former is useful for -electromagnetic applications or for general PDEs that involve a curl -operation. The latter is potentially useful for tensor mechanic or Navier-Stokes +families `LAGRANGE_VEC`, `MONOMIAL_VEC`, `NEDELEC_ONE` and `RAVIART_THOMAS`. +`NEDELEC_ONE` and `RAVIART_THOMAS` are useful for electromagnetic applications +or for general PDEs that involve a curl or a divergence operation, respectively. +`LAGRANGE_VEC` is potentially useful for tensor mechanics or Navier-Stokes simulations where historically displacement or velocity variables have been broken up component-wise. To hide the templating of the Moose variable system from other framework code, `MooseVariableFE` and diff --git a/framework/doc/content/syntax/Adaptivity/index.md b/framework/doc/content/syntax/Adaptivity/index.md index 92c89c590b8f..40a2423762ad 100644 --- a/framework/doc/content/syntax/Adaptivity/index.md +++ b/framework/doc/content/syntax/Adaptivity/index.md @@ -24,10 +24,10 @@ higher than their parents. ## P-Refinement P-refinement level mismatches are not supported for continuous, non-hierarchic -finite element families. Additionally, p-refinement of `NEDELEC_ONE` is not -supported. Consequently, by default we disable p-refinement of the following -bases: `LAGRANGE`, `NEDELEC_ONE`, `LAGRANGE_VEC`, `CLOUGH`, `BERNSTEIN`, and -`RATIONAL_BERNSTEIN`. Users can control what families are disabled for +finite element families. Additionally, p-refinement of `NEDELEC_ONE` and `RAVIART_THOMAS` +elements is not supported. Consequently, by default we disable p-refinement of the +following bases: `LAGRANGE`, `NEDELEC_ONE`, `RAVIART_THOMAS`, `LAGRANGE_VEC`, `CLOUGH`, +`BERNSTEIN`, and `RATIONAL_BERNSTEIN`. Users can control what families are disabled for p-refinement by setting the `disable_p_refinement_for_families` parameter. ## Cycles and Intervals