Skip to content

Commit

Permalink
Merge pull request #211 from bwspenc/error_tests
Browse files Browse the repository at this point in the history
Clean up errors and add error tests
  • Loading branch information
dschwen authored Apr 26, 2021
2 parents 0c19818 + 8a6c76b commit 5f14bbf
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/materials/ConcreteThermalMoisture.C
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ConcreteThermalMoisture::validParams()
params.addParam<MooseEnum>(
"cement_type", cement_type, "cement type input for moisture capacity calculations");
params.addParam<MooseEnum>(
"aggregate_pore_type", aggregate_pore_type, "aggregate pore structure");
"aggregate_pore_type", aggregate_pore_type, "aggregate pore structure");

MooseEnum moisture_diffusivity_model("Bazant Xi Mensi", "Bazant");
params.addParam<MooseEnum>(
Expand Down Expand Up @@ -567,7 +567,7 @@ ConcreteThermalMoisture::computeProperties()
n_agg = 2.0;
break;
default:
mooseError("unknown aggregate pore sturtures");
mooseError("Unknown aggregate pore structure");
break;
}

Expand All @@ -588,7 +588,7 @@ ConcreteThermalMoisture::computeProperties()
V_agg = 0.10;
break;
default:
mooseError("unknown aggregate pore sturtures");
mooseError("Unknown aggregate pore structure");
break;
}

Expand Down Expand Up @@ -661,7 +661,7 @@ ConcreteThermalMoisture::computeProperties()
Dh0 = A * std::exp(B * C1);
break;
default:
mooseError("unknown moisture diffusivity models");
mooseError("Unknown moisture diffusivity model");
break;
}

Expand Down
8 changes: 8 additions & 0 deletions test/tests/concrete_expansion_microcracking/tests
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,12 @@
detail = 'and with a 10 MPa compressive pressure in the x, y, and z directions.'
[]
[]
[concrete_microcracking_damage_isotropic_error]
type = 'RunException'
input = 'concrete_expansion_microcracking.i'
expect_err = 'ConcreteExpansionMicrocrackingDamage requires that the elasticity tensor be guaranteed isotropic'
cli_args = 'Materials/inactive=concrete Materials/aniso/type=ComputeElasticityTensor Materials/aniso/fill_methode=orthotropic Materials/aniso/C_ijkl="1 1 1 1 1 1 1 1 1"'
allow_test_objects = True
requirement = 'The ConcreteExpansionMicrocrackingDamage model shall generate an error if used with a material that is not guaranteed isotropic'
[]
[]
11 changes: 9 additions & 2 deletions test/tests/concrete_sulfide_attack/tests
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
[Tests]
issues = '#171'
design = 'ConcreteThermalMoisture.md ReactionNetwork/index.md'
[./test]
[test]
type = 'Exodiff'
input = 'sulfide_attack.i'
exodiff = 'sulfide_attack_out.e'
requirement = 'Blackbear shall model the migration and reactions between chemical species involved in sulfide attack on concrete'
[../]
[]
[aqueous_speciations_syntax]
type = 'RunException'
input = 'sulfide_attack.i'
cli_args = 'ReactionNetwork/aqueous_speciations="(1.0)ca / (1.0)cl = (1.0)cacl -0.7"'
expect_err = 'Error parsing term: /'
requirement = 'The ReactionNetwork model shall generate an error if an incorrect form is provided for aqueous speciations'
[]
[]
7 changes: 7 additions & 0 deletions test/tests/mazars_damage/tests
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@
detail = 'and in compression.'
[]
[]
[mazars_damage_isotropic_error]
type = 'RunException'
input = 'mazars.i'
expect_err = 'MazarsDamage requires that the elasticity tensor be guaranteed isotropic'
cli_args = 'Materials/inactive=elasticity Materials/aniso/type=ComputeElasticityTensor Materials/aniso/fill_methode=orthotropic Materials/aniso/C_ijkl="1 1 1 1 1 1 1 1 1"'
requirement = 'The MazarsDamage model shall generate an error if used with a material that is not guaranteed isotropic'
[]
[]

0 comments on commit 5f14bbf

Please sign in to comment.