Fix/tracer velocity
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.
Merge request reports
Activity
added 1 commit
- cc56f6ec - [1ptracer][reference] fix velocity calculation on boundary for stationary fields
- Resolved by Simon Emmert
- Resolved by Timo Koch
- Resolved by Timo Koch
Why is the diff in the reference file so large? Shouldn't it only change the velocities on the boundary?
- Resolved by Timo Koch
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
Toggle commit list-
cc56f6ec...d93e96cd - 4 commits from branch
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- Resolved by Timo Koch
- Resolved by Timo Koch
added 1 commit
- d90d0cf0 - [1ptracer][reference] fix velocity calculation on boundary for stationary fields
@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