diff --git a/examples/sim_poly2p_comp_reorder.cpp b/examples/sim_poly2p_comp_reorder.cpp index 28d34e2a9..4d5da8e22 100644 --- a/examples/sim_poly2p_comp_reorder.cpp +++ b/examples/sim_poly2p_comp_reorder.cpp @@ -175,9 +175,15 @@ try ads_vals[2] = 0.0025; // ads_vals[1] = 0.0; // ads_vals[2] = 0.0; + std::vector water_vel_vals(2, -1e100); + water_vel_vals[0] = 0.0; + water_vel_vals[1] = 10.0; + std::vector shear_vrf_vals(2, -1e100); + shear_vrf_vals[0] = 1.0; + shear_vrf_vals[1] = 1.0; poly_props.set(c_max, mix_param, rock_density, dead_pore_vol, res_factor, c_max_ads, static_cast(ads_index), - c_vals_visc, visc_mult_vals, c_vals_ads, ads_vals); + c_vals_visc, visc_mult_vals, c_vals_ads, ads_vals, water_vel_vals, shear_vrf_vals); } bool use_gravity = (gravity[0] != 0.0 || gravity[1] != 0.0 || gravity[2] != 0.0); diff --git a/examples/sim_poly2p_incomp_reorder.cpp b/examples/sim_poly2p_incomp_reorder.cpp index 48aab1ebc..5045bb466 100644 --- a/examples/sim_poly2p_incomp_reorder.cpp +++ b/examples/sim_poly2p_incomp_reorder.cpp @@ -173,9 +173,15 @@ try ads_vals[2] = 0.0025; // ads_vals[1] = 0.0; // ads_vals[2] = 0.0; + std::vector water_vel_vals(2, -1e100); + water_vel_vals[0] = 0.0; + water_vel_vals[1] = 10.0; + std::vector shear_vrf_vals(2, -1e100); + shear_vrf_vals[0] = 1.0; + shear_vrf_vals[1] = 1.0; poly_props.set(c_max, mix_param, rock_density, dead_pore_vol, res_factor, c_max_ads, static_cast(ads_index), - c_vals_visc, visc_mult_vals, c_vals_ads, ads_vals); + c_vals_visc, visc_mult_vals, c_vals_ads, ads_vals, water_vel_vals, shear_vrf_vals); } // Warn if gravity but no density difference. diff --git a/examples/test_singlecellsolves.cpp b/examples/test_singlecellsolves.cpp index 217be6b49..4ff5fb1d4 100644 --- a/examples/test_singlecellsolves.cpp +++ b/examples/test_singlecellsolves.cpp @@ -129,9 +129,15 @@ try ads_vals[2] = 0.0025; // ads_vals[1] = 0.0; // ads_vals[2] = 0.0; + std::vector water_vel_vals(2, -1e100); + water_vel_vals[0] = 0.0; + water_vel_vals[1] = 10.0; + std::vector shear_vrf_vals(2, -1e100); + shear_vrf_vals[0] = 1.0; + shear_vrf_vals[1] = 1.0; poly_props.set(c_max, mix_param, rock_density, dead_pore_vol, res_factor, c_max_ads, static_cast(ads_index), - c_vals_visc, visc_mult_vals, c_vals_ads, ads_vals); + c_vals_visc, visc_mult_vals, c_vals_ads, ads_vals, water_vel_vals, shear_vrf_vals); // Initialising src int num_cells = grid->c_grid()->number_of_cells; diff --git a/opm/polymer/PolymerProperties.cpp b/opm/polymer/PolymerProperties.cpp index 68bec4479..da5c86125 100644 --- a/opm/polymer/PolymerProperties.cpp +++ b/opm/polymer/PolymerProperties.cpp @@ -58,6 +58,18 @@ namespace Opm { return ads_index_; } + + std::vector + PolymerProperties::shearWaterVelocity() const + { + return water_vel_vals_; + } + + std::vector + PolymerProperties::shearVrf() const + { + return shear_vrf_vals_; + } double PolymerProperties::viscMult(double c) const { diff --git a/opm/polymer/PolymerProperties.hpp b/opm/polymer/PolymerProperties.hpp index 197fd9489..79741bb1f 100644 --- a/opm/polymer/PolymerProperties.hpp +++ b/opm/polymer/PolymerProperties.hpp @@ -49,6 +49,8 @@ namespace Opm /// \param[in] visc_mult_vals Array of effective vicosity multiplier /// \param[in] c_vals_ads Array of concentration for adsorption values /// \param[in] ads_vals Array of adsorption values + /// \param[in] water_vel_vals_ Array of water phase velocity for shear + /// \param[in] shear_vrf_vals_ Array of viscosity reduction factor PolymerProperties(double c_max, double mix_param, double rock_density, @@ -59,7 +61,9 @@ namespace Opm const std::vector& c_vals_visc, const std::vector& visc_mult_vals, const std::vector& c_vals_ads, - const std::vector& ads_vals + const std::vector& ads_vals, + const std::vector& water_vel_vals, + const std::vector& shear_vrf_vals ) : c_max_(c_max), mix_param_(mix_param), @@ -71,7 +75,9 @@ namespace Opm c_vals_visc_(c_vals_visc), visc_mult_vals_(visc_mult_vals), c_vals_ads_(c_vals_ads), - ads_vals_(ads_vals) + ads_vals_(ads_vals), + water_vel_vals_(water_vel_vals), + shear_vrf_vals_(shear_vrf_vals) { } @@ -90,7 +96,9 @@ namespace Opm const std::vector& c_vals_visc, const std::vector& visc_mult_vals, const std::vector& c_vals_ads, - const std::vector& ads_vals + const std::vector& ads_vals, + const std::vector& water_vel_vals, + const std::vector& shear_vrf_vals ) { c_max_ = c_max; @@ -104,6 +112,8 @@ namespace Opm c_vals_ads_ = c_vals_ads; ads_vals_ = ads_vals; ads_index_ = ads_index; + water_vel_vals_ = water_vel_vals; + shear_vrf_vals_ = shear_vrf_vals; } void readFromDeck(const EclipseGridParser& gridparser) @@ -133,7 +143,11 @@ namespace Opm const PLYADS& plyads = gridparser.getPLYADS(); c_vals_ads_ = plyads.local_concentration_; ads_vals_ = plyads.adsorbed_concentration_; - + + // We assume NTPVT=1 + const PLYSHEAR& plyshear = gridparser.getPLYSHEAR(); + water_vel_vals_ = plyshear.water_velocity_; + shear_vrf_vals_ = plyshear.vrf_; } double cMax() const; @@ -149,6 +163,10 @@ namespace Opm double cMaxAds() const; int adsIndex() const; + + std::vector shearWaterVelocity() const; + + std::vector shearVrf() const; double viscMult(double c) const; @@ -259,6 +277,8 @@ namespace Opm std::vector visc_mult_vals_; std::vector c_vals_ads_; std::vector ads_vals_; + std::vector water_vel_vals_; + std::vector shear_vrf_vals_; void simpleAdsorptionBoth(double c, double& c_ads, double& dc_ads_dc, bool if_with_der) const; void adsorptionBoth(double c, double cmax,