24#ifndef DUMUX_IO_PLOT_PC_KR_SW_HH
25#define DUMUX_IO_PLOT_PC_KR_SW_HH
35template<
class Function,
class Range>
39 std::transform(range.begin(), range.end(), result.begin(), [&](
auto x){ return f(x); });
48template<
class PcKrSw,
class V>
58template<
class PcKrSw,
class V>
68template<
class PcKrSw,
class V>
78template<
class PcKrSw,
class V>
88template<
class PcKrSw,
class V>
91 return std::make_tuple(
101template<
class PcKrSw,
class V>
104 return std::make_tuple(
111template<
class S>
class GnuplotInterface;
114template<
class S,
class V>
116 const V& x,
const V& y,
117 const std::string& curveName,
118 const std::string& curveOptions,
119 const std::string& xLabel,
120 const std::string& yLabel)
138template<
class S,
class V>
140 const std::string& curveName =
"pc-sw",
141 const std::string& curveOptions =
"w l",
142 const std::string& xLabel =
"wetting phase saturation [-]",
143 const std::string& yLabel =
"capillary pressure [Pa]")
152template<
class S,
class V>
154 const std::string& curveName =
"dpc-dsw",
155 const std::string& curveOptions =
"w l",
156 const std::string& xLabel =
"wetting phase saturation [-]",
157 const std::string& yLabel =
"derivative of capillary pressure [Pa]")
166template<
class S,
class V>
168 const std::string& curveName =
"dsw-dpc",
169 const std::string& curveOptions =
"w l",
170 const std::string& xLabel =
"capillary pressure [Pa]",
171 const std::string& yLabel =
"derivative of saturation [1/Pa]")
180template<
class S,
class V>
182 const std::string& curveName =
"log10-pc-sw",
183 const std::string& curveOptions =
"w l",
184 const std::string& xLabel =
"wetting phase saturation [-]",
185 const std::string& yLabel =
"log10 of capillary pressure [Pa]")
194template<
class S,
class V>
196 const std::string& curveName =
"relperm",
197 const std::string& curveOptions =
"w l",
198 const std::string& xLabel =
"wetting phase saturation [-]",
199 const std::string& yLabel =
"relative permeability [-]")
209template<
class S,
class V>
211 const std::string& curveName =
"relperm_dsw",
212 const std::string& curveOptions =
"w l",
213 const std::string& xLabel =
"wetting phase saturation [-]",
214 const std::string& yLabel =
"derivative of the relative permeability [-]")
Define some often used mathematical functions.
PcKrSw(T &&) -> PcKrSw< T >
Deduction guide for the PcKrSw class. Makes sure that PcKrSw stores a copy of T if the constructor is...
void addPcSw(GnuplotInterface< S > &gnuplot, const V &sw, const V &pc, const std::string &curveName="pc-sw", const std::string &curveOptions="w l", const std::string &xLabel="wetting phase saturation [-]", const std::string &yLabel="capillary pressure [Pa]")
Convenience function for adding material law quantities to gnuplot.
Definition: plotpckrsw.hh:139
auto samplePcSw(const PcKrSw &curve, const V &sw)
sample the pc-sw curve
Definition: plotpckrsw.hh:49
auto samplePcSwDerivative(const PcKrSw &curve, const V &sw)
sample the pc-sw curve derivative wrt sw
Definition: plotpckrsw.hh:59
void addPcSwInverseDerivative(GnuplotInterface< S > &gnuplot, const V &sw, const V &dpc_dsw, const std::string &curveName="dsw-dpc", const std::string &curveOptions="w l", const std::string &xLabel="capillary pressure [Pa]", const std::string &yLabel="derivative of saturation [1/Pa]")
Convenience function for adding material law quantities to gnuplot.
Definition: plotpckrsw.hh:167
auto sampleRelPerms(const PcKrSw &curve, const V &sw)
sample krw-sw and krn-sw curves
Definition: plotpckrsw.hh:89
void addRelPerms(GnuplotInterface< S > &gnuplot, const V &sw, const V &krw, const V &krn, const std::string &curveName="relperm", const std::string &curveOptions="w l", const std::string &xLabel="wetting phase saturation [-]", const std::string &yLabel="relative permeability [-]")
Convenience function for adding material law quantities to gnuplot.
Definition: plotpckrsw.hh:195
auto samplePcSwInverseDerivative(const PcKrSw &curve, const V &pc)
sample the sw-pc curve derivative wrt pc
Definition: plotpckrsw.hh:69
void addLog10PcSw(GnuplotInterface< S > &gnuplot, const V &sw, const V &log10pc, const std::string &curveName="log10-pc-sw", const std::string &curveOptions="w l", const std::string &xLabel="wetting phase saturation [-]", const std::string &yLabel="log10 of capillary pressure [Pa]")
Convenience function for adding material law quantities to gnuplot.
Definition: plotpckrsw.hh:181
auto sampleRelPermDerivatives(const PcKrSw &curve, const V &sw)
sample the derivatives of the krw-sw and krn-sw curves
Definition: plotpckrsw.hh:102
auto sampleLog10PcSw(const PcKrSw &curve, const V &sw)
sample sw-pc curve but return the log10 of the capillary pressure
Definition: plotpckrsw.hh:79
void addRelPermDerivatives(GnuplotInterface< S > &gnuplot, const V &sw, const V &krw, const V &krn, const std::string &curveName="relperm_dsw", const std::string &curveOptions="w l", const std::string &xLabel="wetting phase saturation [-]", const std::string &yLabel="derivative of the relative permeability [-]")
Convenience function for adding material law quantities to gnuplot.
Definition: plotpckrsw.hh:210
void addPcSwDerivative(GnuplotInterface< S > &gnuplot, const V &sw, const V &dpc_dsw, const std::string &curveName="dpc-dsw", const std::string &curveOptions="w l", const std::string &xLabel="wetting phase saturation [-]", const std::string &yLabel="derivative of capillary pressure [Pa]")
Convenience function for adding material law quantities to gnuplot.
Definition: plotpckrsw.hh:153
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
Range evalFunctionForRange(const Function &f, const Range &range)
Definition: plotpckrsw.hh:36
void addDataSetToGnuplot(GnuplotInterface< S > &gnuplot, const V &x, const V &y, const std::string &curveName, const std::string &curveOptions, const std::string &xLabel, const std::string &yLabel)
Definition: plotpckrsw.hh:115
Interface for passing data sets to a file and plotting them, if gnuplot is installed.
Definition: gnuplotinterface.hh:57
void setXlabel(const std::string &label)
Sets the label for the x-axis.
Definition: gnuplotinterface.hh:279
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:242
void setYlabel(const std::string &label)
Sets the label for the y-axis.
Definition: gnuplotinterface.hh:289