Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vof #111

Open
wants to merge 56 commits into
base: development
Choose a base branch
from
Open

Vof #111

Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
1d8aa88
init commit of vof
Jun 20, 2024
35b3fc2
add missing files
Jun 20, 2024
547d70d
use eb to build tracer (#1)
WeiqunZhang Jun 20, 2024
3e693fb
Tecplot: use nfiles (#2)
WeiqunZhang Jun 20, 2024
087aba0
update VolumeOfFluid.H and .cpp
Jun 21, 2024
3a4f232
Merge branch 'development' into vof
asalmgren Jun 21, 2024
1356ac7
Merge branch 'development' into vof
asalmgren Jun 22, 2024
6ee1d1c
VOF module with required format
Jun 22, 2024
39448dd
Merge branch 'vof' of github.com:IFDL-WSU/incflo into vof
Jun 22, 2024
62578c3
vof advection is done w/o BCs
Jul 10, 2024
6b98a14
Merge branch 'development' into vof
Jul 10, 2024
915eb86
implementation of the height function
Jul 26, 2024
b5cd784
curvature calculation is done
Aug 7, 2024
b1f0da5
Merge branch 'AMReX-Fluids:development' into vof
IFDL-WSU Aug 7, 2024
fdc0d62
light modification
Aug 17, 2024
aa39f08
Merge branch 'vof' of github.com:IFDL-WSU/incflo-vof into vof
Aug 17, 2024
f8911d1
light modification
Aug 17, 2024
eabae52
Merge branch 'AMReX-Fluids:development' into vof
IFDL-WSU Aug 17, 2024
4f81fb1
Merge branch 'AMReX-Fluids:development' into vof
IFDL-WSU Aug 19, 2024
303c098
implement surface-tension force
Aug 26, 2024
c8328ef
Merge remote-tracking branch 'hua/vof' into vof
Aug 26, 2024
6c9cba0
update implementation of surface tension force
Sep 6, 2024
16811b2
Merge branch 'AMReX-Fluids:development' into vof
IFDL-WSU Sep 6, 2024
2eb52b8
Merge branch 'AMReX-Fluids:development' into vof
IFDL-WSU Sep 14, 2024
1fc9cde
test
Sep 14, 2024
b403956
Merge branch 'vof' of github.com:IFDL-WSU/incflo-vof into vof
Sep 14, 2024
1789530
implement 2D
Sep 19, 2024
b9df26d
implement 2D
Sep 19, 2024
3274baa
Merge branch 'AMReX-Fluids:development' into vof
IFDL-WSU Sep 19, 2024
5c37b09
update 2D implementation
Sep 20, 2024
3c1db7c
update 2D implementation
Sep 20, 2024
0a57edd
update 2D implementation
Sep 24, 2024
1cbede4
Merge branch 'AMReX-Fluids:development' into vof
IFDL-WSU Sep 25, 2024
c8e1cd3
use cc project and face-centered SF
Oct 1, 2024
3971e64
Merge branch 'AMReX-Fluids:development' into vof
IFDL-WSU Oct 2, 2024
d257a29
did cleaning for tests
Oct 2, 2024
7109fd1
correct lid_drven_cavity input
Oct 2, 2024
cee1737
clean bugs for ccproj based VOF
Oct 4, 2024
1868861
clean bugs for ccproj based VOF
Oct 4, 2024
61e1c73
update for conservative advection scheme
Oct 7, 2024
4fefd68
implement filtering of VOF for high density ratio flows
Oct 12, 2024
b166381
cleaned bugs and complete capillary wave test
Oct 26, 2024
947ffd6
ready for drop flight test
Nov 6, 2024
36353b1
complete merge with incflo development
Nov 7, 2024
4360a93
Merge branch 'AMReX-Fluids-development' into vof
Nov 7, 2024
41cde17
fix the bug of io.cpp caused by VOF implementation
Nov 7, 2024
62d1545
Merge branch 'AMReX-Fluids:development' into vof
IFDL-WSU Dec 4, 2024
3415bfe
update tecplot output
Dec 4, 2024
75a4c63
Implement the initialization of VOF using a parameter incflo.vof_init…
Dec 8, 2024
113cb42
Merge branch 'AMReX-Fluids:development' into vof
IFDL-WSU Dec 8, 2024
8ca85d5
forget to update some files in previous commit
Dec 8, 2024
5bb98cd
update vof.cpp
Dec 8, 2024
f0ea51e
VOF and surface-tension are implemented in AMR
Jan 12, 2025
e524f7f
implement FillPatchNLevels in incflo_fillpatch
Feb 5, 2025
ac925b2
implement VOFCoarseToFine interpolation
Feb 27, 2025
17ee4b4
fix the bugs of CC projection
Mar 9, 2025
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
Prev Previous commit
Next Next commit
update 2D implementation
Hua Tan committed Sep 24, 2024
commit 0a57edd6173f70b2313f04fed57bb246af3f76cd
4 changes: 2 additions & 2 deletions src/convection/incflo_compute_MAC_projected_velocities.cpp
Original file line number Diff line number Diff line change
@@ -165,7 +165,7 @@ incflo::compute_MAC_projected_velocities (
// Predict normal velocity to faces -- note that the {u_mac, v_mac, w_mac}
// returned from this call are on face CENTROIDS
bool allow_inflow_on_outflow = false;
/*HydroUtils::ExtrapVelToFaces(*vel[lev], *vel_forces[lev],
HydroUtils::ExtrapVelToFaces(*vel[lev], *vel_forces[lev],
AMREX_D_DECL(*u_mac[lev], *v_mac[lev], *w_mac[lev]),
get_velocity_bcrec(), get_velocity_bcrec_device_ptr(),
geom[lev], l_dt,
@@ -175,7 +175,7 @@ incflo::compute_MAC_projected_velocities (
#endif
m_godunov_ppm, m_godunov_use_forces_in_trans,
l_advection_type, PPM::default_limiter,
allow_inflow_on_outflow, BC_MF.get());*/
allow_inflow_on_outflow, BC_MF.get());

//add surface tension
//if(m_vof_advect_tracer)
38 changes: 23 additions & 15 deletions src/vof/VolumeOfFluid.cpp
Original file line number Diff line number Diff line change
@@ -2566,7 +2566,7 @@ VolumeOfFluid::tracer_vof_init_fraction (int lev, MultiFab& a_tracer)
Array<Real,AMREX_SPACEDIM> center{AMREX_D_DECL(0.5*(problo[0]+probhi[0]),
0.5*(problo[1]+probhi[1]),
0.5*(problo[2]+probhi[2]))};
Real radius = .3; //5.0*dx[0];
Real radius = .2; //5.0*dx[0];
bool fluid_is_inside = true;

EB2::SphereIF my_sphere(radius, center, fluid_is_inside);
@@ -2602,7 +2602,7 @@ VolumeOfFluid::tracer_vof_init_fraction (int lev, MultiFab& a_tracer)
//auto my_box= EB2::rotate(EB2::BoxIF( low, high, fluid_is_inside), .3, 1);
auto my_box1= EB2::rotate(my_box, .3, 0);
auto my_box2= EB2::rotate(my_box1, .2, 2);
auto two =EB2::makeIntersection(my_sphere, my_sphere1);
auto two =EB2::makeIntersection(my_sphere, my_box);
//auto two = EB2::makeComplement(EB2::makeUnion(my_cyl_1, my_cyl));

// Generate GeometryShop
@@ -2657,15 +2657,14 @@ VolumeOfFluid::tracer_vof_init_fraction (int lev, MultiFab& a_tracer)
// Read the file line by line
std::string line;
while (std::getline(infile, line)) {
std::istringstream iss(line);
int i, j, k;
Real value;
if (!(iss >> i >> j >> k >> value)) {
std::cerr << "Error reading line: " << line << std::endl;
continue;
}
std::istringstream iss(line);
int i, j, k;
Real value;
if (!(iss >> i >> j >> k >> value)) {
std::cerr << "Error reading line: " << line << std::endl;
continue;
}
vout.emplace_back(value,i,j,k);

}
infile.close();
#ifdef AMRE_USE_OMP
@@ -2678,12 +2677,21 @@ VolumeOfFluid::tracer_vof_init_fraction (int lev, MultiFab& a_tracer)
auto const& tracer = a_tracer.array(mfi);

for(int n=0;n<vout.size();++n)
/* if(vout[n].i>=vbx.smallEnd()[0]&&vout[n].i<=vbx.bigEnd()[0]&&
vout[n].j>=vbx.smallEnd()[1]&&vout[n].j<=vbx.bigEnd()[1]&&
vout[n].k>=vbx.smallEnd()[2]&&vout[n].k<=vbx.bigEnd()[2]){*/
if(vbx.contains(vout[n].i,vout[n].j,vout[n].k)){
if(vout[n].i>=vbx.smallEnd()[0]&&vout[n].i<=vbx.bigEnd()[0]&&
vout[n].j>=vbx.smallEnd()[1]&&vout[n].j<=vbx.bigEnd()[1]
#if AMREX_SPACEDIM==2
&&vout[n].k==7)
#else
&&vout[n].k>=vbx.smallEnd()[2]&&vout[n].k<=vbx.bigEnd()[2])
#endif
{
//if(vbx.contains(vout[n].i,vout[n].j,vout[n].k)){
#if AMREX_SPACEDIM==2
tracer(vout[n].i,vout[n].j,0,0)=vout[n].vof;
#else
tracer(vout[n].i,vout[n].j,vout[n].k,0)=vout[n].vof;
}
#endif
}

/*amrex::ParallelFor(vbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
{
30 changes: 15 additions & 15 deletions test_2d/inputs.droplet
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# SIMULATION STOP #
#.......................................#
stop_time = 8.1 # Max (simulated) time to evolve
max_step = 20 # Max number of time steps
stop_time = 8 # Max (simulated) time to evolve
max_step = 10000 # Max number of time steps
steady_state = 0 # Steady-state solver?

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
@@ -14,7 +14,7 @@ incflo.cfl = 0.1 # CFL factor
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# INPUT AND OUTPUT #
#.......................................#
amr.plot_int = 2 # Steps between plot files
amr.plot_int = 5 # Steps between plot files
amr.check_int = 1000 # Steps between checkpoint files
amr.restart = "" # Checkpoint to restart from

@@ -29,12 +29,12 @@ incflo.mu = 1.e-3 # Dynamic viscosity coefficient
incflo.vof_advect_tracer= 1
incflo.mu_s = 1.0
incflo.ro_s = 1000.0
incflo.sigma = 0.
incflo.sigma = 10.

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# ADAPTIVE MESH REFINEMENT #
#.......................................#
amr.n_cell = 16 16 # Grid cells at coarsest AMRlevel
amr.n_cell = 32 32 # Grid cells at coarsest AMRlevel
amr.max_level = 0 # Max AMR level in hierarchy
amr.max_grid_size = 64 64

@@ -43,8 +43,8 @@ amr.max_grid_size = 64 64
#.......................................#
geometry.prob_lo = 0. 0. # Lo corner coordinates
geometry.prob_hi = 1. 1. # Hi corner coordinates
geometry.is_periodic = 1 1 # Periodicity x y z (0/1)

geometry.is_periodic = 0 0 # Periodicity x y z (0/1)
geometry.coord_sys = 1

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# INITIAL CONDITIONS #
@@ -54,14 +54,14 @@ incflo.ic_u = 0.
incflo.ic_v = 0.
incflo.ic_w = 0.
# Boundary conditions
#ylo.type = "po"
#ylo.pressure = 0.
#yhi.type = "po"
#yhi.pressure = 0.
#xlo.type = "po"
#xlo.pressure = 0.
#xhi.type = "po"
#xhi.pressure = 0.0
ylo.type = "po"
ylo.pressure = 0.
yhi.type = "po"
yhi.pressure = 0.
xlo.type = "po"
xlo.pressure = 0.
xhi.type = "po"
xhi.pressure = 0.0
#zlo.type = "po"
#zlo.pressure = 0.
#zhi.type = "po"
2 changes: 1 addition & 1 deletion test_3d/inputs.droplet
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
# SIMULATION STOP #
#.......................................#
stop_time = 6 # Max (simulated) time to evolve
max_step = 2000 # Max number of time steps
max_step = 20000 # Max number of time steps
steady_state = 0 # Steady-state solver?

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#