You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surface dimensional handling docs and reorganize Section 1b
Reorganize equations.md Section 1b into three logical groups:
- General Users (dimensions in = dimensions out, stored forms, materials)
- Bubble Users (non-dimensional framework, reference scales, parameters)
- Worked Examples
Add stored-form parameter callout to case.md Section 5 (Fluid Materials)
so users see the gamma/pi_inf/Re transforms at point of use.
Add "Units and Dimensions" section to getting-started.md for new users.
Update doc linter to collect {#id} anchors for cross-file @ref validation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/documentation/case.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -387,6 +387,14 @@ Details of implementation of viscosity in MFC can be found in \cite Coralic15.
387
387
388
388
-`fluid_pp(i)%%G` is required for `hypoelasticity`.
389
389
390
+
> **Stored-form parameters:** The values `gamma`, `pi_inf`, and `Re(1)`/`Re(2)` are **not** the raw physical quantities. MFC expects transformed stored forms:
391
+
> -`gamma` = \f$1/(\gamma-1)\f$, not \f$\gamma\f$ itself
Copy file name to clipboardExpand all lines: docs/documentation/equations.md
+17-11Lines changed: 17 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,15 +29,17 @@ The parameter `model_eqns` (1, 2, 3, or 4) selects the governing equation set.
29
29
30
30
---
31
31
32
-
## 1b. Units, Dimensions, and Non-Dimensionalization
32
+
## 1b. Units, Dimensions, and Non-Dimensionalization {#sec-units-dimensions}
33
33
34
-
### Dimensional Handling in the Flow Solver
34
+
### General Users: Dimensional Handling {#sec-dimensional-handling}
35
+
36
+
#### Dimensions In = Dimensions Out {#sec-dimensions-in-out}
35
37
36
38
The main flow solver (Navier-Stokes equations, Riemann solvers, viscous stress, body forces, surface tension, etc.) is **unit-agnostic**: whatever units the user provides for the initial and boundary conditions, the solver preserves them throughout the computation. If the user inputs SI units, the outputs are in SI units. If the user inputs CGS, the outputs are in CGS. No internal non-dimensionalization is performed by the flow solver.
37
39
38
40
This means that for simulations **without** sub-grid bubble models, the user can work in any consistent unit system without additional effort.
Several EOS and transport parameters use **transformed stored forms** that differ from the standard physical values. This is the most common source of input errors:
43
45
@@ -52,7 +54,7 @@ These transformations arise because MFC internally solves the energy equation us
52
54
53
55
**Common mistake:** setting `fluid_pp(1)%%gamma = 1.4` for air. The correct value is `1.0 / (1.4 - 1.0) = 2.5`. Setting `gamma = 1.4` corresponds to a physical \f$\gamma \approx 1.71\f$, which is not a standard gas.
54
56
55
-
### Common Material Values
57
+
####Common Material Values {#sec-material-values}
56
58
57
59
Pre-computed stored-form values for common fluids (SI units):
58
60
@@ -85,11 +87,13 @@ mu = 1.002e-3 # water viscosity [Pa·s]
85
87
"fluid_pp(1)%Re(1)": 1.0/ mu, # ≈ 998
86
88
```
87
89
88
-
### Unit Consistency
90
+
####Unit Consistency {#sec-unit-consistency}
89
91
90
92
The solver does not check or convert units. All inputs must use the **same consistent unit system** (e.g., all SI or all CGS). Mixing units — for example, pressures in atmospheres with densities in kg/m³ — will produce silently incorrect results.
The sub-grid bubble models (`bubbles_euler = .true.` or `bubbles_lagrange = .true.`) solve the bubble wall dynamics in **non-dimensional form**. The bubble wall pressure equation as implemented is:
95
99
@@ -108,7 +112,7 @@ The dimensionless groups are:
108
112
109
113
Because the bubble equations use these dimensionless numbers directly, all `bub_pp%%` inputs are interpreted by the code as **already non-dimensional**. The code does **not** non-dimensionalize bubble quantities internally. Therefore, when bubbles are enabled, the simulation must be run in a **fully non-dimensional** form: **all** inputs — flow ICs/BCs, EOS parameters, domain lengths, `dt`, and `bub_pp%%` values — must be scaled with the same \f$(x_0, p_0, \rho_0, u_0, t_0, T_0)\f$ reference quantities, or the coupled solution will be physically incorrect.
110
114
111
-
### Reference Scales
115
+
####Reference Scales {#sec-reference-scales}
112
116
113
117
When using bubble models, the user must choose reference scales and non-dimensionalize **all** inputs (flow and bubble) consistently. The standard convention used in the MFC examples is:
114
118
@@ -121,7 +125,7 @@ When using bubble models, the user must choose reference scales and non-dimensio
121
125
| Time | \f$t_0\f$ | \f$x_0 / u_0\f$ (derived) |
122
126
| Temperature | \f$T_0\f$ | \f$T_{0,\text{ref}}\f$ (reference temperature) |
123
127
124
-
### Non-Dimensionalization of Input Parameters
128
+
####Non-Dimensionalization of Input Parameters {#sec-nondim-inputs}
125
129
126
130
The following table lists every `bub_pp%%` parameter and its required non-dimensionalization:
127
131
@@ -150,7 +154,7 @@ The following table lists every `bub_pp%%` parameter and its required non-dimens
150
154
151
155
When the reference scales match the bubble reference values (e.g., \f$x_0 = R_{0,\text{ref}}\f$, \f$p_0 = p_{0,\text{ref}}\f$, \f$\rho_0 = \rho_{0,\text{ref}}\f$), the reference parameters simplify to unity: `bub_pp%%R0ref = 1`, `bub_pp%%p0ref = 1`, `bub_pp%%rho0ref = 1`.
152
156
153
-
### Flow Parameters with Bubbles
157
+
####Flow Parameters with Bubbles {#sec-flow-params-bubbles}
154
158
155
159
When bubbles are enabled, the flow-level parameters must also be non-dimensionalized with the same reference scales:
156
160
@@ -165,7 +169,7 @@ When bubbles are enabled, the flow-level parameters must also be non-dimensional
####Two Different Viscosity Parameters {#sec-two-viscosities}
169
173
170
174
MFC has two conceptually distinct viscosity-related parameters that serve different physical roles:
171
175
@@ -179,7 +183,9 @@ MFC has two conceptually distinct viscosity-related parameters that serve differ
179
183
180
184
These two parameters represent viscous effects at fundamentally different scales — bulk flow dissipation vs. single-bubble-wall damping — and are stored in separate derived types with separate code paths. They are **not** interchangeable: `fluid_pp%%Re(1)` is an inverse viscosity while `bub_pp%%mu_l` is a viscosity (non-dimensionalized).
181
185
182
-
### Example: Non-Dimensionalizing a Bubble Case
186
+
### Worked Examples {#sec-nondim-example}
187
+
188
+
#### Example: Non-Dimensionalizing a Bubble Case {#sec-bubble-example}
183
189
184
190
A typical bubble case setup in `case.py` follows this pattern:
Copy file name to clipboardExpand all lines: docs/documentation/getting-started.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -198,6 +198,12 @@ MFC has example cases in the `examples` folder. You can run such a case interact
198
198
199
199
Please refer to the @ref running "Running" document for more information on `case.py` files and how to run them.
200
200
201
+
## Units and Dimensions
202
+
203
+
MFC is **unit-agnostic**: the solver performs no internal unit conversions. Whatever units you provide for initial conditions, boundary conditions, and material properties, the same units appear in the output.
204
+
205
+
The only requirement is **consistency** — all inputs must use the same unit system. Note that some parameters use **transformed stored forms** rather than standard physical values (e.g., `gamma` expects \f$1/(\gamma-1)\f$, not \f$\gamma\f$ itself). See @ref sec-stored-forms for details.
0 commit comments