Skip to content
Draft
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
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ All commands run from the repo root via `./mfc.sh`.
# Verification (pre-commit CI checks)
./mfc.sh precheck -j 8 # Run all 5 lint checks (same as CI gate)
./mfc.sh format -j 8 # Auto-format Fortran (.fpp/.f90) + Python
./mfc.sh lint # Pylint + Python unit tests
./mfc.sh lint # Ruff lint + Python unit tests
./mfc.sh spelling # Spell check

# Module loading (HPC clusters only — must use `source`)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/5eq_rk3_weno3_hllc/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# - weno_order : 3
# - riemann_solver : 2

import argparse
import json
import math
import argparse

parser = argparse.ArgumentParser(prog="Benchmarking Case 1", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/hypo_hll/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# - hypoelasticity : T
# - riemann_solver : 1

import argparse
import json
import math
import argparse

parser = argparse.ArgumentParser(prog="Benchmarkin Case 3", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/ibm/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Additional Benchmarked Features
# - ibm : T

import argparse
import json
import math
import argparse

parser = argparse.ArgumentParser(prog="Benchmarking Case 4", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/igr/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# - viscous : T
# - igr_order : 5

import argparse
import json
import math
import argparse

parser = argparse.ArgumentParser(prog="Benchmarking Case 5", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/viscous_weno5_sgb_acoustic/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# - bubble_model : 3
# - acoustic_source : T

import argparse
import json
import math
import argparse

parser = argparse.ArgumentParser(prog="Benchmarking Case 2", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)

Expand Down
5 changes: 3 additions & 2 deletions docs/documentation/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -715,14 +715,15 @@ Every push to a PR triggers CI. Understanding the pipeline helps you fix failure

### Lint Gate (runs first, blocks all other jobs)

All four checks must pass before any builds start:
All five checks must pass before any builds start:

1. **Formatting** — `./mfc.sh format` (auto-handled by pre-commit hook)
2. **Spelling** — `./mfc.sh spelling`
3. **Toolchain lint** — `./mfc.sh lint` (Python code quality)
3. **Toolchain lint** — `./mfc.sh lint` (ruff + Python unit tests)
4. **Source lint** — checks for:
- Raw `!$acc` or `!$omp` directives (must use Fypp GPU macros)
- Double-precision intrinsics (`dsqrt`, `dexp`, `dble`, etc.)
5. **Doc references** — validates documentation cross-references

### Build and Test Matrix

Expand Down
2 changes: 1 addition & 1 deletion examples/0D_bubblecollapse_adap/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
import math
import json
import math

# FLUID PROPERTIES
# Water
Expand Down
3 changes: 1 addition & 2 deletions examples/1D_bubblescreen/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# FLUID PROPERTIES
R_uni = 8314.0 # [J/kmol/K]
Expand Down Expand Up @@ -53,7 +53,6 @@
u0 = math.sqrt(p0 / rho0) # [m/s]
t0 = x0 / u0 # [s]

#
cfl = 0.1
Nx = 100
Ldomain = 20.0e-03
Expand Down
12 changes: 6 additions & 6 deletions examples/1D_convergence/case.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
import math
import json
import argparse
import json
import math

# Parsing command line arguments
parser = argparse.ArgumentParser(description="Generate JSON case configuration for two-fluid convergence simulation.")
Expand Down Expand Up @@ -67,10 +67,10 @@
"patch_icpp(1)%length_x": 1.0,
"patch_icpp(1)%vel(1)": 1.0,
"patch_icpp(1)%pres": 1.0,
"patch_icpp(1)%alpha_rho(1)": f"0.5 - 0.5*sin(2*pi*x)",
"patch_icpp(1)%alpha(1)": f"0.5 - 0.5*sin(2*pi*x)",
"patch_icpp(1)%alpha_rho(2)": f"0.5 + 0.5*sin(2*pi*x)",
"patch_icpp(1)%alpha(2)": f"0.5 + 0.5*sin(2*pi*x)",
"patch_icpp(1)%alpha_rho(1)": "0.5 - 0.5*sin(2*pi*x)",
"patch_icpp(1)%alpha(1)": "0.5 - 0.5*sin(2*pi*x)",
"patch_icpp(1)%alpha_rho(2)": "0.5 + 0.5*sin(2*pi*x)",
"patch_icpp(1)%alpha(2)": "0.5 + 0.5*sin(2*pi*x)",
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%pi_inf": 0.0,
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_exp_bubscreen/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# FLUID PROPERTIES
R_uni = 8314.0 # [J/kmol/K]
Expand Down
4 changes: 2 additions & 2 deletions examples/1D_exp_tube_phasechange/case.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
import math
import json
import argparse
import json
import math

parser = argparse.ArgumentParser(prog="phasechange", description="phase change considering both 5 and 6 equation models.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--mfc", type=json.loads, default="{}", metavar="DICT", help="MFC's toolchain's internal state.")
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_hypo_2materials/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python
import math
import json
import math

# Numerical setup
Nx = 399
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_impact/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python
import math
import json
import math

# Numerical setup
Nx = 399
Expand Down
6 changes: 3 additions & 3 deletions examples/1D_inert_shocktube/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# References:
# + https://doi.org/10.1016/j.compfluid.2013.10.014: 4.3. Multi-component inert shock tube

import json
import argparse
import json

import cantera as ct

Expand Down Expand Up @@ -105,8 +105,8 @@

if args.chemistry:
for i in range(len(sol_L.Y)):
case[f"patch_icpp(1)%Y({i+1})"] = sol_L.Y[i]
case[f"patch_icpp(2)%Y({i+1})"] = sol_R.Y[i]
case[f"patch_icpp(1)%Y({i + 1})"] = sol_L.Y[i]
case[f"patch_icpp(2)%Y({i + 1})"] = sol_R.Y[i]

if __name__ == "__main__":
print(json.dumps(case))
2 changes: 1 addition & 1 deletion examples/1D_laxshocktube/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 200
Expand Down
5 changes: 3 additions & 2 deletions examples/1D_multispecies_diffusion/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# References:
# + https://doi.org/10.1016/j.compfluid.2013.10.014: 4.4. Multicomponent diffusion test case

import json
import argparse
import json
import math

import cantera as ct

ctfile = "gri30.yaml"
Expand Down Expand Up @@ -73,6 +74,6 @@

for i in range(len(sol_L.Y)):
case[f"chem_wrt_Y({i + 1})"] = "T"
case[f"patch_icpp(1)%Y({i+1})"] = 0.0
case[f"patch_icpp(1)%Y({i + 1})"] = 0.0
if __name__ == "__main__":
print(json.dumps(case))
3 changes: 1 addition & 2 deletions examples/1D_poly_bubscreen/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# FLUID PROPERTIES
R_uni = 8314.0 # [J/kmol/K]
Expand Down Expand Up @@ -46,7 +46,6 @@
u0 = math.sqrt(p0 / rho0) # [m/s]
t0 = x0 / u0 # [s]

#
cact = 1475.0
cfl = 0.4
Nx = 20
Expand Down
3 changes: 1 addition & 2 deletions examples/1D_qbmm/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python2
import math
import json
import math

# FLUID PROPERTIES
R_uni = 8314.0 # [J/kmol/K]
Expand Down Expand Up @@ -48,7 +48,6 @@
u0 = math.sqrt(p0 / rho0) # [m/s]
t0 = x0 / u0 # [s]

#
cact = 1475.0
cfl = 0.1
Nx = 400
Expand Down
7 changes: 4 additions & 3 deletions examples/1D_reactive_shocktube/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
# + https://doi.org/10.1016/j.ijhydene.2023.03.190: Verification of numerical method
# + https://doi.org/10.1016/j.compfluid.2013.10.014: 4.7. Multi-species reactive shock tube

import json
import argparse
import json

import cantera as ct

parser = argparse.ArgumentParser(prog="1D_reactive_shocktube", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
Expand Down Expand Up @@ -111,8 +112,8 @@
if args.chemistry:
for i in range(len(sol_L.Y)):
case[f"chem_wrt_Y({i + 1})"] = "T"
case[f"patch_icpp(1)%Y({i+1})"] = sol_L.Y[i]
case[f"patch_icpp(2)%Y({i+1})"] = sol_R.Y[i]
case[f"patch_icpp(1)%Y({i + 1})"] = sol_L.Y[i]
case[f"patch_icpp(2)%Y({i + 1})"] = sol_R.Y[i]

if __name__ == "__main__":
print(json.dumps(case))
2 changes: 1 addition & 1 deletion examples/1D_shuosher_analytical/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 1000
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_shuosher_old/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 1000
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_shuosher_teno5/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 1000
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_shuosher_teno7/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 1000
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_shuosher_wenojs5/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 1000
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_shuosher_wenom5/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 1000
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_shuosher_wenoz5/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 1000
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_sodHypo/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 201
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_sodshocktube/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 399
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_sodshocktube_muscl/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 399
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_titarevtorro/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 999
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_titarevtorro_analytical/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

# Numerical setup
Nx = 999
Expand Down
2 changes: 1 addition & 1 deletion examples/2D_5wave_quasi1D/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python
import math
import json
import math

# Numerical setup
Nx = 399
Expand Down
2 changes: 1 addition & 1 deletion examples/2D_GreshoVortex/case.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import math
import json
import math

gam = 1.4
Ma0 = 1e-3
Expand Down
3 changes: 1 addition & 2 deletions examples/2D_IGR_2fluid/case.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

#!/usr/bin/env python3
# This case file demonstrates the Laplace pressure jump of a water droplet in air. The laplace pressure jump
# in 2D is given by delta = sigma / r where delta is the pressure jump, sigma is the surface tension coefficient,
# and r is the radius of the droplet. The results of this simulation agree with theory to well within 1%
# relative error.

import math
import json
import math

l = 1
eps = 1e-6
Expand Down
Loading
Loading