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 3, 2021
1 parent c4328fc commit 4010721
Show file tree
Hide file tree
Showing 11 changed files with 207 additions and 74 deletions.
4 changes: 2 additions & 2 deletions src/materials/ConcreteASREigenstrain.C
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ ConcreteASREigenstrain::computeResidual(unsigned qp, Real scalar)
{
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 @@ -302,7 +302,7 @@ ConcreteASREigenstrain::computeDerivative(unsigned qp, Real scalar)
{
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
29 changes: 20 additions & 9 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 @@ -172,10 +174,13 @@ ConcreteExpansionEigenstrainBase::findNeighborIndex(Real sig)
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;
// else if (sig > 0)
// return 0;
// else
// mooseAssert("Invalid value for sig.");
mooseAssert("sig not real", "sig not real");
}

Real
Expand All @@ -189,10 +194,16 @@ ConcreteExpansionEigenstrainBase::computeAB(const Real ab1,
ab = ab1;
else if (pbound == 1)
ab = ab2;
else if (pbound == 2)
ab = ab3;
else
mooseError("Invalid value for pbound. Got ", pbound, ", expected 0, 1, or 2.");
ab = ab3;

// else if (pbound == 2)
// ab = ab3;
// else
// mooseAssert("Invalid value for pbound. Got ", pbound, ", expected 0, 1, or 2.");

// mooseAssert("pbound > 2 or pbound < 0", "pbound can only be 0 1 2");

return ab;
}

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)));
}
}
37 changes: 37 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,37 @@
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
# T # min: 35 @ t1,n1 max: 35 @ t1,n1
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
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,19 @@
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 '
'Outputs/file_base=asr_confined_strip_kelvin_out'
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 +36,12 @@
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 '
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
93 changes: 73 additions & 20 deletions test/tests/concrete_anisotropic_eigenstrain/tests
Original file line number Diff line number Diff line change
Expand Up @@ -12,73 +12,126 @@
input = 'concrete_anisotropic_eigenstrain.i'
csvdiff = 'concrete_free_expansion_out.csv'
abs_zero = 1e-5
cli_args = 'Outputs/file_base=concrete_free_expansion_out'
cli_args = 'Materials/concrete_expansion/compressive_strength=30e6
Materials/concrete_expansion/tensile_strength=3e6
Materials/concrete_expansion/expansion_stress_limit=10e6
Outputs/file_base=concrete_free_expansion_out'
allow_test_objects = True
detail = 'under free expansion conditions, '
[]

[concrete_expansion_load_5]
type = 'CSVDiff'
input = 'concrete_anisotropic_eigenstrain.i'
csvdiff = 'concrete_expansion_load_5_out.csv'
abs_zero = 1e-5
cli_args = 'BCs/load_x/value=-5e6 Outputs/file_base=concrete_expansion_load_5_out'
cli_args = 'Materials/concrete_expansion/compressive_strength=30e6
Materials/concrete_expansion/tensile_strength=3e6
Materials/concrete_expansion/expansion_stress_limit=10e6
BCs/load_x/value=-5e6
Outputs/file_base=concrete_expansion_load_5_out'
allow_test_objects = True
detail = 'with a 5 MPa compressive pressure in the x direction, '
[]

[concrete_expansion_load_10]
[concrete_expansion_load_50]
type = 'CSVDiff'
input = 'concrete_anisotropic_eigenstrain.i'
csvdiff = 'concrete_expansion_load_10_out.csv'
csvdiff = 'concrete_expansion_load_50_out.csv'
abs_zero = 1e-5
cli_args = 'BCs/load_x/value=-10e6 Outputs/file_base=concrete_expansion_load_10_out'
cli_args = 'Materials/concrete_expansion/compressive_strength=30e6
Materials/concrete_expansion/tensile_strength=3e6
Materials/concrete_expansion/expansion_stress_limit=10e6
BCs/load_x/value=-50e6
Outputs/file_base=concrete_expansion_load_50_out'
allow_test_objects = True
detail = 'with a 10 MPa compressive pressure in the x direction, '
detail = 'with a 50 MPa compressive pressure in the x direction, '
[]

[concrete_expansion_load_5_5]
type = 'CSVDiff'
input = 'concrete_anisotropic_eigenstrain.i'
csvdiff = 'concrete_expansion_load_5_5_out.csv'
abs_zero = 1e-5
cli_args = 'BCs/load_x/value=-5e6 BCs/load_y/value=-5e6 '
'Outputs/file_base=concrete_expansion_load_5_5_out'
cli_args = 'Materials/concrete_expansion/compressive_strength=30e6
Materials/concrete_expansion/tensile_strength=3e6
Materials/concrete_expansion/expansion_stress_limit=10e6
BCs/load_x/value=-5e6
BCs/load_y/value=-5e6
Outputs/file_base=concrete_expansion_load_5_5_out'
allow_test_objects = True
detail = 'with 5 MPa compressive pressure in the x and y directions, '
[]

