Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opm/models/blackoil/blackoillocalresidualtpfa.hh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define EWOMS_BLACK_OIL_LOCAL_TPFA_RESIDUAL_HH

#include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
#include <opm/input/eclipse/Schedule/BCProp.hpp>
#include <opm/input/eclipse/Schedule/BCState.hpp>

#include <opm/material/common/ConditionalStorage.hpp>
#include <opm/material/common/MathToolbox.hpp>
Expand Down
2 changes: 1 addition & 1 deletion opm/models/discretization/common/tpfalinearizer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <opm/material/common/ConditionalStorage.hpp>

#include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
#include <opm/input/eclipse/Schedule/BCProp.hpp>
#include <opm/input/eclipse/Schedule/BCState.hpp>

#include <opm/models/blackoil/blackoilproperties.hh>
#include <opm/models/common/multiphasebaseproperties.hh>
Expand Down
2 changes: 1 addition & 1 deletion opm/models/discretization/common/tpfalinearizerstructs.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <opm/common/Exceptions.hpp>
#include <opm/grid/utility/SparseTable.hpp>
#include <opm/input/eclipse/Schedule/BCProp.hpp>
#include <opm/input/eclipse/Schedule/BCState.hpp>

#include <opm/common/utility/gpuistl_if_available.hpp>
#include <opm/common/utility/pointerArithmetic.hpp>
Expand Down
2 changes: 1 addition & 1 deletion opm/models/discretization/common/tpsalinearizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include <opm/grid/utility/SparseTable.hpp>

#include <opm/input/eclipse/Schedule/BCProp.hpp>
#include <opm/input/eclipse/Schedule/BCState.hpp>

#include <opm/material/materialstates/MaterialStateTPSA.hpp>

Expand Down
4 changes: 2 additions & 2 deletions opm/models/tpsa/elasticitylocalresidualtpsa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include <dune/common/fvector.hh>

#include <opm/input/eclipse/Schedule/BCProp.hpp>
#include <opm/input/eclipse/Schedule/BCState.hpp>

#include <opm/material/common/MathToolbox.hpp>
#include <opm/material/materialstates/MaterialStateTPSA.hpp>
Expand Down Expand Up @@ -213,7 +213,7 @@ class ElasticityLocalResidual
}

