diff --git a/docs/examples.sh b/docs/examples.sh old mode 100644 new mode 100755 index 0608e3302..7a2e77df1 --- a/docs/examples.sh +++ b/docs/examples.sh @@ -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 @@ -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 \ No newline at end of file +done diff --git a/examples/1D_inert_shocktube/README.md b/examples/1D_inert_shocktube/README.md index 07305487d..0ad895304 100644 --- a/examples/1D_inert_shocktube/README.md +++ b/examples/1D_inert_shocktube/README.md @@ -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) + ## Results -![Results](result.png) \ No newline at end of file + diff --git a/examples/1D_laxshocktube/README.md b/examples/1D_laxshocktube/README.md index 5e5f5a0e3..092aaedcf 100644 --- a/examples/1D_laxshocktube/README.md +++ b/examples/1D_laxshocktube/README.md @@ -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) + ## Result -![Result](result.png) + diff --git a/examples/1D_reactive_shocktube/README.md b/examples/1D_reactive_shocktube/README.md index 9c2d64b3f..fce3dadab 100644 --- a/examples/1D_reactive_shocktube/README.md +++ b/examples/1D_reactive_shocktube/README.md @@ -7,8 +7,8 @@ References: ## Initial Condition -![Initial Condition](initial.png) + ## Results -![Results](result.png) \ No newline at end of file + diff --git a/examples/1D_shuosher_old/README.md b/examples/1D_shuosher_old/README.md index 498bc2be2..dcbfae459 100644 --- a/examples/1D_shuosher_old/README.md +++ b/examples/1D_shuosher_old/README.md @@ -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) + ## Result -![Result](result.png) + diff --git a/examples/1D_titarevtorro/README.md b/examples/1D_titarevtorro/README.md index aaa261552..42a346eae 100644 --- a/examples/1D_titarevtorro/README.md +++ b/examples/1D_titarevtorro/README.md @@ -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) + ## Result -![Result](result.png) + diff --git a/examples/2D_hardcodied_ic/README.md b/examples/2D_hardcodied_ic/README.md index d4161530f..fc0fbf037 100644 --- a/examples/2D_hardcodied_ic/README.md +++ b/examples/2D_hardcodied_ic/README.md @@ -1,9 +1,6 @@ # 2D Hardcodied IC Example -## Initial Condition +## Initial Condition and Result -![Initial Condition](initial.png) - -## Result - -![Result](result.png) \ No newline at end of file + + diff --git a/examples/2D_ibm_cfl_dt/README.md b/examples/2D_ibm_cfl_dt/README.md index 7fb6de1ca..cb8e5055f 100644 --- a/examples/2D_ibm_cfl_dt/README.md +++ b/examples/2D_ibm_cfl_dt/README.md @@ -2,4 +2,4 @@ ## Result -![Result](result.png) + diff --git a/examples/2D_isentropicvortex/README.md b/examples/2D_isentropicvortex/README.md index 72032fbe1..7c8ef4d9e 100644 --- a/examples/2D_isentropicvortex/README.md +++ b/examples/2D_isentropicvortex/README.md @@ -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) + ## Density Norms -![Density Norms](density_norms.png) + diff --git a/examples/2D_lid_driven_cavity/README.md b/examples/2D_lid_driven_cavity/README.md index 737642936..bbaf08f73 100644 --- a/examples/2D_lid_driven_cavity/README.md +++ b/examples/2D_lid_driven_cavity/README.md @@ -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) + ## Centerline Velocities -![Centerline Velocities](centerline_velocities.png) + diff --git a/examples/2D_rayleigh_taylor/README.md b/examples/2D_rayleigh_taylor/README.md index 1338f6a10..c0ff7e08e 100644 --- a/examples/2D_rayleigh_taylor/README.md +++ b/examples/2D_rayleigh_taylor/README.md @@ -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 + + diff --git a/examples/2D_rayleigh_taylor/final_condition.png b/examples/2D_rayleigh_taylor/final_condition.png index dec95ee6d..9267f2f88 100644 Binary files a/examples/2D_rayleigh_taylor/final_condition.png and b/examples/2D_rayleigh_taylor/final_condition.png differ diff --git a/examples/2D_rayleigh_taylor/linear_theory.jpg b/examples/2D_rayleigh_taylor/linear_theory.jpg deleted file mode 100644 index 84b9ba11c..000000000 Binary files a/examples/2D_rayleigh_taylor/linear_theory.jpg and /dev/null differ diff --git a/examples/2D_rayleigh_taylor/linear_theory.png b/examples/2D_rayleigh_taylor/linear_theory.png new file mode 100644 index 000000000..1411fdf59 Binary files /dev/null and b/examples/2D_rayleigh_taylor/linear_theory.png differ diff --git a/examples/2D_riemann_test/README.md b/examples/2D_riemann_test/README.md index 4e644c988..db2960046 100644 --- a/examples/2D_riemann_test/README.md +++ b/examples/2D_riemann_test/README.md @@ -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) + + diff --git a/examples/2D_shockdroplet/README.md b/examples/2D_shockdroplet/README.md index b2f2118b5..a0883aa55 100644 --- a/examples/2D_shockdroplet/README.md +++ b/examples/2D_shockdroplet/README.md @@ -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) + ## Result -![Result](result.png) \ No newline at end of file + diff --git a/examples/2D_triple_point/README.md b/examples/2D_triple_point/README.md new file mode 100644 index 000000000..70da10d7f --- /dev/null +++ b/examples/2D_triple_point/README.md @@ -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 + + + diff --git a/examples/2D_triple_point/case.py b/examples/2D_triple_point/case.py new file mode 100755 index 000000000..59ac429b0 --- /dev/null +++ b/examples/2D_triple_point/case.py @@ -0,0 +1,117 @@ +#!/usr/bin/env python3 +import math +import json + +eps = 1e-8 +Nx = 699 +Ny = 299 + +print(json.dumps({ + # Logistics ================================================ + 'run_time_info' : 'F', + # ========================================================== + + # Computational Domain Parameters ========================== + 'x_domain%beg' : 0, + 'x_domain%end' : 7, + 'y_domain%beg' : 0, + 'y_domain%end' : 3, + 'm' : int(Nx), + 'n' : int(Ny), + 'p' : 0, + 'cfl_adap_dt' : 'T', + 'cfl_target' : 0.8, + 'n_start' : 0, + 't_stop' : 4.0, + 't_save' : 0.04, + # ========================================================== + + # Simulation Algorithm Parameters ========================== + 'num_patches' : 3, + 'model_eqns' : 2, + 'alt_soundspeed' : 'F', + 'num_fluids' : 2, + 'mpp_lim' : 'T', + 'mixture_err' : 'T', + 'time_stepper' : 3, + 'weno_order' : 7, + 'weno_eps' : 1.E-16, + 'weno_Re_flux' : 'F', + 'weno_avg' : 'F', + 'mapped_weno' : 'T', + 'null_weights' : 'F', + 'mp_weno' : 'F', + 'riemann_solver' : 2, + 'wave_speeds' : 1, + 'avg_state' : 2, + 'bc_x%beg' : -3,#11, + 'bc_x%end' : -3,#12 + 'bc_y%beg' : -3, + 'bc_y%end' : -3, + # ========================================================== + + # Formatted Database Files Structure Parameters ============ + 'format' : 1, + 'precision' : 2, + 'prim_vars_wrt' :'T', + 'schlieren_wrt' :'T', + 'fd_order' : 4, + 'schlieren_alpha(1)' : 0.5, + 'schlieren_alpha(2)' : 0.5, + 'parallel_io' :'T', + # ========================================================== + + # Patch 1: Left state ==================================== + 'patch_icpp(1)%geometry' : 3, + 'patch_icpp(1)%x_centroid' : 0.5, + 'patch_icpp(1)%y_centroid' : 3, + 'patch_icpp(1)%length_x' : 1, + 'patch_icpp(1)%length_y' : 6, + 'patch_icpp(1)%vel(1)' : 0., + 'patch_icpp(1)%vel(2)' : 0., + 'patch_icpp(1)%pres' : 1., + 'patch_icpp(1)%alpha_rho(1)' : (1 - eps)*1., + 'patch_icpp(1)%alpha_rho(2)' : eps, + 'patch_icpp(1)%alpha(1)' : 1 - eps, + 'patch_icpp(1)%alpha(2)' : eps, + # ========================================================== + + # Patch 2: Top right state ================================ + 'patch_icpp(2)%geometry' : 3, + 'patch_icpp(2)%alter_patch(1)' : 'T', + 'patch_icpp(2)%x_centroid' : 4, + 'patch_icpp(2)%y_centroid' : 2.25, + 'patch_icpp(2)%length_x' : 6, + 'patch_icpp(2)%length_y' : 1.5, + 'patch_icpp(2)%vel(1)' : 0., + 'patch_icpp(2)%vel(2)' : 0., + 'patch_icpp(2)%pres' : 0.1, + 'patch_icpp(2)%alpha_rho(1)' : (1-eps)*0.125, + 'patch_icpp(2)%alpha_rho(2)' : eps, + 'patch_icpp(2)%alpha(1)' : 1 - eps, + 'patch_icpp(2)%alpha(2)' : eps, + # ========================================================== + + # Patch 3: Bottom right state ============================= + 'patch_icpp(3)%geometry' : 3, + 'patch_icpp(3)%alter_patch(1)' : 'T', + 'patch_icpp(3)%x_centroid' : 4, + 'patch_icpp(3)%y_centroid' : 0.75, + 'patch_icpp(3)%length_x' : 6, + 'patch_icpp(3)%length_y' : 1.5, + 'patch_icpp(3)%vel(1)' : 0., + 'patch_icpp(3)%vel(2)' : 0., + 'patch_icpp(3)%pres' : 0.1, + 'patch_icpp(3)%alpha_rho(1)' : eps, + 'patch_icpp(3)%alpha_rho(2)' : (1 - eps)*1., + 'patch_icpp(3)%alpha(1)' : eps,# 0.95 + 'patch_icpp(3)%alpha(2)' : 1 - eps,#0.05, + # ========================================================== + + # Fluids Physical Parameters =============================== + 'fluid_pp(1)%gamma' : 1./(1.5 - 1.), + 'fluid_pp(1)%pi_inf' : 0, + 'fluid_pp(2)%gamma' : 1./(1.4 - 1.), + 'fluid_pp(2)%pi_inf' : 0., + # ========================================================== +})) diff --git a/examples/2D_triple_point/final.png b/examples/2D_triple_point/final.png new file mode 100644 index 000000000..5766592cf Binary files /dev/null and b/examples/2D_triple_point/final.png differ diff --git a/examples/3D_TaylorGreenVortex/README.md b/examples/3D_TaylorGreenVortex/README.md index 984e8a7d7..b2bc1ebe1 100644 --- a/examples/3D_TaylorGreenVortex/README.md +++ b/examples/3D_TaylorGreenVortex/README.md @@ -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) + + diff --git a/examples/3D_ibm_bowshock/README.md b/examples/3D_ibm_bowshock/README.md index f701b53ed..97bb2283d 100644 --- a/examples/3D_ibm_bowshock/README.md +++ b/examples/3D_ibm_bowshock/README.md @@ -2,5 +2,5 @@ ## Final Condition -![Density](result.png) + diff --git a/examples/3D_rayleigh_taylor/README.md b/examples/3D_rayleigh_taylor/README.md index 068caa143..7806f5181 100644 --- a/examples/3D_rayleigh_taylor/README.md +++ b/examples/3D_rayleigh_taylor/README.md @@ -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) + + diff --git a/examples/nD_perfect_reactor/README.md b/examples/nD_perfect_reactor/README.md index c15131ff4..8e83f673c 100644 --- a/examples/nD_perfect_reactor/README.md +++ b/examples/nD_perfect_reactor/README.md @@ -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 @@ -10,4 +11,4 @@ Induction Times ([OH] >= 1e-6): + (Che)MFC: 5.130e-05 s ``` -![Result](result.png) \ No newline at end of file + diff --git a/toolchain/mfc/test/cases.py b/toolchain/mfc/test/cases.py index 12c0d81fd..5ff32ebe4 100644 --- a/toolchain/mfc/test/cases.py +++ b/toolchain/mfc/test/cases.py @@ -848,7 +848,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", "3D_lagrange_bubblescreen"] + 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", "3D_lagrange_bubblescreen", "2D_triple_point"] if path in brokenCases: continue name = f"{path.split('_')[0]} -> Example -> {'_'.join(path.split('_')[1:])}"