Skip to content

Commit 8c288fd

Browse files
authored
New example and improved examples doc page (#774)
1 parent bdf3709 commit 8c288fd

File tree

24 files changed

+185
-60
lines changed

24 files changed

+185
-60
lines changed

docs/examples.sh

100644100755
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

3-
set -e
3+
MAX_HEIGHT=400
4+
5+
set -e -x
46

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

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

1719
for png in $(find "$casedir" -maxdepth 1 -name '*.png'); do
1820
cp "$png" "$1/docs/documentation/$(basename "$png" | sed s/\.png//g)-$casename-example.png"
1921
done
2022
fi
21-
done
23+
done
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# 1D Multi-Component Inert Shock Tube
22

3-
References:
3+
Reference:
44
> 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
55
66
## Initial Condition
77

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

1010
## Results
1111

12-
![Results](result.png)
12+
<img src="result.png" height="MAX_HEIGHT"/>

examples/1D_laxshocktube/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Lax shock tube problem (1D)
22

3-
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.
3+
Reference:
4+
> P. D. Lax, Weak solutions of nonlinear hyperbolic equations and their numerical computation, Communications on pure and applied mathematics 7 (1) (1954) 159–193.
45
56
## Initial Condition
67

7-
![Initial Condition](initial.png)
8+
<img src="initial.png" height="MAX_HEIGHT"/>
89

910
## Result
1011

11-
![Result](result.png)
12+
<img src="result.png" height="MAX_HEIGHT"/>

examples/1D_reactive_shocktube/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ References:
77
88
## Initial Condition
99

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

1212
## Results
1313

14-
![Results](result.png)
14+
<img src="result.png" height="MAX_HEIGHT"/>

examples/1D_shuosher_old/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Shu-Osher problem (1D)
22

3-
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.
3+
Reference:
4+
> 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.
45
56
## Initial Condition
67

7-
![Initial Condition](initial.png)
8+
<img src="initial.png" height="MAX_HEIGHT"/>
89

910
## Result
1011

11-
![Result](result.png)
12+
<img src="result.png" height="MAX_HEIGHT"/>

examples/1D_titarevtorro/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Titarev-Toro problem (1D)
22

3-
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.
3+
Reference:
4+
> V. A. Titarev, E. F. Toro, Finite-volume WENO schemes for three-dimensional conservation laws, Journal of Computational Physics 201 (1) (2004) 238–260.
45
56
## Initial Condition
67

7-
![Initial Condition](initial.png)
8+
<img src="initial.png" heiht="MAX_HEIGHT"/>
89

910
## Result
1011

11-
![Result](result.png)
12+
<img src="result.png" heiht="MAX_HEIGHT"/>
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# 2D Hardcodied IC Example
22

3-
## Initial Condition
3+
## Initial Condition and Result
44

5-
![Initial Condition](initial.png)
6-
7-
## Result
8-
9-
![Result](result.png)
5+
<img src="initial.png" width="45%"/>
6+
<img src="result.png" width="45%"/>

examples/2D_ibm_cfl_dt/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Result
44

5-
![Result](result.png)
5+
<img src="result.png" height="MAX_HEIGHT"/>
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Isentropic vortex problem (2D)
22

3-
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
3+
Reference:
4+
> 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
45
56
## Density
67

7-
![Density](alpha_rho1.png)
8+
<img src="alpha_rho1.png" height="MAX_HEIGHT"/>
89

910
## Density Norms
1011

11-
![Density Norms](density_norms.png)
12+
<img src="density_norms.png" height="MAX_HEIGHT"/>
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# Lid-Driven Cavity Problem (2D)
22

3-
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
3+
Reference:
4+
> 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
45
5-
Reference: Ghia, U., & Ghia, K. N., & Shin, C. T. (1982). High-re solutions for incompressible flow
6+
> Ghia, U., & Ghia, K. N., & Shin, C. T. (1982). High-re solutions for incompressible flow
67
using the Navier-Stokes equations and a multigrid method. Journal of Computational Physics, 48, 387-411
78

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

1011
## Final Condition
1112

12-
![Final Condition](final_condition.png)
13+
<img src="final_condition.png" height="MAX_HEIGHT"/>
1314

1415
## Centerline Velocities
1516

16-
![Centerline Velocities](centerline_velocities.png)
17+
<img src="centerline_velocities.png" height="MAX_HEIGHT"/>

0 commit comments

Comments
 (0)