Skip to content

Commit

Permalink
Make stasis constraint compatible with restart and adaptive mesh refi… (
Browse files Browse the repository at this point in the history
chaos-polymtl#1072)

Description of the problem
The recently implemented vof stasis constraint (Implement temperature-dependant solid domain contraints in VOF chaos-polymtl#1048) was not compatible with adaptive mesh refinements and checkpointing system. When refining the mesh or when restarting a simulation, the filtered phase fraction was reinitialized, but not filled with the appropriate values.

Description of the solution
The apply_phase_filter() function was added to post_mesh_adaptation() and read_checkpoint() functions.

How Has This Been Tested?
The stasis constraint was tested using the 2D LPBF benchmark :
with restart and mesh adaptation;
without restart and with mesh adaptation, and;
with restart and without mesh adaptation.

Former-commit-id: bb7cea3
  • Loading branch information
AmishgaAlphonius authored Mar 18, 2024
1 parent 1709f69 commit 9054614
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 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-03-16

### Fixed

- MINOR The recently implemented VOF stasis constraint ([#1048](https://github.com/lethe-cfd/lethe/pull/1048)) was not compatible with adaptive mesh refinements and checkpointing system. When refining the mesh or when restarting a simulation, the filtered phase fraction was reinitialized, but not filled with the appropriate values. This issue is now solved by adding `apply_phase_filter()` to `post_mesh_adaptation()` and `read_checkpoint()` VOF functions. [#1072](https://github.com/lethe-cfd/lethe/pull/1072)

## [Master] - 2024-03-13

### Changed
Expand All @@ -19,7 +25,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [Master] - 2024-03-11

## Changed
### Changed

- MINOR The eigenvalue estimation for the multigrid preconditioners in the lethe-fluid-matrix-free solver is now done internally by the PreconditionRelaxation class instead of using a PreconditionChebyshev and an estimate omega function [#1064](https://github.com/lethe-cfd/lethe/pull/1064).

Expand Down
6 changes: 6 additions & 0 deletions source/solvers/vof.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1842,6 +1842,9 @@ VolumeOfFluid<dim>::post_mesh_adaptation()
this->previous_solutions[i] = tmp_previous_solution;
}

// Apply filter to phase fraction
apply_phase_filter();

// PFG and curvature
if (this->simulation_parameters.multiphysics.vof_parameters
.surface_tension_force.enable)
Expand Down Expand Up @@ -1946,6 +1949,9 @@ VolumeOfFluid<dim>::read_checkpoint()
this->previous_solutions[i] = distributed_previous_solutions[i];
}

// Apply filter to phase fraction
apply_phase_filter();

// Deserialize tables
const std::string prefix =
this->simulation_parameters.simulation_control.output_folder;
Expand Down

0 comments on commit 9054614

Please sign in to comment.