blackoillocalresidualtpfa.hh
Go to the documentation of this file.
88 static constexpr bool blackoilConserveSurfaceVolume = getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>();
98 static constexpr bool enableConvectiveMixing = getPropValue<TypeTag, Properties::EnableConvectiveMixing>();
109 using ConvectiveMixingModuleParam = typename ConvectiveMixingModule::ConvectiveMixingModuleParam;
164 unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx));
313 const ResidualNBInfo res_nbinfo {trans, faceArea, thpres, distZ * g, faceDir, Vin, Vex, inAlpha, outAlpha, diffusivity, dispersivity};
374 // Use arithmetic average (more accurate with harmonic, but that requires recomputing the transmissbility)
375 const Evaluation transMult = (intQuantsIn.rockCompTransMultiplier() + Toolbox::value(intQuantsEx.rockCompTransMultiplier()))/2;
378 darcyFlux = pressureDifference * up.mobility(phaseIdx, facedir) * transMult * (-trans / faceArea);
384 unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx));
385 darcy[conti0EqIdx + activeCompIdx] = darcyFlux.value() * faceArea; // NB! For the FLORES fluxes without derivatives
400 const auto& invB = getInvB_<FluidSystem, FluidState, Scalar>(up.fluidState(), phaseIdx, pvtRegionIdx);
414 static_assert(!enableSolvent, "Relevant computeFlux() method must be implemented for this module before enabling.");
418 static_assert(!enableExtbo, "Relevant computeFlux() method must be implemented for this module before enabling.");
422 static_assert(!enablePolymer, "Relevant computeFlux() method must be implemented for this module before enabling.");
465 static_assert(!enableFoam, "Relevant computeFlux() method must be implemented for this module before enabling.");
469 static_assert(!enableBrine, "Relevant computeFlux() method must be implemented for this module before enabling.");
474 // deal with diffusion (if present). opm-models expects per area flux (added in the tmpdiffusivity).
477 DiffusionModule::ExtensiveQuantities::update(effectiveDiffusionCoefficient, intQuantsIn, intQuantsEx);
487 // deal with dispersion (if present). opm-models expects per area flux (added in the tmpdispersivity).
501 static_assert(!enableMICP, "Relevant computeFlux() method must be implemented for this module before enabling.");
522 throw std::logic_error("Unknown boundary condition type " + std::to_string(static_cast<int>(bdyInfo.type)) + " in computeBoundaryFlux()." );
575 const auto& invB = getInvB_<FluidSystem, FluidState, Evaluation>(insideIntQuants.fluidState(), phaseIdx, pvtRegionIdx);
590 const auto& invB = getInvB_<FluidSystem, ScalarFluidState, Scalar>(bdyInfo.exFluidState, phaseIdx, pvtRegionIdx);
616 Scalar alpha = problem.eclTransmissibilities().thermalHalfTransBoundary(globalSpaceIdx, bdyInfo.boundaryFaceIndex);
628 static_assert(!enableSolvent, "Relevant treatment of boundary conditions must be implemented before enabling.");
629 static_assert(!enablePolymer, "Relevant treatment of boundary conditions must be implemented before enabling.");
630 static_assert(!enableMICP, "Relevant treatment of boundary conditions must be implemented before enabling.");
658 Scalar alpha = problem.eclTransmissibilities().thermalHalfTransBoundary(globalSpaceIdx, bdyInfo.boundaryFaceIndex);
689 static_assert(!enableMICP, "Relevant addSource() method must be implemented for this module before enabling.");
694 source[Indices::contiEnergyEqIdx] *= getPropValue<TypeTag, Properties::BlackOilEnergyScalingFactor>();
707 static_assert(!enableMICP, "Relevant addSource() method must be implemented for this module before enabling.");
712 source[Indices::contiEnergyEqIdx] *= getPropValue<TypeTag, Properties::BlackOilEnergyScalingFactor>();
732 source[Indices::contiEnergyEqIdx] *= getPropValue<TypeTag, Properties::BlackOilEnergyScalingFactor>();
759 unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx));
764 flux[conti0EqIdx + activeCompIdx] += surfaceVolumeFlux*FluidSystem::referenceDensity(phaseIdx, pvtRegionIdx);
775 flux[conti0EqIdx + activeGasCompIdx] += Rs*surfaceVolumeFlux*FluidSystem::referenceDensity(gasPhaseIdx, pvtRegionIdx);
786 flux[conti0EqIdx + activeGasCompIdx] += Rsw*surfaceVolumeFlux*FluidSystem::referenceDensity(gasPhaseIdx, pvtRegionIdx);
798 flux[conti0EqIdx + activeOilCompIdx] += Rv*surfaceVolumeFlux*FluidSystem::referenceDensity(oilPhaseIdx, pvtRegionIdx);
808 flux[conti0EqIdx + activeWaterCompIdx] += Rvw*surfaceVolumeFlux*FluidSystem::referenceDensity(waterPhaseIdx, pvtRegionIdx);
825 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 dynamic convective mixing. 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 Definition: blackoilconvectivemixingmodule.hh:58 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:59 static void addStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoilfoammodules.hh:247 Calculates the local residual of the black oil model. Definition: blackoillocalresidualtpfa.hh:54 void computeSource(RateVector &source, const ElementContext &elemCtx, unsigned dofIdx, unsigned timeIdx) const Calculate the source term of the equation. Definition: blackoillocalresidualtpfa.hh:718 static void computeBoundaryFlux(RateVector &bdyFlux, const Problem &problem, const BoundaryConditionData &bdyInfo, const IntensiveQuantities &insideIntQuants, unsigned globalSpaceIdx) Definition: blackoillocalresidualtpfa.hh:507 static void computeBoundaryFluxFree(const Problem &problem, RateVector &bdyFlux, const BoundaryConditionData &bdyInfo, const IntensiveQuantities &insideIntQuants, unsigned globalSpaceIdx) Definition: blackoillocalresidualtpfa.hh:534 static void computeBoundaryFluxRate(RateVector &bdyFlux, const BoundaryConditionData &bdyInfo) Definition: blackoillocalresidualtpfa.hh:527 static FaceDir::DirEnum faceDirFromDirId(const int dirId) Definition: blackoillocalresidualtpfa.hh:854 static void computeSource(RateVector &source, const Problem &problem, unsigned globalSpaceIdex, unsigned timeIdx) Definition: blackoillocalresidualtpfa.hh:678 static void evalPhaseFluxes_(RateVector &flux, unsigned phaseIdx, unsigned pvtRegionIdx, const ExtensiveQuantities &extQuants, const FluidState &upFs) Definition: blackoillocalresidualtpfa.hh:736 static void computeFlux(RateVector &flux, const ElementContext &elemCtx, unsigned scvfIdx, unsigned timeIdx) Definition: blackoillocalresidualtpfa.hh:260 static void computeStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoillocalresidualtpfa.hh:152 static void computeFlux(RateVector &flux, RateVector &darcy, const unsigned globalIndexIn, const unsigned globalIndexEx, const IntensiveQuantities &intQuantsIn, const IntensiveQuantities &intQuantsEx, const ResidualNBInfo &nbInfo, const ModuleParams &moduleParams) Definition: blackoillocalresidualtpfa.hh:234 static void computeBoundaryThermal(const Problem &problem, RateVector &bdyFlux, const BoundaryConditionData &bdyInfo, const IntensiveQuantities &insideIntQuants, unsigned globalSpaceIdx) Definition: blackoillocalresidualtpfa.hh:644 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:825 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:753 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:141 static void calculateFluxes_(RateVector &flux, RateVector &darcy, const IntensiveQuantities &intQuantsIn, const IntensiveQuantities &intQuantsEx, const unsigned &globalIndexIn, const unsigned &globalIndexEx, const ResidualNBInfo &nbInfo, const ModuleParams &moduleParams) Definition: blackoillocalresidualtpfa.hh:325 static void computeSourceDense(RateVector &source, const Problem &problem, unsigned globalSpaceIdex, unsigned timeIdx) Definition: blackoillocalresidualtpfa.hh:697 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:300 static void addStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoilmicpmodules.hh:240 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:69 static void addStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants) Definition: blackoilsolventmodules.hh:431 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:235 Definition: blackoillocalresidualtpfa.hh:133 ConvectiveMixingModuleParam convectiveMixingModuleParam Definition: blackoillocalresidualtpfa.hh:134 Definition: blackoillocalresidualtpfa.hh:119 FaceDir::DirEnum faceDir Definition: blackoillocalresidualtpfa.hh:124 double dispersivity Definition: blackoillocalresidualtpfa.hh:130 double faceArea Definition: blackoillocalresidualtpfa.hh:121 double inAlpha Definition: blackoillocalresidualtpfa.hh:127 double dZg Definition: blackoillocalresidualtpfa.hh:123 double Vin Definition: blackoillocalresidualtpfa.hh:125 double outAlpha Definition: blackoillocalresidualtpfa.hh:128 double thpres Definition: blackoillocalresidualtpfa.hh:122 double trans Definition: blackoillocalresidualtpfa.hh:120 double Vex Definition: blackoillocalresidualtpfa.hh:126 double diffusivity Definition: blackoillocalresidualtpfa.hh:129 |