Skip to content

Commit

Permalink
Addressing Stephanies comments for p91 material model pr
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnmunday committed Nov 23, 2020
1 parent 11db9ab commit e76133b
Show file tree
Hide file tree
Showing 9 changed files with 469 additions and 38 deletions.
6 changes: 3 additions & 3 deletions doc/content/source/materials/P91LAROMANCEStressUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Description

`P91LAROMANCEStressUpdate` implements the necessary coefficients to compute a creep rate for HT9
stainless steel by sampling a Los Alamos Reduced Order Model Applied to Nonlinear Constitutive
`P91LAROMANCEStressUpdate` implements the necessary coefficients to compute a creep rate for P91
chrome moly alloy steel by sampling a Los Alamos Reduced Order Model Applied to Nonlinear Constitutive
Equations (LAROMANCE) model. `P91LAROMANCEStressUpdate` implements the coefficients required by
[ADLAROMANCEStressUpdateBase](ADLAROMANCEStressUpdateBase.md), which in turn utilizes the radial
return method implemented in [ADRadialReturnStressUpdate](/ADRadialReturnStressUpdate.md) to
Expand All @@ -14,7 +14,7 @@ model.

## Example Input Syntax

!listing test/tests/tensor_mechanics/ht9_rom/2drz.i block=Materials/rom_stress_prediction
!listing test/tests/p91_rom/verification.i block=Materials/rom_stress_prediction

!syntax parameters /Materials/tensor_mechanics/P91LAROMANCEStressUpdate

Expand Down
1 change: 1 addition & 0 deletions include/materials/P91LAROMANCEStressUpdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ class P91LAROMANCEStressUpdate : public ADLAROMANCEStressUpdateBase
virtual std::vector<std::vector<std::vector<Real>>> getInputLimits() override;
virtual std::vector<std::vector<std::vector<Real>>> getCoefs() override;
virtual std::vector<unsigned int> getTilings() override;
virtual Real romStrainCutoff() override { return 1.0e-9; }
};
4 changes: 2 additions & 2 deletions src/materials/P91LAROMANCEStressUpdate.C
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ P91LAROMANCEStressUpdate::validParams()
"Maximum increment of density of cell (glissile) dislocations.");
params.addRangeCheckedParam<Real>(
"initial_wall_dislocation_density",
6.0e12,
10.0e12,
"initial_wall_dislocation_density >= 6.0e12 & "
"initial_wall_dislocation_density <= 6.0e12",
"initial_wall_dislocation_density <= 18.0e12",
"Cell wall (locked) dislocation density initial value (1/m^2).");
params.addRangeCheckedParam<Real>(
"max_relative_wall_dislocation_increment",
Expand Down
12 changes: 0 additions & 12 deletions test/tests/d91_rom/gold/verification_out.csv

This file was deleted.

402 changes: 402 additions & 0 deletions test/tests/p91_rom/gold/verification_heavy_out.csv

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions test/tests/p91_rom/gold/verification_out.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
time,cell_rate,creep_rate,wall_rate
0,0,0,0
25,-3937224.9411742,1.3337803577777e-09,-7836740.5627676
50,-10249.936832882,1.8490457605124e-12,-198679.23723317
75,-690939.03802547,1.0341369066433e-10,-7870216.6612318
100,-45528.752725361,0.00010099378358843,-223699.89754019
125,-328115.41681109,1.1414978321884e-11,-573230.03243205
150,-719397.12617145,7.1623415444879e-06,-2770790.6665628
175,-1581754.658178,0.18681331721299,-4662105.7889694
200,-276448024.25405,2.2367035758266e+52,-6.0859616463651e+18
225,-98952.061997943,7.470118127834e-13,-153651.02393359
250,976037.74084043,2.7884295971301e-10,9789.6224374818
10 changes: 5 additions & 5 deletions test/tests/d91_rom/tests → test/tests/p91_rom/tests
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[Tests]
[./rom]
issues = '#14046'
design = 'D91LAROMANCEStressUpdate.md'
requirement = 'The system shall compute a creep rate based on a reduced order model for D91'
issues = '#141'
design = 'P91LAROMANCEStressUpdate.md'
requirement = 'The system shall compute a creep rate based on a reduced order model for P91'
[./verification]
type = 'CSVDiff'
input = 'verification.i'
csvdiff = 'verification_out.csv'
cli_args = 'Executioner/dt=25 Executioner/num_steps=10'
petsc_version = '>=3.9.0'
max_parallel = 1
detail = 'in isolation (i.e. without a full displacement solve), and match with code-to-code comparison.'
detail = 'in isolation (i.e. without a full displacement solve), and match with code-to-code comparison. Sometimes both codes will produce unrealistic values for the inputs.'
[../]
[./verification_heavy]
type = 'CSVDiff'
Expand All @@ -22,7 +22,7 @@
cli_args = 'Executioner/dt=1 Outputs/file_base=verification_heavy_out'
max_parallel = 1
allow_test_objects = true
detail = 'in isolation (i.e. without a full displacement solve), and match with code-to-code comparison with a large set of input parameters.'
detail = 'in isolation (i.e. without a full displacement solve), and match with code-to-code comparison with a large set of input parameters. Sometimes both codes will produce unrealistic values for the inputs.'
[../]
[../]
[]
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,34 @@
vals = 'creep_rate_soln creep_rate'
value = 'abs((creep_rate_soln - creep_rate) / creep_rate_soln)'
[../]

[./filtered_cell_rate_diff_fcn]
type = ParsedFunction
vars = 'cell_rate_soln cell_rate wall_rate creep_rate'
vals = 'cell_rate_soln cell_rate wall_rate creep_rate'
value = 'cell_check := if(abs(cell_rate) > 1e12, 0, if(abs(cell_rate) < 100, 0, 1));
wall_check := if(abs(wall_rate) > 1e12, 0, if(abs(wall_rate) < 100, 0, 1));
creep_check := if(abs(creep_rate) > 1e-4, 0, if(abs(creep_rate) < 1e-13, 0, 1));
abs((cell_rate_soln - cell_rate) / cell_rate_soln)*cell_check*wall_check*creep_check'
[../]
[./filtered_wall_rate_diff_fcn]
type = ParsedFunction
vars = 'wall_rate_soln wall_rate cell_rate creep_rate'
vals = 'wall_rate_soln wall_rate cell_rate creep_rate'
value = 'cell_check := if(abs(cell_rate) > 1e12, 0, if(abs(cell_rate) < 100, 0, 1));
wall_check := if(abs(wall_rate) > 1e12, 0, if(abs(wall_rate) < 100, 0, 1));
creep_check := if(abs(creep_rate) > 1e-4, 0, if(abs(creep_rate) < 1e-13, 0, 1));
abs((wall_rate_soln - wall_rate) / wall_rate_soln)*cell_check*wall_check*creep_check'
[../]
[./filtered_creep_rate_diff_fcn]
type = ParsedFunction
vars = 'creep_rate_soln creep_rate wall_rate cell_rate'
vals = 'creep_rate_soln creep_rate wall_rate cell_rate'
value = 'cell_check := if(abs(cell_rate) > 1e12, 0, if(abs(cell_rate) < 100, 0, 1));
wall_check := if(abs(wall_rate) > 1e12, 0, if(abs(wall_rate) < 100, 0, 1));
creep_check := if(abs(creep_rate) > 1e-4, 0, if(abs(creep_rate) < 1e-13, 0, 1));
abs((creep_rate_soln - creep_rate) / creep_rate_soln)*cell_check*wall_check*creep_check'
[../]
[]


Expand Down Expand Up @@ -208,7 +236,7 @@
cell_dislocation_density_forcing_function = cell_fcn
old_creep_strain_forcing_function = evm_fcn
environmental_factor = phase_fraction
verbose = true
#verbose = true
[../]
[]

Expand All @@ -226,8 +254,6 @@

dt = 0.1
end_time = 400

num_steps = 5
[]

[Postprocessors]
Expand Down Expand Up @@ -257,6 +283,7 @@
variable = phase_fraction
outputs = console
[../]

[./cell_rate]
type = ElementAverageValue
variable = cell_dislocation_rate
Expand All @@ -274,6 +301,7 @@
type = ElementAverageValue
variable = creep_rate
[../]

[./cell_in]
type = FunctionValuePostprocessor
function = cell_fcn
Expand Down Expand Up @@ -308,40 +336,40 @@
outputs = console
[../]

[./cell_rate_diff]
[./filtered_cell_rate_diff]
type = FunctionValuePostprocessor
function = cell_rate_diff_fcn
function = filtered_cell_rate_diff_fcn
outputs = console
[../]
[./wall_rate_diff]
[./filtered_wall_rate_diff]
type = FunctionValuePostprocessor
function = wall_rate_diff_fcn
function = filtered_wall_rate_diff_fcn
outputs = console
[../]
[./creep_rate_diff]
[./filtered_creep_rate_diff]
type = FunctionValuePostprocessor
function = creep_rate_diff_fcn
function = filtered_creep_rate_diff_fcn
outputs = console
[../]

[./z_cell_rate_max_diff]
[./zfiltered_cell_rate_max_diff]
type = TimeExtremeValue
postprocessor = cell_rate_diff
postprocessor = filtered_cell_rate_diff
outputs = console
[../]
[./z_wall_rate_max_diff]
[./zfiltered_wall_rate_max_diff]
type = TimeExtremeValue
postprocessor = wall_rate_diff
postprocessor = filtered_wall_rate_diff
outputs = console
[../]
[./z_creep_rate_max_diff]
[./zfiltered_creep_rate_max_diff]
type = TimeExtremeValue
postprocessor = creep_rate_diff
postprocessor = filtered_creep_rate_diff
outputs = console
[../]
[]

[Outputs]
csv = true
interval = 1
csv = true
[]

0 comments on commit e76133b

Please sign in to comment.