Skip to content

Commit

Permalink
fix examples.md figures
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfonba committed Dec 24, 2024
1 parent 8383415 commit 1740c4b
Show file tree
Hide file tree
Showing 22 changed files with 68 additions and 60 deletions.
8 changes: 5 additions & 3 deletions docs/examples.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

set -e
MAX_HEIGHT=400

set -e -x

examples_md="$1/docs/documentation/examples.md"
rm "$examples_md" || true
Expand All @@ -11,11 +13,11 @@ for casedir in $(find "$1/examples/" -mindepth 1 -maxdepth 1 -type d); do
casename="$(basename "$casedir")"

if [ -f "$casedir/README.md" ]; then
sed -e "s/\.png/-$casename-example\.png/g" "$casedir/README.md" | sed 's/^#/##/g' >> "$examples_md"
sed -e "s/\.png/-$casename-example\.png/g" "$casedir/README.md" | sed 's/^#/##/g' | sed "s/MAX_HEIGHT/$MAX_HEIGHT/g" >> "$examples_md"
echo '' >> "$examples_md"

for png in $(find "$casedir" -maxdepth 1 -name '*.png'); do
cp "$png" "$1/docs/documentation/$(basename "$png" | sed s/\.png//g)-$casename-example.png"
done
fi
done
done
6 changes: 3 additions & 3 deletions examples/1D_inert_shocktube/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 1D Multi-Component Inert Shock Tube

References:
Reference:
> P. J. Martínez Ferrer, R. Buttay, G. Lehnasch, and A. Mura, “A detailed verification procedure for compressible reactive multicomponent Navier–Stokes solvers”, Comput. & Fluids, vol. 89, pp. 88–110, Jan. 2014. Accessed: Oct. 13, 2024. [Online]. Available: https://doi.org/10.1016/j.compfluid.2013.10.014
## Initial Condition

![Initial Condition](initial.png)
<img src="initial.png" height="MAX_HEIGHT"/>

## Results

![Results](result.png)
<img src="result.png" height="MAX_HEIGHT"/>
7 changes: 4 additions & 3 deletions examples/1D_laxshocktube/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Lax shock tube problem (1D)

Reference: P. D. Lax, Weak solutions of nonlinear hyperbolic equations and their numerical computation, Communications on pure and applied mathematics 7 (1) (1954) 159–193.
Reference:
> P. D. Lax, Weak solutions of nonlinear hyperbolic equations and their numerical computation, Communications on pure and applied mathematics 7 (1) (1954) 159–193.
## Initial Condition

![Initial Condition](initial.png)
<img src="initial.png" height="MAX_HEIGHT"/>

## Result

![Result](result.png)
<img src="result.png" height="MAX_HEIGHT"/>
4 changes: 2 additions & 2 deletions examples/1D_reactive_shocktube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ References:
## Initial Condition

![Initial Condition](initial.png)
<img src="initial.png" height="MAX_HEIGHT"/>

## Results

![Results](result.png)
<img src="result.png" height="MAX_HEIGHT"/>
7 changes: 4 additions & 3 deletions examples/1D_shuosher_old/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Shu-Osher problem (1D)

Reference: C. W. Shu, S. Osher, Efficient implementation of essentially non-oscillatory shock-capturing schemes, Journal of Computational Physics 77 (2) (1988) 439–471. doi:10.1016/0021-9991(88)90177-5.
Reference:
> C. W. Shu, S. Osher, Efficient implementation of essentially non-oscillatory shock-capturing schemes, Journal of Computational Physics 77 (2) (1988) 439–471. doi:10.1016/0021-9991(88)90177-5.
## Initial Condition

![Initial Condition](initial.png)
<img src="initial.png" height="MAX_HEIGHT"/>

## Result

![Result](result.png)
<img src="result.png" height="MAX_HEIGHT"/>
7 changes: 4 additions & 3 deletions examples/1D_titarevtorro/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Titarev-Toro problem (1D)

Reference: V. A. Titarev, E. F. Toro, Finite-volume WENO schemes for three-dimensional conservation laws, Journal of Computational Physics 201 (1) (2004) 238–260.
Reference:
> V. A. Titarev, E. F. Toro, Finite-volume WENO schemes for three-dimensional conservation laws, Journal of Computational Physics 201 (1) (2004) 238–260.
## Initial Condition

![Initial Condition](initial.png)
<img src="initial.png" heiht="MAX_HEIGHT"/>

## Result

![Result](result.png)
<img src="result.png" heiht="MAX_HEIGHT"/>
9 changes: 3 additions & 6 deletions examples/2D_hardcodied_ic/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# 2D Hardcodied IC Example

