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

Implement temperature-dependant solid domain contraints in VOF #1048

Merged
merged 5 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ Total pressure drop: 0 Pa
*******************************************************************************
Transient iteration: 1 Time: 0.1 Time step: 0.1 CFL: 0
*******************************************************************************
Pressure drop: -0.428441 Pa
Total pressure drop: -0.428441 Pa
Pressure drop: -0.42844 Pa
Total pressure drop: -0.42844 Pa

*********************************************************************************
Transient iteration: 2 Time: 0.2 Time step: 0.1 CFL: 0.00696672
Transient iteration: 2 Time: 0.2 Time step: 0.1 CFL: 0.00658308
*********************************************************************************
Pressure drop: -0.428568 Pa
Total pressure drop: -0.428568 Pa
Pressure drop: -0.428532 Pa
Total pressure drop: -0.428532 Pa

*********************************************************************************
Transient iteration: 3 Time: 0.3 Time step: 0.1 CFL: 0.00348477
Transient iteration: 3 Time: 0.3 Time step: 0.1 CFL: 0.00319593
*********************************************************************************
Pressure drop: -0.428503 Pa
Total pressure drop: -0.428503 Pa
Pressure drop: -0.428499 Pa
Total pressure drop: -0.428499 Pa

*********************************************************************************
Transient iteration: 4 Time: 0.4 Time step: 0.1 CFL: 0.00315781
Transient iteration: 4 Time: 0.4 Time step: 0.1 CFL: 0.00307199
*********************************************************************************
Pressure drop: -0.428565 Pa
Total pressure drop: -0.428565 Pa
Pressure drop: -0.42855 Pa
Total pressure drop: -0.42855 Pa
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ subsection boundary conditions heat transfer
end

#---------------------------------------------------
# Constrain Solid Domain
# Constrain Stasis
#---------------------------------------------------

subsection constrain solid domain
subsection constrain stasis
set enable = true
set number of constraints = 1
subsection constraint 0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Running on 1 MPI rank(s)...
Number of active cells: 256
Number of degrees of freedom: 867
Volume of triangulation: 0.0625
Number of thermal degrees of freedom: 289
Number of VOF degrees of freedom: 289
Pressure drop: 0 Pa
Total pressure drop: 0 Pa

---------------
VOF Barycenter
---------------
time x_vof y_vof vx_vof vy_vof
0.000000 0.125000 0.058681 0.000000 0.000000

*******************************************************************************
Transient iteration: 1 Time: 0.1 Time step: 0.1 CFL: 0
*******************************************************************************
Pressure drop: -0.367464 Pa
Total pressure drop: -0.367464 Pa

---------------
VOF Barycenter
---------------
time x_vof y_vof vx_vof vy_vof
0.100000 0.125000 0.058681 0.000004 -0.000023

*********************************************************************************
Transient iteration: 2 Time: 0.2 Time step: 0.1 CFL: 0.00485702
*********************************************************************************
Pressure drop: -0.367538 Pa
Total pressure drop: -0.367538 Pa

---------------
VOF Barycenter
---------------
time x_vof y_vof vx_vof vy_vof
0.200000 0.124998 0.058682 0.000001 0.000006

*********************************************************************************
Transient iteration: 3 Time: 0.3 Time step: 0.1 CFL: 0.00241665
*********************************************************************************
Pressure drop: -0.367861 Pa
Total pressure drop: -0.367861 Pa

---------------
VOF Barycenter
---------------
time x_vof y_vof vx_vof vy_vof
0.300000 0.124996 0.058684 0.000004 0.000023

*********************************************************************************
Transient iteration: 4 Time: 0.4 Time step: 0.1 CFL: 0.00157289
*********************************************************************************
Pressure drop: -0.367981 Pa
Total pressure drop: -0.367981 Pa

---------------
VOF Barycenter
---------------
time x_vof y_vof vx_vof vy_vof
0.400000 0.124992 0.058686 0.000005 0.000023
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
# Listing of Parameters
#----------------------

set dimension = 2

#---------------------------------------------------
# Simulation Control
#---------------------------------------------------

subsection simulation control
set method = bdf1
set time end = 0.4
set time step = 0.1
set output frequency = 0
end

#---------------------------------------------------
# Multiphysics
#---------------------------------------------------

subsection multiphysics
set heat transfer = true
set fluid dynamics = true
set VOF = true
end

#---------------------------------------------------
# Initial condition
#---------------------------------------------------

subsection initial conditions
subsection temperature
set Function expression = (40-25)*(0.25-x)*4+25
end
subsection VOF
set Function expression = if(y>=0.125, 0, 1)
end
end

#---------------------------------------------------
# Source term
#---------------------------------------------------

subsection source term
subsection xyz
set Function expression = 5 ; 0 ; 0
end
end

#---------------------------------------------------
# Physical Properties
#---------------------------------------------------

subsection physical properties
set number of fluids = 2
set reference temperature = 30
subsection fluid 0
set thermal conductivity = 0.5
set thermal expansion model = phase_change
set rheological model = phase_change
set specific heat model = phase_change
subsection phase change
set latent enthalpy = 200
set liquidus temperature = 30
set solidus temperature = 29.8
set viscosity liquid = 0.0001
set viscosity solid = 10
end
end
subsection fluid 1
set thermal conductivity = 0.5
set thermal expansion model = phase_change
set rheological model = phase_change
set specific heat model = phase_change
subsection phase change
set latent enthalpy = 200
set liquidus temperature = 35
set solidus temperature = 34.8
set viscosity liquid = 0.0001
set viscosity solid = 10
end
end
end

#---------------------------------------------------
# Mesh
#---------------------------------------------------

subsection mesh
set type = dealii
set grid type = hyper_cube
set grid arguments = 0 : 0.25 : true
set initial refinement = 4
end

#---------------------------------------------------
# Boundary Conditions
#---------------------------------------------------

subsection boundary conditions
set number = 4
subsection bc 0
set id = 0
set type = noslip
end
subsection bc 1
set id = 1
set type = noslip
end
subsection bc 2
set id = 2
set type = noslip
end
subsection bc 3
set id = 3
set type = noslip
end
end

subsection boundary conditions heat transfer
set number = 2
subsection bc 0
set id = 0
set type = temperature
subsection value
set Function expression = 40
end
end
subsection bc 1
set id = 1
set type = temperature
subsection value
set Function expression = 25
end
end
end

#---------------------------------------------------
# Constrain Stasis
#---------------------------------------------------

subsection constrain stasis
set enable = true
set number of constraints = 2
subsection constraint 0
set fluid id = 0
set phase fraction tolerance = 1e-4
set min temperature = 0
set max temperature = 29
end
subsection constraint 1
set fluid id = 1
set phase fraction tolerance = 1e-4
set min temperature = 0
set max temperature = 34
end
end

#---------------------------------------------------
# Post-processing
#---------------------------------------------------

subsection post-processing
set verbosity = verbose
set calculate pressure drop = true
set calculate mass conservation = false
AmishgaAlphonius marked this conversation as resolved.
Show resolved Hide resolved
set calculate barycenter = true
end

#---------------------------------------------------
# Non-Linear Solver Control
#---------------------------------------------------

subsection non-linear solver
subsection fluid dynamics
set tolerance = 1e-4
set max iterations = 5
set verbosity = quiet
end
subsection heat transfer
set tolerance = 1e-3
set max iterations = 20
set verbosity = quiet
end
subsection VOF
set tolerance = 1e-9
set max iterations = 20
set verbosity = quiet
end
end

#---------------------------------------------------
# Linear Solver Control
#---------------------------------------------------

subsection linear solver
subsection fluid dynamics
set verbosity = quiet
set method = gmres
set max iters = 1000
set relative residual = 1e-3
set minimum residual = 1e-5
set preconditioner = ilu
set ilu preconditioner fill = 0
set ilu preconditioner absolute tolerance = 1e-12
set ilu preconditioner relative tolerance = 1.00
set max krylov vectors = 1000
end
subsection heat transfer
set verbosity = quiet
set method = gmres
set max iters = 1000
set relative residual = 1e-3
set minimum residual = 1e-5
set preconditioner = ilu
set ilu preconditioner fill = 0
set ilu preconditioner absolute tolerance = 1e-12
set ilu preconditioner relative tolerance = 1.00
end
subsection VOF
set verbosity = quiet
set method = gmres
set max iters = 1000
set relative residual = 1e-3
set minimum residual = 1e-10
set preconditioner = ilu
set ilu preconditioner fill = 0
set ilu preconditioner absolute tolerance = 1e-12
set ilu preconditioner relative tolerance = 1.00
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The rotating Lagrangian frame of reference is non-Galilean. Consequently, the Co
\nabla \cdot \mathbf{u} &= 0 \\
\frac{\partial \mathbf{u}}{\partial t} + \mathbf{u} \cdot \nabla \mathbf{u} &= -\frac{1}{\rho} \nabla p + \nu \nabla^2 \mathbf{u} +\mathbf{f} - \underbrace{\Omega \times \mathbf{u}}_{Coriolis} - \underbrace{\Omega \times (\mathbf{q} \times \mathbf{u})}_{Centrifugal}

where :math:`\mathbf{q}` is the position in the fluid with respect to the center of rotation and :math:`\mathbf{\Omega}` is the angular velocity of the rotating reference frame. The Coriolis force adds a velocity dependant force to the Navier-Stokes equations whereas the centrifugal forces is independent of the flow and only modifies the pressure field.
where :math:`\mathbf{q}` is the position in the fluid with respect to the center of rotation and :math:`\mathbf{\Omega}` is the angular velocity of the rotating reference frame. The Coriolis force adds a velocity dependent force to the Navier-Stokes equations whereas the centrifugal forces is independent of the flow and only modifies the pressure field.

In this example, we will start by simulating the case when :math:`Re = 1` and then follow with simulations for :math:`Re` values ranging from :math:`0.1` to :math:`100` to generate :math:`N_p` vs :math:`Re` curves.

Expand Down
Loading
Loading