Skip to content

Commit 4d042f5

Browse files
sbryngelsonclaude
andcommitted
Add non-Newtonian viscosity documentation
Add Herschel-Bulkley parameter descriptions to descriptions.py. Add fluid materials table entries and detailed section in case.md with model equation, parameter table, and special cases. Improve PHYSICS_DOCS entry with fuller explanation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ab1a4c8 commit 4d042f5

3 files changed

Lines changed: 62 additions & 4 deletions

File tree

docs/documentation/case.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,14 @@ Additional details on this specification can be found in [The Naca Airfoil Serie
366366
| `qvp` ** | Real | Stiffened-gas parameter $q'$ of fluid. |
367367
| `sigma` | Real | Surface tension coefficient |
368368
| `G` | Real | Shear modulus of solid. |
369+
| `non_newtonian` | Logical | Enable non-Newtonian (Herschel-Bulkley) viscosity. See @ref sec-non-newtonian. |
370+
| `tau0` | Real | Yield stress \f$\tau_0\f$ (Herschel-Bulkley). |
371+
| `K` | Real | Consistency index \f$K\f$ (Herschel-Bulkley). |
372+
| `nn` | Real | Flow behavior index \f$n\f$ (Herschel-Bulkley).|
373+
| `hb_m` | Real | Papanastasiou regularization parameter \f$m\f$. |
374+
| `mu_min` | Real | Minimum viscosity clamp. |
375+
| `mu_max` | Real | Maximum viscosity clamp. |
376+
| `mu_bulk` | Real | Bulk viscosity (non-Newtonian). |
369377

370378
Fluid material's parameters. All parameters except for sigma should be prepended with `fluid_pp(i)` where $i$ is the fluid index.
371379

@@ -383,6 +391,38 @@ The parameters define material's property of compressible fluids that are used i
383391
When these parameters are undefined, fluids are treated as inviscid.
384392
Details of implementation of viscosity in MFC can be found in \cite Coralic15.
385393

394+
#### Non-Newtonian Viscosity (Herschel-Bulkley) {#sec-non-newtonian}
395+
396+
MFC supports non-Newtonian viscosity via the Herschel-Bulkley model with Papanastasiou regularization.
397+
Enable it per-fluid by setting ``fluid_pp(i)%%non_newtonian = 'T'`` (requires ``viscous = 'T'``).
398+
399+
The effective viscosity is:
400+
401+
\f[ \mu(\dot\gamma) = \frac{\tau_0}{\dot\gamma}\bigl(1 - e^{-m\,\dot\gamma}\bigr) + K\,\dot\gamma^{\,n-1} \f]
402+
403+
where \f$\dot\gamma = \sqrt{2\,D_{ij}\,D_{ij}}\f$ is the shear rate computed from the strain-rate tensor.
404+
405+
| Parameter | Type | Description |
406+
| ---: | :---: | :--- |
407+
| ``non_newtonian`` | Logical | Enable non-Newtonian viscosity for this fluid |
408+
| ``tau0`` | Real | Yield stress \f$\tau_0\f$. Set to 0 for a power-law fluid |
409+
| ``K`` | Real | Consistency index \f$K\f$ (must be > 0) |
410+
| ``nn`` | Real | Flow behavior index \f$n\f$: shear-thinning (\f$n<1\f$), Newtonian (\f$n=1\f$), shear-thickening (\f$n>1\f$) |
411+
| ``hb_m`` | Real | Papanastasiou regularization parameter \f$m\f$. Higher values approximate the true yield stress more closely (typical: 1000--10000) |
412+
| ``mu_min`` | Real | Minimum viscosity clamp (must be >= 0) |
413+
| ``mu_max`` | Real | Maximum viscosity clamp (must be > ``mu_min``) |
414+
| ``mu_bulk``| Real | Bulk viscosity for non-Newtonian fluids (optional, default 0 = inviscid bulk) |
415+
416+
All parameters are prepended with ``fluid_pp(i)%%``.
417+
418+
**Special cases:**
419+
- \f$\tau_0 = 0\f$: reduces to power-law model \f$\mu = K\,\dot\gamma^{\,n-1}\f$.
420+
- \f$n = 1,\, \tau_0 = 0\f$: reduces to Newtonian with \f$\mu = K\f$.
421+
- \f$n = 1,\, \tau_0 > 0\f$: reduces to Bingham plastic.
422+
423+
> **Note:** When ``non_newtonian = 'T'``, the ``Re(1)``/``Re(2)`` parameters are ignored for that fluid.
424+
> The viscosity is computed from the Herschel-Bulkley model instead.
425+
386426
- `fluid_pp(i)%%cv`, `fluid_pp(i)%%qv`, and `fluid_pp(i)%%qvp` define $c_v$, $q$, and $q'$ as parameters of $i$-th fluid that are used in stiffened gas equation of state.
387427

388428
- `fluid_pp(i)%%G` is required for `hypoelasticity`.

toolchain/mfc/case_validator.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,19 @@
146146
"explanation": "Reynolds numbers must be positive. Not supported with model_eqns = 1.",
147147
},
148148
"check_non_newtonian": {
149-
"title": "Non-Newtonian Viscosity",
150-
"category": "Numerical Schemes",
151-
"math": r"\mu = \frac{\tau_0}{\dot\gamma}(1 - e^{-m\dot\gamma}) + K\dot\gamma^{n-1}",
152-
"explanation": ("Herschel-Bulkley non-Newtonian viscosity model. Requires viscous=T, K > 0, nn > 0, tau0 >= 0, mu_min >= 0, mu_max > mu_min, hb_m > 0."),
149+
"title": "Non-Newtonian Viscosity (Herschel-Bulkley)",
150+
"category": "Physics Models",
151+
"math": r"\mu(\dot\gamma) = \frac{\tau_0}{\dot\gamma}(1 - e^{-m\dot\gamma}) + K\dot\gamma^{n-1}",
152+
"explanation": (
153+
"Herschel-Bulkley model with Papanastasiou regularization for "
154+
"non-Newtonian viscosity. The yield stress tau0 introduces a "
155+
"threshold below which the fluid resists deformation; the "
156+
"Papanastasiou parameter m smooths the transition (higher m = "
157+
"sharper yield). K is the consistency index, nn the flow behavior "
158+
"index (nn < 1: shear-thinning, nn = 1: Bingham, nn > 1: "
159+
"shear-thickening). Viscosity is clamped to [mu_min, mu_max] for "
160+
"numerical stability. Requires viscous = T."
161+
),
153162
},
154163
# --- Feature Compatibility ---
155164
"check_mhd": {

toolchain/mfc/params/descriptions.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,15 @@
296296
(r"fluid_pp\((\d+)\)%k_v", "Thermal conductivity of vapor phase for fluid {0}"),
297297
(r"fluid_pp\((\d+)\)%cp_v", "Specific heat capacity (const. pressure) of vapor for fluid {0}"),
298298
(r"fluid_pp\((\d+)\)%D_v", "Vapor mass diffusivity for fluid {0}"),
299+
# Non-Newtonian viscosity (Herschel-Bulkley model)
300+
(r"fluid_pp\((\d+)\)%non_newtonian", "Enable non-Newtonian viscosity for fluid {0}"),
301+
(r"fluid_pp\((\d+)\)%tau0", "Yield stress for fluid {0} (Herschel-Bulkley)"),
302+
(r"fluid_pp\((\d+)\)%K", "Consistency index for fluid {0} (Herschel-Bulkley)"),
303+
(r"fluid_pp\((\d+)\)%nn", "Flow behavior index for fluid {0} (Herschel-Bulkley)"),
304+
(r"fluid_pp\((\d+)\)%mu_min", "Minimum viscosity limit for fluid {0}"),
305+
(r"fluid_pp\((\d+)\)%mu_max", "Maximum viscosity limit for fluid {0}"),
306+
(r"fluid_pp\((\d+)\)%mu_bulk", "Bulk viscosity for non-Newtonian fluid {0}"),
307+
(r"fluid_pp\((\d+)\)%hb_m", "Papanastasiou regularization parameter for fluid {0}"),
299308
# patch_ib patterns
300309
(r"patch_ib\((\d+)\)%geometry", "Geometry type for immersed boundary {0}"),
301310
(r"patch_ib\((\d+)\)%x_centroid", "X-coordinate of centroid for IB patch {0}"),

0 commit comments

Comments
 (0)