Skip to content

Commit

Permalink
Fatigue, porous flow, multi-phase flow, and more
Browse files Browse the repository at this point in the history
- benchmark pressurized fracture added
- fatigue benchmark problem added
- documentation files added hugary1995#98
- tutorial example for hydraulic fracturing is ready
  • Loading branch information
rrezakhani authored and hugary1995 committed Oct 13, 2021
1 parent f53140e commit 9d15280
Show file tree
Hide file tree
Showing 40 changed files with 1,753 additions and 64 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ temp_print_trace.*
*.json
*.bak
*.processor.*
*.directory
.clang_complete
.failed_tests
compile_commands.json
Expand Down
44 changes: 44 additions & 0 deletions benchmarks/soil_desiccation/dimensionless_curve.py
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()
11 changes: 11 additions & 0 deletions doc/content/source/kernels/ADAnisotropicDiffusion.md
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
11 changes: 11 additions & 0 deletions doc/content/source/kernels/ADPoroMechanicsCoupling.md
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
11 changes: 11 additions & 0 deletions doc/content/source/kernels/ADPorousFlowTimeDerivative.md
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
11 changes: 11 additions & 0 deletions doc/content/source/kernels/ADSPFPressureTimeDerivative.md
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
11 changes: 11 additions & 0 deletions doc/content/source/kernels/ADSPFVolStrTimeDerivative.md
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
20 changes: 20 additions & 0 deletions doc/content/source/materials/ADComputeCrackOpening.md
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
19 changes: 19 additions & 0 deletions doc/content/source/materials/ADComputeFluidMobility.md
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
20 changes: 20 additions & 0 deletions doc/content/source/materials/ADComputePorosity.md
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
42 changes: 42 additions & 0 deletions include/diracKernel/DiracSource.h
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;
};
28 changes: 28 additions & 0 deletions include/ics/PhasefieldShapes.h
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;
};
24 changes: 24 additions & 0 deletions include/kernels/ADAnisotropicDiffusion.h
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;
};
27 changes: 27 additions & 0 deletions include/kernels/ADPoroMechanicsCoupling.h
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;
};
24 changes: 24 additions & 0 deletions include/kernels/ADPorousFlowTimeDerivative.h
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;
};
20 changes: 20 additions & 0 deletions include/kernels/ADSPFPressureTimeDerivative.h
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;
};
23 changes: 23 additions & 0 deletions include/kernels/ADSPFVolStrTimeDerivative.h
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;
};
Loading

0 comments on commit 9d15280

Please sign in to comment.