diff --git a/docs/src/faq/faq.md b/docs/src/faq/faq.md index d14b6e6c..6b980184 100644 --- a/docs/src/faq/faq.md +++ b/docs/src/faq/faq.md @@ -23,7 +23,40 @@ Plotting in DECAPODES is commonly done with the [Makie](https://github.com/Makie - For [3D visualization](../ice_dynamics/ice_dynamics.md#2-manifold-in-3d) -## 5. How to add artificial diffusion for 0- or 1-forms to improve stability? +## 5. How to add artificial diffusion for 0- or 1-forms? + +Without viscosity - i.e. when ``\mu = 0`` - the incompressible (inviscid) Navier-Stokes equations can be formulated like so: + +```julia +eq11_inviscid_poisson = @decapode begin + d๐ฎ::DualForm2 + ๐ฎ::DualForm1 + ฯˆ::Form0 + + ฯˆ == ฮ”โปยน(โ‹†(d๐ฎ)) + ๐ฎ == โ‹†(d(ฯˆ)) + + โˆ‚โ‚œ(d๐ฎ) == (-1) * โˆ˜(โ™ญโ™ฏ, โ‹†โ‚, dฬƒโ‚)(โˆงแตˆแต–โ‚โ‚€(๐ฎ, โ‹†(d๐ฎ))) +end +``` + +Adding a viscosity term can be accomplished by simply added the appropriate term, and declaring the ``\mu`` constant: + +```julia +eq11_viscid_poisson = @decapode begin + d๐ฎ::DualForm2 + ๐ฎ::DualForm1 + ฯˆ::Form0 + ฮผ::Constant + + ฯˆ == ฮ”โปยน(โ‹†(d๐ฎ)) + ๐ฎ == โ‹†(d(ฯˆ)) + + โˆ‚โ‚œ(d๐ฎ) == ฮผ * โˆ˜(โ‹†, d, โ‹†, d)(d๐ฎ) + (-1) * โˆ˜(โ™ญโ™ฏ, โ‹†โ‚, dฬƒโ‚)(โˆงแตˆแต–โ‚โ‚€(๐ฎ, โ‹†(d๐ฎ))) +end +``` + +More demonstrations on how to iterate between formulations of the same physics (the incompressible Navier-Stokes equations) is available in further detail on the [Vortices](../navier_stokes/ns.md) docs page and in the script available there. ## 6. How to use a Laplacian solver / multigrid? @@ -43,4 +76,4 @@ To use multigrid methods in the Laplacian solver, you need to create a `PrimalGe A common workflow is to iterate through multiple different models as is done in the [Vorticity Model page](../navier_stokes/ns.md). A formulation is first done with a direct vorticity formulation but a quick run finds that this setup is unstable. A second formulation introduces a Laplacian solve which produces nice results. -Similar workflows may retain the same model but may iterate on the types of meshes/initial conditions used. An excellent example of this is found in the [Glacial Flow page](../ice_dynamics/ice_dynamics.md) where the model is first run in a [1D](../ice_dynamics/ice_dynamics.md#Define-a-mesh) setting and then quickly promoted to both [2D](../ice_dynamics/ice_dynamics.md#Define-our-mesh) and [3D](../ice_dynamics/ice_dynamics.md#2-Manifold-in-3D). This allows either running some dynamics in a more complicated setting, as just discussed, or allows for simplifying higher dimensional models by some sort of symmetry. \ No newline at end of file +Similar workflows may retain the same model but may iterate on the types of meshes/initial conditions used. An excellent example of this is found in the [Glacial Flow page](../ice_dynamics/ice_dynamics.md) where the model is first run in a [1D](../ice_dynamics/ice_dynamics.md#Define-a-mesh) setting and then quickly promoted to both [2D](../ice_dynamics/ice_dynamics.md#Define-our-mesh) and [3D](../ice_dynamics/ice_dynamics.md#2-Manifold-in-3D). This allows either running some dynamics in a more complicated setting, as just discussed, or allows for simplifying higher dimensional models by some sort of symmetry.