mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-29 20:43:49 -06:00
Merge pull request #694 from atgeirr/fix-nnc-vs-noncartesian
Separate non-neighbour and non-cartesian connections.
This commit is contained in:
commit
69469bf537
@ -724,7 +724,7 @@ namespace Opm
|
||||
fullReport.reportParam(tot_os);
|
||||
}
|
||||
} else {
|
||||
output_writer_->writeInit( simtimer, geoprops_->nnc() );
|
||||
output_writer_->writeInit( simtimer, geoprops_->nonCartesianConnections() );
|
||||
if (output_cout_) {
|
||||
std::cout << "\n\n================ Simulation turned off ===============\n" << std::flush;
|
||||
}
|
||||
|
@ -94,8 +94,6 @@ namespace Opm
|
||||
* cartDims[1]
|
||||
* cartDims[2];
|
||||
|
||||
nnc_ = eclState->getInputNNC();
|
||||
|
||||
// get the pore volume multipliers from the EclipseState
|
||||
std::vector<double> multpv(numCartesianCells, 1.0);
|
||||
const auto& eclProps = eclState->get3DProperties();
|
||||
@ -128,6 +126,8 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
|
||||
// Non-neighbour connections.
|
||||
nnc_ = eclState->getInputNNC();
|
||||
|
||||
// Transmissibility
|
||||
Vector htrans(AutoDiffGrid::numCellFaces(grid));
|
||||
@ -143,8 +143,6 @@ namespace Opm
|
||||
std::vector<double> mult;
|
||||
multiplyHalfIntersections_(grid, eclState, ntg, htrans, mult);
|
||||
|
||||
|
||||
|
||||
// Use volume weighted arithmetic average of the NTG values for
|
||||
// the cells effected by the current OPM cpgrid process algorithm
|
||||
// for MINPV. Note that the change does not effect the pore volume calculations
|
||||
@ -160,6 +158,7 @@ namespace Opm
|
||||
pinchProcess_(grid, *eclState, htrans, numCells);
|
||||
}
|
||||
|
||||
|
||||
// combine the half-face transmissibilites into the final face
|
||||
// transmissibilites.
|
||||
tpfa_trans_compute(ug, htrans.data(), trans_.data());
|
||||
@ -170,6 +169,10 @@ namespace Opm
|
||||
trans_[faceIdx] *= mult[faceIdx];
|
||||
}
|
||||
|
||||
// Create the set of noncartesian connections.
|
||||
noncartesian_ = nnc_;
|
||||
exportNncStructure(grid);
|
||||
|
||||
// Compute z coordinates
|
||||
for (int c = 0; c<numCells; ++c){
|
||||
z_[c] = Opm::UgGridHelpers::cellCenterDepth(grid, c);
|
||||
@ -200,7 +203,6 @@ namespace Opm
|
||||
}
|
||||
std::copy(grav, grav + nd, gravity_);
|
||||
}
|
||||
exportNncStructure(grid);
|
||||
}
|
||||
|
||||
|
||||
@ -214,6 +216,7 @@ namespace Opm
|
||||
Vector& poreVolume() { return pvol_ ;}
|
||||
Vector& transmissibility() { return trans_ ;}
|
||||
const NNC& nnc() const { return nnc_;}
|
||||
const NNC& nonCartesianConnections() const { return noncartesian_;}
|
||||
|
||||
private:
|
||||
template <class Grid>
|
||||
@ -283,7 +286,7 @@ namespace Opm
|
||||
if (!cartesianAdjacent(grid, c1, c2)) {
|
||||
// suppose c1,c2 is specified in ECLIPSE input
|
||||
// we here overwrite its trans by grid's
|
||||
nnc_.addNNC(c1, c2, trans_[i]);
|
||||
noncartesian_.addNNC(c1, c2, trans_[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -295,8 +298,10 @@ namespace Opm
|
||||
double gravity_[3]; // Size 3 even if grid is 2-dim.
|
||||
bool use_local_perm_;
|
||||
|
||||
/// Non-neighboring connections
|
||||
// Non-neighboring connections
|
||||
NNC nnc_;
|
||||
// Non-cartesian connections
|
||||
NNC noncartesian_;
|
||||
};
|
||||
|
||||
template <class GridType>
|
||||
|
@ -110,7 +110,7 @@ namespace Opm
|
||||
}
|
||||
|
||||
// init output writer
|
||||
output_writer_.writeInit( timer, geo_.nnc() );
|
||||
output_writer_.writeInit( timer, geo_.nonCartesianConnections() );
|
||||
|
||||
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
|
||||
if( ! restorefilename.empty() )
|
||||
|
@ -73,7 +73,7 @@ namespace Opm
|
||||
}
|
||||
|
||||
// init output writer
|
||||
output_writer_.writeInit( timer, geo_.nnc());
|
||||
output_writer_.writeInit( timer, geo_.nonCartesianConnections());
|
||||
|
||||
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
|
||||
if( ! restorefilename.empty() )
|
||||
|
@ -246,10 +246,10 @@ namespace Opm
|
||||
|
||||
void
|
||||
BlackoilOutputWriter::
|
||||
writeInit(const SimulatorTimerInterface& timer, const NNC& nnc)
|
||||
writeInit(const SimulatorTimerInterface& timer, const NNC& non_cartesian_connections)
|
||||
{
|
||||
if( eclWriter_ ) {
|
||||
eclWriter_->writeInit(timer, nnc);
|
||||
eclWriter_->writeInit(timer, non_cartesian_connections);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ namespace Opm
|
||||
{}
|
||||
|
||||
/** \copydoc Opm::OutputWriter::writeInit */
|
||||
void writeInit(const SimulatorTimerInterface& /* timer */, const NNC& nnc)
|
||||
void writeInit(const SimulatorTimerInterface& /* timer */, const NNC& /* non_cartesian_connections */)
|
||||
{}
|
||||
|
||||
/** \copydoc Opm::OutputWriter::writeTimeStep */
|
||||
@ -183,7 +183,7 @@ namespace Opm
|
||||
{}
|
||||
|
||||
/** \copydoc Opm::OutputWriter::writeInit */
|
||||
void writeInit(const SimulatorTimerInterface& /* timer */, const NNC& nnc)
|
||||
void writeInit(const SimulatorTimerInterface& /* timer */, const NNC& /* non_cartesian_connections */)
|
||||
{}
|
||||
|
||||
/** \copydoc Opm::OutputWriter::writeTimeStep */
|
||||
@ -214,7 +214,7 @@ namespace Opm
|
||||
const double* permeability );
|
||||
|
||||
/** \copydoc Opm::OutputWriter::writeInit */
|
||||
void writeInit(const SimulatorTimerInterface &timer, const NNC& nnc);
|
||||
void writeInit(const SimulatorTimerInterface &timer, const NNC& non_cartesian_connections);
|
||||
|
||||
/** \copydoc Opm::OutputWriter::writeTimeStep */
|
||||
void writeTimeStep(const SimulatorTimerInterface& timer,
|
||||
|
Loading…
Reference in New Issue
Block a user