Skip to content

Commit c89ab29

Browse files
rename gravity_constant to gravity (#81)
Co-authored-by: Tristan Montoya <[email protected]>
1 parent f250b56 commit c89ab29

7 files changed

+13
-13
lines changed

examples/elixir_shallowwater_cubed_sphere_shell_EC_correction.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using TrixiAtmo
66
# Entropy conservation for the spherical shallow water equations in Cartesian
77
# form obtained through an entropy correction term
88

9-
equations = ShallowWaterEquations3D(gravity_constant = 9.81)
9+
equations = ShallowWaterEquations3D(gravity = 9.81)
1010

1111
# Create DG solver with polynomial degree = 3 and Wintemeyer et al.'s flux as surface flux
1212
polydeg = 3

examples/elixir_shallowwater_cubed_sphere_shell_EC_projection.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using TrixiAtmo
88
# form obtained through the projection of the momentum onto the divergence-free
99
# tangential contravariant vectors
1010

11-
equations = ShallowWaterEquations3D(gravity_constant = 9.81)
11+
equations = ShallowWaterEquations3D(gravity = 9.81)
1212

1313
# Create DG solver with polynomial degree = 3 and Wintemeyer et al.'s flux as surface flux
1414
polydeg = 3

examples/elixir_shallowwater_cubed_sphere_shell_advection.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cells_per_dimension = (5, 5)
2121

2222
# We use the ShallowWaterEquations3D equations structure but modify the rhs! function to
2323
# convert it to a variable-coefficient advection equation
24-
equations = ShallowWaterEquations3D(gravity_constant = 0.0)
24+
equations = ShallowWaterEquations3D(gravity = 0.0)
2525

2626
# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
2727
solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs)

examples/elixir_shallowwater_cubed_sphere_shell_standard.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using TrixiAtmo
66
# Entropy consistency test for the spherical shallow water equations in Cartesian
77
# form using the standard DGSEM with LLF dissipation
88

9-
equations = ShallowWaterEquations3D(gravity_constant = 9.81)
9+
equations = ShallowWaterEquations3D(gravity = 9.81)
1010

1111
# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs as surface flux
1212
polydeg = 3

examples/elixir_shallowwater_quad_icosahedron_shell_advection.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cells_per_dimension = (2, 2)
2121

2222
# We use the ShallowWaterEquations3D equations structure but modify the rhs! function to
2323
# convert it to a variable-coefficient advection equation
24-
equations = ShallowWaterEquations3D(gravity_constant = 0.0)
24+
equations = ShallowWaterEquations3D(gravity = 0.0)
2525

2626
# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
2727
solver = DGSEM(polydeg = polydeg, surface_flux = flux_lax_friedrichs)

src/equations/covariant_shallow_water.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on a two-dimensional surface in three-dimensional ambient space as
1616
\end{aligned}
1717
```
1818
where $h$ is the fluid height, $v^a$ and $G^{ab}$ are the contravariant velocity and metric
19-
tensor components, $g$ is the gravitational constant, $f$ is the Coriolis parameter,
19+
tensor components, $g$ is the gravitational acceleration, $f$ is the Coriolis parameter,
2020
$J$ is the area element, and $\partial_a$ is used as a shorthand for
2121
$\partial / \partial \xi^a$. Combining the advective and pressure terms in order to define
2222
the momentum flux components

src/equations/shallow_water_3d.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The equations are given by
1919
\end{aligned}
2020
```
2121
The unknown quantities of the SWE are the water height ``h`` and the velocities ``\mathbf{v} = (v_1, v_2, v_3)^T``.
22-
The gravitational constant is denoted by `g`.
22+
The gravitational acceleration is denoted by `g`.
2323
2424
The 3D Shallow Water Equations (SWE) extend the 2D SWE to model shallow water flows on 2D manifolds embedded within 3D space.
2525
To confine the flow to the 2D manifold, a source term incorporating a Lagrange multiplier is applied.
@@ -48,17 +48,17 @@ References:
4848
"""
4949
struct ShallowWaterEquations3D{RealT <: Real} <:
5050
Trixi.AbstractShallowWaterEquations{3, 5}
51-
gravity::RealT # gravitational constant
51+
gravity::RealT # gravitational acceleration
5252
H0::RealT # constant "lake-at-rest" total water height
5353
end
5454

55-
# Allow for flexibility to set the gravitational constant within an elixir depending on the
56-
# application where `gravity_constant=1.0` or `gravity_constant=9.81` are common values.
55+
# Allow for flexibility to set the gravitational acceleration within an elixir depending on the
56+
# application where `gravity=1.0` or `gravity=9.81` are common values.
5757
# The reference total water height H0 defaults to 0.0 but is used for the "lake-at-rest"
5858
# well-balancedness test cases.
59-
function ShallowWaterEquations3D(; gravity_constant, H0 = zero(gravity_constant))
60-
T = promote_type(typeof(gravity_constant), typeof(H0))
61-
ShallowWaterEquations3D(gravity_constant, H0)
59+
function ShallowWaterEquations3D(; gravity, H0 = zero(gravity))
60+
T = promote_type(typeof(gravity), typeof(H0))
61+
ShallowWaterEquations3D(gravity, H0)
6262
end
6363

6464
Trixi.have_nonconservative_terms(::ShallowWaterEquations3D) = False() # Deactivate non-conservative terms for the moment...

0 commit comments

Comments
 (0)