blackoillocalresidualtpfa.hh
Go to the documentation of this file.
87 static constexpr bool blackoilConserveSurfaceVolume = getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>();
154 unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx));
301 const ResidualNBInfo res_nbinfo {trans, faceArea, thpres, distZ * g, faceDir, Vin, Vex, inAlpha, outAlpha, diffusivity, dispersivity};
359 // Use arithmetic average (more accurate with harmonic, but that requires recomputing the transmissbility)
360 const Evaluation transMult = (intQuantsIn.rockCompTransMultiplier() + Toolbox::value(intQuantsEx.rockCompTransMultiplier()))/2;
366 darcyFlux = pressureDifference * up.mobility(phaseIdx, facedir) * transMult * (-trans / faceArea);
371 unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx));
372 darcy[conti0EqIdx + activeCompIdx] = darcyFlux.value() * faceArea; // NB! For the FLORES fluxes without derivatives
387 const auto& invB = getInvB_<FluidSystem, FluidState, Scalar>(up.fluidState(), phaseIdx, pvtRegionIdx);
401 static_assert(!enableSolvent, "Relevant computeFlux() method must be implemented for this module before enabling.");
405 static_assert(!enableExtbo, "Relevant computeFlux() method must be implemented for this module before enabling.");
409 static_assert(!enablePolymer, "Relevant computeFlux() method must be implemented for this module before enabling.");
439 static_assert(!enableFoam, "Relevant computeFlux() method must be implemented for this module before enabling.");
443 static_assert(!enableBrine, "Relevant computeFlux() method must be implemented for this module before enabling.");
446 // deal with diffusion (if present). opm-models expects per area flux (added in the tmpdiffusivity).
449 DiffusionModule::ExtensiveQuantities::update(effectiveDiffusionCoefficient, intQuantsIn, intQuantsEx);
459 // deal with dispersion (if present). opm-models expects per area flux (added in the tmpdispersivity).
473 static_assert(!enableMICP, "Relevant computeFlux() method must be implemented for this module before enabling.");
494 throw std::logic_error("Unknown boundary condition type " + std::to_string(static_cast<int>(bdyInfo.type)) + " in computeBoundaryFlux()." );
547 const auto& invB = getInvB_<FluidSystem, FluidState, Evaluation>(insideIntQuants.fluidState(), phaseIdx, pvtRegionIdx);
562 const auto& invB = getInvB_<FluidSystem, ScalarFluidState, Scalar>(bdyInfo.exFluidState, phaseIdx, pvtRegionIdx);
588 Scalar alpha = problem.eclTransmissibilities().thermalHalfTransBoundary(globalSpaceIdx, bdyInfo.boundaryFaceIndex);
600 static_assert(!enableSolvent, "Relevant treatment of boundary conditions must be implemented before enabling.");
601 static_assert(!enablePolymer, "Relevant treatment of boundary conditions must be implemented before enabling.");
602 static_assert(!enableMICP, "Relevant treatment of boundary conditions must be implemented before enabling.");
630 Scalar alpha = problem.eclTransmissibilities().thermalHalfTransBoundary(globalSpaceIdx, bdyInfo.boundaryFaceIndex);
661 static_assert(!enableMICP, "Relevant addSource() method must be implemented for this module before enabling.");
666 source[Indices::contiEnergyEqIdx] *= getPropValue<TypeTag, Properties::BlackOilEnergyScalingFactor>();
679 static_assert(!enableMICP, "Relevant addSource() method must be implemented for this module before enabling.");
684 source[Indices::contiEnergyEqIdx] *= getPropValue<TypeTag, Properties::BlackOilEnergyScalingFactor>();
704 source[Indices::contiEnergyEqIdx] *= getPropValue<TypeTag, Properties::BlackOilEnergyScalingFactor>();
731 unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx));
736 flux[conti0EqIdx + activeCompIdx] += surfaceVolumeFlux*FluidSystem::referenceDensity(phaseIdx, pvtRegionIdx);
747 flux[conti0EqIdx + activeGasCompIdx] += Rs*surfaceVolumeFlux*FluidSystem::referenceDensity(gasPhaseIdx, pvtRegionIdx);
758 flux[conti0EqIdx + activeGasCompIdx] += Rsw*surfaceVolumeFlux*FluidSystem::referenceDensity(gasPhaseIdx, pvtRegionIdx);
770 flux[conti0EqIdx + activeOilCompIdx] += Rv*surfaceVolumeFlux*FluidSystem::referenceDensity(oilPhaseIdx, pvtRegionIdx);
780 flux[conti0EqIdx + activeWaterCompIdx] += Rvw*surfaceVolumeFlux*FluidSystem::referenceDensity(waterPhaseIdx, pvtRegionIdx);
797 static void adaptMassConservationQuantities_(Dune::FieldVector<Scalar, numEq>& container, unsigned pvtRegionIdx)
Contains the classes required to extend the black-oil model by brine. Classes required for molecular diffusion. Classes required for mechanical dispersion. Contains the classes required to extend the black-oil model by energy. Contains the classes required to extend the black-oil model by solvent component. For details,... Contains the classes required to extend the black-oil model to include the effects of foam. Contains the classes required to extend the black-oil model by MICP. Contains the classes required to extend the black-oil model by polymer. Declares the properties required by the black oil model. Contains the classes required to extend the black-oil model by solvents. Contains the high level supplements required to extend the black oil model by brine. Definition: blackoilbrinemodules.hh:58 static void addStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoilbrinemodules.hh:228 Provides the auxiliary methods required for consideration of the diffusion equation. Definition: blackoildiffusionmodule.hh:48 Provides the auxiliary methods required for consideration of the dispersion equation. Definition: blackoildispersionmodule.hh:48 Contains the high level supplements required to extend the black oil model by energy. Definition: blackoilenergymodules.hh:52 static void addStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoilenergymodules.hh:141 static void addHeatFlux(RateVector &flux, const Evaluation &heatFlux) Definition: blackoilenergymodules.hh:195 Contains the high level supplements required to extend the black oil model. Definition: blackoilextbomodules.hh:69 static void addStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoilextbomodules.hh:320 Contains the high level supplements required to extend the black oil model to include the effects of ... Definition: blackoilfoammodules.hh:57 static void addStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoilfoammodules.hh:246 Calculates the local residual of the black oil model. Definition: blackoillocalresidualtpfa.hh:53 void computeSource(RateVector &source, const ElementContext &elemCtx, unsigned dofIdx, unsigned timeIdx) const Calculate the source term of the equation. Definition: blackoillocalresidualtpfa.hh:690 static void computeBoundaryFlux(RateVector &bdyFlux, const Problem &problem, const BoundaryConditionData &bdyInfo, const IntensiveQuantities &insideIntQuants, unsigned globalSpaceIdx) Definition: blackoillocalresidualtpfa.hh:479 static void computeBoundaryFluxFree(const Problem &problem, RateVector &bdyFlux, const BoundaryConditionData &bdyInfo, const IntensiveQuantities &insideIntQuants, unsigned globalSpaceIdx) Definition: blackoillocalresidualtpfa.hh:506 static void computeBoundaryFluxRate(RateVector &bdyFlux, const BoundaryConditionData &bdyInfo) Definition: blackoillocalresidualtpfa.hh:499 static FaceDir::DirEnum faceDirFromDirId(const int dirId) Definition: blackoillocalresidualtpfa.hh:826 static void computeSource(RateVector &source, const Problem &problem, unsigned globalSpaceIdex, unsigned timeIdx) Definition: blackoillocalresidualtpfa.hh:650 static void evalPhaseFluxes_(RateVector &flux, unsigned phaseIdx, unsigned pvtRegionIdx, const ExtensiveQuantities &extQuants, const FluidState &upFs) Definition: blackoillocalresidualtpfa.hh:708 static void computeFlux(RateVector &flux, const ElementContext &elemCtx, unsigned scvfIdx, unsigned timeIdx) Definition: blackoillocalresidualtpfa.hh:248 static void computeStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoillocalresidualtpfa.hh:142 static void calculateFluxes_(RateVector &flux, RateVector &darcy, const IntensiveQuantities &intQuantsIn, const IntensiveQuantities &intQuantsEx, const unsigned &globalIndexIn, const unsigned &globalIndexEx, const ResidualNBInfo &nbInfo) Definition: blackoillocalresidualtpfa.hh:312 static void computeBoundaryThermal(const Problem &problem, RateVector &bdyFlux, const BoundaryConditionData &bdyInfo, const IntensiveQuantities &insideIntQuants, unsigned globalSpaceIdx) Definition: blackoillocalresidualtpfa.hh:616 static void adaptMassConservationQuantities_(Dune::FieldVector< Scalar, numEq > &container, unsigned pvtRegionIdx) Helper function to convert the mass-related parts of a Dune::FieldVector that stores conservation qua... Definition: blackoillocalresidualtpfa.hh:797 static void computeFlux(RateVector &flux, RateVector &darcy, const unsigned globalIndexIn, const unsigned globalIndexEx, const IntensiveQuantities &intQuantsIn, const IntensiveQuantities &intQuantsEx, const ResidualNBInfo &nbInfo) Definition: blackoillocalresidualtpfa.hh:224 static void evalPhaseFluxes_(RateVector &flux, unsigned phaseIdx, unsigned pvtRegionIdx, const Eval &surfaceVolumeFlux, const FluidState &upFs) Helper function to calculate the flux of mass in terms of conservation quantities via specific fluid ... Definition: blackoillocalresidualtpfa.hh:725 void computeStorage(Dune::FieldVector< LhsEval, numEq > &storage, const ElementContext &elemCtx, unsigned dofIdx, unsigned timeIdx) const Evaluate the amount all conservation quantities (e.g. phase mass) within a finite sub-control volume. Definition: blackoillocalresidualtpfa.hh:131 static void computeSourceDense(RateVector &source, const Problem &problem, unsigned globalSpaceIdex, unsigned timeIdx) Definition: blackoillocalresidualtpfa.hh:669 Contains the high level supplements required to extend the black oil model by MICP. Definition: blackoilmicpmodules.hh:56 static void addSource(RateVector &source, const ElementContext &elemCtx, unsigned dofIdx, unsigned timeIdx) Definition: blackoilmicpmodules.hh:294 static void addStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoilmicpmodules.hh:234 Contains the high level supplements required to extend the black oil model by polymer. Definition: blackoilpolymermodules.hh:61 static void addStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoilpolymermodules.hh:473 Contains the high level supplements required to extend the black oil model by solvents. Definition: blackoilsolventmodules.hh:68 static void addStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoilsolventmodules.hh:430 Definition: blackoilboundaryratevector.hh:37 typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(.... Definition: propertysystem.hh:242 Definition: blackoillocalresidualtpfa.hh:114 FaceDir::DirEnum faceDir Definition: blackoillocalresidualtpfa.hh:119 double dispersivity Definition: blackoillocalresidualtpfa.hh:125 double faceArea Definition: blackoillocalresidualtpfa.hh:116 double inAlpha Definition: blackoillocalresidualtpfa.hh:122 double dZg Definition: blackoillocalresidualtpfa.hh:118 double Vin Definition: blackoillocalresidualtpfa.hh:120 double outAlpha Definition: blackoillocalresidualtpfa.hh:123 double thpres Definition: blackoillocalresidualtpfa.hh:117 double trans Definition: blackoillocalresidualtpfa.hh:115 double Vex Definition: blackoillocalresidualtpfa.hh:121 double diffusivity Definition: blackoillocalresidualtpfa.hh:124 |