## Initial Condition
## Initial Condition and Result

![Initial Condition](initial.png)

## Result

![Result](result.png)
<img src="initial.png" width="45%"/>
<img src="result.png" width="45%"/>
2 changes: 1 addition & 1 deletion examples/2D_ibm_cfl_dt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## Result

![Result](result.png)
<img src="result.png" height="MAX_HEIGHT"/>
7 changes: 4 additions & 3 deletions examples/2D_isentropicvortex/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Isentropic vortex problem (2D)

Reference: Coralic, V., & Colonius, T. (2014). Finite-volume Weno scheme for viscous compressible multicomponent flows. Journal of Computational Physics, 274, 95–121. https://doi.org/10.1016/j.jcp.2014.06.003
Reference:
> Coralic, V., & Colonius, T. (2014). Finite-volume Weno scheme for viscous compressible multicomponent flows. Journal of Computational Physics, 274, 95–121. https://doi.org/10.1016/j.jcp.2014.06.003
## Density

![Density](alpha_rho1.png)
<img src="alpha_rho1.png" height="MAX_HEIGHT"/>

## Density Norms

![Density Norms](density_norms.png)
<img src="density_norms.png" height="MAX_HEIGHT"/>
9 changes: 5 additions & 4 deletions examples/2D_lid_driven_cavity/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Lid-Driven Cavity Problem (2D)

Reference: Bezgin, D. A., & Buhendwa A. B., & Adams N. A. (2022). JAX-FLUIDS: A fully-differentiable high-order computational fluid dynamics solver for compressible two-phase flows. arXiv:2203.13760
Reference:
> Bezgin, D. A., & Buhendwa A. B., & Adams N. A. (2022). JAX-FLUIDS: A fully-differentiable high-order computational fluid dynamics solver for compressible two-phase flows. arXiv:2203.13760
Reference: Ghia, U., & Ghia, K. N., & Shin, C. T. (1982). High-re solutions for incompressible flow
> Ghia, U., & Ghia, K. N., & Shin, C. T. (1982). High-re solutions for incompressible flow
using the Navier-Stokes equations and a multigrid method. Journal of Computational Physics, 48, 387-411

Video: https://youtube.com/shorts/JEP28scZrBM?feature=share

## Final Condition

![Final Condition](final_condition.png)
<img src="final_condition.png" height="MAX_HEIGHT"/>

## Centerline Velocities

![Centerline Velocities](centerline_velocities.png)
<img src="centerline_velocities.png" height="MAX_HEIGHT"/>
10 changes: 3 additions & 7 deletions examples/2D_rayleigh_taylor/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Rayleigh-Taylor Instability (2D)

## Final Condition

![Final Condition](final_condition.png)

## Centerline Velocities

![Linear Theory Comparison](linear_theory.jpg)
## Final Condition and Linear Theory
<img src='final_condition.png' height='MAX_HEIGHT'/>
<img src='linear_theory.png' height='MAX_HEIGHT'/>
Binary file removed examples/2D_rayleigh_taylor/linear_theory.jpg
Binary file not shown.
Binary file added examples/2D_rayleigh_taylor/linear_theory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 5 additions & 7 deletions examples/2D_riemann_test/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# 2D Riemann Test (2D)

Reference: Chamarthi, A., & Hoffmann, N., & Nishikawa, H., & Frankel S. (2023). Implicit gradients based conservative numerical scheme for compressible flows. arXiv:2110.05461
Reference:
> Chamarthi, A., & Hoffmann, N., & Nishikawa, H., & Frankel S. (2023). Implicit gradients based conservative numerical scheme for compressible flows. arXiv:2110.05461
## Density Initial Condition
## Density Initial and Final Conditions

![Density](alpha_rho1_initial.png)

## Density Final Condition

![Density Norms](alpha_rho1_final.png)
<img src="alpha_rho1_initial.png" width="45%"/>
<img src="alpha_rho1_final.png" width="45%"/>
7 changes: 4 additions & 3 deletions examples/2D_shockdroplet/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Shock Droplet (2D)

Reference: Panchal et. al., A Seven-Equation Diffused Interface Method for Resolved Multiphase Flows, JCP, 475 (2023)
Reference:
> Panchal et. al., A Seven-Equation Diffused Interface Method for Resolved Multiphase Flows, JCP, 475 (2023)
## Initial Condition

![Initial Condition](initial.png)
<img src="initial.png" height="MAX_HEIGHT"/>

## Result

![Result](result.png)
<img src="result.png" height="MAX_HEIGHT"/>
9 changes: 9 additions & 0 deletions examples/2D_triple_point/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 2D Triple Point (2D)

Reference:
> Trojak, W., & Dzanic, T. Positivity-preserving discoutinous spectral element method for compressible multi-species flows. arXiv:2308.02426
## Numerical Schlieren at Final Time

<img src="final.png" height="MAX_HEIGHT"/>

Binary file added examples/2D_triple_point/final.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions examples/3D_TaylorGreenVortex/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Taylor-Green Vortex (3D)

Reference: Hillewaert, K. (2013). TestCase C3.5 - DNS of the transition of the Taylor-Green vortex, Re=1600 - Introduction and result summary. 2nd International Workshop on high-order methods for CFD.
Reference:
> Hillewaert, K. (2013). TestCase C3.5 - DNS of the transition of the Taylor-Green vortex, Re=1600 - Introduction and result summary. 2nd International Workshop on high-order methods for CFD.
## Final Condition
This figure shows the isosurface with zero q-criterion.
![Density](result.png)

<img src="result.png" height="MAX_HEIGHT"/>

2 changes: 1 addition & 1 deletion examples/3D_ibm_bowshock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

## Final Condition

![Density](result.png)
<img src="result.png" height="MAX_HEIGHT">

9 changes: 3 additions & 6 deletions examples/3D_rayleigh_taylor/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Rayleigh-Taylor Instability (3D)

## Final Condition
## Final Condition and Linear Theory

![Final Condition](final_condition.png)

## Centerline Velocities

![Linear Theory Comparison](linear_theory.png)
<img src="final_condition.png" height="MAX_HEIGHT"/>
<img src="linear_theory.png" height="MAX_HEIGHT"/>
5 changes: 3 additions & 2 deletions examples/nD_perfect_reactor/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Perfectly Stirred Reactor

Reference: G. B. Skinner and G. H. Ringrose, “Ignition Delays of a Hydrogen—Oxygen—Argon Mixture at Relatively Low Temperatures”, J. Chem. Phys., vol. 42, no. 6, pp. 2190–2192, Mar. 1965. Accessed: Oct. 13, 2024. [Online]. Available: https://doi.org/10.1063/1.1696266.
Reference:
> G. B. Skinner and G. H. Ringrose, “Ignition Delays of a Hydrogen—Oxygen—Argon Mixture at Relatively Low Temperatures”, J. Chem. Phys., vol. 42, no. 6, pp. 2190–2192, Mar. 1965. Accessed: Oct. 13, 2024. [Online]. Available: https://doi.org/10.1063/1.1696266.
```bash
$ python3 analyze.py
Expand All @@ -10,4 +11,4 @@ Induction Times ([OH] >= 1e-6):
+ (Che)MFC: 5.130e-05 s
```

![Result](result.png)
<img src="result.png" height="MAX_HEIGHT"/>
2 changes: 1 addition & 1 deletion toolchain/mfc/test/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ def foreach_example():
continue

# # List of currently broken examples -> currently attempting to fix!
brokenCases = ["2D_ibm_cfl_dt", "1D_sodHypo", "2D_viscous", "2D_laplace_pressure_jump", "2D_bubbly_steady_shock", "2D_advection", "2D_hardcodied_ic", "2D_ibm_multiphase", "2D_acoustic_broadband", "1D_inert_shocktube", "1D_reactive_shocktube", "2D_ibm_steady_shock", "3D_performance_test", "3D_ibm_stl_ellipsoid", "3D_sphbubcollapse", "2D_ibm_stl_wedge", "3D_ibm_stl_pyramid", "3D_ibm_bowshock", "3D_turb_mixing", "2D_mixing_artificial_Ma"]
brokenCases = ["2D_ibm_cfl_dt", "1D_sodHypo", "2D_viscous", "2D_laplace_pressure_jump", "2D_bubbly_steady_shock", "2D_advection", "2D_hardcodied_ic", "2D_ibm_multiphase", "2D_acoustic_broadband", "1D_inert_shocktube", "1D_reactive_shocktube", "2D_ibm_steady_shock", "3D_performance_test", "3D_ibm_stl_ellipsoid", "3D_sphbubcollapse", "2D_ibm_stl_wedge", "3D_ibm_stl_pyramid", "3D_ibm_bowshock", "3D_turb_mixing", "2D_mixing_artificial_Ma", "2D_triple_point"]
if path in brokenCases:
continue
name = f"{path.split('_')[0]} -> Example -> {'_'.join(path.split('_')[1:])}"
Expand Down

0 comments on commit 1740c4b

Please sign in to comment.