- value1First value
C++ Type:PostprocessorName
Controllable:No
Description:First value
- value2Second value
C++ Type:PostprocessorName
Controllable:No
Description:Second value
DifferencePostprocessor
The DifferencePostprocessor simply computes the difference between two other Postprocessor values:
Input Parameters
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, TRANSFER
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/junction_with_calorifically_imperfect_gas.i)
- (modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/parent_non_overlapping.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_xaxis.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_zaxis.i)
- (modules/thermal_hydraulics/test/tests/components/form_loss_from_function_1phase/phy.form_loss_1phase.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.energy_heatstructure_ss_1phase.i)
- (modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_pressure_check.i)
- (modules/ray_tracing/test/tests/traceray/backface_culling/backface_culling.i)
- (modules/fluid_properties/test/tests/temperature_pressure_function/example.i)
- (modules/fluid_properties/test/tests/temperature_pressure_function/exact.i)
- (modules/scalar_transport/test/tests/multiple-species/single-specie.i)
- (modules/misc/test/tests/ad_arrhenius_material_property/exact.i)
- (modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/thm_non_overlapping.i)
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.form_loss.i)
- (modules/fluid_properties/test/tests/sodium/exact.i)
- (test/tests/postprocessors/difference_pps/difference_depend_check.i)
- (modules/thermal_hydraulics/test/tests/components/free_boundary_1phase/phy.conservation_free_boundary_1phase.i)
- (test/tests/thewarehouse/test1.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation_ss.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_specified_temperature_1phase/phy.energy_walltemperature_ss_1phase.i)
- (modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/junction_with_calorifically_imperfect_gas.i)
- (modules/ray_tracing/test/tests/traceray/nonplanar/nonplanar.i)
- (test/tests/postprocessors/difference_pps/difference_pps.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_yaxis.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/lower_limit.i)
- (modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/conservation.i)
- (modules/ray_tracing/test/tests/userobjects/repeatable_ray_study_base/recover.i)
- (modules/misc/test/tests/arrhenius_material_property/exact.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/ADlower_limit.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison.i)
- (modules/ray_tracing/test/tests/traceray/lots.i)
(modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/junction_with_calorifically_imperfect_gas.i)
# This input file tests compatibility of VolumeJunction1Phase and CaloricallyImperfectGas.
# Loss coefficient is applied in first junction.
# Expected pressure drop ~0.5*K*rho_in*vel_in^2=0.5*100*3.219603*1 = 160.9 Pa
T_in = 523.0
vel = 1
p_out = 7e6
[GlobalParams]
initial_p = ${p_out}
initial_vel = ${vel}
initial_T = ${T_in}
gravity_vector = '0 0 0'
closures = simple_closures
n_elems = 3
f = 0
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = '1e2'
scaling_factor_rhowV = '1e-2'
scaling_factor_rhoEV = '1e-5'
[]
[Functions]
[e_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '783.9 2742.3 2958.6 3489.2 4012.7 4533.3 5053.8 5574 6095.1 7140.2 8192.9 9256.3 10333.6 12543.9 14836.6 17216.3 19688.4 22273.7 25018.3 28042.3 31544.2 35818.1 41256.5 100756.5'
scale_factor = 1e3
[]
[mu_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '85.42 85.42 89.53 99.44 108.9 117.98 126.73 135.2 143.43 159.25 174.36 188.9 202.96 229.88 255.5 280.05 303.67 326.45 344.97 366.49 387.87 409.48 431.86 431.86'
scale_factor = 1e-7
[]
[k_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '186.82 186.82 194.11 212.69 231.55 250.38 268.95 287.19 305.11 340.24 374.92 409.66 444.75 511.13 583.42 656.44 733.32 826.53 961.15 1180.38 1546.31 2135.49 3028.08 3028.08'
scale_factor = 1e-3
[]
[]
[FluidProperties]
[fp]
type = CaloricallyImperfectGas
molar_mass = 0.002
e = e_fn
k = k_fn
mu = mu_fn
min_temperature = 100
max_temperature = 5000
out_of_bound_error = false
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet_bc]
type = InletVelocityTemperature1Phase
input = 'inlet:in'
vel = ${vel}
T = ${T_in}
[]
[inlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 11'
orientation = '0 0 -1'
length = 1
A = 5
[]
[inlet_plenum]
type = VolumeJunction1Phase
position = '0 0 10'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = ${vel}
K = 100
connections = 'inlet:out channel1:in channel2:in'
volume = 1
[]
[channel1]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 4
D_h = 1
[]
[channel2]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 1
D_h = 1
[]
[outlet_plenum]
type = VolumeJunction1Phase
position = '0 0 0'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = ${vel}
connections = 'channel1:out channel2:out outlet:in'
volume = 1
[]
[outlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '0 0 -1'
length = 1
A = 5
[]
[outlet_bc]
type = Outlet1Phase
p = ${p_out}
input = 'outlet:out'
[]
[]
[Postprocessors]
[p_in]
type = SideAverageValue
variable = p
boundary = inlet:in
[]
[p_out]
type = SideAverageValue
variable = p
boundary = outlet:out
[]
[Delta_p]
type = DifferencePostprocessor
value1 = p_out
value2 = p_in
[]
[inlet_in_m_dot]
type = ADFlowBoundaryFlux1Phase
boundary = 'inlet_bc'
equation = mass
[]
[inlet_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'inlet:out'
connection_index = 0
junction = inlet_plenum
equation = mass
[]
[channel1_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel1:in'
connection_index = 1
junction = inlet_plenum
equation = mass
[]
[channel1_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel1:out'
connection_index = 0
junction = outlet_plenum
equation = mass
[]
[channel2_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel2:in'
connection_index = 2
junction = inlet_plenum
equation = mass
[]
[channel2_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel2:out'
connection_index = 1
junction = outlet_plenum
equation = mass
[]
[outlet_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'outlet:in'
connection_index = 2
junction = outlet_plenum
equation = mass
[]
[outlet_out_m_dot]
type = ADFlowBoundaryFlux1Phase
boundary = 'outlet_bc'
equation = mass
[]
[net_mass_flow_rate_domain]
type = LinearCombinationPostprocessor
pp_names = 'inlet_in_m_dot outlet_out_m_dot'
pp_coefs = '1 -1'
[]
[net_mass_flow_rate_volume_junction]
type = LinearCombinationPostprocessor
pp_names = 'inlet_out_m_dot channel1_in_m_dot channel2_in_m_dot'
pp_coefs = '1 -1 -1'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
end_time = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
optimal_iterations = 8
iteration_window = 2
[]
timestep_tolerance = 1e-6
abort_on_solve_fail = true
line_search = basic
nl_rel_tol = 1e-8
nl_abs_tol = 4e-8
nl_max_its = 25
l_tol = 1e-3
l_max_its = 5
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
show = 'net_mass_flow_rate_domain net_mass_flow_rate_volume_junction Delta_p'
[]
[]
(modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/parent_non_overlapping.i)
# inlet temperature
T_in = 523.0
mdot = 10
pout = 7e6
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1.5
xmax = 1.5
ymin = -1.5
ymax = 1.5
zmin = 0
zmax = 10
nx = 3
ny = 3
nz = 10
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
[]
[]
[Postprocessors]
[core_outlet_pressure]
type = Receiver
default = ${pout}
[]
[core_inlet_mdot]
type = Receiver
default = ${mdot}
[]
[core_inlet_temperature]
type = Receiver
default = ${T_in}
[]
[core_inlet_pressure]
type = FunctionValuePostprocessor
function = compute_inlet_pressure_fn
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_outlet_mdot]
type = ScalePostprocessor
value = core_inlet_mdot
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[bypass_mdot]
type = Receiver
[]
[inlet_mdot]
type = Receiver
[]
[outlet_mdot]
type = Receiver
[]
[core_outlet_temperature]
type = FunctionValuePostprocessor
function = compute_outlet_temperature_fn
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_pressure_drop]
type = DifferencePostprocessor
value1 = core_inlet_pressure
value2 = core_outlet_pressure
[]
[]
[Functions]
[compute_outlet_temperature_fn]
type = ParsedFunction
symbol_values = 'core_inlet_mdot core_inlet_temperature 1000'
symbol_names = 'mdot Tin Q'
expression = 'Tin + Q / mdot'
[]
[compute_inlet_pressure_fn]
type = ParsedFunction
symbol_values = 'core_inlet_mdot core_outlet_pressure 5000'
symbol_names = 'mdot pout C'
expression = 'pout + C * mdot'
[]
[]
[MultiApps]
[thm]
type = TransientMultiApp
input_files = thm_non_overlapping.i
sub_cycling = true
max_procs_per_app = 1
print_sub_cycles = false
[]
[]
[Transfers]
#### thm Transfers ####
## transfers from thm
[core_inlet_mdot]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_inlet_mdot
to_postprocessor = core_inlet_mdot
reduction_type = maximum
from_multi_app = thm
[]
[core_inlet_temperature]
type = MultiAppPostprocessorTransfer
to_postprocessor = core_inlet_temperature
from_postprocessor = core_inlet_temperature
reduction_type = maximum
from_multi_app = thm
[]
[core_outlet_pressure]
type = MultiAppPostprocessorTransfer
to_postprocessor = core_outlet_pressure
from_postprocessor = core_outlet_pressure
reduction_type = maximum
from_multi_app = thm
[]
[bypass_mdot]
type = MultiAppPostprocessorTransfer
to_postprocessor = bypass_mdot
from_postprocessor = bypass_mdot
reduction_type = maximum
from_multi_app = thm
[]
[inlet_mdot]
type = MultiAppPostprocessorTransfer
to_postprocessor = inlet_mdot
from_postprocessor = inlet_mdot
reduction_type = maximum
from_multi_app = thm
[]
[outlet_mdot]
type = MultiAppPostprocessorTransfer
to_postprocessor = outlet_mdot
from_postprocessor = outlet_mdot
reduction_type = maximum
from_multi_app = thm
[]
## transfers to thm
[core_outlet_mdot]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_outlet_mdot
to_postprocessor = core_outlet_mdot
to_multi_app = thm
[]
[core_outlet_temperature]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_outlet_temperature
to_postprocessor = core_outlet_temperature
to_multi_app = thm
[]
[core_inlet_pressure]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_inlet_pressure
to_postprocessor = core_inlet_pressure
to_multi_app = thm
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_xaxis.i)
# This test compares the hoop strain at two different elements in an internally
# pressurized cylinder with anisotropic plasticity: different yield condition
# for hoop and axial directions. The elements are located circumferentially
# apart but at same axial position. It is expected that due to pressurization
# hoop strains will develop with uniform magnitude along hoop direction. The
# test verifies that the plastic hoop strain is uniform in hoop direction.
# For 3D simulations with material properties oriented along the curved
# geometry such as cylinder or sphere, the stresses and strains are rotated to
# the local coordinate system from the global coordinate system. The plastic
# strain is calculated in the local coordinate system and then transformed to
# the global coordinate system. This test involves a 3D cylindrical geometry,
# and helps in indirectly verifying that this transformation of stresses and
# strains back and forth between the local and global coordinate system is
# correctly implemented.
[Mesh]
file = quarter_cylinder_coarse_xaxis.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[push]
type = PiecewiseLinear
x = '0 1e2'
y = '0 200e6'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_zz elastic_strain_xx elastic_strain_yy stress_xx stress_yy stress_zz strain_zz plastic_strain_zz plastic_strain_xx plastic_strain_yy hoop_stress hoop_strain'
use_automatic_differentiation = true
add_variables = true
cylindrical_axis_point1 = '0 0 0'
cylindrical_axis_point2 = '1 0 0'
[]
[]
[Constraints]
[mid_section_plane]
type = EqualValueBoundaryConstraint
variable = disp_x
secondary = top # boundary
penalty = 1.0e+10
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e9
poissons_ratio = 0.2
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "plasticity"
max_iterations = 50
absolute_tolerance = 1e-30 #1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
# hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
hill_constants = "0.25 0.5 0.5 1.5 1.5 1.5"
[]
[plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 1.5e10
hardening_exponent = 1.0
yield_stress = 0.0 # 60e6
local_cylindrical_csys = true
axis = x
absolute_tolerance = 1e-15 # 1e-8
relative_tolerance = 1e-13 # 1e-15
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = z_face
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = y_face
value = 0.0
[]
[Pressure]
[Side1]
boundary = inner
function = push
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-14
# nl_abs_tol = 1e-10
l_max_its = 90
nl_max_its = 30
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1e-4
time_t = '0 6.23 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
num_steps = 1
start_time = 0
end_time = 200.0
automatic_scaling = true
dtmax = 0.1e-4
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[hoop_strain_elementA]
type = ElementalVariableValue
elementid = 10
variable = hoop_strain
[]
[hoop_strain_elementB]
type = ElementalVariableValue
elementid = 4
variable = hoop_strain
[]
[hoop_strain_diff]
type = DifferencePostprocessor
value1 = hoop_strain_elementA
value2 = hoop_strain_elementB
[]
[]
[Outputs]
csv = true
exodus = false
perf_graph = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_zaxis.i)
# This test compares the hoop strain at two different elements in an internally
# pressurized cylinder with anisotropic plasticity: different yield condition
# for hoop and axial directions. The elements are located circumferentially
# apart but at same axial position. It is expected that due to pressurization
# hoop strains will develop with uniform magnitude along hoop direction. The
# test verifies that the plastic hoop strain is uniform in hoop direction.
# For 3D simulations with material properties oriented along the curved
# geometry such as cylinder or sphere, the stresses and strains are rotated to
# the local coordinate system from the global coordinate system. The plastic
# strain is calculated in the local coordinate system and then transformed to
# the global coordinate system. This test involves a 3D cylindrical geometry,
# and helps in indirectly verifying that this transformation of stresses and
# strains back and forth between the local and global coordinate system is
# correctly implemented.
[Mesh]
file = quarter_cylinder_coarse_zaxis.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[push]
type = PiecewiseLinear
x = '0 1e2'
y = '0 200e6'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_zz elastic_strain_xx elastic_strain_yy stress_xx stress_yy stress_zz strain_zz plastic_strain_zz plastic_strain_xx plastic_strain_yy hoop_stress hoop_strain'
use_automatic_differentiation = true
add_variables = true
cylindrical_axis_point1 = '0 0 0'
cylindrical_axis_point2 = '0 0 1'
[]
[]
[Constraints]
[mid_section_plane]
type = EqualValueBoundaryConstraint
variable = disp_z
secondary = top # boundary
penalty = 1.0e+10
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e9
poissons_ratio = 0.2
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "plasticity"
max_iterations = 50
absolute_tolerance = 1e-30 #1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
# hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
hill_constants = "0.5 0.5 0.25 1.5 1.5 1.5"
[]
[plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 1.5e10
hardening_exponent = 1.0
yield_stress = 0.0 # 60e6
local_cylindrical_csys = true
axis = z
absolute_tolerance = 1e-15 # 1e-8
relative_tolerance = 1e-13 # 1e-15
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = x_face
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = y_face
value = 0.0
[]
[Pressure]
[Side1]
boundary = inner
function = push
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-14
# nl_abs_tol = 1e-10
l_max_its = 90
nl_max_its = 30
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1e-4
time_t = '0 6.23 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
num_steps = 1
start_time = 0
end_time = 200.0
automatic_scaling = true
dtmax = 0.1e-4
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[hoop_strain_elementA]
type = ElementalVariableValue
elementid = 10
variable = hoop_strain
[]
[hoop_strain_elementB]
type = ElementalVariableValue
elementid = 4
variable = hoop_strain
[]
[hoop_strain_diff]
type = DifferencePostprocessor
value1 = hoop_strain_elementA
value2 = hoop_strain_elementB
[]
[]
[Outputs]
csv = true
exodus = false
perf_graph = true
[]
(modules/thermal_hydraulics/test/tests/components/form_loss_from_function_1phase/phy.form_loss_1phase.i)
# Tests the form loss kernel for 1-phase flow.
#
# This test uses the following parameters and boundary data:
# Inlet: (rho = 996.5563397 kg/m^3, vel = 0.5 m/s)
# Outlet: p_out = 100 kPa
# Length: L = 2 m
# Form loss coefficient: K = 0.5, => K_prime = 0.25 m^-1 (uniform along length)
#
# The inlet pressure is
#
# p_in = p_out + dp ,
#
# where dp is given by the definition of the form loss coefficient:
#
# dp = K * 0.5 * rho * u^2
# = 0.5 * 0.5 * 996.5563397 * 0.5^2
# = 62.28477123125 Pa
#
# This value is output to CSV.
p_out = 100e3
[GlobalParams]
initial_p = ${p_out}
initial_vel = 0.5
initial_T = 300.0
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-4'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '1 0 0'
length = 2
A = 1
n_elems = 5
f = 0
[]
[form_loss]
type = FormLossFromFunction1Phase
flow_channel = pipe
K_prime = 0.25
[]
[inlet]
type = InletDensityVelocity1Phase
input = 'pipe:in'
rho = 996.5563397
vel = 0.5
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = ${p_out}
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 5e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 20
start_time = 0.0
num_steps = 100
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
# this is not the right value, should be the value from the inlet ghost cell
[p_in]
type = SideAverageValue
boundary = inlet
variable = p
execute_on = TIMESTEP_END
[]
[p_out]
type = FunctionValuePostprocessor
function = ${p_out}
execute_on = TIMESTEP_END
[]
[dp]
type = DifferencePostprocessor
value1 = p_in
value2 = p_out
execute_on = TIMESTEP_END
[]
[]
[Outputs]
[out]
type = CSV
show = 'dp'
execute_postprocessors_on = final
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.energy_heatstructure_ss_1phase.i)
# This test tests conservation of energy at steady state for 1-phase flow when a
# heat structure is used. Conservation is checked by comparing the integral of
# the heat flux against the difference of the boundary fluxes.
[GlobalParams]
initial_p = 7.0e6
initial_vel = 0
initial_T = 513
gravity_vector = '0.0 0.0 0.0'
scaling_factor_1phase = '1 1 1e-4'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 3.7
cp = 3.e2
rho = 10.42e3
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 0.7
cp = 5e3
rho = 1.0
[]
[clad-mat]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Components]
[reactor]
type = TotalPower
power = 1e3
[]
[core:pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 3.66
n_elems = 10
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.0
fp = eos
[]
[core:solid]
type = HeatStructureCylindrical
position = '0 -0.0071501 0'
orientation = '0 0 1'
length = 3.66
n_elems = 10
names = 'FUEL GAP CLAD'
widths = '6.057900E-03 1.524000E-04 9.398000E-04'
n_part_elems = '5 1 2'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
initial_T = 513
[]
[core:hgen]
type = HeatSourceFromTotalPower
hs = core:solid
regions = 'FUEL'
power = reactor
power_fraction = 1
[]
[core:hx]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core:pipe
hs = core:solid
hs_side = outer
Hw = 1.0e4
P_hf = 4.4925e-2
[]
[inlet]
type = InletDensityVelocity1Phase
input = 'core:pipe:in'
rho = 817.382210128610836
vel = 2.4
[]
[outlet]
type = Outlet1Phase
input = 'core:pipe:out'
p = 7e6
[]
[]
[Postprocessors]
[E_in]
type = ADFlowBoundaryFlux1Phase
boundary = inlet
equation = energy
execute_on = 'initial timestep_end'
[]
[E_out]
type = ADFlowBoundaryFlux1Phase
boundary = outlet
equation = energy
execute_on = 'initial timestep_end'
[]
[hf_pipe]
type = ADHeatRateConvection1Phase
block = core:pipe
T_wall = T_wall
T = T
Hw = Hw
P_hf = P_hf
execute_on = 'initial timestep_end'
[]
[E_diff]
type = DifferencePostprocessor
value1 = E_in
value2 = E_out
execute_on = 'initial timestep_end'
[]
[E_conservation]
type = SumPostprocessor
values = 'E_diff hf_pipe'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
abort_on_solve_fail = true
dt = 5
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 50
l_tol = 1e-3
l_max_its = 60
start_time = 0
end_time = 260
[]
[Outputs]
[out]
type = CSV
execute_on = final
show = 'E_conservation'
[]
[console]
type = Console
show = 'E_conservation'
[]
[]
(modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_pressure_check.i)
# This test checks that the expected pressure rise due to the user supplied
# pump head matches the actual pressure rise across the pump.
# The orientation of flow channels in this test have no components in the z-direction
# due to the expected_pressure_rise_fcn not accounting for hydrostatic pressure.
head = 95.
dt = 0.1
g = 9.81
volume = 0.567
[GlobalParams]
initial_T = 393.15
initial_vel = 0.0372
A = 0.567
f = 0
fp = fp
scaling_factor_1phase = '1 1 1e-5'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[expected_pressure_rise_fcn]
type = ParsedFunction
expression = 'rhoV * g * head / volume'
symbol_names = 'rhoV g head volume'
symbol_values = 'pump:rhoV ${g} ${head} ${volume}'
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 20
T = 393.15
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
initial_p = 1.318964e+07
n_elems = 10
[]
[pump]
type = Pump1Phase
connections = 'pipe1:out pipe2:in'
position = '1.02 0 0'
initial_p = 1.318964e+07
scaling_factor_rhoEV = 1e-5
head = ${head}
volume = ${volume}
A_ref = 0.567
initial_vel_x = 1
initial_vel_y = 1
initial_vel_z = 0
[]
[pipe2]
type = FlowChannel1Phase
position = '1.04 0 0'
orientation = '0 2 0'
length = 0.96
initial_p = 1.4072E+07
n_elems = 10
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1.4072E+07
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
start_time = 0
dt = ${dt}
num_steps = 4
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
[pump_rhoV]
type = ScalarVariable
variable = pump:rhoV
execute_on = 'initial timestep_end'
[]
[expected_pressure_rise]
type = FunctionValuePostprocessor
function = expected_pressure_rise_fcn
execute_on = 'initial linear'
[]
[p_inlet]
type = SideAverageValue
variable = p
boundary = 'pipe1:out'
execute_on = 'initial linear'
[]
[p_outlet]
type = SideAverageValue
variable = p
boundary = 'pipe2:in'
execute_on = 'initial linear'
[]
[actual_pressure_rise]
type = DifferencePostprocessor
value1 = p_outlet
value2 = p_inlet
execute_on = 'timestep_end'
[]
[pressure_rise_diff]
type = RelativeDifferencePostprocessor
value1 = actual_pressure_rise
value2 = expected_pressure_rise
execute_on = 'timestep_end'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
show = 'pressure_rise_diff'
[]
[]
(modules/ray_tracing/test/tests/traceray/backface_culling/backface_culling.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
nx = 5
ny = 5
nz = 5
xmax = 5
ymax = 5
zmax = 5
[]
[]
[RayBCs]
active = ''
[kill_1d]
type = KillRayBC
boundary = 'left right'
[]
[kill_2d]
type = KillRayBC
boundary = 'top right bottom left'
[]
[kill_3d]
type = KillRayBC
boundary = 'top right bottom left front back'
[]
[]
[UserObjects/study]
type = BackfaceCullingStudyTest
ray_kernel_coverage_check = false
vertex_to_vertex = true
centroid_to_vertex = true
centroid_to_centroid = true
side_aq = true
centroid_aq = true
edge_to_edge = false
compute_expected_distance = true
execute_on = initial
[]
[Postprocessors]
[total_distance]
type = RayTracingStudyResult
study = study
result = total_distance
[]
[expected_distance]
type = LotsOfRaysExpectedDistance
lots_of_rays_study = study
[]
[distance_difference]
type = DifferencePostprocessor
value1 = total_distance
value2 = expected_distance
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = false
csv = true
[]
(modules/fluid_properties/test/tests/temperature_pressure_function/example.i)
# Test implementation of TemperaturePressureFunctionFluidProperties properties by comparison to analytical functions.
cv = 4000
T_initial = 400
p_initial = 1e5
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[AuxVariables]
[temperature]
initial_condition = ${T_initial}
[]
[pressure]
initial_condition = 1e5
[]
[]
[Functions]
# This demonstrates how to define fluid properties that are functions
# of the LOCAL value of the (p,T) variables
# x for temperature
# y for pressure
[k]
type = ParsedFunction
expression = '14 + 1e-2 * x + 1e-5 * y'
[]
[rho]
type = ParsedFunction
expression = '1.5e3 + 0.13 * x - 1.5e-4 * y'
[]
[mu]
type = ParsedFunction
expression = '1e-3 + 2e-6 * x - 3e-9 * y'
[]
[]
[FluidProperties]
[fp]
type = TemperaturePressureFunctionFluidProperties
cv = ${cv}
k = k
rho = rho
mu = mu
[]
[]
[Materials]
[to_vars]
type = FluidPropertiesMaterialPT
fp = fp
outputs = 'all'
output_properties = 'density k cp cv viscosity e h'
pressure = pressure
temperature = temperature
compute_entropy = false
compute_sound_speed = false
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[k_exact]
type = FunctionValuePostprocessor
function = k
outputs = none
point = '${T_initial} ${p_initial} 0'
[]
[rho_exact]
type = FunctionValuePostprocessor
function = rho
outputs = none
point = '${T_initial} ${p_initial} 0'
[]
[mu_exact]
type = FunctionValuePostprocessor
function = mu
outputs = none
point = '${T_initial} ${p_initial} 0'
[]
[e_exact]
type = Receiver
default = '${fparse cv * T_initial}'
outputs = none
[]
[cv_exact]
type = Receiver
default = '${fparse cv}'
outputs = none
[]
# Postprocessors to get from the fluid property object
[k_avg]
type = ElementAverageValue
variable = k
outputs = none
[]
[rho_avg]
type = ElementAverageValue
variable = density
outputs = none
[]
[mu_avg]
type = ElementAverageValue
variable = viscosity
outputs = none
[]
[cv_avg]
type = ElementAverageValue
variable = cv
outputs = none
[]
[e_avg]
type = ElementAverageValue
variable = e
outputs = none
[]
# We output these directly, cant compare to anything analytical though
[cp_avg]
type = ElementAverageValue
variable = cp
[]
[h_avg]
type = ElementAverageValue
variable = h
[]
# Postprocessors to compare the two
[k_diff]
type = DifferencePostprocessor
value1 = k_exact
value2 = k_avg
[]
[mu_diff]
type = DifferencePostprocessor
value1 = mu_exact
value2 = mu_avg
[]
[rho_diff]
type = DifferencePostprocessor
value1 = rho_exact
value2 = rho_avg
[]
[e_diff]
type = DifferencePostprocessor
value1 = e_exact
value2 = e_avg
[]
[cv_diff]
type = DifferencePostprocessor
value1 = cv_exact
value2 = cv_avg
[]
[]
[Outputs]
# Note that diffs wont be settled until timestep 2 because of order of execution
csv = true
[]
(modules/fluid_properties/test/tests/temperature_pressure_function/exact.i)
# Test implementation of TemperaturePressureFunctionFluidProperties properties by comparison to analytical functions.
cv = 4000
T_initial = 400
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[AuxVariables]
[temperature]
initial_condition = ${T_initial}
[]
[pressure]
initial_condition = 1e5
[]
[]
[Functions]
# This demonstrates how to define fluid properties that are functions
# of an integral quantity (through a postprocessor) of the (p,T) variable. See example.i in this
# same folder for defining fluid properties that are functions of the
# LOCAL value of the (p,T) variables
[k]
type = ParsedFunction
symbol_names = 'T p'
symbol_values = 'temperature pressure'
expression = '14 + 1e-2 * T + 1e-5 * p'
[]
[rho]
type = ParsedFunction
symbol_names = 'T p'
symbol_values = 'temperature pressure'
expression = '1.5e3 + 0.13 * T - 1.5e-4 * p'
[]
[mu]
type = ParsedFunction
symbol_names = 'T p'
symbol_values = 'temperature pressure'
expression = '1e-3 + 2e-6 * T - 3e-9 * p'
[]
[]
[FluidProperties]
[fp]
type = TemperaturePressureFunctionFluidProperties
cv = ${cv}
k = k
rho = rho
mu = mu
[]
[]
[Materials]
[to_vars]
type = FluidPropertiesMaterialPT
fp = fp
outputs = 'all'
output_properties = 'density k cp cv viscosity e h'
pressure = pressure
temperature = temperature
compute_entropy = false
compute_sound_speed = false
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Postprocessors]
# Postprocessors to get from the functions used as fluid properties
[temperature]
type = ElementAverageValue
variable = temperature
outputs = none
[]
[pressure]
type = ElementAverageValue
variable = pressure
outputs = none
[]
[k_exact]
type = FunctionValuePostprocessor
function = k
outputs = none
[]
[rho_exact]
type = FunctionValuePostprocessor
function = rho
outputs = none
[]
[mu_exact]
type = FunctionValuePostprocessor
function = mu
outputs = none
[]
[e_exact]
type = Receiver
default = '${fparse cv * T_initial}'
outputs = none
[]
[cv_exact]
type = Receiver
default = '${fparse cv}'
outputs = none
[]
# Postprocessors to get from the fluid property object
[k_avg]
type = ElementAverageValue
variable = k
outputs = none
[]
[rho_avg]
type = ElementAverageValue
variable = density
outputs = none
[]
[mu_avg]
type = ElementAverageValue
variable = viscosity
outputs = none
[]
[cv_avg]
type = ElementAverageValue
variable = cv
outputs = none
[]
[e_avg]
type = ElementAverageValue
variable = e
outputs = none
[]
# We output these directly, cant compare to anything analytical though
[cp_avg]
type = ElementAverageValue
variable = cp
[]
[h_avg]
type = ElementAverageValue
variable = h
[]
# Postprocessors to compare the two
[k_diff]
type = DifferencePostprocessor
value1 = k_exact
value2 = k_avg
[]
[mu_diff]
type = DifferencePostprocessor
value1 = mu_exact
value2 = mu_avg
[]
[rho_avg_diff]
type = DifferencePostprocessor
value1 = rho_exact
value2 = rho_avg
[]
[e_diff]
type = DifferencePostprocessor
value1 = e_exact
value2 = e_avg
[]
[cv_diff]
type = DifferencePostprocessor
value1 = cv_exact
value2 = cv_avg
[]
[]
[Outputs]
# Note that diffs wont be settled until timestep 2 because of order of execution
csv = true
[]
(modules/scalar_transport/test/tests/multiple-species/single-specie.i)
Krtt=0.
Kdt2=1
Pt2_left=1
Pt2_right=0
d_t=1
l=1
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = ${l}
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = ref
[]
[Variables]
[t][]
[]
[Kernels]
[time_t]
type = TimeDerivative
variable = t
extra_vector_tags = ref
[]
[diff_t]
type = MatDiffusion
variable = t
diffusivity = ${d_t}
extra_vector_tags = ref
[]
[]
[BCs]
[tt_recombination]
type = BinaryRecombinationBC
variable = t
v = t
Kr = Krtt
boundary = 'left right'
[]
[t_from_t2_left]
type = DissociationFluxBC
variable = t
v = ${Pt2_left} # Partial pressure of T2
Kd = Kdt2
boundary = left
[]
[t_from_t2_right]
type = DissociationFluxBC
variable = t
v = ${Pt2_right} # Partial pressure of T2
Kd = Kdt2
boundary = right
[]
[]
[Materials]
[Krtt]
type = ADConstantMaterial
property_name = 'Krtt'
value = ${Krtt}
[]
[Kdt2]
type = ADConstantMaterial
property_name = 'Kdt2'
value = '${Kdt2}'
[]
[]
[Postprocessors]
[downstream_t_flux]
type = SideFluxAverage
variable = t
boundary = right
diffusivity = ${d_t}
[]
[downstream_t_conc]
type = SideAverageValue
variable = t
boundary = right
outputs = 'none'
[]
[upstream_t_conc]
type = SideAverageValue
variable = t
boundary = left
outputs = 'none'
[]
[difference]
type = DifferencePostprocessor
value1 = upstream_t_conc
value2 = downstream_t_conc
outputs = 'none'
[]
[domain_averaged_flux]
type = ScalePostprocessor
scaling_factor = ${fparse d_t / l}
value = difference
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 40
steady_state_detection = true
dt = .1
[]
[Outputs]
exodus = true
[]
(modules/misc/test/tests/ad_arrhenius_material_property/exact.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[Variables]
[temp]
initial_condition = 1100
[]
[]
[Kernels]
[heat]
type = ADDiffusion
variable = temp
[]
[]
[BCs]
[temp]
type = ADFunctionDirichletBC
variable = temp
boundary = 'left right'
function = '100 * t + 100'
[]
[]
[Materials]
[D]
type = ADArrheniusMaterialProperty
temperature = temp
activation_energy = '0.5 0.1'
frequency_factor = '5 3e-3'
gas_constant = 8.617e-5
property_name = D
outputs = all
[]
[D_exact]
type = ParsedMaterial
property_name = D_exact
coupled_variables = temp
constant_names = 'Q1 D01 Q2 D02 R'
constant_expressions = '0.5 5 0.1 3e-3 8.617e-5'
expression = 'D01 * exp(-Q1 / R / temp) + D02 * exp(-Q2 / R / temp)'
outputs = all
[]
[]
[Executioner]
type = Transient
num_steps = 10
[]
[Postprocessors]
[D]
type = ElementAverageValue
variable = D
[]
[D_exact]
type = ElementAverageValue
variable = D_exact
[]
[diff_D]
type = DifferencePostprocessor
value1 = 'D'
value2 = 'D_exact'
outputs = console
[]
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/thm_non_overlapping.i)
T_in = 523.0
mdot = 10
pout = 7e6
[GlobalParams]
initial_p = ${pout}
initial_vel = 1
initial_T = ${T_in}
gravity_vector = '0 0 0'
closures = simple_closures
n_elems = 5
scaling_factor_1phase = '1 1e-2 1e-5'
f = 1
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.66
molar_mass = 0.004
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet_bc]
type = InletMassFlowRateTemperature1Phase
input = 'inlet:in'
m_dot = ${mdot}
T = ${T_in}
[]
[inlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 11'
orientation = '0 0 -1'
length = 1
A = 1
[]
[inlet_plenum]
type = VolumeJunction1Phase
position = '0 0 10'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 1
connections = 'inlet:out bypass:in core_top:in'
volume = 1
[]
[bypass]
type = FlowChannel1Phase
fp = fp
position = '2 0 10'
orientation = '0 0 -1'
length = 10
A = 0.01
[]
[core_top]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 0.1
A = 9
[]
[core_top_bc]
type = Outlet1Phase
p = ${pout}
input = 'core_top:out'
[]
[core_bottom_bc]
type = InletMassFlowRateTemperature1Phase
input = 'core_bottom:in'
m_dot = ${mdot}
T = ${T_in}
[]
[core_bottom]
type = FlowChannel1Phase
fp = fp
position = '0 0 0.1'
orientation = '0 0 -1'
length = 0.1
A = 9
[]
[outlet_plenum]
type = VolumeJunction1Phase
position = '0 0 0'
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 1
connections = 'bypass:out core_bottom:out outlet:in'
volume = 1
[]
[outlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '0 0 -1'
length = 1
A = 1
[]
[outlet_bc]
type = Outlet1Phase
p = ${pout}
input = 'outlet:out'
[]
[]
[ControlLogic]
[set_core_inlet_pressure]
type = SetComponentRealValueControl
component = core_top_bc
parameter = p
value = core_inlet_pressure
[]
[set_core_outlet_mdot]
type = SetComponentRealValueControl
component = core_bottom_bc
parameter = m_dot
value = core_outlet_mdot
[]
[set_core_outlet_temperature]
type = SetComponentRealValueControl
component = core_bottom_bc
parameter = T
value = core_outlet_temperature
[]
[]
[Postprocessors]
[core_inlet_pressure]
type = Receiver
default = ${pout}
[]
[core_outlet_mdot]
type = Receiver
default = ${mdot}
[]
[core_outlet_temperature]
type = Receiver
default = ${T_in}
[]
[core_outlet_pressure]
type = SideAverageValue
variable = p
boundary = 'core_bottom:in'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_inlet_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'core_top:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_inlet_temperature]
type = SideAverageValue
variable = T
boundary = 'core_top:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[bypass_inlet_pressure]
type = SideAverageValue
variable = p
boundary = 'bypass:in'
[]
[bypass_outlet_pressure]
type = SideAverageValue
variable = p
boundary = 'bypass:out'
[]
[bypass_pressure_drop]
type = DifferencePostprocessor
value1 = bypass_inlet_pressure
value2 = bypass_outlet_pressure
[]
[bypass_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'bypass:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[inlet_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'inlet:in'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[outlet_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'outlet:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
timestep_tolerance = 1e-6
start_time = 0
end_time = 100
dt = 0.01
line_search = l2
nl_rel_tol = 1e-6
nl_abs_tol = 1e-4
nl_max_its = 25
l_tol = 1e-3
l_max_its = 20
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.form_loss.i)
# This test measures the pressure drop across the volume junction with K=1.
A = 0.1
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1
scaling_factor_rhovV = 1
scaling_factor_rhowV = 1
scaling_factor_rhoEV = 1e-5
initial_T = 300
initial_p = 1e5
initial_vel = 1
n_elems = 20
length = 1
f = 0
fp = fp
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
q = 0
q_prime = 0
p_inf = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[K_fn]
type = TimeRampFunction
initial_value = 0
initial_time = 2
ramp_duration = 5
final_value = 1
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
A = ${A}
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
A = ${A}
initial_p = 1e5
[]
[junction]
type = VolumeJunction1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 0.005
initial_p = 1e5
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 0
[]
[pipe1_in]
type = InletVelocityTemperature1Phase
input = 'pipe1:in'
vel = 1
T = 300
[]
[pipe2_out]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e5
[]
[]
[ControlLogic]
active = ''
[K_crtl]
type = TimeFunctionComponentControl
component = junction
parameter = K
function = K_fn
[]
[]
[Postprocessors]
[pJ_in]
type = SideAverageValue
variable = p
boundary = pipe1:out
[]
[pJ_out]
type = SideAverageValue
variable = p
boundary = pipe2:in
[]
[dpJ]
type = DifferencePostprocessor
value1 = pJ_in
value2 = pJ_out
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
end_time = 20
dt = 0.5
abort_on_solve_fail = true
solve_type = 'NEWTON'
nl_rel_tol = 0
nl_abs_tol = 1e-8
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
csv = true
execute_on = 'final'
show = 'dpJ'
[]
(modules/fluid_properties/test/tests/sodium/exact.i)
# Test implementation of sodium properties by comparison to analytical functions.
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[AuxVariables]
[./temperature]
[../]
[]
[AuxKernels]
[./temperature_aux]
type = FunctionAux
variable = temperature
function = '400 + 200 * t'
[../]
[]
[Functions]
[./k]
type = ParsedFunction
symbol_names = 'T'
symbol_values = 'temperature'
expression = '124.67 - 0.11381 * T + 5.5226e-5 * T^2 - 1.1842e-8 * T^3'
[../]
[./h]
type = ParsedFunction
symbol_names = 'T'
symbol_values = 'temperature'
expression = '1.0e3 * (-365.77 + 1.6582 * T - 4.2395e-4 * T^2 + 1.4847e-7 * T^3 + 2992.6 / T)'
[../]
[./cp]
type = ParsedFunction
symbol_names = 'T'
symbol_values = 'temperature'
expression = '1.0e3 * (1.6582 - 8.4790e-4 * T + 4.4541e-7 * T^2 - 2992.6 / T^2)'
[../]
[./rho]
type = ParsedFunction
symbol_names = 'T'
symbol_values = 'temperature'
expression = '219.0 + 275.32 * (1.0 - T / 2503.7) + 511.58 * (1.0 - T / 2503.7)^(0.5)'
[../]
[./drho_dT]
type = ParsedFunction
symbol_names = 'T'
symbol_values = 'temperature'
expression = '-(2.0 * 275.32 + 511.58 / (1.0 - T / 2503.7)^(0.5)) / 2.0 / 2503.7'
[../]
[./drho_dh]
type = ParsedFunction
symbol_names = 'drho_dT_exact cp_exact'
symbol_values = 'drho_dT_exact cp_exact'
expression = 'drho_dT_exact/cp_exact'
[../]
[]
[FluidProperties/sodium]
type = SodiumProperties
[]
[Materials]
[./fp_mat]
type = SodiumPropertiesMaterial
temperature = temperature
outputs = all
[../]
[]
[Executioner]
type = Transient
num_steps = 10
[]
[Postprocessors]
[./temperature]
type = ElementAverageValue
variable = temperature
outputs = none
[../]
[./k_exact]
type = FunctionValuePostprocessor
function = k
outputs = none
[../]
[./h_exact]
type = FunctionValuePostprocessor
function = h
outputs = none
[../]
[./cp_exact]
type = FunctionValuePostprocessor
function = cp
outputs = none
[../]
[./rho_exact]
type = FunctionValuePostprocessor
function = rho
outputs = none
[../]
[./drho_dT_exact]
type = FunctionValuePostprocessor
function = drho_dT
outputs = none
[../]
[./drho_dh_exact]
type = FunctionValuePostprocessor
function = drho_dh
outputs = none
[../]
[./k_avg]
type = ElementAverageValue
variable = k
outputs = none
[../]
[./h_avg]
type = ElementAverageValue
variable = h
outputs = none
[../]
[./cp_avg]
type = ElementAverageValue
variable = cp
outputs = none
[../]
[./t_from_h_avg]
type = ElementAverageValue
variable = temperature
outputs = none
[../]
[./rho_avg]
type = ElementAverageValue
variable = rho
outputs = none
[../]
[./drho_dT_avg]
type = ElementAverageValue
variable = drho_dT
outputs = none
[../]
[./drho_dh_avg]
type = ElementAverageValue
variable = drho_dh
outputs = none
[../]
[./k_diff]
type = DifferencePostprocessor
value1 = k_exact
value2 = k_avg
[../]
[./h_diff]
type = DifferencePostprocessor
value1 = h_exact
value2 = h_avg
[../]
[./cp_diff]
type = DifferencePostprocessor
value1 = cp_exact
value2 = cp_avg
[../]
[./t_from_h_diff]
type = DifferencePostprocessor
value1 = temperature
value2 = t_from_h_avg
[../]
[./rho_avg_diff]
type = DifferencePostprocessor
value1 = rho_exact
value2 = rho_avg
[../]
[./drho_dT_avg_diff]
type = DifferencePostprocessor
value1 = drho_dT_exact
value2 = drho_dT_avg
[../]
[./drho_dh_avg_diff]
type = DifferencePostprocessor
value1 = drho_dh_exact
value2 = drho_dh_avg
[../]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/difference_pps/difference_depend_check.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v]
[../]
[]
[AuxKernels]
[./one]
type = ConstantAux
variable = v
value = 1
[../]
[]
[Postprocessors]
# This postprocessor is listed first on purpose to give the resolver something to do
[./diff]
type = DifferencePostprocessor
value1 = nodes
value2 = elems
execute_on = 'initial timestep_end'
[../]
[./nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[../]
[./elems]
type = NumElems
execute_on = 'initial timestep_end'
[../]
[]
[Problem]
type = FEProblem
solve = false
kernel_coverage_check = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/free_boundary_1phase/phy.conservation_free_boundary_1phase.i)
# This test tests conservation of mass, momentum, and energy on a transient
# problem with an inlet and outlet (using free boundaries for each). This test
# takes 1 time step with Crank-Nicolson and some boundary flux integral
# post-processors needed for the full conservation statement. Lastly, the
# conservation quantities are shown on the console, which should ideally be zero
# for full conservation.
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-6'
closures = simple_closures
[]
[Functions]
[T_fn]
type = ParsedFunction
expression = '300 + 10 * (cos(2*pi*x + pi))'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = FreeBoundary1Phase
input = pipe:in
[]
[pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1.0
n_elems = 10
A = 1.0
initial_T = T_fn
initial_p = 1e5
initial_vel = 1
f = 0
fp = fp
[]
[outlet]
type = FreeBoundary1Phase
input = pipe:out
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = crank-nicolson
start_time = 0.0
end_time = 0.01
dt = 0.01
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-4
nl_max_its = 10
l_tol = 1e-2
l_max_its = 20
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Postprocessors]
# MASS
[massflux_left]
type = MassFluxIntegral
boundary = inlet
arhouA = rhouA
[]
[massflux_right]
type = MassFluxIntegral
boundary = outlet
arhouA = rhouA
[]
[massflux_difference]
type = DifferencePostprocessor
value1 = massflux_right
value2 = massflux_left
[]
[massflux_integral]
type = TimeIntegratedPostprocessor
value = massflux_difference
[]
[mass]
type = ElementIntegralVariablePostprocessor
variable = rhoA
execute_on = 'initial timestep_end'
[]
[mass_change]
type = ChangeOverTimePostprocessor
postprocessor = mass
change_with_respect_to_initial = true
execute_on = 'initial timestep_end'
[]
[mass_conservation]
type = SumPostprocessor
values = 'mass_change massflux_integral'
[]
# MOMENTUM
[momentumflux_left]
type = MomentumFluxIntegral
boundary = inlet
arhouA = rhouA
vel = vel
p = p
A = A
[]
[momentumflux_right]
type = MomentumFluxIntegral
boundary = outlet
arhouA = rhouA
vel = vel
p = p
A = A
[]
[momentumflux_difference]
type = DifferencePostprocessor
value1 = momentumflux_right
value2 = momentumflux_left
[]
[momentumflux_integral]
type = TimeIntegratedPostprocessor
value = momentumflux_difference
[]
[momentum]
type = ElementIntegralVariablePostprocessor
variable = rhouA
execute_on = 'initial timestep_end'
[]
[momentum_change]
type = ChangeOverTimePostprocessor
postprocessor = momentum
change_with_respect_to_initial = true
execute_on = 'initial timestep_end'
[]
[momentum_conservation]
type = SumPostprocessor
values = 'momentum_change momentumflux_integral'
[]
# ENERGY
[energyflux_left]
type = EnergyFluxIntegral
boundary = inlet
arhouA = rhouA
H = H
[]
[energyflux_right]
type = EnergyFluxIntegral
boundary = outlet
arhouA = rhouA
H = H
[]
[energyflux_difference]
type = DifferencePostprocessor
value1 = energyflux_right
value2 = energyflux_left
[]
[energyflux_integral]
type = TimeIntegratedPostprocessor
value = energyflux_difference
[]
[energy]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
execute_on = 'initial timestep_end'
[]
[energy_change]
type = ChangeOverTimePostprocessor
postprocessor = energy
change_with_respect_to_initial = true
execute_on = 'initial timestep_end'
[]
[energy_conservation]
type = SumPostprocessor
values = 'energy_change energyflux_integral'
[]
[]
[Outputs]
[console]
type = Console
show = 'mass_conservation momentum_conservation energy_conservation'
[]
velocity_as_vector = false
[]
(test/tests/thewarehouse/test1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
[]
[manyblocks]
input = gen
type = ElemUniqueSubdomainsGenerator
[]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[Materials]
[mat_props]
type = GenericConstantMaterial
prop_names = diffusivity
prop_values = 2
[]
[]
[UserObjects]
[]
[Postprocessors]
[avg_flux_right]
# Computes -\int(exp(y)+1) from 0 to 1 which is -2.718281828
type = SideDiffusiveFluxAverage
variable = u
boundary = right
diffusivity = diffusivity
[]
[u1_avg]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_end'
[]
[u2_avg]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_end'
[]
[diff]
type = DifferencePostprocessor
value1 = u1_avg
value2 = u2_avg
execute_on = 'initial timestep_end'
[]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation_ss.i)
# Testing energy conservation at steady state
P_hf = ${fparse 0.6 * sin (pi/24)}
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
gravity_vector = '0 0 0'
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 10 30'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[in1]
type = InletVelocityTemperature1Phase
input = 'fch1:in'
vel = 1
T = 300
[]
[fch1]
type = FlowChannel1Phase
position = '0.15 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 300
initial_p = 1.01e5
initial_vel = 1
closures = simple_closures
A = 0.00314159
f = 0.0
[]
[out1]
type = Outlet1Phase
input = 'fch1:out'
p = 1.01e5
[]
[in2]
type = InletVelocityTemperature1Phase
input = 'fch2:in'
vel = 1
T = 350
[]
[fch2]
type = FlowChannel1Phase
position = '0 0.15 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 350
initial_p = 1.01e5
initial_vel = 1
closures = simple_closures
A = 0.00314159
f = 0
[]
[out2]
type = Outlet1Phase
input = 'fch2:out'
p = 1.01e5
[]
[blk]
type = HeatStructureFromFile3D
file = mesh.e
position = '0 0 0'
initial_T = 325
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch1 fch2'
hs = blk
boundary = blk:rmin
Hw = 10000
P_hf = ${P_hf}
[]
[]
[Postprocessors]
[E_in1]
type = ADFlowBoundaryFlux1Phase
boundary = in1
equation = energy
execute_on = 'initial timestep_end'
[]
[E_out1]
type = ADFlowBoundaryFlux1Phase
boundary = out1
equation = energy
execute_on = 'initial timestep_end'
[]
[hf_pipe1]
type = ADHeatRateConvection1Phase
block = fch1
T_wall = T_wall
T = T
Hw = Hw
P_hf = ${P_hf}
execute_on = 'initial timestep_end'
[]
[E_diff1]
type = DifferencePostprocessor
value1 = E_in1
value2 = E_out1
execute_on = 'initial timestep_end'
[]
[E_conservation1]
type = SumPostprocessor
values = 'E_diff1 hf_pipe1'
[]
[E_in2]
type = ADFlowBoundaryFlux1Phase
boundary = in2
equation = energy
execute_on = 'initial timestep_end'
[]
[E_out2]
type = ADFlowBoundaryFlux1Phase
boundary = out2
equation = energy
execute_on = 'initial timestep_end'
[]
[hf_pipe2]
type = ADHeatRateConvection1Phase
block = fch2
T_wall = T_wall
T = T
Hw = Hw
P_hf = ${P_hf}
execute_on = 'initial timestep_end'
[]
[E_diff2]
type = DifferencePostprocessor
value1 = E_in2
value2 = E_out2
execute_on = 'initial timestep_end'
[]
[E_conservation2]
type = SumPostprocessor
values = 'E_diff2 hf_pipe2'
[]
[E_conservation_hs]
type = SumPostprocessor
values = 'hf_pipe1 hf_pipe2'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 5
end_time = 100
solve_type = NEWTON
line_search = basic
abort_on_solve_fail = true
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'phy.conservation_ss'
[csv]
type = CSV
show = 'E_conservation1 E_conservation2 E_conservation_hs'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_specified_temperature_1phase/phy.energy_walltemperature_ss_1phase.i)
# This test tests conservation of energy at steady state for 1-phase flow when
# wall temperature is specified. Conservation is checked by comparing the
# integral of the heat flux against the difference of the boundary fluxes.
[GlobalParams]
initial_p = 7.0e6
initial_vel = 0
initial_T = 513
gravity_vector = '0.0 0.0 0.0'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 3.66
n_elems = 10
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.0
fp = eos
[]
[ht_pipe]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = pipe
T_wall = 550
Hw = 1.0e3
P_hf = 4.4925e-2
[]
[inlet]
type = SolidWall1Phase
input = 'pipe:in'
[]
[outlet]
type = SolidWall1Phase
input = 'pipe:out'
[]
[]
[Postprocessors]
[hf_pipe]
type = ADHeatRateConvection1Phase
block = pipe
T_wall = T_wall
T = T
Hw = Hw
P_hf = P_hf
execute_on = 'initial timestep_end'
[]
[heat_added]
type = TimeIntegratedPostprocessor
value = hf_pipe
execute_on = 'initial timestep_end'
[]
[E]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E
change_with_respect_to_initial = true
execute_on = 'initial timestep_end'
[]
[E_conservation]
type = DifferencePostprocessor
value1 = heat_added
value2 = E_change
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = crank-nicolson
abort_on_solve_fail = true
dt = 1e-1
solve_type = 'NEWTON'
line_search = 'basic'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-8
nl_max_its = 50
l_tol = 1e-3
l_max_its = 60
start_time = 0
num_steps = 10
[]
[Outputs]
[out]
type = CSV
show = 'E_conservation'
[]
[console]
type = Console
show = 'E_conservation'
[]
[]
(modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/junction_with_calorifically_imperfect_gas.i)
# This input file tests compatibility of JunctionParallelChannels1Phase and CaloricallyImperfectGas.
# Loss coefficient is applied in first junction.
# Expected pressure drop from form loss ~0.5*K*rho_in*vel_in^2=0.5*100*3.219603*1 = 160.9 Pa
# Pressure drop from averall flow area change ~ 21.9 Pa
# Expected pressure drop ~ 182.8 Pa
T_in = 523.0
vel = 1
p_out = 7e6
[GlobalParams]
initial_p = ${p_out}
initial_vel = ${vel}
initial_T = ${T_in}
gravity_vector = '0 0 0'
closures = simple_closures
n_elems = 3
f = 0
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = '1e2'
scaling_factor_rhowV = '1e-2'
scaling_factor_rhoEV = '1e-5'
[]
[Functions]
[e_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '783.9 2742.3 2958.6 3489.2 4012.7 4533.3 5053.8 5574 6095.1 7140.2 8192.9 9256.3 10333.6 12543.9 14836.6 17216.3 19688.4 22273.7 25018.3 28042.3 31544.2 35818.1 41256.5 100756.5'
scale_factor = 1e3
[]
[mu_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '85.42 85.42 89.53 99.44 108.9 117.98 126.73 135.2 143.43 159.25 174.36 188.9 202.96 229.88 255.5 280.05 303.67 326.45 344.97 366.49 387.87 409.48 431.86 431.86'
scale_factor = 1e-7
[]
[k_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '186.82 186.82 194.11 212.69 231.55 250.38 268.95 287.19 305.11 340.24 374.92 409.66 444.75 511.13 583.42 656.44 733.32 826.53 961.15 1180.38 1546.31 2135.49 3028.08 3028.08'
scale_factor = 1e-3
[]
[]
[FluidProperties]
[fp]
type = CaloricallyImperfectGas
molar_mass = 0.002
e = e_fn
k = k_fn
mu = mu_fn
min_temperature = 100
max_temperature = 5000
out_of_bound_error = false
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet_bc]
type = InletVelocityTemperature1Phase
input = 'inlet:in'
vel = ${vel}
T = ${T_in}
[]
[inlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 11'
orientation = '0 0 -1'
length = 1
A = 3
[]
[inlet_plenum]
type = JunctionParallelChannels1Phase
position = '0 0 10'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = ${vel}
K = 100
connections = 'inlet:out channel1:in channel2:in'
volume = 1
[]
[channel1]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 4
D_h = 1
[]
[channel2]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 1
D_h = 1
[]
[outlet_plenum]
type = JunctionParallelChannels1Phase
position = '0 0 0'
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = ${vel}
connections = 'channel1:out channel2:out outlet:in'
volume = 1
[]
[outlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '0 0 -1'
length = 1
A = 1
[]
[outlet_bc]
type = Outlet1Phase
p = ${p_out}
input = 'outlet:out'
[]
[]
[Postprocessors]
[p_in]
type = SideAverageValue
variable = p
boundary = inlet:in
[]
[p_out]
type = SideAverageValue
variable = p
boundary = outlet:out
[]
[Delta_p]
type = DifferencePostprocessor
value1 = p_out
value2 = p_in
[]
[inlet_in_m_dot]
type = ADFlowBoundaryFlux1Phase
boundary = 'inlet_bc'
equation = mass
[]
[inlet_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'inlet:out'
connection_index = 0
junction = inlet_plenum
equation = mass
[]
[channel1_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel1:in'
connection_index = 1
junction = inlet_plenum
equation = mass
[]
[channel1_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel1:out'
connection_index = 0
junction = outlet_plenum
equation = mass
[]
[channel2_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel2:in'
connection_index = 2
junction = inlet_plenum
equation = mass
[]
[channel2_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel2:out'
connection_index = 1
junction = outlet_plenum
equation = mass
[]
[outlet_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'outlet:in'
connection_index = 2
junction = outlet_plenum
equation = mass
[]
[outlet_out_m_dot]
type = ADFlowBoundaryFlux1Phase
boundary = 'outlet_bc'
equation = mass
[]
[net_mass_flow_rate_domain]
type = LinearCombinationPostprocessor
pp_names = 'inlet_in_m_dot outlet_out_m_dot'
pp_coefs = '1 -1'
[]
[net_mass_flow_rate_volume_junction]
type = LinearCombinationPostprocessor
pp_names = 'inlet_out_m_dot channel1_in_m_dot channel2_in_m_dot'
pp_coefs = '1 -1 -1'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
end_time = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
optimal_iterations = 8
iteration_window = 2
[]
timestep_tolerance = 1e-6
abort_on_solve_fail = true
line_search = basic
nl_rel_tol = 1e-8
nl_abs_tol = 2e-8
nl_max_its = 25
l_tol = 1e-3
l_max_its = 5
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
show = 'net_mass_flow_rate_domain net_mass_flow_rate_volume_junction Delta_p'
[]
[]
(modules/ray_tracing/test/tests/traceray/nonplanar/nonplanar.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nonplanar.e
[]
[]
[RayBCs/kill]
type = KillRayBC
boundary = 'top right bottom left front back'
[]
[RayKernels/null]
type = NullRayKernel
[]
[UserObjects/lots]
type = LotsOfRaysRayStudy
vertex_to_vertex = true
centroid_to_vertex = true
centroid_to_centroid = true
side_aq = true
centroid_aq = true
compute_expected_distance = true
warn_non_planar = false
execute_on = initial
[]
[Postprocessors]
[total_distance]
type = RayTracingStudyResult
study = lots
result = total_distance
[]
[expected_distance]
type = LotsOfRaysExpectedDistance
lots_of_rays_study = lots
[]
[distance_difference]
type = DifferencePostprocessor
value1 = total_distance
value2 = expected_distance
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/postprocessors/difference_pps/difference_pps.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[AuxVariables]
[./v]
[../]
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = 2
[../]
[]
[AuxKernels]
[./one]
type = ConstantAux
variable = v
value = 1
execute_on = 'initial timestep_end'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./u_avg]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_end'
[../]
[./v_avg]
type = ElementAverageValue
variable = v
execute_on = 'initial timestep_end'
[../]
[./diff]
type = DifferencePostprocessor
value1 = v_avg
value2 = u_avg
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_yaxis.i)
# This test compares the hoop strain at two different elements in an internally
# pressurized cylinder with anisotropic plasticity: different yield condition
# for hoop and axial directions. The elements are located circumferentially
# apart but at same axial position. It is expected that due to pressurization
# hoop strains will develop with uniform magnitude along hoop direction. The
# test verifies that the plastic hoop strain is uniform in hoop direction.
# For 3D simulations with material properties oriented along the curved
# geometry such as cylinder or sphere, the stresses and strains are rotated to
# the local coordinate system from the global coordinate system. The plastic
# strain is calculated in the local coordinate system and then transformed to
# the global coordinate system. This test involves a 3D cylindrical geometry,
# and helps in indirectly verifying that this transformation of stresses and
# strains back and forth between the local and global coordinate system is
# correctly implemented.
[Mesh]
file = quarter_cylinder_coarse_yaxis.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[push]
type = PiecewiseLinear
x = '0 1e2'
y = '0 200e6'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_zz elastic_strain_xx elastic_strain_yy stress_xx stress_yy stress_zz strain_zz plastic_strain_zz plastic_strain_xx plastic_strain_yy hoop_stress hoop_strain'
use_automatic_differentiation = true
add_variables = true
cylindrical_axis_point1 = '0 0 0'
cylindrical_axis_point2 = '0 1 0'
[]
[]
[Constraints]
[mid_section_plane]
type = EqualValueBoundaryConstraint
variable = disp_y
secondary = top # boundary
penalty = 1.0e+10
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e9
poissons_ratio = 0.2
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "plasticity"
max_iterations = 50
absolute_tolerance = 1e-30 #1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
# hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
hill_constants = "0.5 0.25 0.5 1.5 1.5 1.5"
[]
[plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 1.5e10
hardening_exponent = 1.0
yield_stress = 0.0 # 60e6
local_cylindrical_csys = true
axis = y
absolute_tolerance = 1e-15 # 1e-8
relative_tolerance = 1e-13 # 1e-15
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = x_face
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = z_face
value = 0.0
[]
[Pressure]
[Side1]
boundary = inner
function = push
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-14
# nl_abs_tol = 1e-10
l_max_its = 90
nl_max_its = 30
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1e-4
time_t = '0 6.23 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
num_steps = 1
start_time = 0
end_time = 200.0
automatic_scaling = true
dtmax = 0.1e-4
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[hoop_strain_elementA]
type = ElementalVariableValue
elementid = 10
variable = hoop_strain
[]
[hoop_strain_elementB]
type = ElementalVariableValue
elementid = 4
variable = hoop_strain
[]
[hoop_strain_diff]
type = DifferencePostprocessor
value1 = hoop_strain_elementA
value2 = hoop_strain_elementB
[]
[]
[Outputs]
csv = true
exodus = false
perf_graph = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/lower_limit.i)
temp = 800.0160634
disp = 1.0053264195e6
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = ${temp}
[]
[]
[Functions]
[temp_weight]
type = ParsedFunction
symbol_names = 'lower_limit avg'
symbol_values = '800.0160634 temp_avg'
expression = 'val := 2 * avg / lower_limit - 1;
clamped := if(val <= -1, -0.99999, if(val >= 1, 0.99999, val));
plus := exp(-2 / (1 + clamped));
minus := exp(-2 / (1 - clamped));
plus / (plus + minus)'
[]
[stress_weight]
type = ParsedFunction
symbol_names = 'lower_limit avg'
symbol_values = '2.010652839e6 vonmises_stress'
expression = 'val := 2 * avg / lower_limit - 1;
clamped := if(val <= -1, -0.99999, if(val >= 1, 0.99999, val));
plus := exp(-2 / (1 + clamped));
minus := exp(-2 / (1 - clamped));
plus / (plus + minus)'
[]
[creep_rate_exact]
type = ParsedFunction
symbol_names = 'lower_limit_strain temp_weight stress_weight'
symbol_values = '3.370764e-12 temp_weight stress_weight'
expression = 'lower_limit_strain * temp_weight * stress_weight'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = vonmises_stress
[]
[]
[BCs]
[symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pressure_x]
type = Pressure
variable = disp_x
boundary = right
factor = ${disp}
[]
[pressure_y]
type = Pressure
variable = disp_y
boundary = top
factor = -${disp}
[]
[pressure_z]
type = Pressure
variable = disp_z
boundary = front
factor = -${disp}
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 3.30e11
poissons_ratio = 0.3
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = SS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
outputs = all
apply_strain = false
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
automatic_scaling = true
compute_scaling_once = false
num_steps = 1
dt = 1e5
[]
[Postprocessors]
[creep_rate_exact]
type = FunctionValuePostprocessor
function = creep_rate_exact
[]
[creep_rate_avg]
type = ElementAverageValue
variable = creep_rate
[]
[creep_rate_diff]
type = DifferencePostprocessor
value1 = creep_rate_exact
value2 = creep_rate_avg
[]
[temp_avg]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[vonmises_stress]
type = ElementAverageValue
variable = vonmises_stress
[]
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/conservation.i)
# Junction between 2 pipes where the second has half the area of the first.
# The momentum density of the second should be twice that of the first.
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 300
initial_p = 1e5
initial_vel = 20
initial_vel_x = 20
initial_vel_y = 0
initial_vel_z = 0
f = 0
fp = eos
scaling_factor_1phase = '1 1e-2 1e-5'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
p_inf = 0
q = 0
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[K_loss_fn]
type = PiecewiseLinear
x = '0 0.2'
y = '0 1'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
A = 1
n_elems = 20
[]
[junction1]
type = JunctionParallelChannels1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 1e-2
K = 0
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
length = 1
A = 0.5
n_elems = 20
[]
[junction2]
type = JunctionParallelChannels1Phase
connections = 'pipe2:out pipe1:in'
position = '1 0 0'
volume = 1e-2
[]
[]
[ControlLogic]
active = ''
[K_crtl]
type = TimeFunctionComponentControl
component = junction1
parameter = K
function = K_loss_fn
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.05
num_steps = 5
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = basic
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 0
nl_abs_tol = 1e-8
nl_max_its = 20
l_tol = 1e-3
l_max_its = 20
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe1 pipe2'
execute_on = 'initial timestep_end'
[]
[mass_junction1]
type = ScalarVariable
variable = junction1:rhoV
execute_on = 'initial timestep_end'
[]
[mass_junction2]
type = ScalarVariable
variable = junction2:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_junction1 mass_junction2'
execute_on = 'initial timestep_end'
[]
[mass_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = mass_tot
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe1 pipe2'
execute_on = 'initial timestep_end'
[]
[E_junction1]
type = ScalarVariable
variable = junction1:rhoEV
execute_on = 'initial timestep_end'
[]
[E_junction2]
type = ScalarVariable
variable = junction2:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = SumPostprocessor
values = 'E_pipes E_junction1 E_junction2'
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
[p_pipe1_out]
type = SideAverageValue
boundary = pipe1:out
variable = p
[]
[p_pipe2_in]
type = SideAverageValue
boundary = pipe2:in
variable = p
[]
[dp_junction]
type = DifferencePostprocessor
value1 = p_pipe1_out
value2 = p_pipe2_in
[]
[]
[Outputs]
[out]
type = CSV
show = 'mass_tot_change E_tot_change'
[]
[]
(modules/ray_tracing/test/tests/userobjects/repeatable_ray_study_base/recover.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 5
ymax = 5
[]
[]
[RayBCs/kill]
type = KillRayBC
boundary = 'top right bottom left'
[]
[UserObjects/lots]
type = TestRayDataStudy
centroid_to_centroid = true
vertex_to_vertex = true
centroid_to_vertex = true
execute_on = timestep_end
compute_expected_distance = true
data_size = 3
aux_data_size = 2
[]
[RayKernels/data]
type = TestRayDataRayKernel
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Problem]
solve = false
[]
[Postprocessors]
[total_distance]
type = RayTracingStudyResult
study = lots
result = total_distance
[]
[expected_distance]
type = LotsOfRaysExpectedDistance
lots_of_rays_study = lots
[]
[distance_difference]
type = DifferencePostprocessor
value1 = total_distance
value2 = expected_distance
[]
[]
[Outputs]
csv = true
[]
(modules/misc/test/tests/arrhenius_material_property/exact.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[Variables]
[temp]
initial_condition = 1100
[]
[]
[Kernels]
[heat]
type = Diffusion
variable = temp
[]
[]
[BCs]
[temp]
type = FunctionDirichletBC
variable = temp
boundary = 'left right'
function = '100 * t + 100'
[]
[]
[Materials]
[D]
type = ArrheniusMaterialProperty
temperature = temp
activation_energy = '0.5 0.1'
frequency_factor = '5 3e-3'
gas_constant = 8.617e-5
property_name = D
outputs = all
[]
[D_exact]
type = ParsedMaterial
property_name = D_exact
coupled_variables = temp
constant_names = 'Q1 D01 Q2 D02 R'
constant_expressions = '0.5 5 0.1 3e-3 8.617e-5'
expression = 'D01 * exp(-Q1 / R / temp) + D02 * exp(-Q2 / R / temp)'
outputs = all
[]
[D_dT_exact]
type = ParsedMaterial
property_name = D_dT_exact
coupled_variables = temp
constant_names = 'Q1 D01 Q2 D02 R'
constant_expressions = '0.5 5 0.1 3e-3 8.617e-5'
expression = '(D01 * exp(-Q1 / R / temp) / temp / temp * Q1 / R) + (D02 * exp(-Q2 / R / temp) / temp / temp * Q2 / R)'
outputs = all
[]
[]
[Executioner]
type = Transient
num_steps = 10
[]
[Postprocessors]
[D]
type = ElementAverageValue
variable = D
[]
[D_dT]
type = ElementAverageValue
variable = D_dT
[]
[D_exact]
type = ElementAverageValue
variable = D_exact
[]
[D_dT_exact]
type = ElementAverageValue
variable = D_dT_exact
[]
[diff_D]
type = DifferencePostprocessor
value1 = 'D'
value2 = 'D_exact'
outputs = console
[]
[diff_D_dT]
type = DifferencePostprocessor
value1 = 'D_dT'
value2 = 'D_dT_exact'
outputs = console
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/ADlower_limit.i)
temp = 800.0160634
disp = 1.0053264195e6
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = ${temp}
[]
[]
[Functions]
[temp_weight]
type = ParsedFunction
symbol_names = 'lower_limit avg'
symbol_values = '800.0160634 temp_avg'
expression = 'val := 2 * avg / lower_limit - 1;
clamped := if(val <= -1, -0.99999, if(val >= 1, 0.99999, val));
plus := exp(-2 / (1 + clamped));
minus := exp(-2 / (1 - clamped));
plus / (plus + minus)'
[]
[stress_weight]
type = ParsedFunction
symbol_names = 'lower_limit avg'
symbol_values = '2.010652839e6 vonmises_stress'
expression = 'val := 2 * avg / lower_limit - 1;
clamped := if(val <= -1, -0.99999, if(val >= 1, 0.99999, val));
plus := exp(-2 / (1 + clamped));
minus := exp(-2 / (1 - clamped));
plus / (plus + minus)'
[]
[creep_rate_exact]
type = ParsedFunction
symbol_names = 'lower_limit_strain temp_weight stress_weight'
symbol_values = '3.370764e-12 temp_weight stress_weight'
expression = 'lower_limit_strain * temp_weight * stress_weight'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
generate_output = vonmises_stress
[]
[]
[BCs]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pressure_x]
type = ADPressure
variable = disp_x
boundary = right
factor = ${disp}
[]
[pressure_y]
type = ADPressure
variable = disp_y
boundary = top
factor = -${disp}
[]
[pressure_z]
type = ADPressure
variable = disp_z
boundary = front
factor = -${disp}
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 3.30e11
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = ADSS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
outputs = all
apply_strain = false
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
automatic_scaling = true
compute_scaling_once = false
num_steps = 1
dt = 1e5
[]
[Postprocessors]
[creep_rate_exact]
type = FunctionValuePostprocessor
function = creep_rate_exact
[]
[creep_rate_avg]
type = ElementAverageValue
variable = creep_rate
[]
[creep_rate_diff]
type = DifferencePostprocessor
value1 = creep_rate_exact
value2 = creep_rate_avg
[]
[temp_avg]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[vonmises_stress]
type = ElementAverageValue
variable = vonmises_stress
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison.i)
# This test compares the hoop strain at two different elements in an internally
# pressurized cylinder with anisotropic plasticity: different yield condition
# for hoop and axial directions. The elements are located circumferentially
# apart but at same axial position. It is expected that due to pressurization
# hoop strains will develop with uniform magnitude along hoop direction. The
# test verifies that the plastic hoop strain is uniform in hoop direction.
# For 3D simulations with material properties oriented along the curved
# geometry such as cylinder or sphere, the stresses and strains are rotated to
# the local coordinate system from the global coordinate system. The plastic
# strain is calculated in the local coordinate system and then transformed to
# the global coordinate system. This test involves a 3D cylindrical geometry,
# and helps in indirectly verifying that this transformation of stresses and
# strains back and forth between the local and global coordinate system is
# correctly implemented.
[Mesh]
file = quarter_cylinder.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[push]
type = PiecewiseLinear
x = '0 1e2'
y = '0 200e6'
[]
[swelling_func]
type = ParsedFunction
expression = 0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_zz elastic_strain_xx elastic_strain_yy stress_xx stress_yy stress_zz strain_zz plastic_strain_zz plastic_strain_xx plastic_strain_yy hoop_stress hoop_strain'
use_automatic_differentiation = true
add_variables = true
cylindrical_axis_point1 = '0 0 0'
cylindrical_axis_point2 = '0 1 0'
[]
[]
[Constraints]
[mid_section_plane]
type = EqualValueBoundaryConstraint
variable = disp_y
secondary = top # boundary
penalty = 1.0e+10
[]
[]
[Materials]
[swelling]
type = ADGenericFunctionMaterial
prop_values = swelling_func
prop_names = swelling
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e9
poissons_ratio = 0.2
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "plasticity"
max_iterations = 50
absolute_tolerance = 1e-30 #1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
# hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
hill_constants = "0.5 0.25 0.5 1.5 1.5 1.5"
[]
[plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 1.5e10
hardening_exponent = 1.0
yield_stress = 0.0 # 60e6
local_cylindrical_csys = true
# local_spherical_csys = false
axis = y
absolute_tolerance = 1e-15 # 1e-8
relative_tolerance = 1e-13 # 1e-15
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = x_face
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = z_face
value = 0.0
[]
[Pressure]
[Side1]
boundary = inner
function = push
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-14
# nl_abs_tol = 1e-10
l_max_its = 90
nl_max_its = 30
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1e-4
time_t = '0 6.23 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
num_steps = 3
start_time = 0
end_time = 200.0
automatic_scaling = true
dtmax = 0.1e-4
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[hoop_strain_elementA]
type = ElementalVariableValue
elementid = 464
variable = hoop_strain
[]
[hoop_strain_elementB]
type = ElementalVariableValue
elementid = 478
variable = hoop_strain
[]
[hoop_strain_diff]
type = DifferencePostprocessor
value1 = hoop_strain_elementA
value2 = hoop_strain_elementB
[]
[]
[Outputs]
csv = true
exodus = false
perf_graph = true
[]
(modules/ray_tracing/test/tests/traceray/lots.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
nz = 5
xmax = 5
ymax = 5
zmax = 5
[]
[]
[RayBCs]
active = 'kill_2d'
[kill_1d]
type = KillRayBC
boundary = 'left right'
[]
[kill_2d]
type = KillRayBC
boundary = 'top right bottom left'
[]
[kill_3d]
type = KillRayBC
boundary = 'top right bottom left front back'
[]
[]
# Add a dummy RayKernel to enable additional error
# checking before onSegment() is called
[RayKernels/null]
type = NullRayKernel
[]
[UserObjects/lots]
type = LotsOfRaysRayStudy
vertex_to_vertex = false
centroid_to_vertex = false
centroid_to_centroid = false
side_aq = false
centroid_aq = false
compute_expected_distance = true
execute_on = initial
[]
[Postprocessors]
[total_distance]
type = RayTracingStudyResult
study = lots
result = total_distance
[]
[expected_distance]
type = LotsOfRaysExpectedDistance
lots_of_rays_study = lots
[]
[distance_difference]
type = DifferencePostprocessor
value1 = total_distance
value2 = expected_distance
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = false
csv = true
[]