Commit 0facd000 authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[gnuplotinterface]

fixed call of thermalconductivity plot (initializing with pressure and
temperature) without deprecation

[material]
unified output for out-of-range messages in h2o component

reviewed by gruenich


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@14831 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 892c23a4
......@@ -88,7 +88,7 @@ public:
if (pclose(pipe_) == -1)
assert("Could not close pipe to Gnuplot!");
}
/*!
* \brief Plots the files for a specific window number, writes a gnuplot and png file.
*
......@@ -114,7 +114,7 @@ public:
plot += "set xlabel \"" + xLabel_[plottingWindowNumber] + "\"\n";
plot += "set ylabel \"" + yLabel_[plottingWindowNumber] + "\"\n";
// plot curves
plot += "plot";
for (unsigned int i = 0; i < fileName_[plottingWindowNumber].size(); ++i)
......
......@@ -59,11 +59,21 @@ class PlotThermalConductivityModel
};
public:
//! Constructor, initializes the fluid system
PlotThermalConductivityModel()
/*!
* \brief Constructor
*
* Initializes the fluid system.
*
* \param temperature temperature in \f$\mathrm{[K]}\f$
* \param pressure reference pressure in \f$\mathrm{[Pa]}\f$
*/
PlotThermalConductivityModel(Scalar temperature, Scalar pressure)
: numIntervals_(1000)
{
FluidState fluidstate;
fluidstate.setTemperature(temperature);
fluidstate.setPressure(wPhaseIdx, pressure);
fluidstate.setPressure(nPhaseIdx, pressure);
lambdaW_ = FluidSystem::template thermalConductivity<FluidState>(fluidstate, wPhaseIdx);
lambdaN_ = FluidSystem::template thermalConductivity<FluidState>(fluidstate, nPhaseIdx);
}
......
......@@ -177,7 +177,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"Enthalpy of steam is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
// regularization
......@@ -227,7 +227,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"Enthalpy of water is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
// regularization
......@@ -268,7 +268,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"Heat capacity of steam is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
// regularization
......@@ -304,7 +304,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"heat Capacity of water is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
// regularization
......@@ -337,7 +337,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"Internal Energy of water is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
......@@ -393,7 +393,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"Internal Energy of steam is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
// regularization
......@@ -467,7 +467,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"Heat capacity of water is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
......@@ -500,7 +500,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"Heat capacity of steam is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
// regularization
......@@ -546,7 +546,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"Density of steam is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
// regularization
......@@ -667,7 +667,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"Density of water is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
// regularization
......@@ -766,7 +766,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"Viscosity of steam is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
Scalar rho = gasDensity(temperature, pressure);
......@@ -790,7 +790,7 @@ public:
{
DUNE_THROW(NumericalProblem,
"Viscosity of water is only implemented for temperatures below 623.15K and "
"pressures below 100MPa. (T = " << temperature << ", p=" << pressure);
"pressures below 100MPa. (T=" << temperature << ", p=" << pressure << ")");
}
Scalar rho = liquidDensity(temperature, pressure);
......@@ -818,8 +818,9 @@ public:
or (pressure <= 200e6 and ((398.15<temperature) and (temperature<=523.15)) )
or (pressure <= 150e6 and ((523.15<temperature) and (temperature<=673.15)) )
or (pressure <= 100e6 and ((673.15<temperature) and (temperature<=1073.15)) ) ) ){
DUNE_THROW(NumericalProblem, "Evaluating the IAPWS fit function for thermal conductivity outside range of applicability: p= "
<< pressure << "T= " << temperature);
DUNE_THROW(NumericalProblem,
"Evaluating the IAPWS fit function for thermal conductivity outside range of applicability."
"(T=" << temperature << ", p=" << pressure << ")");
}
Scalar rho = liquidDensity(temperature, pressure);
......@@ -827,7 +828,7 @@ public:
}
/*!
* \brief Thermal conductivity \f$\mathrm{[[W/(m*K)]}\f$ of water (IAPWS) .
* \brief Thermal conductivity \f$\mathrm{[[W/(m*K)]}\f$ of steam (IAPWS) .
*
* Implementation taken from:
* freesteam - IAPWS-IF97 steam tables library
......@@ -847,8 +848,9 @@ public:
or (pressure <= 200e6 and ((398.15<temperature) and (temperature<=523.15)) )
or (pressure <= 150e6 and ((523.15<temperature) and (temperature<=673.15)) )
or (pressure <= 100e6 and ((673.15<temperature) and (temperature<=1073.15)) ) ) ){
DUNE_THROW(NumericalProblem, "Evaluating the IAPWS fit function for thermal conductivity outside range of applicability: p= "
<< pressure << " T= " << temperature);
DUNE_THROW(NumericalProblem,
"Evaluating the IAPWS fit function for thermal conductivity outside range of applicability."
"(T=" << temperature << ", p=" << pressure << ")");
}
Scalar rho = gasDensity(temperature, pressure);
......
......@@ -100,7 +100,7 @@ public:
// porosities
finePorosity_ = 0.3;
coarsePorosity_ = 0.3;
// heat conductivity of granite
lambdaSolid_ = 2.8;
......@@ -128,7 +128,7 @@ public:
{
PlotMaterialLaw<TypeTag> plotMaterialLaw;
PlotEffectiveDiffusivityModel<TypeTag> plotEffectiveDiffusivityModel;
PlotThermalConductivityModel<TypeTag> plotThermalConductivityModel;
PlotThermalConductivityModel<TypeTag> plotThermalConductivityModel(283.15/*temperature*/, 1e5/*pressure*/);
plotMaterialLaw.plotpcsw(fineMaterialParams_, 0.2, 1.0, "fine", plotFluidMatrixInteractions_);
plotMaterialLaw.plotpcsw(coarseMaterialParams_, 0.2, 1.0, "coarse", plotFluidMatrixInteractions_);
plotMaterialLaw.plotkr(fineMaterialParams_, 0.2, 1.0, "fine", plotFluidMatrixInteractions_);
......
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