From 62bd73be587079beb5b196a2bf29795bb922cf94 Mon Sep 17 00:00:00 2001 From: Holger Class <holger.class@iws.uni-stuttgart.de> Date: Thu, 18 Aug 2016 14:20:09 +0200 Subject: [PATCH] implemented the required changes from the discussion on Merge Request 179 --- .../binarycoefficients/h2o_heavyoil.hh | 8 +--- dumux/material/components/heavyoil.hh | 39 +------------------ .../3pwateroil/propertydefaults.hh | 2 +- .../implicit/3pwateroilsagdproblem.hh | 39 ++----------------- 4 files changed, 9 insertions(+), 79 deletions(-) diff --git a/dumux/material/binarycoefficients/h2o_heavyoil.hh b/dumux/material/binarycoefficients/h2o_heavyoil.hh index a6df04b32a..5318b230b3 100644 --- a/dumux/material/binarycoefficients/h2o_heavyoil.hh +++ b/dumux/material/binarycoefficients/h2o_heavyoil.hh @@ -1,11 +1,7 @@ // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- // vi: set et ts=4 sw=4 sts=4: /***************************************************************************** - * Copyright (C) 2011 by Holger Class * - * Copyright (C) 2010 by Andreas Lauser * - * Institute for Modelling Hydraulic and Environmental Systems * - * University of Stuttgart, Germany * - * email: <givenname>.<name>@iws.uni-stuttgart.de * + * See the file COPYING for full copying permissions. * * * * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -14,7 +10,7 @@ * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * diff --git a/dumux/material/components/heavyoil.hh b/dumux/material/components/heavyoil.hh index 12107f0949..52079401b1 100644 --- a/dumux/material/components/heavyoil.hh +++ b/dumux/material/components/heavyoil.hh @@ -229,30 +229,12 @@ public: const Scalar A = 8.25990; const Scalar B = 2830.065; const Scalar C = 42.95101; - /*const Scalar A = 7.00909;; - const Scalar B = 1462.266;; - const Scalar C = 215.110;;*/ - //const Scalar A = 6.90027; //n-Heptane http://tinyurl.com/lpo2h3s - //const Scalar B = 1266.871; - //const Scalar C = 216.757; Scalar T = temperature - 273.15; return 100*1.334*std::pow(10.0, (A - (B/(T + C)))); // in [Pa] - // return value2; - } - - /* P = 100 * 1.334 * (10.0)^(A - (B / (T + C)) => - * P/(100*1.334)=(10.0)^(A - (B / (T + C)) => - * P/133.4=(10.0)^(A - (B / (T + C)) => - * log(10)(P/133.4)=A - B / (T + C) => - * B / (T + C) =A-log(10) (P/133.4) => - * B/(A-log(10) (P/133.4))=T+C => - * T=B/(A-log(10) (P/133.4))-C - */ - static Scalar vaporTemperature(Scalar pressure) { const Scalar A = 8.25990; @@ -261,8 +243,8 @@ public: const Scalar P = pressure; - return Scalar ((B/(A-std::log10(P/100*1.334)))-C); //T=B/(A-log(10) (P/133.4))-C - //std::log(arg) / std::log(base); + return Scalar ((B/(A-std::log10(P/100*1.334)))-C); + } /*! @@ -363,7 +345,6 @@ public: */ static Scalar liquidDensity(Scalar temperature, Scalar pressure) { - // return molarLiquidDensity_(temperature)*molarMass(); // [kg/m^3] /* according to Lashanizadegan et al (2008) in Chemical Engineering Communications: */ /* Simultaneous Heat and Fluid Flow in Porous Media: Case Study: Steam Injection for Tertiary Oil Recovery */ @@ -425,22 +406,6 @@ public: * \param temperature temperature of component in \f$\mathrm{[K]}\f$ * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ */ - // static Scalar liquidViscosity(Scalar temperature, Scalar pressure) - // { - - /* according to Lashanizadegan et al (2008) in Chemical Engineering Communications: */ - /* Simultaneous Heat and Fluid Flow in Porous Media: Case Study: Steam Injection for Tertiary Oil Recovery */ - - //return 1027919.422*std::exp(-0.04862*temperature); // [Pa s] - - //according to http://www.ecltechnology.com/subsur/reports/pvt_tgb.pdf[Page 10] - - // Scalar temperatureFahrenheit = ((temperature-273.15)*1.8)+32; - // Scalar API = 15; - // return (std::pow(10,0.052*std::pow(API,2)-2.2704*API-5.7567)*std::pow(temperatureFahrenheit,-0.0222*std::pow(API,2)+0.9415*API-12.839))*0.001; // [Pa s] - - // } - static Scalar liquidViscosity(Scalar temperature, Scalar pressure) { diff --git a/dumux/porousmediumflow/3pwateroil/propertydefaults.hh b/dumux/porousmediumflow/3pwateroil/propertydefaults.hh index 48f0a337e7..8ca4decba4 100644 --- a/dumux/porousmediumflow/3pwateroil/propertydefaults.hh +++ b/dumux/porousmediumflow/3pwateroil/propertydefaults.hh @@ -139,7 +139,7 @@ SET_BOOL_PROP(ThreePWaterOil, UseMoles, true); //!< Define that mole fractions a // Actually the Forchheimer coefficient is also a function of the dimensions of the // porous medium. Taking it as a constant is only a first approximation // (Nield, Bejan, Convection in porous media, 2006, p. 10) -SET_SCALAR_PROP(BoxModel, SpatialParamsForchCoeff, 0.55); +SET_SCALAR_PROP(ThreePWaterOil, SpatialParamsForchCoeff, 0.55); } diff --git a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh index f5fcbaeab5..ede95b83fd 100644 --- a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh +++ b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh @@ -344,50 +344,23 @@ public: else if (globalPos[1] > 2.5 + eps_ && globalPos[1] < 3.5 - eps_) // production well { - //Scalar satWBound = 1.0; - // const Scalar satW = elemVolVars[scvIdx].saturation(wPhaseIdx); // Saturations - // const Scalar satG = elemVolVars[scvIdx].saturation(gPhaseIdx); - // const Scalar satN = elemVolVars[scvIdx].saturation(nPhaseIdx); - const Scalar elemPressW = elemVolVars[scvIdx].pressure(wPhaseIdx); //Pressures - // const Scalar elemPressG = elemVolVars[scvIdx].pressure(gPhaseIdx); const Scalar elemPressN = elemVolVars[scvIdx].pressure(nPhaseIdx); const Scalar densityW = elemVolVars[scvIdx].fluidState().density(wPhaseIdx); //Densities - // const Scalar densityG = elemVolVars[scvIdx].fluidState().density(gPhaseIdx); const Scalar densityN = elemVolVars[scvIdx].fluidState().density(nPhaseIdx); - // const Scalar moDensityW = elemVolVars[scvIdx].fluidState().molarDensity(wPhaseIdx); //Molar Densities - // const Scalar moDensityG = elemVolVars[scvIdx].fluidState().molarDensity(gPhaseIdx); - // const Scalar moDensityN = elemVolVars[scvIdx].fluidState().molarDensity(nPhaseIdx); - - - // const Scalar maDensityW = elemVolVars[scvIdx].fluidState().density(wPhaseIdx); //Molar Densities - // const Scalar maDensityG = elemVolVars[scvIdx].fluidState().density(gPhaseIdx); - // const Scalar maDensityN = elemVolVars[scvIdx].fluidState().density(nPhaseIdx); - const Scalar elemMobW = elemVolVars[scvIdx].mobility(wPhaseIdx); //Mobilities - // const Scalar elemMobG = elemVolVars[scvIdx].mobility(gPhaseIdx); const Scalar elemMobN = elemVolVars[scvIdx].mobility(nPhaseIdx); - // const Scalar molFracWinW = elemVolVars[scvIdx].fluidState().moleFraction(wPhaseIdx, wCompIdx); - // const Scalar molFracWinN = elemVolVars[scvIdx].fluidState().moleFraction(nPhaseIdx, wCompIdx); - // const Scalar molFracWinG = elemVolVars[scvIdx].fluidState().moleFraction(gPhaseIdx, wCompIdx); - // const Scalar molFracNinW = elemVolVars[scvIdx].fluidState().moleFraction(wPhaseIdx, nCompIdx); - // const Scalar molFracNinN = elemVolVars[scvIdx].fluidState().moleFraction(nPhaseIdx, nCompIdx); - // const Scalar molFracNinG = elemVolVars[scvIdx].fluidState().moleFraction(gPhaseIdx, nCompIdx); - - const Scalar enthW = elemVolVars[scvIdx].enthalpy(wPhaseIdx); //Mobilities - // const Scalar enthG = elemVolVars[scvIdx].enthalpy(gPhaseIdx); + const Scalar enthW = elemVolVars[scvIdx].enthalpy(wPhaseIdx); //Enthalpies const Scalar enthN = elemVolVars[scvIdx].enthalpy(nPhaseIdx); const Scalar wellRadius = 0.50 * 0.3048; // 0.50 ft as specified by SPE9 - // const Scalar wellArea = M_PI*std::pow(wellRadius,2); // [m^2] const Scalar gridHeight_ = 0.5; const Scalar effectiveRadius_ = 0.208 * gridHeight_; //Peaceman's Well Model - // const Scalar effectiveRadius_ = 0.56; //divided by molarMass() of water to convert from kg/m s to mol/m s const Scalar qW = (((2*3.1415*0.5*4e-14)/(std::log(effectiveRadius_/wellRadius))) * @@ -396,12 +369,12 @@ public: const Scalar qN = (((2*3.1415*0.5*4e-14)/(std::log(effectiveRadius_/wellRadius))) * densityN * elemMobN * (elemPressN-pOut_))/0.35; + Scalar qE; //without cooling: - // const Scalar qE = qW*0.018*enthW + qN*enthN*0.350; + // qE = qW*0.018*enthW + qN*enthN*0.350; //with cooling: see Diplomarbeit Stefan Roll, Sept. 2015 Scalar wT = elemVolVars[scvIdx].temperature(); // well temperature - Scalar qE; if ( wT > 495. ) { qE = qW*0.018*enthW + qN*enthN*0.350 + (wT-495.)*5000.; // ~3x injected enthalpy @@ -490,11 +463,7 @@ private: // TODO this is a very evil hack mutable Scalar massProducedOil_; mutable Scalar massProducedWater_; - //Scalar maxDepth_; - //Scalar episodeLength_; - //Scalar nEpisodes_ ; - //int indexEpisode; - //int episodeType_; + std::string name_; std::ofstream massBalance; -- GitLab