-
Notifications
You must be signed in to change notification settings - Fork 97
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
A permeability model for the excavation damage zone #149
Open
wenqing
wants to merge
10
commits into
ufz:master
Choose a base branch
from
wenqing:perm_failure_PR
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0c533a2
[CMediumProperties] Moved the private section to the end of the class
wenqing 1732489
[Solid] Introduced files StressAuxiliaryFunctions.h/cpp
wenqing 842f2f9
Added a class about Mohr Coulomb failure criterion
wenqing cf1536b
Added class DamageZonePermeability
wenqing beb9984
Added MediumProperties::getPermeabilityTensor to use DamageZonePermea…
wenqing ad0a244
Added an argument for integration point ID in some members in CFinite…
wenqing 2bc485a
[EDZ permeabillity] Avoid stress=0 in the principle stress calculation
wenqing 0709343
[Mat] Added a default temperature to fluid properties
wenqing b94988b
Added a documentation about a permeability model for the excavation d…
wenqing cea07d7
A modification in MohrCoulombFailureCriterion.cpp
wenqing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* \copyright | ||
* Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) | ||
* Distributed under a Modified BSD License. | ||
* See accompanying file LICENSE.txt or | ||
* http://www.opengeosys.org/project/license | ||
* | ||
* \file DamageZonePermeability.cpp | ||
* | ||
* Created on February 6, 2019, 3:25 PM | ||
* | ||
*/ | ||
|
||
#include "DamageZonePermeability.h" | ||
|
||
#include <cmath> | ||
|
||
#include "Material/Solid/MohrCoulombFailureCriterion.h" | ||
namespace PorousMediumProperty | ||
{ | ||
void DamageZonePermeability::computeDamageZonePermeability( | ||
double* intrinsic_permeability, | ||
SolidProp::MohrCoulombFailureCriterion const& failure_criterion, | ||
double const* const stress, const int dim) | ||
{ | ||
const int n_stresses = (dim == 3) ? 6 : 4; | ||
const double failure_index = | ||
failure_criterion.getFailureIndex(stress, n_stresses); | ||
|
||
if (failure_index < 1.0) | ||
return; | ||
|
||
const double extra_k = _a * std::exp(_b * failure_index); | ||
for (int i = 0; i < dim; i++) | ||
{ | ||
intrinsic_permeability[i * dim + i] += extra_k; | ||
} | ||
} | ||
} // End of the namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* \copyright | ||
* Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) | ||
* Distributed under a Modified BSD License. | ||
* See accompanying file LICENSE.txt or | ||
* http://www.opengeosys.org/project/license | ||
* | ||
* \file DamageZonePermeability.h | ||
* | ||
* Created on February 6, 2019, 3:25 PM | ||
* | ||
*/ | ||
|
||
#pragma once | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please replace this |
||
|
||
namespace SolidProp | ||
{ | ||
class MohrCoulombFailureCriterion; | ||
} | ||
namespace PorousMediumProperty | ||
{ | ||
/** | ||
* Permeability model for damage zone, which is determined by the Mohr-Coulomb | ||
* failure index as | ||
* \f$ k=k_0 + a \mbox{e}^{b\,f} \f$ | ||
* where \f$k_0\f$ is the intrinsic permeability, \f$a\f$ and \f$b\f$ are | ||
* coefficient, and \f$ f \f$ is the failure index. | ||
*/ | ||
class DamageZonePermeability | ||
{ | ||
public: | ||
DamageZonePermeability(const double a, const double b) : _a(a), _b(b) {} | ||
/** | ||
* | ||
* @param intrinsic_permeability Passed in as intrinsic permeability | ||
* tensor, and passed out the modification of | ||
* intrinsic permeability with damage zone | ||
* model. | ||
* @param failure_criterion Failure criterion. | ||
* @param stress Stress tensor. | ||
* @param dim Dimension of the intrinsic permeability | ||
* tensor. | ||
*/ | ||
void computeDamageZonePermeability( | ||
double* intrinsic_permeability, | ||
SolidProp::MohrCoulombFailureCriterion const& failure_criterion, | ||
double const* const stress, | ||
const int dim); | ||
|
||
private: | ||
const double _a; /// Coefficient a | ||
const double _b; /// Coefficient a | ||
}; | ||
} // End of the namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* \copyright | ||
* Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) | ||
* Distributed under a Modified BSD License. | ||
* See accompanying file LICENSE.txt or | ||
* http://www.opengeosys.org/project/license | ||
* | ||
* \file MohrCoulombFailureCriterion.cpp | ||
* | ||
* Created on February 6, 2019, 1:40 PM | ||
* | ||
*/ | ||
|
||
#include "MohrCoulombFailureCriterion.h" | ||
|
||
#include <algorithm> | ||
#include <cmath> | ||
#include <limits> | ||
|
||
#include "StressAuxiliaryFunctions.h" | ||
|
||
namespace SolidProp | ||
{ | ||
MohrCoulombFailureCriterion::MohrCoulombFailureCriterion(const double c, | ||
const double angle) | ||
: _c(c), _angle(angle * pi / 180.0) | ||
{ | ||
} | ||
|
||
double MohrCoulombFailureCriterion::getFailureIndex( | ||
double const* const s, const int nstress_components) const | ||
{ | ||
double const* const principle_stresses = | ||
getPrincipleStresses(s, nstress_components); | ||
|
||
double s_min = std::numeric_limits<double>::max(); | ||
double s_max = -std::numeric_limits<double>::max(); | ||
|
||
for (int i = 0; i < 3; i++) | ||
{ | ||
s_max = std::max(s_max, principle_stresses[i]); | ||
s_min = std::min(s_min, principle_stresses[i]); | ||
} | ||
|
||
const double tau_max = 0.5 * std::abs(s_max - s_min); | ||
const double s_n = -0.5 * (s_max + s_min) / std::cos(_angle); | ||
|
||
return tau_max / (_c + s_n * std::tan(_angle)); | ||
} | ||
|
||
} // end of namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* \copyright | ||
* Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) | ||
* Distributed under a Modified BSD License. | ||
* See accompanying file LICENSE.txt or | ||
* http://www.opengeosys.org/project/license | ||
* | ||
* \file MohrCoulombFailureCriterion.h | ||
* | ||
* Created on February 6, 2019, 1:40 PM | ||
* | ||
*/ | ||
|
||
#pragma once | ||
|
||
namespace SolidProp | ||
{ | ||
class MohrCoulombFailureCriterion | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think WX has already implemented MohrCoulomb stuff. Isn't it possible to reuse it? |
||
{ | ||
public: | ||
MohrCoulombFailureCriterion(const double c, const double angle); | ||
|
||
/** | ||
* | ||
* @param s Stress. | ||
* @param nstress_components Number of stress components. | ||
* @return | ||
*/ | ||
double getFailureIndex(double const* const s, | ||
const int nstress_components) const; | ||
|
||
private: | ||
const double _c; /// apparent cohesion. | ||
const double _angle; /// The angle of internal friction. | ||
}; | ||
|
||
} // end of namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/** | ||
* \copyright | ||
* Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) | ||
* Distributed under a Modified BSD License. | ||
* See accompanying file LICENSE.txt or | ||
* http://www.opengeosys.org/project/license | ||
* | ||
* \file StressAuxiliaryFunctions.cpp | ||
* | ||
* Created on February 6, 2019, 12:08 PM | ||
* | ||
*/ | ||
|
||
#include "StressAuxiliaryFunctions.h" | ||
|
||
#include <algorithm> | ||
#include <cmath> | ||
#include <limits> | ||
|
||
namespace SolidProp | ||
{ | ||
void getDeviatoricStess(double const* const stress, | ||
const int nstress_components, double* s) | ||
{ | ||
for (int i = 0; i < nstress_components; i++) | ||
s[i] = stress[i]; | ||
|
||
const double mean_stress = (stress[0] + stress[1] + stress[2]) / 3.0; | ||
for (int i = 0; i < 3; i++) | ||
s[i] -= mean_stress; | ||
} | ||
|
||
double getStressNorm(double const* const s, const int nstress_components) | ||
{ | ||
double ns = 0.0; | ||
for (int i = 0; i < 3; i++) | ||
ns += s[i] * s[i]; | ||
for (int i = 3; i < nstress_components; i++) | ||
ns += 2.0 * s[i] * s[i]; | ||
return std::sqrt(ns); | ||
} | ||
|
||
double* getPrincipleStresses(double const* const s, | ||
const int nstress_components) | ||
{ | ||
static double principle_stress[3]; | ||
const double s11 = s[0]; | ||
const double s22 = s[1]; | ||
const double s33 = s[2]; | ||
const double s12 = s[3]; | ||
const double s13 = (nstress_components == 6) ? s[4] : 0.0; | ||
const double s23 = (nstress_components == 6) ? s[5] : 0.0; | ||
|
||
const double I1 = s11 + s22 + s33; | ||
const double I2 = s11 * s22 + s22 * s33 + s33 * s11 - s12 * s12 | ||
- s13 * s13 - s23 * s23; | ||
const double I3 = s11 * s22 * s33 + 2 * s12 * s23 * s13 | ||
- s23 * s23 * s11 - s13 * s13 * s22 | ||
- s12 * s12 * s33; | ||
|
||
if ((std::fabs(I1) < std::numeric_limits<double>::epsilon() && | ||
std::fabs(I2) < std::numeric_limits<double>::epsilon()) || | ||
std::fabs(I1 * I1 - 3.0 * I2) < std::numeric_limits<double>::epsilon() | ||
) | ||
{ | ||
for (int k=0; k<3; k++) | ||
principle_stress[k] = s[k]; | ||
return principle_stress; | ||
} | ||
|
||
const double cos_a = | ||
std::min(std::max(0.5 * (2 * I1 * I1 * I1 - 9. * I1 * I2 + 27.0 * I3) / | ||
std::pow(I1 * I1 - 3.0 * I2, 1.5), | ||
-1.0), | ||
1.0); | ||
|
||
const double alpha = std::acos(cos_a) / 3.0; | ||
const double I1_d3 = I1 / 3.0; | ||
const double fac = 2. * std::sqrt(I1 * I1 - 3 * I2) / 3.0; | ||
|
||
principle_stress[0] = I1_d3 + fac * std::cos(alpha); | ||
principle_stress[1] = I1_d3 + fac * std::cos(alpha - 2.0 * pi / 3.0); | ||
principle_stress[2] = I1_d3 + fac * std::cos(alpha - 4.0 * pi / 3.0); | ||
|
||
return principle_stress; | ||
} | ||
|
||
} // namespace SolidProp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* \copyright | ||
* Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) | ||
* Distributed under a Modified BSD License. | ||
* See accompanying file LICENSE.txt or | ||
* http://www.opengeosys.org/project/license | ||
* | ||
* \file StressAuxiliaryFunctions.h | ||
* | ||
* Created on February 6, 2019, 12:08 PM | ||
* | ||
*/ | ||
|
||
#pragma once | ||
|
||
namespace SolidProp | ||
{ | ||
void getDeviatoricStess(double const* const stress, | ||
const int nstress_components, double* s); | ||
|
||
double getStressNorm(double const* const s, const int nstress_components); | ||
|
||
double* getPrincipleStresses(double const* const s, | ||
const int nstress_components); | ||
|
||
const double pi = 3.14159265359; | ||
|
||
} // end of namespace |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why not move Material dir out of FEM dir?