Skip to content

Commit 019bbbb

Browse files
committed
Merge remote-tracking branch 'upstream/master' into examples
2 parents b6463cc + bdf3709 commit 019bbbb

File tree

265 files changed

+7578
-19983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+7578
-19983
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ examples/*/workloads/
5656
examples/*/run-*/
5757
examples/*/logs/
5858
examples/**/*.f90
59+
!examples/3D_lag_bubbles_shbubcollapse/input/lag_bubbles.dat
60+
!examples/3D_lag_bubbles_bubblescreen/input/lag_bubbles.dat
5961
workloads/
6062

6163
benchmarks/*batch/*/

README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ The weak scaling of MFC on this machine shows near-ideal utilization.
109109
MFC has many features.
110110
They are organized below. Just click the drop-downs!
111111

112-
<details>
113-
<summary>Physics</summary>
112+
### Physics
114113

115114
* 1-3D
116115
* Compressible
@@ -126,15 +125,16 @@ They are organized below. Just click the drop-downs!
126125
* Complex/arbitrary geometries via immersed boundary method
127126
* STL geometry files supported
128127
* Surface tension for multiphase cases
129-
* Sub-grid Euler-Euler multiphase models for bubble dynamics and similar
128+
* Sub-grid dynamics
129+
* Euler-Euler particle models for bubble dynamics and similar
130+
* Euler-Lagrange bubble dynamics
130131
* Viscous effects (high-order accurate representations)
131132
* Ideal and stiffened gas equations of state
132133
* Body forces
133134
* Acoustic wave generation (one- and two-way sound sources)
134135
</details>
135136

136-
<details>
137-
<summary>Numerics</summary>
137+
### Numerics
138138

139139
* Shock and interface capturing schemes
140140
* First-order upwinding
@@ -148,12 +148,12 @@ They are organized below. Just click the drop-downs!
148148
* Slip and no-slip
149149
* Thompson-based characteristic BCs: non-reflecting sub/supersonic buffers, inflows, outflows
150150
* Generalized characteristic relaxation boundary conditions
151-
* Runge-Kutta orders 1-3 (SSP TVD)
151+
* Runge-Kutta orders 1-3 (SSP TVD), adaptive time stepping
152+
* RK4-5 operator splitting for Euler-Lagrange modeling
152153
* Interface sharpening (THINC-like)
153-
</details>
154154

155-
<details>
156-
<summary>Large-scale and accelerated simulation</summary>
155+
156+
### Large-scale and accelerated simulation
157157

158158
* GPU compatible on NVIDIA (P/V/A/H100, GH200, etc.) and AMD (MI200+) hardware
159159
* Ideal weak scaling to 100% of the largest GPU supercomputers
@@ -162,10 +162,8 @@ They are organized below. Just click the drop-downs!
162162
* Near compute roofline behavior
163163
* RDMA (remote data memory access; GPU-GPU direct communication) via GPU-aware MPI on NVIDIA (CUDA-aware MPI) and AMD GPU systems
164164
* Optional single-precision computation and storage
165-
</details>
166165

167-
<details>
168-
<summary>Software robustness and other features</summary>
166+
### Software robustness and other features
169167

