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

Inlet Dirichlet boundary condition for tracer #1284

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

oguevremont
Copy link
Collaborator

@oguevremont oguevremont commented Sep 17, 2024

Description

For some simulations, imposing Dirichlet conditions made the linear systems too stiff. We can now impose weakly boundary conditions at inlets using the velocity times Dirichlet value as a flux, in a Neumann approach.

Testing

An application test is added.

Documentation

The new type of boundary condition is added to the documentation.

Miscellaneous (will be removed when merged)

Checklist (will be removed when merged)

See this page for more information about the pull request process.

Code related list:

  • All in-code documentation related to this PR is up to date (Doxygen format)
  • Lethe documentation is up to date
  • New feature has unit test(s) (preferred) or application test(s), and restart files are in the generator folder
  • The branch is rebased onto master
  • Changelog (CHANGELOG.md) is up to date
  • Code is indented with indent-all and .prm files (examples and tests) with prm-indent

Pull request related list:

  • Labels are applied
  • There are at least 2 reviewers (or 1 if small feature) excluding the responsible for the merge
  • If this PR closes an issue or is related to a project, it is linked in the "Projects" or "Development" section
  • If the fix is temporary, an issue is opened
  • The PR description is cleaned and ready for merge

@oguevremont oguevremont added the WIP When a PR is open but not ready for review label Sep 18, 2024
@oguevremont oguevremont added Enhancement New feature or request Ready for review and removed WIP When a PR is open but not ready for review labels Sep 19, 2024
Copy link
Collaborator

@lpsaavedra lpsaavedra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First batch of comments, I will continue tomorrow

subsection fluid dynamics
set verbosity = quiet
set tolerance = 1e-12
set max iterations = 10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove this parameter since it uses the default value


* ``type``: This is the type of boundary condition being imposed.
* ``dirichlet``, to impose a given tracer value at the boundary,
* ``inlet dirichlet``, to impose the Dirichlet boundary condition weakly using a Neumann approach.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if inlet weak dirichlet would be more appropriate. Since in theory you can set a dirichlet one at the inlet as well...

@@ -691,8 +692,9 @@ namespace BoundaryConditions
class TracerBoundaryConditions : public BoundaryConditions<dim>
{
public:
std::vector<std::shared_ptr<Functions::ParsedFunction<dim>>> tracer;
std::vector<std::shared_ptr<Functions::ParsedFunction<dim>>> dirichlet;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be better to name this as:

Suggested change
std::vector<std::shared_ptr<Functions::ParsedFunction<dim>>> dirichlet;
std::vector<std::shared_ptr<Functions::ParsedFunction<dim>>> dirichlet_functions;

@@ -33,6 +35,10 @@ template <int dim>
class TracerAssemblerBase
{
public:
TracerAssemblerBase(std::shared_ptr<SimulationControl> p_simulation_control)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new parameter needs to be added to the brief of the function and shouldn't it be a const ref? I think it could be a const ref in all the assemblers

@@ -143,4 +154,51 @@ class TracerAssemblerBDF : public TracerAssemblerBase<dim>
};


/**
* @brief Class that assembles the inlet dirichlet boundary condition for the tracer solver.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief Class that assembles the inlet dirichlet boundary condition for the tracer solver.
* @brief Class that assembles weakly the inlet dirichlet boundary condition for the tracer solver.

Comment on lines +162 to +165
* @param simulation_control Shared pointer of the SimulationControl object
* controlling the current simulation
* @param p_boundary_conditions_tracer TracerBoundaryConditions object that hold
* boundary condition information for the Tracer solver
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add to the parameter brief [in], [out] or [in,out]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants