Skip to content

Commit

Permalink
Merge pull request #27279 from farscape-project/amendment
Browse files Browse the repository at this point in the history
Documentation fixes + skip initial residual evaluation for new apps
  • Loading branch information
GiudGiud authored Apr 9, 2024
2 parents daef384 + 26eb2ee commit 3dd076b
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ equations for phase field calculations. The syntax is simple, taking its type
that the time derivative operator acts upon. Example syntax can be found in the
kernel block below:

!listing
test/tests/kernels/coupled_time_derivative/ad_coupled_time_derivative_test.i
block=Kernels
!listing test/tests/kernels/coupled_time_derivative/ad_coupled_time_derivative_test.i block=Kernels

!syntax parameters /Kernels/ADCoupledTimeDerivative

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ for phase field calculations. The syntax is simple, taking its type
derivative operator acts upon. Example syntax can be found in the kernel block
below:

!listing
test/tests/kernels/coupled_time_derivative/coupled_time_derivative_test.i
block=Kernels
!listing test/tests/kernels/coupled_time_derivative/coupled_time_derivative_test.i block=Kernels

!syntax parameters /Kernels/CoupledTimeDerivative

Expand Down
6 changes: 3 additions & 3 deletions framework/doc/content/source/kernels/FunctionDiffusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
## Overview

!style halign=left
The `FunctionDiffusion` object represents a Laplacian operator term with a function coefficient for
The `FunctionDiffusion` object represents a diffusion term with a function coefficient for
scalar field variables. This term is

\begin{equation}
f(\mathbf{r}, t) \nabla^2 v
- \nabla \cdot f(\mathbf{r}, t) \nabla v
\end{equation}

where

- $v$ is a scalar field solution variable, and
- $f(\mathbf{r}, t)$ is a scalar function serving as a coefficient.
- $f(\mathbf{r}, t)$ is a scalar function serving as a diffusion coefficient.

Note that the [!param](/Kernels/FunctionDiffusion/v) parameter is optional. If no variable is entered
there, then the kernel's nonlinear variable will be used in the operator as usual.
Expand Down
6 changes: 3 additions & 3 deletions framework/doc/content/source/kernels/GradField.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ The GradField object implements the following PDE term for coupled
scalar-vector PDE systems:

\begin{equation}
- k \nabla u,
- k \nabla v,
\end{equation}

where $k$ is a constant scalar coefficient and $u$ is a scalar field variable.
where $k$ is a constant scalar coefficient and $v$ 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(u) = (\nabla \cdot \vec{\psi_i}, k u) \quad \forall \vec{\psi_i}.
R_i(v) = (\nabla \cdot \vec{\psi_i}, k v) \quad \forall \vec{\psi_i}.
\end{equation}

