sandbox/BOYD/run/film_boiling.c
- 2D
Film boiling problem
- Setup the
problem
- Domain size, and simulation duration
- Fluid properties and parameters
- Include header for NS, phase-change, gravity, etc
- Boundary conditions for the outflow (top) and wall (bottom)
- Main function.
- Initialize the VOF, liquid and vapor temperature.
- Adaptive mesh refinement.
- Check the simulation progress.
- Movie maker
- References
- Setup the
problem
2D Film boiling problem
Section 4.4 of Boyd et al, 2023.
Film boiling
Setup the problem
Domain size, and simulation duration
double lambda_RT = 0.0;
#define L (lambda_RT) // size of the box
//#define T_END (0.528)
#define T_END (0.4)
Fluid properties and parameters
#include "../src/properties/film_boiling_case.h"
#define T_inf (5. + T_sat)
#define grav_mag 9.81
Include header for NS, phase-change, gravity, etc
#include "../src/01_vaporization/evap_include.h"
Boundary conditions for the outflow (top) and wall (bottom)
[bottom] = dirichlet(T_inf);
T_V[top] = dirichlet(T_sat);
T_L
[bottom] = dirichlet(rhocp_V * T_inf);
fE_V[top] = dirichlet(rhocp_L * T_sat);
fE_L
.n[top] = neumann(0.);
u[top] = dirichlet(0.);
p
.n[bottom] = dirichlet(0.);
u[bottom] = neumann(0.); p
Main function.
int main(int argc, char* argv[]) {
= 2.0 * pi * sqrt(3. * sigma_lv / (grav_mag * (rho_L - rho_V)));
lambda_RT fprintf(stdout, "lambda_RT %g\n", lambda_RT);
= 5;
MIN_LEVEL = 8;
LEVEL = 8;
MAX_LEVEL
setup_evap();
(L);
size(-0.5*L0, 0.0);
origin= 1 << LEVEL;
N (N);
init_grid
.y = -grav_mag;
G
run();
}
Initialize the VOF, liquid and vapor temperature.
#define RT_y_func(x) ((4. + cos(2. * pi * x / lambda_RT)) * lambda_RT / 128.)
#define RT_func(x, y) (y - RT_y_func(x))
double T_vap_func(double x, double y){
double y_max = RT_y_func(x);
double T_y = T_inf - y/y_max*(T_inf-T_sat);
= clamp(T_y, T_sat, T_inf);
T_y return T_y;
}
event init(i = 0) {
if (!restore (file = "restart")) {
= 0.2;
CFL #if TREE
refine(level < MAX_LEVEL && RT_func(x, y - dR_refine) < 0. &&
(x, y + dR_refine) > 0.);
RT_func#endif
(f, RT_func(x, y));
fraction_LS
foreach () {
foreach_dimension() {
.x[] = 0.;
u}
double T_vap = T_vap_func(x, y);
[] = (1.0 - f[]) * T_vap + f[] * T_sat;
T_V[] = T_sat;
T_L}
foreach_face() uf.x[] = 0.;
}
init_Energy();
}
Adaptive mesh refinement.
#define REFINE_VAPOR_REGION
#define femax 1.0e-5
#define Temax 1.0e-2
#define uemax 1.0e-2
#include "../src/01_vaporization/adapt_evap.h"
Check the simulation progress.
#include "../src/outputs/progress.h"
event progress(i++) { progress_check(i, t, T_END); }
Movie maker
#include "view.h"
#include "../src/post_processing/movie_maker.h"
event movie_output(t += DELTA_T) {
scalar temperature[];
foreach () {
[] = f[] * T_L[] + (1. - f[]) * T_V[];
temperature}
= 0.05;
TX =0;
MESH_ON=1;
BOX_ONmovie_maker_i("temperature", i, t);
}
References
[boyd_consistent_2023] |
Bradley Boyd and Yue Ling. A consistent volume-of-fluid approach for direct numerical simulation of the aerodynamic breakup of a vaporizing drop. Computers & Fluids, page 105807, 2023. [ DOI | http ] |