coding style fixes for the black-oil model and more style fixes for ebos

This commit is contained in:
Andreas Lauser
2019-02-01 17:33:30 +01:00
parent 7f27c4fb4b
commit 4ecda15b11
3 changed files with 14 additions and 13 deletions

View File

@@ -434,7 +434,8 @@ protected:
if (enableSolvent && phaseIdx == gasPhaseIdx) { if (enableSolvent && phaseIdx == gasPhaseIdx) {
asImp_().setSolventVolumeFlux( pressureDifference_[phaseIdx]*up.solventMobility()*(-trans/faceArea)); asImp_().setSolventVolumeFlux( pressureDifference_[phaseIdx]*up.solventMobility()*(-trans/faceArea));
} }
} else { }
else {
// compute the phase mobility using the material law parameters of the // compute the phase mobility using the material law parameters of the
// interior element. TODO: this could probably be done more efficiently // interior element. TODO: this could probably be done more efficiently
const auto& matParams = const auto& matParams =

View File

@@ -487,7 +487,8 @@ public:
matrix.setBlock(wellGlobalDofIdx, wellGlobalDofIdx, diagBlock); matrix.setBlock(wellGlobalDofIdx, wellGlobalDofIdx, diagBlock);
} }
Scalar volumetricSurfaceRateForConnection(int globalDofIdx, int phaseIdx) const { Scalar volumetricSurfaceRateForConnection(int globalDofIdx, int phaseIdx) const
{
const DofVariables& dofVars = *dofVariables_.at(globalDofIdx); const DofVariables& dofVars = *dofVariables_.at(globalDofIdx);
std::array<Scalar, numPhases> volumetricReservoirRates; std::array<Scalar, numPhases> volumetricReservoirRates;
computeVolumetricDofRates_(volumetricReservoirRates, actualBottomHolePressure_, dofVars); computeVolumetricDofRates_(volumetricReservoirRates, actualBottomHolePressure_, dofVars);
@@ -718,9 +719,8 @@ public:
refDepth_ = dofPos[2]; refDepth_ = dofPos[2];
} }
int numConnections() const { int numConnections() const
return dofVariables_.size(); { return dofVariables_.size(); }
}
/*! /*!
* \brief Finalize the specification of the borehole. * \brief Finalize the specification of the borehole.

View File

@@ -363,7 +363,7 @@ class EclProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
enum { numComponents = FluidSystem::numComponents }; enum { numComponents = FluidSystem::numComponents };
enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) }; enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) };
enum { enablePolymer = GET_PROP_VALUE(TypeTag, EnablePolymer) }; enum { enablePolymer = GET_PROP_VALUE(TypeTag, EnablePolymer) };
enum { enablePolymerMW = GET_PROP_VALUE(TypeTag, EnablePolymerMW) }; enum { enablePolymerMolarWeight = GET_PROP_VALUE(TypeTag, EnablePolymerMW) };
enum { enableTemperature = GET_PROP_VALUE(TypeTag, EnableTemperature) }; enum { enableTemperature = GET_PROP_VALUE(TypeTag, EnableTemperature) };
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) }; enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
@@ -593,7 +593,8 @@ public:
simulator.setTimeStepSize(0.0); simulator.setTimeStepSize(0.0);
readEclRestartSolution_(); readEclRestartSolution_();
} else { }
else {
readInitialCondition_(); readInitialCondition_();
// Set the start time of the simulation // Set the start time of the simulation
simulator.setStartTime( timeMap.getStartTime(/*timeStepIdx=*/0) ); simulator.setStartTime( timeMap.getStartTime(/*timeStepIdx=*/0) );
@@ -1335,7 +1336,7 @@ public:
if (enablePolymer) if (enablePolymer)
values[Indices::polymerConcentrationIdx] = polymerConcentration_[globalDofIdx]; values[Indices::polymerConcentrationIdx] = polymerConcentration_[globalDofIdx];
if (enablePolymerMW) if (enablePolymerMolarWeight)
values[Indices::polymerMoleWeightIdx]= polymerMoleWeight_[globalDofIdx]; values[Indices::polymerMoleWeightIdx]= polymerMoleWeight_[globalDofIdx];
values.checkDefined(); values.checkDefined();
@@ -1346,7 +1347,6 @@ public:
*/ */
void initialSolutionApplied() void initialSolutionApplied()
{ {
if (!GET_PROP_VALUE(TypeTag, DisableWells)) { if (!GET_PROP_VALUE(TypeTag, DisableWells)) {
// initialize the wells. Note that this needs to be done after initializing the // initialize the wells. Note that this needs to be done after initializing the
// intrinsic permeabilities and the after applying the initial solution because // intrinsic permeabilities and the after applying the initial solution because
@@ -1819,7 +1819,6 @@ private:
} }
void readEquilInitialCondition_() void readEquilInitialCondition_()
{ {
// initial condition corresponds to hydrostatic conditions. // initial condition corresponds to hydrostatic conditions.
@@ -1856,7 +1855,7 @@ private:
if (enablePolymer) if (enablePolymer)
polymerConcentration_.resize(numElems,0.0); polymerConcentration_.resize(numElems,0.0);
if (enablePolymerMW) { if (enablePolymerMolarWeight) {
const std::string msg {"Support of the RESTART for polymer molecular weight " const std::string msg {"Support of the RESTART for polymer molecular weight "
"is not implemented yet. The polymer weight value will be " "is not implemented yet. The polymer weight value will be "
"zero when RESTART begins"}; "zero when RESTART begins"};
@@ -1898,7 +1897,8 @@ private:
} }
void processRestartSaturations_(InitialFluidState& elemFluidState) { void processRestartSaturations_(InitialFluidState& elemFluidState)
{
// each phase needs to be above certain value to be claimed to be existing // each phase needs to be above certain value to be claimed to be existing
// this is used to recover some RESTART running with the defaulted single-precision format // this is used to recover some RESTART running with the defaulted single-precision format
const Scalar smallSaturationTolerance = 1.e-6; const Scalar smallSaturationTolerance = 1.e-6;
@@ -2098,7 +2098,7 @@ private:
} }
} }
if (enablePolymerMW) { if (enablePolymerMolarWeight) {
const std::vector<double>& polyMoleWeightData = eclState.get3DProperties().getDoubleGridProperty("SPOLYMW").getData(); const std::vector<double>& polyMoleWeightData = eclState.get3DProperties().getDoubleGridProperty("SPOLYMW").getData();
polymerMoleWeight_.resize(numDof,0.0); polymerMoleWeight_.resize(numDof,0.0);
for (size_t dofIdx = 0; dofIdx < numDof; ++dofIdx) { for (size_t dofIdx = 0; dofIdx < numDof; ++dofIdx) {