version 0.6.0
Loading...
Searching...
No Matches

Volume-of-Fluid method using Piecewise Linear Interface Construction of the interface and lagrangien advection. More...

Functions

subroutine mod_vof2d::vof2d (volume_fraction, vof_bc, time_step, velocity)
 Compute 2D VOF-PLIC.
 
subroutine mod_vof2d_compute_normal::vof2d_compute_normal (volume_fraction, celli, cellj, normalx, normaly)
 Compute the interface normal in a given cell.
 
subroutine mod_vof2d_compute_radius::vof2d_compute_radius (normalx, normaly, cx, cy, vof, vof_case, radius)
 Compute radius in reference configuration.
 
subroutine mod_vof2d_compute_volume::vof2d_compute_volume (normalx, normaly, radius, cx, cy, vof_case, volume)
 Compute the volume of fluid in a given cell.
 
subroutine mod_vof2d_conservative::vof2d_conservative (volume_fraction, vof_bc, time_step, velocity)
 Compute 2D VOF-PLIC.
 
subroutine mod_vof2d_get_reference::vof2d_get_reference (normalx, normaly, cx, cy, vof, vof_case)
 Transform the normal and the cell into the reference configuration.
 
subroutine mod_vof3d::vof3d (volume_fraction, vof_bc, time_step, velocity)
 Compute 3D VOF-PLIC.
 
subroutine mod_vof3d_compute_normal::vof3d_compute_normal (volume_fraction, celli, cellj, cellk, normalx, normaly, normalz)
 Compute the interface normal in a given cell.
 
subroutine mod_vof3d_compute_radius::vof3d_compute_radius (normalx, normaly, normalz, cx, cy, cz, vof, vof_case, radius)
 Compute radius in reference configuration.
 
subroutine mod_vof3d_compute_volume::vof3d_compute_volume (normalx, normaly, normalz, radius, cx, cy, cz, radius_case, vof_case, volume)
 Compute the volume of fluid in a given cell.
 
subroutine mod_vof3d_conservative::vof3d_conservative (volume_fraction, vof_bc, time_step, velocity)
 Compute 3D VOF-PLIC.
 
subroutine mod_vof3d_get_reference::vof3d_get_reference (normalx, normaly, normalz, cx, cy, cz, vof, radius_case, vof_case)
 Transform the normal and the cell into the reference configuration.
 
subroutine mod_vof3d_transform_radius::vof3d_transform_radius (normalx, normaly, normalz, cx, cy, cz, radius, radius_case)
 Transform the radius back to the normal configuration.
 
subroutine mod_vof_apply_boundary_conditions::vof_apply_boundary_conditions (volume_fraction, vof_bc)
 Apply boundary conditions for 2D/3D VOF-PLIC.
 
subroutine, public mod_vof_cfl::vof_cfl (volume_fraction, velocity, phase_advection_time_step, nb_time_step, time_step, nb_substeps)
 Compute time step that fulfill the CFL for 2D/3D VOF PLIC non fully conservative algorithm.
 
subroutine, public mod_vof_cfl::conservative_vof_cfl (volume_fraction, velocity, phase_advection_time_step, nb_time_step, time_step, nb_substeps)
 Compute time step that fulfill the CFL for 2D/3D VOF PLIC fully conservative algorithm (Weymouth).
 
subroutine mod_solve_vof_plic::solve_vof_plic (volume_fraction, boundary_condition, time_step_n, time_step_np1, velocity_nm1, velocity_n, velocity_np1, dt)
 VOF-PLIC time loop.
 

Detailed Description

Two VOF-PLIC methods are proposed ([1] and [2]).

Bibliography

[1] G.D. Weymouth, Dick K.-P. Yue *, Conservative Volume-of-Fluid method for free-surface simulations on Cartesian-grids, Journal of Computational Physics 229 (2010) 2853–2865

[2] Jérôme Breil, Modélisation du remplissage en propergol de moteur à propulsion solide, tel-01478691, https://tel.archives-ouvertes.fr/tel-01478691

Function Documentation

◆ conservative_vof_cfl()

subroutine, public mod_vof_cfl::conservative_vof_cfl ( double precision, dimension(nx,ny,nz), intent(in) volume_fraction,
type(t_face_field), intent(in) velocity,
double precision, intent(in) phase_advection_time_step,
integer, intent(out) nb_time_step,
double precision, intent(out) time_step,
integer, intent(in) nb_substeps )

