forked from hugary1995/raccoon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fatigue, porous flow, multi-phase flow, and more
- benchmark pressurized fracture added - fatigue benchmark problem added - documentation files added hugary1995#98 - tutorial example for hydraulic fracturing is ready
- Loading branch information
1 parent
f53140e
commit 9d15280
Showing
40 changed files
with
1,753 additions
and
64 deletions.
There are no files selected for viewing
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,44 @@ | ||
#* This file is part of the RACCOON application | ||
#* being developed at Dolbow lab at Duke University | ||
#* http://dolbow.pratt.duke.edu | ||
|
||
import os | ||
import math | ||
import csv | ||
import sys | ||
import matplotlib.pyplot as plt | ||
|
||
E = 4 | ||
nu = 0.2 | ||
Gc = 8e-4 | ||
mu = E / 2 / (1 + nu) | ||
m = 5 | ||
b = 0.1 | ||
h = math.sqrt(mu / m / b) | ||
|
||
D_stars = [] | ||
l_star_bars = [] | ||
for n in range(220): | ||
with open("count/out_feature_volumes_" + "{:04d}".format(n + 1) + ".csv") as csv_file: | ||
csv_reader = csv.reader(csv_file, delimiter=',') | ||
next(csv_reader) | ||
|
||
volumes = [] | ||
for row in csv_reader: | ||
volumes.append(float(row[0])) | ||
|
||
total_volume = sum(volumes) | ||
scale = 10000 / total_volume | ||
|
||
sigma = (n + 1) / 1000 | ||
D_star = math.sqrt((1 - nu * nu) * h / E / Gc) * sigma | ||
D_stars.append(D_star) | ||
|
||
l_star_bar = 0 | ||
for volume in volumes: | ||
l_star_bar += math.sqrt(scale * volume) / h | ||
l_star_bar /= len(volumes) | ||
l_star_bars.append(l_star_bar) | ||
|
||
plt.semilogy(D_stars, l_star_bars) | ||
plt.show() |
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,11 @@ | ||
# ADAnisotropicDiffusion | ||
|
||
!syntax description /Kernels/ADAnisotropicDiffusion | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /Kernels/ADAnisotropicDiffusion | ||
|
||
!syntax inputs /Kernels/ADAnisotropicDiffusion | ||
|
||
!syntax children /Kernels/ADAnisotropicDiffusion |
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,11 @@ | ||
# ADPoroMechanicsCoupling | ||
|
||
!syntax description /Kernels/ADPoroMechanicsCoupling | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /Kernels/ADPoroMechanicsCoupling | ||
|
||
!syntax inputs /Kernels/ADPoroMechanicsCoupling | ||
|
||
!syntax children /Kernels/ADPoroMechanicsCoupling |
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,11 @@ | ||
# ADPorousFlowTimeDerivative | ||
|
||
!syntax description /Kernels/ADPorousFlowTimeDerivative | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /Kernels/ADPorousFlowTimeDerivative | ||
|
||
!syntax inputs /Kernels/ADPorousFlowTimeDerivative | ||
|
||
!syntax children /Kernels/ADPorousFlowTimeDerivative |
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,11 @@ | ||
# ADSPFPressureTimeDerivative | ||
|
||
!syntax description /Kernels/ADSPFPressureTimeDerivative | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /Kernels/ADSPFPressureTimeDerivative | ||
|
||
!syntax inputs /Kernels/ADSPFPressureTimeDerivative | ||
|
||
!syntax children /Kernels/ADSPFPressureTimeDerivative |
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,11 @@ | ||
# ADSPFVolStrTimeDerivative | ||
|
||
!syntax description /Kernels/ADSPFVolStrTimeDerivative | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /Kernels/ADSPFVolStrTimeDerivative | ||
|
||
!syntax inputs /Kernels/ADSPFVolStrTimeDerivative | ||
|
||
!syntax children /Kernels/ADSPFVolStrTimeDerivative |
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,20 @@ | ||
# ADComputeCrackOpening | ||
|
||
!syntax description /Materials/ADComputeCrackOpening | ||
|
||
## Overview | ||
|
||
Crack opening calculation is accomplished using the gradient of damage variable, $\boldsymbol{\nabla}d$, which is used to define the unit vector perpendicular to the crack plane as $\bold{n}^d = \boldsymbol{\nabla}d/|\boldsymbol{\nabla}d|$. The crack opening field is then calculated as | ||
|
||
\begin{equation} | ||
\varw_n = h^{el} \left(\bold{n}^d \cdot \boldsymbol{\epsilon} \cdot \bold{n}^d\right), | ||
\end{equation} | ||
where $h^{el}$ is the edge length of the current element. | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /Materials/ADComputeCrackOpening | ||
|
||
!syntax inputs /Materials/ADComputeCrackOpening | ||
|
||
!syntax children /Materials/ADComputeCrackOpening |
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,19 @@ | ||
# ADComputeFluidMobility | ||
|
||
!syntax description /Materials/ADComputeFluidMobility | ||
|
||
## Overview | ||
|
||
\begin{equation} | ||
\boldsymbol{\lambda} = \frac{\bold{k}}{\mu} + d^{\xi}\frac{\bold{k}^d}{\mu}, | ||
\end{equation} | ||
where | ||
in which $\xi$ is an exponent used to localize the increased permeability along the fracture. $\bold{k}/\mu$ is the fluid mobility in intact bulk porous solid, while $\bold{k}^d/\mu$ is the additional permeability in the damaged domain. | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /Materials/ADComputeFluidMobility | ||
|
||
!syntax inputs /Materials/ADComputeFluidMobility | ||
|
||
!syntax children /Materials/ADComputeFluidMobility |
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,20 @@ | ||
# ADComputePorosity | ||
|
||
!syntax description /Materials/ADComputePorosity | ||
|
||
## Overview | ||
|
||
This equation calculates porosity evolution in porous solids in terms of variation of fluid pressure and solid volumetric strain: | ||
|
||
\begin{equation} | ||
\phi = \phi_0 + \frac{p}{M} + \alpha \epsilon_v, | ||
\end{equation} | ||
where $\phi$ is the solid porosity; $\phi_0$ is the initial solid porosity; $M$ is biot's modulus; $\alpha$ is the Biot’s coefficient; and $\epsilon_v$ is the solid volumetric strain. | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /Materials/ADComputePorosity | ||
|
||
!syntax inputs /Materials/ADComputePorosity | ||
|
||
!syntax children /Materials/ADComputePorosity |
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,42 @@ | ||
//* This file is part of the RACCOON application | ||
//* being developed at Dolbow lab at Duke University | ||
//* http://dolbow.pratt.duke.edu | ||
|
||
#pragma once | ||
|
||
// Moose Includes | ||
#include "DiracKernel.h" | ||
|
||
class DiracSource : public DiracKernel | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
DiracSource(const InputParameters & parameters); | ||
|
||
virtual void addPoints() override; | ||
virtual Real computeQpResidual() override; | ||
|
||
protected: | ||
/// position of the dirac source | ||
Point _point; | ||
|
||
/// numbe of dimensions | ||
int _dim; | ||
Real _fL; | ||
|
||
/// list of parameters for the source equation | ||
Real _t1; | ||
Real _tRT; | ||
Real _tL; | ||
Real _tP; | ||
Real _p0; | ||
Real _d1; | ||
Real _upcoeff; | ||
Real _downcoeff; | ||
|
||
/// fluid density | ||
Real _rho; | ||
|
||
/// number of acoustic shots | ||
Real _num_shots; | ||
}; |
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 @@ | ||
//* This file is part of the RACCOON application | ||
//* being developed at Dolbow lab at Duke University | ||
//* http://dolbow.pratt.duke.edu | ||
|
||
#pragma once | ||
|
||
// MOOSE Includes | ||
#include "InitialCondition.h" | ||
|
||
/** | ||
* PhasefieldShapes just returns a constant value. | ||
*/ | ||
class PhasefieldShapes : public InitialCondition | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
PhasefieldShapes(const InputParameters & parameters); | ||
|
||
virtual Real value(const Point & p); | ||
|
||
private: | ||
Real _epsilon; | ||
std::vector<Real> _centers_tips; | ||
std::vector<std::string> _shapes; | ||
std::vector<std::string> _gradients; | ||
std::vector<Real> _gradient_values; | ||
Real _fluid_phase; | ||
}; |
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,24 @@ | ||
//* This file is part of the RACCOON application | ||
//* being developed at Dolbow lab at Duke University | ||
//* http://dolbow.pratt.duke.edu | ||
|
||
#pragma once | ||
|
||
#include "ADKernel.h" | ||
|
||
class ADAnisotropicDiffusion : public ADKernel | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
|
||
ADAnisotropicDiffusion(const InputParameters & parameters); | ||
|
||
protected: | ||
virtual ADReal computeQpResidual() override; | ||
|
||
/// gradient of the coupled variable | ||
const ADVariableGradient & _grad_v; | ||
|
||
/// fluid mobility tensor | ||
const ADMaterialProperty<RankTwoTensor> & _fluid_mob; | ||
}; |
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,27 @@ | ||
//* This file is part of the RACCOON application | ||
//* being developed at Dolbow lab at Duke University | ||
//* http://dolbow.pratt.duke.edu | ||
|
||
#pragma once | ||
|
||
#include "ADKernel.h" | ||
|
||
class ADPoroMechanicsCoupling : public ADKernel | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
|
||
ADPoroMechanicsCoupling(const InputParameters & parameters); | ||
|
||
protected: | ||
virtual ADReal computeQpResidual(); | ||
|
||
/// biot coefficient | ||
const ADMaterialProperty<Real> & _coefficient; | ||
|
||
/// fluid pore pressure | ||
const ADVariableValue & _porepressure; | ||
|
||
/// component integer | ||
unsigned int _component; | ||
}; |
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,24 @@ | ||
//* This file is part of the RACCOON application | ||
//* being developed at Dolbow lab at Duke University | ||
//* http://dolbow.pratt.duke.edu | ||
|
||
#pragma once | ||
|
||
#include "ADTimeKernel.h" | ||
|
||
class ADPorousFlowTimeDerivative : public ADTimeKernel | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
|
||
ADPorousFlowTimeDerivative(const InputParameters & parameters); | ||
|
||
protected: | ||
virtual ADReal computeQpResidual() override; | ||
|
||
const ADMaterialProperty<Real> & _porosity; | ||
const MaterialProperty<Real> & _porosity_old; | ||
|
||
const ADVariableValue & _S; | ||
const ADVariableValue & _S_dot; | ||
}; |
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,20 @@ | ||
//* This file is part of the RACCOON application | ||
//* being developed at Dolbow lab at Duke University | ||
//* http://dolbow.pratt.duke.edu | ||
|
||
#pragma once | ||
|
||
#include "ADTimeDerivative.h" | ||
|
||
class ADSPFPressureTimeDerivative : public ADTimeDerivative | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
|
||
ADSPFPressureTimeDerivative(const InputParameters & parameters); | ||
|
||
protected: | ||
virtual ADReal precomputeQpResidual() override; | ||
|
||
const MaterialProperty<Real> & _M; | ||
}; |
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,23 @@ | ||
//* This file is part of the RACCOON application | ||
//* being developed at Dolbow lab at Duke University | ||
//* http://dolbow.pratt.duke.edu | ||
|
||
#pragma once | ||
|
||
#include "ADTimeKernel.h" | ||
|
||
class ADSPFVolStrTimeDerivative : public ADTimeKernel | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
|
||
ADSPFVolStrTimeDerivative(const InputParameters & parameters); | ||
|
||
protected: | ||
virtual ADReal computeQpResidual() override; | ||
|
||
const ADMaterialProperty<RankTwoTensor> & _strain; | ||
const MaterialProperty<RankTwoTensor> & _strain_old; | ||
|
||
const ADMaterialProperty<Real> & _alpha; | ||
}; |
Oops, something went wrong.