From e8efe2fb360356b01479f56131c3dd4227f58c68 Mon Sep 17 00:00:00 2001 From: Andreas Lauser <and@poware.org> Date: Tue, 1 Nov 2011 13:51:02 +0000 Subject: [PATCH] remove trailing white space from all lines git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@6816 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- .../mhs/groundwater/groundwater_problem.hh | 8 +-- dumux/boxmodels/1p/1pfluxvariables.hh | 2 +- dumux/boxmodels/1p/1pproblem.hh | 2 +- dumux/boxmodels/1p2c/1p2cboundaryvariables.hh | 2 +- dumux/boxmodels/1p2c/1p2cfluxvariables.hh | 4 +- dumux/boxmodels/1p2c/1p2clocalresidual.hh | 2 +- dumux/boxmodels/1p2c/1p2cproblem.hh | 4 +- dumux/boxmodels/2p/2pfluidstate.hh | 2 +- dumux/boxmodels/2p/2pfluxvariables.hh | 4 +- dumux/boxmodels/2p/2pmodel.hh | 10 +-- dumux/boxmodels/2p/2pproblem.hh | 2 +- dumux/boxmodels/2p/2ppropertydefaults.hh | 10 +-- dumux/boxmodels/2p/2pvolumevariables.hh | 2 +- dumux/boxmodels/2p2c/2p2cfluxvariables.hh | 4 +- dumux/boxmodels/2p2c/2p2clocalresidual.hh | 4 +- dumux/boxmodels/2p2c/2p2cmodel.hh | 8 +-- dumux/boxmodels/2p2c/2p2cproblem.hh | 2 +- dumux/boxmodels/2pni/2pnivolumevariables.hh | 4 +- dumux/boxmodels/MpNc/MpNcfluxvariables.hh | 6 +- dumux/boxmodels/MpNc/MpNcnewtoncontroller.hh | 2 +- dumux/boxmodels/MpNc/MpNcproblem.hh | 2 +- dumux/boxmodels/MpNc/MpNcvolumevariables.hh | 2 +- .../MpNc/diffusion/volumevariables.hh | 2 +- .../MpNc/energy/MpNcvolumevariablesenergy.hh | 8 +-- .../MpNc/energy/MpNcvtkwriterenergy.hh | 8 +-- .../MpNc/mass/MpNcvolumevariablesmass.hh | 2 +- .../common/boxelementboundarytypes.hh | 2 +- dumux/boxmodels/common/boxlocaljacobian.hh | 2 +- dumux/boxmodels/common/boxlocalresidual.hh | 6 +- dumux/boxmodels/common/boxproblem.hh | 2 +- dumux/boxmodels/common/boxpropertydefaults.hh | 18 +++--- .../richards/richardsfluxvariables.hh | 2 +- dumux/boxmodels/richards/richardsproblem.hh | 2 +- dumux/common/basicproperties.hh | 10 +-- dumux/common/parameters.hh | 38 ++++++------ dumux/common/propertysystem.hh | 22 +++---- dumux/common/quad.hh | 14 ++--- dumux/common/start.hh | 2 +- dumux/decoupled/2p2c/variableclass2p2c.hh | 4 +- .../compositionfromfugacities.hh | 62 +++++++++---------- .../computefromreferencephase.hh | 14 ++--- dumux/material/MpNceos/pengrobinson.hh | 58 ++++++++--------- dumux/material/MpNceos/pengrobinsonmixture.hh | 6 +- dumux/material/MpNceos/pengrobinsonparams.hh | 4 +- .../MpNceos/pengrobinsonparamsmixture.hh | 22 +++---- .../MpNceos/pengrobinsonparamspure.hh | 8 +-- .../MpNcfluidstates/equilibriumfluidstate.hh | 32 +++++----- .../MpNcfluidstates/genericfluidstate.hh | 26 ++++---- .../MpNcfluidstates/immisciblefluidstate.hh | 28 ++++----- .../2pimmisciblefluidsystem.hh | 30 ++++----- .../MpNcfluidsystems/h2on2fluidsystem.hh | 44 ++++++------- .../MpNcfluidsystems/nullparametercache.hh | 6 +- .../MpNcfluidsystems/parametercachebase.hh | 10 +-- .../fluidmatrixinteractions/Mp/2padapter.hh | 6 +- .../Mp/Mpbrookscorey.hh | 12 ++-- .../Mp/Mpbrookscoreyparams.hh | 2 +- .../Mp/Mplinearmaterial.hh | 14 ++--- .../Mp/Mplinearmaterialparams.hh | 2 +- dumux/material/fluidsystems/liquidphase.hh | 4 +- dumux/nonlinear/newtoncontroller.hh | 2 +- test/boxmodels/MpNc/obstacleproblem.hh | 40 ++++++------ .../MpNc/obstaclespatialparameters.hh | 4 +- .../generalproblem/generallensproblem.hh | 2 +- 63 files changed, 335 insertions(+), 335 deletions(-) diff --git a/appl/lecture/mhs/groundwater/groundwater_problem.hh b/appl/lecture/mhs/groundwater/groundwater_problem.hh index eb8f756b88..8390218d66 100644 --- a/appl/lecture/mhs/groundwater/groundwater_problem.hh +++ b/appl/lecture/mhs/groundwater/groundwater_problem.hh @@ -382,7 +382,7 @@ public: coordinate=globalPos[0]; boundaryIndex=0; } - + for (int segmentCount=0; segmentCount<boundaryConditions_[boundaryIndex].size();segmentCount++) { if ((boundaryConditions_[boundaryIndex][segmentCount].from < coordinate) && @@ -398,7 +398,7 @@ public: void writeOutput() { Dune::FieldVector<int,2> resolution = Params::tree().template get<Dune::FieldVector<int,2> >("Geometry.numberOfCells"); - + Scalar zmax, zmin; zmax=this->variables().pressure()[0]/(Fluid::density(0,0)*9.81); zmin=this->variables().pressure()[0]/(Fluid::density(0,0)*9.81); @@ -407,7 +407,7 @@ public: { Scalar currentHead= this->variables().pressure()[i]/(Fluid::density(0,0)*9.81); zmax = std::max(currentHead,zmax); - zmin = std::min(currentHead,zmin); + zmin = std::min(currentHead,zmin); } std::ofstream dataFile; @@ -446,7 +446,7 @@ public: //Textoutput: std::cout << " x y h v_x v_y"<<std::endl; std::cout << "------------------------------------------------------------"<<std::endl; - + ElementIterator eItEnd = this->gridView().template end<0> (); for (ElementIterator eIt = this->gridView().template begin<0> (); eIt != eItEnd; ++eIt) { diff --git a/dumux/boxmodels/1p/1pfluxvariables.hh b/dumux/boxmodels/1p/1pfluxvariables.hh index e44bf2ddd7..ed24ccf163 100644 --- a/dumux/boxmodels/1p/1pfluxvariables.hh +++ b/dumux/boxmodels/1p/1pfluxvariables.hh @@ -176,7 +176,7 @@ private: Scalar rhoI = elemVolVars[face().i].density(); Scalar rhoJ = elemVolVars[face().j].density(); Scalar density = (rhoI + rhoJ)/2; - + // make it a force Vector f(g); f *= density; diff --git a/dumux/boxmodels/1p/1pproblem.hh b/dumux/boxmodels/1p/1pproblem.hh index 281bb639bc..0360b5f61e 100644 --- a/dumux/boxmodels/1p/1pproblem.hh +++ b/dumux/boxmodels/1p/1pproblem.hh @@ -95,7 +95,7 @@ public: const FVElementGeometry fvGeom, int scvIdx) const { return asImp_().temperatureAtPos(fvGeom.subContVol[scvIdx].global); } - + /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. * diff --git a/dumux/boxmodels/1p2c/1p2cboundaryvariables.hh b/dumux/boxmodels/1p2c/1p2cboundaryvariables.hh index 77281bb0c0..2a4615f2bb 100644 --- a/dumux/boxmodels/1p2c/1p2cboundaryvariables.hh +++ b/dumux/boxmodels/1p2c/1p2cboundaryvariables.hh @@ -287,7 +287,7 @@ protected: ScalarGradient Kmvp; K_.mv(potentialGrad_, Kmvp); KmvpNormal_ = 0; - for (int i = 0; i < dim; ++i) + for (int i = 0; i < dim; ++i) KmvpNormal_ += Kmvp[i]*boundaryFace_->normal[i]; KmvpNormal_ *= -1; diff --git a/dumux/boxmodels/1p2c/1p2cfluxvariables.hh b/dumux/boxmodels/1p2c/1p2cfluxvariables.hh index 98e0ca8dd2..f87a121260 100644 --- a/dumux/boxmodels/1p2c/1p2cfluxvariables.hh +++ b/dumux/boxmodels/1p2c/1p2cfluxvariables.hh @@ -63,7 +63,7 @@ class OnePTwoCFluxVariables enum { dim = GridView::dimension }; enum { dimWorld = GridView::dimensionworld }; - + typedef typename GridView::ctype CoordScalar; typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; typedef Dune::FieldVector<Scalar, dimWorld> Vector; @@ -363,7 +363,7 @@ protected: // make it a force f *= density; - + // calculate the final potential gradient potentialGrad_ -= f; } diff --git a/dumux/boxmodels/1p2c/1p2clocalresidual.hh b/dumux/boxmodels/1p2c/1p2clocalresidual.hh index 69aac0e162..a2224ba07b 100644 --- a/dumux/boxmodels/1p2c/1p2clocalresidual.hh +++ b/dumux/boxmodels/1p2c/1p2clocalresidual.hh @@ -263,7 +263,7 @@ public: tmp += fluxVars.moleFracGrad(comp1Idx)[i]*fluxVars.face().normal[i]; tmp *= -1; tmp *= fluxVars.porousDiffCoeff() * fluxVars.molarDensityAtIP(); - + // dispersive flux of second component - molefraction // Vector normalDisp; // fluxVars.dispersionTensor().mv(fluxVars.face().normal, normalDisp); diff --git a/dumux/boxmodels/1p2c/1p2cproblem.hh b/dumux/boxmodels/1p2c/1p2cproblem.hh index 2d538b336f..3d3a9140da 100644 --- a/dumux/boxmodels/1p2c/1p2cproblem.hh +++ b/dumux/boxmodels/1p2c/1p2cproblem.hh @@ -56,7 +56,7 @@ class OnePTwoCBoxProblem : public BoxProblem<TypeTag> dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - + typedef typename GridView::ctype CoordScalar; typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; typedef Dune::FieldVector<Scalar, dim> Vector; @@ -98,7 +98,7 @@ public: const FVElementGeometry fvGeom, int scvIdx) const { return asImp_().temperatureAtPos(fvGeom.subContVol[scvIdx].global); } - + /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. * diff --git a/dumux/boxmodels/2p/2pfluidstate.hh b/dumux/boxmodels/2p/2pfluidstate.hh index 9bf027d232..33332ce5cb 100644 --- a/dumux/boxmodels/2p/2pfluidstate.hh +++ b/dumux/boxmodels/2p/2pfluidstate.hh @@ -74,7 +74,7 @@ public: phasePressure_[nPhaseIdx] = pressN; temperature_ = temperature; paramCache.updateAll(*this); - + density_[wPhaseIdx] = FluidSystem::density(*this, paramCache, wPhaseIdx); density_[nPhaseIdx] = FluidSystem::density(*this, paramCache, nPhaseIdx); } diff --git a/dumux/boxmodels/2p/2pfluxvariables.hh b/dumux/boxmodels/2p/2pfluxvariables.hh index a71760cc28..93ea93c897 100644 --- a/dumux/boxmodels/2p/2pfluxvariables.hh +++ b/dumux/boxmodels/2p/2pfluxvariables.hh @@ -202,11 +202,11 @@ private: // both cells! fI = fJ = 0.5; Scalar density = (fI*rhoI + fJ*rhoJ)/(fI + fJ); - + // make gravity acceleration a force Vector f(g); f *= density; - + // calculate the final potential gradient potentialGrad_[phaseIdx] -= f; } diff --git a/dumux/boxmodels/2p/2pmodel.hh b/dumux/boxmodels/2p/2pmodel.hh index fb2676b09c..df2c189069 100644 --- a/dumux/boxmodels/2p/2pmodel.hh +++ b/dumux/boxmodels/2p/2pmodel.hh @@ -207,7 +207,7 @@ public: (*cellNum)[globalIdx] += 1; } }; - + if(velocityOutput) { // calculate vertex velocities @@ -223,14 +223,14 @@ public: scvVelocityW = 0; scvVelocityN = 0; - + ElementVolumeVariables elemVolVars; - + elemVolVars.update(this->problem_(), *elemIt, fvElemGeom, false /* oldSol? */); - + for (int faceIdx = 0; faceIdx< fvElemGeom.numEdges; faceIdx++) { @@ -296,7 +296,7 @@ public: } } typedef Dune::GenericReferenceElements<Scalar, dim> ReferenceElements; - const Dune::FieldVector<Scalar, dim> &localPos + const Dune::FieldVector<Scalar, dim> &localPos = ReferenceElements::general(elemIt->geometry().type()).position(0, 0); // get the transposed Jacobian of the element mapping diff --git a/dumux/boxmodels/2p/2pproblem.hh b/dumux/boxmodels/2p/2pproblem.hh index 9824b27055..fc341ebd8d 100644 --- a/dumux/boxmodels/2p/2pproblem.hh +++ b/dumux/boxmodels/2p/2pproblem.hh @@ -127,7 +127,7 @@ public: const FVElementGeometry fvGeom, int scvIdx) const { return asImp_().temperatureAtPos(fvGeom.subContVol[scvIdx].global); } - + /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. * diff --git a/dumux/boxmodels/2p/2ppropertydefaults.hh b/dumux/boxmodels/2p/2ppropertydefaults.hh index a232f58e33..c19ba5cfe2 100644 --- a/dumux/boxmodels/2p/2ppropertydefaults.hh +++ b/dumux/boxmodels/2p/2ppropertydefaults.hh @@ -77,16 +77,16 @@ SET_TYPE_PROP(BoxTwoP, FluxVariables, TwoPFluxVariables<TypeTag>); SET_SCALAR_PROP(BoxTwoP, MassUpwindWeight, 1.0); //! The indices required by the isothermal 2p model -SET_TYPE_PROP(BoxTwoP, - TwoPIndices, +SET_TYPE_PROP(BoxTwoP, + TwoPIndices, TwoPIndices<GET_PROP_VALUE(TypeTag, PTAG(Formulation)), 0>); /*! * \brief Set the property for the material parameters by extracting * it from the material law. */ -SET_TYPE_PROP(BoxTwoP, - MaterialLawParams, +SET_TYPE_PROP(BoxTwoP, + MaterialLawParams, typename GET_PROP_TYPE(TypeTag, PTAG(MaterialLaw))::Params); SET_PROP(BoxTwoP, WettingPhase) @@ -110,7 +110,7 @@ SET_PROP(BoxTwoP, FluidSystem) typedef typename GET_PROP_TYPE(TypeTag, PTAG(NonWettingPhase)) NonWettingPhase; public: - typedef Dumux::TwoPImmiscibleFluidSystem<Scalar, + typedef Dumux::TwoPImmiscibleFluidSystem<Scalar, WettingPhase, NonWettingPhase> type; }; diff --git a/dumux/boxmodels/2p/2pvolumevariables.hh b/dumux/boxmodels/2p/2pvolumevariables.hh index e839039472..ee693aecca 100644 --- a/dumux/boxmodels/2p/2pvolumevariables.hh +++ b/dumux/boxmodels/2p/2pvolumevariables.hh @@ -132,7 +132,7 @@ public: typename FluidSystem::ParameterCache paramCache; fluidState_.update(paramCache, Sn, p[wPhaseIdx], p[nPhaseIdx], temperature_); - + mobility_[wPhaseIdx] = MaterialLaw::krw(materialParams, 1 - Sn) / diff --git a/dumux/boxmodels/2p2c/2p2cfluxvariables.hh b/dumux/boxmodels/2p2c/2p2cfluxvariables.hh index 7018c4f57e..ee200cabea 100644 --- a/dumux/boxmodels/2p2c/2p2cfluxvariables.hh +++ b/dumux/boxmodels/2p2c/2p2cfluxvariables.hh @@ -182,11 +182,11 @@ private: // both cells! fI = fJ = 0.5; Scalar density = (fI*rhoI + fJ*rhoJ)/(fI + fJ); - + // make gravity acceleration a force Vector f(g); f *= density; - + // calculate the final potential gradient potentialGrad_[phaseIdx] -= f; } diff --git a/dumux/boxmodels/2p2c/2p2clocalresidual.hh b/dumux/boxmodels/2p2c/2p2clocalresidual.hh index 7413863f2b..998e9942ab 100644 --- a/dumux/boxmodels/2p2c/2p2clocalresidual.hh +++ b/dumux/boxmodels/2p2c/2p2clocalresidual.hh @@ -311,7 +311,7 @@ public: for (int i = 0; i < dim; ++i) tmp += vars.molarConcGrad(lPhaseIdx)[i] * vars.face().normal[i]; tmp *= -1; - tmp *= + tmp *= vars.porousDiffCoeff(lPhaseIdx) * vars.molarDensityAtIP(lPhaseIdx); // add the diffusive fluxes only to the component mass balance @@ -325,7 +325,7 @@ public: for (int i = 0; i < dim; ++i) tmp += vars.molarConcGrad(gPhaseIdx)[i] * vars.face().normal[i]; tmp *= -1; - tmp *= + tmp *= vars.porousDiffCoeff(gPhaseIdx) * vars.molarDensityAtIP(gPhaseIdx); // add the diffusive fluxes only to the component mass balance diff --git a/dumux/boxmodels/2p2c/2p2cmodel.hh b/dumux/boxmodels/2p2c/2p2cmodel.hh index 55d2e60078..94a39152f4 100644 --- a/dumux/boxmodels/2p2c/2p2cmodel.hh +++ b/dumux/boxmodels/2p2c/2p2cmodel.hh @@ -399,14 +399,14 @@ public: scvVelocityL = 0; scvVelocityG = 0; - + ElementVolumeVariables elemVolVars; - + elemVolVars.update(this->problem_(), *elemIt, fvElemGeom, false /* oldSol? */); - + for (int faceIdx = 0; faceIdx< fvElemGeom.numEdges; faceIdx++) { @@ -466,7 +466,7 @@ public: } typedef Dune::GenericReferenceElements<Scalar, dim> ReferenceElements; - const Dune::FieldVector<Scalar, dim>& localPos = + const Dune::FieldVector<Scalar, dim>& localPos = ReferenceElements::general(elemIt->geometry().type()).position(0, 0); // get the transposed Jacobian of the element mapping diff --git a/dumux/boxmodels/2p2c/2p2cproblem.hh b/dumux/boxmodels/2p2c/2p2cproblem.hh index 4a97eebb32..be3412c168 100644 --- a/dumux/boxmodels/2p2c/2p2cproblem.hh +++ b/dumux/boxmodels/2p2c/2p2cproblem.hh @@ -96,7 +96,7 @@ public: const FVElementGeometry fvGeom, int scvIdx) const { return asImp_().temperatureAtPos(fvGeom.subContVol[scvIdx].global); } - + /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. * diff --git a/dumux/boxmodels/2pni/2pnivolumevariables.hh b/dumux/boxmodels/2pni/2pnivolumevariables.hh index fe3230a3b0..f697d851ba 100644 --- a/dumux/boxmodels/2pni/2pnivolumevariables.hh +++ b/dumux/boxmodels/2pni/2pnivolumevariables.hh @@ -152,9 +152,9 @@ public: * \param phaseIdx The phase index */ Scalar enthalpy(int phaseIdx) const - { + { return internalEnergy_[phaseIdx] - + this->fluidState().pressure(phaseIdx) + + this->fluidState().pressure(phaseIdx) / this->fluidState().density(phaseIdx); }; /*! diff --git a/dumux/boxmodels/MpNc/MpNcfluxvariables.hh b/dumux/boxmodels/MpNc/MpNcfluxvariables.hh index 067ed499e6..0de099a454 100644 --- a/dumux/boxmodels/MpNc/MpNcfluxvariables.hh +++ b/dumux/boxmodels/MpNc/MpNcfluxvariables.hh @@ -108,7 +108,7 @@ public: diffusionDat_.update(problem, element, elemGeom, scvfIdx, elemVolVars); extrusionFactor_ = - (elemVolVars[face().i].extrusionFactor() + (elemVolVars[face().i].extrusionFactor() + elemVolVars[face().j].extrusionFactor()) / 2; } @@ -266,11 +266,11 @@ private: // both cells! fI = fJ = 0.5; Scalar density = (fI*rhoI + fJ*rhoJ)/(fI + fJ); - + // make gravity acceleration a force Vector f(g); f *= density; - + // calculate the final potential gradient potentialGrad_[phaseIdx] -= f; } diff --git a/dumux/boxmodels/MpNc/MpNcnewtoncontroller.hh b/dumux/boxmodels/MpNc/MpNcnewtoncontroller.hh index 11e4359f24..187c086f5d 100644 --- a/dumux/boxmodels/MpNc/MpNcnewtoncontroller.hh +++ b/dumux/boxmodels/MpNc/MpNcnewtoncontroller.hh @@ -193,7 +193,7 @@ class MPNCNewtonController : public NewtonController<TypeTag> public: MPNCNewtonController(const Problem &problem) : ParentType(problem) - { + { enableChop_ = GET_PARAM(TypeTag, bool, Newton, EnableChop); Dune::FMatrixPrecision<>::set_singular_limit(1e-35); }; diff --git a/dumux/boxmodels/MpNc/MpNcproblem.hh b/dumux/boxmodels/MpNc/MpNcproblem.hh index f7afd60a69..71039e9110 100644 --- a/dumux/boxmodels/MpNc/MpNcproblem.hh +++ b/dumux/boxmodels/MpNc/MpNcproblem.hh @@ -92,7 +92,7 @@ public: const FVElementGeometry fvGeom, int scvIdx) const { return asImp_().temperatureAtPos(fvGeom.subContVol[scvIdx].global); } - + /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. * diff --git a/dumux/boxmodels/MpNc/MpNcvolumevariables.hh b/dumux/boxmodels/MpNc/MpNcvolumevariables.hh index 55e846d944..2694a65255 100644 --- a/dumux/boxmodels/MpNc/MpNcvolumevariables.hh +++ b/dumux/boxmodels/MpNc/MpNcvolumevariables.hh @@ -193,7 +193,7 @@ public: // relative permeabilities MaterialLaw::relativePermeabilities(relativePermeability_, - materialParams, + materialParams, fluidState_); // dynamic viscosities diff --git a/dumux/boxmodels/MpNc/diffusion/volumevariables.hh b/dumux/boxmodels/MpNc/diffusion/volumevariables.hh index b8be021382..c9f43dd543 100644 --- a/dumux/boxmodels/MpNc/diffusion/volumevariables.hh +++ b/dumux/boxmodels/MpNc/diffusion/volumevariables.hh @@ -78,7 +78,7 @@ public: gPhaseIdx, compIIdx, compJIdx); - + // fill the symmetric part of the diffusion coefficent // matrix diffCoeffG_[compJIdx][compIIdx] = diffCoeffG_[compIIdx][compJIdx]; diff --git a/dumux/boxmodels/MpNc/energy/MpNcvolumevariablesenergy.hh b/dumux/boxmodels/MpNc/energy/MpNcvolumevariablesenergy.hh index 5da3e6ab9d..7cd6b7681d 100644 --- a/dumux/boxmodels/MpNc/energy/MpNcvolumevariablesenergy.hh +++ b/dumux/boxmodels/MpNc/energy/MpNcvolumevariablesenergy.hh @@ -60,9 +60,9 @@ class MPNCVolumeVariablesEnergy //typedef typename GET_PROP_TYPE(TypeTag, PTAG(MPNCEnergyIndices)) EnergyIndices; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; - typedef typename FluidSystem::ParameterCache ParameterCache; + typedef typename FluidSystem::ParameterCache ParameterCache; typedef Dumux::EquilibriumFluidState<Scalar, FluidSystem> FluidState; - + public: /*! * \brief Update the temperature of the sub-control volume. @@ -130,9 +130,9 @@ class MPNCVolumeVariablesEnergy<TypeTag, /*enableEnergy=*/true, /*kineticEnergyT enum { temperature0Idx = Indices::temperatureIdx }; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; - typedef typename FluidSystem::ParameterCache ParameterCache; + typedef typename FluidSystem::ParameterCache ParameterCache; typedef Dumux::EquilibriumFluidState<Scalar, FluidSystem> FluidState; - + public: /*! * \brief Update the temperature of the sub-control volume. diff --git a/dumux/boxmodels/MpNc/energy/MpNcvtkwriterenergy.hh b/dumux/boxmodels/MpNc/energy/MpNcvtkwriterenergy.hh index c09ba8b380..fa47a138af 100644 --- a/dumux/boxmodels/MpNc/energy/MpNcvtkwriterenergy.hh +++ b/dumux/boxmodels/MpNc/energy/MpNcvtkwriterenergy.hh @@ -100,7 +100,7 @@ public: int I = this->problem_.vertexMapper().map(elem, i, dim); const VolumeVariables &volVars = elemVolVars[i]; - if (temperatureOutput_) + if (temperatureOutput_) temperature_[I] = volVars.fluidState().temperature(0); } } @@ -164,7 +164,7 @@ public: { temperatureOutput_ = GET_PARAM(TypeTag, bool, MPNC, VtkAddTemperatures); enthalpyOutput_ = GET_PARAM(TypeTag, bool, MPNC, VtkAddEnthalpies); - internalEnergyOutput_ = GET_PARAM(TypeTag, bool, MPNC, VtkAddInternalEnergies); + internalEnergyOutput_ = GET_PARAM(TypeTag, bool, MPNC, VtkAddInternalEnergies); } /*! @@ -195,9 +195,9 @@ public: if (temperatureOutput_) temperature_[I] = volVars.fluidState().temperature(0); for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) { - if (enthalpyOutput_) + if (enthalpyOutput_) enthalpy_[phaseIdx][I] = volVars.fluidState().temperature(phaseIdx); - if (internalEnergyOutput_) + if (internalEnergyOutput_) internalEnergy_[phaseIdx][I] = volVars.fluidState().internalEnergy(phaseIdx); } } diff --git a/dumux/boxmodels/MpNc/mass/MpNcvolumevariablesmass.hh b/dumux/boxmodels/MpNc/mass/MpNcvolumevariablesmass.hh index d67f6574e1..e47427567b 100644 --- a/dumux/boxmodels/MpNc/mass/MpNcvolumevariablesmass.hh +++ b/dumux/boxmodels/MpNc/mass/MpNcvolumevariablesmass.hh @@ -60,7 +60,7 @@ class MPNCVolumeVariablesMass enum { fug0Idx = Indices::fug0Idx }; typedef Dune::FieldVector<Scalar, numComponents> ComponentVector; - + typedef typename FluidSystem::ParameterCache ParameterCache; public: /*! diff --git a/dumux/boxmodels/common/boxelementboundarytypes.hh b/dumux/boxmodels/common/boxelementboundarytypes.hh index 072de2aac3..8cd0ff74bd 100644 --- a/dumux/boxmodels/common/boxelementboundarytypes.hh +++ b/dumux/boxmodels/common/boxelementboundarytypes.hh @@ -134,7 +134,7 @@ public: hasDirichlet_ = false; hasNeumann_ = false; hasOutflow_ = false; - + if (nBoundary == 0) { for (int i = 0; i < numVerts; ++i) (*this)[i].reset(); diff --git a/dumux/boxmodels/common/boxlocaljacobian.hh b/dumux/boxmodels/common/boxlocaljacobian.hh index 2508d3bc52..66748433a4 100644 --- a/dumux/boxmodels/common/boxlocaljacobian.hh +++ b/dumux/boxmodels/common/boxlocaljacobian.hh @@ -284,7 +284,7 @@ public: // resolution of the scalar type. E.g. for standard 64 bit // floating point values, the resolution is about 10^-16 and // the base epsilon is thus approximately 10^-8. - static const Scalar baseEps + static const Scalar baseEps = Dumux::geometricMean<Scalar>(std::numeric_limits<Scalar>::epsilon(), 1.0); diff --git a/dumux/boxmodels/common/boxlocalresidual.hh b/dumux/boxmodels/common/boxlocalresidual.hh index c45fdefd9f..138e8e3c56 100644 --- a/dumux/boxmodels/common/boxlocalresidual.hh +++ b/dumux/boxmodels/common/boxlocalresidual.hh @@ -471,7 +471,7 @@ protected: scvIdx, boundaryFaceIdx, curVolVars_()); - values *= + values *= fvElemGeom_().boundaryFace[boundaryFaceIdx].area * curVolVars_(scvIdx).extrusionFactor(); Valgrind::CheckDefined(values); @@ -493,7 +493,7 @@ protected: int j = fvElemGeom_().subContVolFace[k].j; PrimaryVariables flux; - + Valgrind::SetUndefined(flux); this->asImp_().computeFlux(flux, k); Valgrind::CheckDefined(flux); @@ -537,7 +537,7 @@ protected: for (int i=0; i < fvElemGeom_().numVertices; i++) { Valgrind::SetUndefined(storageTerm_[i]); this->asImp_().computeStorage(storageTerm_[i], i, /*isOldSol=*/false); - storageTerm_[i] *= + storageTerm_[i] *= fvElemGeom_().subContVol[i].volume * curVolVars_(i).extrusionFactor(); Valgrind::CheckDefined(storageTerm_[i]); diff --git a/dumux/boxmodels/common/boxproblem.hh b/dumux/boxmodels/common/boxproblem.hh index 7b2b36092c..5d10efdee4 100644 --- a/dumux/boxmodels/common/boxproblem.hh +++ b/dumux/boxmodels/common/boxproblem.hh @@ -516,7 +516,7 @@ public: * \param dt The current time step size */ Scalar nextTimeStepSize(Scalar dt) - { + { return std::min(GET_PARAM(TypeTag, Scalar, MaxTimeStepSize), newtonCtl_.suggestTimeStepSize(dt)); }; diff --git a/dumux/boxmodels/common/boxpropertydefaults.hh b/dumux/boxmodels/common/boxpropertydefaults.hh index a9074dbbc9..f271247227 100644 --- a/dumux/boxmodels/common/boxpropertydefaults.hh +++ b/dumux/boxmodels/common/boxpropertydefaults.hh @@ -61,7 +61,7 @@ SET_TYPE_PROP(BoxModel, TimeManager, Dumux::TimeManager<TypeTag>); ////////////////////////////////////////////////////////////////// //! Use the leaf grid view if not defined otherwise -SET_TYPE_PROP(BoxModel, +SET_TYPE_PROP(BoxModel, GridView, typename GET_PROP_TYPE(TypeTag, PTAG(Grid))::LeafGridView); @@ -79,13 +79,13 @@ SET_TYPE_PROP(BoxModel, NewtonController, Dumux::NewtonController<TypeTag>); //! Mapper for the grid view's vertices. SET_TYPE_PROP(BoxModel, - VertexMapper, + VertexMapper, Dune::MultipleCodimMultipleGeomTypeMapper<typename GET_PROP_TYPE(TypeTag, PTAG(GridView)), Dune::MCMGVertexLayout>); //! Mapper for the grid view's elements. SET_TYPE_PROP(BoxModel, - ElementMapper, + ElementMapper, Dune::MultipleCodimMultipleGeomTypeMapper<typename GET_PROP_TYPE(TypeTag, PTAG(GridView)), Dune::MCMGElementLayout>); @@ -98,22 +98,22 @@ SET_TYPE_PROP(BoxModel, LocalJacobian, Dumux::BoxLocalJacobian<TypeTag>); /*! * \brief The type of a solution for the whole grid at a fixed time. */ -SET_TYPE_PROP(BoxModel, +SET_TYPE_PROP(BoxModel, SolutionVector, Dune::BlockVector<typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables))>); /*! * \brief The type of a solution for a whole element. */ -SET_TYPE_PROP(BoxModel, +SET_TYPE_PROP(BoxModel, ElementSolutionVector, Dune::BlockVector<typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables))>); /*! * \brief A vector of primary variables. */ -SET_TYPE_PROP(BoxModel, - PrimaryVariables, +SET_TYPE_PROP(BoxModel, + PrimaryVariables, Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)), GET_PROP_VALUE(TypeTag, PTAG(NumEq))>); @@ -132,8 +132,8 @@ SET_TYPE_PROP(BoxModel, ElementVolumeVariables, Dumux::BoxElementVolumeVariables /*! * \brief Boundary types at a single degree of freedom. */ -SET_TYPE_PROP(BoxModel, - BoundaryTypes, +SET_TYPE_PROP(BoxModel, + BoundaryTypes, Dumux::BoundaryTypes<GET_PROP_VALUE(TypeTag, PTAG(NumEq))>); /*! diff --git a/dumux/boxmodels/richards/richardsfluxvariables.hh b/dumux/boxmodels/richards/richardsfluxvariables.hh index f95718cba7..2441843cc6 100644 --- a/dumux/boxmodels/richards/richardsfluxvariables.hh +++ b/dumux/boxmodels/richards/richardsfluxvariables.hh @@ -180,7 +180,7 @@ protected: // make it a force f *= density; - + // calculate the final potential gradient potentialGrad_ -= f; } diff --git a/dumux/boxmodels/richards/richardsproblem.hh b/dumux/boxmodels/richards/richardsproblem.hh index e2e5f073a9..5809c1e8fb 100644 --- a/dumux/boxmodels/richards/richardsproblem.hh +++ b/dumux/boxmodels/richards/richardsproblem.hh @@ -100,7 +100,7 @@ public: const FVElementGeometry fvGeom, int scvIdx) const { return asImp_().temperatureAtPos(fvGeom.subContVol[scvIdx].global); } - + /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. * diff --git a/dumux/common/basicproperties.hh b/dumux/common/basicproperties.hh index 8634787523..1e059edd76 100644 --- a/dumux/common/basicproperties.hh +++ b/dumux/common/basicproperties.hh @@ -84,28 +84,28 @@ SET_TYPE_PROP(NumericModel, Scalar, double); SET_PROP(NumericModel, ParameterTree) { typedef Dune::ParameterTree type; - + static Dune::ParameterTree &tree() - { + { static Dune::ParameterTree obj_; return obj_; }; static Dune::ParameterTree &compileTimeParams() - { + { static Dune::ParameterTree obj_; return obj_; }; static Dune::ParameterTree &runTimeParams() - { + { static Dune::ParameterTree obj_; return obj_; }; }; -// use the global group as default for the model's parameter group +// use the global group as default for the model's parameter group SET_STRING_PROP(NumericModel, ModelParameterGroup, ""); } // namespace Properties diff --git a/dumux/common/parameters.hh b/dumux/common/parameters.hh index 0e8d908426..b3f58d6300 100644 --- a/dumux/common/parameters.hh +++ b/dumux/common/parameters.hh @@ -98,7 +98,7 @@ NEW_PROP_TAG(ModelParameterGroup); namespace Parameters { template <class TypeTag> -void findUnusedKeys_(std::list<std::string> &unusedParams, +void findUnusedKeys_(std::list<std::string> &unusedParams, const Dune::ParameterTree &tree, const std::string prefix="") { @@ -106,7 +106,7 @@ void findUnusedKeys_(std::list<std::string> &unusedParams, const Dune::ParameterTree &rt = Params::runTimeParams(); // loop over all keys of the current tree - const Dune::ParameterTree::KeyVector &keys = + const Dune::ParameterTree::KeyVector &keys = tree.getValueKeys(); for (int i = 0; i < keys.size(); ++i) { std::string canonicalName = prefix + keys[i]; @@ -118,16 +118,16 @@ void findUnusedKeys_(std::list<std::string> &unusedParams, } // loop over all subtrees - const Dune::ParameterTree::KeyVector &subKeys = + const Dune::ParameterTree::KeyVector &subKeys = tree.getSubKeys(); for (int i = 0; i < subKeys.size(); ++i) { std::string newPrefix = prefix + subKeys[i] + "."; - findUnusedKeys_<TypeTag>(unusedParams, + findUnusedKeys_<TypeTag>(unusedParams, tree.sub(subKeys[i]), newPrefix); } - + } /*! @@ -169,13 +169,13 @@ void print(std::ostream &os = std::cout) const char *getString_(const char *foo = 0) { return foo; } -template <class TypeTag> +template <class TypeTag> class Param { typedef typename GET_PROP(TypeTag, PTAG(ParameterTree)) Params; public: template <class ParamType, class PropTag> - static const ParamType &get(const char *groupOrParamName, + static const ParamType &get(const char *groupOrParamName, const char *paramNameOrNil = 0) { #ifndef NDEBUG @@ -204,7 +204,7 @@ public: } template <class ParamType> - static const ParamType &getRuntime(const char *groupOrParamName, + static const ParamType &getRuntime(const char *groupOrParamName, const char *paramNameOrNil = 0) { #ifndef NDEBUG @@ -244,11 +244,11 @@ private: }; template <class ParamType> - static void check_(const std::string &propertyName, - const char *groupName, + static void check_(const std::string &propertyName, + const char *groupName, const char *paramName) { - const std::string ¶mTypeName = + const std::string ¶mTypeName = Dune::className<ParamType>(); typedef std::unordered_map<std::string, Blubb> StaticData; static StaticData staticData; @@ -266,32 +266,32 @@ private: } else b = &(it->second); - + if (b->groupName != groupName) { DUNE_THROW(Dune::InvalidStateException, "GET_*_PARAM for parameter '" << paramName - << "' called for at least two different groups ('" + << "' called for at least two different groups ('" << b->groupName << "' and '" << groupName << "')"); } if (b->propertyName != propertyName) { DUNE_THROW(Dune::InvalidStateException, "GET_*_PARAM for parameter '" << paramName - << "' called for at least two different properties ('" + << "' called for at least two different properties ('" << b->propertyName << "' and '" << propertyName << "')"); } if (b->paramTypeName != paramTypeName) { DUNE_THROW(Dune::InvalidStateException, "GET_*_PARAM for parameter '" << paramName << "' in group '" - << groupName << "' called with at least two different types (" + << groupName << "' called with at least two different types (" << b->paramTypeName << " and " << paramTypeName << ")"); } } - + template <class ParamType, class PropTag> static const ParamType &retrieve_(const char *groupOrParamName, const char *paramNameOrNil = 0) - { + { const char *paramName, *groupName; if (paramNameOrNil && strlen(paramNameOrNil) > 0) { groupName = groupOrParamName; @@ -351,7 +351,7 @@ private: template <class ParamType> static const ParamType &retrieveRuntime_(const char *groupOrParamName, const char *paramNameOrNil = 0) - { + { const char *paramName, *groupName; if (paramNameOrNil && paramNameOrNil[0] != '\0') { groupName = groupOrParamName; @@ -365,7 +365,7 @@ private: static std::string modelParamGroup(GET_PROP(TypeTag, PTAG(ModelParameterGroup))::value); std::string canonicalName(modelParamGroup); - + // prefix the parameter with the parameter group of the // model. this allows things like sub-model specific parameters like // diff --git a/dumux/common/propertysystem.hh b/dumux/common/propertysystem.hh index 87eb67306f..e44d49b234 100644 --- a/dumux/common/propertysystem.hh +++ b/dumux/common/propertysystem.hh @@ -484,7 +484,7 @@ public: { return propertyKind_; } const std::string &propertyName() const { return propertyName_; } - const std::string &propertyValue() const + const std::string &propertyValue() const { return propertyValue_; } const std::string &fileDefined() const { return fileDefined_; } @@ -532,12 +532,12 @@ class TypeTagRegistry public: typedef std::list<std::string> ChildrenList; typedef std::map<std::string, ChildrenList> ChildrenListMap; - + template <class TypeTag, - class Child1 = void, - class Child2 = void, - class Child3 = void, - class Child4 = void, + class Child1 = void, + class Child2 = void, + class Child3 = void, + class Child4 = void, class Child5 = void> static void addChildren() { @@ -558,7 +558,7 @@ public: { return keys_[typeTagName]; }; - + private: static ChildrenListMap keys_; }; @@ -858,7 +858,7 @@ struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 5> #if !defined NO_PROPERTY_INTROSPECTION std::string canonicalTypeTagNameToName_(const std::string &canonicalName) -{ +{ std::string result(canonicalName); result.replace(0, strlen("Dumux::Properties::TTag::"), ""); return result; @@ -880,7 +880,7 @@ inline bool getDiagnostic_(const std::string &typeTagName, break; }; } - + if (key) { result = indent; result += @@ -917,7 +917,7 @@ const std::string getDiagnostic(std::string propTagName) int n = propTagName.length(); propTagName.replace(n - 1, 1, ""); //TypeTagName.replace(0, strlen("Dumux::Properties::TTag::"), ""); - + if (!getDiagnostic_(TypeTagName, propTagName, result, "")) { // check whether the property is a default property const PropertyRegistry::KeyList &keys = @@ -982,7 +982,7 @@ inline void print_(const std::string &typeTagName, os << "\n"; somethingPrinted = true; } - os << indent << " " + os << indent << " " << key.propertyKind() << " " << key.propertyName(); if (key.propertyKind() != "opaque") os << " = '" << key.propertyValue() << "'"; diff --git a/dumux/common/quad.hh b/dumux/common/quad.hh index e23b6cb652..80953de0ed 100644 --- a/dumux/common/quad.hh +++ b/dumux/common/quad.hh @@ -48,11 +48,11 @@ class numeric_limits<quad> public: static constexpr bool is_specialized = true; - static constexpr quad min() throw() + static constexpr quad min() throw() { return FLT128_MIN; } static constexpr quad max() throw() { return FLT128_MAX; } - + // number of bits in mantissa static constexpr int digits = FLT128_MANT_DIG; // number of decimal digits @@ -65,12 +65,12 @@ public: { return FLT128_EPSILON; } static constexpr quad round_error() throw() { return 0.5; } - + static constexpr int min_exponent = FLT128_MIN_EXP; static constexpr int min_exponent10 = FLT128_MIN_10_EXP; static constexpr int max_exponent = FLT128_MAX_EXP; static constexpr int max_exponent10 = FLT128_MAX_10_EXP; - + static constexpr bool has_infinity = true; static constexpr bool has_quiet_NaN = true; static constexpr bool has_signaling_NaN = true; @@ -84,11 +84,11 @@ public: { return __builtin_nans(""); } static constexpr quad denorm_min() throw() { return FLT128_DENORM_MIN; } - + static constexpr bool is_iec559 = true; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; - + static constexpr bool traps = std::numeric_limits<double>::traps; static constexpr bool tinyness_before = std::numeric_limits<double>::tinyness_before; static constexpr float_round_style round_style = round_to_nearest; @@ -136,6 +136,6 @@ inline bool isinf(quad val) { return isinfq(val); }; } // namespace std - + #endif // DUMUX_QUAD_HH diff --git a/dumux/common/start.hh b/dumux/common/start.hh index 3024bff0a7..883f4696a8 100644 --- a/dumux/common/start.hh +++ b/dumux/common/start.hh @@ -330,7 +330,7 @@ int startFromInputFile(int argc, char **argv) gridPtr->leafView(), Params::tree()); timeManager.init(problem, startTime, dt, tEnd, restart); - + // print all properties Dumux::Properties::print<TypeTag>(); diff --git a/dumux/decoupled/2p2c/variableclass2p2c.hh b/dumux/decoupled/2p2c/variableclass2p2c.hh index 60507215be..024d00d127 100644 --- a/dumux/decoupled/2p2c/variableclass2p2c.hh +++ b/dumux/decoupled/2p2c/variableclass2p2c.hh @@ -420,7 +420,7 @@ public: /*! \brief Returns numerical phase density (current mass/volume, not from EOS) * \param Idx Element index - * \param phaseIdx Index of the phase + * \param phaseIdx Index of the phase */ Scalar& numericalDensity(int Idx, int phaseIdx) { @@ -428,7 +428,7 @@ public: } /*! \brief Returns numerical phase density (current mass/volume, not from EOS) - * \param phaseIdx Index of the phase + * \param phaseIdx Index of the phase */ const ScalarSolutionType& numericalDensity(int phaseIdx) const { diff --git a/dumux/material/MpNcconstraintsolvers/compositionfromfugacities.hh b/dumux/material/MpNcconstraintsolvers/compositionfromfugacities.hh index 1b40b35484..16ea4feb85 100644 --- a/dumux/material/MpNcconstraintsolvers/compositionfromfugacities.hh +++ b/dumux/material/MpNcconstraintsolvers/compositionfromfugacities.hh @@ -55,14 +55,14 @@ public: int phaseIdx, const ComponentVector &fugVec) { - if (FluidSystem::isIdealMixture(phaseIdx)) + if (FluidSystem::isIdealMixture(phaseIdx)) return; - + // Pure component fugacities for (int i = 0; i < numComponents; ++ i) { //std::cout << f << " -> " << mutParams.fugacity(phaseIdx, i)/f << "\n"; fluidState.setMoleFraction(phaseIdx, - i, + i, 1.0/numComponents); } }; @@ -76,7 +76,7 @@ public: template <class FluidState> static void solve(FluidState &fluidState, ParameterCache ¶mCache, - int phaseIdx, + int phaseIdx, const ComponentVector &targetFug) { // use a much more efficient method in case the phase is an @@ -93,7 +93,7 @@ public: for (int i = 0; i < numComponents; ++i) { xInit[i] = fluidState.moleFraction(phaseIdx, i); }; - + ///////////////////////// // Newton method ///////////////////////// @@ -104,15 +104,15 @@ public: Dune::FieldVector<Scalar, numComponents> x; // right hand side Dune::FieldVector<Scalar, numComponents> b; - + fluidState.updateAverageMolarMass(phaseIdx); paramCache.updatePhase(fluidState, phaseIdx); - + // maximum number of iterations const int nMax = 25; for (int nIdx = 0; nIdx < nMax; ++nIdx) { // calculate Jacobian matrix and right hand side - linearize_(J, b, fluidState, paramCache, phaseIdx, targetFug); + linearize_(J, b, fluidState, paramCache, phaseIdx, targetFug); Valgrind::CheckDefined(J); Valgrind::CheckDefined(b); @@ -130,13 +130,13 @@ public: // Solve J*x = b x = 0; try { J.solve(x, b); } - catch (Dune::FMatrixError e) + catch (Dune::FMatrixError e) { throw Dumux::NumericalProblem(e.what()); } //std::cout << "original delta: " << x << "\n"; Valgrind::CheckDefined(x); - + /* std::cout << FluidSystem::phaseName(phaseIdx) << "Phase composition: "; for (int i = 0; i < FluidSystem::numComponents; ++i) @@ -156,7 +156,7 @@ public: // the defect for the next iteration. Scalar relError = update_(fluidState, paramCache, x, b, phaseIdx, targetFug); //std::cout << "relError: " << relError << "\n"; - + if (relError < 1e-9) { Scalar rho = FluidSystem::density(fluidState, paramCache, phaseIdx); fluidState.setDensity(phaseIdx, rho); @@ -165,11 +165,11 @@ public: return; } } - - DUNE_THROW(NumericalProblem, + + DUNE_THROW(NumericalProblem, "Calculating the " << FluidSystem::phaseName(phaseIdx) << "Phase composition failed. Initial {x} = {" - << xInit + << xInit << "}, {fug_t} = {" << targetFug << "}, p = " << fluidState.pressure(phaseIdx) << ", T = " << fluidState.temperature(phaseIdx)); }; @@ -180,11 +180,11 @@ protected: // mixture, i.e. the component's fugacity coefficients are // independent of the phase's composition. template <class FluidState> - static void solveIdealMix_(FluidState &fluidState, + static void solveIdealMix_(FluidState &fluidState, ParameterCache ¶mCache, int phaseIdx, const ComponentVector &fugacities) - { + { for (int i = 0; i < numComponents; ++ i) { Scalar phi = FluidSystem::fugacityCoefficient(fluidState, paramCache, @@ -194,10 +194,10 @@ protected: fluidState.setFugacityCoefficient(phaseIdx, i, phi); fluidState.setMoleFraction(phaseIdx, i, fugacities[i]/gamma); }; - + fluidState.updateAverageMolarMass(phaseIdx); paramCache.updatePhase(fluidState, phaseIdx); - + Scalar rho = FluidSystem::density(fluidState, paramCache, phaseIdx); fluidState.setDensity(phaseIdx, rho); return; @@ -206,14 +206,14 @@ protected: template <class FluidState> static void linearize_(Dune::FieldMatrix<Scalar, numComponents, numComponents> &J, Dune::FieldVector<Scalar, numComponents> &defect, - FluidState &fluidState, + FluidState &fluidState, ParameterCache ¶mCache, int phaseIdx, const ComponentVector &targetFug) - { + { // reset jacobian J = 0; - + // calculate the defect (deviation of the current fugacities // from the target fugacities) for (int i = 0; i < numComponents; ++ i) { @@ -223,12 +223,12 @@ protected: i); Scalar f = phi*fluidState.pressure(phaseIdx)*fluidState.moleFraction(phaseIdx, i); fluidState.setFugacityCoefficient(phaseIdx, i, phi); - + defect[i] = targetFug[i] - f; } - + // assemble jacobian matrix of the constraints for the composition - for (int i = 0; i < numComponents; ++ i) { + for (int i = 0; i < numComponents; ++ i) { const Scalar eps = 1e-11; //std::max(1e-16, std::abs(x_i)*1e-9); //////// @@ -252,7 +252,7 @@ protected: phaseIdx, j); // ... and its fugacity ... - Scalar f = + Scalar f = phi * fluidState.pressure(phaseIdx) * fluidState.moleFraction(phaseIdx, j); @@ -263,7 +263,7 @@ protected: // derivative J[j][i] = (defJPlusEps - defect[j])/eps; } - + // reset composition to original value fluidState.setMoleFraction(phaseIdx, i, x_i); fluidState.updateAverageMolarMass(phaseIdx); @@ -290,7 +290,7 @@ protected: for (int i = 0; i < numComponents; ++i) { origComp[i] = fluidState.moleFraction(phaseIdx, i); relError = std::max(relError, std::abs(x[i])); - + sumx += std::abs(fluidState.moleFraction(phaseIdx, i)); sumDelta += std::abs(x[i]); }; @@ -350,7 +350,7 @@ protected: nextDefect = calculateDefect_(fluidState, phaseIdx, targetFug); //std::cout << "try delta: " << x << "\n"; - //std::cout << "defect: old=" << curDefect << " new=" << nextDefect << "\n"; + //std::cout << "defect: old=" << curDefect << " new=" << nextDefect << "\n"; if (nextDefect <= curDefect) break; @@ -363,15 +363,15 @@ protected: } template <class FluidState> - static Scalar calculateDefect_(const FluidState ¶ms, - int phaseIdx, + static Scalar calculateDefect_(const FluidState ¶ms, + int phaseIdx, const ComponentVector &targetFug) { Scalar result = 0.0; for (int i = 0; i < numComponents; ++i) { // sum of the fugacity defect weighted by the inverse // fugacity coefficient - result += std::abs( + result += std::abs( (targetFug[i] - params.fugacity(phaseIdx, i)) / params.fugacityCoeff(phaseIdx, i) ); diff --git a/dumux/material/MpNcconstraintsolvers/computefromreferencephase.hh b/dumux/material/MpNcconstraintsolvers/computefromreferencephase.hh index bfbbeb6b24..5855d15ebe 100644 --- a/dumux/material/MpNcconstraintsolvers/computefromreferencephase.hh +++ b/dumux/material/MpNcconstraintsolvers/computefromreferencephase.hh @@ -104,9 +104,9 @@ public: * enthalpy/internal energy of each phase * should also be set. */ - static void solve(MutableParameters &mutParams, - int refPhaseIdx, - bool setViscosity, + static void solve(MutableParameters &mutParams, + int refPhaseIdx, + bool setViscosity, bool setEnthalpy) { ComponentVector fugVec; @@ -114,12 +114,12 @@ public: // compute the density and enthalpy of the // reference phase mutParams.updateMeanMolarMass(refPhaseIdx); - mutParams.setMolarVolume(refPhaseIdx, + mutParams.setMolarVolume(refPhaseIdx, FluidSystem::computeMolarVolume(mutParams, refPhaseIdx)); if (setEnthalpy) mutParams.setEnthalpy(refPhaseIdx, - FluidSystem::computeEnthalpy(mutParams, refPhaseIdx)); + FluidSystem::computeEnthalpy(mutParams, refPhaseIdx)); if (setViscosity) mutParams.setViscosity(refPhaseIdx, @@ -128,7 +128,7 @@ public: // compute the fugacities of all components in the reference phase for (int compIdx = 0; compIdx < numComponents; ++compIdx) { mutParams.setFugacityCoeff(refPhaseIdx, compIdx, - FluidSystem::computeFugacityCoeff(mutParams, refPhaseIdx, compIdx)); + FluidSystem::computeFugacityCoeff(mutParams, refPhaseIdx, compIdx)); fugVec[compIdx] = mutParams.fugacity(refPhaseIdx, compIdx); } @@ -136,7 +136,7 @@ public: for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { if (phaseIdx == refPhaseIdx) continue; // reference phase is already calculated - + mutParams.setTemperature(phaseIdx, mutParams.temperature(refPhaseIdx)); CompositionFromFugacities::guessInitial(mutParams, phaseIdx, fugVec); diff --git a/dumux/material/MpNceos/pengrobinson.hh b/dumux/material/MpNceos/pengrobinson.hh index 99d0b898fa..878ca8a89d 100644 --- a/dumux/material/MpNceos/pengrobinson.hh +++ b/dumux/material/MpNceos/pengrobinson.hh @@ -76,7 +76,7 @@ public: * difference between the gas and liquid phase fugacity zero. */ template <class Params> - static Scalar computeVaporPressure(const Params ¶ms, Scalar T) + static Scalar computeVaporPressure(const Params ¶ms, Scalar T) { typedef typename Params::Component Component; if (T >= Component::criticalTemperature()) @@ -85,7 +85,7 @@ public: // initial guess of the vapor pressure Scalar Vm[3]; const Scalar eps = Component::criticalPressure()*1e-10; - + // use the Ambrose-Walton method to get an initial guess of // the vapor pressure Scalar pVap = ambroseWalton_(params, T); @@ -97,19 +97,19 @@ public: assert(numSol == 3); Scalar f = fugacityDifference_(params, T, pVap, Vm[0], Vm[2]); - Scalar df_dp = + Scalar df_dp = fugacityDifference_(params, T, pVap + eps, Vm[0], Vm[2]) - fugacityDifference_(params, T, pVap - eps, Vm[0], Vm[2]); df_dp /= 2*eps; - + Scalar delta = f/df_dp; pVap = pVap - delta; if (std::abs(delta/pVap) < 1e-10) break; } - + return pVap; } @@ -139,7 +139,7 @@ public: Scalar a2 = - (1 - Bstar); Scalar a3 = Astar - Bstar*(3*Bstar + 2); Scalar a4 = Bstar*(- Astar + Bstar*(1 + Bstar)); - + // ignore the first two results if the smallest // compressibility factor is <= 0.0. (this means that if we // would get negative molar volumes for the liquid phase, we @@ -165,7 +165,7 @@ public: Scalar Vmin, Vmax; bool hasExtrema; hasExtrema = findExtrema_(Vmin, Vmax, params, phaseIdx); - + if (!hasExtrema) { // if the EOS does not exhibit any extrema, the fluid // is critical... @@ -205,8 +205,8 @@ public: Scalar Z = p*Vm/RT; Scalar Bstar = p*params.b() / RT; - Scalar tmp = - (Vm + params.b()*(1 + std::sqrt(2))) / + Scalar tmp = + (Vm + params.b()*(1 + std::sqrt(2))) / (Vm + params.b()*(1 - std::sqrt(2))); Scalar expo = - params.a()/(RT * 2 * params.b() * std::sqrt(2)); Scalar fugCoeff = @@ -239,8 +239,8 @@ protected: { Scalar Vcrit; findCriticalMolarVolume_(Vcrit, - params, - phaseIdx, + params, + phaseIdx, Vm, gasPhase); if (gasPhase) @@ -250,7 +250,7 @@ protected: } template <class Params> - static void findCriticalMolarVolume_(Scalar &Vcrit, + static void findCriticalMolarVolume_(Scalar &Vcrit, const Params ¶ms, int phaseIdx, Scalar Vcubic, @@ -267,10 +267,10 @@ protected: for (int i = 0; ; ++i) { tmpParams.setTemperature(phaseIdx, T); tmpParams.updateEosParams(phaseIdx); - + if (findExtrema_(minVm, maxVm, tmpParams, phaseIdx, /*hintSet=*/false)) break; - + T = (T + params.temperature(phaseIdx)) / 2; if (i >= 3) { DUNE_THROW(NumericalProblem, @@ -313,7 +313,7 @@ protected: // molar volume and the minimum's molar volume regarding // temperature Scalar fPrime = (fStar - f)/eps; - + // update value for the current iteration Scalar delta = f/fPrime; if (delta > 0) @@ -328,7 +328,7 @@ protected: "Could not determine the critical point of phase " << phaseIdx); } - + tmpParams.setTemperature(phaseIdx, Tstar); tmpParams.updateEosParams(phaseIdx); if (findExtrema_(minVm, maxVm, tmpParams, phaseIdx, /*hintSet=*/(j==0))) { @@ -348,10 +348,10 @@ protected: // find the two molar volumes where the EOS exhibits extrema and // which are larger than the covolume of the phase template <class Params> - static bool findExtrema_(Scalar &Vmin, + static bool findExtrema_(Scalar &Vmin, Scalar &Vmax, const Params ¶ms, - int phaseIdx, + int phaseIdx, bool hintSet = false) { Scalar a = params.a(phaseIdx); @@ -360,7 +360,7 @@ protected: Scalar w = -1; Scalar RT = R*params.temperature(phaseIdx); - + // calculate coefficients of the 4th order polynominal in // monomial basis Scalar a1 = RT; @@ -368,7 +368,7 @@ protected: Scalar a3 = 2*RT*w*b*b + RT*u*u*b*b + 4*a*b - u*a*b; Scalar a4 = 2*RT*u*w*b*b*b + 2*u*a*b*b - 2*a*b*b; Scalar a5 = RT*w*w*b*b*b*b - u*a*b*b*b; - + // Newton method to find first root // if the values which we got on Vmin and Vmax are usefull, we @@ -379,14 +379,14 @@ protected: for (int i = 0; std::abs(delta) > 1e-9; ++i) { Scalar f = a5 + V*(a4 + V*(a3 + V*(a2 + V*a1))); Scalar fPrime = a4 + V*(2*a3 + V*(3*a2 + V*4*a1)); - + if (std::abs(fPrime) < 1e-20) { // give up if the derivative is zero Vmin = 0; Vmax = 0; return false; } - + delta = f/fPrime; V -= delta; @@ -398,14 +398,14 @@ protected: return false; } } - + // polynomial division Scalar b1 = a1; Scalar b2 = a2 + V*b1; Scalar b3 = a3 + V*b2; Scalar b4 = a4 + V*b3; - - // invert resulting cubic polynomial analytically + + // invert resulting cubic polynomial analytically Scalar allV[4]; allV[0] = V; int numSol = 1 + Dumux::invertCubicPolynomial(&allV[1], b1, b2, b3, b4); @@ -434,7 +434,7 @@ protected: * \return Vapor pressure estimate in bar * * See: - * + * * D. Ambrose, J. Walton: "Vapor Pressures up to Their Critical * Temperatures of Normal Alkanes and 1-Alkanols", Pure * Appl. Chem., 61, 1395-1403, 1989 @@ -443,11 +443,11 @@ protected: static Scalar ambroseWalton_(const Params ¶ms, Scalar T) { typedef typename Params::Component Component; - + Scalar Tr = T / Component::criticalTemperature(); Scalar tau = 1 - Tr; Scalar omega = Component::acentricFactor(); - + Scalar f0 = (tau*(-5.97616 + std::sqrt(tau)*(1.29874 - tau*0.60394)) - 1.06841*std::pow(tau, 5))/Tr; Scalar f1 = (tau*(-5.03365 + std::sqrt(tau)*(1.11505 - tau*5.41217)) - 7.46628*std::pow(tau, 5))/Tr; Scalar f2 = (tau*(-0.64771 + std::sqrt(tau)*(2.41539 - tau*4.26979)) + 3.25259*std::pow(tau, 5))/Tr; @@ -460,7 +460,7 @@ protected: * fugacities in [bar] * * \param params Parameters - * \param T Temperature [K] + * \param T Temperature [K] * \param p Pressure [bar] * \param VmLiquid Molar volume of the liquid phase [cm^3/mol] * \param VmGas Molar volume of the gas phase [cm^3/mol] diff --git a/dumux/material/MpNceos/pengrobinsonmixture.hh b/dumux/material/MpNceos/pengrobinsonmixture.hh index 06e994c84c..7e45360a16 100644 --- a/dumux/material/MpNceos/pengrobinsonmixture.hh +++ b/dumux/material/MpNceos/pengrobinsonmixture.hh @@ -79,7 +79,7 @@ public: * \f[ f_i = \phi_i x_i \;, \f] - * where \f$f_i\f$ is the component's fugacity and \f$x_i\f$ is + * where \f$f_i\f$ is the component's fugacity and \f$x_i\f$ is * the component's mole fraction. * * See: @@ -110,7 +110,7 @@ public: Scalar Astar = params.a(phaseIdx)*p/(RT*RT); Scalar Bstar = params.b(phaseIdx)*p/(RT); - + // calculate delta_i (see: Reid, p. 145) Scalar deltai = 2*std::sqrt(params.aPure(phaseIdx, compIdx))/params.a(phaseIdx); Scalar tmp = 0; @@ -122,7 +122,7 @@ public: }; deltai *= tmp; - Scalar base = + Scalar base = (2*Z + Bstar*(u + std::sqrt(u*u - 4*w))) / (2*Z + Bstar*(u - std::sqrt(u*u - 4*w))); Scalar expo = Astar/(Bstar*std::sqrt(u*u - 4*w))*(bi_b - deltai); diff --git a/dumux/material/MpNceos/pengrobinsonparams.hh b/dumux/material/MpNceos/pengrobinsonparams.hh index 19d20cfb54..a7a4ea8c7a 100644 --- a/dumux/material/MpNceos/pengrobinsonparams.hh +++ b/dumux/material/MpNceos/pengrobinsonparams.hh @@ -24,7 +24,7 @@ * single-component fluid or a mixture * * See: - * + * * R. Reid, et al.: The Properties of Gases and Liquids, 4th edition, * McGraw-Hill, 1987, pp. 43-44 */ @@ -37,7 +37,7 @@ namespace Dumux * \brief Stores and provides access to the Peng-Robinson parameters * * See: - * + * * R. Reid, et al.: The Properties of Gases and Liquids, 4th edition, * McGraw-Hill, 1987, pp. 43-44 */ diff --git a/dumux/material/MpNceos/pengrobinsonparamsmixture.hh b/dumux/material/MpNceos/pengrobinsonparamsmixture.hh index 4828ae8f2e..ce077db8c8 100644 --- a/dumux/material/MpNceos/pengrobinsonparamsmixture.hh +++ b/dumux/material/MpNceos/pengrobinsonparamsmixture.hh @@ -23,7 +23,7 @@ * \brief The Peng-Robinson parameters for a mixture * * See: - * + * * R. Reid, et al.: The Properties of Gases and Liquids, 4th edition, * McGraw-Hill, 1987, pp. 43-44 */ @@ -41,7 +41,7 @@ namespace Dumux * \brief The mixing rule for the Peng-Robinson equation of state as given in Reid, p. 82 * * See: - * + * * R. Reid, et al.: The Properties of Gases and Liquids, 4th edition, * McGraw-Hill, 1987, p. 82 */ @@ -49,16 +49,16 @@ template <class Scalar, class StaticParams, int phaseIdx> class PengRobinsonParamsMixture : public PengRobinsonParams<Scalar> { typedef Dumux::PengRobinsonParams<Scalar> ParentType; - + // Peng-Robinson parameters for pure substances typedef Dumux::PengRobinsonParams<Scalar> PureParams; - + // The Peng-Robinson EOS for this mixture typedef Dumux::PengRobinson<Scalar> PengRobinson; // number of components of which the fluid is composed enum { numComponents = StaticParams::numComponents }; - + // ideal gas constant static constexpr Scalar R = Dumux::Constants<Scalar>::R; @@ -71,7 +71,7 @@ public: template <class FluidState> void updatePure(const FluidState &fluidState) { - updatePure(fluidState.temperature(phaseIdx), + updatePure(fluidState.temperature(phaseIdx), fluidState.pressure(phaseIdx)); } @@ -125,15 +125,15 @@ public: // interaction coefficient as given in SPE5 Scalar Psi = StaticParams::interactionCoefficient(i, j); - + // mixing rule from Reid, page 82 - a += xi*xj*std::sqrt(pureParams_[i].a()*pureParams_[j].a())*(1 - Psi); + a += xi*xj*std::sqrt(pureParams_[i].a()*pureParams_[j].a())*(1 - Psi); } // mixing rule from Reid, page 82 b += xi * pureParams_[i].b(); } - + this->setA(a); this->setB(b); } @@ -165,8 +165,8 @@ public: */ const PureParams &pureParams(int compIdx) const { return pureParams_[compIdx]; } - - + + protected: PureParams pureParams_[numComponents]; }; diff --git a/dumux/material/MpNceos/pengrobinsonparamspure.hh b/dumux/material/MpNceos/pengrobinsonparamspure.hh index eebad5abb6..254eacd836 100644 --- a/dumux/material/MpNceos/pengrobinsonparamspure.hh +++ b/dumux/material/MpNceos/pengrobinsonparamspure.hh @@ -23,7 +23,7 @@ * \brief The Peng-Robinson parameters for a pure component * * See: - * + * * R. Reid, et al.: The Properties of Gases and Liquids, 4th edition, * McGraw-Hill, 1987, pp. 43-44 */ @@ -41,7 +41,7 @@ namespace Dumux * parameters of a pure component. * * See: - * + * * R. Reid, et al.: The Properties of Gases and Liquids, 4th edition, * McGraw-Hill, 1987, pp. 43-44 */ @@ -49,7 +49,7 @@ template <class Scalar, class ComponentT> class PengRobinsonParamsPure : public PengRobinsonParams<Scalar> { typedef PengRobinsonParams<Scalar> ParentType; - + // the ideal gas constant static const Scalar R = Dumux::Constants<Scalar>::R; @@ -61,7 +61,7 @@ public: * the component. * * See: - * + * * R. Reid, et al.: The Properties of Gases and Liquids, 4th edition, * McGraw-Hill, 1987, pp. 43-44 */ diff --git a/dumux/material/MpNcfluidstates/equilibriumfluidstate.hh b/dumux/material/MpNcfluidstates/equilibriumfluidstate.hh index d5f5eff514..c44b79d1be 100644 --- a/dumux/material/MpNcfluidstates/equilibriumfluidstate.hh +++ b/dumux/material/MpNcfluidstates/equilibriumfluidstate.hh @@ -51,7 +51,7 @@ public: { assign(fs); } /***************************************************** - * Generic access to fluid properties (No assumptions + * Generic access to fluid properties (No assumptions * on thermodynamic equilibrium required) *****************************************************/ /*! @@ -70,7 +70,7 @@ public: * \brief The mass fraction of a component in a phase [] */ Scalar massFraction(int phaseIdx, int compIdx) const - { + { return sumMassFractions(phaseIdx)* molarity(phaseIdx, compIdx)* @@ -148,7 +148,7 @@ public: */ Scalar temperature(int phaseIdx) const { return temperature_; } - + /*! * \brief The pressure of a fluid phase [Pa] */ @@ -205,13 +205,13 @@ public: /***************************************************** - * Setter methods. Note that these are not part of the + * Setter methods. Note that these are not part of the * generic FluidState interface but specific for each * implementation... *****************************************************/ - + /*! - * \brief Retrieve all parameters from an arbitrary fluid + * \brief Retrieve all parameters from an arbitrary fluid * state. * * \note If the other fluid state object is inconsistent with the @@ -240,49 +240,49 @@ public: * \brief Set the temperature [K] of a fluid phase */ void setTemperature(Scalar value) - { temperature_ = value; } + { temperature_ = value; } /*! * \brief Set the fluid pressure of a phase [Pa] */ void setPressure(int phaseIdx, Scalar value) - { pressure_[phaseIdx] = value; } + { pressure_[phaseIdx] = value; } /*! * \brief Set the saturation of a phase [] */ void setSaturation(int phaseIdx, Scalar value) - { saturation_[phaseIdx] = value; } + { saturation_[phaseIdx] = value; } /*! * \brief Set the mole fraction of a component in a phase [] */ void setMoleFraction(int phaseIdx, int compIdx, Scalar value) - { moleFraction_[phaseIdx][compIdx] = value; } + { moleFraction_[phaseIdx][compIdx] = value; } /*! * \brief Set the fugacity of a component in a phase [] */ void setFugacityCoefficient(int phaseIdx, int compIdx, Scalar value) - { fugacityCoefficient_[phaseIdx][compIdx] = value; } + { fugacityCoefficient_[phaseIdx][compIdx] = value; } /*! * \brief Set the density of a phase [kg / m^3] */ void setDensity(int phaseIdx, Scalar value) - { density_[phaseIdx] = value; } + { density_[phaseIdx] = value; } /*! * \brief Set the specific enthalpy of a phase [J/m^3] */ void setInternalEnergy(int phaseIdx, Scalar value) - { internalEnergy_[phaseIdx] = value; } + { internalEnergy_[phaseIdx] = value; } /*! * \brief Set the dynamic viscosity of a phase [Pa s] */ void setViscosity(int phaseIdx, Scalar value) - { viscosity_[phaseIdx] = value; } + { viscosity_[phaseIdx] = value; } /*! * \brief Calculatate the mean molar mass of a phase given that @@ -292,7 +292,7 @@ public: { averageMolarMass_[phaseIdx] = 0; sumMoleFractions_[phaseIdx] = 0; - + for (int compIdx = 0; compIdx < numComponents; ++compIdx) { sumMoleFractions_[phaseIdx] += moleFraction_[phaseIdx][compIdx]; averageMolarMass_[phaseIdx] += moleFraction_[phaseIdx][compIdx]*FluidSystem::molarMass(compIdx); @@ -301,7 +301,7 @@ public: Valgrind::CheckDefined(averageMolarMass_[phaseIdx]); Valgrind::CheckDefined(sumMoleFractions_[phaseIdx]); } - + /*! * \brief Make sure that all attributes are defined. * diff --git a/dumux/material/MpNcfluidstates/genericfluidstate.hh b/dumux/material/MpNcfluidstates/genericfluidstate.hh index d19bfce8df..9b4778c7c3 100644 --- a/dumux/material/MpNcfluidstates/genericfluidstate.hh +++ b/dumux/material/MpNcfluidstates/genericfluidstate.hh @@ -50,7 +50,7 @@ public: { Valgrind::SetUndefined(*this); } /***************************************************** - * Generic access to fluid properties (No assumptions + * Generic access to fluid properties (No assumptions * on thermodynamic equilibrium required) *****************************************************/ /*! @@ -70,7 +70,7 @@ public: * \brief The mass fraction of a component in a phase [] */ Scalar massFraction(int phaseIdx, int compIdx) const - { + { return sumMassFraction(phaseIdx) * moleFraction_[phaseIdx][compIdx] @@ -147,7 +147,7 @@ public: */ Scalar temperature(int phaseIdx) const { return temperature_[phaseIdx]; } - + /*! * \brief The pressure of a fluid phase [Pa] */ @@ -173,7 +173,7 @@ public: { return viscosity_[phaseIdx]; }; /***************************************************** - * Setter methods. Note that these are not part of the + * Setter methods. Note that these are not part of the * generic FluidState interface but specific for each * implementation... *****************************************************/ @@ -181,31 +181,31 @@ public: * \brief Set the temperature [K] of a fluid phase */ void setTemperature(int phaseIdx, Scalar value) - { temperature_[phaseIdx] = value; } + { temperature_[phaseIdx] = value; } /*! * \brief Set the fluid pressure of a phase [Pa] */ void setPressure(int phaseIdx, Scalar value) - { pressure_[phaseIdx] = value; } + { pressure_[phaseIdx] = value; } /*! * \brief Set the saturation of a phase [] */ void setSaturation(int phaseIdx, Scalar value) - { saturation_[phaseIdx] = value; } + { saturation_[phaseIdx] = value; } /*! * \brief Set the mole fraction of a component in a phase [] */ void setMoleFraction(int phaseIdx, int compIdx, Scalar value) - { moleFraction_[phaseIdx][compIdx] = value; } + { moleFraction_[phaseIdx][compIdx] = value; } /*! * \brief Set the fugacity of a component in a phase [] */ void setFugacityCoefficient(int phaseIdx, int compIdx, Scalar value) - { fugacityCoefficient_[phaseIdx][compIdx] = value; } + { fugacityCoefficient_[phaseIdx][compIdx] = value; } /*! * \brief Set the density of a phase [kg / m^3] @@ -223,7 +223,7 @@ public: * \brief Set the dynamic viscosity of a phase [Pa s] */ void setViscosity(int phaseIdx, Scalar value) - { viscosity_[phaseIdx] = value; } + { viscosity_[phaseIdx] = value; } /*! * \brief Calculatate the mean molar mass of a phase given that @@ -233,7 +233,7 @@ public: { averageMolarMass_[phaseIdx] = 0; sumMoleFractions_[phaseIdx] = 0; - + for (int compIdx = 0; compIdx < numComponents; ++compIdx) { sumMoleFractions_[phaseIdx] += moleFraction_[phaseIdx][compIdx]; averageMolarMass_[phaseIdx] += moleFraction_[phaseIdx][compIdx]*FluidSystem::molarMass(compIdx); @@ -242,9 +242,9 @@ public: Valgrind::CheckDefined(averageMolarMass_[phaseIdx]); Valgrind::CheckDefined(sumMoleFractions_[phaseIdx]); } - + /*! - * \brief Retrieve all parameters from an arbitrary fluid + * \brief Retrieve all parameters from an arbitrary fluid * state. */ template <class FluidState> diff --git a/dumux/material/MpNcfluidstates/immisciblefluidstate.hh b/dumux/material/MpNcfluidstates/immisciblefluidstate.hh index b3b548fcd3..57f6ba5194 100644 --- a/dumux/material/MpNcfluidstates/immisciblefluidstate.hh +++ b/dumux/material/MpNcfluidstates/immisciblefluidstate.hh @@ -53,7 +53,7 @@ public: { assign(fs); } /***************************************************** - * Generic access to fluid properties (No assumptions + * Generic access to fluid properties (No assumptions * on thermodynamic equilibrium required) *****************************************************/ /*! @@ -118,13 +118,13 @@ public: * completely out of a phase is 0 to feed it zero fugacity.) */ Scalar fugacity(int phaseIdx, int compIdx) const - { + { if (phaseIdx == compIdx) return pressure(phaseIdx); else return 0; }; - + /*! * \brief The fugacity coefficient of a component in a phase [Pa] * @@ -164,7 +164,7 @@ public: */ Scalar temperature(int phaseIdx) const { return temperature_; } - + /*! * \brief The pressure of a fluid phase [Pa] */ @@ -211,13 +211,13 @@ public: /***************************************************** - * Setter methods. Note that these are not part of the + * Setter methods. Note that these are not part of the * generic FluidState interface but specific for each * implementation... *****************************************************/ - + /*! - * \brief Retrieve all parameters from an arbitrary fluid + * \brief Retrieve all parameters from an arbitrary fluid * state. * * \note If the other fluid state object is inconsistent with the @@ -241,38 +241,38 @@ public: * \brief Set the temperature [K] of a fluid phase */ void setTemperature(Scalar value) - { temperature_ = value; } + { temperature_ = value; } /*! * \brief Set the fluid pressure of a phase [Pa] */ void setPressure(int phaseIdx, Scalar value) - { pressure_[phaseIdx] = value; } + { pressure_[phaseIdx] = value; } /*! * \brief Set the saturation of a phase [] */ void setSaturation(int phaseIdx, Scalar value) - { saturation_[phaseIdx] = value; } + { saturation_[phaseIdx] = value; } /*! * \brief Set the density of a phase [kg / m^3] */ void setDensity(int phaseIdx, Scalar value) - { density_[phaseIdx] = value; } + { density_[phaseIdx] = value; } /*! * \brief Set the specific internal energy of a phase [J/m^3] */ void setInternalEnergy(int phaseIdx, Scalar value) - { internalEnergy_[phaseIdx] = value; } + { internalEnergy_[phaseIdx] = value; } /*! * \brief Set the dynamic viscosity of a phase [Pa s] */ void setViscosity(int phaseIdx, Scalar value) - { viscosity_[phaseIdx] = value; } - + { viscosity_[phaseIdx] = value; } + /*! * \brief Make sure that all attributes are defined. * diff --git a/dumux/material/MpNcfluidsystems/2pimmisciblefluidsystem.hh b/dumux/material/MpNcfluidsystems/2pimmisciblefluidsystem.hh index eded3cea96..ca1ee9faa0 100644 --- a/dumux/material/MpNcfluidsystems/2pimmisciblefluidsystem.hh +++ b/dumux/material/MpNcfluidsystems/2pimmisciblefluidsystem.hh @@ -83,10 +83,10 @@ public: static const char *phaseName(int phaseIdx) { assert(0 <= phaseIdx && phaseIdx < numPhases); - + static const char *name[] = { "w", - "n" + "n" }; return name[phaseIdx]; } @@ -122,7 +122,7 @@ public: // we assume immisibility return true; } - + /**************************************** * Component related static parameters ****************************************/ @@ -172,7 +172,7 @@ public: if (compIdx == wCompIdx) return WettingPhase::criticalTemperature(); - return NonWettingPhase::criticalTemperature(); + return NonWettingPhase::criticalTemperature(); }; /*! @@ -184,7 +184,7 @@ public: if (compIdx == wCompIdx) return WettingPhase::criticalPressure(); - return NonWettingPhase::criticalPressure(); + return NonWettingPhase::criticalPressure(); }; /*! @@ -196,7 +196,7 @@ public: if (compIdx == wCompIdx) return WettingPhase::acentricFactor(); - return NonWettingPhase::acentricFactor(); + return NonWettingPhase::acentricFactor(); }; /**************************************** @@ -229,7 +229,7 @@ public: int phaseIdx) { assert(0 <= phaseIdx && phaseIdx < numPhases); - + Scalar temperature = fluidState.temperature(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == wPhaseIdx) @@ -264,7 +264,7 @@ public: return 1.0; return std::numeric_limits<Scalar>::infinity(); } - + /*! * \brief Return the viscosity of a phase [Pa*s]. * @@ -281,7 +281,7 @@ public: int phaseIdx) { assert(0 <= phaseIdx && phaseIdx < numPhases); - + Scalar temperature = fluidState.temperature(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == wPhaseIdx) @@ -296,7 +296,7 @@ public: * Molecular diffusion of a compoent \f$\kappa\f$ is caused by a * gradient of the chemical potential and follows the law * - * \f[ J = - D \grad mu_\kappa \f] + * \f[ J = - D \grad mu_\kappa \f] * * where \f$\mu_\kappa\f$ is the component's chemical potential, * \f$D\f$ is the diffusion coefficient and \f$J\f$ is the @@ -325,12 +325,12 @@ public: * \f$i\f$ and \f$j\f$ in this phase. */ template <class FluidState> - static Scalar binaryDiffusionCoefficient(const FluidState &fluidState, + static Scalar binaryDiffusionCoefficient(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx, int compIIdx, int compJIdx) - + { DUNE_THROW(Dune::InvalidStateException, "Binary diffusion coefficients of components are meaningless if" @@ -353,7 +353,7 @@ public: int phaseIdx) { assert(0 <= phaseIdx && phaseIdx < numPhases); - + Scalar temperature = fluidState.temperature(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == wPhaseIdx) @@ -370,7 +370,7 @@ public: int phaseIdx) { assert(0 <= phaseIdx && phaseIdx < numPhases); - + Scalar temperature = fluidState.temperature(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == wPhaseIdx) @@ -391,7 +391,7 @@ public: int phaseIdx) { assert(0 <= phaseIdx && phaseIdx < numPhases); - + Scalar temperature = fluidState.temperature(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == wPhaseIdx) diff --git a/dumux/material/MpNcfluidsystems/h2on2fluidsystem.hh b/dumux/material/MpNcfluidsystems/h2on2fluidsystem.hh index a296380484..173f1d559a 100644 --- a/dumux/material/MpNcfluidsystems/h2on2fluidsystem.hh +++ b/dumux/material/MpNcfluidsystems/h2on2fluidsystem.hh @@ -73,7 +73,7 @@ public: static constexpr int lPhaseIdx = 0; //! Index of the gas phase static constexpr int gPhaseIdx = 1; - + //! The components for pure water typedef TabulatedH2O H2O; //typedef SimpleH2O H2O; @@ -81,7 +81,7 @@ public: //! The components for pure nitrogen typedef SimpleN2 N2; - + /*! * \brief Return the human readable name of a fluid phase */ @@ -89,7 +89,7 @@ public: { static const char *name[] = { "l", - "g" + "g" }; assert(0 <= phaseIdx && phaseIdx < numPhases); @@ -132,7 +132,7 @@ public: //! Number of components in the fluid system static constexpr int numComponents = 2; - + static constexpr int H2OIdx = 0; static constexpr int N2Idx = 1; @@ -149,7 +149,7 @@ public: assert(0 <= compIdx && compIdx < numComponents); return name[compIdx]; } - + /*! * \brief Return the molar mass of a component in [kg/mol]. */ @@ -227,8 +227,8 @@ public: */ static void init() { - init(/*tempMin=*/273.15, - /*tempMax=*/623.15, + init(/*tempMin=*/273.15, + /*tempMax=*/623.15, /*numTemp=*/100, /*pMin=*/-10, /*pMax=*/20e6, @@ -236,7 +236,7 @@ public: } /*! - * \brief Initialize the fluid system's static parameters using + * \brief Initialize the fluid system's static parameters using * problem specific temperature and pressure ranges */ static void init(Scalar tempMin, Scalar tempMax, unsigned nTemp, @@ -246,7 +246,7 @@ public: std::cout << "Initializing tables for the H2O fluid properties (" << nTemp*nPress << " entries).\n"; - + TabulatedH2O::init(tempMin, tempMax, nTemp, pressMin, pressMax, nPress); } @@ -273,10 +273,10 @@ public: case gPhaseIdx: // assume ideal gas return - IdealGas::molarDensity(T, p) + IdealGas::molarDensity(T, p) * fluidState.averageMolarMass(gPhaseIdx); } - + DUNE_THROW(Dune::InvalidStateException, "Unhandled phase index " << phaseIdx); }; @@ -302,7 +302,7 @@ public: Scalar T = fluidState.temperature(phaseIdx); Scalar p = fluidState.pressure(phaseIdx); switch (phaseIdx) { - case lPhaseIdx: + case lPhaseIdx: switch (compIdx) { case H2OIdx: return H2O::vaporPressure(T)/p; case N2Idx: return BinaryCoeff::H2O_N2::henry(T)/p; @@ -313,7 +313,7 @@ public: DUNE_THROW(Dune::InvalidStateException, "Unhandled phase or component index"); } - + /*! * \brief Calculate the dynamic viscosity of a fluid phase [Pa*s] */ @@ -334,7 +334,7 @@ public: // assume pure water for the gas phase return N2::gasViscosity(T, p); } - + DUNE_THROW(Dune::InvalidStateException, "Unhandled phase index " << phaseIdx); }; @@ -345,7 +345,7 @@ public: * Molecular diffusion of a compoent \f$\kappa\f$ is caused by a * gradient of the chemical potential and follows the law * - * \f[ J = - D \grad mu_\kappa \f] + * \f[ J = - D \grad mu_\kappa \f] * * where \f$\mu_\kappa\f$ is the component's chemical potential, * \f$D\f$ is the diffusion coefficient and \f$J\f$ is the @@ -373,12 +373,12 @@ public: * \f$i\f$ and \f$j\f$ in this phase. */ template <class FluidState> - static Scalar binaryDiffusionCoefficient(const FluidState &fluidState, + static Scalar binaryDiffusionCoefficient(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx, int compIIdx, int compJIdx) - + { if (compIIdx > compJIdx) std::swap(compIIdx, compJIdx); @@ -396,7 +396,7 @@ public: #endif Scalar T = fluidState.temperature(phaseIdx); - Scalar p = fluidState.pressure(phaseIdx); + Scalar p = fluidState.pressure(phaseIdx); switch (phaseIdx) { case lPhaseIdx: @@ -435,7 +435,7 @@ public: * enthalpy of solution for this system. ... */ template <class FluidState> - static Scalar internalEnergy(const FluidState &fluidState, + static Scalar internalEnergy(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) { @@ -445,13 +445,13 @@ public: Valgrind::CheckDefined(p); if (phaseIdx == lPhaseIdx) { // TODO: correct way to deal with the solutes??? - return + return H2O::liquidInternalEnergy(T, p) ; } else { // assume ideal gas Scalar XH2O = fluidState.massFrac(gPhaseIdx, H2OIdx); - Scalar XN2 = fluidState.massFrac(gPhaseIdx, N2Idx); + Scalar XN2 = fluidState.massFrac(gPhaseIdx, N2Idx); Scalar result = 0; result += XH2O*H2O::gasInternalEnergy(T, p); result += XN2*N2::gasInternalEnergy(T, p); @@ -484,7 +484,7 @@ public: } DUNE_THROW(Dune::InvalidStateException, "Unhandled phase index " << phaseIdx); } - + /*! * \brief Specific isobaric heat capacity of a fluid phase. * \f$\mathrm{[J/kg]}\f$. diff --git a/dumux/material/MpNcfluidsystems/nullparametercache.hh b/dumux/material/MpNcfluidsystems/nullparametercache.hh index 2539519780..7efe8a584c 100644 --- a/dumux/material/MpNcfluidsystems/nullparametercache.hh +++ b/dumux/material/MpNcfluidsystems/nullparametercache.hh @@ -35,14 +35,14 @@ namespace Dumux class NullParameterCache : public ParameterCacheBase<NullParameterCache> { public: - NullParameterCache() + NullParameterCache() {}; - + template <class FluidState> void updateAll(const FluidState &fs) { }; - + /*! * \brief Update all cached parameters of a specific fluid phase */ diff --git a/dumux/material/MpNcfluidsystems/parametercachebase.hh b/dumux/material/MpNcfluidsystems/parametercachebase.hh index 71b2984f60..1c381b4f41 100644 --- a/dumux/material/MpNcfluidsystems/parametercachebase.hh +++ b/dumux/material/MpNcfluidsystems/parametercachebase.hh @@ -34,16 +34,16 @@ template <class Implementation> class ParameterCacheBase { public: - ParameterCacheBase() + ParameterCacheBase() {}; - + template <class FluidState> void updateAll(const FluidState &fs) { for (int phaseIdx = 0; phaseIdx < FluidState::numPhases; ++phaseIdx) updatePhase(fs, phaseIdx); }; - + /*! * \brief Update all cached parameters of a specific fluid phase */ @@ -103,7 +103,7 @@ public: * updatePhase()! */ template <class FluidState> - void updatePhaseSingleMoleFraction(const FluidState &fs, + void updatePhaseSingleMoleFraction(const FluidState &fs, int phaseIdx, int compIdx) { @@ -112,7 +112,7 @@ public: private: Implementation &asImp_() - { return *static_cast<Implementation*>(this); } + { return *static_cast<Implementation*>(this); } }; } // end namepace diff --git a/dumux/material/fluidmatrixinteractions/Mp/2padapter.hh b/dumux/material/fluidmatrixinteractions/Mp/2padapter.hh index e0c2c67b0e..1febb97ad7 100644 --- a/dumux/material/fluidmatrixinteractions/Mp/2padapter.hh +++ b/dumux/material/fluidmatrixinteractions/Mp/2padapter.hh @@ -55,14 +55,14 @@ public: */ template <class ContainerT, class FluidState> static void capillaryPressures(ContainerT &values, - const Params ¶ms, + const Params ¶ms, const FluidState &state) { // non-wetting phase gets the capillary pressure added values[nPhaseIdx] = 0; // wetting phase does not get anything added - values[wPhaseIdx] = - TwoPLaw::pC(params, state.saturation(wPhaseIdx)); + values[wPhaseIdx] = - TwoPLaw::pC(params, state.saturation(wPhaseIdx)); } /*! @@ -70,7 +70,7 @@ public: */ template <class ContainerT, class FluidState> static void relativePermeabilities(ContainerT &values, - const Params ¶ms, + const Params ¶ms, const FluidState &state) { values[wPhaseIdx] = TwoPLaw::krw(params, state.saturation(wPhaseIdx)); diff --git a/dumux/material/fluidmatrixinteractions/Mp/Mpbrookscorey.hh b/dumux/material/fluidmatrixinteractions/Mp/Mpbrookscorey.hh index 95b5a41d09..bd10d1c791 100644 --- a/dumux/material/fluidmatrixinteractions/Mp/Mpbrookscorey.hh +++ b/dumux/material/fluidmatrixinteractions/Mp/Mpbrookscorey.hh @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ /*! - * \file + * \file * Implements a Brooks-Corey saturation-capillary pressure relation * for M-phase fluid systems. */ @@ -49,7 +49,7 @@ public: typedef ParamsT Params; typedef typename Params::Scalar Scalar; enum { numPhases = numPhasesV }; - + /*! * \brief The Brooks-Corey capillary pressure-saturation curve. * @@ -60,14 +60,14 @@ public: */ template <class pcContainerT, class SatContainerT> static void pC(pcContainerT &pc, - const Params ¶ms, + const Params ¶ms, const SatContainerT &saturations, Scalar temperature) { for (int i = 0; i < numPhases; ++i) { Scalar S = saturations[i]; assert(0 <= S && S <= 1); - pc[i] = + pc[i] = params.entryPressure(i) * std::pow(S, -1.0/params.alpha(i)); } @@ -88,7 +88,7 @@ public: */ template <class SatContainerT, class pcContainerT> static void S(SatContainerT &saturations, - const Params ¶ms, + const Params ¶ms, const pcContainerT &pc, Scalar temperature) { @@ -139,7 +139,7 @@ public: */ template <class krContainerT, class SatContainerT> static void kr(krContainerT &kr, - const Params ¶ms, + const Params ¶ms, const SatContainerT &saturations, Scalar temperature) { diff --git a/dumux/material/fluidmatrixinteractions/Mp/Mpbrookscoreyparams.hh b/dumux/material/fluidmatrixinteractions/Mp/Mpbrookscoreyparams.hh index 49d8c11f4a..beb341bac4 100644 --- a/dumux/material/fluidmatrixinteractions/Mp/Mpbrookscoreyparams.hh +++ b/dumux/material/fluidmatrixinteractions/Mp/Mpbrookscoreyparams.hh @@ -19,7 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ /*! - * \file + * \file * Reference implementation of parameters for the M-phase brookscorey * material material. */ diff --git a/dumux/material/fluidmatrixinteractions/Mp/Mplinearmaterial.hh b/dumux/material/fluidmatrixinteractions/Mp/Mplinearmaterial.hh index d9e52cb32d..cbf2aa651e 100644 --- a/dumux/material/fluidmatrixinteractions/Mp/Mplinearmaterial.hh +++ b/dumux/material/fluidmatrixinteractions/Mp/Mplinearmaterial.hh @@ -58,19 +58,19 @@ public: p_C = (1 - \overline{S}_w) (p_{C,max} - p_{C,entry}) + p_{C,entry} \f] * - * \param values Container for the return values + * \param values Container for the return values * \param params Parameters * \param state The fluid state */ template <class ContainerT, class FluidState> static void capillaryPressures(ContainerT &values, - const Params ¶ms, + const Params ¶ms, const FluidState &state) { for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { Scalar S = state.saturation(phaseIdx); - values[phaseIdx] = - S*params.pcMaxSat(phaseIdx) + + values[phaseIdx] = + S*params.pcMaxSat(phaseIdx) + (1 - S)*params.pcMinSat(phaseIdx); } } @@ -90,11 +90,11 @@ public: */ template <class SatContainerT, class FluidState> static void saturations(SatContainerT &saturations, - const Params ¶ms, + const Params ¶ms, const FluidState &state) { for (int i = 0; i < numPhases; ++i) { - saturations[i] = + saturations[i] = (pc[i] - params.pcMaxSat(i)) / (params.pcMinSat(i) - params.pcMaxSat(i)); @@ -108,7 +108,7 @@ public: */ template <class ContainerT, class FluidState> static void relativePermeabilities(ContainerT &values, - const Params ¶ms, + const Params ¶ms, const FluidState &state) { for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) diff --git a/dumux/material/fluidmatrixinteractions/Mp/Mplinearmaterialparams.hh b/dumux/material/fluidmatrixinteractions/Mp/Mplinearmaterialparams.hh index e435ec8264..fa678647ad 100644 --- a/dumux/material/fluidmatrixinteractions/Mp/Mplinearmaterialparams.hh +++ b/dumux/material/fluidmatrixinteractions/Mp/Mplinearmaterialparams.hh @@ -19,7 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ /*! - * \file linearmaterialparams.hh + * \file linearmaterialparams.hh * * Reference implementation of parameters for the M-phase linear * material material. diff --git a/dumux/material/fluidsystems/liquidphase.hh b/dumux/material/fluidsystems/liquidphase.hh index 24f009ddee..7bed888d9f 100644 --- a/dumux/material/fluidsystems/liquidphase.hh +++ b/dumux/material/fluidsystems/liquidphase.hh @@ -36,7 +36,7 @@ class LiquidPhase { public: typedef ComponentT Component; - + /*! * \brief A human readable name for the compoent. */ @@ -130,4 +130,4 @@ public: }; } // namespace -#endif +#endif diff --git a/dumux/nonlinear/newtoncontroller.hh b/dumux/nonlinear/newtoncontroller.hh index 827b73aa2a..189b48cbc2 100644 --- a/dumux/nonlinear/newtoncontroller.hh +++ b/dumux/nonlinear/newtoncontroller.hh @@ -183,7 +183,7 @@ public: setAbsTolerance(GET_PARAM(TypeTag, Scalar, Newton, AbsTolerance)); setTargetSteps(GET_PARAM(TypeTag, int, Newton, TargetSteps)); setMaxSteps(GET_PARAM(TypeTag, int, Newton, MaxSteps)); - + verbose_ = true; numSteps_ = 0; }; diff --git a/test/boxmodels/MpNc/obstacleproblem.hh b/test/boxmodels/MpNc/obstacleproblem.hh index 33730566a3..6c71a31c1c 100644 --- a/test/boxmodels/MpNc/obstacleproblem.hh +++ b/test/boxmodels/MpNc/obstacleproblem.hh @@ -168,7 +168,7 @@ class ObstacleProblem // Grid and world dimension dim = GridView::dimension, dimWorld = GridView::dimensionworld, - + numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), numComponents = GET_PROP_VALUE(TypeTag, PTAG(NumComponents)), @@ -242,7 +242,7 @@ public: << " timestep divisions. dt=" << this->timeManager().timeStepSize()); - if (this->model().update(this->newtonMethod(), + if (this->model().update(this->newtonMethod(), this->newtonController())) { // sucessfull update. remember time step size @@ -254,7 +254,7 @@ public: if (i > 0 && this->gridView().comm().rank() == 0) std::cout << "Newton solver did not converge. Retrying with time step of " << this->timeManager().timeStepSize() << "sec\n"; - + // update failed Scalar dt = this->timeManager().timeStepSize(); Scalar nextDt = dt / 2; @@ -268,7 +268,7 @@ public: if (!this->model().update(this->newtonMethod(), this->newtonController())) break; - + // sucessfull update. increase time step size successDt = this->timeManager().timeStepSize(); Scalar nextDt = successDt*1.25; @@ -281,7 +281,7 @@ public: std::cout.flush(); this->model().updateFailed(); } - + // do a last update with the largest successful time step this->newtonController().setVerbose(true); this->timeManager().setTimeStepSize(successDt); @@ -289,7 +289,7 @@ public: this->model().update(this->newtonMethod(), this->newtonController()); #endif } - + /*! * \brief Called directly after the time integration. */ @@ -301,8 +301,8 @@ public: this->model().globalPhaseStorage(phaseStorage, phaseIdx); if (this->gridView().comm().rank() == 0) { - std::cout - <<"Storage in " + std::cout + <<"Storage in " << FluidSystem::phaseName(phaseIdx) << "Phase: [" << phaseStorage @@ -311,16 +311,16 @@ public: } } - // Calculate total storage terms + // Calculate total storage terms PrimaryVariables storage; this->model().globalStorage(storage); - + // Write mass balance information for rank 0 if (this->gridView().comm().rank() == 0) { - std::cout + std::cout <<"Storage total: [" << storage << "]" << "\n"; - } + } } /*! @@ -444,12 +444,12 @@ public: /*! * \brief Write a restart file? */ - bool shouldWriteRestartFile() const + bool shouldWriteRestartFile() const { return ParentType::shouldWriteRestartFile(); } - + #if USE_2P2C /*! * \brief Return the initial phase state inside a control volume. @@ -502,13 +502,13 @@ private: xl[FluidSystem::N2Idx] = 0.0; beta[FluidSystem::H2OIdx] = FluidSystem::H2O::vaporPressure(temperature_); beta[FluidSystem::N2Idx] = Dumux::BinaryCoeff::H2O_N2::henry(temperature_); - + // assign the primary variables for (int i = 0; i < numComponents; ++i) values[fug0Idx + i] = xl[i]*beta[i]; for (int i = 0; i < numPhases - 1; ++i) - values[S0Idx + i] = S[i]; + values[S0Idx + i] = S[i]; values[p0Idx] = p[0]; } @@ -523,18 +523,18 @@ private: p[lPhaseIdx] = pg; p[gPhaseIdx] = pg; - - + + xg[FluidSystem::H2OIdx] = 0.01; xg[FluidSystem::N2Idx] = 0.99; - + // assign the primary variables for (int i = 0; i < numComponents; ++i) values[fug0Idx + i] = xg[i]*pg; for (int i = 0; i < numPhases - 1; ++i) - values[S0Idx + i] = S[i]; + values[S0Idx + i] = S[i]; values[p0Idx] = p[0]; } diff --git a/test/boxmodels/MpNc/obstaclespatialparameters.hh b/test/boxmodels/MpNc/obstaclespatialparameters.hh index a5634cb33e..60a2d11703 100644 --- a/test/boxmodels/MpNc/obstaclespatialparameters.hh +++ b/test/boxmodels/MpNc/obstaclespatialparameters.hh @@ -120,7 +120,7 @@ public: fineK_ = 1e-15; // the porosity - porosity_ = 0.3; + porosity_ = 0.3; // residual saturations fineMaterialParams_.setSwr(0.0); @@ -134,7 +134,7 @@ public: coarseMaterialParams_.setEntryPC(0.0); fineMaterialParams_.setMaxPC(0.0); coarseMaterialParams_.setMaxPC(0.0); - + /* // entry pressures for Brooks-Corey fineMaterialParams_.setPe(5e3); diff --git a/test/common/generalproblem/generallensproblem.hh b/test/common/generalproblem/generallensproblem.hh index 50b8153445..398495c2fe 100644 --- a/test/common/generalproblem/generallensproblem.hh +++ b/test/common/generalproblem/generallensproblem.hh @@ -277,7 +277,7 @@ public: bool shouldWriteOutput() const { if (this->timeManager().time() < eps_ || - this->timeManager().willBeFinished() || + this->timeManager().willBeFinished() || this->timeManager().episodeWillBeOver()) { return true; -- GitLab