/*!
* \brief Calculate boundary conditions in TPSA formulation given by BCCON/BCPROP
* \brief Calculate boundary conditions in TPSA formulation given by BCCON/BCMECH
*
* \param bndryTerm Boundary term vector
* \param materialState Material state container
Expand Down
14 changes: 7 additions & 7 deletions opm/simulators/flow/FlowProblem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1232,10 +1232,10 @@ class FlowProblem : public GetPropType<TypeTag, Properties::BaseProblem>
if (bcindex_(dir)[globalSpaceIdx] == 0) {
return { BCType::NONE, RateVector(0.0) };
}
if (schedule[this->episodeIndex()].bcprop.size() == 0) {
if (schedule[this->episodeIndex()].bcstate.size() == 0) {
return { BCType::NONE, RateVector(0.0) };
}
const auto& bc = schedule[this->episodeIndex()].bcprop[bcindex_(dir)[globalSpaceIdx]];
const auto& bc = schedule[this->episodeIndex()].bcstate[bcindex_(dir)[globalSpaceIdx]];
if (bc.bctype!=BCType::RATE) {
return { bc.bctype, RateVector(0.0) };
}
Expand Down Expand Up @@ -1872,15 +1872,15 @@ class FlowProblem : public GetPropType<TypeTag, Properties::BaseProblem>
}
};

virtual void handleSolventBC(const BCProp::BCFace&, RateVector&) const = 0;
virtual void handleSolventBC(const BCState::BCFace&, RateVector&) const = 0;

virtual void handlePolymerBC(const BCProp::BCFace&, RateVector&) const = 0;
virtual void handlePolymerBC(const BCState::BCFace&, RateVector&) const = 0;

virtual void handleMicrBC(const BCProp::BCFace&, RateVector&) const = 0;
virtual void handleMicrBC(const BCState::BCFace&, RateVector&) const = 0;

virtual void handleOxygBC(const BCProp::BCFace&, RateVector&) const = 0;
virtual void handleOxygBC(const BCState::BCFace&, RateVector&) const = 0;

virtual void handleUreaBC(const BCProp::BCFace&, RateVector&) const = 0;
virtual void handleUreaBC(const BCState::BCFace&, RateVector&) const = 0;

BCData<int> bcindex_;
bool nonTrivialBoundaryConditions_ = false;
Expand Down
16 changes: 8 additions & 8 deletions opm/simulators/flow/FlowProblemBlackoil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,16 +802,16 @@ class FlowProblemBlackoil : public FlowProblem<TypeTag>
InitialFluidState boundaryFluidState(unsigned globalDofIdx, const int directionId) const
{
OPM_TIMEBLOCK_LOCAL(boundaryFluidState, Subsystem::Assembly);
const auto& bcprop = this->simulator().vanguard().schedule()[this->episodeIndex()].bcprop;
if (bcprop.size() > 0) {
const auto& bcstate = this->simulator().vanguard().schedule()[this->episodeIndex()].bcstate;
if (bcstate.size() > 0) {
FaceDir::DirEnum dir = FaceDir::FromIntersectionIndex(directionId);

// index == 0: no boundary conditions for this
// global cell and direction
if (this->bcindex_(dir)[globalDofIdx] == 0)
return initialFluidStates_[globalDofIdx];

const auto& bc = bcprop[this->bcindex_(dir)[globalDofIdx]];
const auto& bc = bcstate[this->bcindex_(dir)[globalDofIdx]];
if (bc.bctype == BCType::DIRICHLET )
{
InitialFluidState fluidState;
Expand Down Expand Up @@ -1614,39 +1614,39 @@ class FlowProblemBlackoil : public FlowProblem<TypeTag>

}

void handleSolventBC(const BCProp::BCFace& bc, RateVector& rate) const override
void handleSolventBC(const BCState::BCFace& bc, RateVector& rate) const override
{
if constexpr (!enableSolvent)
throw std::logic_error("solvent is disabled and you're trying to add solvent to BC");

rate[Indices::solventSaturationIdx] = bc.rate;
}

void handlePolymerBC(const BCProp::BCFace& bc, RateVector& rate) const override
void handlePolymerBC(const BCState::BCFace& bc, RateVector& rate) const override
{
if constexpr (!enablePolymer)
throw std::logic_error("polymer is disabled and you're trying to add polymer to BC");

rate[Indices::polymerConcentrationIdx] = bc.rate;
}

void handleMicrBC(const BCProp::BCFace& bc, RateVector& rate) const override
void handleMicrBC(const BCState::BCFace& bc, RateVector& rate) const override
{
if constexpr (!enableMICP)
throw std::logic_error("MICP is disabled and you're trying to add microbes to BC");

rate[Indices::microbialConcentrationIdx] = bc.rate;
}

void handleOxygBC(const BCProp::BCFace& bc, RateVector& rate) const override
void handleOxygBC(const BCState::BCFace& bc, RateVector& rate) const override
{
if constexpr (!enableMICP)
throw std::logic_error("MICP is disabled and you're trying to add oxygen to BC");

rate[Indices::oxygenConcentrationIdx] = bc.rate;
}

void handleUreaBC(const BCProp::BCFace& bc, RateVector& rate) const override
void handleUreaBC(const BCState::BCFace& bc, RateVector& rate) const override
{
if constexpr (!enableMICP)
throw std::logic_error("MICP is disabled and you're trying to add urea to BC");
Expand Down
10 changes: 5 additions & 5 deletions opm/simulators/flow/FlowProblemComp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,27 +608,27 @@ class FlowProblemComp : public FlowProblem<TypeTag>

private:

void handleSolventBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override
void handleSolventBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override
{
throw std::logic_error("solvent is disabled for compositional modeling and you're trying to add solvent to BC");
}

void handlePolymerBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override
void handlePolymerBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override
{
throw std::logic_error("polymer is disabled for compositional modeling and you're trying to add polymer to BC");
}

void handleMicrBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override
void handleMicrBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override
{
throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add microbes to BC");
}

void handleOxygBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override
void handleOxygBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override
{
throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add oxygen to BC");
}

void handleUreaBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override
void handleUreaBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override
{
throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add urea to BC");
}
Expand Down
12 changes: 7 additions & 5 deletions opm/simulators/flow/FlowProblemTPSA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,20 +280,22 @@ class FlowProblemTPSA : public FlowProblemBlackoil<TypeTag>
std::pair<BCMECHType, Dune::FieldVector<Evaluation, 3>>
mechBoundaryCondition(const unsigned int globalSpaceIdx, const int directionId)
{
// Default boundary conditions if BCCON/BCPROP not defined
// Default boundary conditions if BCCON/BCMECH not defined
if (!this->nonTrivialBoundaryConditions()) {
return { BCMECHType::NONE, Dune::FieldVector<Evaluation, 3>{0.0, 0.0, 0.0} };
}

// Default for BCPROP index = 0 or no BCPROP defined at current episode
// Default for BCMECH index = 0 or no BCMECH defined at current episode
FaceDir::DirEnum dir = FaceDir::FromIntersectionIndex(directionId);
const auto& schedule = this->simulator().vanguard().schedule();
if (this->bcindex_(dir)[globalSpaceIdx] == 0 || schedule[this->episodeIndex()].bcprop.size() == 0) {
return { BCMECHType::NONE, Dune::FieldVector<Evaluation, 3>{0.0, 0.0, 0.0} };
if (this->bcindex_(dir)[globalSpaceIdx] == 0
|| schedule[this->episodeIndex()].bcstate.size() == 0) {
return {BCMECHType::NONE, Dune::FieldVector<Evaluation, 3>{0.0, 0.0, 0.0} };
}

// Get current BC
const auto& bc = schedule[this->episodeIndex()].bcprop[this->bcindex_(dir)[globalSpaceIdx]];
const auto& bc =
schedule[this->episodeIndex()].bcstate[this->bcindex_(dir)[globalSpaceIdx]];
if (bc.bcmechtype == BCMECHType::FREE) {
return { BCMECHType::FREE, Dune::FieldVector<Evaluation, 3>{0.0, 0.0, 0.0} };
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tpsa_localresidual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <dune/common/fvector.hh>

#include <opm/input/eclipse/Schedule/BCProp.hpp>
#include <opm/input/eclipse/Schedule/BCState.hpp>

#include <opm/material/materialstates/MaterialStateTPSA.hpp>

Expand Down