diff --git a/dumux/material/constraintsolvers/compositionfromfugacities.hh b/dumux/material/constraintsolvers/compositionfromfugacities.hh index 560352e46b76f2511153c3147b030dfac05bff07..6de5eca51532d8b9c194a589c56ba6e2f3733c23 100644 --- a/dumux/material/constraintsolvers/compositionfromfugacities.hh +++ b/dumux/material/constraintsolvers/compositionfromfugacities.hh @@ -124,17 +124,6 @@ public: Valgrind::CheckDefined(J); Valgrind::CheckDefined(b); - /* - std::cout << FluidSystem::phaseName(phaseIdx) << "Phase composition: "; - for (int i = 0; i < FluidSystem::numComponents; ++i) - std::cout << fluidState.moleFraction(phaseIdx, i) << " "; - std::cout << "\n"; - std::cout << FluidSystem::phaseName(phaseIdx) << "Phase phi: "; - for (int i = 0; i < FluidSystem::numComponents; ++i) - std::cout << fluidState.fugacityCoeff(phaseIdx, i) << " "; - std::cout << "\n"; - */ - // Solve J*x = b x = 0; try { J.solve(x, b); } @@ -145,21 +134,6 @@ public: Valgrind::CheckDefined(x); - /* - std::cout << FluidSystem::phaseName(phaseIdx) << "Phase composition: "; - for (int i = 0; i < FluidSystem::numComponents; ++i) - std::cout << fluidState.moleFraction(phaseIdx, i) << " "; - std::cout << "\n"; - std::cout << "J: " << J << "\n"; - std::cout << "rho: " << fluidState.density(phaseIdx) << "\n"; - std::cout << "delta: " << x << "\n"; - std::cout << "defect: " << b << "\n"; - - std::cout << "J: " << J << "\n"; - - std::cout << "---------------------------\n"; - */ - // update the fluid composition. b is also used to store // the defect for the next iteration. Scalar relError = update_(fluidState, paramCache, x, b, phaseIdx, targetFug); @@ -302,11 +276,6 @@ protected: if (sumDelta > maxDelta) x /= (sumDelta/maxDelta); - //Scalar curDefect = calculateDefect_(fluidState, phaseIdx, targetFug); - //Scalar nextDefect; - //Scalar sumMoleFrac = 0.0; - //ComponentVector newB(1e100); - //for (int numTries = 0; numTries < 1; ++numTries) { // change composition for (unsigned int i = 0; i < numComponents; ++i) { @@ -328,37 +297,6 @@ protected: paramCache.updateComposition(fluidState, phaseIdx); - /* - // if the sum of the mole fractions gets 0, we take the - // original composition divided by 100 - if (sumMoleFrac < 1e-10) { - for (int i = 0; i < numComponents; ++i) { - fluidState.setMoleFraction(phaseIdx, i, origComp[i]/100); - } - return relError; - } - */ - - /* - // calculate new residual - for (int i = 0; i < numComponents; ++i) { - Scalar phi = FluidSystem::computeFugacityCoeff(fluidState, - phaseIdx, - i); - fluidState.setFugacityCoeff(phaseIdx, i, phi); - } - - nextDefect = calculateDefect_(fluidState, phaseIdx, targetFug); - //std::cout << "try delta: " << x << "\n"; - //std::cout << "defect: old=" << curDefect << " new=" << nextDefect << "\n"; - if (nextDefect <= curDefect) - break; - - // divide delta vector - x /= 2; - } - */ - return relError; }