Skip to content

Commit b104aea

Browse files
sbryngelsonclaude
andauthored
Add physics constraint validation and auto-generated docs (#1149)
* Add physics warning infrastructure and auto-documenting constraints Add warn() method to CaseValidator for non-fatal physics checks (volume fraction sum, alpha-rho consistency, EOS parameter sanity, domain bounds, patch bounds, velocity components). Extend AST analyzer to discover self.warn() calls alongside self.prohibit(), with severity field on Rule dataclass. Auto-generated Doxygen docs now include a Physics Warnings section. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix doc reference lint for auto-generated pages Register auto-generated page IDs (parameters, case_constraints, examples, cli) in lint_docs.py so the pre-commit doc reference check does not flag them as missing. These pages are created by ./mfc.sh generate and only exist after generation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Display physics warnings in ./mfc.sh validate output The validate command was discarding the warnings list returned by CaseValidator.validate(). Now warnings are shown with yellow formatting alongside the per-stage constraint results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Validate all example cases in CI and clean up non-standard case files - Expand CI "Validate example cases" step from 2 hardcoded examples to all 134 examples/*/case.py files - Rename scaling/case.py to scaling/benchmark.py since it requires mandatory CLI args (--scaling, --memory) and is not a standard example - Remove 2D_phasechange_bubble/casefile.py (unreferenced duplicate of 3D_phasechange_bubble/case.py) - Fix 2D_bubbly_steady_shock/case.py missing nb in output dictionary - Add physics_constraints.md documentation - Update doc references to scaling/benchmark.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Auto-generate physics_constraints.md from PHYSICS_DOCS metadata Replace the hand-written physics constraints page with an auto-generated one that merges PHYSICS_DOCS entries (math, explanations, references) with AST-extracted validation rules (stages, severity, messages). This prevents the documentation from going stale when check methods are added or modified. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix physics docs rendering: \implies → \Rightarrow, backtick code params - Replace \implies with \Rightarrow (Doxygen MathJax compatible) - Add _format_message() to wrap code parameter references in backticks in auto-generated check messages (Fortran accessors, snake_case params, known short params like nb/dt/m/n/p) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Show all enforced checks without truncation in physics docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add parameter column to undocumented checks table in physics docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Remove undocumented checks section from physics constraints page These checks are discoverable via the Case Creator Guide instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix Fortran % accessor and AST artifacts in physics docs formatting Doxygen consumes % in %<word> even inside backtick code spans, causing tokens like bc_y%beg to render as bc_ybeg. Escape with \% to preserve the Fortran struct accessor in rendered output. Also clean up AST extraction artifacts: istr/jstr → i/j, remove (got varname) noise, and rewrite f-string value placeholders into readable prose. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix Doxygen % consumption with split <code> tag workaround Doxygen consumes %<word> as "suppress auto-link" even inside backtick and <code> spans, and \% leaves a visible backslash. Split Fortran % accessor tokens into adjacent <code> tags so % is never followed by a word character: <code>bc_y%</code><code>beg</code> renders as bc_y%beg. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Use CSS classes for seamless split <code> tags around Fortran % The previous split <code> approach preserved % but created a visible gap due to border/padding on each element. Add f90l/f90r CSS classes that strip internal borders and padding so adjacent code spans render as one seamless pill: <code class="f90l">bc_y%</code><code class="f90r">beg</code>. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Address review feedback: consolidate CMake commands, robustify generators - Consolidate case_constraints.md and physics_constraints.md into a single CMake custom command to avoid parallel build races - Fall back to sorted stage names instead of "all" for unknown stages - Append extra categories not in CATEGORY_ORDER instead of dropping them - Print error details for failing example validations in CI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Capture validation output once instead of re-running on failure Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix cli page ID in lint_docs to match actual @page cli-reference Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix 37 broken Fortran % accessors in docs and add lint check Doxygen silently consumes %<word> (even inside backtick code spans), so `bc_y%beg` renders as `bc_ybeg`. Fixed all 37 instances in hand-written docs to use %% escape. Added check_doxygen_percent() lint check to catch this in CI going forward. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Remove unnecessary __future__ imports, add _is_numeric guards, fix en dash - Remove `from __future__ import annotations` from all 4 toolchain files (Python 3.10+ is required) - Add `_is_numeric()` guards in physics checks to prevent TypeError when parameters are analytical string expressions - Fix Unicode en dash in Alpha-Rho title Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix additional review items: docs typos, _is_numeric, CI coverage - Fix missing %% in double-backtick code spans (patch_icpp(2)smoothen, patch_icpp(j)alpha, etc.) and stray backslashes in case.md - Add _is_numeric guard for num_fluids in check_eos_parameter_sanity - Include benchmark.py files in CI example validation - Extend Doxygen % lint to catch double-backtick spans too Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add _is_numeric guards for domain bounds in check_patch_within_domain Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix CI: quote Command forward ref for Python <3.14, revert benchmark.py validation The `from __future__ import annotations` removal broke pylint on Python 3.10-3.13 because `List[Command]` is a forward reference within the Command dataclass. Quoting it as `List["Command"]` fixes the issue. The scaling benchmark.py requires CLI arguments and cannot be validated as a standalone case file. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Refactor message deduplication to explicit loop in gen_physics_docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Wire constraint doc generation into ./mfc.sh generate Previously case_constraints.md and physics_constraints.md were only generated via CMake (docs/gen_constraints.sh), so the contributing.md instruction to run ./mfc.sh generate was wrong. Now ./mfc.sh generate produces all 7 auto-generated files, and --check mode validates them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add 4 staleness-prevention lint checks and complete PHYSICS_DOCS coverage New lint checks in lint_docs.py: - check_physics_docs_coverage: flags check methods missing PHYSICS_DOCS entries - check_identifier_refs: validates Python identifiers in contributing.md (PHYSICS_DOCS, CONSTRAINTS, DEPENDENCIES, REGISTRY) still exist in source - check_cli_refs: validates ./mfc.sh commands in running.md match CLI schema - Expanded DOCS list to cover all hand-written docs for file path validation Added PHYSICS_DOCS entries for 16 previously undocumented check methods and added 11 mechanical/structural methods to the skip set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * 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> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ef6998d commit b104aea

24 files changed

Lines changed: 1227 additions & 402 deletions

File tree

.github/workflows/lint-toolchain.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,21 @@ jobs:
4242

4343
- name: Validate example cases
4444
run: |
45-
./mfc.sh validate examples/1D_sodshocktube/case.py
46-
./mfc.sh validate examples/2D_shockbubble/case.py
45+
failed=0
46+
passed=0
47+
for case in examples/*/case.py; do
48+
[ -f "$case" ] || continue
49+
output=$(./mfc.sh validate "$case" 2>&1)
50+
if [ $? -eq 0 ]; then
51+
passed=$((passed + 1))
52+
else
53+
echo "FAIL: $case"
54+
echo "$output"
55+
failed=$((failed + 1))
56+
fi
57+
done
58+
echo ""
59+
echo "Results: $passed passed, $failed failed"
60+
if [ "$failed" -ne 0 ]; then
61+
exit 1
62+
fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ docs/*/result*
4444
docs/documentation/*-example.png
4545
docs/documentation/examples.md
4646
docs/documentation/case_constraints.md
47+
docs/documentation/physics_constraints.md
4748

4849
examples/*batch/*/
4950
examples/**/D/*

CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,16 +660,19 @@ if (MFC_DOCUMENTATION)
660660
VERBATIM
661661
)
662662

663-
# Generate case_constraints.md from case_validator.py and examples/
663+
# Generate case_constraints.md and physics_constraints.md together.
664+
# Both are produced by gen_constraints.sh, so a single command avoids races.
664665
add_custom_command(
665666
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/case_constraints.md"
667+
"${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/physics_constraints.md"
666668
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/gen_case_constraints_docs.py"
669+
"${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/gen_physics_docs.py"
667670
"${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/case_validator.py"
668671
"${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/params/definitions.py"
669672
"${examples_DOCs}"
670673
COMMAND "bash" "${CMAKE_CURRENT_SOURCE_DIR}/docs/gen_constraints.sh"
671674
"${CMAKE_CURRENT_SOURCE_DIR}"
672-
COMMENT "Generating case_constraints.md"
675+
COMMENT "Generating case_constraints.md and physics_constraints.md"
673676
VERBATIM
674677
)
675678

@@ -732,11 +735,13 @@ if (MFC_DOCUMENTATION)
732735

733736
set(opt_example_dependency "")
734737
set(opt_constraints_dependency "")
738+
set(opt_physics_dependency "")
735739
set(opt_cli_reference_dependency "")
736740
set(opt_parameters_dependency "")
737741
if (${target} STREQUAL documentation)
738742
set(opt_example_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/examples.md")
739743
set(opt_constraints_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/case_constraints.md")
744+
set(opt_physics_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/physics_constraints.md")
740745
set(opt_cli_reference_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/cli-reference.md")
741746
set(opt_parameters_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/parameters.md")
742747
endif()
@@ -749,6 +754,7 @@ if (MFC_DOCUMENTATION)
749754
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${target}-Doxyfile"
750755
"${opt_example_dependency}"
751756
"${opt_constraints_dependency}"
757+
"${opt_physics_dependency}"
752758
"${opt_cli_reference_dependency}"
753759
"${opt_parameters_dependency}"
754760
"${${target}_SRCs}" "${${target}_DOCs}"

docs/custom.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
* Overrides for doxygen-awesome theme
44
*/
55

6+
/* Seamless split <code> tags for Fortran % struct accessors.
7+
* Doxygen consumes %<word> even inside code spans, so we split around %
8+
* into adjacent <code> elements and remove internal borders/padding. */
9+
code.f90l {
10+
border-right: 0;
11+
border-top-right-radius: 0;
12+
border-bottom-right-radius: 0;
13+
padding-right: 0;
14+
}
15+
code.f90r {
16+
border-left: 0;
17+
border-top-left-radius: 0;
18+
border-bottom-left-radius: 0;
19+
padding-left: 0;
20+
}
21+
622
/* Fix inline code visibility in colored admonition blocks (warning, attention, important, note, etc.) */
723

824
/* Warning/Attention/Important blocks (red/pink background) */

docs/documentation/case.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ To run such a case, use the following format:
6565
For example, to run the `scaling` case in "weak-scaling" mode:
6666

6767
```shell
68-
./mfc.sh run examples/scaling/case.py -t pre_process -j 8 -- --scaling weak
68+
./mfc.sh run examples/scaling/benchmark.py -t pre_process -j 8 -- --scaling weak
6969
```
7070

7171
## Parameters
@@ -281,12 +281,12 @@ For instance, in a 2D simulation, when a cylindrical `patch(2)` is immersed in a
281281

282282
- `smoothen` activates smoothening of the boundary of the patch that alters the existing patch.
283283
When smoothening occurs, fluids of the two patches are mixed in the region of the boundary.
284-
For instance, in the aforementioned case of the cylindrical patch immersed in the rectangular patch, smoothening occurs when ``patch_icpp(2)smoothen = 'T'``.
284+
For instance, in the aforementioned case of the cylindrical patch immersed in the rectangular patch, smoothening occurs when ``patch_icpp(2)%%smoothen = 'T'``.
285285
`smooth_coeff` controls the thickness of the region of smoothening (sharpness of the mixture region).
286286
The default value of `smooth_coeff` is unity. The region of smoothening is thickened with decreasing the value.
287287
Optimal choice of the value of `smooth_coeff` is case-dependent and left to the user.
288288

289-
- `patch_icpp(j)alpha(i)`, `patch_icpp(j)alpha_rho(i)`, `patch_icpp(j)pres`, and `patch_icpp(j)vel(i)` define for $j$-th patch the void fraction of `fluid(i)`, partial density of `fluid(i)`, the pressure, and the velocity in the $i$-th coordinate direction.
289+
- `patch_icpp(j)%%alpha(i)`, `patch_icpp(j)%%alpha_rho(i)`, `patch_icpp(j)%%pres`, and `patch_icpp(j)%%vel(i)` define for $j$-th patch the void fraction of `fluid(i)`, partial density of `fluid(i)`, the pressure, and the velocity in the $i$-th coordinate direction.
290290
These physical parameters must be consistent with fluid material's parameters defined in the next subsection.
291291

292292
- `model_filepath` defines the root directory of the STL or OBJ model file.
@@ -297,7 +297,7 @@ These physical parameters must be consistent with fluid material's parameters de
297297

298298
#### Elliptic Smoothing
299299

300-
Initial conditions in which not all patches support the `patch_icpp(j)%smoothen` parameter can still be smoothed by applying iterations of the heat equation to the initial condition.
300+
Initial conditions in which not all patches support the `patch_icpp(j)%%smoothen` parameter can still be smoothed by applying iterations of the heat equation to the initial condition.
301301
This is enabled by adding `'elliptic_smoothing': "T",` and `'elliptic_smoothing_iters': N,` to the case dictionary, where `N` is the number of smoothing iterations to apply.
302302

303303
### 4. Immersed Boundary Patches {#sec-immersed-boundary-patches}
@@ -463,10 +463,10 @@ Boundary condition patches can be used with non-characteristic boundary conditio
463463
Their use is detailed in [Boundary Condition Patches](#boundary-condition-patches).
464464

465465
- `bc_[x,y,z]%%vb[1,2,3]` specifies the velocity in the (x,1), (y,2), (z,3) direction applied to `bc_[x,y,z]%%beg` when using `bc_[x,y,z]%%beg = -16`.
466-
Tangential velocities require viscosity, `weno_avg = T`, and `bc_[x,y,z]%%beg = -16` to work properly. Normal velocities require `bc_[x,y,z]%%end = -15` or `\bc_[x,y,z]%%end = -16` to work properly.
466+
Tangential velocities require viscosity, `weno_avg = T`, and `bc_[x,y,z]%%beg = -16` to work properly. Normal velocities require `bc_[x,y,z]%%end = -15` or `bc_[x,y,z]%%end = -16` to work properly.
467467

468468
- `bc_[x,y,z]%%ve[1,2,3]` specifies the velocity in the (x,1), (y,2), (z,3) direction applied to `bc_[x,y,z]%%beg` when using `bc_[x,y,z]%%end = -16`.
469-
Tangential velocities require viscosity, `weno_avg = T`, and `bc_[x,y,z]%%end = 16` to work properly. Normal velocities require `bc_[x,y,z]%%end = -15` or `\bc_[x,y,z]%%end = -16` to work properly.
469+
Tangential velocities require viscosity, `weno_avg = T`, and `bc_[x,y,z]%%end = 16` to work properly. Normal velocities require `bc_[x,y,z]%%end = -15` or `bc_[x,y,z]%%end = -16` to work properly.
470470

471471
- `model_eqns` specifies the choice of the multi-component model that is used to formulate the dynamics of the flow using integers from 1 through 3.
472472
`model_eqns = 1`, `2`, and `3` correspond to \f$\Gamma\f$-\f$\Pi_\infty\f$ model (\cite Johnsen08), 5-equation model (\cite Allaire02), and 6-equation model (\cite Saurel09), respectively.
@@ -531,7 +531,7 @@ If this option is false, velocity gradient is computed using finite difference s
531531
- `weno_avg` it activates the arithmetic average of the left and right, WENO-reconstructed, cell-boundary values.
532532
This option requires `weno_Re_flux` to be true because cell boundary values are only utilized when employing the scalar divergence method in the computation of velocity gradients.
533533

534-
- `surface_tension` activates surface tension when set to ``'T'``. Requires `sigma` to be set and `num_fluids`. The color function in each patch should be assigned such that `patch_icpp(i)%cf_val = 1` in patches where `patch_icpp(i)%alpha = 1 - eps` and `patch_icpp(i)%cf_val = 0` in patches where `patch_icpp(i)%alpha = eps`.
534+
- `surface_tension` activates surface tension when set to ``'T'``. Requires `sigma` to be set and `num_fluids`. The color function in each patch should be assigned such that `patch_icpp(i)%%cf_val = 1` in patches where `patch_icpp(i)%%alpha = 1 - eps` and `patch_icpp(i)%%cf_val = 0` in patches where `patch_icpp(i)%%alpha = eps`.
535535

536536
- `viscous` activates viscosity when set to ``'T'``. Requires `Re(1)` and `Re(2)` to be set.
537537

@@ -620,8 +620,8 @@ To restart the simulation from $k$-th time step, see @ref running "Restarting Ca
620620
| `num_probes` | Integer | Number of probes |
621621
| `probe(i)%[x,y,z]` | Real | Coordinates of probe $i$ |
622622
| `output_partial_domain` | Logical | Output part of the domain |
623-
| `[x,y,z]_output%beg` | Real | Beginning of the output domain in the [x,y,z]-direction |
624-
| `[x,y,z]_output%end` | Real | End of the output domain in the [x,y,z]-direction |
623+
| `[x,y,z]_output%%beg` | Real | Beginning of the output domain in the [x,y,z]-direction |
624+
| `[x,y,z]_output%%end` | Real | End of the output domain in the [x,y,z]-direction |
625625
| `lag_txt_wrt` | Logical | Write Lagrangian bubble data to `.dat` files |
626626
| `lag_header` | Logical | Write header to Lagrangian bubble `.dat` files |
627627
| `lag_db_wrt` | Logical | Write Lagrangian bubble data to silo/hdf5 database files |
@@ -667,7 +667,7 @@ If `file_per_process` is true, then pre_process, simulation, and post_process mu
667667

668668
- `probe_wrt` activates the output of state variables at coordinates specified by `probe(i)%[x;y,z]`.
669669

670-
- `output_partial_domain` activates the output of part of the domain specified by `[x,y,z]_output%beg` and `[x,y,z]_output%end`.
670+
- `output_partial_domain` activates the output of part of the domain specified by `[x,y,z]_output%%beg` and `[x,y,z]_output%%end`.
671671
This is useful for large domains where only a portion of the domain is of interest.
672672
It is not supported when `precision = 1` and `format = 1`.
673673
It also cannot be enabled with `flux_wrt`, `heat_ratio_wrt`, `pres_inf_wrt`, `c_wrt`, `omega_wrt`, `ib`, `schlieren_wrt`, `qm_wrt`, or 'liutex_wrt'.
@@ -991,30 +991,30 @@ Note: For relativistic flow, the conservative and primitive densities are differ
991991

992992
When ``cyl_coord = 'T'`` is set in 3D the following constraints must be met:
993993

994-
- `bc_y%beg = -14` enables the axis boundary condition
994+
- `bc_y%%beg = -14` enables the axis boundary condition
995995

996-
- `bc_z%beg = bc_z%end = -1` enables periodic boundary conditions in the azimuthal direction
996+
- `bc_z%%beg = bc_z%%end = -1` enables periodic boundary conditions in the azimuthal direction
997997

998-
- `z_domain%beg = 0` sets the azimuthal starting point to 0
998+
- `z_domain%%beg = 0` sets the azimuthal starting point to 0
999999

1000-
- `z_domain%end = 2*math.pi` to set the azimuthal ending point to \f$2\pi\f$ (note, requires `import math` in the case file)
1000+
- `z_domain%%end = 2*math.pi` to set the azimuthal ending point to \f$2\pi\f$ (note, requires `import math` in the case file)
10011001

10021002
When ``cyl_coord = 'T'`` is set in 2D the following constraints must be met:
10031003

1004-
- `bc_y%beg = -2` to enable reflective boundary conditions
1004+
- `bc_y%%beg = -2` to enable reflective boundary conditions
10051005

10061006
### 17. Chemistry
10071007

10081008
| Parameter | Type | Description |
10091009
| ---: | :---: | :--- |
10101010
| `chemistry` | Logical | Enable chemistry simulation |
1011-
| `chem_params%diffusion` | Logical | Enable multispecies diffusion |
1012-
| `chem_params%reactions` | Logical | Enable chemical reactions |
1013-
| `chem_params%gamma_method` | Integer | Methodology for calculating the heat capacity ratio |
1014-
| `chem_params%transport_model` | Integer | Methodology for calculating the diffusion coefficients |
1011+
| `chem_params%%diffusion` | Logical | Enable multispecies diffusion |
1012+
| `chem_params%%reactions` | Logical | Enable chemical reactions |
1013+
| `chem_params%%gamma_method` | Integer | Methodology for calculating the heat capacity ratio |
1014+
| `chem_params%%transport_model` | Integer | Methodology for calculating the diffusion coefficients |
10151015
| `cantera_file` | String | Cantera-format mechanism file (e.g., .yaml) |
10161016

1017-
- `chem_params%transport_model` specifies the methodology for calculating diffusion coefficients and other transport properties, `1` for mixture-average, `2` for Unity-Lewis
1017+
- `chem_params%%transport_model` specifies the methodology for calculating diffusion coefficients and other transport properties, `1` for mixture-average, `2` for Unity-Lewis
10181018

10191019
- `cantera_file` specifies the chemical mechanism file. If the file is part of the standard Cantera library, only the filename is required. Otherwise, the file must be located in the same directory as your `case.py` file
10201020

@@ -1051,15 +1051,15 @@ The entries labeled "Characteristic." are characteristic boundary conditions bas
10511051

10521052
| Parameter | Type | Description |
10531053
| ---: | :----: | :--- |
1054-
| `bc_[x,y,z]%grcbc_in` | Logical | Enable grcbc for subsonic inflow |
1055-
| `bc_[x,y,z]%grcbc_out` | Logical | Enable grcbc for subsonic outflow (pressure)|
1056-
| `bc_[x,y,z]%grcbc_vel_out` | Logical | Enable grcbc for subsonic outflow (pressure + normal velocity) |
1057-
| `bc_[x,y,z]%vel_in` | Real Array | Inflow velocities in x, y and z directions |
1058-
| `bc_[x,y,z]%vel_out` | Real Array | Outflow velocities in x, y and z directions |
1059-
| `bc_[x,y,z]%pres_in` | Real | Inflow pressure |
1060-
| `bc_[x,y,z]%pres_out` | Real | Outflow pressure |
1061-
| `bc_[x,y,z]%alpha_rho_in` | Real Array | Inflow density |
1062-
| `bc_[x,y,z]%alpha_in` | Real Array | Inflow void fraction |
1054+
| `bc_[x,y,z]%%grcbc_in` | Logical | Enable grcbc for subsonic inflow |
1055+
| `bc_[x,y,z]%%grcbc_out` | Logical | Enable grcbc for subsonic outflow (pressure)|
1056+
| `bc_[x,y,z]%%grcbc_vel_out` | Logical | Enable grcbc for subsonic outflow (pressure + normal velocity) |
1057+
| `bc_[x,y,z]%%vel_in` | Real Array | Inflow velocities in x, y and z directions |
1058+
| `bc_[x,y,z]%%vel_out` | Real Array | Outflow velocities in x, y and z directions |
1059+
| `bc_[x,y,z]%%pres_in` | Real | Inflow pressure |
1060+
| `bc_[x,y,z]%%pres_out` | Real | Outflow pressure |
1061+
| `bc_[x,y,z]%%alpha_rho_in` | Real Array | Inflow density |
1062+
| `bc_[x,y,z]%%alpha_in` | Real Array | Inflow void fraction |
10631063

10641064
This boundary condition can be used for subsonic inflow (`bc_[x,y,z]%[beg,end]` = -7) and subsonic outflow (`bc_[x,y,z]%[beg,end]` = -8) characteristic boundary conditions. These are based on \cite Pirozzoli13. This enables to provide inflow and outflow conditions outside the computational domain.
10651065

0 commit comments

Comments
 (0)