Skip to content

Commit

Permalink
Fix box refinement with restart (#1184)
Browse files Browse the repository at this point in the history
Description
Box refinement was applied when restarting simulations, changing the restarting triangulation and leading to undesirable behavior.

Solution
A boolean stating if the simulation restarts is now checked before applying the box refinement in box_refine_mesh(const bool &restart).

Testing
A new test simulate the lpbf benchmark case using the extra-extra-coarse mesh with restart and box refinement. Temperature statistics and mass conservation monitoring are the outputted metrics (to track both the change in HT and NS-VOF solvers).

Documentation
No documentation needs to be modify.

Former-commit-id: 64885a4
  • Loading branch information
hepap authored Jul 2, 2024
1 parent e658d3c commit f74bb45
Show file tree
Hide file tree
Showing 18 changed files with 872 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
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-02

### Fixed

- MINOR Box refinement was applied when restarting simulations, changing the restarting triangulation and leading to undesirable behavior. A boolean stating if the simulation restarts is now checked before applying the box refinement. [#1184](https://github.com/chaos-polymtl/lethe/pull/1184)

## [Master] - 2024-06-16

### Changed
Expand Down
78 changes: 78 additions & 0 deletions applications_tests/lethe-fluid/2d-benchmark.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
$MeshFormat
2.2 0 8
$EndMeshFormat

$Nodes
25
1 0 0 0
2 0.15 0 0
3 0.3 0 0
4 0.45 0 0
5 0.6 0 0
6 0 0.15 0
7 0.1499999999999999 0.15 0
8 0.2999999999999999 0.15 0
9 0.45 0.15 0
10 0.6 0.15 0
11 0 0.3 0
12 0.15 0.3 0
13 0.3 0.3000000000000001 0
14 0.45 0.3 0
15 0.6 0.3 0
16 0 0.45 0
17 0.15 0.45 0
18 0.3 0.45 0
19 0.45 0.45 0
20 0.6 0.45 0
21 0 0.6 0
22 0.15 0.6 0
23 0.3 0.6 0
24 0.45 0.6 0
25 0.6 0.6 0
$EndNodes

$Elements
32
1 3 2 1 1 1 2 7 6
2 3 2 1 1 2 3 8 7
3 3 2 1 1 3 4 9 8
4 3 2 1 1 4 5 10 9
5 3 2 1 1 6 7 12 11
6 3 2 1 1 7 8 13 12
7 3 2 1 1 8 9 14 13
8 3 2 1 1 9 10 15 14
9 3 2 1 1 11 12 17 16
10 3 2 1 1 12 13 18 17
11 3 2 1 1 13 14 19 18
12 3 2 1 1 14 15 20 19
13 3 2 1 1 16 17 22 21
14 3 2 1 1 17 18 23 22
15 3 2 1 1 18 19 24 23
16 3 2 1 1 19 20 25 24
17 1 2 2 2 1 2
18 1 2 2 2 2 3
19 1 2 2 2 3 4
20 1 2 2 2 4 5
21 1 2 3 3 16 11
22 1 2 3 3 11 6
23 1 2 3 3 6 1
24 1 2 4 4 21 16
25 1 2 5 5 5 10
26 1 2 5 5 10 15
27 1 2 5 5 15 20
28 1 2 6 6 20 25
29 1 2 7 7 25 24
30 1 2 7 7 24 23
31 1 2 7 7 23 22
32 1 2 7 7 22 21
$EndElements

$PhysicalNames
6
1 2 "bottom"
1 3 "left_bottom"
1 4 "left_top"
1 5 "right_bottom"
1 6 "right_top"
1 7 "top"
$EndPhysicalNames
9 changes: 9 additions & 0 deletions applications_tests/lethe-fluid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +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 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 @@ -53,6 +54,14 @@ 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_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/")
file(COPY heat_transfer_vof_lpbf_benchmark_box_ref_restart_files/restart.triangulation.info 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_fixed.data 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/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
Loading

0 comments on commit f74bb45

Please sign in to comment.