Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Dec 1, 2024
1 parent a7fcb05 commit dee8884
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Material/Material3D/Concrete/NonlinearCDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,21 @@ int NonlinearCDP::update_trial_status(const vec& t_strain) {

trial_stress = (trial_stiffness = initial_stiffness) * (trial_strain - plastic_strain); // 6

vec principal_stress; // 3
mat principal_direction; // 3x3
vec3 principal_stress; // 3
mat33 principal_direction; // 3x3
if(!eig_sym(principal_stress, principal_direction, tensor::stress::to_tensor(trial_stress), "std")) return SUANPAN_FAIL;

const auto trans = transform::compute_jacobian_nominal_to_principal(principal_direction);

const auto s = tensor::dev(trial_stress); // 6
const auto norm_s = tensor::stress::norm(s); // 1
vec n = s / norm_s; // 6
vec6 n = s / norm_s; // 6
if(!n.is_finite()) n.zeros();

const auto ps = tensor::dev(principal_stress); // 3
const vec pn = normalise(ps); // 3
const vec3 pn = normalise(ps); // 3

const vec dsigmadlambda = -double_shear * pn - three_alpha_p_bulk; // 6
const vec3 dsigmadlambda = -double_shear * pn - three_alpha_p_bulk; // 3

const auto dgdsigma_t = (pn(2) + alpha_p) / g_t;
const auto dgdsigma_c = (pn(0) + alpha_p) / g_c;
Expand All @@ -94,8 +94,8 @@ int NonlinearCDP::update_trial_status(const vec& t_strain) {

const auto const_yield = alpha * accu(principal_stress) + root_three_two * norm_s;

vec residual(3), incre;
mat jacobian(3, 3, fill::zeros);
vec3 residual, incre;
mat33 jacobian(fill::zeros);

podarray<double> t_para, c_para;

Expand All @@ -113,7 +113,7 @@ int NonlinearCDP::update_trial_status(const vec& t_strain) {
t_para = compute_tension_backbone(kappa_t);
c_para = compute_compression_backbone(kappa_c);

const auto tension_flag = max_stress > 0.;
const auto tension_flag = max_stress > datum::eps;

beta = -one_minus_alpha * c_para(2) / t_para(2) - alpha - 1.;

Expand Down

0 comments on commit dee8884

Please sign in to comment.