Hi Ranjeet,
this seems to be correct to me.
You could slightly change your loop so that it also works for a non-constant
saturation or at any given time, assuming FluidSystem::phase1Idx refers to your
oil phase. However, this should then be rather done in your main (.cc) file,
where you have access to your gridVariables.
for (const auto& element : elements(fvGridGeometry.gridView()))
{
auto fvGeometry = localView(fvGridGeometry);
fvGeometry.bindElement(element);
auto elemVolVars = localView(gridVariables.curGridVolVars());
elemVolVars.bindElement(element, fvGeometry, curSol);
for (auto&& scv : scvs(fvGeometry))
{
const auto& volVars = elemVolVars[scv];
OOIP += volVars.saturation(FluidSystem::phase1Idx) *
volVars.porosity() * volVars.extrusionFactor();
}
}
OOIP *= 1e4;
Best regards
Kilian
________________________________
Von: Dumux <[email protected]> im Auftrag von Ranjeet
kumar <[email protected]>
Gesendet: Donnerstag, 8. November 2018 07:54:15
An: [email protected]
Betreff: [DuMuX] Calculation of Original Oil in Place(OOIP)
Hi all,
I want to calculate original oil in place for 2p problem where
OOIP = 10^4 * element.volume()*phi*(1-Sw)/Bo.
I have implemented as follow in the constructor of spatialparams.hh file:
Sw_ = 0.4;
for (const auto& element : elements(gridView)) {
auto geo = element.geometry();
//get cell index
int eIdx = gridView.indexSet().index(element);
OOIP_ += geo.volume()*porosity_[eIdx] *(1-Sw); //assumed Bo = 1;
}
OOIP_ = OOIP_*10000;
std::cout << "OOIP =" << OOIP_ << " m^3." << std::endl;
Is this correct?
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux