Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ BOTTOM: Horizontally averaged temperature–depth profiles at each time step.
Solvers: defect correction (momentum), semi-Lagrangian (advection), Crank-Nicolson (heat diffusion).
Boundary conditions: Dirichlet (top/bottom), Neumann (sides), free-slip (velocity, all sides).

![IHTC](.//examples/MixedHeatedConvection/Results/Internally_Heated_1.0e6_400_100_lineara.gif)
![IHTC](./examples/MixedHeatedConvection/Results/Internally_Heated_1.0e6_400_100_lineara.gif)

**Figure 9. Internally Heated Convection for $Ra_Q = 1.5 \cdot 10^6$, resolution 400 × 100.**
Same setup as above, but with Neumann boundary at the bottom (zero heat flux) and constant internal volumetric heat production $Q \approx 15$.

![MHTC](.//examples/MixedHeatedConvection/Results/Mixed_Heated_1.0e6_400_100_lineara.gif)
![MHTC](./examples/MixedHeatedConvection/Results/Mixed_Heated_1.0e6_400_100_lineara.gif)

**Figure 10. Mixed-Heated Convection for Ra = $...$, resolution 400 × 100.**
Combination of the above two setups (bottom heating + internal heating).
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ makedocs(
"Falling Block Benchmark" => "man/examples/FallingBlockBenchmark.md", # Checked!
"Falling Block" => "man/examples/FallingBlockDC.md", # Checked!
"Rayleigh Taylor Instability (RTI)" => "man/examples/RTI.md", # Checked!
"RTI - Growth Rate" => "man/examples/RTI_growth_rate.md",
"RTI - Growth Rate" => "man/examples/RTI_growth_rate.md", # Checked!
"Viscous Inclusion" => "man/examples/ViscousInclusion.md",
],
"Mixed Thermal Convection" => Any[
Expand Down
18 changes: 9 additions & 9 deletions docs/src/man/examples/RTI_growth_rate.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This script performs a benchmark for the growth rate of a Rayleigh–Taylor instability, following Gerya (2009). The benchmark is based on the analytical solution by Ramberg (1968) and is used to assess the accuracy of the velocity field in a purely gravity-driven flow.

Although small-amplitude perturbations can be analyzed in theory—enabled by the use of tracers and bilinear interpolation of density onto centroids—a relatively large perturbation amplitude is used here for practical implementation.
While small-amplitude perturbations can be analyzed theoretically—facilitated by the use of tracers and bilinear interpolation of density onto centroids—a relatively large perturbation amplitude is employed here to accommodate practical implementation constraints.

---

Expand Down Expand Up @@ -34,7 +34,7 @@ Pl = (
)
```

Let's set the parameter for an initial cosinusoidal tracer perturbation for a two-layered model. For the benchmark analysis, the range of wavelenghts is defined as well.
The parameters for an initial cosinusoidal tracer perturbation are defined for a two-layer model. For benchmarking purposes, a range of wavelengths is specified.

```Julia
# Define Initial Condition ========================================== #
Expand All @@ -44,7 +44,7 @@ Ini = (p=:RTI,)
# ------------------------------------------------------------------- #
```

Now, one can set the physical parameters. Here, the range of the viscosity ration between the two layers is also defined.
The physical parameters are now defined, including the range of viscosity ratios between the two layers.

```Julia
# Physics =========================================================== #
Expand Down Expand Up @@ -143,7 +143,7 @@ The variables required for the analytical solution are calculated for each model
@. PP.ϕₐ = ϕ₁
```

Since the analytical solution is independent of the perturbation amplitude, the loop over different amplitudes can be performed subsequently. Within that loop, the model domain needs to be first setup as well as the perturbation amplitude.
Because the analytical solution is independent of perturbation amplitude, the loop over different amplitudes is performed separately. Within that loop, both the model domain and perturbation amplitude are defined for each configuration.

```Julia
for j in eachindex(λᵣ)
Expand Down Expand Up @@ -278,7 +278,7 @@ To setup the perturbation, the markers are initialized in the following.
# ------------------------------------------------------- #
```

Now, one needs to define the parameters to solve the linear system of equations using the defec correction method.
The parameters for solving the linear system using the defect correction method are now defined.

```Julia
# System of Equations =================================== #
Expand Down Expand Up @@ -306,7 +306,7 @@ Now, one needs to define the parameters to solve the linear system of equations
# ------------------------------------------------------- #
```

Now,pne can solve the momentum and mass conservation equations.
The momentum and mass conservation equations are now solved.

```Julia
# Momentum Equation ===
Expand Down Expand Up @@ -371,7 +371,7 @@ In the following, one defines the parameters to calculate the rising velocity at
PP.ϕ[1] = 2*π*(M.ymax-M.ymin)/2/λ
```

If wanted, the density, tracer, and viscosity fields are plotted. To verify the position of the perturbation tip used for velocity interpolation, the tip (black circle) and surrounding vertical velocity grid points (red circles) are plotted over the tracer field. The plot is zoomed in for better visualization.
If wanted, the density, tracer, and viscosity fields are plotted. To verify the position of the perturbation tip used in velocity interpolation, the tip (black circle) and surrounding vertical velocity grid points (red circles) are plotted on the tracer field. The plot is zoomed in for better visualization.

```Julia
if plot_fields==:yes
Expand Down Expand Up @@ -425,7 +425,7 @@ If wanted, the density, tracer, and viscosity fields are plotted. To verify the

![Growth_Rate_Example](../../assets/RTI_GR_example.svg)

**Figure 1. Example of a RTI model.** Top: Centroid velocity arrows on top of the density field. Middle: Centroid viscosity. Bottom: Zoom of the tracer field on the tip of the perturbation at the center of the model domain. The black tracer marks the tip, and the red tracer mark the vertical velocity nodes from which the vertical velocity is interpolated onto the tip. The example is a model with a perturbation of $A=h_{1}/15$ and a wavelength of 12 km. The number of centroids in the vertical direction is 50. The number of horizontal centroids is related to the wavelength and aspect ratio of the model such that the resoluton is always the same in the horizontal and vertical direction for each model of the benchmark.
**Figure 1. Example of a RTI model.** Top: Centroid velocity arrows on top of the density field. Middle: Centroid viscosity. Bottom: Zoom of the tracer field on the tip of the perturbation at the center of the model domain. The black tracer marks the tip, and the red tracer mark the vertical velocity nodes from which the vertical velocity is interpolated onto the tip. This example uses a perturbation of $A = h_{1}/15$ and a wavelength of 12 km. The model includes 50 centroids in the vertical direction. The number of horizontal centroids is chosen such that the resolution remains consistent in both the horizontal and vertical directions for all benchmark models.

Finally, the rising velocity is plotted over the analytical solution for the given range of viscosity contrasts.

Expand Down Expand Up @@ -454,5 +454,5 @@ end

![RTI_GrowthRate](../../assets/RTI_Growth_Rate.png)

**Figure 2.RTI Growth Rate.** Growth rate of an initial cosinusoidal pertrubation of a two-layered system with different wavelengths $\lambda$. The growth rate is arbitrarily scalled by $b_1$ and $b_2$ for visualization purposes following the approach of Gerya (2000). The lines are the analytical solutions for different viscosity ratios $\eta_r$ and the black circles show the corresponding numerical results. The rising velocity is numerically calculated following the approach shown in Figure 1.
**Figure 2. RTI Growth Rate.** Growth rate of an initial cosinusoidal perturbation in a two-layer system across various wavelengths $\lambda$. The growth rate is arbitrarily scaled using $b_1$ and $b_2$ for visualization, following the approach of Gerya (2000). The lines are the analytical solutions for different viscosity ratios $\eta_r$ and the black circles show the corresponding numerical results. The rising velocity is numerically calculated following the approach shown in Figure 1.

4 changes: 2 additions & 2 deletions examples/MixedHeatedConvection/BottomHeated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Pl = (
k = scatter()
path = string("./examples/MixedHeatedConvection/Results/")
anim = Plots.Animation(path, String[] )
save_fig = 0
save_fig = 1
# ------------------------------------------------------------------- #
# Modellgeometrie Konstanten ======================================== #
M = Geometry(
Expand Down Expand Up @@ -113,7 +113,7 @@ T = TimeParameter(
tmax = 1000000.0, # [ Ma ]
Δfacc = 1.0, # Courant time factor
Δfacd = 1.0, # Diffusion time factor
itmax = 20, # Maximum iterations; 30000
itmax = 6000, # Maximum iterations
)
T.tmax = T.tmax*1e6*T.year # [ s ]
T.Δc = T.Δfacc * minimum((Δ.x,Δ.y)) /
Expand Down
Binary file removed examples/MixedHeatedConvection/Results/000001.png
Binary file not shown.
Binary file modified examples/MixedHeatedConvection/Results/Bottom_Heated_1.0e6_400_100_lineara.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...dConvection/Results/Bottom_Heated_Final_Stage1.0e6_400_100_it_6000_lineara_.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...MixedHeatedConvection/Results/Bottom_Heated_Iterations1.0e6_400_100_lineara.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ixedHeatedConvection/Results/Bottom_Heated_TimeSeries1.0e6_400_100_lineara_.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/MixedHeatedConvection/Results/Internally_Heated_1.0e6_400_100_lineara.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...vection/Results/Internally_Heated_Final_Stage1.0e6_400_100_it_6000_lineara_.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...dHeatedConvection/Results/Internally_Heated_Iterations1.0e6_400_100_lineara.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...HeatedConvection/Results/Internally_Heated_TimeSeries1.0e6_400_100_lineara_.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed examples/MixedHeatedConvection/Results/palette.bmp
Binary file not shown.
Loading