Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 26 additions & 58 deletions benchmarks/viscous_weno5_sgb_acoustic/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@
x0 = 10.0e-04
y0 = 10.0e-04
z0 = 10.0e-04
p0 = 1.0
p0 = 101325.0
p0ref = p0
rho0 = 1.0e03
c0 = math.sqrt(p0 / rho0)
patm = 1.0
rho0ref = rho0
u0 = math.sqrt(p0 / rho0)
p0ext = 101325.0

# water props
n_tait = 7.1
B_tait = 306.0e06 / p0
mul0 = 1.002e-03 # viscosity
gam_l = 7.1
pi_inf_l = 306.0e06
mu_l = 1.002e-03 # viscosity
ss = 0.07275 # surface tension
pv = 2.3388e03 # vapor pressure

Expand All @@ -47,43 +49,25 @@
k_v = 0.019426

# air props
gamma_n = 1.4
M_n = 28.97
mu_n = 1.8e-05
k_n = 0.02556

# air props
gamma_gas = gamma_n
gam_g = 1.4

# reference bubble size
R0ref = 10.0e-06

pa = 0.1 * 1.0e06 / 101325.0

# Characteristic velocity
uu = math.sqrt(p0 / rho0)
# Cavitation number
Ca = (p0 - pv) / (rho0 * (uu**2.0))
# Weber number
We = rho0 * (uu**2.0) * R0ref / ss
# Inv. bubble Reynolds number
Re_inv = mul0 / (rho0 * uu * R0ref)
pa = 0.1 * 1.0e06

# IC setup
vf0 = 0.00004
n0 = vf0 / (math.pi * 4.0e00 / 3.0e00)

cact = 1475.0
t0 = x0 / c0

nbubbles = 1
myr0 = R0ref
t0 = x0 / u0

cfl = 0.01
Ldomain = 20.0e-03
L = Ldomain / x0
dx = L / float(Nx)
dt = cfl * dx * c0 / cact
dt = cfl * dx * u0 / cact
Lpulse = 0.3 * Ldomain
Tpulse = Lpulse / cact

Expand Down Expand Up @@ -150,10 +134,10 @@
"patch_icpp(1)%vel(1)": 0.0,
"patch_icpp(1)%vel(2)": 0.0,
"patch_icpp(1)%vel(3)": 0.0,
"patch_icpp(1)%pres": patm,
"patch_icpp(1)%pres": p0ext / p0,
"patch_icpp(1)%alpha_rho(1)": (1.0 - 1.0e-12) * 1.0e03 / rho0,
"patch_icpp(1)%alpha(1)": 1.0e-12,
"patch_icpp(1)%r0": 1.0,
"patch_icpp(1)%r0": R0ref / x0,
"patch_icpp(1)%v0": 0.0e00,
# Patch 2 Screen
"patch_icpp(2)%geometry": 9,
Expand All @@ -167,46 +151,30 @@
"patch_icpp(2)%vel(1)": 0.0,
"patch_icpp(2)%vel(2)": 0.0,
"patch_icpp(2)%vel(3)": 0.0,
"patch_icpp(2)%pres": patm,
"patch_icpp(2)%pres": p0ext / p0,
"patch_icpp(2)%alpha_rho(1)": (1.0 - vf0) * 1.0e03 / rho0,
"patch_icpp(2)%alpha(1)": vf0,
"patch_icpp(2)%r0": 1.0,
"patch_icpp(2)%r0": R0ref / x0,
"patch_icpp(2)%v0": 0.0e00,
# Fluids Physical Parameters
# Surrounding liquid
"fluid_pp(1)%gamma": 1.0e00 / (n_tait - 1.0e00),
"fluid_pp(1)%pi_inf": n_tait * B_tait / (n_tait - 1.0),
"fluid_pp(1)%mul0": mul0,
"fluid_pp(1)%ss": ss,
"fluid_pp(1)%pv": pv,
"fluid_pp(1)%gamma_v": gamma_v,
"fluid_pp(1)%M_v": M_v,
"fluid_pp(1)%mu_v": mu_v,
"fluid_pp(1)%k_v": k_v,
"fluid_pp(1)%gamma": 1.0e00 / (gam_l - 1.0e00),
"fluid_pp(1)%pi_inf": gam_l * (pi_inf_l / p0) / (gam_l - 1.0),
"fluid_pp(1)%Re(1)": 1e3,
# Last fluid_pp is always reserved for bubble gas state
# if applicable
"fluid_pp(2)%gamma": 1.0 / (gamma_gas - 1.0),
"fluid_pp(2)%pi_inf": 0.0e00,
"fluid_pp(2)%gamma_v": gamma_n,
"fluid_pp(2)%M_v": M_n,
"fluid_pp(2)%mu_v": mu_n,
"fluid_pp(2)%k_v": k_n,
# Non-polytropic gas compression model AND/OR Tait EOS
"pref": p0,
"rhoref": rho0,
# Bubbles
"bubbles_euler": "T",
"bubble_model": 3,
"polytropic": "T",
"polydisperse": "F",
# 'poly_sigma' : 0.3,
"thermal": 3,
"R0ref": myr0,
"nb": 1,
"Ca": Ca,
"Web": We,
"Re_inv": Re_inv,
"bub_pp%R0ref": R0ref / x0,
"bub_pp%p0ref": p0ref / p0,
"bub_pp%rho0ref": rho0ref / rho0,
"bub_pp%ss": ss / (rho0 * x0 * u0 * u0),
"bub_pp%pv": pv / p0,
"bub_pp%mu_l": mu_l / (rho0 * x0 * u0),
"bub_pp%gam_g": gam_g,
# Acoustic source
"acoustic_source": "T",
"num_source": 1,
Expand All @@ -218,7 +186,7 @@
"acoustic(1)%npulse": 1,
"acoustic(1)%dir": 1.0,
"acoustic(1)%pulse": 1,
"acoustic(1)%mag": pa,
"acoustic(1)%mag": pa / p0,
"acoustic(1)%wavelength": (1.0 / (300000.0)) * cact / x0,
}
)
Expand Down
95 changes: 45 additions & 50 deletions docs/documentation/case.md
Original file line number Diff line number Diff line change
Expand Up @@ -750,60 +750,64 @@ Details of the transducer acoustic source model can be found in [Maeda and Colon

### 9. Sub-grid Bubble Models

| Parameter | Type | Description |
| ---: | :----: | :--- |
| `bubbles_euler` | Logical | Ensemble-averaged bubble modeling |
| `bubbles_lagrange`| Logical | Volume-averaged bubble modeling |
| `bubble_model` | Integer | [1] Gilmore; [2] Keller--Miksis |
| `mu_l0` * | Real | Liquid viscosity (only specify in liquid phase) |
| `ss` * | Real | Surface tension (only specify in liquid phase) |
| `pv` * | Real | Vapor pressure (only specify in liquid phase) |
| `gamma_v` † | Real | Specific heat ratio |
| `M_v` † | Real | Molecular weight |
| `mu_v` † | Real | Viscosity |
| `k_v` † | Real | Thermal conductivity |
| `cp_v` † | Real | Specific heat capacity |
| `D_v` † | Real | Vapor diffusivity in the gas |

These options work only for gas-liquid two-component flows.
Component indexes are required to be 1 for liquid and 2 for gas.

- \* These parameters should be prepended with patch index $1$ that is filled with liquid: `fluid_pp(1)%`.
- † These parameters should be prepended with patch indexes filled with liquid and gas: `fluid_pp(1)%` and `fluid_pp(2)%`.
| Parameter | Type | Description |
| ---: | :----: | :--- |
| `bubbles_euler` | Logical | Ensemble-averaged bubble modeling |
| `bubbles_lagrange` | Logical | Volume-averaged bubble modeling |
| `bubble_model` | Integer | [1] Gilmore; [2] Keller--Miksis; [3] Rayleigh-Plesset |
| `bub_pp%R0ref`*†‡ | Real | Reference bubble radius |
| `bub_pp%p0ref`*†‡ | Real | Reference pressure |
| `bub_pp%rho0ref`*†‡| Real | Reference density |
| `bub_pp%T0ref`†‡ | Real | Reference temperature |
| `bub_pp%ss`*†‡ | Real | Surface tension between host and gas (bubble) |
| `bub_pp%pv`*†‡ | Real | Vapor pressure of host |
| `bub_pp%vd`† ‡ | Real | Vapor diffusivity in gas (bubble) |
| `bub_pp%mu_l`*†‡ | Real | Viscosity of host in liquid state |
| `bub_pp%mu_v`† | Real | Viscosity of host in vapor state |
| `bub_pp%mu_g`† | Real | Viscosity of gas (bubble) |
| `bub_pp%gam_v`†‡ | Real | Specific heat ratio of host in vapor state |
| `bub_pp%gam_g`*†‡ | Real | Specific heat ratio of gas (bubble) |
| `bub_pp%M_v`†‡ | Real | Molecular weight of host |
| `bub_pp%M_g`†‡ | Real | Molecular weight of gas (bubble) |
| `bub_pp%k_v`†‡ | Real | Thermal conductivity of host in vapor state |
| `bub_pp%k_g`†‡ | Real | Thermal conductivity of gas (bubble) |
| `bub_pp%cp_v`‡ | Real | Specific heat capacity in constant pressure of host in vapor state |
| `bub_pp%cp_g`‡ | Real | Specific heat capacity in constant pressure of gas (bubble) |
| `bub_pp%R_v`†‡ | Real | Gas constant of host in vapor state |
| `bub_pp%R_g`†‡ | Real | Gas constant of gas (bubble) |

- \* These parameters are required for ensemble-averaged bubble model.
- † These parameters are required for ensemble-averaged bubble model with `polytropic = F`.
- ‡ These parameters are required for volume-averaged bubble model with `polytropic = F`.

This table lists the sub-grid bubble model parameters, which can be utilized in both the ensemble-averaged and volume-averaged bubble models.

- `bubbles_euler` activates the ensemble-averaged bubble model.

- `bubbles_lagrange` activates the volume-averaged bubble model.

- `bubble_model` specified a model for spherical bubble dynamics by an integer of 1 and 2.
- `bubble_model` specifies a model for spherical bubble dynamics by an integer of `1`, `2`, or `3`.
`bubble_model = 1`, `2`, and `3` correspond to the Gilmore, Keller-Miksis, and Rayleigh-Plesset models.

- `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.
`mu_l0`, `ss`, and `pv` correspond to the liquid viscosity, surface tension, and vapor pressure, respectively.
`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'``).
- `bub_pp` specifies simulation parameters for the EE and/or EL bubble model.

Implementation of the parameters into the model follow [Ando (2010)](references.md).

#### 9.1 Ensemble-Averaged Bubble Model

| Parameter . | Type | Description |
| ---: . | :----: | :--- |
| `bubbles_euler`. | Logical | Ensemble-averaged bubble modeling |
| `polytropic` | Logical | Polytropic gas compression |
| `thermal` | Integer | Thermal model: [1] Adiabatic; [2] Isothermal; [3] Transfer |
| `R0ref` | Real | Reference bubble radius |
| `polydisperse` | Logical | Polydispersity in equilibrium bubble radius R0 |
| `nb` | Integer | Number of bins: [1] Monodisperse; [$>1$] Polydisperse |
| `poly_sigma` | Real | Standard deviation for probability density function of polydisperse bubble populations |
| `Ca` | Real | Cavitation number |
| `Web` | Real | Weber number |
| `Re_inv` | Real | Inverse Reynolds number |
| `qbmm` | Logical | Quadrature by method of moments |
| `dist_type` | Integer | Joint probability density function for bubble radius and velocity (only for ``qbmm = 'T'``) |
| `sigR` | Real | Standard deviation for the probability density function of bubble radius (only for ``qbmm = 'T'``) (EE)|
| `sigV` | Real | Standard deviation for the probability density function of bubble velocity (only for ``qbmm = 'T'``) (EE)|
| `rhoRV` | Real | Correlation coefficient for the joint probability density function of bubble radius and velocity (only for ``qbmm = 'T'``) |
| Parameter | Type | Description |
| ---: | :----: | :--- |
| `bubbles_euler` | Logical | Ensemble-averaged bubble modeling |
| `polytropic` | Logical | Polytropic gas compression |
| `thermal` | Integer | Thermal model: [1] Adiabatic; [2] Isothermal; [3] Transfer |
| `polydisperse` | Logical | Polydispersity in equilibrium bubble radius R0 |
| `nb` | Integer | Number of bins: [1] Monodisperse; [$>1$] Polydisperse |
| `poly_sigma` | Real | Standard deviation for probability density function of polydisperse bubble populations |
| `qbmm` | Logical | Quadrature by method of moments |
| `dist_type` | Integer | Joint probability density function for bubble radius and velocity (only for ``qbmm = 'T'``) |
| `sigR` | Real | Standard deviation for the probability density function of bubble radius (only for ``qbmm = 'T'``) (EE)|
| `sigV` | Real | Standard deviation for the probability density function of bubble velocity (only for ``qbmm = 'T'``) (EE)|
| `rhoRV` | Real | Correlation coefficient for the joint probability density function of bubble radius and velocity (only for ``qbmm = 'T'``) |

This table lists the ensemble-averaged bubble model parameters.

Expand All @@ -815,14 +819,10 @@ When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due

- `polydisperse` activates polydispersity in the bubble model through a probability density function (PDF) of the equilibrium bubble radius. Simpson's rule is used for integrating the log-normal PDF of equilibrium bubble radius for polydisperse populations.

- `R0ref` specifies the reference bubble radius.

- `nb` specifies the number of discrete bins that define the probability density function (PDF) of the equilibrium bubble radius.

- `poly_sigma` specifies the standard deviation of the log-normal PDF of equilibrium bubble radius for polydisperse populations.

- `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.

- `qbmm` activates quadrature by method of moments, which assumes a PDF for bubble radius and velocity.

- `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.
Expand Down Expand Up @@ -850,11 +850,6 @@ When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due
| `epsilonb` | Real | Standard deviation scaling for the gaussian function |
| `charwidth` | Real | Domain virtual depth (z direction, for 2D simulations) |
| `valmaxvoid` | Real | Maximum void fraction permitted |
| `c0` | Real | Reference speed |
| `rho0` | Real | Reference density |
| `T0` | Real | Reference temperature |
| `x0` | Real | Reference length |
| `Thost` | Real | Temperature of the surrounding liquid (host) |

- `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.

Expand Down
Loading
Loading