Commit 61601c0b authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

[cleanup] Whitespace cleanup in dumux/material.

- remove trailing whitespace
- replace tabs by spaces
- remove pointless returns
- remove superfluous semicolons
(reviewed by fetzer)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@15056 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 547b4909
......@@ -47,7 +47,7 @@ public:
/*!
* \brief Binary diffusion coefficient \f$\mathrm{[m^2/s]}\f$ of water in the CO2 phase.
*
* According to "Diffusion of Water in Liquid and Supercritical Carbon
* According to "Diffusion of Water in Liquid and Supercritical Carbon
* Dioxide: An NMR Study", Bin Xu et al., 2002.
* \param temperature the temperature \f$\mathrm{[K]}\f$
* \param pressure the phase pressure \f$\mathrm{[Pa]}\f$
......@@ -95,10 +95,10 @@ public:
*/
static void calculateMoleFractions(const Scalar temperature,
const Scalar pg,
const Scalar pg,
const Scalar salinity,
const int knownPhaseIdx,
Scalar &xlCO2,
Scalar &xlCO2,
Scalar &ygH2O) {
Scalar A = computeA_(temperature, pg);
......@@ -521,7 +521,7 @@ private:
// CO2 because the mole fraction of CO2 in brine can be
// considerable
return pg - Brine::vaporPressure(temperature);
};
}
/*!
* \brief The fugacity coefficent of CO2 for a CO2-H2O mixture.
......
......@@ -61,8 +61,8 @@ inline Scalar henryIAPWS(Scalar E,
// regularizing temperature helps for stability.
// Results are unphysical!
if (temperature > H2O::criticalTemperature() )
temperature = H2O::criticalTemperature() ;
if (temperature > H2O::criticalTemperature())
temperature = H2O::criticalTemperature();
Scalar Tr = temperature/H2O::criticalTemperature();
Scalar tau = 1 - Tr;
......
......@@ -164,7 +164,7 @@ public:
r = 1.496*1.E-6*pow(temperature,1.5)/(temperature+120.);
return (r);
};
}
/*!
* \brief Specific enthalpy of air \f$\mathrm{[J/kg]}\f$
......@@ -243,17 +243,17 @@ public:
}
/*!
* \brief Thermal conductivity \f$\mathrm{[[W/(m*K)]}\f$ of air.
* Isobaric Properties for Nitrogen in: NIST Standard
* see http://webbook.nist.gov/chemistry/fluid/
* evaluated at p=.1 MPa, T=20°C
* Nitrogen: 0.025398
* Oxygen: 0.026105
* lambda_air is approximately 0.78*lambda_N2+0.22*lambda_O2
* \brief Thermal conductivity \f$\mathrm{[[W/(m*K)]}\f$ of air.
* Isobaric Properties for Nitrogen in: NIST Standard
* see http://webbook.nist.gov/chemistry/fluid/
* evaluated at p=.1 MPa, T=20°C
* Nitrogen: 0.025398
* Oxygen: 0.026105
* lambda_air is approximately 0.78*lambda_N2+0.22*lambda_O2
*/
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
{
return 0.0255535; // conductivity of pure air [W/(m K)]
return 0.0255535; // conductivity of pure air [W/(m K)]
}
};
......
......@@ -54,7 +54,7 @@ public:
static Scalar molarMass()
{
DUNE_THROW(Dune::NotImplemented, "molar mass for benzene");
};
}
/*!
* \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of benzene.
......@@ -62,7 +62,7 @@ public:
static Scalar criticalTemperature()
{
DUNE_THROW(Dune::NotImplemented, "criticalTemperature for benzene");
};
}
/*!
* \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of benzene.
......@@ -70,7 +70,7 @@ public:
static Scalar criticalPressure()
{
DUNE_THROW(Dune::NotImplemented, "criticalPressure for benzene");
};
}
/*!
* \brief Returns the temperature \f$\mathrm{[K]}\f$ at benzene's triple point.
......@@ -78,7 +78,7 @@ public:
static Scalar tripleTemperature()
{
DUNE_THROW(Dune::NotImplemented, "tripleTemperature for benzene");
};
}
/*!
* \brief Returns the pressure \f$\mathrm{[Pa]}\f$ at benzene's triple point.
......@@ -86,7 +86,7 @@ public:
static Scalar triplePressure()
{
DUNE_THROW(Dune::NotImplemented, "triplePressure for benzene");
};
}
/*!
* \brief The vapor pressure in \f$\mathrm{[Pa]}\f$ of pure benzene
......@@ -97,7 +97,8 @@ public:
static Scalar vaporPressure(Scalar T)
{
DUNE_THROW(Dune::NotImplemented, "vaporPressure for benzene");
};
}
/*!
* \brief Specific enthalpy of benzene steam \f$\mathrm{[J/kg]}\f$.
*
......@@ -108,7 +109,7 @@ public:
Scalar pressure)
{
DUNE_THROW(Dune::NotImplemented, "gasEnthalpy for benzene");
};
}
/*!
* \brief Specific enthalpy of liquid benzene \f$\mathrm{[J/kg]}\f$.
......@@ -120,7 +121,7 @@ public:
Scalar pressure)
{
DUNE_THROW(Dune::NotImplemented, "liquidEnthalpy for benzene");
};
}
/*!
* \brief The density of steam at a given pressure and temperature \f$\mathrm{[kg/m^3]}\f$.
......@@ -133,7 +134,7 @@ public:
return IdealGas<Scalar>::density(molarMass(),
temperature,
pressure);
};
}
/*!
* \brief The density of pure benzene at a given pressure and temperature \f$\mathrm{[kg/m^3]}\f$.
......@@ -156,7 +157,7 @@ public:
static Scalar gasViscosity(Scalar temperature, Scalar pressure, bool regularize=true)
{
DUNE_THROW(Dune::NotImplemented, "gasViscosity for benzene");
};
}
/*!
* \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of pure benzene.
......@@ -167,7 +168,7 @@ public:
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
{
return 1.12e-3;//[Pa s]
};
}
};
} // end namespace
......
......@@ -66,7 +66,7 @@ public:
const Scalar M2 = 58e-3; // molar mass of NaCl [kg/mol]
const Scalar X2 = salinity; // mass fraction of salt in brine
return M1*M2/(M2 + X2*(M1 - M2));
};
}
/*!
* \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of brine.
......@@ -199,7 +199,7 @@ public:
{
Scalar eps = temperature*1e-8;
return (liquidEnthalpy(temperature + eps, pressure) - liquidEnthalpy(temperature, pressure))/eps;
};
}
/*!
* \brief Specific isobaric heat capacity of water steam \f$\mathrm{[J/kg]}\f$.
......@@ -217,7 +217,7 @@ public:
Scalar pressure)
{
return H2O::gasHeatCapacity(temperature, pressure);
};
}
/*!
* \brief Specific internal energy of steam \f$\mathrm{[J/kg]}\f$.
......@@ -354,7 +354,7 @@ public:
* \param pressure pressure of component
*/
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
{ return H2O::gasViscosity(temperature, pressure); };
{ return H2O::gasViscosity(temperature, pressure); }
/*!
* \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of pure brine.
......
......@@ -48,7 +48,7 @@ class CO2 : public Component<Scalar, CO2<Scalar, CO2Tables> >
{
static const Scalar R;
typedef typename Dumux::IdealGas<Scalar> IdealGas;
static bool warningThrown;
public:
......@@ -125,10 +125,10 @@ public:
* 1996
*/
static Scalar vaporPressure(Scalar T)
{
static const Scalar a[4] =
{
static const Scalar a[4] =
{ -7.0602087, 1.9391218, -1.6463597, -3.2995634 };
static const Scalar t[4] =
static const Scalar t[4] =
{ 1.0, 1.5, 2.0, 4.0 };
// this is on page 1524 of the reference
......@@ -138,7 +138,7 @@ public:
exponent += a[i]*std::pow(1 - Tred, t[i]);
}
exponent *= 1.0/Tred;
return std::exp(exponent)*criticalPressure();
}
......@@ -336,7 +336,7 @@ public:
visco_CO2 = (mu0 + dmu)/1.0E6; /* conversion to [Pa s] */
return visco_CO2;
};
}
/*!
* \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of pure CO2.
......@@ -347,7 +347,7 @@ public:
{
// no difference for supercritical CO2
return gasViscosity(temperature, pressure);
};
}
};
template <class Scalar, class CO2Tables>
......
......@@ -42,10 +42,6 @@ class TabulatedCO2Properties
enum { numTempSteps = Traits::numTempSteps, numPressSteps = Traits::numPressSteps };
public:
TabulatedCO2Properties()
{
};
Scalar minTemp() const
{ return Traits::minTemp; }
......@@ -76,7 +72,7 @@ public:
pressure=minPress();
if(pressure>maxPress())
pressure=maxPress();
};
}
int i = findTempIdx_(temperature);
int j = findPressIdx_(pressure);
......@@ -99,7 +95,7 @@ public:
// return the weighted sum of the low- and high-resolution
// values
return lowresValue;
};
}
Scalar val(int i, int j) const
{
......@@ -112,10 +108,10 @@ public:
<< ") on a " << Traits::name << " table of size ("
<< Traits::numTempSteps << ", " << Traits::numPressSteps
<< ")\n");
};
}
#endif
return Traits::vals[i][j];
};
}
protected:
int findTempIdx_(Scalar temperature) const
......@@ -124,7 +120,7 @@ protected:
return numTempSteps - 2;
const int result = static_cast<int>((temperature - minTemp())/(maxTemp() - minTemp())*(numTempSteps - 1));
return std::max(0, std::min(result, numTempSteps - 2));
};
}
int findPressIdx_(Scalar pressure) const
{
......@@ -132,13 +128,13 @@ protected:
return numPressSteps - 2;
const int result = static_cast<int>((pressure - minPress())/(maxPress() - minPress())*(numPressSteps - 1));
return std::max(0, std::min(result, numPressSteps - 2));
};
}
Scalar temperatureAt_(int i) const
{ return i*(maxTemp() - minTemp())/(numTempSteps - 1) + minTemp(); }
Scalar pressureAt_(int j) const
{ return j*(maxPress() - minPress())/(numPressSteps - 1) + minPress(); }
};
}
} // end namespace Dumux
#endif
......@@ -53,7 +53,7 @@ public:
static Scalar molarMass()
{
return 131.39e-3; // [kg/mol]
};
}
/*!
* \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of TCE.
......@@ -61,7 +61,7 @@ public:
static Scalar criticalTemperature()
{
DUNE_THROW(Dune::NotImplemented, "criticalTemperature for TCE");
};
}
/*!
* \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of TCE.
......@@ -69,7 +69,7 @@ public:
static Scalar criticalPressure()
{
DUNE_THROW(Dune::NotImplemented, "criticalPressure for TCE");
};
}
/*!
* \brief Returns the temperature \f$\mathrm{[K]}\f$ at TCE's triple point.
......@@ -77,7 +77,7 @@ public:
static Scalar tripleTemperature()
{
DUNE_THROW(Dune::NotImplemented, "tripleTemperature for TCE");
};
}
/*!
* \brief Returns the pressure \f$\mathrm{[Pa]}\f$ at TCE's triple point.
......@@ -85,7 +85,7 @@ public:
static Scalar triplePressure()
{
DUNE_THROW(Dune::NotImplemented, "triplePressure for TCE");
};
}
/*!
* \brief The vapor pressure in \f$\mathrm{[Pa]}\f$ of pure TCE
......@@ -96,7 +96,7 @@ public:
static Scalar vaporPressure(Scalar T)
{
return 3900; // [Pa] (at 20C)
};
}
/*!
* \brief Returns true if the gas phase is assumed to be compressible
......@@ -121,7 +121,7 @@ public:
return IdealGas<Scalar>::density(molarMass(),
temperature,
pressure);
};
}
/*!
* \brief Returns true if the gas phase is assumed to be ideal
......@@ -149,7 +149,7 @@ public:
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
{
return 5.7e-4;// [Pa*s]
};
}
};
} // end namespace
......
......@@ -73,7 +73,7 @@ public:
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
{
return 8e-3;
};
}
};
......
......@@ -18,11 +18,11 @@
*****************************************************************************/
/*!
* \file
*
*
* \ingroup Components
*
*
* \brief Properties of mesitylene.
*
*
*/
#ifndef DUMUX_MESITYLENE_HH
#define DUMUX_MESITYLENE_HH
......
......@@ -280,7 +280,7 @@ public:
{
return 4.2e3;
}
/*!
* \brief Thermal conductivity \f$\mathrm{[[W/(m*K)]}\f$ of water.
* source: http://webbook.nist.gov/cgi/fluid.cgi?ID=C7732185&Action=Page
......@@ -290,7 +290,7 @@ public:
{
return 0.679;
}
/*!
* \brief Thermal conductivity \f$\mathrm{[[W/(m*K)]}\f$ of steam.
* source: http://webbook.nist.gov/cgi/fluid.cgi?ID=C7732185&Action=Page
......@@ -300,8 +300,8 @@ public:
{
return 0.025;
}
};
template <class Scalar>
......
......@@ -114,7 +114,7 @@ public:
try { vaporPressure_[iT] = RawComponent::vaporPressure(temperature); }
catch (Dune::NotImplemented) { vaporPressure_[iT] = NaN; }
catch (NumericalProblem e) { vaporPressure_[iT] = NaN; };
catch (NumericalProblem e) { vaporPressure_[iT] = NaN; }
Scalar pgMax = maxGasPressure_(iT);
Scalar pgMin = minGasPressure_(iT);
......@@ -127,23 +127,23 @@ public:
try { gasEnthalpy_[i] = RawComponent::gasEnthalpy(temperature, pressure); }
catch (Dune::NotImplemented) { gasEnthalpy_[i] = NaN; }
catch (NumericalProblem) { gasEnthalpy_[i] = NaN; };
catch (NumericalProblem) { gasEnthalpy_[i] = NaN; }
try { gasHeatCapacity_[i] = RawComponent::gasHeatCapacity(temperature, pressure); }
catch (Dune::NotImplemented) { gasHeatCapacity_[i] = NaN; }
catch (NumericalProblem) { gasHeatCapacity_[i] = NaN; };
catch (NumericalProblem) { gasHeatCapacity_[i] = NaN; }
try { gasDensity_[i] = RawComponent::gasDensity(temperature, pressure); }
catch (Dune::NotImplemented) { gasDensity_[i] = NaN; }
catch (NumericalProblem) { gasDensity_[i] = NaN; };
catch (NumericalProblem) { gasDensity_[i] = NaN; }
try { gasViscosity_[i] = RawComponent::gasViscosity(temperature, pressure); }
catch (Dune::NotImplemented) { gasViscosity_[i] = NaN; }
catch (NumericalProblem) { gasViscosity_[i] = NaN; };
catch (NumericalProblem) { gasViscosity_[i] = NaN; }
try { gasThermalConductivity_[i] = RawComponent::gasThermalConductivity(temperature, pressure); }
catch (Dune::NotImplemented) { gasThermalConductivity_[i] = NaN; }
catch (NumericalProblem) { gasThermalConductivity_[i] = NaN; };
catch (NumericalProblem) { gasThermalConductivity_[i] = NaN; }
}
Scalar plMin = minLiquidPressure_(iT);
......@@ -155,23 +155,23 @@ public:
try { liquidEnthalpy_[i] = RawComponent::liquidEnthalpy(temperature, pressure); }
catch (Dune::NotImplemented) { liquidEnthalpy_[i] = NaN; }
catch (NumericalProblem) { liquidEnthalpy_[i] = NaN; };
catch (NumericalProblem) { liquidEnthalpy_[i] = NaN; }
try { liquidHeatCapacity_[i] = RawComponent::liquidHeatCapacity(temperature, pressure); }
catch (Dune::NotImplemented) { liquidHeatCapacity_[i] = NaN; }
catch (NumericalProblem) { liquidHeatCapacity_[i] = NaN; };
catch (NumericalProblem) { liquidHeatCapacity_[i] = NaN; }
try { liquidDensity_[i] = RawComponent::liquidDensity(temperature, pressure); }
catch (Dune::NotImplemented) { liquidDensity_[i] = NaN; }
catch (NumericalProblem) { liquidDensity_[i] = NaN; };
catch (NumericalProblem) { liquidDensity_[i] = NaN; }
try { liquidViscosity_[i] = RawComponent::liquidViscosity(temperature, pressure); }
catch (Dune::NotImplemented) { liquidViscosity_[i] = NaN; }
catch (NumericalProblem) { liquidViscosity_[i] = NaN; };
catch (NumericalProblem) { liquidViscosity_[i] = NaN; }
try { liquidThermalConductivity_[i] = RawComponent::liquidThermalConductivity(temperature, pressure); }
catch (Dune::NotImplemented) { liquidThermalConductivity_[i] = NaN; }
catch (NumericalProblem) { liquidThermalConductivity_[i] = NaN; };
catch (NumericalProblem) { liquidThermalConductivity_[i] = NaN; }
}
}
......@@ -198,7 +198,7 @@ public:
unsigned i = iT + iRho*nTemp_;
try { gasPressure_[i] = RawComponent::gasPressure(temperature, density); }
catch (NumericalProblem) { gasPressure_[i] = NaN; };
catch (NumericalProblem) { gasPressure_[i] = NaN; }
}
// calculate the minimum and maximum values for the liquid
......@@ -220,7 +220,7 @@ public:
unsigned i = iT + iRho*nTemp_;
try { liquidPressure_[i] = RawComponent::liquidPressure(temperature, density); }
catch (NumericalProblem) { liquidPressure_[i] = NaN; };
catch (NumericalProblem) { liquidPressure_[i] = NaN; }
}
}
}
......@@ -274,7 +274,7 @@ public:
return RawComponent::vaporPressure(T);
}
return result;
};
}
/*!
* \brief The vapor pressure in \f$\mathrm{[Pa]}\f$ of the component at a given
......@@ -286,7 +286,7 @@ public:
static Scalar vaporTemperature(Scalar pressure)
{
return RawComponent::vaporTemperature(pressure);
};
}
/*!
* \brief Specific enthalpy of the gas \f$\mathrm{[J/kg]}\f$.
......@@ -403,7 +403,7 @@ public:
density);
}
return result;
};
}
/*!
* \brief The pressure of liquid in \f$\mathrm{[Pa]}\f$ at a given density and temperature.
......@@ -422,7 +422,7 @@ public:
density);
}
return result;
};
}
/*!
* \brief Returns true iff the gas phase is assumed to be compressible
......@@ -497,7 +497,7 @@ public:
return RawComponent::gasViscosity(temperature, pressure);
}
return result;
};
}
/*!
* \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of liquid.
......@@ -515,7 +515,7 @@ public:
return RawComponent::liquidViscosity(temperature, pressure);
}
return result;
};
}
/*!
* \brief The thermal conductivity of gaseous water \f$\mathrm{[W/(m*K)]}\f$.
......@@ -533,7 +533,7 @@ public:
return RawComponent::gasThermalConductivity(temperature, pressure);
}
return result;
};
}
/*!
* \brief The thermal conductivity of liquid water \f$\mathrm{[W/(m*K)]}\f$.
......@@ -551,7 +551,7 @@ public:
return RawComponent::liquidThermalConductivity(temperature, pressure);
}
return result;
};
}
private:
......
......@@ -18,9 +18,9 @@
*****************************************************************************/
/*!
* \file
*
*
* \ingroup Components
*
*
* \brief Properties of xylene.
*/
#ifndef DUMUX_XYLENE_HH
......@@ -127,25 +127,25 @@ public:
// Xylene: C9H12 : 3* CH3 ; 1* C6H5 (phenyl-ring) ; -2* H (this was too much!)
// linear interpolation between table values [J/(mol K)]
if(temp < 298.0){ // take care: extrapolation for Temp<273
H = 13.4 + 1.2*(temp - 273.0)/25.0; // 13.4 + 1.2 = 14.6 = H(T=298K) i.e. interpolation of table values 273<T<298
CH3 = 40.0 + 1.6*(temp - 273.0)/25.0; // 40 + 1.6 = 41.6 = CH3(T=298K)
if(temp < 298.0){ // take care: extrapolation for Temp<273
H = 13.4 + 1.2*(temp - 273.0)/25.0; // 13.4 + 1.2 = 14.6 = H(T=298K) i.e. interpolation of table values 273<T<298
CH3 = 40.0 + 1.6*(temp - 273.0)/25.0; // 40 + 1.6 = 41.6 = CH3(T=298K)
C6H5 = 113.0 + 4.2*(temp -