mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
Communicate rock properties, too.
Somehow I was mislead by the name rock properties that the data stored in them is not associated to grid cells, but to rock regions. With this commit we determine the porosity and permeability by communication.
This commit is contained in:
@@ -119,6 +119,7 @@ namespace Opm
|
|||||||
/// Constructor for properties on a subgrid
|
/// Constructor for properties on a subgrid
|
||||||
BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck& props,
|
BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck& props,
|
||||||
const int number_of_cells)
|
const int number_of_cells)
|
||||||
|
: rock_(number_of_cells)
|
||||||
{
|
{
|
||||||
const int original_size = props.cellPvtRegionIdx_.size();
|
const int original_size = props.cellPvtRegionIdx_.size();
|
||||||
if (number_of_cells > original_size) {
|
if (number_of_cells > original_size) {
|
||||||
@@ -131,7 +132,6 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
|||||||
materialLawManager_ = props.materialLawManager_;
|
materialLawManager_ = props.materialLawManager_;
|
||||||
|
|
||||||
// Copy properties that do not depend on the postion within the grid.
|
// Copy properties that do not depend on the postion within the grid.
|
||||||
rock_ = props.rock_;
|
|
||||||
satprops_ = props.satprops_;
|
satprops_ = props.satprops_;
|
||||||
phase_usage_ = props.phase_usage_;
|
phase_usage_ = props.phase_usage_;
|
||||||
props_ = props.props_;
|
props_ = props.props_;
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ public:
|
|||||||
BlackoilPropsDataHandle(const BlackoilPropsAdFromDeck& sendProps,
|
BlackoilPropsDataHandle(const BlackoilPropsAdFromDeck& sendProps,
|
||||||
BlackoilPropsAdFromDeck& recvProps)
|
BlackoilPropsAdFromDeck& recvProps)
|
||||||
: sendProps_(sendProps), recvProps_(recvProps),
|
: sendProps_(sendProps), recvProps_(recvProps),
|
||||||
size_(1)
|
size_(11)
|
||||||
{
|
{
|
||||||
// satOilMax might be non empty. In this case we will need to send it, too.
|
// satOilMax might be non empty. In this case we will need to send it, too.
|
||||||
// It has to have the same size as the cellPvtRegionIdx_
|
// It has to have the same size as the cellPvtRegionIdx_
|
||||||
@@ -278,7 +278,12 @@ public:
|
|||||||
assert( T::codimension == 0);
|
assert( T::codimension == 0);
|
||||||
|
|
||||||
buffer.write(sendProps_.cellPvtRegionIndex()[e.index()]);
|
buffer.write(sendProps_.cellPvtRegionIndex()[e.index()]);
|
||||||
if ( size_ > 1 ) {
|
for( std::size_t i = 0; i < 9; ++i )
|
||||||
|
{
|
||||||
|
buffer.write(sendProps_.rock_.permeability_[e.index()*9+i]);
|
||||||
|
}
|
||||||
|
buffer.write(sendProps_.rock_.porosity_[e.index()]);
|
||||||
|
if ( size_ > 11 ) {
|
||||||
buffer.write(sendProps_.satOilMax_[e.index()]);
|
buffer.write(sendProps_.satOilMax_[e.index()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -290,7 +295,15 @@ public:
|
|||||||
double val;
|
double val;
|
||||||
buffer.read(val);
|
buffer.read(val);
|
||||||
recvProps_.cellPvtRegionIdx_[e.index()]=val;
|
recvProps_.cellPvtRegionIdx_[e.index()]=val;
|
||||||
if ( size_ > 1 ) {
|
for( std::size_t i = 0; i < 9; ++i )
|
||||||
|
{
|
||||||
|
buffer.read(val);
|
||||||
|
recvProps_.rock_.permeability_[e.index()*9+i]
|
||||||
|
= val;
|
||||||
|
}
|
||||||
|
buffer.read(val);
|
||||||
|
recvProps_.rock_.porosity_[e.index()]=val;
|
||||||
|
if ( size_ > 11 ) {
|
||||||
buffer.read(val);
|
buffer.read(val);
|
||||||
recvProps_.satOilMax_[e.index()]=val;
|
recvProps_.satOilMax_[e.index()]=val;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user