This routine computes the number of secondary time steps required to make a single advection time step phase_advection_time_step that satisfy the CFL.

Parameters
[in]volume_fractionvolume fraction.
[in]velocityvelocity vector components.
[in]phase_advection_time_steptime step associated to the advection equation
[out]nb_time_stepnumber of secondary time steps.
[out]time_steplength of secondary time steps.
[in]nb_substepsnumber of substeps

◆ solve_vof_plic()

subroutine mod_solve_vof_plic::solve_vof_plic ( double precision, dimension(:,:,:), intent(inout) volume_fraction,
type(t_boundary_condition), intent(in) boundary_condition,
double precision, intent(in) time_step_n,
double precision, intent(in) time_step_np1,
type(t_face_field), intent(in) velocity_nm1,
type(t_face_field), intent(in) velocity_n,
type(t_face_field), intent(in) velocity_np1,
double precision, intent(in) dt )
Parameters
[in,out]volume_fractionvolume fraction which values belong to [0,1].
[in]boundary_conditionboundary conditions.
[in]time_step_n\(\Delta t^{n} = t^{n} - t^{n-1}\)
[in]time_step_np1\(\Delta t^{n+1} = t^{n+1} - t^{n}\)
[in]velocity_nm1velocity at time \(t^{n-1}\)
[in]velocity_nvelocity at time \(t^{n}\)
[in]velocity_np1velocity at time \(t^{n+1}\)
[in]dtthe time step over which to integrate (might be different from time_step_np1 if needed)
Note
The temporal integration can be done in two different manners:
  • semi_implicit: the velocity field is taken at the end of the time step
  • crank_nicolson: the velocity field is taken at mid-point between the start and the end of the time step
Sub iterations can arise (under CFL condition) or be parameterized if wanted; the time step intervals are splitted evenly.

◆ vof2d()

subroutine mod_vof2d::vof2d ( double precision, dimension(nx,ny,nz), intent(inout) volume_fraction,
type(t_boundary_condition), intent(in) vof_bc,
double precision, intent(in) time_step,
type(t_face_field), intent(in) velocity )

The phase advection is split into advection along axis directions.

Pseudo algorithm of VOF-PLIC:

   !! For each axis direction
   !!   For each cells near the interface:
   !!     1- Compute the normal.
   !!     2- Transform the normal into the reference configuration.
   !!     3- Compute the radius in the reference configuration.
   !!     4- Transform the radius back to the real configuration.
   !!     5- Advect the normal and the radius.
   !!     6- Compute the volume entering the current cell.
   !!   End
   !! End
   !! 
Parameters
volume_fractionvolume fraction which values belong to [0,1].
[in]vof_bcboundary conditions.
[in]time_steptime step.
[in]velocityvelocity field.

◆ vof2d_compute_normal()

subroutine mod_vof2d_compute_normal::vof2d_compute_normal ( double precision, dimension(nx,ny,nz), intent(in) volume_fraction,
integer, intent(in) celli,
integer, intent(in) cellj,
double precision, intent(out) normalx,
double precision, intent(out) normaly )

Compute the interface normal in a given cell based on the gradient of the volume fraction.

Parameters
[in]volume_fractionvolume fraction of fluid.
[in]celli,celljcoordinates of the cell.
[out]normalx,normalynormal components.

◆ vof2d_compute_radius()

subroutine mod_vof2d_compute_radius::vof2d_compute_radius ( double precision, intent(in) normalx,
double precision, intent(in) normaly,
double precision, intent(in) cx,
double precision, intent(in) cy,
double precision, intent(in) vof,
integer, intent(in) vof_case,
double precision, intent(out) radius )

Compute radius using normal, cell dimension, volume fraction and VOF configuration.

Parameters
[in]normalx,normalynormal components.
[in]cx,cycell dimensions.
[in]vofvolume fraction.
[in]vof_caseVOF initial configuration.
[out]radiusradius.

◆ vof2d_compute_volume()

subroutine mod_vof2d_compute_volume::vof2d_compute_volume ( double precision, intent(in) normalx,
double precision, intent(in) normaly,
double precision, intent(in) radius,
double precision, intent(in) cx,
double precision, intent(in) cy,
integer, intent(in) vof_case,
double precision, intent(out) volume )

Compute the volume of fluid using normal direction, radius and cell dimension. The parameters must be in the real configuration.

