Skip to content
Snippets Groups Projects
Commit d9250cf8 authored by wenqing's avatar wenqing
Browse files

[M] Added an optional input for using the B bar method

parent 390f6b0f
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,9 @@ std::unique_ptr<Process> createSmallDeformationProcess(
std::copy_n(b.data(), b.size(), specific_body_force.data());
}
//! \ogs_file_param{prj__processes__process__SMALL_DEFORMATION__use_b_bar}
auto const use_b_bar = config.getConfigParameter<bool>("use_b_bar", false);
auto media_map =
MaterialPropertyLib::createMaterialSpatialDistributionMap(media, mesh);
DBUG(
......@@ -144,7 +147,8 @@ std::unique_ptr<Process> createSmallDeformationProcess(
std::move(solid_constitutive_relations),
initial_stress,
specific_body_force,
reference_temperature};
reference_temperature,
use_b_bar};
SecondaryVariableCollection secondary_variables;
......
......@@ -226,6 +226,20 @@ public:
"implemented.");
}
BBarMatrixType getDilatationalBBarMatrix() const
{
if (!(this->process_data_.use_b_bar))
{
return {};
}
return LinearBMatrix::computeDilatationalBbar<
DisplacementDim, ShapeFunction::NPOINTS, ShapeFunction,
BBarMatrixType, ShapeMatricesType, IpData>(
_ip_data, this->element_, this->integration_method_,
this->is_axially_symmetric_);
}
void assembleWithJacobian(double const t, double const dt,
std::vector<double> const& local_x,
std::vector<double> const& local_x_prev,
......@@ -256,11 +270,7 @@ public:
auto const& medium =
*this->process_data_.media_map.getMedium(this->element_.getID());
auto const B_dil_bar = LinearBMatrix::computeDilatationalBbar<
DisplacementDim, ShapeFunction::NPOINTS, ShapeFunction,
BBarMatrixType, ShapeMatricesType, IpData>(
_ip_data, this->element_, this->integration_method_,
this->is_axially_symmetric_);
auto const B_dil_bar = getDilatationalBBarMatrix();
for (unsigned ip = 0; ip < n_integration_points; ip++)
{
......@@ -312,11 +322,7 @@ public:
auto const& medium =
*this->process_data_.media_map.getMedium(this->element_.getID());
auto const B_dil_bar = LinearBMatrix::computeDilatationalBbar<
DisplacementDim, ShapeFunction::NPOINTS, ShapeFunction,
BBarMatrixType, ShapeMatricesType, IpData>(
_ip_data, this->element_, this->integration_method_,
this->is_axially_symmetric_);
auto const B_dil_bar = getDilatationalBBarMatrix();
for (unsigned ip = 0; ip < n_integration_points; ip++)
{
......
......@@ -51,6 +51,10 @@ struct SmallDeformationProcessData
ParameterLib::Parameter<double> const* const reference_temperature;
/// An indicator to use the B bar method \cite hughes1980generalization to
/// tackle the volumetric locking.
const bool use_b_bar;
std::array<MeshLib::PropertyVector<double>*, 3> principal_stress_vector = {
nullptr, nullptr, nullptr};
MeshLib::PropertyVector<double>* principal_stress_values = nullptr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment