OGS
ProcessLib::SmallDeformationNonlocal Namespace Reference

Classes

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

Functions

template<int DisplacementDim>
std::unique_ptr< ProcesscreateSmallDeformationNonlocalProcess (std::string const &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 const &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 const &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, 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 {
65 if (r_s < 0)
66 {
67 return 1.;
68 }
69 if (r_s <= 1)
70 {
71 return 1. + h_d * r_s * r_s;
72 }
73 return 1. - 3 * h_d + 4 * h_d * std::sqrt(r_s);
74 }(h_d, r_s);
75
76 return kappa_d_prev + eps_p_eff_diff / x_s;
77}
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 const & 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

Process Variables

Input File Parameter
prj__processes__process__SMALL_DEFORMATION_NONLOCAL__process_variables

Primary process variables as they appear in the global component vector:

Input File Parameter
prj__processes__process__SMALL_DEFORMATION_NONLOCAL__process_variables__process_variable

Process Parameters

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

◆ createSmallDeformationNonlocalProcess< 2 >()

template std::unique_ptr< Process > ProcessLib::SmallDeformationNonlocal::createSmallDeformationNonlocalProcess< 2 > ( std::string const & 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 const & 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 )