Skip to content
Snippets Groups Projects
Commit cb0f0542 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[T] MC; Fix yield function value checks.

In the plastified cases it must be 0, in the elastic
case less than 0.
parent 27dd9cdc
No related branches found
No related tags found
No related merge requests found
......@@ -124,6 +124,7 @@ TEST(MaterialLib_Fracture, MohrCoulomb2D_elastic)
EXPECT_NEAR(0, C(0, 1), eps_C);
EXPECT_NEAR(0, C(1, 0), eps_C);
EXPECT_NEAR(0, C(1, 1), eps_C);
EXPECT_LE(state->getShearYieldFunctionValue(), 0);
}
TEST(MaterialLib_Fracture, MohrCoulomb2D_negative_t)
......@@ -165,6 +166,7 @@ TEST(MaterialLib_Fracture, MohrCoulomb2D_negative_t)
EXPECT_NEAR(1.26558e+10, C(0,1), eps_C);
EXPECT_NEAR(4.13226e+09, C(1,0), eps_C);
EXPECT_NEAR(4.72319e+10, C(1,1), eps_C);
EXPECT_NEAR(0, state->getShearYieldFunctionValue(), eps_sigma);
}
......@@ -201,13 +203,13 @@ TEST(MaterialLib_Fracture, MohrCoulomb2D_positive_t)
fractureModel.computeConstitutiveRelation(0, x, aperture0, sigma0, w_prev,
w, sigma_prev, sigma, C, *state);
ASSERT_NEAR(446608.0, state->getShearYieldFunctionValue(), eps_sigma);
EXPECT_NEAR(253972.0, sigma[0], eps_sigma);
EXPECT_NEAR(-2.94784e+06, sigma[1], eps_sigma);
EXPECT_NEAR(1.10723e+09, C(0, 0), eps_C);
EXPECT_NEAR(-1.26558e+10, C(0, 1), eps_C);
EXPECT_NEAR(-4.13226e+09, C(1, 0), eps_C);
EXPECT_NEAR(4.72319e+10, C(1, 1), eps_C);
EXPECT_NEAR(0, state->getShearYieldFunctionValue(), eps_sigma);
}
TEST(MaterialLib_Fracture, MohrCoulomb3D_negative_t1)
......@@ -243,7 +245,6 @@ TEST(MaterialLib_Fracture, MohrCoulomb3D_negative_t1)
fractureModel.computeConstitutiveRelation(0, x, aperture0, sigma0, w_prev,
w, sigma_prev, sigma, C, *state);
ASSERT_NEAR(1.06608E+5, state->getShearYieldFunctionValue(), eps_sigma);
EXPECT_NEAR(-3.50360e6, sigma[0], eps_sigma);
EXPECT_NEAR(0.0, sigma[1], eps_sigma);
EXPECT_NEAR(-2.16271e6, sigma[2], eps_sigma);
......@@ -256,6 +257,7 @@ TEST(MaterialLib_Fracture, MohrCoulomb3D_negative_t1)
EXPECT_NEAR(4.13226e+09, C(2, 0), eps_C);
EXPECT_NEAR(0.0, C(2, 1), eps_C);
EXPECT_NEAR(4.72319e+10, C(2, 2), eps_C);
EXPECT_NEAR(0, state->getShearYieldFunctionValue(), eps_sigma);
}
TEST(MaterialLib_Fracture, MohrCoulomb3D_positive_t1)
......@@ -291,7 +293,6 @@ TEST(MaterialLib_Fracture, MohrCoulomb3D_positive_t1)
fractureModel.computeConstitutiveRelation(0, x, aperture0, sigma0, w_prev,
w, sigma_prev, sigma, C, *state);
ASSERT_NEAR(446608.0, state->getShearYieldFunctionValue(), eps_sigma);
EXPECT_NEAR(253972.0, sigma[0], eps_sigma);
EXPECT_NEAR(0.0, sigma[1], eps_sigma);
EXPECT_NEAR(-2.94784e+06, sigma[2], eps_sigma);
......@@ -304,6 +305,7 @@ TEST(MaterialLib_Fracture, MohrCoulomb3D_positive_t1)
EXPECT_NEAR(-4.13226e+09, C(2, 0), eps_C);
EXPECT_NEAR(0.0, C(2, 1), eps_C);
EXPECT_NEAR(4.72319e+10, C(2, 2), eps_C);
EXPECT_NEAR(0, state->getShearYieldFunctionValue(), eps_sigma);
}
......@@ -340,7 +342,6 @@ TEST(MaterialLib_Fracture, MohrCoulomb3D_positive_t2)
fractureModel.computeConstitutiveRelation(0, x, aperture0, sigma0, w_prev,
w, sigma_prev, sigma, C, *state);
ASSERT_NEAR(446608.0, state->getShearYieldFunctionValue(), eps_sigma);
EXPECT_NEAR(0.0, sigma[0], eps_sigma);
EXPECT_NEAR(253972.0, sigma[1], eps_sigma);
EXPECT_NEAR(-2.94784e+06, sigma[2], eps_sigma);
......@@ -353,6 +354,7 @@ TEST(MaterialLib_Fracture, MohrCoulomb3D_positive_t2)
EXPECT_NEAR(0.0, C(2, 0), eps_C);
EXPECT_NEAR(-4.13226e+09, C(2, 1), eps_C);
EXPECT_NEAR(4.72319e+10, C(2, 2), eps_C);
EXPECT_NEAR(0, state->getShearYieldFunctionValue(), eps_sigma);
}
......@@ -389,7 +391,6 @@ TEST(MaterialLib_Fracture, MohrCoulomb3D_negative_t1t2)
fractureModel.computeConstitutiveRelation(0, x, aperture0, sigma0, w_prev,
w, sigma_prev, sigma, C, *state);
ASSERT_NEAR(1.06608E+5, state->getShearYieldFunctionValue(), eps_sigma);
EXPECT_NEAR(-3.50360e6 / std::sqrt(2), sigma[0], eps_sigma);
EXPECT_NEAR(-3.50360e6 / std::sqrt(2), sigma[1], eps_sigma);
EXPECT_NEAR(-2.16271e6, sigma[2], eps_sigma);
......@@ -402,6 +403,7 @@ TEST(MaterialLib_Fracture, MohrCoulomb3D_negative_t1t2)
EXPECT_NEAR(2.92195e+09, C(2, 0), eps_C);
EXPECT_NEAR(2.92195e+09, C(2, 1), eps_C);
EXPECT_NEAR(4.72319e+10, C(2, 2), eps_C);
EXPECT_NEAR(0, state->getShearYieldFunctionValue(), eps_sigma);
}
......@@ -439,7 +441,6 @@ TEST(MaterialLib_Fracture, MohrCoulomb3D_negative_t1_positive_t2)
fractureModel.computeConstitutiveRelation(0, x, aperture0, sigma0, w_prev,
w, sigma_prev, sigma, C, *state);
ASSERT_NEAR(1.06608E+5, state->getShearYieldFunctionValue(), eps_sigma);
EXPECT_NEAR(-3.50360e6 / std::sqrt(2), sigma[0], eps_sigma);
EXPECT_NEAR(3.50360e6 / std::sqrt(2), sigma[1], eps_sigma);
EXPECT_NEAR(-2.16271e6, sigma[2], eps_sigma);
......@@ -452,5 +453,6 @@ TEST(MaterialLib_Fracture, MohrCoulomb3D_negative_t1_positive_t2)
EXPECT_NEAR(2.92195e+09, C(2, 0), eps_C);
EXPECT_NEAR(-2.92195e+09, C(2, 1), eps_C);
EXPECT_NEAR(4.72319e+10, C(2, 2), eps_C);
EXPECT_NEAR(0, state->getShearYieldFunctionValue(), eps_sigma);
}
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