diff --git a/dumux/io/gnuplotinterface.hh b/dumux/io/gnuplotinterface.hh index 8d042f7aad348b3e1fb9eefbea5b8433b9d96fa6..7e8f4fed09e2802544a22c47a02832de3a0c4729 100644 --- a/dumux/io/gnuplotinterface.hh +++ b/dumux/io/gnuplotinterface.hh @@ -42,6 +42,7 @@ #include <string> #include <vector> +#include <dune/common/deprecated.hh> #include <dune/common/stdstreams.hh> namespace Dumux @@ -144,10 +145,30 @@ public: /*! * \brief Deletes all plots from a plotting window and resets user-defined options */ - void reset(const bool persist = true) + DUNE_DEPRECATED_MSG("reset() is deprecated. Use resetPlot() instead.") + void reset() + { + curveFile_.resize(0); + curveOptions_.resize(0); + curveTitle_.resize(0); + plotOptions_ = ""; + } + + /*! + * \brief Restarts gnuplot + */ + void resetAll(const bool persist = true) { close(); open(persist); + resetPlot(); + } + + /*! + * \brief Deletes all plots from a plotting window and resets user-defined options + */ + void resetPlot() + { curveFile_.resize(0); curveOptions_.resize(0); curveTitle_.resize(0); diff --git a/dumux/io/ploteffectivediffusivitymodel.hh b/dumux/io/ploteffectivediffusivitymodel.hh index d150b10c94d5ff524bd48763269e6a0820573b56..0ec3c5a08272b10479c97e6371b33a54d903cb8d 100644 --- a/dumux/io/ploteffectivediffusivitymodel.hh +++ b/dumux/io/ploteffectivediffusivitymodel.hh @@ -24,6 +24,8 @@ #ifndef DUMUX_PLOT_EFFECTIVE_DIFFUSIVITY_MODEL_HH #define DUMUX_PLOT_EFFECTIVE_DIFFUSIVITY_MODEL_HH +#include <dune/common/deprecated.hh> + #include <dumux/common/basicproperties.hh> #include <dumux/io/gnuplotinterface.hh> @@ -53,6 +55,39 @@ public: gnuplot_.setInteraction(interaction); } + /*! + * \brief Add a effective diffusion factor-saturation data set to the plot + * + * \param gnuplot The gnuplot interface + * \param params The material law parameters + * \param lowerSat Minimum x-value for data set + * \param upperSat Maximum x-value for data set + * \param curveName Name of the data set + * \param curveOptions Plotting options associated with that data set + */ + void adddeffcurve(GnuplotInterface<Scalar> &gnuplot, + Scalar porosity, + Scalar lowerSat = 0.0, + Scalar upperSat = 1.0, + std::string curveName = "deff", + std::string curveOptions = "w l") + { + std::vector<Scalar> sw(numIntervals_+1); + std::vector<Scalar> deff(numIntervals_+1); + Scalar satInterval = upperSat - lowerSat; + + for (int i = 0; i <= numIntervals_; i++) + { + sw[i] = lowerSat + satInterval * Scalar(i) / Scalar(numIntervals_); + deff[i] = EffectiveDiffusivityModel::effectiveDiffusivity(porosity, sw[i], + 1.0 /*Diffusion Coefficient*/); + } + + gnuplot.setXlabel("phase saturation [-]"); + gnuplot.setYlabel("effective diffusion/molecular diffusion [-]"); + gnuplot.addDataSetToPlot(sw, deff, curveName, curveOptions); + } + /*! * \brief Plot the effective diffusion factor-saturation curve * @@ -61,6 +96,7 @@ public: * \param upperSat Maximum x-value * \param curveTitle Name of the plotted curve */ + DUNE_DEPRECATED_MSG("plotdeff() is deprecated. Use adddeffcurve() instead.") void plotdeff(Scalar porosity, Scalar lowerSat = 0.0, Scalar upperSat = 1.0, diff --git a/dumux/io/plotmateriallaw.hh b/dumux/io/plotmateriallaw.hh index f90b81c751cec6f2550f562cb77624dba955de5b..78e5b8132239470375a3d47bcfa768a580313346 100644 --- a/dumux/io/plotmateriallaw.hh +++ b/dumux/io/plotmateriallaw.hh @@ -24,6 +24,8 @@ #ifndef DUMUX_PLOT_FLUID_MATRIX_LAW_HH #define DUMUX_PLOT_FLUID_MATRIX_LAW_HH +#include <dune/common/deprecated.hh> + #include <dumux/common/basicproperties.hh> #include <dumux/io/gnuplotinterface.hh> @@ -60,6 +62,38 @@ public: gnuplotkrdsw_.setInteraction(interaction); } + /*! + * \brief Add a capillary pressure-saturation data set to the plot + * + * \param gnuplot The gnuplot interface + * \param params The material law parameters + * \param lowerSat Minimum x-value for data set + * \param upperSat Maximum x-value for data set + * \param curveName Name of the data set + * \param curveOptions Plotting options associated with that data set + */ + void addpcswcurve(GnuplotInterface<Scalar> &gnuplot, + const MaterialLawParams ¶ms, + Scalar lowerSat = 0.0, + Scalar upperSat = 1.0, + std::string curveName = "pc-Sw", + std::string curveOptions = "w l") + { + std::vector<Scalar> sw(numIntervals_+1); + std::vector<Scalar> pc(numIntervals_+1); + Scalar satInterval = upperSat - lowerSat; + + for (int i = 0; i <= numIntervals_; i++) + { + sw[i] = lowerSat + satInterval * Scalar(i) / Scalar(numIntervals_); + pc[i] = MaterialLaw::pc(params, sw[i]); + } + + gnuplot.setXlabel("wetting phase saturation [-]"); + gnuplot.setYlabel("capillary pressure [Pa]"); + gnuplot.addDataSetToPlot(sw, pc, curveName, curveOptions); + } + /*! * \brief Plot the capillary pressure-saturation curve * @@ -68,6 +102,7 @@ public: * \param upperSat Maximum x-value * \param curveTitle Name of the plotted curve */ + DUNE_DEPRECATED_MSG("plotpcsw() is deprecated. Use addpcswcurve() instead.") void plotpcsw(const MaterialLawParams ¶ms, Scalar lowerSat = 0.0, Scalar upperSat = 1.0, @@ -108,6 +143,44 @@ public: gnuplotpcsw_.plot("pc-Sw"); } + /*! + * \brief Add a saturation-capillary pressure data set to the plot + * + * \param gnuplot The gnuplot interface + * \param params The material law parameters + * \param lowerpc Minimum x-value for data set + * \param upperpc Maximum x-value for data set + * \param curveName Name of the data set + * \param curveOptions Plotting options associated with that data set + */ + void addswpccurve(GnuplotInterface<Scalar> &gnuplot, + const MaterialLawParams ¶ms, + Scalar lowerpc = 0.0, + Scalar upperpc = 5000.0, + std::string curveName = "Sw-pc", + std::string curveOptions = "w l") + { + std::vector<Scalar> sw; + std::vector<Scalar> pc; + Scalar pcInterval = upperpc - lowerpc; + + Scalar pcTemp, swTemp = 0.0; + for (int i = 0; i <= numIntervals_; i++) + { + pcTemp = lowerpc + pcInterval * Scalar(i) / Scalar(numIntervals_); + swTemp = MaterialLaw::sw(params, pcTemp); + if (checkValues_(pcTemp, swTemp)) + { + pc.push_back(pcTemp); + sw.push_back(swTemp); + } + } + + gnuplot.setXlabel("capillary pressure [Pa]"); + gnuplot.setYlabel("wetting phase saturation [-]"); + gnuplot.addDataSetToPlot(pc, sw, curveName, curveOptions); + } + /*! * \brief Plot the saturation-capillary pressure curve * @@ -116,6 +189,7 @@ public: * \param upperpc Maximum x-value * \param curveTitle Name of the plotted curve */ + DUNE_DEPRECATED_MSG("plotswpc() is deprecated. Use addswpccurve() instead.") void plotswpc(const MaterialLawParams ¶ms, Scalar lowerpc = 0.0, Scalar upperpc = 5000.0, @@ -149,6 +223,44 @@ public: gnuplotswpc_.plot("sw-pc"); } + /*! + * \brief Add a capillary pressure-saturation gradient data set to the plot + * + * \param gnuplot The gnuplot interface + * \param params The material law parameters + * \param lowerSat Minimum x-value for data set + * \param upperSat Maximum x-value for data set + * \param curveName Name of the data set + * \param curveOptions Plotting options associated with that data set + */ + void adddpcdswcurve(GnuplotInterface<Scalar> &gnuplot, + const MaterialLawParams ¶ms, + Scalar lowerSat = 0.0, + Scalar upperSat = 1.0, + std::string curveName = "dpcdsw", + std::string curveOptions = "w l") + { + std::vector<Scalar> sw; + std::vector<Scalar> dpcdsw; + Scalar satInterval = upperSat - lowerSat; + + Scalar swTemp, dpcdswTemp = 0.0; + for (int i = 0; i <= numIntervals_; i++) + { + swTemp = lowerSat + satInterval * Scalar(i) / Scalar(numIntervals_); + dpcdswTemp = MaterialLaw::dpc_dsw(params, swTemp); + if (checkValues_(swTemp, dpcdsw)) + { + sw.push_back(swTemp); + dpcdsw.push_back(dpcdswTemp); + } + } + + gnuplot.setXlabel("wetting phase saturation [-]"); + gnuplot.setYlabel("gradient of the pc-Sw curve [Pa]"); + gnuplot.addDataSetToPlot(sw, dpcdsw, curveName, curveOptions); + } + /*! * \brief Plot the gradient of the capillary pressure-saturation curve * @@ -157,6 +269,7 @@ public: * \param upperSat Maximum x-value * \param curveTitle Name of the plotted curve */ + DUNE_DEPRECATED_MSG("plotdpcdsw() is deprecated. Use adddpcdswcurve() instead.") void plotdpcdsw(const MaterialLawParams ¶ms, Scalar lowerSat = 0.0, Scalar upperSat = 1.0, @@ -190,6 +303,44 @@ public: gnuplotdpcdsw_.plot("dpcdsw"); } + /*! + * \brief Add a saturation-capillary pressure gradient data set to the plot + * + * \param gnuplot The gnuplot interface + * \param params The material law parameters + * \param lowerpc Minimum x-value for data set + * \param upperpc Maximum x-value for data set + * \param curveName Name of the data set + * \param curveOptions Plotting options associated with that data set + */ + void adddswdpccurve(GnuplotInterface<Scalar> &gnuplot, + const MaterialLawParams ¶ms, + Scalar lowerpc = 0.0, + Scalar upperpc = 5000.0, + std::string curveName = "dswdpc", + std::string curveOptions = "w l") + { + std::vector<Scalar> pc; + std::vector<Scalar> dswdpc; + Scalar pcInterval = upperpc - lowerpc; + + Scalar dswdpcTemp, pcTemp = 0.0; + for (int i = 0; i <= numIntervals_; i++) + { + pcTemp = lowerpc + pcInterval * Scalar(i) / Scalar(numIntervals_); + dswdpcTemp = MaterialLaw::dsw_dpc(params, pcTemp); + if (checkValues_(pcTemp, dswdpcTemp)) + { + pc.push_back(pcTemp); + dswdpc.push_back(dswdpcTemp); + } + } + + gnuplot.setXlabel("capillary pressure [Pa]"); + gnuplot.setYlabel("gradient of the Sw-pc curve [1/Pa]"); + gnuplot.addDataSetToPlot(pc, dswdpc, curveName, curveOptions); + } + /*! * \brief Plot the gradient of the saturation-capillary pressure curve * @@ -198,6 +349,7 @@ public: * \param upperpc Maximum x-value * \param curveTitle Name of the plotted curve */ + DUNE_DEPRECATED_MSG("plotdswdpc() is deprecated. Use adddswdpccurve() instead.") void plotdswdpc(const MaterialLawParams ¶ms, Scalar lowerpc = 0.0, Scalar upperpc = 5000.0, @@ -231,6 +383,48 @@ public: gnuplotdswdpc_.plot("dswdpc"); } + /*! + * \brief Add relative permeabilities data sets to the plot + * + * \param gnuplot The gnuplot interface + * \param params The material law parameters + * \param lowerSat Minimum x-value for data set + * \param upperSat Maximum x-value for data set + * \param curveName Name of the data set + * \param curveOptions Plotting options associated with that data set + */ + void addkrcurves(GnuplotInterface<Scalar> &gnuplot, + const MaterialLawParams ¶ms, + Scalar lowerSat = 0.0, + Scalar upperSat = 1.0, + std::string curveName = "kr", + std::string curveOptions = "w l") + { + std::vector<Scalar> sw; + std::vector<Scalar> krw; + std::vector<Scalar> krn; + Scalar satInterval = upperSat - lowerSat; + + Scalar swTemp, krwTemp, krnTemp = 0.0; + for (int i = 0; i <= numIntervals_; i++) + { + swTemp = lowerSat + satInterval * Scalar(i) / Scalar(numIntervals_); + krwTemp = MaterialLaw::krw(params, swTemp); + krnTemp = MaterialLaw::krn(params, swTemp); + if (checkValues_(swTemp, krwTemp) && checkValues_(swTemp, krnTemp)) + { + sw.push_back(swTemp); + krw.push_back(krwTemp); + krn.push_back(krnTemp); + } + } + + gnuplot.setXlabel("wetting phase saturation [-]"); + gnuplot.setYlabel("relative permeability [-]"); + gnuplot.addDataSetToPlot(sw, krw, curveName + "_krw", curveOptions); + gnuplot.addDataSetToPlot(sw, krn, curveName + "_krw", curveOptions); + } + /*! * \brief Plot the relative permeabilities * @@ -239,6 +433,7 @@ public: * \param upperSat Maximum x-value * \param curveTitle Name of the plotted curve */ + DUNE_DEPRECATED_MSG("plotkr() is deprecated. Use addkrcurves() instead.") void plotkr(const MaterialLawParams ¶ms, Scalar lowerSat = 0.0, Scalar upperSat = 1.0, @@ -276,6 +471,48 @@ public: gnuplotkr_.plot("kr"); } + /*! + * \brief Add relative permeabilities gradients data sets to the plot + * + * \param gnuplot The gnuplot interface + * \param params The material law parameters + * \param lowerSat Minimum x-value for data set + * \param upperSat Maximum x-value for data set + * \param curveName Name of the data set + * \param curveOptions Plotting options associated with that data set + */ + void adddkrdswcurves(GnuplotInterface<Scalar> &gnuplot, + const MaterialLawParams ¶ms, + Scalar lowerSat = 0.0, + Scalar upperSat = 1.0, + std::string curveName = "dkrndsw", + std::string curveOptions = "w l") + { + std::vector<Scalar> sw; + std::vector<Scalar> dkrw_dsw; + std::vector<Scalar> dkrn_dsw; + Scalar satInterval = upperSat - lowerSat; + + Scalar swTemp, dkrwdswTemp, dkrndswTemp = 0.0; + for (int i = 0; i <= numIntervals_; i++) + { + swTemp = lowerSat + satInterval * Scalar(i) / Scalar(numIntervals_); + dkrwdswTemp = MaterialLaw::dkrw_dsw(params, swTemp); + dkrndswTemp = MaterialLaw::dkrn_dsw(params, swTemp); + if (checkValues_(swTemp, dkrwdswTemp) && checkValues_(swTemp, dkrndswTemp)) + { + sw.push_back(swTemp); + dkrw_dsw.push_back(dkrwdswTemp); + dkrn_dsw.push_back(dkrndswTemp); + } + } + + gnuplot.setXlabel("wetting phase saturation [-]"); + gnuplot.setYlabel("gradient of the kr-Sw function [-]"); + gnuplot.addDataSetToPlot(sw, dkrw_dsw, curveName + "_dkrw_dsw", curveOptions); + gnuplot.addDataSetToPlot(sw, dkrn_dsw, curveName + "_dkrn_dsw", curveOptions); + } + /*! * \brief Plot the gradient of the relative permeabilities * @@ -284,6 +521,7 @@ public: * \param upperSat Maximum x-value * \param curveTitle Name of the plotted curve */ + DUNE_DEPRECATED_MSG("plotdkrdsw() is deprecated. Use adddkrdswcurves() instead.") void plotdkrdsw(const MaterialLawParams ¶ms, Scalar lowerSat = 0.0, Scalar upperSat = 1.0, diff --git a/dumux/io/plotthermalconductivitymodel.hh b/dumux/io/plotthermalconductivitymodel.hh index 42851c23b896b817ec7f43438c167a3c7b2fbfe5..b608716a0505394db7892d3788f21b44cff44949 100644 --- a/dumux/io/plotthermalconductivitymodel.hh +++ b/dumux/io/plotthermalconductivitymodel.hh @@ -24,6 +24,8 @@ #ifndef DUMUX_PLOT_THERMAL_CONDUCTIVITY_LAW_HH #define DUMUX_PLOT_THERMAL_CONDUCTIVITY_LAW_HH +#include <dune/common/deprecated.hh> + #include <dumux/common/basicproperties.hh> #include <dumux/io/gnuplotinterface.hh> #include <dumux/material/fluidstates/compositional.hh> @@ -68,7 +70,9 @@ public: * \param pressure reference pressure in \f$\mathrm{[Pa]}\f$ * \param interaction Specifies whether a live output via a gnuplot window is wanted */ - PlotThermalConductivityModel(Scalar temperature, Scalar pressure, bool interaction = true) + PlotThermalConductivityModel(Scalar temperature = 283.15, + Scalar pressure = 1e5, + bool interaction = true) : numIntervals_(1000) { FluidState fluidstate; @@ -80,6 +84,42 @@ public: gnuplot_.setInteraction(interaction); } + /*! + * \brief Add a effective thermal conductivity-saturation curve to the plot + * + * \param gnuplot The gnuplot interface + * \param params The material law parameters + * \param lowerSat Minimum x-value for data set + * \param upperSat Maximum x-value for data set + * \param curveName Name of the data set + * \param curveOptions Plotting options associated with that data set + */ + 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") + { + std::vector<Scalar> sw(numIntervals_+1); + std::vector<Scalar> lambda(numIntervals_+1); + Scalar satInterval = upperSat - lowerSat; + + for (int i = 0; i <= numIntervals_; i++) + { + sw[i] = lowerSat + satInterval * Scalar(i) / Scalar(numIntervals_); + lambda[i] = ThermalConductivityModel::effectiveThermalConductivity(sw[i], lambdaW_, + lambdaN_, lambdaSolid, + porosity, rhoSolid); + } + + gnuplot.setXlabel("wetting phase saturation [-]"); + gnuplot.setYlabel("effective thermal conductivity [W/(m K)]"); + gnuplot.addDataSetToPlot(sw, lambda, curveName, curveOptions); + } + /*! * \brief Plot the effective thermal conductivity-saturation curve * @@ -90,6 +130,7 @@ public: * \param upperSat Maximum x-value * \param curveTitle Name of the plotted curve */ + DUNE_DEPRECATED_MSG("plotlambdaeff() is deprecated. Use addlambdaeffcurve() instead.") void plotlambdaeff(Scalar porosity, Scalar rhoSolid, Scalar lambdaSolid, diff --git a/test/material/fluidmatrixinteractions/2p/test_thermalconductivityjohansen.input b/test/material/fluidmatrixinteractions/2p/test_thermalconductivityjohansen.input index c302e503d6f18e2d0c197da4077c9456e849f573..52dcaeb559b3eda9f5180c2ee23181770562982e 100644 --- a/test/material/fluidmatrixinteractions/2p/test_thermalconductivityjohansen.input +++ b/test/material/fluidmatrixinteractions/2p/test_thermalconductivityjohansen.input @@ -8,4 +8,4 @@ UpperRight = 6 4 Cells = 48 32 [Conductivity] -File = johansen +File = johansen_lambda_eff diff --git a/test/material/fluidmatrixinteractions/2p/test_thermalconductivitysomerton.input b/test/material/fluidmatrixinteractions/2p/test_thermalconductivitysomerton.input index 8cb19ec9d36f03e71e3490589224b38d0c00532d..d90b9fd49b581ef004dccbaa505f8b7589d395fc 100644 --- a/test/material/fluidmatrixinteractions/2p/test_thermalconductivitysomerton.input +++ b/test/material/fluidmatrixinteractions/2p/test_thermalconductivitysomerton.input @@ -8,4 +8,4 @@ UpperRight = 6 4 Cells = 48 32 [Conductivity] -File = somerton +File = somerton_lambda_eff diff --git a/test/material/fluidmatrixinteractions/2p/thermalconductivityspatialparams.hh b/test/material/fluidmatrixinteractions/2p/thermalconductivityspatialparams.hh index 357047a60586bd5a518201da6c6ecdbd2f4a6a67..8c21280e58139832ccb371f8ec6e869e3f5dfcb0 100644 --- a/test/material/fluidmatrixinteractions/2p/thermalconductivityspatialparams.hh +++ b/test/material/fluidmatrixinteractions/2p/thermalconductivityspatialparams.hh @@ -106,10 +106,11 @@ public: */ void plotMaterialLaw() { - PlotThermalConductivityModel<TypeTag> plotThermalConductivityModel_(293.15, 1e5, false); + GnuplotInterface<Scalar> gnuplot(false); + PlotThermalConductivityModel<TypeTag> plotThermalConductivityModel_(293.15, 1e5); std::string fileName = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Conductivity, File); - plotThermalConductivityModel_.plotlambdaeff(porosity_, rhoSolid_, lambdaSolid_, - 0.0, 1.0, fileName); + plotThermalConductivityModel_.addlambdaeffcurve(gnuplot, porosity_, rhoSolid_, lambdaSolid_, + 0.0, 1.0, fileName); } /*! diff --git a/test/material/fluidmatrixinteractions/effectivediffusivityspatialparams.hh b/test/material/fluidmatrixinteractions/effectivediffusivityspatialparams.hh index 72f2a5b31124462a70350ca551ad18441a0393d1..be57d35b295325ed190b2aa3fcb418d81673a8d8 100644 --- a/test/material/fluidmatrixinteractions/effectivediffusivityspatialparams.hh +++ b/test/material/fluidmatrixinteractions/effectivediffusivityspatialparams.hh @@ -106,9 +106,10 @@ public: */ void plotMaterialLaw() { - PlotEffectiveDiffusivityModel<TypeTag> plotEffectiveDiffusivityModel(false); + GnuplotInterface<Scalar> gnuplot(false); + PlotEffectiveDiffusivityModel<TypeTag> plotEffectiveDiffusivityModel; std::string fileName = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Diffusivity, File); - plotEffectiveDiffusivityModel.plotdeff(porosity_, 0.0, 1.0, fileName); + plotEffectiveDiffusivityModel.adddeffcurve(gnuplot, porosity_, 0.0, 1.0, fileName); } /*! diff --git a/test/material/fluidmatrixinteractions/test_effectivediffusivityconstant.input b/test/material/fluidmatrixinteractions/test_effectivediffusivityconstant.input index 92d3655a0496e544dac90d8a1ed1d04476d49eef..5ace3f3b5712a066a2e6c9822f80e3d7f53645a6 100644 --- a/test/material/fluidmatrixinteractions/test_effectivediffusivityconstant.input +++ b/test/material/fluidmatrixinteractions/test_effectivediffusivityconstant.input @@ -7,7 +7,7 @@ UpperRight = 6 4 Cells = 48 32 [Diffusivity] -File = constant +File = constant_d_eff [] TauTortuosity = 0.3 diff --git a/test/material/fluidmatrixinteractions/test_effectivediffusivityconstanttau.input b/test/material/fluidmatrixinteractions/test_effectivediffusivityconstanttau.input index 99c4467422e5a86c355ce95d0976a4b7f4d85ba7..f759f333bb535a4c7fcc1d07890d3e27f36ea0c1 100644 --- a/test/material/fluidmatrixinteractions/test_effectivediffusivityconstanttau.input +++ b/test/material/fluidmatrixinteractions/test_effectivediffusivityconstanttau.input @@ -10,4 +10,4 @@ UpperRight = 6 4 Cells = 48 32 [Diffusivity] -File = constanttau +File = constanttau_d_eff diff --git a/test/material/fluidmatrixinteractions/test_effectivediffusivitymillingtonquirk.input b/test/material/fluidmatrixinteractions/test_effectivediffusivitymillingtonquirk.input index 4d23f437de690a95ecb4820861fd71c34b1d1141..4e445a6fe43fe956f5cfc9e58bee4424f463bc0a 100644 --- a/test/material/fluidmatrixinteractions/test_effectivediffusivitymillingtonquirk.input +++ b/test/material/fluidmatrixinteractions/test_effectivediffusivitymillingtonquirk.input @@ -8,4 +8,4 @@ UpperRight = 6 4 Cells = 48 32 [Diffusivity] -File = millingtonquirk +File = millingtonquirk_d_eff diff --git a/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh b/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh index c0e5d186e237593e74f18bd6b9c01e6ecec3d1e8..7ed89c2aa520ffe9dd8d08de2d95893f02a2189e 100644 --- a/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh +++ b/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh @@ -387,7 +387,7 @@ public: << std::endl; evaporationFile << time/86400.0 << " " << storageChange[contiWEqIdx]*86400.0 << std::endl; - gnuplot_.reset(); + gnuplot_.resetPlot(); gnuplot_.setInteraction(liveEvaporationRates_); gnuplot_.setXRange(0.0, time/86400.0); gnuplot_.setYRange(0.0, 12.0); diff --git a/test/porousmediumflow/2p2c/implicit/waterairspatialparams.hh b/test/porousmediumflow/2p2c/implicit/waterairspatialparams.hh index 6b88e122db3d376ea43e56da2f5b8123b360c9e5..68d348e9919878b05a4762252f1bc8bd92632f1d 100644 --- a/test/porousmediumflow/2p2c/implicit/waterairspatialparams.hh +++ b/test/porousmediumflow/2p2c/implicit/waterairspatialparams.hh @@ -126,21 +126,31 @@ public: */ void plotMaterialLaw() { - PlotMaterialLaw<TypeTag> plotMaterialLaw(plotFluidMatrixInteractions_); - PlotEffectiveDiffusivityModel<TypeTag> plotEffectiveDiffusivityModel(plotFluidMatrixInteractions_); - PlotThermalConductivityModel<TypeTag> plotThermalConductivityModel(283.15/*temperature*/, 1e5/*pressure*/, - plotFluidMatrixInteractions_); - - plotMaterialLaw.plotpcsw(fineMaterialParams_, 0.2, 1.0, "fine"); - plotMaterialLaw.plotpcsw(coarseMaterialParams_, 0.2, 1.0, "coarse"); - plotMaterialLaw.plotkr(fineMaterialParams_, 0.2, 1.0, "fine"); - plotMaterialLaw.plotkr(coarseMaterialParams_, 0.2, 1.0, "coarse"); - - plotEffectiveDiffusivityModel.plotdeff(finePorosity_, 0.0, 1.0, "fine"); - plotEffectiveDiffusivityModel.plotdeff(coarsePorosity_, 0.0, 1.0, "coarse"); - - plotThermalConductivityModel.plotlambdaeff(finePorosity_, 2700.0, lambdaSolid_, 0.0, 1.0, "fine"); - plotThermalConductivityModel.plotlambdaeff(coarsePorosity_, 2700.0, lambdaSolid_, 0.0, 1.0, "coarse"); + PlotMaterialLaw<TypeTag> plotMaterialLaw; + GnuplotInterface<Scalar> gnuplot(plotFluidMatrixInteractions_); + gnuplot.setInteraction(plotFluidMatrixInteractions_); + plotMaterialLaw.addpcswcurve(gnuplot, fineMaterialParams_, 0.2, 1.0, "fine", "w lp"); + plotMaterialLaw.addpcswcurve(gnuplot, coarseMaterialParams_, 0.2, 1.0, "coarse", "w l"); + gnuplot.setOption("set xrange [0:1]"); + gnuplot.setOption("set label \"residual\\nsaturation\" at 0.1,100000 center"); + gnuplot.plot("pc-Sw"); + + gnuplot.resetAll(); + plotMaterialLaw.addkrcurves(gnuplot, fineMaterialParams_, 0.2, 1.0, "fine"); + plotMaterialLaw.addkrcurves(gnuplot, coarseMaterialParams_, 0.2, 1.0, "coarse"); + gnuplot.plot("kr"); + + gnuplot.resetAll(); + PlotEffectiveDiffusivityModel<TypeTag> plotEffectiveDiffusivityModel; + plotEffectiveDiffusivityModel.adddeffcurve(gnuplot, finePorosity_, 0.0, 1.0, "fine"); + plotEffectiveDiffusivityModel.adddeffcurve(gnuplot, coarsePorosity_, 0.0, 1.0, "coarse"); + gnuplot.plot("deff"); + + gnuplot.resetAll(); + PlotThermalConductivityModel<TypeTag> plotThermalConductivityModel; + plotThermalConductivityModel.addlambdaeffcurve(gnuplot, finePorosity_, 2700.0, lambdaSolid_, 0.0, 1.0, "fine"); + plotThermalConductivityModel.addlambdaeffcurve(gnuplot, coarsePorosity_, 2700.0, lambdaSolid_, 0.0, 1.0, "coarse"); + gnuplot.plot("lambdaeff"); } /*! diff --git a/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh b/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh index 6c50789b12374b549634093736a14d8336ccd8e4..2c682e3b2d94d6ae0ba8823d29183823aa926039 100644 --- a/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh +++ b/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh @@ -345,8 +345,8 @@ public: } // use gnuplot for plotting the line data + gnuplot_.resetPlot(); gnuplot_.setInteraction(true); - gnuplot_.reset(); gnuplot_.setXlabel("xN2w [-]"); gnuplot_.setYlabel("y [m]"); std::ostringstream stream;