Skip to content
Snippets Groups Projects

Fix/tracer velocity

Merged Simon Emmert requested to merge fix/tracer-velocity into master

What this MR does / why does DuMux need it: This MR introduces FluxTraits that for now only check if the AdvectionType is of the type stationary velocity field. If so the velocity calculation is adapted. This leads to correct velocity (output) for the tracer model e.g. It also changes the reference solution, but only for the velocity, as the new solution now shows the correct values at the inflow/outflow.

Which issue this MR fixes: fixes #782 (closed)

Special notes for your reviewer: Should be finished from my side. @timok I hope this is what you had in mind. Make sure to test with debug/assertions.

Edited by Simon Emmert

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Timo Koch
  • Timo Koch
  • Simon Emmert marked as a Work In Progress

    marked as a Work In Progress

  • Simon Emmert changed the description

    changed the description

  • Simon Emmert added 7 commits

    added 7 commits

    • cc56f6ec...d93e96cd - 4 commits from branch master
    • 53e07ab6 - introduce fluxtraits
    • ada53ca2 - [1ptracer][reference] fix velocity calculation on boundary for stationary fields
    • be8b7adf - velocity calculation without upwind for stationary velocity field

    Compare with previous version

  • Author Contributor

    I implemented the new check for HasStationaryVelocityField now and added a preliminary fix for the velocity calculation. This is a calculation without the upwindterm now where we directly call AdvectionType, as @martins said we do not need the additional upwindTerm here.

    If we would not do this we run into an assertion from the element volvars, when trying to get the outside volVars.

    1: test_1ptracer: /home/scholz/DUMUX/dumux/dumux/discretization/cellcentered/tpfa/elementvolumevariables.hh:149: int Dumux::CCTpfaElementVolumeVariables<GVV, true>::getLocalIdx_(int) const [with GVV = Dumux::CCGridVolumeVariables<Dumux::CCTpfaDefaultGridVolumeVariablesTraits<Dumux::TracerTestProblem<Dumux::Properties::TTag::TracerTestCC>, Dumux::TracerVolumeVariables<Dumux::TracerVolumeVariablesTraits<Dune::FieldVector<double, 1>, Dumux::Properties::TracerFluidSystem<Dumux::Properties::TTag::TracerTestCC>, Dumux::SolidSystems::InertSolidPhase<double, Dumux::Components::Constant<1, double> >, Dumux::InertSolidState<double, Dumux::SolidSystems::InertSolidPhase<double, Dumux::Components::Constant<1, double> > >, Dumux::TracerModelTraits<1, false> > > >, true>]: Assertion `it != boundaryVolVarIndices_.end() && "Could not find the current volume variables for volVarIdx!"' failed.

    Possible solutions imo are: a fix similar to what I did preliminary here, or setting the outside values for a boundary condition to the values of the inside-element. I am no expert in all of this and open to suggestions, comments, statements, wished, dreams ;-)

    Edited by Simon Emmert
  • Timo Koch
  • Timo Koch
  • Author Contributor

    yes the assertion is fixed by calling AdvectionType. I justed wanted to document why we did this and maybe someone has a better idea. The fix implemented now simply was the first thing that came to my mind ;-)

  • Simon Emmert added 1 commit

    added 1 commit

    • d90d0cf0 - [1ptracer][reference] fix velocity calculation on boundary for stationary fields

    Compare with previous version

  • Simon Emmert unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Simon Emmert changed the description

    changed the description

  • Author Contributor

    @timok this should be good to go from my side.

    • Reference is now only changed for the boundaries
    • we call AdvectionType to escape the assertion
    • logic of when to do this is moved to neumann
    • box does not need special treatment (from my understanding - please check if you think differently)
    Edited by Timo Koch
  • Timo Koch resolved all threads

    resolved all threads

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading