Skip to content
Snippets Groups Projects
Commit 489d55a7 authored by Timo Koch's avatar Timo Koch
Browse files

[md][facet][box] Handle tracer fluidsystems in Fick's law specialization

parent c866ffd6
No related branches found
No related tags found
1 merge request!3777[md][facet][box] Handle tracer fluidsystems in Fick's law specialization
Pipeline #42801 passed
+3
......@@ -108,8 +108,9 @@ public:
for (int compIdx = 0; compIdx < numComponents; compIdx++)
{
if (compIdx == FluidSystem::getMainComponent(phaseIdx))
continue;
if constexpr (!FluidSystem::isTracerFluidSystem())
if (compIdx == FluidSystem::getMainComponent(phaseIdx))
continue;
// interpolate mole fraction to scvf integration point
Scalar x = 0.0;
......@@ -126,8 +127,9 @@ public:
facetVolVars.effectiveDiffusionCoefficient(phaseIdx, phaseIdx, compIdx),
gradX);
if (BalanceEqOpts::mainComponentIsBalanced(phaseIdx) && !FluidSystem::isTracerFluidSystem())
componentFlux[FluidSystem::getMainComponent(phaseIdx)] -= componentFlux[compIdx];
if constexpr (!FluidSystem::isTracerFluidSystem())
if (BalanceEqOpts::mainComponentIsBalanced(phaseIdx))
componentFlux[FluidSystem::getMainComponent(phaseIdx)] -= componentFlux[compIdx];
}
return componentFlux;
......@@ -138,8 +140,9 @@ public:
{
for (int compIdx = 0; compIdx < numComponents; compIdx++)
{
if (compIdx == FluidSystem::getMainComponent(phaseIdx))
continue;
if constexpr (!FluidSystem::isTracerFluidSystem())
if (compIdx == FluidSystem::getMainComponent(phaseIdx))
continue;
// create vector with nodal mole/mass fractions
std::vector<Scalar> xFractions(element.subEntities(dim));
......@@ -164,8 +167,9 @@ public:
insideVolVars.effectiveDiffusionCoefficient(phaseIdx, phaseIdx, compIdx),
gradX);
if (BalanceEqOpts::mainComponentIsBalanced(phaseIdx) && !FluidSystem::isTracerFluidSystem())
componentFlux[FluidSystem::getMainComponent(phaseIdx)] -= componentFlux[compIdx];
if constexpr (!FluidSystem::isTracerFluidSystem())
if (BalanceEqOpts::mainComponentIsBalanced(phaseIdx))
componentFlux[FluidSystem::getMainComponent(phaseIdx)] -= componentFlux[compIdx];
}
return componentFlux;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment