Skip to content
Snippets Groups Projects
Commit 7bb9a857 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'fix/1pncForDifferentPhaseIdx' into 'master'

Fix/1pnc for different phase idx

See merge request !1102
parents 1da885fb 2445a8da
No related branches found
No related tags found
1 merge request!1102Fix/1pnc for different phase idx
......@@ -117,7 +117,11 @@ public:
compIIdx,
compJIdx);
}
// The diffusion coefficients are swapped, the general procedure for the flux
// calculation always goes form phaseIdx = 0 to numPhaseIdx.
// Swapping the coefficients ensures that the diffusion coefficient for compIdx == 0
// is always defined.
std::swap(diffCoeff_[0],diffCoeff_[mainCompMoleOrMassFracIdx]);
  • Owner

    i don't understand this. it also doesn't become clear from the comment why we swap the diffusion coefficients?

  • Owner

    it also says the calculation of fluxes goes from 0 to numPhases but the phaseIdx is ignored when evaluating or storing the diffusion coefficient

  • Owner

    it also says the swap is done so that diffCoeff_[0] is defined. It was also defined before. And after the swap it will be always zero, since diffCoeff_[mainCompMoleOrMassFracIdx] is zero. It's unclear to me why diffCoeff_[0] should be always zero?

  • Please register or sign in to reply
}
/*!
......@@ -315,6 +319,9 @@ public:
/*!
* \brief Return the binary diffusion coefficient \f$\mathrm{[m^2/s]}\f$ in the fluid.
*
* \note For fluidSystemPhaseIdx > 0, the diffusion coefficients
* diffCoeff_[0] and diffCoeff_[mainCompMoleOrMassFracIdx] are swapped
*/
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
{
......
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