Skip to content

Commit 19082fd

Browse files
authored
Add files via upload
1 parent de01d8b commit 19082fd

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed

docs/f_call_params.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# `f_call_params.m` Documentation
2+
3+
## Overview
4+
`f_call_params` sets up the simulation environment for the Inertial Microcavitation Rheometry (IMR) solver.
5+
It loads a case file or default case, applies user overrides, performs non-dimensionalization, checks inputs, and packages all simulation parameters needed for the solver.
6+
7+
## Function Signature
8+
```matlab
9+
[eqns_opts, solve_opts, init_opts, init_stress, tspan_opts, out_opts, acos_opts, wave_opts, sigma_opts, thermal_opts, mass_opts] = f_call_params(varargin)
10+
```
11+
12+
---
13+
14+
## Inputs
15+
16+
The function accepts **parameter-value pairs** through `varargin`. Key recognized parameters are:
17+
18+
### Case file and basic control
19+
- `casefile`: Path to a custom case `.m` file.
20+
- `collapse`: Enable special initial condition calculation for collapse.
21+
22+
### Time configuration
23+
- `tfin`: Final simulation time.
24+
- `tvector`: Full time vector for simulation.
25+
26+
### Radial model settings
27+
- `radial`: Radial dynamics model (integer 1–4).
28+
- `bubtherm`: Enable bubble thermal model (0 or 1).
29+
- `medtherm`: Enable medium thermal model (0 or 1).
30+
31+
### Material model settings
32+
- `stress`: Stress/constitutive model (0–7).
33+
- `eps3`: Enable second-order strain (0 or 1).
34+
- `vapor`: Enable vapor phase effects (0 or 1).
35+
- `masstrans`: Enable mass transfer (0 or 1).
36+
37+
### Solver options
38+
- `method`, `spectral`, `divisions`, `nv`, `nt`, `mt`, `lv`, `lt`: Solver configuration settings.
39+
40+
### Initial conditions
41+
- `r0`: Initial radius.
42+
- `u0`: Initial wall velocity.
43+
- `req`: Equilibrium radius.
44+
- `p0`: Initial bubble pressure.
45+
- `stress0`: Initial stress field value.
46+
47+
### Output options
48+
- `dimout`: Enable dimensionalized outputs (0 or 1).
49+
- `progdisplay`: Display simulation progress (0 or 1).
50+
51+
### Acoustic/environmental properties
52+
- `rho8`: Far-field density.
53+
- `gam`: Grüneisen parameter.
54+
- `nstate`: EOS exponent.
55+
- `p8`: Far-field pressure.
56+
- `c8`: Far-field sound speed.
57+
- `hugoniot_s`: Hugoniot slope.
58+
59+
### Waveform configuration
60+
- `wave_type`, `pa`, `omega`, `tw`, `dt`, `mn`: Driving waveform parameters.
61+
62+
### Stress/viscoelastic model parameters
63+
- `mu`, `g`, `lambda1`, `lambda2`, `alphax`, `surft`: Viscosity, elasticity, and surface tension parameters.
64+
65+
### Non-Newtonian viscosity options
66+
- `du`, `mu0`, `v_a`, `v_nc`, `v_lambda`, `nu_model`: Advanced viscosity settings.
67+
68+
### Thermal properties
69+
- `t8`: Far-field temperature.
70+
- `kappa`: Thermal diffusivity.
71+
- `atg`, `btg`, `atv`, `btv`: Temperature conductivity coefficients.
72+
- `km`: Medium thermal conductivity.
73+
- `dm`: Medium diffusivity.
74+
75+
### Mass transfer parameters
76+
- `dmass`, `lheat`, `rv`, `ra`: Mass transfer and gas constants.
77+
78+
### Pressure properties
79+
- `pv`: Vapor pressure.
80+
81+
---
82+
83+
## Outputs
84+
85+
The function returns the following grouped outputs:
86+
87+
- `eqns_opts`: Flags for physical models (radial, thermal, stress, mass transfer).
88+
- `solve_opts`: Solver settings (method, divisions, spectral options).
89+
- `init_opts`: Initial conditions in non-dimensional form (radius, velocity, pressure).
90+
- `init_stress`: Initial stress tensor (depends on stress model).
91+
- `tspan_opts`: Simulation time span or vector (non-dimensional).
92+
- `out_opts`: Output and display control options.
93+
- `acos_opts`: Acoustic medium properties (sound speed, compressibility).
94+
- `wave_opts`: Driving waveform parameters and optional preloaded data.
95+
- `sigma_opts`: Viscoelastic material properties and dimensionless numbers.
96+
- `thermal_opts`: Non-dimensional thermal transport coefficients.
97+
- `mass_opts`: Mass transfer parameters and non-dimensional vapor concentration.
98+
99+
---
100+
101+
## Notes
102+
103+
- `f_call_params` must be called before running the forward solver.
104+
- Critical inputs must be matched correctly; otherwise, the function throws errors.
105+
- Defaults from `default_case.m` are loaded if no `casefile` is specified.
106+
- Some helper functions (`f_pvsat.m`, `f_init_stress.m`) are required for full execution.
107+

0 commit comments

Comments
 (0)