[concrete_expansion_load_10_10]
type = 'CSVDiff'
input = 'concrete_anisotropic_eigenstrain.i'
csvdiff = 'concrete_expansion_load_10_10_out.csv'
abs_zero = 1e-6
cli_args = 'BCs/load_x/value=-10e6 BCs/load_y/value=-10e6 '
'Outputs/file_base=concrete_expansion_load_10_10_out'
cli_args = 'Materials/concrete_expansion/compressive_strength=30e6
Materials/concrete_expansion/tensile_strength=3e6
Materials/concrete_expansion/expansion_stress_limit=10e6
BCs/load_x/value=-10e6
BCs/load_y/value=-10e6
Outputs/file_base=concrete_expansion_load_10_10_out'
allow_test_objects = True
detail = 'with 10 MPa compressive pressure in the x and y directions, '
[]

[concrete_expansion_load_5_5_5]
type = 'CSVDiff'
input = 'concrete_anisotropic_eigenstrain.i'
csvdiff = 'concrete_expansion_load_5_5_5_out.csv'
abs_zero = 1e-6
cli_args = 'BCs/load_x/value=-5e6 BCs/load_y/value=-5e6 BCs/load_z/value=-5e6 '
'Outputs/file_base=concrete_expansion_load_5_5_5_out'
cli_args = 'Materials/concrete_expansion/compressive_strength=30e6
Materials/concrete_expansion/tensile_strength=3e6
Materials/concrete_expansion/expansion_stress_limit=10e6
BCs/load_x/value=-5e6
BCs/load_y/value=-5e6
BCs/load_z/value=-5e6
Outputs/file_base=concrete_expansion_load_5_5_5_out'
allow_test_objects = True
detail = 'with 5 MPa compressive pressure in the x, y, and z directions, '
[]

[concrete_expansion_load_10_10_10]
type = 'CSVDiff'
input = 'concrete_anisotropic_eigenstrain.i'
csvdiff = 'concrete_expansion_load_10_10_10_out.csv'
abs_zero = 1e-6
cli_args = 'BCs/load_x/value=-10e6 BCs/load_y/value=-10e6 BCs/load_z/value=-10e6 '
'Outputs/file_base=concrete_expansion_load_10_10_10_out'
cli_args = 'Materials/concrete_expansion/compressive_strength=30e6
Materials/concrete_expansion/tensile_strength=3e6
Materials/concrete_expansion/expansion_stress_limit=10e6
BCs/load_x/value=-10e6
BCs/load_y/value=-10e6
BCs/load_z/value=-10e6
Outputs/file_base=concrete_expansion_load_10_10_10_out'
allow_test_objects = True
detail = 'and with 10 MPa compressive pressure in the x, y, and z directions.'
[]
[]
[error_message_check]
requirement = 'Blackbear shall produce an error message when parameter(s) required for the anisotropic expansion_type are not set by user:'
[compressive_strength]
type = 'RunException'
input = 'concrete_anisotropic_eigenstrain.i'
cli_args = 'Materials/concrete_expansion/tensile_strength=3e6
Materials/concrete_expansion/expansion_stress_limit=10e6'
expect_err = "compressive_strength is required for expansion_type = Anisotropic"
allow_test_objects = True
detail = "Anisotropic expansion_type shall generate error if compressive_strength is not set by user."
[]
[expansion_stress_limit]
type = 'RunException'
input = 'concrete_anisotropic_eigenstrain.i'
cli_args = 'Materials/concrete_expansion/compressive_strength=30e6
Materials/concrete_expansion/tensile_strength=3e6'
expect_err = "expansion_stress_limit is required for expansion_type = Anisotropic"
allow_test_objects = True
detail = "Anisotropic expansion_type shall generate error if expansion_stress_limit is not set by user."
[]
[tensile_strength]
type = 'RunException'
input = 'concrete_anisotropic_eigenstrain.i'
cli_args = 'Materials/concrete_expansion/compressive_strength=30e6
Materials/concrete_expansion/expansion_stress_limit=10e6'
expect_err = "tensile_strength is required for expansion_type = Anisotropic"
allow_test_objects = True
detail = "Anisotropic expansion_type shall generate error if tensile_strength is not set by user."
[]
[]
[]
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
microcracking_eigenstrain_name = concrete_expansion
microcracking_initiation_strain = 0.0001
microcracking_strain_branch = 0.0002
expansion_stress_limit = 10e6
# expansion_stress_limit = 10e6
[]

[stress]
Expand Down
Loading

0 comments on commit 4010721

Please sign in to comment.