Parameters
[in]normalx,normalynormal components.
[in]radiusradius.
[in]cx,cycell dimensions.
[in]vof_caseVOF initial configuration.
[out]volumevolume of fluid (not the volume fraction!).

◆ vof2d_conservative()

subroutine mod_vof2d_conservative::vof2d_conservative ( double precision, dimension(nx,ny,nz), intent(inout) volume_fraction,
type(t_boundary_condition), intent(in) vof_bc,
double precision, intent(in) time_step,
type(t_face_field), intent(in) velocity )

The phase advection is split into advection along axis directions.

Pseudo algorithm of VOF-PLIC:

   !! For each axis direction
   !!   For each cells near the interface:
   !!     1- Compute the normal.
   !!     2- Transform the normal into the reference configuration.
   !!     3- Compute the radius in the reference configuration.
   !!     4- Transform the radius back to the real configuration.
   !!     5- Advect the normal and the radius.
   !!     6- Compute the volume entering the current cell.
   !!   End
   !! End
   !! 
Parameters
volume_fractionvolume fraction which values belong to [0,1].
[in]vof_bcboundary conditions.
[in]time_steptime step.
[in]velocityvelocity field.

◆ vof2d_get_reference()

subroutine mod_vof2d_get_reference::vof2d_get_reference ( double precision, intent(inout) normalx,
double precision, intent(inout) normaly,
double precision, intent(inout) cx,
double precision, intent(inout) cy,
double precision, intent(inout) vof,
integer, intent(out) vof_case )

The reference configuration corresponds to the case 0 < normalx*cx <= normaly*cy where cx and cy are the cells dimensions.

The way the transformation is done is encoded in the vof_case variable. The value depends on the normal direction. Possible values for vof_case are:

   !!            5
   !!          _____
   !!      2  /     \  1
   !!        /       \
   !!    6  (         )  8
   !!        \       /
   !!      3  \_____/  4
   !!
   !!            7
   !! 

For instance (-0.707,0.707) belongs to the case 2.

For cases {3,6,7}, the dual volume is returned in vof.

Parameters
normalx,normalynormal components.
cx,cycell dimension.
vofvolume fraction.
[out]vof_caseVOF initial configuration.

◆ vof3d()

subroutine mod_vof3d::vof3d ( double precision, dimension(nx,ny,nz), intent(inout) volume_fraction,
type(t_boundary_condition), intent(in) vof_bc,
double precision, intent(in) time_step,
type(t_face_field), intent(in) velocity )

The phase advection is split into advection along axis directions.

Pseudo algorithm of VOF-PLIC:

   !! For each axis direction
   !!   For each cells near the interface:
   !!     1- Compute the normal.
   !!     2- Transform the normal into the reference configuration.
   !!     3- Compute the radius in the reference configuration.
   !!     4- Transform the radius back to the real configuration.
   !!     5- Advect the normal and the radius.
   !!     6- Compute the volume entering the current cell.
   !!   End
   !! End
   !! 
Parameters
[in,out]volume_fractionvolume fraction which values belong to [0,1].
[in]vof_bcboundary conditions.
[in]time_steptime step.
[in]velocityvelocity field.

◆ vof3d_compute_normal()

subroutine mod_vof3d_compute_normal::vof3d_compute_normal ( double precision, dimension(nx,ny,nz), intent(in) volume_fraction,
integer, intent(in) celli,
integer, intent(in) cellj,
integer, intent(in) cellk,
double precision, intent(out) normalx,
double precision, intent(out) normaly,
double precision, intent(out) normalz )

Compute the interface normal in a given cell based on the gradient of the volume fraction.

Parameters
[in]volume_fractionvolume fraction of fluid.
[in]celli,cellj,cellkcoordinates of the cell.
[out]normalx,normaly,normalznormal components.

◆ vof3d_compute_radius()

subroutine mod_vof3d_compute_radius::vof3d_compute_radius ( double precision, intent(in) normalx,
double precision, intent(in) normaly,
double precision, intent(in) normalz,
double precision, intent(in) cx,
double precision, intent(in) cy,
double precision, intent(in) cz,
double precision, intent(in) vof,
integer, intent(in) vof_case,
double precision, intent(out) radius )

Compute radius using normal, cell dimension, volume fraction and VOF configuration.

Parameters
[in]normalx,normaly,normalznormal components.
[in]cx,cy,czcell dimensions.
[in]vofvolume fraction.
[in]vof_caseVOF initial configuration.
[out]radiusradius.