## Example Input File Syntax
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ helps ensure conservation of mass at a node. In a standard node-based Galerkin
approximation, fluxes from spatial terms can be thought of as "entering"
nodes. If there is no flux to a node, then the mass at that node should stay
fixed. However, if the standard Galerkin method is applied to a time derivative
term, $(\psi_i, \frac{\partial u_h}{\partial t}$ the corresponding coefficient
term, $(\psi_i, \frac{\partial u_h}{\partial t})$ the corresponding coefficient
matrix is tri-diagonal and the mass at a node is affected by fluxes to neighboring
nodes. This can lead to violation of local mass conservation and generation of
spurious oscillations with unphysical under- and over-shoot phenomena. Lumping
Expand All @@ -23,13 +23,13 @@ differential operator. We write our finite element solution as
Substituting into our governing equation, we have:

\begin{equation}
\sum u_j'\phi_j = Sum u_jA\phi_j
\sum u_j'\phi_j = \sum u_jA\phi_j
\end{equation}

Now we apply our test functions $\psi_i$ and integrate over the volume:

\begin{equation}
\sum u_j' (\psi_i\phi_j) = \sum u_j (\psi_i, Au_j)
\sum u_j' (\psi_i,\phi_j) = \sum u_j (\psi_i, A\phi_j)
\end{equation}

After applying all of our test functions, we have the matrix system
Expand Down
2 changes: 1 addition & 1 deletion framework/doc/content/source/kernels/MatDiffusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Implements the term
\begin{equation}
\nabla\cdot D(c,a,b,\dots) \nabla u,
-\nabla\cdot D(c,a,b,\dots) \nabla u,
\end{equation}
where the diffusion coefficient $D$ (`diffusivity`) is provided by a `FunctionMaterial` function material (see `Phase Field Module` for more information), $u$ is the nonlinear variable the kernel is operating on.

Expand Down
2 changes: 1 addition & 1 deletion framework/src/kernels/FunctionDiffusion.C
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ InputParameters
FunctionDiffusion::validParams()
{
InputParameters params = Diffusion::validParams();
params.addClassDescription("The Laplacian operator with a function coefficient.");
params.addClassDescription("Diffusion with a function coefficient.");
params.addParam<FunctionName>("function", 1.0, "Function multiplier for diffusion term.");
params.addCoupledVar("v",
"Coupled concentration variable for kernel to operate on; if this "
Expand Down
2 changes: 1 addition & 1 deletion framework/src/kernels/GradField.C
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ GradField::validParams()
{
InputParameters params = VectorKernel::validParams();
params.addClassDescription("The gradient operator optionally scaled by a constant scalar "
"coefficient. Weak form: $(\\nabla \\cdot \\vec{\\psi_i}, k u)$.");
"coefficient. Weak form: $(\\nabla \\cdot \\vec{\\psi_i}, k v)$.");
params.addRequiredCoupledVar("coupled_scalar_variable", "The scalar field");
params.addParam<Real>("coeff", 1.0, "The constant coefficient");
return params;
Expand Down
34 changes: 17 additions & 17 deletions modules/doc/content/citing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ list of publications that have cited MOOSE, please refer to the [publications.md
For all publications that use MOOSE or a MOOSE-based application please cite the following.

```tex
@article{lindsay2022moose,
title = {2.0 - {MOOSE}: Enabling massively parallel multiphysics simulation},
author = {Alexander D. Lindsay and Derek R. Gaston and Cody J. Permann and Jason M. Miller and
David Andr{\v{s}} and Andrew E. Slaughter and Fande Kong and Joshua Hansel and
Robert W. Carlsen and Casey Icenhour and Logan Harbour and Guillaume L. Giudicelli
and Roy H. Stogner and Peter German and Jacob Badger and Sudipta Biswas and
Leora Chapuis and Christopher Green and Jason Hales and Tianchen Hu and Wen Jiang
and Yeon Sang Jung and Christopher Matthews and Yinbin Miao and April Novak and
John W. Peterson and Zachary M. Prince and Andrea Rovinelli and Sebastian Schunert
and Daniel Schwen and Benjamin W. Spencer and Swetha Veeraraghavan and Antonio Recuero
and Dewen Yushu and Yaqi Wang and Andy Wilkins and Christopher Wong},
year = {2022},
@article{giudicelli2024moose,
title = {3.0 - {MOOSE}: Enabling massively parallel multiphysics simulations},
author = {Guillaume Giudicelli and Alexander Lindsay and Logan Harbour and Casey Icenhour and
Mengnan Li and Joshua E. Hansel and Peter German and Patrick Behne and Oana Marin and
Roy H. Stogner and Jason M. Miller and Daniel Schwen and Yaqi Wang and Lynn Munday and
Sebastian Schunert and Benjamin W. Spencer and Dewen Yushu and Antonio Recuero and
Zachary M. Prince and Max Nezdyur and Tianchen Hu and Yinbin Miao and
Yeon Sang Jung and Christopher Matthews and April Novak and Brandon Langley and
Timothy Truster and Nuno Nobre and Brian Alger and David Andr{\v{s}} and
Fande Kong and Robert Carlsen and Andrew E. Slaughter and John W. Peterson and
Derek Gaston and Cody Permann},
year = {2024},
journal = {{SoftwareX}},
volume = {20},
pages = {101202},
volume = {26},
pages = {101690},
issn = {2352-7110},
doi = {https://doi.org/10.1016/j.softx.2022.101202},
url = {https://www.sciencedirect.com/science/article/pii/S2352711022001200},
keywords = {Multiphysics, Object-oriented, Finite-element, Framework},
doi = {https://doi.org/10.1016/j.softx.2024.101690},
url = {https://www.sciencedirect.com/science/article/pii/S235271102400061X},
keywords = {Framework, Finite-element, Finite-volume, Parallel, Multiphysics, Multiscale},
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $-\nabla \cdot \nabla u = 0 \in \Omega$, $u = 1$ on the bottom, $u = 0$ on the t
$\nabla u \cdot \hat{n} = 0$ on the remaining boundaries.

The weak form ([see Finite Elements Principles](finite_element_concepts/fem_principles.md)) of
this equation, in inner-product notation, is given by: $\nabla \phi_i, \nabla u_h = 0 \quad
this equation, in inner-product notation, is given by: $(\nabla \phi_i, \nabla u_h) = 0 \quad
\forall \phi_i$, where $\phi_i$ are the test functions and $u_h$ is the finite element solution.

## Input File Syntax
Expand All @@ -37,7 +37,6 @@ file itself:
[]
```

<br>

!media large_media/examples/mug_mesh.png
caption=mug.e mesh file
Expand Down Expand Up @@ -108,7 +107,6 @@ make -j8
This will generate the results file, out.e, as shown in [example-1-results]. This file may be viewed using
Peacock or an external application that supports the Exodus II format (e.g., Paraview).

<br>

!media large_media/examples/ex01_results.png
id=example-1-results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ make -j8
This will generate the results file, out.e, as shown in Figure 1 and 2. This file may be viewed
using Peacock or an external application that supports the Exodus II format (e.g., Paraview).

<div style="width:100%">

!media large_media/examples/ex03_out_diffused.png
caption=Figure 1: example 3 Results, "diffused variable"
style=width:40%;display:inline-flex;margin-left:7%;
Expand All @@ -104,8 +102,6 @@ using Peacock or an external application that supports the Exodus II format (e.g
caption=Figure 2: example 3 Results, "convected variable"
style=width:40%;display:inline-flex;margin-left:7%;

</div><br>

# 1D exact solution

A simplified 1D analog of this problem is given as follows, where $u(0)=0$ and $u(1)=1$:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Description

The `JouleHeatingHeatGeneratedAux` AuxKernel is used to compute the heat generated by Joule heating. The heat (power per unit volume) is computed as $dP/dV= \bm{J} \cdot \bm{E} = E ^2 \sigma$, where $\bm{J} = \sigma \bm{E}$ is the current density, $\bm{E}$ is the electric field, and $ \sigma $ is the electrical conductivity.
The `JouleHeatingHeatGeneratedAux` AuxKernel is used to compute the heat generated by Joule heating. The heat (power per unit volume) is computed as $dP/dV= \bm{J} \cdot \bm{E} = E ^2 \sigma$, where $\bm{J} = \sigma \bm{E}$ is the current density, $\bm{E}$ is the electric field, and $\sigma$ is the electrical conductivity.

!syntax parameters /AuxKernels/JouleHeatingHeatGeneratedAux

Expand Down
3 changes: 2 additions & 1 deletion stork/src/base/StorkApp.C.app
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ StorkApp::validParams()
{
InputParameters params = MooseApp::validParams();
params.set<bool>("use_legacy_material_output") = false;
params.set<bool>("use_legacy_initial_residual_evaluation_bahavior") = false;
return params;
}

Expand All @@ -19,7 +20,7 @@ StorkApp::StorkApp(InputParameters parameters) : MooseApp(parameters)

StorkApp::~StorkApp() {}

void
void
StorkApp::registerAll(Factory & f, ActionFactory & af, Syntax & s)
{
ModulesApp::registerAllObjects<StorkApp>(f, af, s);
Expand Down

0 comments on commit 3dd076b

Please sign in to comment.