Commit ce76dc2d authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[freeflow] reduced excessive line lengths, like proposed in #FS213, target line

length = 150, thanks to kristopherg

reviewed by fetzer


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@12430 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 1a623a8a
......@@ -68,7 +68,11 @@ class Stokes2cFluxVariables : public StokesFluxVariables<TypeTag>
typedef Dune::FieldVector<Scalar, dim> DimVector;
public:
/* Use Stokes n-component Model freeflow/stokesnc.The 2c model gets replaced by the more general nc model. Adaption to the new model is straight forward. Please not that several functions in the fluxvariables now need an input argument compIdx. Associated variables are of size number of components. The nc model uses mole fraction formulations of the transport equations as default. Mass fractions can be employed via the poperty UseMoles.*/
/* Use Stokes n-component Model freeflow/stokesnc.The 2c model gets replaced by the more
* general nc model. Adaption to the new model is straight forward. Please not that several
* functions in the fluxvariables now need an input argument compIdx. Associated variables
* are of size number of components. The nc model uses mole fraction formulations of the
* transport equations as default. Mass fractions can be employed via the poperty UseMoles.*/
DUNE_DEPRECATED_MSG("Use stokesnc model")
Stokes2cFluxVariables(const Problem &problem,
const Element &element,
......
......@@ -41,17 +41,20 @@ template <class TypeTag, int PVOffset = 0>
struct Stokes2cCommonIndices : public StokesCommonIndices<TypeTag>
{
// Phase index
static const int phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx); //!< Index of the employed phase in case of a two-phase fluidsystem (set by default to nPhase)
//!< Index of the employed phase in case of a two-phase fluidsystem (set by default to nPhase)
static const int phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx);
// Component indices
static const int phaseCompIdx = phaseIdx; //!< The index of the main component of the considered phase
static const int transportCompIdx = (unsigned int)(1-phaseIdx); //!< The index of the transported (minor) component; ASSUMES phase indices of 0 and 1
//!< The index of the transported (minor) component; ASSUMES phase indices of 0 and 1
static const int transportCompIdx = (unsigned int)(1-phaseIdx);
// equation and primary variable indices
static const int dim = StokesCommonIndices<TypeTag>::dim;
static const int transportEqIdx = PVOffset + dim+1; //!< The index for the transport equation
static const int massOrMoleFracIdx = transportEqIdx; //!< The index of the mass or mole fraction of the transported component in primary variable vectors
//!< The index of the mass or mole fraction of the transported component in primary variable vectors
static const int massOrMoleFracIdx = transportEqIdx;
};
} // end namespace
......
......@@ -63,7 +63,11 @@ class Stokes2cLocalResidual : public StokesLocalResidual<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
public:
/* Use Stokes n-component Model freeflow/stokesnc.The 2c model gets replaced by the more general nc model. Adaption to the new model is straight forward. Please not that several functions in the fluxvariables now need an input argument compIdx. Associated variables are of size number of components. The nc model uses mole fraction formulations of the transport equations as default. Mass fractions can be employed via the poperty UseMoles.*/
/* Use Stokes n-component Model freeflow/stokesnc.The 2c model gets replaced by the more
* general nc model. Adaption to the new model is straight forward. Please not that several
* functions in the fluxvariables now need an input argument compIdx. Associated variables
* are of size number of components. The nc model uses mole fraction formulations of the
* transport equations as default. Mass fractions can be employed via the poperty UseMoles.*/
DUNE_DEPRECATED_MSG("Use stokesnc model")
Stokes2cLocalResidual(){}
......
......@@ -85,7 +85,11 @@ template<class TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;
public:
/* Use Stokes n-component Model freeflow/stokesnc.The 2c model gets replaced by the more general nc model. Adaption to the new model is straight forward. Please not that several functions in the fluxvariables now need an input argument compIdx. Associated variables are of size number of components. The nc model uses mole fraction formulations of the transport equations as default. Mass fractions can be employed via the poperty UseMoles.*/
/* Use Stokes n-component Model freeflow/stokesnc.The 2c model gets replaced by the more
* general nc model. Adaption to the new model is straight forward. Please not that several
* functions in the fluxvariables now need an input argument compIdx. Associated variables
* are of size number of components. The nc model uses mole fraction formulations of the
* transport equations as default. Mass fractions can be employed via the poperty UseMoles.*/
DUNE_DEPRECATED_MSG("Use stokesnc model")
Stokes2cModel(){}
......
......@@ -63,7 +63,11 @@ class Stokes2cVolumeVariables : public StokesVolumeVariables<TypeTag>
enum { massOrMoleFracIdx = Indices::massOrMoleFracIdx };
public:
/* Use Stokes n-component Model freeflow/stokesnc.The 2c model gets replaced by the more general nc model. Adaption to the new model is straight forward. Please not that several functions in the fluxvariables now need an input argument compIdx. Associated variables are of size number of components. The nc model uses mole fraction formulations of the transport equations as default. Mass fractions can be employed via the poperty UseMoles.*/
/* Use Stokes n-component Model freeflow/stokesnc.The 2c model gets replaced by the more
* general nc model. Adaption to the new model is straight forward. Please not that several
* functions in the fluxvariables now need an input argument compIdx. Associated variables
* are of size number of components. The nc model uses mole fraction formulations of the
* transport equations as default. Mass fractions can be employed via the poperty UseMoles.*/
DUNE_DEPRECATED_MSG("Use stokesnc model")
Stokes2cVolumeVariables(){}
......
......@@ -45,29 +45,39 @@ struct StokesncCommonIndices : public StokesCommonIndices<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
public:
// Dimension (copied for convenience)
// Dimension (copied for convenience)
static const int dim = StokesCommonIndices<TypeTag>::dim; //!< Number of dimensions
// Phase Index
static const int phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx); //!< Index of the employed phase in case of a two-phase fluidsystem (set by default to nPhase)
//!< Index of the employed phase in case of a two-phase fluidsystem (set by default to nPhase)
static const int phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx);
// Number of Components
//!< Number of components in employed fluidsystem
static const int numComponents = FluidSystem::numComponents;
// Component indices
//!< The index of the main component of the considered phase
static const int phaseCompIdx = phaseIdx;
//!< The index of the first transported component; ASSUMES phase indices of 0 and 1
static const int transportCompIdx = (unsigned int)(1-phaseIdx);
// Transport equation indices
//!< The index of the mass conservation equation of the first component. In analogy to porous media models "conti"
//!< is used here to describe mass conservation equations, i.e total mass balance and transport equations.
static const int conti0EqIdx = PVOffset + dim;
//!< The index of the mass balance equation sits on the slot of the employed phase
static const int massBalanceIdx = conti0EqIdx + phaseCompIdx;
//!< The index of the transport equation for a two component model.
//!< For n>2 please don't use this index, because it looses its actual meaning.
static const int transportEqIdx = conti0EqIdx + transportCompIdx;
// Number of Components
static const int numComponents = FluidSystem::numComponents; //!< Number of components in employed fluidsystem
// Component indices
static const int phaseCompIdx = phaseIdx; //!< The index of the main component of the considered phase
static const int transportCompIdx = (unsigned int)(1-phaseIdx); //!< The index of the first transported component; ASSUMES phase indices of 0 and 1
// Transport equation indices
static const int conti0EqIdx = PVOffset + dim; //!< The index of the mass conservation equation of the first component. In analogy to porous media models "conti" is used here to describe mass conservation equations, i.e total mass balance and transport equations.
static const int massBalanceIdx = conti0EqIdx + phaseCompIdx; //!< The index of the mass balance equation sits on the slot of the employed phase
static const int transportEqIdx = conti0EqIdx + transportCompIdx; //!< The index of the transport equation for a two component model. For n>2 please don't use this index, because it looses its actual meaning.
// Primary variables
static const int massOrMoleFracIdx = transportEqIdx; //!< The index of the first mass or mole fraction of the transported component in primary variable vectors
static const int pressureIdx = massBalanceIdx; //!< The index of the pressure in primary variable vectors
// Primary variables
//!< The index of the first mass or mole fraction of the transported component in primary variable vectors
static const int massOrMoleFracIdx = transportEqIdx;
//!< The index of the pressure in primary variable vectors
static const int pressureIdx = massBalanceIdx;
};
} // end namespace
......
......@@ -85,7 +85,8 @@ public:
// Model is restricted to 2 components when using mass fractions
if (!useMoles && numComponents>2)
{
DUNE_THROW(Dune::NotImplemented, "This model is restricted to 2 components when using mass fractions! To use mole fractions set property UseMoles true ...");
DUNE_THROW(Dune::NotImplemented, "This model is restricted to 2 components when using mass fractions!\
To use mole fractions set property UseMoles true ...");
}
// set the mole fractions first
......@@ -148,7 +149,7 @@ public:
// convert mass to mole fractions and set the fluid state
fluidState.setMoleFraction(phaseIdx, transportCompIdx, massOrMoleFrac[transportCompIdx]*avgMolarMass/M1);
fluidState.setMoleFraction(phaseIdx, phaseCompIdx, massOrMoleFrac[phaseCompIdx]*avgMolarMass/M2);
fluidState.setMoleFraction(phaseIdx, phaseCompIdx, massOrMoleFrac[phaseCompIdx]*avgMolarMass/M2);
}
else
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment