Exemplo n.º 1
0
namespace Properties {
NEW_TYPE_TAG(EclFlowGasOilProblem, INHERITS_FROM(EclFlowProblem));
//! The indices required by the model
SET_TYPE_PROP(EclFlowGasOilProblem, Indices,
              Ewoms::BlackOilTwoPhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent)?1:0,
                GET_PROP_VALUE(TypeTag, EnablePolymer)?1:0,
                /*PVOffset=*/0, /*disabledCompIdx=*/1>);
}}
Exemplo n.º 2
0
 /// Construct the model. It will retain references to the
 /// arguments of this functions, and they are expected to
 /// remain in scope for the lifetime of the solver.
 /// \param[in] param            parameters
 /// \param[in] grid             grid data structure
 /// \param[in] wells            well structure
 /// \param[in] vfp_properties   Vertical flow performance tables
 /// \param[in] linsolver        linear solver
 /// \param[in] eclState         eclipse state
 /// \param[in] terminal_output  request output to cout/cerr
 BlackoilModelEbos(Simulator& ebosSimulator,
                   const ModelParameters& param,
                   BlackoilWellModel<TypeTag>& well_model,
                   const bool terminal_output)
 : ebosSimulator_(ebosSimulator)
 , grid_(ebosSimulator_.vanguard().grid())
 , phaseUsage_(phaseUsageFromDeck(eclState()))
 , has_disgas_(FluidSystem::enableDissolvedGas())
 , has_vapoil_(FluidSystem::enableVaporizedOil())
 , has_solvent_(GET_PROP_VALUE(TypeTag, EnableSolvent))
 , has_polymer_(GET_PROP_VALUE(TypeTag, EnablePolymer))
 , has_polymermw_(GET_PROP_VALUE(TypeTag, EnablePolymerMW))
 , has_energy_(GET_PROP_VALUE(TypeTag, EnableEnergy))
 , param_( param )
 , well_model_ (well_model)
 , terminal_output_ (terminal_output)
 , current_relaxation_(1.0)
 , dx_old_(UgGridHelpers::numCells(grid_))
 {
     // compute global sum of number of cells
     global_nc_ = detail::countGlobalCells(grid_);
     convergence_reports_.reserve(300); // Often insufficient, but avoids frequent moves.
 }
Exemplo n.º 3
0
        typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
        typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
        typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;

        static const int numEq = Indices::numEq;
        typedef double Scalar;

        typedef Dune::FieldVector<Scalar, numEq    > VectorBlockType;
        typedef Dune::FieldMatrix<Scalar, numEq, numEq > MatrixBlockType;
        typedef Dune::BCRSMatrix <MatrixBlockType> Mat;
        typedef Dune::BlockVector<VectorBlockType> BVector;
        typedef DenseAd::Evaluation<double, /*size=*/numEq> Eval;

        typedef Ewoms::BlackOilPolymerModule<TypeTag> PolymerModule;

        static const bool has_solvent = GET_PROP_VALUE(TypeTag, EnableSolvent);
        static const bool has_polymer = GET_PROP_VALUE(TypeTag, EnablePolymer);
        static const int contiSolventEqIdx = Indices::contiSolventEqIdx;
        static const int contiPolymerEqIdx = Indices::contiPolymerEqIdx;

        // For the conversion between the surface volume rate and resrevoir voidage rate
        using RateConverterType = RateConverter::
        SurfaceToReservoirVoidage<FluidSystem, std::vector<int> >;

        /// Constructor
        WellInterface(const Well* well, const int time_step, const Wells* wells,
                      const ModelParameters& param,
                      const RateConverterType& rate_converter,
                      const int pvtRegionIdx,
                      const int num_components);