-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add analytical leakoff #3525
base: develop
Are you sure you want to change the base?
Conversation
// mid-point rule in time | ||
//localRhs[localRow] += m_leakoffConst * area[kfe] * dens[kfe][0] / sqrt(time + dt / 2.0 - m_fractureCreationTime[kfe]); | ||
localRhs[localRow] += m_leakoffConst * area[kfe] * dens[kfe][0] / sqrt(time + dt / 2.0 - m_fractureCreationTime[kfe]); | ||
std::cout << "creation time " << kfe << " " << m_fractureCreationTime[kfe] << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove debug
[&]( localIndex const, | ||
FaceElementSubRegion const & subRegion ) | ||
{ | ||
std::size_t regionSize = subRegion.size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace size_t
with localIndex
arrayView1d< integer const > const elemGhostRank = subRegion.ghostRank(); | ||
|
||
const int numDof = 1; | ||
const int numEqn = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int
-> integer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these can be constexpr
forAll< serialPolicy >( regionSize, | ||
[&] GEOS_HOST_DEVICE ( localIndex const kfe ) mutable | ||
{ | ||
if ( elemGhostRank[kfe] >= 0 || time == m_fractureCreationTime[kfe] ) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<=
for time comparison here? or some epsilon?
globalIndex dofIndices[numDof]{}; | ||
real64 localJacobian[numEqn][numDof]{}; | ||
forAll< serialPolicy >( regionSize, | ||
[&] GEOS_HOST_DEVICE ( localIndex const kfe ) mutable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if mutable is needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a matter of fact, I don't think mutable device lambdas are supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix code style
@@ -256,6 +264,11 @@ class HydrofractureSolver : public POROMECHANICS_SOLVER | |||
// flag to determine whether or not to apply lagging update for the fracture stencil weights | |||
integer m_isLaggingFractureStencilWeightsUpdate; | |||
|
|||
// record to fracture cell creatition time | |||
std::vector<double> m_fractureCreationTime; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::vector<double> m_fractureCreationTime; | |
array1d<real64> m_fractureCreationTime; |
std::vector<double> m_fractureCreationTime; | ||
|
||
// analytical leakoff coefficient | ||
real64 m_leakoffConst; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
real64 m_leakoffConst; | |
real64 m_leakoffCoefficient; |
?
@@ -179,6 +179,8 @@ class HydrofractureSolver : public POROMECHANICS_SOLVER | |||
|
|||
constexpr static char const * isLaggingFractureStencilWeightsUpdateString() { return "isLaggingFractureStencilWeightsUpdate"; } | |||
|
|||
constexpr static char const * leakoffConstString() {return "leakoffConst"; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constexpr static char const * leakoffConstString() {return "leakoffConst"; } | |
constexpr static char const * leakoffCoefficientString() {return "leakoffCoefficient"; } |
?
const int localRow = presDofNumber[kfe] - rankOffset; | ||
for( integer idof = 0; idof < numDof; ++idof ) | ||
dofIndices[idof] = presDofNumber[kfe] + idof; | ||
localJacobian[0][0] = m_leakoffConst * area[kfe] * dDens_dPressure[kfe][0] / sqrt(time + dt / 2.0 - m_fractureCreationTime[kfe]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use LvArray::sqrt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this analytical model? What we have should actually be better.
I am a numerical believer too. but when it shows strong transient effects, especially during the fracturing, enormous refinement near the fracture is seen to match the theoretical solution. That is why I think this feature can complement applications to some extent and also maintain a quite good level of preciseness. I will show our studies next week. |
add Carter's law to complement the fracture propagation in the elastic media.