Skip to content

Commit 200f937

Browse files
sbryngelsonclaude
andcommitted
Remove shallow PHYSICS_DOCS entries, move to skip set instead
The 16 entries I added were just restating what the code checks without real physics content (math, references, explanations). Move them to the lint skip set so domain experts can add proper documentation later. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4ca85e0 commit 200f937

2 files changed

Lines changed: 22 additions & 141 deletions

File tree

toolchain/mfc/case_validator.py

Lines changed: 0 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -242,145 +242,6 @@
242242
"Global dimensions must be even. Incompatible with cylindrical coordinates."
243243
),
244244
},
245-
"check_adaptive_time_stepping": {
246-
"title": "Adaptive Time Stepping",
247-
"category": "Numerical Schemes",
248-
"explanation": (
249-
"Requires RK3 time stepper. Only compatible with polytropic or "
250-
"Lagrangian bubble models. Incompatible with QBMM."
251-
),
252-
},
253-
"check_adv_n": {
254-
"title": "Bubble Advection",
255-
"category": "Bubble Physics",
256-
"explanation": (
257-
"Bubble advection (adv_n) requires single-fluid Euler bubble solver. "
258-
"Incompatible with QBMM."
259-
),
260-
},
261-
"check_body_forces": {
262-
"title": "Body Forces",
263-
"category": "Feature Compatibility",
264-
"explanation": (
265-
"Body force parameters (k, w, p, g components) must be fully specified "
266-
"for each active dimension."
267-
),
268-
},
269-
"check_continuum_damage": {
270-
"title": "Continuum Damage Modeling",
271-
"category": "Feature Compatibility",
272-
"explanation": (
273-
"Requires model_eqns = 2 and specification of tau_star, "
274-
"cont_damage_s, and alpha_bar parameters."
275-
),
276-
},
277-
"check_grcbc": {
278-
"title": "Generalized Relaxation CBC",
279-
"category": "Boundary Conditions",
280-
"explanation": (
281-
"GRCBC requires specific BC values: -7 (inflow) or -8 (outflow). "
282-
"Inflow requires velocity and pressure specification."
283-
),
284-
},
285-
"check_hyperelasticity": {
286-
"title": "Hyperelasticity",
287-
"category": "Feature Compatibility",
288-
"explanation": (
289-
"Pre-stress requires hyperelasticity. Not supported with "
290-
"model_eqns = 1. Requires HLL Riemann solver."
291-
),
292-
},
293-
"check_ibm": {
294-
"title": "Immersed Boundary Method",
295-
"category": "Domain and Geometry",
296-
"explanation": (
297-
"Requires 2D or 3D (n > 0). Number of immersed boundaries "
298-
"must be between 1 and 10."
299-
),
300-
},
301-
"check_igr_simulation": {
302-
"title": "IGR Simulation Constraints",
303-
"category": "Numerical Schemes",
304-
"explanation": (
305-
"Iterative ghost-cell remapping has numerous incompatibilities "
306-
"including polytropic, bubbles, surface tension, MHD, and elasticity."
307-
),
308-
},
309-
"check_mhd_simulation": {
310-
"title": "MHD Simulation Constraints",
311-
"category": "Feature Compatibility",
312-
"explanation": (
313-
"MHD requires HLL or HLLD Riemann solver. HLLD unavailable for "
314-
"relativistic MHD. Hyperbolic divergence cleaning not supported in 1D."
315-
),
316-
},
317-
"check_model_eqns_simulation": {
318-
"title": "Six-Equation Model Constraints",
319-
"category": "Model Equations",
320-
"explanation": (
321-
"The six-equation model (model_eqns = 3) requires arithmetic "
322-
"averaging and specific wave speed calculation methods."
323-
),
324-
"references": ["Saurel09"],
325-
},
326-
"check_muscl_simulation": {
327-
"title": "MUSCL Simulation Constraints",
328-
"category": "Numerical Schemes",
329-
"explanation": (
330-
"Second-order MUSCL reconstruction requires a flux limiter "
331-
"selection (muscl_lim in 1-5)."
332-
),
333-
},
334-
"check_partial_density": {
335-
"title": "Partial Density Output",
336-
"category": "Post-Processing",
337-
"explanation": (
338-
"Multi-phase partial density output is incompatible with "
339-
"model_eqns = 1 (single-fluid gamma-law)."
340-
),
341-
},
342-
"check_qbmm_and_polydisperse": {
343-
"title": "QBMM and Polydisperse Bubbles",
344-
"category": "Bubble Physics",
345-
"explanation": (
346-
"Both require Euler bubble solver. Polydisperse requires "
347-
"poly_sigma > 0. QBMM requires nnode = 4."
348-
),
349-
"references": ["Bryngelson21"],
350-
},
351-
"check_riemann_solver": {
352-
"title": "Riemann Solver Selection",
353-
"category": "Numerical Schemes",
354-
"explanation": (
355-
"Five solvers available with different model compatibility. "
356-
"Six-equation model requires HLLC. Exact solver does not support "
357-
"wave_speeds. Low-Mach correction 2 requires HLLC."
358-
),
359-
},
360-
"check_schlieren": {
361-
"title": "Schlieren Visualization",
362-
"category": "Post-Processing",
363-
"explanation": (
364-
"Requires finite difference order and at least 2D (n > 0). "
365-
"Each schlieren_alpha coefficient must be positive."
366-
),
367-
},
368-
"check_volume_fraction": {
369-
"title": "Volume Fraction Output",
370-
"category": "Post-Processing",
371-
"explanation": (
372-
"Volume fraction output is incompatible with model_eqns = 1 "
373-
"(single-fluid gamma-law). Requires multi-component model."
374-
),
375-
},
376-
"check_weno_simulation": {
377-
"title": "WENO Simulation Constraints",
378-
"category": "Numerical Schemes",
379-
"explanation": (
380-
"Five WENO variants with mutual exclusivity constraints. "
381-
"weno_avg incompatible with model_eqns = 1."
382-
),
383-
},
384245
}
385246

