OGS
ProcessLib::SmallDeformationNonlocal Namespace Reference

Classes

struct  IntegrationPointData
 
struct  NonlocalIP
 
struct  IntegrationPointDataNonlocalInterface
 
struct  SmallDeformationNonlocalLocalAssemblerInterface
 
struct  SecondaryData
 
class  SmallDeformationNonlocalLocalAssembler
 
class  SmallDeformationNonlocalProcess
 
struct  SmallDeformationNonlocalProcessData
 

Functions

template<int DisplacementDim>
std::unique_ptr< ProcesscreateSmallDeformationNonlocalProcess (std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
 
template std::unique_ptr< ProcesscreateSmallDeformationNonlocalProcess< 2 > (std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
 
template std::unique_ptr< ProcesscreateSmallDeformationNonlocalProcess< 3 > (std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
 
double calculateDamage (double const kappa_d, double const alpha_d, double const beta_d)
 
template<int DisplacementDim, typename KelvinVectorType >
double calculateDamageKappaD (double const eps_p_eff_diff, KelvinVectorType const &sigma, double const kappa_d_prev, double const h_d, MaterialLib::Solids::Ehlers::MaterialProperties const &mp)
 

Function Documentation

◆ calculateDamage()

double ProcessLib::SmallDeformationNonlocal::calculateDamage ( double const  kappa_d,
double const  alpha_d,
double const  beta_d 
)
inline

Computes the damage internal material variable explicitly based on the results obtained from the local stress return algorithm.

Definition at line 25 of file Damage.h.

27 {
28  double const damage = (1 - beta_d) * (1 - std::exp(-kappa_d / alpha_d));
29 
30  if (damage < 0. || damage >= 1.)
31  {
32  OGS_FATAL("Damage value {:g} outside of [0,1) interval.", damage);
33  }
34 
35  return damage;
36 }
#define OGS_FATAL(...)
Definition: Error.h:26

References OGS_FATAL.

Referenced by ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, IntegrationMethod, DisplacementDim >::assembleWithJacobian().

◆ calculateDamageKappaD()

template<int DisplacementDim, typename KelvinVectorType >
double ProcessLib::SmallDeformationNonlocal::calculateDamageKappaD ( double const  eps_p_eff_diff,
KelvinVectorType const &  sigma,
double const  kappa_d_prev,
double const  h_d,
MaterialLib::Solids::Ehlers::MaterialProperties const &  mp 
)

Definition at line 39 of file Damage.h.

45 {
46  // Default case of the rate problem. Updated below if volumetric plastic
47  // strain rate is positive (dilatancy).
48 
49  // non-const for Eigen solver.
50  auto sigma_tensor = MathLib::KelvinVector::kelvinVectorToTensor(sigma);
51 
52  Eigen::EigenSolver<decltype(sigma_tensor)> eigen_solver(sigma_tensor);
53  auto const principal_stress = real(eigen_solver.eigenvalues().array());
54  double const prod_stress = std::sqrt(principal_stress.square().sum());
55 
56  // Brittleness decrease with confinement for the nonlinear flow rule.
57  // ATTENTION: For linear flow rule -> constant brittleness.
58  double const tensile_strength =
59  std::sqrt(3.0) * mp.kappa / (1 + std::sqrt(3.0) * mp.beta);
60  double const r_s = prod_stress / tensile_strength - 1.;
61 
62  // Compute normalizing strain.
63  double const x_s = [](double const h_d, double const r_s) {
64  if (r_s < 0)
65  {
66  return 1.;
67  }
68  if (r_s <= 1)
69  {
70  return 1. + h_d * r_s * r_s;
71  }
72  return 1. - 3 * h_d + 4 * h_d * std::sqrt(r_s);
73  }(h_d, r_s);
74 
75  return kappa_d_prev + eps_p_eff_diff / x_s;
76 }
Eigen::Matrix< double, 3, 3 > kelvinVectorToTensor(Eigen::Matrix< double, 4, 1, Eigen::ColMajor, 4, 1 > const &v)

References MaterialLib::Solids::Ehlers::MaterialProperties::beta, MaterialLib::Solids::Ehlers::MaterialProperties::kappa, and MathLib::KelvinVector::kelvinVectorToTensor().

◆ createSmallDeformationNonlocalProcess()

template<int DisplacementDim>
std::unique_ptr< Process > ProcessLib::SmallDeformationNonlocal::createSmallDeformationNonlocalProcess ( std::string  name,
MeshLib::Mesh mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&  jacobian_assembler,
std::vector< ProcessVariable > const &  variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters,
std::optional< ParameterLib::CoordinateSystem > const &  local_coordinate_system,
unsigned const  integration_order,
BaseLib::ConfigTree const &  config 
)
Input File Parameter:
prj__processes__process__type
Input File Parameter:
prj__processes__process__SMALL_DEFORMATION_NONLOCAL__process_variables
Input File Parameter:
prj__processes__process__SMALL_DEFORMATION_NONLOCAL__process_variables__process_variable
Input File Parameter:
prj__processes__process__SMALL_DEFORMATION_NONLOCAL__solid_density
Input File Parameter:
prj__processes__process__SMALL_DEFORMATION_NONLOCAL__specific_body_force
Input File Parameter:
prj__processes__process__SMALL_DEFORMATION_NONLOCAL__reference_temperature
Input File Parameter:
prj__processes__process__SMALL_DEFORMATION_NONLOCAL__internal_length

Definition at line 27 of file CreateSmallDeformationNonlocalProcess.cpp.

37 {
39  config.checkConfigParameter("type", "SMALL_DEFORMATION_NONLOCAL");
40  DBUG("Create SmallDeformationNonlocalProcess.");
41 
42  // Process variable.
43 
45  auto const pv_config = config.getConfigSubtree("process_variables");
46 
47  auto per_process_variables = findProcessVariables(
48  variables, pv_config,
49  {
50  "process_variable"});
51 
52  DBUG("Associate displacement with process variable '{:s}'.",
53  per_process_variables.back().get().getName());
54 
55  if (per_process_variables.back().get().getNumberOfGlobalComponents() !=
56  DisplacementDim)
57  {
58  OGS_FATAL(
59  "Number of components of the process variable '{:s}' is different "
60  "from the displacement dimension: got {:d}, expected {:d}",
61  per_process_variables.back().get().getName(),
62  per_process_variables.back().get().getNumberOfGlobalComponents(),
63  DisplacementDim);
64  }
65  std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
66  process_variables;
67  process_variables.push_back(std::move(per_process_variables));
68 
69  auto solid_constitutive_relations =
70  MaterialLib::Solids::createConstitutiveRelations<DisplacementDim>(
71  parameters, local_coordinate_system, config);
72 
73  // Solid density
74  auto const& solid_density = ParameterLib::findParameter<double>(
75  config,
77  "solid_density", parameters, 1, &mesh);
78  DBUG("Use '{:s}' as solid density parameter.", solid_density.name);
79 
80  // Specific body force
81  Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
82  {
83  std::vector<double> const b =
85  config.getConfigParameter<std::vector<double>>(
86  "specific_body_force");
87  if (b.size() != DisplacementDim)
88  {
89  OGS_FATAL(
90  "The size of the specific body force vector does not match the "
91  "displacement dimension. Vector size is {:d}, displacement "
92  "dimension is {:d}",
93  b.size(), DisplacementDim);
94  }
95 
96  std::copy_n(b.data(), b.size(), specific_body_force.data());
97  }
98 
99  // Reference temperature
100  const auto& reference_temperature =
102  config.getConfigParameter<double>(
103  "reference_temperature", std::numeric_limits<double>::quiet_NaN());
104 
105  auto const internal_length =
107  config.getConfigParameter<double>("internal_length");
108 
109  SmallDeformationNonlocalProcessData<DisplacementDim> process_data{
110  materialIDs(mesh), std::move(solid_constitutive_relations),
111  solid_density, specific_body_force,
112  reference_temperature, internal_length * internal_length};
113 
114  SecondaryVariableCollection secondary_variables;
115 
116  ProcessLib::createSecondaryVariables(config, secondary_variables);
117 
118  return std::make_unique<SmallDeformationNonlocalProcess<DisplacementDim>>(
119  std::move(name), mesh, std::move(jacobian_assembler), parameters,
120  integration_order, std::move(process_variables),
121  std::move(process_data), std::move(secondary_variables));
122 }
void DBUG(char const *fmt, Args const &... args)
Definition: Logging.h:27
PropertyVector< int > const * materialIDs(Mesh const &mesh)
Definition: Mesh.cpp:258
std::vector< std::reference_wrapper< ProcessVariable > > findProcessVariables(std::vector< ProcessVariable > const &variables, BaseLib::ConfigTree const &pv_config, std::initializer_list< std::string > tags)
void createSecondaryVariables(BaseLib::ConfigTree const &config, SecondaryVariableCollection &secondary_variables)

References BaseLib::ConfigTree::checkConfigParameter(), ProcessLib::createSecondaryVariables(), DBUG(), ProcessLib::findProcessVariables(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigSubtree(), MeshLib::materialIDs(), MaterialPropertyLib::name, OGS_FATAL, and MaterialPropertyLib::reference_temperature.

◆ createSmallDeformationNonlocalProcess< 2 >()

template std::unique_ptr< Process > ProcessLib::SmallDeformationNonlocal::createSmallDeformationNonlocalProcess< 2 > ( std::string  name,
MeshLib::Mesh mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&  jacobian_assembler,
std::vector< ProcessVariable > const &  variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters,
std::optional< ParameterLib::CoordinateSystem > const &  local_coordinate_system,
unsigned const  integration_order,
BaseLib::ConfigTree const &  config 
)

◆ createSmallDeformationNonlocalProcess< 3 >()

template std::unique_ptr< Process > ProcessLib::SmallDeformationNonlocal::createSmallDeformationNonlocalProcess< 3 > ( std::string  name,
MeshLib::Mesh mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&  jacobian_assembler,
std::vector< ProcessVariable > const &  variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters,
std::optional< ParameterLib::CoordinateSystem > const &  local_coordinate_system,
unsigned const  integration_order,
BaseLib::ConfigTree const &  config 
)