Misc minor changes: whitespace++
This commit is contained in:
parent
b955ecf6b4
commit
fffe259621
@ -34,7 +34,7 @@ namespace Opm {
|
||||
public:
|
||||
WellSegments() = default;
|
||||
|
||||
std::string wellName() const;
|
||||
const std::string& wellName() const;
|
||||
int size() const;
|
||||
double depthTopSegment() const;
|
||||
double lengthTopSegment() const;
|
||||
|
@ -50,11 +50,10 @@ namespace Opm {
|
||||
double skin_factor,
|
||||
const int satTableId,
|
||||
const WellCompletion::DirectionEnum direction,
|
||||
const std::size_t seqIndex,
|
||||
const double segDistStart,
|
||||
const double segDistEnd,
|
||||
const bool defaultSatTabId
|
||||
);
|
||||
const std::size_t seqIndex,
|
||||
const double segDistStart,
|
||||
const double segDistEnd,
|
||||
const bool defaultSatTabId);
|
||||
|
||||
|
||||
bool attachedToSegment() const;
|
||||
@ -79,15 +78,16 @@ namespace Opm {
|
||||
void setComplnum(int compnum);
|
||||
void scaleWellPi(double wellPi);
|
||||
void updateSegment(int segment_number, double center_depth, std::size_t seqIndex);
|
||||
const std::size_t& getSeqIndex() const;
|
||||
const bool& getDefaultSatTabId() const;
|
||||
const std::size_t& getCompSegSeqIndex() const;
|
||||
void setCompSegSeqIndex(std::size_t index);
|
||||
void setDefaultSatTabId(bool id);
|
||||
const double& getSegDistStart() const;
|
||||
const double& getSegDistEnd() const;
|
||||
void setSegDistStart(const double& distStart);
|
||||
void setSegDistEnd(const double& distEnd);
|
||||
const std::size_t& getSeqIndex() const;
|
||||
const bool& getDefaultSatTabId() const;
|
||||
const std::size_t& getCompSegSeqIndex() const;
|
||||
void setCompSegSeqIndex(std::size_t index);
|
||||
void setDefaultSatTabId(bool id);
|
||||
const double& getSegDistStart() const;
|
||||
const double& getSegDistEnd() const;
|
||||
void setSegDistStart(const double& distStart);
|
||||
void setSegDistEnd(const double& distEnd);
|
||||
std::string str() const;
|
||||
|
||||
bool operator==( const Connection& ) const;
|
||||
bool operator!=( const Connection& ) const;
|
||||
@ -104,11 +104,11 @@ namespace Opm {
|
||||
double m_skin_factor;
|
||||
|
||||
std::array<int,3> ijk;
|
||||
std::size_t m_seqIndex;
|
||||
double m_segDistStart;
|
||||
double m_segDistEnd;
|
||||
bool m_defaultSatTabId;
|
||||
std::size_t m_compSeg_seqIndex=0;
|
||||
std::size_t m_seqIndex;
|
||||
double m_segDistStart;
|
||||
double m_segDistEnd;
|
||||
bool m_defaultSatTabId;
|
||||
std::size_t m_compSeg_seqIndex=0;
|
||||
|
||||
// related segment number
|
||||
// -1 means the completion is not related to segment
|
||||
|
@ -95,6 +95,7 @@ namespace Opm {
|
||||
void switchToInjector( size_t timeStep);
|
||||
void switchToProducer( size_t timeStep);
|
||||
|
||||
bool setProducer(size_t timeStep, bool producer);
|
||||
bool isProducer(size_t timeStep) const;
|
||||
bool isInjector(size_t timeStep) const;
|
||||
void addWELSPECS(const DeckRecord& deckRecord);
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
std::string WellSegments::wellName() const {
|
||||
const std::string& WellSegments::wellName() const {
|
||||
return m_well_name;
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ namespace Opm {
|
||||
if (isInjector(timeStep))
|
||||
switchToProducer( timeStep );
|
||||
|
||||
m_isProducer.update(timeStep , true);
|
||||
this->setProducer(timeStep, true);
|
||||
return m_productionProperties.update(timeStep, newProperties);
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ namespace Opm {
|
||||
if (isProducer(timeStep))
|
||||
switchToInjector( timeStep );
|
||||
|
||||
m_isProducer.update(timeStep , false);
|
||||
this->setProducer(timeStep, false);
|
||||
return m_injectionProperties.update(timeStep, newProperties);
|
||||
}
|
||||
|
||||
@ -176,8 +176,8 @@ namespace Opm {
|
||||
}
|
||||
|
||||
bool Well::setPolymerProperties(size_t timeStep , const WellPolymerProperties& newProperties) {
|
||||
m_isProducer.update(timeStep , false);
|
||||
bool update = m_polymerProperties.update(timeStep, newProperties);
|
||||
this->setProducer(timeStep, false);
|
||||
return update;
|
||||
}
|
||||
|
||||
@ -240,6 +240,10 @@ namespace Opm {
|
||||
return m_status.update( timeStep , status );
|
||||
}
|
||||
|
||||
bool Well::setProducer(size_t timeStep, bool producer) {
|
||||
this->m_isProducer.update(timeStep, producer);
|
||||
}
|
||||
|
||||
bool Well::isProducer(size_t timeStep) const {
|
||||
return bool( m_isProducer.get(timeStep) );
|
||||
}
|
||||
|
@ -144,10 +144,10 @@ namespace {
|
||||
double skin_factor,
|
||||
const int satTableId,
|
||||
const WellCompletion::DirectionEnum direction,
|
||||
const std::size_t seqIndex,
|
||||
const double segDistStart,
|
||||
const double segDistEnd,
|
||||
const bool defaultSatTabId)
|
||||
const std::size_t seqIndex,
|
||||
const double segDistStart,
|
||||
const double segDistEnd,
|
||||
const bool defaultSatTabId)
|
||||
{
|
||||
int conn_i = (i < 0) ? this->headI : i;
|
||||
int conn_j = (j < 0) ? this->headJ : j;
|
||||
@ -167,10 +167,10 @@ namespace {
|
||||
double skin_factor,
|
||||
const int satTableId,
|
||||
const WellCompletion::DirectionEnum direction,
|
||||
const std::size_t seqIndex,
|
||||
const double segDistStart,
|
||||
const double segDistEnd,
|
||||
const bool defaultSatTabId)
|
||||
const std::size_t seqIndex,
|
||||
const double segDistStart,
|
||||
const double segDistEnd,
|
||||
const bool defaultSatTabId)
|
||||
{
|
||||
int complnum = (this->m_connections.size() + 1);
|
||||
this->addConnection(i,
|
||||
@ -186,10 +186,10 @@ namespace {
|
||||
skin_factor,
|
||||
satTableId,
|
||||
direction,
|
||||
seqIndex,
|
||||
segDistStart,
|
||||
segDistEnd,
|
||||
defaultSatTabId);
|
||||
seqIndex,
|
||||
segDistStart,
|
||||
segDistEnd,
|
||||
defaultSatTabId);
|
||||
}
|
||||
|
||||
void WellConnections::loadCOMPDAT(const DeckRecord& record, const EclipseGrid& grid, const Eclipse3DProperties& eclipseProperties) {
|
||||
@ -296,48 +296,47 @@ namespace {
|
||||
same_ijk );
|
||||
// Only add connection for active grid cells
|
||||
if (grid.cellActive(I, J, k)) {
|
||||
if (prev == this->m_connections.end()) {
|
||||
std::size_t noConn = this->m_connections.size();
|
||||
this->addConnection(I,J,k,
|
||||
grid.getCellDepth( I,J,k ),
|
||||
state,
|
||||
CF,
|
||||
Kh,
|
||||
rw,
|
||||
r0,
|
||||
skin_factor,
|
||||
satTableId,
|
||||
direction,
|
||||
noConn, 0., 0., defaultSatTable);
|
||||
}
|
||||
else {
|
||||
std::size_t noConn = prev->getSeqIndex();
|
||||
// The complnum value carries over; the rest of the state is fully specified by
|
||||
// the current COMPDAT keyword.
|
||||
int complnum = prev->complnum();
|
||||
std::size_t css_ind = prev->getCompSegSeqIndex();
|
||||
int conSegNo = prev->segment();
|
||||
std::size_t con_SIndex = prev->getSeqIndex();
|
||||
double conCDepth = prev->depth();
|
||||
double conSDStart = prev->getSegDistStart();
|
||||
double conSDEnd = prev->getSegDistEnd();
|
||||
*prev = Connection(I,J,k,
|
||||
complnum,
|
||||
grid.getCellDepth(I,J,k),
|
||||
state,
|
||||
CF,
|
||||
Kh,
|
||||
rw,
|
||||
r0,
|
||||
skin_factor,
|
||||
satTableId,
|
||||
direction,
|
||||
noConn, conSDStart, conSDEnd, defaultSatTable);
|
||||
prev->setCompSegSeqIndex(css_ind);
|
||||
prev->updateSegment(conSegNo, conCDepth, con_SIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (prev == this->m_connections.end()) {
|
||||
std::size_t noConn = this->m_connections.size();
|
||||
this->addConnection(I,J,k,
|
||||
grid.getCellDepth( I,J,k ),
|
||||
state,
|
||||
CF,
|
||||
Kh,
|
||||
rw,
|
||||
r0,
|
||||
skin_factor,
|
||||
satTableId,
|
||||
direction,
|
||||
noConn, 0., 0., defaultSatTable);
|
||||
} else {
|
||||
std::size_t noConn = prev->getSeqIndex();
|
||||
// The complnum value carries over; the rest of the state is fully specified by
|
||||
// the current COMPDAT keyword.
|
||||
int complnum = prev->complnum();
|
||||
std::size_t css_ind = prev->getCompSegSeqIndex();
|
||||
int conSegNo = prev->segment();
|
||||
std::size_t con_SIndex = prev->getSeqIndex();
|
||||
double conCDepth = prev->depth();
|
||||
double conSDStart = prev->getSegDistStart();
|
||||
double conSDEnd = prev->getSegDistEnd();
|
||||
*prev = Connection(I,J,k,
|
||||
complnum,
|
||||
grid.getCellDepth(I,J,k),
|
||||
state,
|
||||
CF,
|
||||
Kh,
|
||||
rw,
|
||||
r0,
|
||||
skin_factor,
|
||||
satTableId,
|
||||
direction,
|
||||
noConn, conSDStart, conSDEnd, defaultSatTable);
|
||||
prev->setCompSegSeqIndex(css_ind);
|
||||
prev->updateSegment(conSegNo, conCDepth, con_SIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -236,6 +236,7 @@ namespace Opm {
|
||||
<< "THPH: " << wp.THPH << ", "
|
||||
<< "VFP table: " << wp.VFPTableNumber << ", "
|
||||
<< "ALQ: " << wp.ALQValue << ", "
|
||||
<< "WHISTCTL: " << wp.whistctl_cmode << ", "
|
||||
<< "prediction: " << wp.predictionMode << " }";
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ static data::Wells result_wells() {
|
||||
rates3.set( rt::well_potential_oil, 30.14 / day );
|
||||
rates3.set( rt::well_potential_gas, 30.15 / day );
|
||||
|
||||
|
||||
|
||||
data::Rates rates6;
|
||||
rates6.set( rt::wat, 60.0 / day );
|
||||
rates6.set( rt::oil, 60.1 / day );
|
||||
@ -201,7 +201,7 @@ static data::Wells result_wells() {
|
||||
crates6.set( rt::reservoir_water, 600.6 / day );
|
||||
crates6.set( rt::reservoir_oil, 600.7 / day );
|
||||
crates6.set( rt::reservoir_gas, 600.8 / day );
|
||||
|
||||
|
||||
// Segment vectors
|
||||
auto segment = ::Opm::data::Segment{};
|
||||
segment.rates.set(rt::wat, 123.45*sm3_pr_day());
|
||||
@ -347,7 +347,7 @@ BOOST_AUTO_TEST_CASE(well_keywords) {
|
||||
BOOST_CHECK_CLOSE( -20.15, ecl_sum_get_well_var( resp, 1, "W_2", "WGPP" ), 1e-5 );
|
||||
BOOST_CHECK_CLOSE( 30.13, ecl_sum_get_well_var( resp, 1, "W_3", "WWPI" ), 1e-5 );
|
||||
BOOST_CHECK_CLOSE( 60.15, ecl_sum_get_well_var( resp, 1, "W_6", "WGPI" ), 1e-5 );
|
||||
|
||||
|
||||
/* Production totals */
|
||||
BOOST_CHECK_CLOSE( 10.0, ecl_sum_get_well_var( resp, 1, "W_1", "WWPT" ), 1e-5 );
|
||||
BOOST_CHECK_CLOSE( 20.0, ecl_sum_get_well_var( resp, 1, "W_2", "WWPT" ), 1e-5 );
|
||||
@ -550,7 +550,7 @@ BOOST_AUTO_TEST_CASE(group_keywords) {
|
||||
BOOST_CHECK_CLOSE( -10.15 - 20.15, ecl_sum_get_group_var( resp, 1, "G_1", "GGPP" ), 1e-5 );
|
||||
BOOST_CHECK_CLOSE( 30.13 + 60.13, ecl_sum_get_group_var( resp, 1, "G_2", "GWPI" ), 1e-5 );
|
||||
BOOST_CHECK_CLOSE( 30.15 + 60.15, ecl_sum_get_group_var( resp, 1, "G_2", "GGPI" ), 1e-5 );
|
||||
|
||||
|
||||
/* Production totals */
|
||||
BOOST_CHECK_CLOSE( 10.0 + 20.0, ecl_sum_get_group_var( resp, 1, "G_1", "GWPT" ), 1e-5 );
|
||||
BOOST_CHECK_CLOSE( 10.1 + 20.1, ecl_sum_get_group_var( resp, 1, "G_1", "GOPT" ), 1e-5 );
|
||||
@ -800,7 +800,7 @@ BOOST_AUTO_TEST_CASE(field_keywords) {
|
||||
BOOST_CHECK_CLOSE( -10.15 - 20.15, ecl_sum_get_field_var( resp, 1, "FGPP" ), 1e-5 );
|
||||
BOOST_CHECK_CLOSE( 30.15 + 60.15, ecl_sum_get_field_var( resp, 1, "FGPI" ), 1e-5 );
|
||||
BOOST_CHECK_CLOSE( 30.13 + 60.13, ecl_sum_get_field_var( resp, 1, "FWPI" ), 1e-5 );
|
||||
|
||||
|
||||
/* Production totals */
|
||||
BOOST_CHECK_CLOSE( 10.0 + 20.0, ecl_sum_get_field_var( resp, 1, "FWPT" ), 1e-5 );
|
||||
BOOST_CHECK_CLOSE( 10.1 + 20.1, ecl_sum_get_field_var( resp, 1, "FOPT" ), 1e-5 );
|
||||
|
Loading…
Reference in New Issue
Block a user