386247

toolchain/mfc/lint_docs.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,11 @@ def check_physics_docs_coverage(repo_root: Path) -> list[str]:
403403
except ImportError:
404404
return []
405405

406-
# Methods that are purely structural/mechanical and don't need physics docs
406+
# Methods without PHYSICS_DOCS entries. Add a PHYSICS_DOCS entry (with math,
407+
# references, and explanation) to case_validator.py to remove from this set.
407408
skip = {
408-
"check_parameter_types", # type validation, not physics
409+
# Structural/mechanical checks (no physics meaning)
410+
"check_parameter_types", # type validation
409411
"check_output_format", # output format selection
410412
"check_restart", # restart file logistics
411413
"check_parallel_io_pre_process", # parallel I/O settings
@@ -425,6 +427,24 @@ def check_physics_docs_coverage(repo_root: Path) -> list[str]:
425427
"check_perturb_density", # parameter pairing validation
426428
"check_qm", # output dimension requirements
427429
"check_chemistry", # runtime Cantera validation only
430+
# Awaiting proper physics documentation (math, references, explanation)
431+
"check_adaptive_time_stepping",
432+
"check_adv_n",
433+
"check_body_forces",
434+
"check_continuum_damage",
435+
"check_grcbc",
436+
"check_hyperelasticity",
437+
"check_ibm",
438+
"check_igr_simulation",
439+
"check_mhd_simulation",
440+
"check_model_eqns_simulation",
441+
"check_muscl_simulation",
442+
"check_partial_density",
443+
"check_qbmm_and_polydisperse",
444+
"check_riemann_solver",
445+
"check_schlieren",
446+
"check_volume_fraction",
447+
"check_weno_simulation",
428448
}
429449

430450
validator_path = repo_root / "toolchain" / "mfc" / "case_validator.py"

0 commit comments

Comments
 (0)