◆ vof3d_compute_volume()

subroutine mod_vof3d_compute_volume::vof3d_compute_volume ( double precision, intent(in) normalx,
double precision, intent(in) normaly,
double precision, intent(in) normalz,
double precision, intent(in) radius,
double precision, intent(in) cx,
double precision, intent(in) cy,
double precision, intent(in) cz,
integer, intent(out) radius_case,
integer, intent(out) vof_case,
double precision, intent(out) volume )

Compute the volume of fluid using normal direction, radius and cell dimension. The parameters must be in the real configuration.

Parameters
[in]normalx,normaly,normalznormal components.
[in]radiusradius.
[in]cx,cy,czcell dimensions.
[out]radius_caseradius initial configuration.
[out]vof_caseVOF initial configuration.
[out]volumevolume of fluid (not the volume fraction!).

◆ vof3d_conservative()

subroutine mod_vof3d_conservative::vof3d_conservative ( double precision, dimension(nx,ny,nz), intent(inout) volume_fraction,
type(t_boundary_condition), intent(in) vof_bc,
double precision, intent(in) time_step,
type(t_face_field), intent(in) velocity )

The phase advection is split into advection along axis directions.

Pseudo algorithm of VOF-PLIC:

   !! For each axis direction
   !!   For each cells near the interface:
   !!     1- Compute the normal.
   !!     2- Transform the normal into the reference configuration.
   !!     3- Compute the radius in the reference configuration.
   !!     4- Transform the radius back to the real configuration.
   !!     5- Advect the normal and the radius.
   !!     6- Compute the volume entering the current cell.
   !!   End
   !! End
   !! 
Parameters
[in,out]volume_fractionvolume fraction which values belong to [0,1].
[in]vof_bcboundary conditions.
[in]time_steptime step.
[in]velocityvelocity field.

◆ vof3d_get_reference()

subroutine mod_vof3d_get_reference::vof3d_get_reference ( double precision, intent(inout) normalx,
double precision, intent(inout) normaly,
double precision, intent(inout) normalz,
double precision, intent(inout) cx,
double precision, intent(inout) cy,
double precision, intent(inout) cz,
double precision, intent(inout) vof,
integer, intent(out) radius_case,
integer, intent(out) vof_case )

The reference configuration corresponds to the case 0 < normalx*cx < normaly*cy < normalz*cz and normalx*cx + normaly*cy <= normalz*cz where cx, cy and cz are the cells dimensions.

The way the transformation is done is encoded in the vof_case variable. The value depends on the normal direction.

Parameters
normalx,normaly,normalznormal components.
cx,cy,czcell dimension.
vofvolume fraction.
[out]radius_caseradius initial configuration.
[out]vof_caseVOF initial configuration.

◆ vof3d_transform_radius()

subroutine mod_vof3d_transform_radius::vof3d_transform_radius ( double precision, intent(in) normalx,
double precision, intent(in) normaly,
double precision, intent(in) normalz,
double precision, intent(in) cx,
double precision, intent(in) cy,
double precision, intent(in) cz,
double precision, intent(inout) radius,
integer, intent(in) radius_case )
Parameters
[in]normalx,normaly,normalznormal components.
[in]cx,cy,czcell dimension.
[in,out]radiusvolume fraction.
[in]radius_caseradius initial configuration.

◆ vof_apply_boundary_conditions()

subroutine mod_vof_apply_boundary_conditions::vof_apply_boundary_conditions ( double precision, dimension(:,:,:), intent(inout) volume_fraction,
type(t_boundary_condition), intent(in) vof_bc )
Parameters
[in,out]volume_fractionvolume fraction.
[in]vof_bcboundary conditions.

◆ vof_cfl()

subroutine, public mod_vof_cfl::vof_cfl ( double precision, dimension(nx,ny,nz), intent(in) volume_fraction,
type(t_face_field), intent(in) velocity,
double precision, intent(in) phase_advection_time_step,
integer, intent(out) nb_time_step,
double precision, intent(out) time_step,
integer, intent(in) nb_substeps )

This routine computes the number of secondary time steps required to make a single advection time step phase_advection_time_step that satisfy the CFL.

Parameters
[in]volume_fractionvolume fraction.
[in]velocityvelocity vector components.
[in]phase_advection_time_steptime step associated to the advection equation
[out]nb_time_stepnumber of secondary time steps.
[out]time_steplength of secondary time steps.
[in]nb_substepsnumber of sub-steps.