Skip to content

Commit

Permalink
improving coverage for concrete ASR related objects (ref idaholab#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
jain651 authored and jain651 committed Dec 6, 2021
1 parent 4f2c551 commit 84af787
Show file tree
Hide file tree
Showing 15 changed files with 241 additions and 82 deletions.
2 changes: 1 addition & 1 deletion include/materials/ConcreteExpansionEigenstrainBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class ConcreteExpansionEigenstrainBase : public ComputeEigenstrainBase
* @param sig Stress
* @return index
*/
int findNeighborIndex(Real sig);
unsigned int findNeighborIndex(Real sig);

/**
* Determine the term of the A or B vector in Equation 17 of Saouma and Perotti
Expand Down
6 changes: 2 additions & 4 deletions src/materials/ConcreteASREigenstrain.C
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ ConcreteASREigenstrain::computeResidual(unsigned qp, Real scalar)
else // hydrostatic compression: retarding ASR rection
{
f = 1.0 + _alpha * I_sigma / (3.0 * -_f_compress);
if (f < 1.0)
mooseError("Wrong retardation for ASR latency time calculation!");
mooseAssert("f >= 1.0", "Wrong retardation for ASR latency time calculation!");
}
}
else
Expand Down Expand Up @@ -301,8 +300,7 @@ ConcreteASREigenstrain::computeDerivative(unsigned qp, Real scalar)
else // hydrostatic compression: retarding ASR rection
{
f = 1.0 + _alpha * I_sigma / (3.0 * -_f_compress);
if (f < 1.0)
mooseError("Wrong retardation for ASR latency time calculation!");
mooseAssert("f >= 1.0", "Wrong retardation for ASR latency time calculation!");
}
}
else
Expand Down
25 changes: 11 additions & 14 deletions src/materials/ConcreteExpansionEigenstrainBase.C
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ ConcreteExpansionEigenstrainBase::ConcreteExpansionEigenstrainBase(
if (_expansion_type == ExpansionType::Anisotropic)
{
if (!parameters.isParamSetByUser("compressive_strength"))
paramError("compressive_strength", "parameter is required for expansion_type = Anisotropic");
paramError("compressive_strength",
"compressive_strength is required for expansion_type = Anisotropic");
if (!parameters.isParamSetByUser("expansion_stress_limit"))
paramError("expansion_stress_limit",
"parameter is required for expansion_type = Anisotropic");
"expansion_stress_limit is required for expansion_type = Anisotropic");
if (!parameters.isParamSetByUser("tensile_strength"))
paramError("tensile_strength", "parameter is required for expansion_type = Anisotropic");
paramError("tensile_strength",
"tensile_strength is required for expansion_type = Anisotropic");
}

// Initialize triaxial weight table
Expand Down Expand Up @@ -165,17 +167,15 @@ ConcreteExpansionEigenstrainBase::weight(Real sig_l, Real sig_m, Real sig_k)
return computeW(N1, N2, N3, N4, N5, N6, a, b, sig_l, sig_m, sig_k);
}

int
unsigned int
ConcreteExpansionEigenstrainBase::findNeighborIndex(Real sig)
{
if (sig <= -_sigma_u)
return 2;
else if (sig > -_sigma_u && sig <= 0)
return 1;
else if (sig > 0)
return 0;
else
mooseError("Invalid value for sig.");
return 0;
}

Real
Expand All @@ -184,16 +184,13 @@ ConcreteExpansionEigenstrainBase::computeAB(const Real ab1,
const Real ab3,
const unsigned int pbound)
{
Real ab;
mooseAssert("pbound <= 2", "pbound outside allowed range");
if (pbound == 0)
ab = ab1;
return ab1;
else if (pbound == 1)
ab = ab2;
else if (pbound == 2)
ab = ab3;
return ab2;
else
mooseError("Invalid value for pbound. Got ", pbound, ", expected 0, 1, or 2.");
return ab;
return ab3;
}

Real
Expand Down
11 changes: 7 additions & 4 deletions src/materials/ConcreteExpansionMicrocrackingDamage.C
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,11 @@ ConcreteExpansionMicrocrackingDamage::computeLinearExpansion(const RankTwoTensor
return std::max(0.0, strain(0, 0) * _eigenstrain_factor);

// otherwise we use the principal expansion directions
strain.symmetricEigenvalues(_eigenvalues);
return std::max(std::max(0.0, _eigenvalues[0] * _eigenstrain_factor),
std::max(std::max(0.0, _eigenvalues[1] * _eigenstrain_factor),
std::max(0.0, _eigenvalues[2] * _eigenstrain_factor)));
else
{
strain.symmetricEigenvalues(_eigenvalues);
return std::max(std::max(0.0, _eigenvalues[0] * _eigenstrain_factor),
std::max(std::max(0.0, _eigenvalues[1] * _eigenstrain_factor),
std::max(0.0, _eigenvalues[2] * _eigenstrain_factor)));
}
}
36 changes: 36 additions & 0 deletions test/tests/concrete_ASR_swelling/asr_confined_kelvin.cmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
COORDINATES absolute 1.e-6 # min separation not calculated

TIME STEPS relative 1.e-6 floor 0.0 # min: 0 @ t1 max: 500 @ t6


# No GLOBAL VARIABLES

NODAL VARIABLES relative 1.e-5 floor 1.e-10
contact_pressure relative 1.e-4 # min: 0 @ t1,n1 max: 865610.43 @ t6,n4
disp_x # min: 0 @ t1,n1 max: 6.5003353e-06 @ t6,n48
disp_y # min: 0 @ t1,n1 max: 1.5779584e-06 @ t6,n1
nodal_area_leftright # min: 0 @ t1,n2 max: 0.00061261057 @ t1,n1
penetration # min: 0 @ t1,n1 max: 1.2681453e-11 @ t6,n4

ELEMENT VARIABLES relative 1.e-5 floor 1.e-10
stress_xx # min: 0 @ t1,b1,e1 max: 858917.53 @ t6,b1,e1
stress_yy floor 10.0 # min: 0 @ t1,b1,e1 max: 19997480 @ t2,b1,e1
stress_zz # min: 0 @ t1,b1,e1 max: 18601279 @ t6,b2,e23
stress_xy relative 1.e-2 floor 1.0 # min: 0 @ t1,b1,e1 max: 3462.2872 @ t6,b2,e23
stress_yz # min: 0 @ t1,b1,e1 max: 0 @ t1,b1,e1
stress_zx # min: 0 @ t1,b1,e1 max: 0 @ t1,b1,e1
ASR_ex # min: 0 @ t1,b1,e1 max: 7.947504e-06 @ t6,b1,e2
ASR_vstrain # min: 0 @ t1,b1,e1 max: 1.6310732e-08 @ t6,b1,e2
ASR_strain_xx # min: 0 @ t1,b1,e1 max: 6.9259599e-09 @ t6,b1,e2
ASR_strain_yy # min: 0 @ t1,b1,e1 max: 2.4583968e-09 @ t6,b1,e1
ASR_strain_zz # min: 0 @ t1,b1,e1 max: 6.9263808e-09 @ t6,b1,e2
ASR_strain_xy # min: 0 @ t1,b1,e1 max: 7.1325043e-13 @ t6,b1,e1
ASR_strain_yz # min: 0 @ t1,b1,e1 max: 0 @ t1,b1,e1
ASR_strain_zx # min: 0 @ t1,b1,e1 max: 0 @ t1,b1,e1
total_strain_zz # min: 0 @ t1,b1,e1 max: 9.9985036e-05 @ t6,b1,e3
total_strain_xx # min: 0 @ t1,b1,e1 max: 9.9995609e-05 @ t6,b1,e1
total_strain_yy # min: 0 @ t1,b1,e1 max: 0.00052599114 @ t6,b1,e1

# No NODESET VARIABLES

# No SIDESET VARIABLES
Binary file not shown.
29 changes: 27 additions & 2 deletions test/tests/concrete_ASR_swelling/tests
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@
custom_cmp = 'asr_confined.cmp'
detail = 'with anisotropic expansion strains, '
[]

[test_strip_kelvin]
type = 'Exodiff'
input = 'asr_confined.i'
exodiff = 'asr_confined_strip_out.e'
cli_args = 'AuxVariables/T/initial_condition=308.15 '
'Materials/ASR_expansion/temperature_unit=Kelvin '
'Materials/ASR_expansion/reference_temperature=308.15 '
'Materials/thermal_strain_concrete/stress_free_temperature=308.15 '
'Materials/thermal_strain_steel/stress_free_temperature=308.15 '
custom_cmp = 'asr_confined_kelvin.cmp'
detail = 'with anisotropic expansion strains and temperature in Kelvin unit, '
[]
[test_strip_isotropic]
type = 'Exodiff'
input = 'asr_confined.i'
Expand All @@ -24,7 +35,13 @@
custom_cmp = 'asr_confined.cmp'
detail = 'with isotropic expansion strains, '
[]

[test_strip_in_tension]
type = 'RunApp'
input = 'asr_confined.i'
cli_args = 'BCs/axial_load/value=10e6 '
'Outputs/file_base=asr_confined_strip_in_tension_out'
detail = 'with uniaxial tenile loading, '
[]
[test_full]
type = 'Exodiff'
input = 'asr_confined.i'
Expand All @@ -36,4 +53,12 @@
detail = 'and with a mesh that captures a larger axial region of the cylinder.'
[]
[]
[max_it_error]
type = 'RunException'
input = 'asr_confined.i'
max_time = 5
cli_args = 'Materials/ASR_expansion/max_its=2 Materials/ASR_expansion/output_iteration_info_on_error=true Materials/ASR_expansion/output_iteration_info=true'
expect_err = "Max material iteration hit during nonlinear constitutive model solve!"
requirement = 'Blackbear shall produce an error message when number of iterations exceeds max_its during the volumeteric strain residual calculation '
[]
[]
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@
boundary = back
value = 0
[../]

[./load_x]
type = NeumannBC
variable = disp_x
Expand All @@ -199,28 +198,21 @@
[stress]
type = ComputeLinearElasticStress
[]

[./concrete]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 30e9
poissons_ratio = 0.2
[../]

[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'concrete_expansion'
[../]

[concrete_expansion]
type = TestConcreteExpansionEigenstrain
expansion_type = Anisotropic
function = expansion_vs_time
eigenstrain_name = concrete_expansion

compressive_strength = 30e6
tensile_strength = 3e6
expansion_stress_limit = 10e6
[]
[]

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
time,expansion_strain_xx,expansion_strain_yy,expansion_strain_zz,expansion_vol_strain,strain_xx,strain_yy,strain_zz,stress_xx,stress_yy,stress_zz
0,0,0,0,0,0,0,0,0,0,0
0.0001,0,0,0,0,-0.0016655568500029,0.00033311137000059,0.00033311137000059,-49966705.500088,1.1641532182693e-09,1.3969838619232e-09
0.0002,4.0407154020135e-37,5e-05,5e-05,0.0001,-0.0016653904730541,0.00038307809461086,0.00038307809461086,-49961714.191624,1.1996598914266e-06,1.2002419680357e-06
0.0003,8.8894966257367e-37,0.0001,0.0001,0.0002,-0.0016652241210173,0.00043304482420349,0.00043304482420349,-49956723.630519,1.1994270607829e-06,1.1990778148174e-06
0.0004,3.5254263760279e-36,0.00015,0.00015,0.0003,-0.0016650577938874,0.00048301155877751,0.00048301155877751,-49951733.816622,1.2001255527139e-06,1.200707629323e-06
0.0005,4.3078694856466e-36,0.0002,0.0002,0.0004,-0.0016648914916595,0.00053297829833194,0.00053297829833194,-49946744.749786,1.1991360224783e-06,1.1972151696682e-06
0.0006,5.0447289533329e-36,0.00025,0.00025,0.0005,-0.0016647252143287,0.00058294504286576,0.00058294504286576,-49941756.42986,1.2006494216621e-06,1.2002419680357e-06
0.0007,6.0356005287523e-36,0.0003,0.0003,0.0006,-0.0016645589618899,0.000632911792378,0.000632911792378,-49936768.856696,1.2008240446448e-06,1.1993106454611e-06
0.0008,7.1415772009698e-36,0.00035,0.00035,0.0007,-0.0016643927343382,0.00068287854686766,0.00068287854686766,-49931782.030144,1.2018135748804e-06,1.2016389518976e-06
0.0009,7.9626511844921e-36,0.0004,0.0004,0.0008,-0.0016642265316686,0.00073284530633375,0.00073284530633375,-49926795.950057,1.1936645023525e-06,1.1934898793697e-06
0.001,8.7016754749121e-36,0.00045,0.00045,0.0009,-0.0016640603538762,0.00078281207077527,0.00078281207077527,-49921810.616285,1.1992524378002e-06,1.1960510164499e-06
0.0011,9.8374790946429e-36,0.0005,0.0005,0.001,-0.001663894200956,0.00083277884019123,0.00083277884019123,-49916826.028679,1.2004747986794e-06,1.1988449841738e-06
Loading

0 comments on commit 84af787

Please sign in to comment.