Commit cd353ddc authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[folder structure] rename files in dumux/material, adapt includes

parent 54518cec
......@@ -30,7 +30,7 @@
//Dumux-includes
#include <dumux/decoupled/common/decoupledproperties.hh>
#include <dumux/material/spatialparams/fvspatialparams1p.hh>
#include <dumux/material/spatialparams/fv1p.hh>
namespace Dumux
{
......
......@@ -33,7 +33,7 @@
//Dumux-includes
#include <dumux/decoupled/common/decoupledproperties.hh>
#include "2pindices.hh"
#include <dumux/material/spatialparams/fvspatialparams.hh>
#include <dumux/material/spatialparams/fv.hh>
namespace Dumux
{
......@@ -85,8 +85,8 @@ NEW_PROP_TAG( ImpetErrorTermUpperBound );
#include <dumux/decoupled/common/variableclass.hh>
#include <dumux/decoupled/2p/celldata2p.hh>
#include <dumux/material/fluidsystems/2pimmisciblefluidsystem.hh>
#include <dumux/material/fluidstates/isothermalimmisciblefluidstate.hh>
#include <dumux/material/fluidsystems/2pimmiscible.hh>
#include <dumux/material/fluidstates/isothermalimmiscible.hh>
namespace Dumux
{
......
#ifndef DUMUX_2P2C_FLUID_STATE_HH
#warning "dumux/decoupled/2p2c/2p2cfluidstate.hh is deprecated, use dumux/material/fluidstates/2p2cfluidstate.hh instead."
#include <dumux/material/fluidstates/2p2cfluidstate.hh>
#warning "dumux/decoupled/2p2c/2p2cfluidstate.hh is deprecated, use dumux/material/fluidstates/2p2c.hh instead."
#include <dumux/material/fluidstates/2p2c.hh>
#endif
......@@ -31,7 +31,7 @@
#include <dumux/decoupled/common/pressureproperties.hh>
#include <dumux/decoupled/common/transportproperties.hh>
#include <dumux/decoupled/common/impetproperties.hh>
#include <dumux/material/spatialparams/fvspatialparams.hh>
#include <dumux/material/spatialparams/fv.hh>
namespace Dumux
{
......
......@@ -19,7 +19,7 @@
#ifndef DUMUX_ELEMENTDATA2P2C_HH
#define DUMUX_ELEMENTDATA2P2C_HH
#include <dumux/material/fluidstates/2p2cfluidstate.hh>
#include <dumux/material/fluidstates/2p2c.hh>
#include "fluxdata2p2c.hh"
/**
......
#ifndef DUMUX_PSEUDO1P2C_FLUID_STATE_HH
#warning "dumux/decoupled/2p2c/pseudo1p2cfluidstate.hh is deprecated, use dumux/material/fluidstates/pseudo1p2cfluidstate.hh instead."
#include <dumux/material/fluidstates/pseudo1p2cfluidstate.hh>
#warning "dumux/decoupled/2p2c/pseudo1p2cfluidstate.hh is deprecated, use dumux/material/fluidstates/pseudo1p2c.hh instead."
#include <dumux/material/fluidstates/pseudo1p2c.hh>
#endif
......@@ -45,8 +45,8 @@
#include <dumux/material/fluidsystems/liquidphase.hh>
#include <dumux/material/components/nullcomponent.hh>
#include <dumux/material/fluidsystems/1pfluidsystem.hh>
#include <dumux/material/fluidstates/immisciblefluidstate.hh>
#include <dumux/material/fluidsystems/1p.hh>
#include <dumux/material/fluidstates/immiscible.hh>
namespace Dumux
{
......
......@@ -28,7 +28,7 @@
#include "properties.hh"
#include <dumux/implicit/volumevariables.hh>
#include <dumux/material/fluidstates/immisciblefluidstate.hh>
#include <dumux/material/fluidstates/immiscible.hh>
namespace Dumux
{
......
......@@ -38,7 +38,7 @@
#include "model.hh"
#include "volumevariables.hh"
#include <dumux/material/fluidstates/compositionalfluidstate.hh>
#include <dumux/material/fluidstates/compositional.hh>
namespace Dumux
{
......
......@@ -42,7 +42,7 @@
#include "volumevariables.hh"
#include "indices.hh"
#include <dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh>
#include <dumux/material/fluidstates/compositionalfluidstate.hh>
#include <dumux/material/fluidstates/compositional.hh>
namespace Dumux
......
......@@ -26,7 +26,7 @@
#include <dumux/common/basicproperties.hh>
#include <dumux/io/gnuplotinterface.hh>
#include <dumux/material/fluidstates/compositionalfluidstate.hh>
#include <dumux/material/fluidstates/compositional.hh>
namespace Dumux
{
......
......@@ -30,7 +30,7 @@
#include <dumux/common/exceptions.hh>
#include <dumux/material/constants.hh>
#include <dumux/material/components/component.hh>
#include <dumux/material/fluidsystems/h2on2o2fluidsystem.hh>
#include <dumux/material/fluidsystems/h2on2o2.hh>
namespace Dumux
{
......
......@@ -31,8 +31,8 @@
#include <dumux/common/exceptions.hh>
#include <dumux/common/valgrind.hh>
#include <dumux/decoupled/2p2c/2p2cproperties.hh>
#include <dumux/material/fluidstates/2p2cfluidstate.hh>
#include <dumux/material/fluidstates/pseudo1p2cfluidstate.hh>
#include <dumux/material/fluidstates/2p2c.hh>
#include <dumux/material/fluidstates/pseudo1p2c.hh>
namespace Dumux
{
......
......@@ -31,7 +31,7 @@
#ifndef DUMUX_PENG_ROBINSON_HH
#define DUMUX_PENG_ROBINSON_HH
#include <dumux/material/fluidstates/temperatureoverlayfluidstate.hh>
#include <dumux/material/fluidstates/temperatureoverlay.hh>
#include <dumux/material/idealgas.hh>
#include <dumux/common/exceptions.hh>
#include <dumux/common/math.hh>
......
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
*
* \brief Calculates the 2p2c phase state for compositional models.
*/
#ifndef DUMUX_2P2C_FLUID_STATE_HH
#define DUMUX_2P2C_FLUID_STATE_HH
#include <dumux/decoupled/2p2c/2p2cproperties.hh>
namespace Dumux
{
/*!
* \ingroup FluidStates
* \brief Calculates the phase state from the primary variables in the
* sequential 2p2c model.
*
* This boils down to so-called "flash calculation", in this case isothermal and isobaric.
*
* \tparam TypeTag The property Type Tag
*/
template <class TypeTag>
class TwoPTwoCFluidState
{
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
//! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$)
static const int pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation);
public:
enum {
wPhaseIdx = Indices::wPhaseIdx,
nPhaseIdx = Indices::nPhaseIdx,
wCompIdx = Indices::wPhaseIdx,
nCompIdx = Indices::nPhaseIdx
};
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
numComponents = GET_PROP_VALUE(TypeTag, NumComponents)};
typedef Dune::FieldVector<Scalar, numPhases> PhaseVector;
public:
/*!
* \name acess functions
*/
//@{
/*!
* \brief Returns the saturation of a phase.
*
* \param phaseIdx the index of the phase
*/
Scalar saturation(int phaseIdx) const
{
if (phaseIdx == wPhaseIdx)
return sw_;
else
return Scalar(1.0) - sw_;
}
/*!
* \brief Returns the mass fraction of a component in a phase.
*
* \param phaseIdx the index of the phase
* \param compIdx the index of the component
*/
Scalar massFraction(int phaseIdx, int compIdx) const
{
return massFraction_[phaseIdx][compIdx];
}
/*!
* \brief Returns the molar fraction of a component in a fluid phase.
*
* \param phaseIdx the index of the phase
* \param compIdx the index of the component
*/
Scalar moleFraction(int phaseIdx, int compIdx) const
{
return moleFraction_[phaseIdx][compIdx];
}
/*!
* \brief Returns the density of a phase \f$\mathrm{[kg/m^3]}\f$.
*
* \param phaseIdx the index of the phase
*/
Scalar density(int phaseIdx) const
{ return density_[phaseIdx]; }
/*!
* \brief Returns the viscosity of a phase \f$\mathrm{[Pa*s]}\f$.
*
* \param phaseIdx the index of the phase
*/
Scalar viscosity(int phaseIdx) const
{ return viscosity_[phaseIdx]; }
/*!
* \brief Return the partial pressure of a component in the gas phase.
*
* For an ideal gas, this means \f$ R*T*c \f$.
* Unit: \f$\mathrm{[Pa] = [N/m^2]}\f$
*
* \param compIdx the index of the component
*/
Scalar partialPressure(int compIdx) const
{
return partialPressure(nPhaseIdx, compIdx);
}
/*!
* \brief Return the partial pressure of a component in a phase.
*
* \param phaseIdx the index of the phase
* \param compIdx the index of the component
*/
Scalar partialPressure(int phaseIdx, int compIdx) const
{
assert(FluidSystem::isGas(phaseIdx));
return pressure(phaseIdx)*moleFraction(phaseIdx, compIdx);
}
/*!
* \brief Returns the pressure of a fluid phase \f$\mathrm{[Pa]}\f$.
*
* \param phaseIdx the index of the phase
*/
Scalar pressure(int phaseIdx) const
{ return phasePressure_[phaseIdx]; }
/*!
* \brief Returns the capillary pressure \f$\mathrm{[Pa]}\f$
*/
Scalar capillaryPressure() const
{ return phasePressure_[nPhaseIdx] - phasePressure_[wPhaseIdx]; }
/*!
* \brief Returns the temperature of the fluids \f$\mathrm{[K]}\f$.
*
* Note that we assume thermodynamic equilibrium, so all fluids
* and the rock matrix exhibit the same temperature.
*/
Scalar temperature(int phaseIdx = 0) const
{ return temperature_; }
/*!
* \brief Return the average molar mass of a phase.
*
* This is the sum of all molar masses times their respective mole
* fractions in the phase.
*
* Unit: \f$\mathrm{[kg/m^3]}\f$
*/
Scalar averageMolarMass(int phaseIdx) const
{
Scalar averageMolarMass = 0;
for (int compIdx = 0; compIdx < numComponents; ++compIdx) {
averageMolarMass += moleFraction_[phaseIdx][compIdx]*FluidSystem::molarMass(compIdx);
}
return averageMolarMass;
}
/*!
* \brief Returns the phase mass fraction. phase mass per total mass \f$\mathrm{[kg/kg]}\f$.
*
* \param phaseIdx the index of the phase
*/
Scalar phaseMassFraction(int phaseIdx)
{
if (std::isnan(nu_[phaseIdx])) //in contrast to the standard update() method, satflash() does not calculate nu.
{
nu_[wPhaseIdx] = sw_ * density_[wPhaseIdx] / (sw_ * density_[wPhaseIdx] + (1. - sw_) * density_[nPhaseIdx]);
nu_[nPhaseIdx] = 1. - nu_[wPhaseIdx];
return nu_[phaseIdx];
}
else
return nu_[phaseIdx];
}
/*!
* \brief Returns the phase mass fraction \f$ \nu \f$:
* phase mass per total mass \f$\mathrm{[kg/kg]}\f$.
*
* \param phaseIdx the index of the phase
*/
Scalar& nu(int phaseIdx) const
{
return phaseMassFraction(phaseIdx);
}
/*!
* \name Functions to set Data
*/
//@{
/*!
* \brief Sets the viscosity of a phase \f$\mathrm{[Pa*s]}\f$.
*
* \param phaseIdx the index of the phase
* @param value Value to be stored
*/
void setViscosity(int phaseIdx, Scalar value)
{ viscosity_[phaseIdx] = value; }
/*!
* \brief Sets the mass fraction of a component in a phase.
*
* \param phaseIdx the index of the phase
* \param compIdx the index of the component
* @param value Value to be stored
*/
void setMassFraction(int phaseIdx, int compIdx, Scalar value)
{
massFraction_[phaseIdx][compIdx] = value;
}
/*!
* \brief Sets the molar fraction of a component in a fluid phase.
*
* \param phaseIdx the index of the phase
* \param compIdx the index of the component
* @param value Value to be stored
*/
void setMoleFraction(int phaseIdx, int compIdx, Scalar value)
{
moleFraction_[phaseIdx][compIdx] = value;
}
/*!
* \brief Sets the density of a phase \f$\mathrm{[kg/m^3]}\f$.
*
* \param phaseIdx the index of the phase
* @param value Value to be stored
*/
void setDensity(int phaseIdx, Scalar value)
{ density_[phaseIdx] = value; }
/*!
* \brief Sets the saturation of a phase.
* Internally, only the wetting saturation is stored.
* \param phaseIdx the index of the phase
* @param value Value to be stored
*/
void setSaturation(int phaseIdx, Scalar value)
{
if (phaseIdx == wPhaseIdx)
sw_ = value;
else
sw_ = 1.-value;
}
/*!
* \brief Sets the phase mass fraction. phase mass per total mass \f$\mathrm{[kg/kg]}\f$.
*
* \param phaseIdx the index of the phase
* @param value Value to be stored
*/
void setNu(int phaseIdx, Scalar value)
{
nu_[phaseIdx] = value;
}
/*!
* \brief Sets the temperature
*
* @param value Value to be stored
*/
void setTemperature(Scalar value)
{
temperature_ = value;
}
/*!
* \brief Sets phase pressure
*
* \param phaseIdx the index of the phase
* @param value Value to be stored
*/
void setPressure(int phaseIdx, Scalar value)
{
phasePressure_[phaseIdx] = value;
}
//@}
TwoPTwoCFluidState()
{ Valgrind::SetUndefined(*this); }
protected:
// Scalar massConcentration_[numComponents];
Scalar phasePressure_[numPhases];
Scalar temperature_;
Scalar sw_;
PhaseVector nu_; //phase mass fraction
Scalar density_[numPhases];
Scalar viscosity_[numPhases];
Scalar massFraction_[numPhases][numComponents];
Scalar moleFraction_[numPhases][numComponents];
Dune::FieldMatrix<Scalar, numPhases, numComponents> equilRatio_;
Scalar averageMolarMass_[numPhases];
};
} // end namespace
#endif
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
*
* \brief Calculates the 2p2c phase state for compositional models.
*/
#ifndef DUMUX_2P2C_FLUID_STATE_HH
#define DUMUX_2P2C_FLUID_STATE_HH
#ifndef DUMUX_2P2C_FLUID_STATE_HH_OLD
#define DUMUX_2P2C_FLUID_STATE_HH_OLD
#include <dumux/decoupled/2p2c/2p2cproperties.hh>
#warning this header is deprecated, use dumux/material/fluidstates/2p2c.hh instead
namespace Dumux
{
/*!
* \ingroup FluidStates
* \brief Calculates the phase state from the primary variables in the
* sequential 2p2c model.
*
* This boils down to so-called "flash calculation", in this case isothermal and isobaric.
*
* \tparam TypeTag The property Type Tag
*/
template <class TypeTag>
class TwoPTwoCFluidState
{
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
//! gives kind of pressure used (\f$ 0 = p_w\f$, \f$ 1 = p_n\f$, \f$ 2 = p_{global}\f$)
static const int pressureType = GET_PROP_VALUE(TypeTag, PressureFormulation);
public:
enum {
wPhaseIdx = Indices::wPhaseIdx,
nPhaseIdx = Indices::nPhaseIdx,
wCompIdx = Indices::wPhaseIdx,
nCompIdx = Indices::nPhaseIdx
};
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
numComponents = GET_PROP_VALUE(TypeTag, NumComponents)};
typedef Dune::FieldVector<Scalar, numPhases> PhaseVector;
public:
/*!
* \name acess functions
*/
//@{
/*!
* \brief Returns the saturation of a phase.
*
* \param phaseIdx the index of the phase
*/
Scalar saturation(int phaseIdx) const
{
if (phaseIdx == wPhaseIdx)
return sw_;
else
return Scalar(1.0) - sw_;
}
/*!
* \brief Returns the mass fraction of a component in a phase.
*
* \param phaseIdx the index of the phase
* \param compIdx the index of the component
*/
Scalar massFraction(int phaseIdx, int compIdx) const
{
return massFraction_[phaseIdx][compIdx];
}
/*!
* \brief Returns the molar fraction of a component in a fluid phase.
*
* \param phaseIdx the index of the phase
* \param compIdx the index of the component
*/
Scalar moleFraction(int phaseIdx, int compIdx) const
{
return moleFraction_[phaseIdx][compIdx];
}
/*!
* \brief Returns the density of a phase \f$\mathrm{[kg/m^3]}\f$.
*
* \param phaseIdx the index of the phase
*/
Scalar density(int phaseIdx) const
{ return density_[phaseIdx]; }
/*!
* \brief Returns the viscosity of a phase \f$\mathrm{[Pa*s]}\f$.
*
* \param phaseIdx the index of the phase
*/
Scalar viscosity(int phaseIdx) const
{ return viscosity_[phaseIdx]; }
/*!
* \brief Return the partial pressure of a component in the gas phase.
*
* For an ideal gas, this means \f$ R*T*c \f$.
* Unit: \f$\mathrm{[Pa] = [N/m^2]}\f$
*
* \param compIdx the index of the component
*/
Scalar partialPressure(int compIdx) const
{
return partialPressure(nPhaseIdx, compIdx);
}
/*!
* \brief Return the partial pressure of a component in a phase.
*
* \param phaseIdx the index of the phase
* \param compIdx the index of the component
*/
Scalar partialPressure(int phaseIdx, int compIdx) const
{
assert(FluidSystem::isGas(phaseIdx));
return pressure(phaseIdx)*moleFraction(phaseIdx, compIdx);