Skip to content

Dam break VOF

Shahab Golshan edited this page Dec 20, 2021 · 25 revisions

VOF simulation of dam break: A liquid is fixed at an initial rectangular domain. At t = 0 s, the dam is removed and the liquid is released into the total simulation domain. The corresponding parameter file is gls_VOF_dam-break_Martin_and_Moyce.prm.

The following schematic describes the simulation.

  • bc = 0 : no slip and thermal insulation boundary condition
  • bc = 1 : flow in the y-direction (v=2) and heating at Tw

⚠️ The whole simulation is carried out in the frame of one-way coupling: the fluid velocity influences the heat generated - through viscous dissipation -, but the heat transfer does not influence the fluid velocity. Moreover, fluid state changes are not considered.

Parameter file

Time integration is defined by a 2nd order backward differentiation (bdf2), for a 7.0 seconds simulation (time end) with a 0.05 second time step, as stated in the subsection simulation control:


# --------------------------------------------------
# Simulation Control
#---------------------------------------------------
subsection simulation control
  set method                  = bdf2
  set time step               = 0.05
  set time end                = 7.0     
  set output name             = warming-up
  set output frequency        = 1       
end

💡 heat transfer phenomenon occur at a much larger characteristic time than fluid transport phenomenon. To reach a stable state for the system, the end time much be quite big, but the time step can also be increased (in the limit of numerical convergence).

The order of resolution for the velocity, pressure and temperature are given in the subsection FEM:


#---------------------------------------------------
# FEM
#---------------------------------------------------
subsection FEM
    set velocity order        = 1
    set pressure order        = 1
    set temperature order     = 2
end

The fluid's physical properties are defined in the following subsection, according to the properties of oil.


#---------------------------------------------------
# Physical Properties
#---------------------------------------------------
subsection physical properties
  set density              = 0.9
  set kinematic viscosity    = 0.5
  set thermal conductivity = 0.12
# water = 1 density, 0.01 viscosity, 0.59 conductivity
# oil = 0.9 density, 0.5 viscosity, 0.12 conductivity
end

⚠️ If no physical properties are defined, default values (of 1.0) are taken for the simulation.

The mesh considered is a very basic rectangle, using the dealii grid type hyper_rectangle, represented the fluid volume considered between the two plates. Here, the width between the two plates is set to 0,5.


#---------------------------------------------------
# Mesh
#---------------------------------------------------
subsection mesh
  set type = dealii
  set grid type = hyper_rectangle
  set grid arguments = 0, 0 : 0.5, 1 : true
  set initial refinement = 4
end

💡 As the fluid velocity is not influences by heat transfer (one-way coupling), the fluid velocity will remain constant for the whole simulation across the domain, and as heat transfer occurs at a larger scale, the mesh can be coarse.

The multiphysics subsection enable to turn on (true) and off (false) the physics of interest. Here heat transfer and viscous dissipation must be set (see Bonuses for results without viscous dissipation).


#---------------------------------------------------
# Multiphysics
#---------------------------------------------------
subsection multiphysics
  set heat transfer = true
  set viscous dissipation = true
end

The analytical solution is defined, according to the fluid and simulation properties:

T(x)=T_w+\frac{\rho\nu v^2}{2K}\left(1-\left(\frac{x}{B}\right)^2\right)

with x the axis perpendicular to the plates, rho the density, nu the kinematic viscosity, K the thermal conductivity, Tw the heating temperature and v the velocity of the right plate (bc 1), and B is the width between the two plates.


# --------------------------------------------------
# Analytical Solution
#---------------------------------------------------
subsection analytical solution
  set enable                 = true
  set verbosity = verbose
    subsection uvwp
            set Function expression =  0 ; 0 ; 0
    end
    subsection temperature
	  set Function constants = rho=0.9, nu=0.5, K=0.12, Tw=80, v=2, B=0.5
          set Function expression = Tw+(((rho*nu)*v*v)/(2*K))*(1-(x/B)*(x/B))
    end
end

The boundary conditions are set for:

  • the fluid dynamic in subsection boundary conditions, with noslip at the left wall (bc 0) and a velocity of 2 in the y-direction at the right wall (bc 1),
  • the heat transfer in subsection boundary conditions heat transfer, with a convection imposed at the left wall (bc 0) with a heat transfer coefficient h = 0 to represent an insulation condition, and an imposed temperature of 80 at the right wall.

# --------------------------------------------------
# Boundary Conditions
#---------------------------------------------------
subsection boundary conditions
  set number                  = 2
    subsection bc 0
    set id = 0
        set type              = noslip
    end
    subsection bc 1
    set id = 1
        set type              = function
        subsection u
            set Function expression = 0
        end
        subsection v
            set Function expression = 2
        end
    end
end

subsection boundary conditions heat transfer
  set number                  = 2
    subsection bc 0
    set id = 0
        set type          = convection
	set h             = 0
	set Tinf	  = 0
    end
    subsection bc 1
    set id = 1
        set type              = temperature
	set value             = 80
    end
end

The simulation is launched in the same folder as the .prm file, using the gls_navier_stokes_2d solver. It takes only about 5 seconds with one cpu:

../../exe/bin/gls_navier_stokes_2d warming_up_viscous_fluid.prm

Results

Visualizations

Convergence with regards to the analytical solution on the temperature:

Domain with temperature:

Temperature evolution over time:

Physical interpretation

From t=0s to t=2s, the right plate (T=80C) heats up the fluid (initially at T=0C). At t=2s, the temperature is quasi-homogeneous in the fluid, with T=80C. As the fluid continues to be forced to flow at the right wall, viscous dissipation generates more heat, so that the wall with a fixed temperature of T=80C now cools down the fluid. A steady state between viscous dissipation heating and the fixed temperature cooling is reached at about t=4.5s.

Bonuses

Results for water

For water, physical properties are:


#---------------------------------------------------
# Physical Properties
#---------------------------------------------------
subsection physical properties
  set density              = 1
  set kinematic viscosity    = 0.01
  set thermal conductivity = 0.59
# water = 1 density, 0.01 viscosity, 0.59 conductivity
# oil = 0.9 density, 0.5 viscosity, 0.12 conductivity
end

As water has a higher thermal conductivity than oil, the temperature becomes quasi-homogeneous sooner (around t=1s). And as it is far less viscous, the heat generated by viscous dissipation is not visible on the temperature-over-time plot. However it still exists, as seen when the temperature scale is adapted.

Results without viscous dissipation

The viscous dissipation can be disabled physically, if the two plates remain fixed (v=0 for bc 1), or numerically with set viscous dissipation = false. Both cases give the same results shown below. The fluid considered is still water.

After the fluid has been heated up by the right plate, the temperature is really homogeneous throughout the domain, and both minimum and maximum temperatures stay at Tw=80C. Adapting the temperature scale shows that there is no viscous dissipation at all.

Clone this wiki locally