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

Fix issue with constraints in the VANS solver and update boycott #895

Merged
merged 8 commits into from
Oct 2, 2023
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
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] - 2023-09-30

### Fixed

- MINOR Affine constraints used to bound the void fraction and used as boundary conditions within the heat transfer and the block Navier-stokes solver were corrected [#885](https://github.com/lethe-cfd/lethe/pull/895): There was an error in the application of the affine constraints used to clip the void fraction in the lethe-fluid-vans and lethe-fluid-particles solvers. This led to assertions being thrown in debug. This has been corrected by reiniting the constraints with the appropriate size. For the heat transfer and the block Navier-stokes, the issue was that the constraints were never reinited with the correct size, so they contained ghosted elements. This was caught by a new assert introduced in 2023-09 within deal.II master.

## [Master] - 2023-09-20

### Deprecated
Expand Down Expand Up @@ -36,4 +42,4 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

### Fixed

- MAJOR/MINOR/PATCH Description (#PR).
- MAJOR/MINOR/PATCH Description (#PR).
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ subsection cfd-dem
set shear force = true
set pressure force = true
set drag model = difelice
set post processing = true
set coupling frequency = 250
set grad-div length scale = 0.005
set vans model = modelA
Expand Down
8 changes: 7 additions & 1 deletion source/fem-dem/gls_vans.cc
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,14 @@ GLSVANSSolver<dim>::update_solution_and_constraints()
system_rhs_void_fraction);

void_fraction_constraints.clear();

// reinitialize affine constraints
void_fraction_constraints.reinit(locally_relevant_dofs_voidfraction);

// Remake hanging node constraints
DoFTools::make_hanging_node_constraints(void_fraction_dof_handler,
void_fraction_constraints);
active_set.clear();
std::vector<bool> dof_touched(void_fraction_dof_handler.n_dofs(), false);

for (const auto &cell : void_fraction_dof_handler.active_cell_iterators())
{
Expand Down
4 changes: 4 additions & 0 deletions source/solvers/gd_navier_stokes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,8 @@ GDNavierStokesSolver<dim>::setup_dofs_fd()
auto &nonzero_constraints = this->nonzero_constraints;
{
nonzero_constraints.clear();
nonzero_constraints.reinit(locally_relevant_dofs_acquisition);


DoFTools::make_hanging_node_constraints(this->dof_handler,
nonzero_constraints);
Expand Down Expand Up @@ -627,6 +629,8 @@ GDNavierStokesSolver<dim>::setup_dofs_fd()

{
this->zero_constraints.clear();
this->zero_constraints.reinit(locally_relevant_dofs_acquisition);

DoFTools::make_hanging_node_constraints(this->dof_handler,
this->zero_constraints);

Expand Down
2 changes: 2 additions & 0 deletions source/solvers/heat_transfer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@ HeatTransfer<dim>::setup_dofs()

{
nonzero_constraints.clear();
nonzero_constraints.reinit(this->locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(this->dof_handler,
nonzero_constraints);

Expand All @@ -1043,6 +1044,7 @@ HeatTransfer<dim>::setup_dofs()
// Boundary conditions for Newton correction
{
zero_constraints.clear();
zero_constraints.reinit(this->locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(this->dof_handler,
zero_constraints);

Expand Down
Loading