mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Get connection CF and Kh directly from parser Connecton object
This commit is contained in:
parent
e5ab52b773
commit
59238803bb
@ -788,31 +788,9 @@ protected:
|
|||||||
const Opm::Connection* connection = connInfo.first;
|
const Opm::Connection* connection = connInfo.first;
|
||||||
std::shared_ptr<Well> eclWell = connInfo.second;
|
std::shared_ptr<Well> eclWell = connInfo.second;
|
||||||
eclWell->addDof(elemCtx, dofIdx);
|
eclWell->addDof(elemCtx, dofIdx);
|
||||||
|
eclWell->setConnectionTransmissibilityFactor(elemCtx, dofIdx, connection->CF());
|
||||||
// the catch is a hack for a ideosyncrasy of opm-parser with regard to
|
eclWell->setRadius(elemCtx, dofIdx, connection->rw());
|
||||||
// defaults handling: if the deck did not specify a radius for the
|
//eclWell->setEffectivePermeability(elemCtx, dofIdx, connection->Kh());
|
||||||
// completion, there seems to be no other way to detect this except for
|
|
||||||
// catching the exception
|
|
||||||
try {
|
|
||||||
eclWell->setRadius(elemCtx, dofIdx, 0.5*connection->getDiameter());
|
|
||||||
}
|
|
||||||
catch (const std::logic_error&)
|
|
||||||
{}
|
|
||||||
|
|
||||||
// overwrite the automatically computed effective
|
|
||||||
// permeability by the one specified in the deck-> Note: this
|
|
||||||
// is not implemented by opm-parser yet...
|
|
||||||
/*
|
|
||||||
Scalar Kh = connection->getEffectivePermeability();
|
|
||||||
if (std::isfinite(Kh) && Kh > 0.0)
|
|
||||||
eclWell->setEffectivePermeability(elemCtx, dofIdx, Kh);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// overwrite the automatically computed connection
|
|
||||||
// transmissibilty factor by the one specified in the deck->
|
|
||||||
const auto& ctf = connection->getConnectionTransmissibilityFactorAsValueObject();
|
|
||||||
if (ctf.hasValue() && ctf.getValue() > 0.0)
|
|
||||||
eclWell->setConnectionTransmissibilityFactor(elemCtx, dofIdx, ctf.getValue());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user