From 174d109e0c1a027a3899ed3686a8fbce772d71c7 Mon Sep 17 00:00:00 2001 From: Valeria Barra Date: Tue, 23 Aug 2022 13:06:28 -0700 Subject: [PATCH] Fix Zalesak FCT docstring and add it to the Docs --- docs/refs.bib | 7 +++++++ docs/src/operators.md | 1 + src/Operators/finitedifference.jl | 21 +++++++++++---------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/docs/refs.bib b/docs/refs.bib index 69857b5ee4..488dd8aa67 100644 --- a/docs/refs.bib +++ b/docs/refs.bib @@ -30,6 +30,13 @@ @article{BorisBook1973 author = {Jay P Boris and David L Book} } +@book{durran2010, + title={Numerical Methods for Fluid Dynamics}, + author={Durran, Dale R}, + year={2010}, + publisher={Springer New York, NY} +} + @book{durran2013numerical, title={Numerical methods for wave equations in geophysical fluid dynamics}, author={Durran, Dale R}, diff --git a/docs/src/operators.md b/docs/src/operators.md index 39b572aa1a..b015822f16 100644 --- a/docs/src/operators.md +++ b/docs/src/operators.md @@ -68,6 +68,7 @@ WeightedInterpolateF2C UpwindBiasedProductC2F Upwind3rdOrderBiasedProductC2F FCTBorisBook +FCTZalesak LeftBiasedC2F RightBiasedC2F LeftBiasedF2C diff --git a/src/Operators/finitedifference.jl b/src/Operators/finitedifference.jl index e0a3186415..44f56a757c 100644 --- a/src/Operators/finitedifference.jl +++ b/src/Operators/finitedifference.jl @@ -1463,20 +1463,20 @@ end U = FCTBorisBook(;boundaries) U.(v, x) -Correct the flux using the flux-corrected transport formulation by Boris and Book +Correct the flux using the flux-corrected transport formulation by Boris and Book [BorisBook1973](@cite). + Input arguments: - a face-valued vector field `v` - a center-valued field `x` ```math Ac(v,x)[i] = - s[i] \\max \\left\\{0, \\min \\left[ |v[i] |, s[i] \\left( x[i+\\tfrac{3}{2}] - x[i+\\tfrac{1}{2}] \\right) \\Delta z , s[i] \\left( x[i-\\tfrac{1}{2}] - x[i-\\tfrac{3}{2}] \\right) \\Delta z \\right] \\right\\}, + s[i] \\max \\left\\{0, \\min \\left[ |v[i] |, s[i] \\left( x[i+\\tfrac{3}{2}] - x[i+\\tfrac{1}{2}] \\right) , s[i] \\left( x[i-\\tfrac{1}{2}] - x[i-\\tfrac{3}{2}] \\right) \\right] \\right\\}, ``` where ``s[i] = +1`` if `` v[i] \\geq 0`` and ``s[i] = -1`` if `` v[i] \\leq 0``, and ``Ac`` represents the resulting corrected antidiffusive flux. -This formulation is based on [BorisBook1973](@cite). +This formulation is based on [BorisBook1973](@cite), as reported in [durran2010](@cite) section 5.4.1. Supported boundary conditions are: -- [`FirstOrderOneSided(x₀)`](@ref): uses the first-order downwind reconstruction to compute `x` on the left boundary, -and the first-order upwind reconstruction to compute `x` on the right boundary. +- [`FirstOrderOneSided(x₀)`](@ref): uses the first-order downwind reconstruction to compute `x` on the left boundary, and the first-order upwind reconstruction to compute `x` on the right boundary. !!! note Similar to the [`Upwind3rdOrderBiasedProductC2F`](@ref) operator, these boundary conditions do not define the value at the actual boundary faces, @@ -1593,19 +1593,20 @@ end U = FCTZalesak(;boundaries) U.(A, Φ, Φᵗᵈ) -Correct the flux using the flux-corrected transport formulation by Zalesak +Correct the flux using the flux-corrected transport formulation by Zalesak [zalesak1979fully](@cite). + Input arguments: - a face-valued vector field `A` - a center-valued field `Φ` - a center-valued field `Φᵗᵈ` ```math -Φ_j^{n+1} = Φ_j^{td} - \frac{dt}{dx}(C_{j+\frac{1}{2}}A_{j+\frac{1}{2}} - C_{j-\frac{1}{2}}A_{j-\frac{1}{2}}) +Φ_j^{n+1} = Φ_j^{td} - (C_{j+\\frac{1}{2}}A_{j+\\frac{1}{2}} - C_{j-\\frac{1}{2}}A_{j-\\frac{1}{2}}) ``` -This stencil is based on [zalesak1979fully](@cite). +This stencil is based on [zalesak1979fully](@cite), as reported in [durran2010](@cite) section 5.4.2, where ``C`` denotes +the corrected antidiffusive flux. Supported boundary conditions are: -- [`FirstOrderOneSided(x₀)`](@ref): uses the first-order downwind reconstruction to compute `x` on the left boundary, -and the first-order upwind reconstruction to compute `x` on the right boundary. +- [`FirstOrderOneSided(x₀)`](@ref): uses the first-order downwind reconstruction to compute `x` on the left boundary, and the first-order upwind reconstruction to compute `x` on the right boundary. !!! note Similar to the [`Upwind3rdOrderBiasedProductC2F`](@ref) operator, these boundary conditions do not define