170168
* [Fypp](https://fypp.readthedocs.io/en/stable/fypp.html) metaprogramming for code readability, performance, and portability
171169
* Continuous Integration (CI)
@@ -174,8 +172,6 @@ They are organized below. Just click the drop-downs!
174172
* Line-level test coverage reports via [Codecov](https://app.codecov.io/gh/MFlowCode/MFC) and `gcov`
175173
* Benchmarking to avoid performance regressions and identify speed-ups
176174
* Continuous Deployment (CD) of [website](https://mflowcode.github.io) and [API documentation](https://mflowcode.github.io/documentation/index.html)
177-
</details>
178-
179175

180176
## Citation
181177

benchmarks/viscous_weno5_sgb_acoustic/case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# - viscosity enabled
66
# - weno_Re_flux : T
77
# - weno_order : 5
8-
# - bubbles : T
8+
# - bubbles_euler : T
99
# - bubble_model : 3
1010
# - acoustic_source : T
1111

@@ -216,7 +216,7 @@
216216
# ==========================================================
217217

218218
# Bubbles ==================================================
219-
'bubbles' : 'T',
219+
'bubbles_euler' : 'T',
220220
'bubble_model' : 3,
221221
'polytropic' : 'T',
222222
'polydisperse' : 'F',

docs/documentation/case.md

Lines changed: 95 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,9 @@ To restart the simulation from $k$-th time step, see [Restarting Cases](running.
522522
| `probe_wrt` | Logical | Write the flow chosen probes data files for each time step |
523523
| `num_probes` | Integer | Number of probes |
524524
| `probe(i)%[x,y,z]` | Real | Coordinates of probe $i$ |
525+
| `output_partial_domain` | Logical | Output part of the domain |
526+
| `[x,y,z]_output%beg` | Real | Beginning of the output domain in the [x,y,z]-direction |
527+
| `[x,y,z]_output%end` | Real | End of the output domain in the [x,y,z]-direction |
525528

526529
The table lists formatted database output parameters. The parameters define variables that are outputted from simulation and file types and formats of data as well as options for post-processing.
527530

@@ -549,6 +552,11 @@ If `file_per_process` is true, then pre_process, simulation, and post_process mu
549552

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

555+
- `output_partial_domain` activates the output of part of the domain specified by `[x,y,z]_output%beg` and `[x,y,z]_output%end`.
556+
This is useful for large domains where only a portion of the domain is of interest.
557+
It is not supported when `precision = 1` and `format = 1`.
558+
It also cannot be enabled with `flux_wrt`, `heat_ratio_wrt`, `pres_inf_wrt`, `c_wrt`, `omega_wrt`, `ib`, `schlieren_wrt`, or `qm_wrt`.
559+
552560
### 8. Acoustic Source {#acoustic-source}
553561

554562
| Parameter | Type | Description |
@@ -630,56 +638,73 @@ Details of the transducer acoustic source model can be found in [Maeda and Colon
630638

631639
- `%%bb_lowest_freq` specifies the lower frequency bound of the broadband acoustic wave. The upper frequency bound will be calculated as `%%bb_lowest_freq + %%bb_num_freq * %%bb_bandwidth`. The wave is no longer broadband below the lower bound and above the upper bound.
632640

633-
### 9. Ensemble-Averaged Bubble Model
641+
### 9. Sub-grid Bubble Models
642+
643+
| Parameter | Type | Description |
644+
| ---: | :----: | :--- |
645+
| `bubbles_euler` | Logical | Ensemble-averaged bubble modeling |
646+
| `bubbles_lagrange`| Logical | Volume-averaged bubble modeling |
647+
| `bubble_model` | Integer | [1] Gilmore; [2] Keller--Miksis |
648+
| `mu_l0` * | Real | Liquid viscosity (only specify in liquid phase) |
649+
| `ss` * | Real | Surface tension (only specify in liquid phase) |
650+
| `pv` * | Real | Vapor pressure (only specify in liquid phase) |
651+
| `gamma_v`| Real | Specific heat ratio |
652+
| `M_v`| Real | Molecular weight |
653+
| `mu_v`| Real | Viscosity |
654+
| `k_v`| Real | Thermal conductivity |
655+
| `cp_v`| Real | Specific heat capacity |
656+
657+
These options work only for gas-liquid two-component flows.
658+
Component indexes are required to be 1 for liquid and 2 for gas.
659+
660+
- \* These parameters should be prepended with patch index $1$ that is filled with liquid: `fluid_pp(1)%`.
661+
- † These parameters should be prepended with patch indexes filled with liquid and gas: `fluid_pp(1)%` and `fluid_pp(2)%`.
662+
663+
This table lists the sub-grid bubble model parameters, which can be utilized in both the ensemble-averaged and volume-averaged bubble models.
664+
665+
- `bubbles_euler` activates the ensemble-averaged bubble model.
666+
667+
- `bubbles_lagrange` activates the volume-averaged bubble model.
668+
669+
- `bubble_model` specified a model for spherical bubble dynamics by an integer of 1 and 2.
670+
`bubble_model = 1`, `2`, and `3` correspond to the Gilmore, Keller-Miksis, and Rayleigh-Plesset models.
671+
672+
- `mu_l0`, `ss`, and `pv`, `gamma_v`, `M_v`, `mu_v`, `k_v`, and `cp_v` specify simulation parameters for the non-polytropic gas compression model.
673+
`mu_l0`, `ss`, and `pv` correspond to the liquid viscosity, surface tension, and vapor pressure, respectively.
674+
`gamma_v`, `M_v`, `mu_v`, `k_v`, and `cp_v` specify the specific heat ratio, molecular weight, viscosity, thermal conductivity and specific heat capacity of a chosen component (`cp_v` only for ``bubbles_lagrange = 'T'``).
675+
Implementation of the parameters into the model follow [Ando (2010)](references.md#Ando10).
676+
677+
#### 9.1 Ensemble-Averaged Bubble Model
634678

635679
| Parameter | Type | Description |
636680
| ---: | :----: | :--- |
637-
| `bubbles` | Logical | Ensemble-averaged bubble modeling |
638-
| `bubble_model` | Integer | [1] Gilmore; [2] Keller--Miksis |
639-
| `polytropic` | Logical | Polytropic gas compression |
640-
| `thermal` | Integer | Thermal model: [1] Adiabatic; [2] Isothermal; [3] Transfer |
681+
| `bubbles_euler`| Logical | Ensemble-averaged bubble modeling |
682+
| `polytropic` | Logical | Polytropic gas compression |
683+
| `thermal` | Integer | Thermal model: [1] Adiabatic; [2] Isothermal; [3] Transfer |
641684
| `R0ref` | Real | Reference bubble radius |
642-
| `polydisperse` | Logical | Polydispersity in equilibrium bubble radius R0|
685+
| `polydisperse` | Logical | Polydispersity in equilibrium bubble radius R0 |
643686
| `nb` | Integer | Number of bins: [1] Monodisperse; [$>1$] Polydisperse |
644687
| `poly_sigma` | Real | Standard deviation for probability density function of polydisperse bubble populations |
645688
| `R0_type` | Integer | Quadrature rule for probability density function of polydisperse bubble populations |
646689
| `Ca` | Real | Cavitation number |
647690
| `Web` | Real | Weber number |
648691
| `Re_inv` | Real | Inverse Reynolds number |
649-
| `mu_l0` * | Real | Liquid viscosity (only specify in liquid phase) |
650-
| `ss` * | Real | Surface tension (only specify in liquid phase) |
651-
| `pv` * | Real | Vapor pressure (only specify in liquid phase) |
652-
| `gamma_v`| Real | Specific heat ratio |
653-
| `M_v`| Real | Molecular weight |
654-
| `mu_v`| Real | Viscosity |
655-
| `k_v`| Real | Thermal conductivity |
656-
| `qbmm` | Logical | Quadrature by method of moments|
657-
| `dist_type` | Integer | Joint probability density function for bubble radius and velocity (only for ``qbmm = 'T'``)|
658-
| `sigR` | Real | Standard deviation for the probability density function of bubble radius (only for ``qbmm = 'T'``) |
659-
| `sigV` | Real | Standard deviation for the probability density function of bubble velocity (only for ``qbmm = 'T'``) |
692+
| `qbmm` | Logical | Quadrature by method of moments |
693+
| `dist_type` | Integer | Joint probability density function for bubble radius and velocity (only for ``qbmm = 'T'``) |
694+
| `sigR` | Real | Standard deviation for the probability density function of bubble radius (only for ``qbmm = 'T'``) (EE)|
695+
| `sigV` | Real | Standard deviation for the probability density function of bubble velocity (only for ``qbmm = 'T'``) (EE)|
660696
| `rhoRV` | Real | Correlation coefficient for the joint probability density function of bubble radius and velocity (only for ``qbmm = 'T'``) |
661697

662-
These options work only for gas-liquid two-component flows.
663-
Component indexes are required to be 1 for liquid and 2 for gas.
664-
665-
- \* These parameters should be prepended with patch index $1$ that is filled with liquid: `fluid_pp(1)%`.
666-
- † These parameters should be prepended with patch indexes filled with liquid and gas: `fluid_pp(1)%` and `fluid_pp(2)%`.
667-
668698
This table lists the ensemble-averaged bubble model parameters.
669699

670-
- `bubbles` activates the ensemble-averaged bubble model.
671-
672-
- `bubble_model` specified a model for spherical bubble dynamics by an integer of 1 and 2.
673-
`bubble_model = 1`, `2`, and `3` correspond to the Gilmore, Keller-Miksis, and Rayleigh-Plesset models.
674-
675700
- `polytropic` activates polytropic gas compression in the bubble.
676701
When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due to heat and mass transfer across the bubble wall with constant heat and mass transfer coefficients based on ([Preston et al., 2007](references.md#Preston07)).
677702

678-
- `polydisperse` activates polydispersity in the bubble model through a probability density function (PDF) of the equilibrium bubble radius.
679-
680703
- `thermal` specifies a model for heat transfer across the bubble interface by an integer from 1 through 3.
681704
`thermal = 1`, `2`, and `3` correspond to no heat transfer (adiabatic gas compression), isothermal heat transfer, and heat transfer with a constant heat transfer coefficient based on [Preston et al., 2007](references.md#Preston07), respectively.
682705

706+
- `polydisperse` activates polydispersity in the bubble model through a probability density function (PDF) of the equilibrium bubble radius.
707+
683708
- `R0ref` specifies the reference bubble radius.
684709

685710
- `nb` specifies the number of discrete bins that define the probability density function (PDF) of the equilibrium bubble radius.
@@ -691,11 +716,6 @@ When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due
691716

692717
- `Ca`, `Web`, and `Re_inv` respectively specify the Cavitation number, Weber number, and the inverse Reynolds number that characterize the offset of the gas pressure from the vapor pressure, surface tension, and liquid viscosity when the polytropic gas compression model is used.
693718

694-
- `mu_l0`, `ss`, and `pv`, `gamma_v`, `M_v`, `mu_v`, and `k_v` specify simulation parameters for the non-polytropic gas compression model.
695-
`mu_l0`, `ss`, and `pv` correspond to the liquid viscosity, surface tension, and vapor pressure, respectively.
696-
`gamma_v`, `M_v`, `mu_v`, and `k_v` specify the specific heat ratio, molecular weight, viscosity, and thermal conductivity of a chosen component.
697-
Implementation of the parameters into the model follow [Ando (2010)](references.md#Ando10).
698-
699719
- `qbmm` activates quadrature by method of moments, which assumes a PDF for bubble radius and velocity.
700720

701721
- `dist_type` specifies the initial joint PDF of initial bubble radius and bubble velocity required in qbmm. `dist_type = 1` and `2` correspond to binormal and lognormal-normal distributions respectively.
@@ -706,6 +726,46 @@ Implementation of the parameters into the model follow [Ando (2010)](references.
706726

707727
- `rhoRV` specifies the correlation coefficient of the joint PDF of bubble radius and bubble velocity required in the QBMM feature.
708728

729+
#### 9.2 Volume-Averaged Bubble Model
730+
731+
| Parameter | Type | Description |
732+
| ---: | :---: | :--- |
733+
| `bubbles_lagrange` | Logical | Lagrangian subgrid bubble model switch |
734+
| `nBubs_glb` | Integer | Global number of bubbles |
735+
| `solver_approach` | Integer | 1: One-way coupling, 2: two-way coupling |
736+
| `cluster_type` | Integer | Method to find p_inf |
737+
| `pressure_corrector` | Logical | Cell pressure correction term |
738+
| `smooth_type` | Integer | Smoothing function. 1: Gaussian, 2:Delta 3x3 |
739+
| `heatTransfer_model` | Logical | Activates the interface heat transfer model |
740+
| `massTransfer_model` | Logical | Activates the interface mass transfer model |
741+
| `write_bubbles` | Logical | Write files to track the bubble evolution each time step |
742+
| `write_bubbles_stats` | Logical | Write the maximum and minimum radius of each bubble |
743+
| `epsilonb` | Real | Standard deviation scaling for the gaussian function |
744+
| `charwidth` | Real | Domain virtual depth (z direction, for 2D simulations) |
745+
| `valmaxvoid` | Real | Maximum void fraction permitted |
746+
| `c0` | Real | Reference speed |
747+
| `rho0` | Real | Reference density |
748+
| `T0` | Real | Reference temperature |
749+
| `x0` | Real | Reference length |
750+
| `Thost` | Real | Temperature of the surrounding liquid (host) |
751+
| `diffcoefvap` | Real | Vapor diffusivity in the gas |
752+
| `rkck_adap_dt` | Logical | Activates the adaptive rkck time stepping algorithm |
753+
| `rkck_tolerance` | Real | Admissible error truncation tolerance in the rkck stepper |
754+
755+
- `nBubs_glb` Total number of bubbles. Their initial conditions need to be specified in the ./input/lag_bubbles.dat file. See the example cases for additional information.
756+
757+
- `solver_approach` Specifies the Euler-Lagrange coupling method: [1] enables a one-way coupling approach, where the bubbles do not influence the Eulerian field. [2] activates the two-way coupling approach based on [Maeda and Colonius (2018)](references.md#Maeda18), where the effect of the bubbles is added in the Eulerian field as source terms.
758+
759+
- `cluster_type` Specifies method to find p_inf (pressure that drives the bubble dynamics): [1] activates the bilinear interpolation of the pressure field, while [2] enables the bubble dynamic closure based on [Maeda and Colonius (2018)](references.md#Maeda18), the full model is obtained when `pressure_corrector` is true.
760+
761+
- `smooth_type` Specifies the smoothening method of projecting the lagrangian bubbles in the Eulerian field: [1] activates the gaussian kernel function described in [Maeda and Colonius (2018)](references.md#Maeda18), while [2] activates the delta kernel function where the effect of the bubble is only seen in the specific bubble location cell.
762+
763+
- `heatTransfer_model` Activates the heat transfer model at the bubble's interface based on ([Preston et al., 2007](references.md#Preston07)).
764+
765+
- `massTransfer_model` Activates the mass transfer model at the bubble's interface based on ([Preston et al., 2007](references.md#Preston07)).
766+
767+
- `rkck_adap_dt` Activates the adaptive 4th/5th order Runge—Kutta–Cash–Karp (RKCK) time-stepping algorithm (requires `time_stepper ==4`). A maximum error between the 4th and 5th order Runge-Kutta-Cash-Karp solutions for the same time step size is calculated. If the error is smaller than a tolerance (`rkck_tolerance`), then the algorithm employs the 5th order solution, while if not, both eulerian/lagrangian variables are re-calculated with a smaller time step size.
768+
709769
### 10. Velocity Field Setup
710770

711771
| Parameter | Type | Description |

docs/documentation/references.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
- <a id="Maeda17">Maeda, K. and Colonius, T. (2017). A source term approach for generation of one-way acoustic waves in the euler and navier–stokes equations. Wave Motion, 75:36–49.</a>
3232

33+
- <a id="Maeda18">Maeda, K. and Colonius, T. (2018). Eulerian–lagrangian method for simulation of cloud cavitation. Journal of computational physics, 371:994–1017.</a>
34+
3335
- <a id="Meng16">Meng, J. C. C. (2016). Numerical simulations of droplet aerobreakup. PhD thesis, California Institute of Technology.</a>
3436

3537
- <a id="Pirozzoli13">Pirozzoli, S., and Colonius, T. (2013). Generalized characteristic relaxation boundary conditions for unsteady compressible flow simulations. Journal of Computational Physics, 248:109-126.</a>

examples/0D_bubblecollapse_adap/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
# ==========================================================
120120

121121
# Bubbles ==================================================
122-
'bubbles' : 'T',
122+
'bubbles_euler' : 'T',
123123
'bubble_model' : 2,
124124

125125
# Nondimensional numbers

examples/1D_bubblescreen/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
# ==========================================================
177177

178178
# Bubbles ==================================================
179-
'bubbles' : 'T',
179+
'bubbles_euler' : 'T',
180180
'bubble_model' : 3,
181181
'polytropic' : 'T',
182182
'polydisperse' : 'F',

examples/1D_exp_bubscreen/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
# ==========================================================
211211

212212
# Bubbles ==================================================
213-
'bubbles' : 'T',
213+
'bubbles_euler' : 'T',
214214
# in user guide... 1 = gilbert 2 = keller-miksis
215215
# but gilbert won't work for the equations that you are using... (i think)
216216
'bubble_model' : 2,

examples/1D_poly_bubscreen/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
'rhoref' : rho0,
185185
# ==========================================================================
186186
# Bubbles ==================================================================
187-
'bubbles' : 'T',
187+
'bubbles_euler' : 'T',
188188
'bubble_model' : 2,
189189
'polytropic' : 'T',
190190
# 'polydisperse' : 'T',

0 commit comments

Comments
 (0)