Hi Ranjeet,
you better obtain the element index using the mapper provided in the FvGridGeometry, i.e.: const auto eIdx = this->fvGridGeometry().elementMapper().index(element) then it also works for grids that have several geometry types. Does your code compile and run? It looks okay as long as your porosity field (porosity_) is a container of the size of number of elements with all values initialized properly. Also, this only works if your initial water saturation is 0.4 in the entire domain (as you hard-coded this into you constructor). I furthermore wonder why you do this in the spatial parameters, I would rather do it in the problem where you have access to the spatial parameters (and thus the porosity) as well as the initial saturation values. This way you can compute this depending on your choice for the initial saturations. Best wishes, Dennis ________________________________ 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
