Skip to content

Commit

Permalink
Fix NS-VOF stong residual formulation (#1180)
Browse files Browse the repository at this point in the history
Description
The term associated with the viscosity jump in the strong residual for the NS-VOF assembler added in PR Add missing VOF term in the strong form of the residual #1149 led to a ill-posed formulation in phase change cases where the solid is represented by a highly viscous fluid. Hence, we don't consider this term in the current formulation.
There was no appropriate application test for lpbf/phase change with vof cases that could have allowed us to identify this ill-posed formulation prior to the merge of PR Add missing VOF term in the strong form of the residual #1149.
The LPBF benchmark example prm files were almost up to date, but did not exactly matched the one we used to generate the benchmark results. The mesh files were missing from the repo.

Solution
This PR removes the term associated with the viscosity jump.
A new test is now included to avoid future mistake in lpbf/phase change with vof cases.
LPBF benchmark example prm files were modified and are now up to date with the current working version. The mesh files are now available in the repo.

Testing
The new test simulate the lpbf benchmark case using the extra-extra-coarse mesh. Temperature statistics and mass conservation monitoring are the outputted metrics (to track both the change in HT and NS-VOF solvers).
Other NS-VOF tests were updated, and results for those tests returned to their previous values (or almost with small differences).
Documentation
No modification in the documentation.

Co-authored-by: Amishga Alphonius <amishga1999@gmail.com>
  • Loading branch information
hepap and AmishgaAlphonius authored Jul 4, 2024
1 parent 64885a4 commit b1ec9c1
Show file tree
Hide file tree
Showing 37 changed files with 1,902 additions and 644 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
All notable changes to the Lethe project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [Master] - 2024-07-03

### Fixed

- MINOR The term associated with the viscosity jump in the strong residual for the NS-VOF assembler added in [#1049] (https://github.com/chaos-polymtl/lethe/pull/1149) led to an ill-posed formulation in solid-liquid phase change cases where the solid is represented by a highly viscous fluid. Hence, this term was removed from the current formulation. [#1180](https://github.com/chaos-polymtl/lethe/pull/1180)

### Changed

- MINOR LPBF benchmark example prm files are up to date with the current working version. [#1180](https://github.com/chaos-polymtl/lethe/pull/1180)

### Added

- MINOR There was no appropriate application test for lpbf/phase change with vof cases that could have allowed us to identify this ill-posed formulation prior to the merge of [#1049] (https://github.com/chaos-polymtl/lethe/pull/1149). A new application test is now included to avoid future mistake in lpbf/phase change with vof cases. [#1180](https://github.com/chaos-polymtl/lethe/pull/1180)

## [Master] - 2024-07-02

### Fixed
Expand Down
12 changes: 11 additions & 1 deletion applications_tests/lethe-fluid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ file(COPY cylinder_structured.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(COPY taylorCouette.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(COPY box.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(COPY cylinder_manifold.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(COPY 2d-benchmark.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(COPY lpbf_benchmark_mesh.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")

file(COPY cavity_ht_average_velocity_restart_files/restart.averagevelocities DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/cavity_ht_average_velocity_restart.${_build_type}/mpirun=1/")
file(COPY cavity_ht_average_velocity_restart_files/restart.pvdhandler DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/cavity_ht_average_velocity_restart.${_build_type}/mpirun=1/")
Expand Down Expand Up @@ -54,6 +54,15 @@ file(COPY poiseuille_restart_files/poiseuille_restart.triangulation DESTINATION
file(COPY poiseuille_restart_files/poiseuille_restart.triangulation_fixed.data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/poiseuille_restart.${_build_type}/mpirun=1/")
file(COPY poiseuille_restart_files/poiseuille_restart.triangulation.info DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/poiseuille_restart.${_build_type}/mpirun=1/")

file(COPY heat_transfer_vof_lpbf_benchmark_restart_files/restart.pvdhandler DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark.${_build_type}/mpirun=1/")
file(COPY heat_transfer_vof_lpbf_benchmark_restart_files/restart.simulationcontrol DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark.${_build_type}/mpirun=1/")
file(COPY heat_transfer_vof_lpbf_benchmark_restart_files/restart.triangulation DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark.${_build_type}/mpirun=1/")
file(COPY heat_transfer_vof_lpbf_benchmark_restart_files/restart.triangulation.info DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark.${_build_type}/mpirun=1/")
file(COPY heat_transfer_vof_lpbf_benchmark_restart_files/restart.triangulation_fixed.data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark.${_build_type}/mpirun=1/")
file(COPY heat_transfer_vof_lpbf_benchmark_restart_files/mass_conservation_information.checkpoint DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark.${_build_type}/mpirun=1/")
file(COPY heat_transfer_vof_lpbf_benchmark_restart_files/temperature_statistics.checkpoint DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark.${_build_type}/mpirun=1/")


file(COPY heat_transfer_vof_lpbf_benchmark_box_ref_restart_files/restart.pvdhandler DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark_box_ref.${_build_type}/mpirun=1/")
file(COPY heat_transfer_vof_lpbf_benchmark_box_ref_restart_files/restart.simulationcontrol DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark_box_ref.${_build_type}/mpirun=1/")
file(COPY heat_transfer_vof_lpbf_benchmark_box_ref_restart_files/restart.triangulation DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark_box_ref.${_build_type}/mpirun=1/")
Expand All @@ -62,6 +71,7 @@ file(COPY heat_transfer_vof_lpbf_benchmark_box_ref_restart_files/restart.triangu
file(COPY heat_transfer_vof_lpbf_benchmark_box_ref_restart_files/mass_conservation_information.checkpoint DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark_box_ref.${_build_type}/mpirun=1/")
file(COPY heat_transfer_vof_lpbf_benchmark_box_ref_restart_files/temperature_statistics.checkpoint DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/heat_transfer_vof_lpbf_benchmark_box_ref.${_build_type}/mpirun=1/")


deal_ii_pickup_tests()

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Transient iteration: 1 Time: 0.005 Time step: 0.005 CFL: 0
*******************************************************************************

**********************************************************************************
Transient iteration: 2 Time: 0.01 Time step: 0.005 CFL: 0.000154982
Transient iteration: 2 Time: 0.01 Time step: 0.005 CFL: 0.000156733
**********************************************************************************
time error_velocity error_pressure
0.0050 5.541123e-04 0.7724
0.0100 1.006963e-03 0.7736
0.0050 5.594553e-04 0.7722
0.0100 1.016885e-03 0.7734
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ subsection mesh
set type = gmsh

# GMSH file name
set file name = ../2d-benchmark.msh
set file name = ../lpbf_benchmark_mesh.msh

# Initial refinement of the mesh
set initial refinement = 2
Expand Down
Loading

0 comments on commit b1ec9c1

Please sign in to comment.