12#ifndef DUMUX_PLOT_THERMAL_CONDUCTIVITY_LAW_HH
13#define DUMUX_PLOT_THERMAL_CONDUCTIVITY_LAW_HH
22template<
class Scalar>
class GnuplotInterface;
28template<
class Scalar,
class ThermalConductivityModel,
class FS>
31 using FluidSystem = FS;
37 phase0Idx = FluidSystem::phase0Idx,
38 phase1Idx = FluidSystem::phase1Idx
58 lambdaW_ = FluidSystem::thermalConductivity(fluidstate, phase0Idx);
59 lambdaN_ = FluidSystem::thermalConductivity(fluidstate, phase1Idx);
78 Scalar lowerSat = 0.0,
79 Scalar upperSat = 1.0,
80 std::string curveName =
"lambdaeff",
81 std::string curveOptions =
"w l")
83 std::vector<Scalar> sw(numIntervals_+1);
84 std::vector<Scalar> lambda(numIntervals_+1);
85 Scalar satInterval = upperSat - lowerSat;
87 for (
int i = 0; i <= numIntervals_; i++)
89 sw[i] = lowerSat + satInterval * Scalar(i) / Scalar(numIntervals_);
90 VolumeVariables volVars(sw[i], lambdaN_, lambdaW_, lambdaSolid,
porosity, rhoSolid);
91 lambda[i] = ThermalConductivityModel::effectiveThermalConductivity(volVars);
102 VolumeVariables(Scalar
saturation, Scalar lambdaN, Scalar lambdaW, Scalar lambdaSolid, Scalar
porosity, Scalar rhoSolid)
106 , lambdaSolid_(lambdaSolid)
108 , rhoSolid_(rhoSolid)
111 using FluidSystem =
typename PlotThermalConductivityModel::FluidSystem;
115 if (phaseIdx == wettingPhase())
118 return 1.0 - saturation_;
121 Scalar fluidThermalConductivity(
const int phaseIdx)
const
123 if (phaseIdx == wettingPhase())
129 int wettingPhase()
const
130 {
return phase0Idx; }
133 {
return porosity_; }
135 Scalar solidThermalConductivity()
const
136 {
return lambdaSolid_; }
138 Scalar solidDensity()
const
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: compositional.hh:35
void setTemperature(Scalar value)
Set the temperature of all phases.
Definition: compositional.hh:306
void setPressure(int phaseIdx, Scalar value)
Set the fluid pressure of a phase .
Definition: compositional.hh:322
Interface for passing data sets to a file and plotting them, if gnuplot is installed.
Definition: gnuplotinterface.hh:45
void addDataSetToPlot(const std::vector< Scalar > &x, const std::vector< Scalar > &y, const std::string &fileName, const std::string &options="with lines")
Adds a data set and writes a data file.
Definition: gnuplotinterface.hh:230
Interface for plotting the non-isothermal two-phase fluid-matrix-interaction laws.
Definition: plotthermalconductivitymodel.hh:30
void addlambdaeffcurve(GnuplotInterface< Scalar > &gnuplot, Scalar porosity, Scalar rhoSolid, Scalar lambdaSolid, Scalar lowerSat=0.0, Scalar upperSat=1.0, std::string curveName="lambdaeff", std::string curveOptions="w l")
Add a effective thermal conductivity-saturation curve to the plot.
Definition: plotthermalconductivitymodel.hh:74
PlotThermalConductivityModel(Scalar temperature=283.15, Scalar pressure=1e5)
Constructor.
Definition: plotthermalconductivitymodel.hh:50
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
std::string saturation(int phaseIdx) noexcept
I/O name of saturation for multiphase systems.
Definition: name.hh:31
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:22
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:127