- execute_onLINEARThe 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:LINEAR
C++ Type:ExecFlagEnum
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.
- value0The constant value
Default:0
C++ Type:double
Controllable:Yes
Description:The constant value
ConstantFunction
A function that returns a constant value as defined by an input parameter.
The value
parameter of the ConstantFunction
is controllable, so it may modified during the simulation using the Controls system.
Example input syntax
This example uses a ConstantFunction
to feed into vectorized spatial samplers, which sample the function in specified locations. These samples are then compared using another postprocessor. The ConstantFunction
sampled anywhere in time and space will return its constant value.
[Functions]
# Sampled values will be [2, 2, 2]
[./a_fn]
type = ConstantFunction
value = 2
[../]
# Sampled values will be [0, 1, 2]
[./b_fn]
type = ParsedFunction
expression = 'x'
[../]
[]
(test/tests/postprocessors/vector_postprocessor_comparison/vector_postprocessor_comparison.i)Input Parameters
- 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:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
- (modules/phase_field/examples/rigidbodymotion/grain_motion_GT.i)
- (modules/thermal_hydraulics/test/tests/components/flow_channel_1phase/phy.f_fn.3eqn.i)
- (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/open_brayton_cycle.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/phy.conservation_from_file_3d.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.conservation_from_file_3d.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/special/area.i)
- (modules/thermal_hydraulics/test/tests/jacobians/kernels/one_d_3eqn_momentum_form_loss.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/plate.i)
- (modules/functional_expansion_tools/test/tests/errors/bc_flux_bad_function.i)
- (modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d.i)
- (modules/stochastic_tools/test/tests/reporters/stochastic_matrix/sub.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringParabolic.i)
- (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/recuperated_brayton_cycle.i)
- (test/tests/problems/verbose_setup/sample.i)
- (modules/functional_expansion_tools/test/tests/errors/bc_value_bad_function.i)
- (modules/phase_field/examples/rigidbodymotion/grain_forcedensity_ext.i)
- (modules/xfem/test/tests/moving_interface/cut_mesh_2d.i)
- (modules/fluid_properties/test/tests/functions/saturation_density_function/saturation_density_function.i)
- (test/tests/functions/constant_function/constant_function_test.i)
- (test/tests/functormaterials/parsed_functor_material/parsed_functor_material.i)
- (modules/functional_expansion_tools/test/tests/errors/aux_bad_function.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/cylindrical.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/from_file_3d.i)
- (test/tests/misc/check_error/function_conflict.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_appliedforcedensity.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
- (modules/xfem/test/tests/solid_mechanics_basic/edge_crack_2d_propagation.i)
- (modules/thermal_hydraulics/test/tests/functions/piecewise_function/piecewise_function.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringIdeal.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_material_function_product/ad_material_function_product.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringDilute.i)
- (modules/thermal_hydraulics/test/tests/controls/parsed_function_control/test.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringBase.i)
- (test/tests/physics/diffusion_fv.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/special/area.i)
- (modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_fatigue.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/cavity_with_pillar_vf.i)
- (modules/fluid_properties/test/tests/functions/saturation_temperature_function/saturation_temperature_function.i)
- (modules/xfem/test/tests/solid_mechanics_basic/penny_crack_cfp.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/noaction_3d.i)
- (modules/stochastic_tools/test/tests/actions/parameter_study_action/sub_eigen.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/action_3d.i)
- (modules/combined/test/tests/ad_cavity_pressure/additional_volume.i)
- (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/closed_brayton_cycle.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/ld-stress.i)
- (test/tests/postprocessors/function_value_pps/function_value_pps.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/function_side_integral_rz/function_side_integral_rz.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/ld-strain.i)
- (modules/xfem/test/tests/moving_interface/cut_mesh_3d.i)
- (modules/fluid_properties/test/tests/functions/saturation_pressure_function/saturation_pressure_function.i)
- (modules/phase_field/examples/rigidbodymotion/AC_CH_Multigrain.i)
- (test/tests/functions/piecewise_multilinear/oneDa.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialSintering_test.i)
- (test/tests/coord_type/coord_type_rz_integrated.i)
- (modules/xfem/test/tests/solid_mechanics_basic/penny_crack.i)
- (modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_propagation.i)
- (modules/xfem/test/tests/solid_mechanics_basic/elliptical_crack.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase_masscons.i)
- (modules/stochastic_tools/test/tests/multiapps/user_cli_args/sub_transient.i)
- (test/tests/postprocessors/vector_postprocessor_comparison/vector_postprocessor_comparison.i)
- (modules/combined/test/tests/cavity_pressure/additional_volume.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
- (modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless.i)
- (modules/functional_expansion_tools/test/tests/errors/bc_value_penalty_bad_function.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_action_external_boundary.i)
- (modules/stochastic_tools/test/tests/multiapps/user_cli_args/sub_steady.i)
- (test/tests/postprocessors/execute_on_final/execute_on_final.i)
- (modules/thermal_hydraulics/test/tests/components/flow_channel_1phase/phy.par_fn.i)
- (test/tests/physics/diffusion_cg.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.conservation.i)
- (modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_mhs.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_bad_function_series.i)
- (test/tests/multiapps/initial_transfer/parent.i)
(test/tests/postprocessors/vector_postprocessor_comparison/vector_postprocessor_comparison.i)
# This tests the VectorPostprocessorComparison post-processor, which takes two
# vector post-processors and compares them.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 2
[]
[Functions]
# Sampled values will be [2, 2, 2]
[./a_fn]
type = ConstantFunction
value = 2
[../]
# Sampled values will be [0, 1, 2]
[./b_fn]
type = ParsedFunction
expression = 'x'
[../]
[]
[VectorPostprocessors]
[./a_vpp]
type = LineFunctionSampler
functions = 'a_fn'
num_points = 3
start_point = '0 0 0'
end_point = '2 0 0'
sort_by = x
execute_on = 'initial'
[../]
[./b_vpp]
type = LineFunctionSampler
functions = 'b_fn'
num_points = 3
start_point = '0 0 0'
end_point = '2 0 0'
sort_by = x
execute_on = 'initial'
[../]
[]
[Postprocessors]
[./vpp_comparison]
type = VectorPostprocessorComparison
vectorpostprocessor_a = a_vpp
vectorpostprocessor_b = b_vpp
vector_name_a = a_fn
vector_name_b = b_fn
comparison_type = greater_than_equals
execute_on = 'initial'
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base = greater_than_equals
csv = true
show = 'vpp_comparison'
execute_on = 'initial'
[]
(modules/phase_field/examples/rigidbodymotion/grain_motion_GT.i)
# example showing grain motion due to applied force density on grains
[GlobalParams]
var_name_base = eta
op_num = 4
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 80
ny = 40
nz = 0
xmin = 0.0
xmax = 40.0
ymin = 0.0
ymax = 20.0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./PolycrystalVariables]
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = 'eta0 eta1 eta2 eta3'
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1 eta2 eta3'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./RigidBodyMultiKernel]
# Creates all of the necessary Allen Cahn kernels automatically
c = c
f_name = F
mob_name = L
kappa_name = kappa_eta
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
[]
[Functions]
[./load_x]
# Defines the force on the grains in the x-direction
type = ParsedFunction
expression = 0.005*cos(x*pi/600)
[../]
[./load_y]
# Defines the force on the grains in the y-direction
type = ConstantFunction
value = 0.002
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M L kappa_c kappa_eta'
prop_values = '4.5 60 250 4000'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
#coupled_variables = 'c eta0 eta1 eta2 eta3'
#constant_names = 'barr_height cv_eq'
#constant_expressions = '0.1 1.0e-2'
#function = '16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
# +eta0*(1-eta0)*c+eta1*(1-eta1)*c
# +eta2*(1-eta2)*c+eta3*(1-eta3)*c'
constant_names = 'A B'
constant_expressions = '450 1.5'
coupled_variables = 'c eta0 eta1 eta2 eta3' #Must be changed as op_num changes. Copy/paste from line 4
expression = 'A*c^2*(1-c)^2+B*(c^2+6*(1-c)*(eta0^2+eta1^2+eta2^2+eta3^2)
-4*(2-c)*(eta0^3+eta1^3+eta2^3+eta3^3)
+3*(eta0^2+eta1^2+eta2^2+eta3^2)^2)'
derivative_order = 2
[../]
#[./force_density]
# type = ForceDensityMaterial
# c = c
# etas = 'eta0 eta1 eta2 eta3'
#[../]
[./force_density]
type = ExternalForceDensityMaterial
c = c
k = 10.0
etas = 'eta0 eta1 eta2 eta3'
force_x = load_x
force_y = load_y
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
#var_name_base = eta
#op_num = 4.0
v = 'eta0 eta1 eta2 eta3'
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[ICs]
[./ic_eta1]
x_positions = '32.5 24.0'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 14.0'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0
variable = eta1
invalue = 1
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./multip]
x_positions = '5.5 15.5 24.0 32.5 7.0 15.5 24.0 32.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 6.0 6.0 6.0 14.5 14.5 14.0 14.5'
radii = '4.0 4.0 4.0 4.0 4.0 4.0 4.0 4.0'
3D_spheres = false
outvalue = 0.001
variable = c
invalue = 0.999
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta0]
x_positions = '5.5 15.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 6.0'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta2]
x_positions = '24.0 7.0'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 14.5 '
radii = '4.0 4.0 '
3D_spheres = false
outvalue = 0.0
variable = eta2
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta3]
x_positions = '15.5 32.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '14.5 14.5'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0.0
variable = eta3
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
c = c
grain_data = grain_center
force_density = force_density_ext
etas = 'eta0 eta1 eta2 eta3'
execute_on = 'initial linear nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 20
dt = 0.01
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/flow_channel_1phase/phy.f_fn.3eqn.i)
# Tests that friction factor can be provided for 1-phase flow
f = 5
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 558
initial_p = 7.0e6
initial_vel = 0
scaling_factor_1phase = '1e0 1e-2 1e-4'
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
[]
[]
[Functions]
[f_func]
type = ConstantFunction
value = ${f}
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 1
A = 1.907720E-04
D_h = 1.698566E-02
f = f_func
fp = eos
[]
[ht_pipe]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = pipe
T_wall = 559
P_hf = 0.0489623493599167
Hw = 50000
[]
[inlet]
type = InletDensityVelocity1Phase
input = 'pipe:in'
rho = 741.707129779398883
vel = 2
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 7.0e6
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
nl_max_its = 30
l_tol = 1e-2
l_max_its = 30
[]
[Postprocessors]
[f]
type = ADElementIntegralMaterialProperty
mat_prop = f_D
block = pipe
[]
[]
[Outputs]
csv = true
show = 'f'
execute_on = 'timestep_end'
[]
(modules/thermal_hydraulics/test/tests/problems/brayton_cycle/open_brayton_cycle.i)
# This input file is used to demonstrate a simple open-air Brayton cycle using
# a compressor, turbine, shaft, motor, and generator.
# The flow length is divided into 5 segments as illustrated below, where
# - "(I)" denotes the inlet
# - "(C)" denotes the compressor
# - "(T)" denotes the turbine
# - "(O)" denotes the outlet
# - "*" denotes a fictitious junction
#
# Heated section
# (I)-----(C)-----*--------------*-----(T)-----(O)
# 1 2 3 4 5
#
# Initially the fluid is at rest at ambient conditions, the shaft speed is zero,
# and no heat transfer occurs with the system.
# The transient is controlled as follows:
# * 0 - 100 s: motor ramps up torque linearly from zero
# * 100 - 200 s: motor ramps down torque linearly to zero, HTC ramps up linearly from zero.
# * 200 - 300 s: (no changes; should approach steady condition)
I_motor = 1.0
motor_torque_max = 400.0
I_generator = 1.0
generator_torque_per_shaft_speed = -0.00025
motor_ramp_up_duration = 100.0
motor_ramp_down_duration = 100.0
post_motor_time = 100.0
t1 = ${motor_ramp_up_duration}
t2 = ${fparse t1 + motor_ramp_down_duration}
t3 = ${fparse t2 + post_motor_time}
D1 = 0.15
D2 = ${D1}
D3 = ${D1}
D4 = ${D1}
D5 = ${D1}
A1 = ${fparse 0.25 * pi * D1^2}
A2 = ${fparse 0.25 * pi * D2^2}
A3 = ${fparse 0.25 * pi * D3^2}
A4 = ${fparse 0.25 * pi * D4^2}
A5 = ${fparse 0.25 * pi * D5^2}
L1 = 10.0
L2 = ${L1}
L3 = ${L1}
L4 = ${L1}
L5 = ${L1}
x1 = 0.0
x2 = ${fparse x1 + L1}
x3 = ${fparse x2 + L2}
x4 = ${fparse x3 + L3}
x5 = ${fparse x4 + L4}
x2_minus = ${fparse x2 - 0.001}
x2_plus = ${fparse x2 + 0.001}
x5_minus = ${fparse x5 - 0.001}
x5_plus = ${fparse x5 + 0.001}
n_elems1 = 10
n_elems2 = ${n_elems1}
n_elems3 = ${n_elems1}
n_elems4 = ${n_elems1}
n_elems5 = ${n_elems1}
A_ref_comp = ${fparse 0.5 * (A1 + A2)}
V_comp = ${fparse A_ref_comp * 1.0}
I_comp = 1.0
A_ref_turb = ${fparse 0.5 * (A4 + A5)}
V_turb = ${fparse A_ref_turb * 1.0}
I_turb = 1.0
c0_rated_comp = 351.6925137
rho0_rated_comp = 1.146881112
rated_mfr = 0.25
speed_rated_rpm = 96000
speed_rated = ${fparse speed_rated_rpm * 2 * pi / 60.0}
speed_initial = 0
eff_comp = 0.79
eff_turb = 0.843
T_hot = 1000
T_ambient = 300
p_ambient = 1e5
[GlobalParams]
orientation = '1 0 0'
gravity_vector = '0 0 0'
initial_p = ${p_ambient}
initial_T = ${T_ambient}
initial_vel = 0
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
fp = fp_air
closures = closures
f = 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
rdg_slope_reconstruction = none
[]
[Functions]
[motor_torque_fn]
type = PiecewiseLinear
x = '0 ${t1} ${t2}'
y = '0 ${motor_torque_max} 0'
[]
[motor_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'motor_torque shaft:omega'
[]
[generator_torque_fn]
type = ParsedFunction
expression = 'slope * t'
symbol_names = 'slope'
symbol_values = '${generator_torque_per_shaft_speed}'
[]
[generator_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'generator_torque shaft:omega'
[]
[htc_wall_fn]
type = PiecewiseLinear
x = '0 ${t1} ${t2}'
y = '0 0 1e3'
[]
[]
[FluidProperties]
[fp_air]
type = IdealGasFluidProperties
emit_on_nan = none
[]
[]
[Closures]
[closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[shaft]
type = Shaft
connected_components = 'motor compressor turbine generator'
initial_speed = ${speed_initial}
[]
[motor]
type = ShaftConnectedMotor
inertia = ${I_motor}
torque = 0 # controlled
[]
[generator]
type = ShaftConnectedMotor
inertia = ${I_generator}
torque = generator_torque_fn
[]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
p0 = ${p_ambient}
T0 = ${T_ambient}
[]
[pipe1]
type = FlowChannel1Phase
position = '${x1} 0 0'
length = ${L1}
n_elems = ${n_elems1}
A = ${A1}
[]
[compressor]
type = ShaftConnectedCompressor1Phase
position = '${x2} 0 0'
inlet = 'pipe1:out'
outlet = 'pipe2:in'
A_ref = ${A_ref_comp}
volume = ${V_comp}
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
speeds = '0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_comp1 rp_comp2 rp_comp3 rp_comp4 rp_comp5'
eff_functions = 'eff_comp1 eff_comp2 eff_comp3 eff_comp4 eff_comp5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_comp}
inertia_coeff = '${I_comp} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
[pipe2]
type = FlowChannel1Phase
position = '${x2} 0 0'
length = ${L2}
n_elems = ${n_elems2}
A = ${A2}
[]
[junction2_3]
type = JunctionOneToOne1Phase
connections = 'pipe2:out pipe3:in'
[]
[pipe3]
type = FlowChannel1Phase
position = '${x3} 0 0'
length = ${L3}
n_elems = ${n_elems3}
A = ${A3}
[]
[junction3_4]
type = JunctionOneToOne1Phase
connections = 'pipe3:out pipe4:in'
[]
[pipe4]
type = FlowChannel1Phase
position = '${x4} 0 0'
length = ${L4}
n_elems = ${n_elems4}
A = ${A4}
[]
[turbine]
type = ShaftConnectedCompressor1Phase
position = '${x5} 0 0'
inlet = 'pipe4:out'
outlet = 'pipe5:in'
A_ref = ${A_ref_turb}
volume = ${V_turb}
treat_as_turbine = true
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
speeds = '0 0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_turb0 rp_turb1 rp_turb2 rp_turb3 rp_turb4 rp_turb5'
eff_functions = 'eff_turb1 eff_turb1 eff_turb2 eff_turb3 eff_turb4 eff_turb5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_turb}
inertia_coeff = '${I_turb} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
[pipe5]
type = FlowChannel1Phase
position = '${x5} 0 0'
length = ${L5}
n_elems = ${n_elems5}
A = ${A5}
[]
[outlet]
type = Outlet1Phase
input = 'pipe5:out'
p = ${p_ambient}
[]
[heating]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = pipe3
T_wall = ${T_hot}
Hw = htc_wall_fn
[]
[]
[ControlLogic]
[motor_ctrl]
type = TimeFunctionComponentControl
component = motor
parameter = torque
function = motor_torque_fn
[]
[]
[Postprocessors]
[heating_rate]
type = ADHeatRateConvection1Phase
block = 'pipe3'
T = T
T_wall = T_wall
Hw = Hw
P_hf = P_hf
execute_on = 'INITIAL TIMESTEP_END'
[]
[motor_torque]
type = RealComponentParameterValuePostprocessor
component = motor
parameter = torque
execute_on = 'INITIAL TIMESTEP_END'
[]
[motor_power]
type = FunctionValuePostprocessor
function = motor_power_fn
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'motor_torque shaft:omega'
[]
[generator_torque]
type = ShaftConnectedComponentPostprocessor
quantity = torque
shaft_connected_component_uo = generator:shaftconnected_uo
execute_on = 'INITIAL TIMESTEP_END'
[]
[generator_power]
type = FunctionValuePostprocessor
function = generator_power_fn
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'generator_torque shaft:omega'
[]
[shaft_speed]
type = ScalarVariable
variable = 'shaft:omega'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_in_comp]
type = PointValue
variable = p
point = '${x2_minus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_comp]
type = PointValue
variable = p
point = '${x2_plus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_comp]
type = ParsedPostprocessor
pp_names = 'p_in_comp p_out_comp'
function = 'p_out_comp / p_in_comp'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_in_turb]
type = PointValue
variable = p
point = '${x5_minus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_turb]
type = PointValue
variable = p
point = '${x5_plus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_turb]
type = ParsedPostprocessor
pp_names = 'p_in_turb p_out_turb'
function = 'p_in_turb / p_out_turb'
execute_on = 'INITIAL TIMESTEP_END'
[]
[mfr_comp]
type = ADFlowJunctionFlux1Phase
boundary = pipe1:out
connection_index = 0
equation = mass
junction = compressor
[]
[mfr_turb]
type = ADFlowJunctionFlux1Phase
boundary = pipe4:out
connection_index = 0
equation = mass
junction = turbine
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
end_time = ${t3}
dt = 0.1
abort_on_solve_fail = true
solve_type = NEWTON
nl_rel_tol = 1e-50
nl_abs_tol = 1e-11
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
[csv]
type = CSV
file_base = 'open_brayton_cycle'
execute_vector_postprocessors_on = 'INITIAL'
[]
[console]
type = Console
show = 'shaft_speed p_ratio_comp p_ratio_turb compressor:pressure_ratio turbine:pressure_ratio'
[]
[]
[Functions]
# compressor pressure ratio
[rp_comp1]
type = PiecewiseLinear
data_file = 'rp_comp1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp2]
type = PiecewiseLinear
data_file = 'rp_comp2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp3]
type = PiecewiseLinear
data_file = 'rp_comp3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp4]
type = PiecewiseLinear
data_file = 'rp_comp4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp5]
type = PiecewiseLinear
data_file = 'rp_comp5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# compressor efficiency
[eff_comp1]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp2]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp3]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp4]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp5]
type = ConstantFunction
value = ${eff_comp}
[]
# turbine pressure ratio
[rp_turb0]
type = ConstantFunction
value = 1
[]
[rp_turb1]
type = PiecewiseLinear
data_file = 'rp_turb1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb2]
type = PiecewiseLinear
data_file = 'rp_turb2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb3]
type = PiecewiseLinear
data_file = 'rp_turb3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb4]
type = PiecewiseLinear
data_file = 'rp_turb4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb5]
type = PiecewiseLinear
data_file = 'rp_turb5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# turbine efficiency
[eff_turb1]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb2]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb3]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb4]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb5]
type = ConstantFunction
value = ${eff_turb}
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/phy.conservation_from_file_3d.i)
t = 0.5
# these are the dimensions of rgn1 from box.e
width = 1.5
height = 5
depth = 2
density = 3
specific_heat_capacity = 1
conductivity = 5
power_density = 20
E_change = ${fparse power_density * width * height * depth * t}
[Functions]
[power_density_fn]
type = ConstantFunction
value = ${power_density}
[]
[]
[AuxVariables]
[power_density]
family = MONOMIAL
order = CONSTANT
block = 'heat_structure:rgn1'
[]
[]
[AuxKernels]
[mock_power_aux]
type = FunctionAux
variable = power_density
function = power_density_fn
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'heat_structure:rgn1 heat_structure:rgn2'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${density} ${specific_heat_capacity} ${conductivity}'
[]
[]
[Components]
[heat_structure]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = 300
[]
[heat_generation]
type = HeatSourceFromPowerDensity
hs = heat_structure
regions = 'rgn1'
power_density = power_density
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergy3D
block = 'heat_structure:rgn1 heat_structure:rgn2'
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
[E_tot_change_rel_err]
type = RelativeDifferencePostprocessor
value1 = E_tot_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'newton'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
start_time = 0.0
dt = 0.5
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
csv = true
show = 'E_tot_change_rel_err'
execute_on = 'final'
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.conservation_from_file_3d.i)
# Tests energy conservation for HeatStructureFromFile3D in combination with HeatSourceFromTotalPower
power = 1e5
power_fraction = 0.3
t = 1
energy_change = ${fparse power_fraction * power * t}
[Functions]
[power_shape]
type = ConstantFunction
value = 0.4
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'heat_structure:rgn1 heat_structure:rgn2'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '100 500 1e4'
[]
[]
[Components]
[heat_structure]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = 300
[]
[heat_generation]
type = HeatSourceFromTotalPower
hs = heat_structure
regions = 'rgn1'
power = total_power
power_fraction = ${power_fraction}
[]
[total_power]
type = TotalPower
power = ${power}
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergy3D
block = 'heat_structure:rgn1 heat_structure:rgn2'
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
[E_tot_change_rel_err]
type = RelativeDifferencePostprocessor
value1 = E_tot_change
value2 = ${energy_change}
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
start_time = 0.0
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
csv = true
show = 'E_tot_change_rel_err'
execute_on = 'final'
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/special/area.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
[]
[]
[Kernels]
[sdx]
type = UpdatedLagrangianStressDivergence
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[sdy]
type = UpdatedLagrangianStressDivergence
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[sdz]
type = UpdatedLagrangianStressDivergence
variable = disp_z
component = 2
use_displaced_mesh = true
[]
[]
[AuxVariables]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[zstress]
type = PiecewiseLinear
x = '0 1'
y = '0 500'
[]
[constant]
type = ConstantFunction
value = 1.0
[]
[ratio]
type = ParsedFunction
symbol_names = 'sd su'
symbol_values = 's_def s_undef'
expression = 'sd / su'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[boty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[backz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[pull_z]
type = FunctionNeumannBC
boundary = front
variable = disp_z
function = zstress
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000.0
poissons_ratio = 0.25
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[s_undef]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
[]
[s_def]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
use_displaced_mesh = true
[]
[area_calc]
type = FunctionValuePostprocessor
function = ratio
[]
[area]
type = AreaPostprocessor
boundary = front
use_displaced_mesh = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 1.0
[]
[Outputs]
exodus = false
csv = true
[]
(modules/thermal_hydraulics/test/tests/jacobians/kernels/one_d_3eqn_momentum_form_loss.i)
[JacobianTestGeneral]
variable_names = 'arhoA arhouA arhoEA'
variable_values = '3 4 5'
aux_variable_names = 'A'
aux_variable_values = '1'
snes_test_err = 1e-8
[]
[Materials]
[rho_mat]
type = LinearTestMaterial
name = rho
symbol_names = 'arhoA'
slopes = '4'
[]
[vel_mat]
type = LinearTestMaterial
name = vel
symbol_names = 'arhoA arhouA'
slopes = '5 6'
[]
[K_prime_mat]
type = GenericFunctionMaterial
prop_names = 'K_prime'
prop_values = 'K_prime_fn'
[]
[]
[Functions]
[K_prime_fn]
type = ConstantFunction
value = 1
[]
[]
[Kernels]
[test_kernel]
type = OneD3EqnMomentumFormLoss
variable = arhouA
arhoA = arhoA
arhouA = arhouA
arhoEA = arhoEA
A = A
rho = rho
vel = vel
[]
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/plate.i)
T_hs = 300
heat_flux = 1000
t = 0.001
L = 2
thickness = 0.5
depth = 0.6
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
A = ${fparse L * depth}
scale = 0.8
E_change = ${fparse scale * heat_flux * A * t}
[Functions]
[q_fn]
type = ConstantFunction
value = ${heat_flux}
[]
[]
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
rho = ${density}
cp = ${specific_heat_capacity}
k = ${conductivity}
[]
[]
[Components]
[hs]
type = HeatStructurePlate
orientation = '0 0 1'
position = '0 0 0'
length = ${L}
n_elems = 10
depth = ${depth}
widths = '${thickness}'
n_part_elems = '10'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
names = 'region'
initial_T = ${T_hs}
[]
[heat_flux_boundary]
type = HSBoundaryHeatFlux
boundary = 'hs:outer'
hs = hs
q = q_fn
scale = ${scale}
[]
[]
[Postprocessors]
[E_hs]
type = ADHeatStructureEnergy
block = 'hs:region'
plate_depth = ${depth}
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr'
execute_on = 'FINAL'
[]
[]
(modules/functional_expansion_tools/test/tests/errors/bc_flux_bad_function.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./v]
[../]
[]
[BCs]
[./this_could_be_bad]
type = FXFluxBC
boundary = right
function = const
variable = v
[../]
[]
[Functions]
[./const]
type = ConstantFunction
value = -1
[../]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 2
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.2
elem_type = HEX8
[]
[UserObjects]
[./square_cut_uo]
type = RectangleCutUserObject
cut_data = ' -0.001 0.5 -0.001
0.401 0.5 -0.001
0.401 0.5 0.201
-0.001 0.5 0.201'
[../]
[]
[AuxVariables]
[./SED]
order = CONSTANT
family = MONOMIAL
[../]
[]
[DomainIntegral]
integrals = 'Jintegral InteractionIntegralKI'
crack_front_points = '0.4 0.5 0.0
0.4 0.5 0.1
0.4 0.5 0.2'
crack_direction_method = CrackDirectionVector
crack_direction_vector = '1 0 0'
radius_inner = '0.2'
radius_outer = '0.4'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 0
incremental = true
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
[../]
[]
[AuxKernels]
[./SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
block = 0
[../]
[]
[Functions]
[./top_trac_y]
type = ConstantFunction
value = 10
[../]
[]
[BCs]
[./top_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = top_trac_y
[../]
[./bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
block = 0
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 1.0
[]
[Outputs]
file_base = edge_crack_3d_out
execute_on = 'timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/stochastic_tools/test/tests/reporters/stochastic_matrix/sub.i)
[StochasticTools]
[]
[Functions]
[afun]
type = ConstantFunction
value = 11
[]
[bfun]
type = ConstantFunction
value = 22
[]
[cfun]
type = ConstantFunction
value = 33
[]
[dfun]
type = ConstantFunction
value = 44
[]
[fun]
type = ParsedFunction
value = 'a*1000000 + b*10000 + c*100 + d'
vars = 'a b c d'
vals = 'afun bfun cfun dfun'
[]
[]
[Postprocessors/val]
type = FunctionValuePostprocessor
function = fun
[]
[Controls/receiver]
type = SamplerReceiver
[]
[Outputs]
console = false
[]
(modules/phase_field/test/tests/GrandPotentialPFM/SinteringParabolic.i)
#input file to test the GrandPotentialSinteringMaterial using the parabolic energy profile
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 10
xmin = 0
xmax = 660
ymin = 0
ymax = 380
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[./InitialCondition]
type = FunctionIC
variable = w
function = f_w
[../]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 470'
y_positions = '190 190'
z_positions = ' 0 0'
radii = '150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 470
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[./f_w]
type = ParsedFunction
expression = '1.515e-7 * x'
[../]
[]
[Materials]
# Free energy coefficients for parabolic curve
[./ks]
type = ParsedMaterial
property_name = ks
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.0025 157.16'
expression = 'a*T + b'
[../]
[./kv]
type = ParsedMaterial
property_name = kv
material_property_names = 'ks'
expression = '10 * ks'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef Egb kB'
constant_expressions = '2.69 2.1 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2; cb:=exp(-Ef/kB/T); cgb:=exp(-(Ef-Egb)/kB/T);
cb + 4.0*(cgb-cb)*(1.0 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = PARABOLIC
outputs = exodus
[../]
# Concentration is only meant for output
[./c]
type = ParsedMaterial
property_name = c
material_property_names = 'hs rhos hv rhov'
constant_names = 'Va'
constant_expressions = '0.04092'
expression = 'Va*(hs*rhos + hv*rhov)'
outputs = exodus
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 2
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/problems/brayton_cycle/recuperated_brayton_cycle.i)
# This input file models an open, recuperated Brayton cycle with a PID
# controlled start up using a coupled motor.
#
# Heat is supplied to the system by a volumetric heat source, and a second heat
# source is used to model a recuperator. The recuperator transfers heat from the
# turbine exhaust gas to the compressor outlet gas.
#
# Initially the fluid and heat structures are at rest at ambient conditions,
# and the shaft speed is zero.
# The transient is controlled as follows:
# * 0 - 2000 s: Motor increases shaft speed to approx. 85,000 RPM by PID control
# * 1000 - 8600 s: Power in main heat source increases from 0 - 104 kW
# * 2000 - 200000 s: Torque supplied by turbine increases to steady state level
# as working fluid temperature increases. Torque supplied by
# the motor is ramped down to 0 N-m transitioning shaft control
# to the turbine at its rated speed of 96,000 RPM.
I_motor = 1.0
I_generator = 1.0
generator_torque_per_shaft_speed = -0.00025
motor_ramp_up_duration = 3605
motor_ramp_down_duration = 1800
post_motor_time = 2160000
t1 = ${motor_ramp_up_duration}
t2 = ${fparse t1 + motor_ramp_down_duration}
t3 = ${fparse t2 + post_motor_time}
D1 = 0.15
D2 = ${D1}
D3 = ${D1}
D4 = ${D1}
D5 = ${D1}
D6 = ${D1}
D7 = ${D1}
D8 = ${D1}
A1 = ${fparse 0.25 * pi * D1^2}
A2 = ${fparse 0.25 * pi * D2^2}
A3 = ${fparse 0.25 * pi * D3^2}
A4 = ${fparse 0.25 * pi * D4^2}
A5 = ${fparse 0.25 * pi * D5^2}
A6 = ${fparse 0.25 * pi * D6^2}
A7 = ${fparse 0.25 * pi * D7^2}
A8 = ${fparse 0.25 * pi * D8^2}
recuperator_width = 0.15
L1 = 5.0
L2 = ${L1}
L3 = ${fparse 2 * L1}
L4 = ${fparse 2 * L1}
L5 = ${L1}
L6 = ${L1}
L7 = ${fparse L1 + recuperator_width}
L8 = ${L1}
x1 = 0.0
x2 = ${fparse x1 + L1}
x3 = ${fparse x2 + L2}
x4 = ${x3}
x5 = ${fparse x4 - L4}
x6 = ${x5}
x7 = ${fparse x6 + L6}
x8 = ${fparse x7 + L7}
y1 = 0
y2 = ${y1}
y3 = ${y2}
y4 = ${fparse y3 - L3}
y5 = ${y4}
y6 = ${fparse y5 + L5}
y7 = ${y6}
y8 = ${y7}
x1_out = ${fparse x1 + L1 - 0.001}
x2_in = ${fparse x2 + 0.001}
y5_in = ${fparse y5 + 0.001}
x6_out = ${fparse x6 + L6 - 0.001}
x7_in = ${fparse x7 + 0.001}
y8_in = ${fparse y8 + 0.001}
y8_out = ${fparse y8 + L8 - 0.001}
hot_leg_in = ${y8_in}
hot_leg_out = ${y8_out}
cold_leg_in = ${fparse y3 - 0.001}
cold_leg_out = ${fparse y3 - (L3/2) - 0.001}
n_elems1 = 5
n_elems2 = ${n_elems1}
n_elems3 = ${fparse 2 * n_elems1}
n_elems4 = ${fparse 2 * n_elems1}
n_elems5 = ${n_elems1}
n_elems6 = ${n_elems1}
n_elems7 = ${n_elems1}
n_elems8 = ${n_elems1}
A_ref_comp = ${fparse 0.5 * (A1 + A2)}
V_comp = ${fparse A_ref_comp * 1.0}
I_comp = 1.0
A_ref_turb = ${fparse 0.5 * (A4 + A5)}
V_turb = ${fparse A_ref_turb * 1.0}
I_turb = 1.0
c0_rated_comp = 351.6925137
rho0_rated_comp = 1.146881112
rated_mfr = 0.25
speed_rated_rpm = 96000
speed_rated = ${fparse speed_rated_rpm * 2 * pi / 60.0}
speed_initial = 0
eff_comp = 0.79
eff_turb = 0.843
T_ambient = 300
p_ambient = 1e5
hs_power = 105750
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = ${p_ambient}
initial_T = ${T_ambient}
initial_vel = 0
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
fp = fp_air
closures = closures
f = 0
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-5
scaling_factor_temperature = 1e-2
rdg_slope_reconstruction = none
[]
[FluidProperties]
[fp_air]
type = IdealGasFluidProperties
emit_on_nan = none
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Closures]
[closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
##########################
# Motor
##########################
# Functions for control logic that determines when to shut off the PID system
[is_tripped_fn]
type = ParsedFunction
symbol_names = 'motor_torque turbine_torque'
symbol_values = 'motor_torque turbine_torque'
expression = 'turbine_torque > motor_torque'
[]
[PID_tripped_constant_value]
type = ConstantFunction
value = 1
[]
[PID_tripped_status_fn]
type = ParsedFunction
symbol_values = 'PID_trip_status'
symbol_names = 'PID_trip_status'
expression = 'PID_trip_status'
[]
[time_fn]
type = ParsedFunction
expression = t
[]
# Shutdown function which ramps down the motor once told by the control logic
[motor_torque_fn_shutdown]
type = ParsedFunction
symbol_values = 'PID_trip_status time_trip'
symbol_names = 'PID_trip_status time_trip'
expression = 'if(PID_trip_status = 1, max(2.4 - (2.4 * ((t - time_trip) / 35000)),0.0), 1)'
[]
# Generates motor power curve
[motor_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'motor_torque shaft:omega'
[]
##########################
# Generator
##########################
# Generates generator torque curve
[generator_torque_fn]
type = ParsedFunction
expression = 'slope * t'
symbol_names = 'slope'
symbol_values = '${generator_torque_per_shaft_speed}'
[]
# Generates generator power curve
[generator_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'generator_torque shaft:omega'
[]
##########################
# Reactor
##########################
# Ramps up reactor power when activated by control logic
[power_fn]
type = PiecewiseLinear
x = '0 1000 8600'
y = '0 0 ${hs_power}'
[]
##########################
# Compressor
##########################
# compressor pressure ratios
[rp_comp1]
type = PiecewiseLinear
data_file = 'rp_comp1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp2]
type = PiecewiseLinear
data_file = 'rp_comp2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp3]
type = PiecewiseLinear
data_file = 'rp_comp3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp4]
type = PiecewiseLinear
data_file = 'rp_comp4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp5]
type = PiecewiseLinear
data_file = 'rp_comp5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# compressor efficiencies
[eff_comp1]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp2]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp3]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp4]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp5]
type = ConstantFunction
value = ${eff_comp}
[]
##########################
# Turbine
##########################
# turbine pressure ratios
[rp_turb0]
type = ConstantFunction
value = 1
[]
[rp_turb1]
type = PiecewiseLinear
data_file = 'rp_turb1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb2]
type = PiecewiseLinear
data_file = 'rp_turb2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb3]
type = PiecewiseLinear
data_file = 'rp_turb3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb4]
type = PiecewiseLinear
data_file = 'rp_turb4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb5]
type = PiecewiseLinear
data_file = 'rp_turb5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# turbine efficiency
[eff_turb1]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb2]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb3]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb4]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb5]
type = ConstantFunction
value = ${eff_turb}
[]
[]
[Components]
# system inlet pulling air from the open atmosphere
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
p0 = ${p_ambient}
T0 = ${T_ambient}
[]
# Inlet pipe
[pipe1]
type = FlowChannel1Phase
position = '${x1} ${y1} 0'
orientation = '1 0 0'
length = ${L1}
n_elems = ${n_elems1}
A = ${A1}
[]
# Compressor as defined in MAGNET PCU document (Guillen 2020)
[compressor]
type = ShaftConnectedCompressor1Phase
position = '${x2} ${y2} 0'
inlet = 'pipe1:out'
outlet = 'pipe2:in'
A_ref = ${A_ref_comp}
volume = ${V_comp}
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
# Determines which compression ratio curve and efficiency curve to use depending on ratio of speed/rated_speed
speeds = '0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_comp1 rp_comp2 rp_comp3 rp_comp4 rp_comp5'
eff_functions = 'eff_comp1 eff_comp2 eff_comp3 eff_comp4 eff_comp5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_comp}
inertia_coeff = '${I_comp} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
# Outlet pipe from the compressor
[pipe2]
type = FlowChannel1Phase
position = '${x2} ${y2} 0'
orientation = '1 0 0'
length = ${L2}
n_elems = ${n_elems2}
A = ${A2}
[]
# 90 degree connection between pipe 2 and 3
[junction2_cold_leg]
type = VolumeJunction1Phase
connections = 'pipe2:out cold_leg:in'
position = '${x3} ${y3} 0'
volume = ${fparse A2*0.1}
[]
# Cold leg of the recuperator
[cold_leg]
type = FlowChannel1Phase
position = '${x3} ${y3} 0'
orientation = '0 -1 0'
length = ${fparse L3/2}
n_elems = ${fparse n_elems3/2}
A = ${A3}
[]
# Recuperator which transfers heat from exhaust gas to reactor inlet gas to improve thermal efficency
[recuperator]
type = HeatStructureCylindrical
orientation = '0 -1 0'
position = '${x3} ${y3} 0'
length = ${fparse L3/2}
widths = ${recuperator_width}
n_elems = ${fparse n_elems3/2}
n_part_elems = 2
names = recuperator
solid_properties = steel
solid_properties_T_ref = '300'
inner_radius = ${D1}
[]
# heat transfer from recuperator to cold leg
[heat_transfer_cold_leg]
type = HeatTransferFromHeatStructure1Phase
flow_channel = cold_leg
hs = recuperator
hs_side = OUTER
Hw = 10000
[]
# heat transfer from hot leg to recuperator
[heat_transfer_hot_leg]
type = HeatTransferFromHeatStructure1Phase
flow_channel = hot_leg
hs = recuperator
hs_side = INNER
Hw = 10000
[]
[junction_cold_leg_3]
type = JunctionOneToOne1Phase
connections = 'cold_leg:out pipe3:in'
[]
[pipe3]
type = FlowChannel1Phase
position = '${x3} ${fparse y3 - (L3/2)} 0'
orientation = '0 -1 0'
length = ${fparse L3/2}
n_elems = ${fparse n_elems3/2}
A = ${A3}
[]
# 90 degree connection between pipe 3 and 4
[junction3_4]
type = VolumeJunction1Phase
connections = 'pipe3:out pipe4:in'
position = '${x4} ${y4} 0'
volume = ${fparse A3*0.1}
[]
# Pipe through the "reactor core"
[pipe4]
type = FlowChannel1Phase
position = '${x4} ${y4} 0'
orientation = '-1 0 0'
length = ${L4}
n_elems = ${n_elems4}
A = ${A4}
[]
# "Reactor Core" and it's associated heat transfer to pipe 4
[reactor]
type = HeatStructureCylindrical
orientation = '-1 0 0'
position = '${x4} ${y4} 0'
length = ${L4}
widths = 0.15
n_elems = ${n_elems4}
n_part_elems = 2
names = core
solid_properties = steel
solid_properties_T_ref = '300'
[]
[total_power]
type = TotalPower
power = 0
[]
[heat_generation]
type = HeatSourceFromTotalPower
power = total_power
hs = reactor
regions = core
[]
[heat_transfer]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe4
hs = reactor
hs_side = OUTER
Hw = 10000
[]
# 90 degree connection between pipe 4 and 5
[junction4_5]
type = VolumeJunction1Phase
connections = 'pipe4:out pipe5:in'
position = '${x5} ${y5} 0'
volume = ${fparse A4*0.1}
[]
# Pipe carrying hot gas back to the PCU
[pipe5]
type = FlowChannel1Phase
position = '${x5} ${y5} 0'
orientation = '0 1 0'
length = ${L5}
n_elems = ${n_elems5}
A = ${A5}
[]
# 90 degree connection between pipe 5 and 6
[junction5_6]
type = VolumeJunction1Phase
connections = 'pipe5:out pipe6:in'
position = '${x6} ${y6} 0'
volume = ${fparse A5*0.1}
[]
# Inlet pipe to the turbine
[pipe6]
type = FlowChannel1Phase
position = '${x6} ${y6} 0'
orientation = '1 0 0'
length = ${L6}
n_elems = ${n_elems6}
A = ${A6}
[]
# Turbine as defined in MAGNET PCU document (Guillen 2020) and (Wright 2006)
[turbine]
type = ShaftConnectedCompressor1Phase
position = '${x7} ${y7} 0'
inlet = 'pipe6:out'
outlet = 'pipe7:in'
A_ref = ${A_ref_turb}
volume = ${V_turb}
# A turbine is treated as an "inverse" compressor, this value determines if component is to be treated as turbine or compressor
# If treat_as_turbine is omitted, code automatically assumes it is a compressor
treat_as_turbine = true
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
# Determines which compression ratio curve and efficiency curve to use depending on ratio of speed/rated_speed
speeds = '0 0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_turb0 rp_turb1 rp_turb2 rp_turb3 rp_turb4 rp_turb5'
eff_functions = 'eff_turb1 eff_turb1 eff_turb2 eff_turb3 eff_turb4 eff_turb5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_turb}
inertia_coeff = '${I_turb} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
# Outlet pipe from turbine
[pipe7]
type = FlowChannel1Phase
position = '${x7} ${y7} 0'
orientation = '1 0 0'
length = ${L7}
n_elems = ${n_elems7}
A = ${A7}
[]
# 90 degree connection between pipe 7 and 8
[junction7_hot_leg]
type = VolumeJunction1Phase
connections = 'pipe7:out hot_leg:in'
position = '${x8} ${y8} 0'
volume = ${fparse A7*0.1}
[]
# Hot leg of the recuperator
[hot_leg]
type = FlowChannel1Phase
position = '${x8} ${y8} 0'
orientation = '0 1 0'
length = ${L8}
n_elems = ${n_elems8}
A = ${A8}
[]
# System outlet dumping exhaust gas to the atmosphere
[outlet]
type = Outlet1Phase
input = 'hot_leg:out'
p = ${p_ambient}
[]
# Roatating shaft connecting motor, compressor, turbine, and generator
[shaft]
type = Shaft
connected_components = 'motor compressor turbine generator'
initial_speed = ${speed_initial}
[]
# 3-Phase electircal motor used for system start-up, controlled by PID
[motor]
type = ShaftConnectedMotor
inertia = ${I_motor}
torque = 0 # controlled
[]
# Electric generator supplying power to the grid
[generator]
type = ShaftConnectedMotor
inertia = ${I_generator}
torque = generator_torque_fn
[]
[]
# Control logics which govern startup of the motor, startup of the "reactor core", and shutdown of the motor
[ControlLogic]
# Sets desired shaft speed to be reached by motor NOTE: SHOULD BE SET LOWER THAN RATED TURBINE RPM
[set_point]
type = GetFunctionValueControl
function = ${fparse speed_rated_rpm - 9000}
[]
# PID with gains determined by iterative process NOTE: Gain values are system specific
[initial_motor_PID]
type = PIDControl
set_point = set_point:value
input = shaft_RPM
initial_value = 0
K_p = 0.0011
K_i = 0.00000004
K_d = 0
[]
# Determines when the PID system should be running and when it should begin the shutdown cycle. If needed: PID output, else: shutdown function
[logic]
type = ParsedFunctionControl
function = 'if(motor+0.5 > turb, PID, shutdown_fn)'
symbol_names = 'motor turb PID shutdown_fn'
symbol_values = 'motor_torque turbine_torque initial_motor_PID:output motor_torque_fn_shutdown'
[]
# Takes the output generated in [logic] and applies it to the motor torque
[motor_PID]
type = SetComponentRealValueControl
component = motor
parameter = torque
value = logic:value
[]
# Determines when to turn on heat source
[power_logic]
type = ParsedFunctionControl
function = 'power_fn'
symbol_names = 'power_fn'
symbol_values = 'power_fn'
[]
# Applies heat source to the total_power block
[power_applied]
type = SetComponentRealValueControl
component = total_power
parameter = power
value = power_logic:value
[]
[]
[Controls]
# Enables set_PID_tripped
[PID_trip_status]
type = ConditionalFunctionEnableControl
conditional_function = is_tripped_fn
enable_objects = 'AuxScalarKernels::PID_trip_status_aux'
execute_on = 'TIMESTEP_END'
[]
# Enables set_time_PID
[time_PID]
type = ConditionalFunctionEnableControl
conditional_function = PID_tripped_status_fn
disable_objects = 'AuxScalarKernels::time_trip_aux'
execute_on = 'TIMESTEP_END'
[]
[]
[AuxVariables]
# Creates a variable that will later be set to the time when tau_turbine > tau_motor
[time_trip]
order = FIRST
family = SCALAR
[]
# Creates variable which indicates if tau_turbine > tau_motor....... If tau_motor > tau_turbine, 0, else 1
[PID_trip_status]
order = FIRST
family = SCALAR
initial_condition = 0
[]
[]
[AuxScalarKernels]
# Creates variable from time_fn which indicates when tau_turbine > tau_motor
[time_trip_aux]
type = FunctionScalarAux
function = time_fn
variable = time_trip
execute_on = 'TIMESTEP_END'
[]
# Overwrites variable PID_trip_status to the value from PID_tripped_constant_value (changes 0 to 1)
[PID_trip_status_aux]
type = FunctionScalarAux
function = PID_tripped_constant_value
variable = PID_trip_status
execute_on = 'TIMESTEP_END'
enable = false
[]
[]
[Postprocessors]
# Indicates when tau_turbine > tau_motor
[trip_time]
type = ScalarVariable
variable = time_trip
execute_on = 'TIMESTEP_END'
[]
##########################
# Motor
##########################
[motor_torque]
type = RealComponentParameterValuePostprocessor
component = motor
parameter = torque
execute_on = 'INITIAL TIMESTEP_END'
[]
[motor_power]
type = FunctionValuePostprocessor
function = motor_power_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# generator
##########################
[generator_torque]
type = ShaftConnectedComponentPostprocessor
quantity = torque
shaft_connected_component_uo = generator:shaftconnected_uo
execute_on = 'INITIAL TIMESTEP_END'
[]
[generator_power]
type = FunctionValuePostprocessor
function = generator_power_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# Shaft
##########################
# Speed in rad/s
[shaft_speed]
type = ScalarVariable
variable = 'shaft:omega'
execute_on = 'INITIAL TIMESTEP_END'
[]
# speed in RPM
[shaft_RPM]
type = ParsedPostprocessor
pp_names = 'shaft_speed'
function = '(shaft_speed * 60) /( 2 * ${fparse pi})'
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# Compressor
##########################
[comp_dissipation_torque]
type = ScalarVariable
variable = 'compressor:dissipation_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[comp_isentropic_torque]
type = ScalarVariable
variable = 'compressor:isentropic_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[comp_friction_torque]
type = ScalarVariable
variable = 'compressor:friction_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[compressor_torque]
type = ParsedPostprocessor
pp_names = 'comp_dissipation_torque comp_isentropic_torque comp_friction_torque'
function = 'comp_dissipation_torque + comp_isentropic_torque + comp_friction_torque'
[]
[p_in_comp]
type = PointValue
variable = p
point = '${x1_out} ${y1} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_comp]
type = PointValue
variable = p
point = '${x2_in} ${y2} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_comp]
type = ParsedPostprocessor
pp_names = 'p_in_comp p_out_comp'
function = 'p_out_comp / p_in_comp'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_in_comp]
type = PointValue
variable = T
point = '${x1_out} ${y1} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_out_comp]
type = PointValue
variable = T
point = '${x2_in} ${y2} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_ratio_comp]
type = ParsedPostprocessor
pp_names = 'T_in_comp T_out_comp'
function = '(T_out_comp - T_in_comp) / T_out_comp'
execute_on = 'INITIAL TIMESTEP_END'
[]
[mfr_comp]
type = ADFlowJunctionFlux1Phase
boundary = pipe1:out
connection_index = 0
equation = mass
junction = compressor
[]
##########################
# turbine
##########################
[turb_dissipation_torque]
type = ScalarVariable
variable = 'turbine:dissipation_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[turb_isentropic_torque]
type = ScalarVariable
variable = 'turbine:isentropic_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[turb_friction_torque]
type = ScalarVariable
variable = 'turbine:friction_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[turbine_torque]
type = ParsedPostprocessor
pp_names = 'turb_dissipation_torque turb_isentropic_torque turb_friction_torque'
function = 'turb_dissipation_torque + turb_isentropic_torque + turb_friction_torque'
[]
[p_in_turb]
type = PointValue
variable = p
point = '${x6_out} ${y6} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_turb]
type = PointValue
variable = p
point = '${x7_in} ${y7} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_turb]
type = ParsedPostprocessor
pp_names = 'p_in_turb p_out_turb'
function = 'p_in_turb / p_out_turb'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_in_turb]
type = PointValue
variable = T
point = '${x6_out} ${y6} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_out_turb]
type = PointValue
variable = T
point = '${x7_in} ${y7} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[mfr_turb]
type = ADFlowJunctionFlux1Phase
boundary = pipe6:out
connection_index = 0
equation = mass
junction = turbine
[]
##########################
# Recuperator
##########################
[cold_leg_in]
type = PointValue
variable = T
point = '${x3} ${cold_leg_in} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[cold_leg_out]
type = PointValue
variable = T
point = '${x3} ${cold_leg_out} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[hot_leg_in]
type = PointValue
variable = T
point = '${x8} ${hot_leg_in} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[hot_leg_out]
type = PointValue
variable = T
point = '${x8} ${hot_leg_out} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# Reactor
##########################
[reactor_inlet]
type = PointValue
variable = T
point = '${x4} ${y4} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[reactor_outlet]
type = PointValue
variable = T
point = '${x5} ${y5_in} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
end_time = ${t3}
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
growth_factor = 1.1
cutback_factor = 0.9
[]
dtmin = 1e-5
dtmax = 1000
steady_state_detection = true
steady_state_start_time = 200000
solve_type = NEWTON
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[Outputs]
[e]
type = Exodus
file_base = 'recuperated_brayton_cycle_out'
[]
[csv]
type = CSV
file_base = 'recuperated_brayton_cycle'
execute_vector_postprocessors_on = 'INITIAL'
[]
[console]
type = Console
show = 'shaft_speed p_ratio_comp p_ratio_turb compressor:pressure_ratio turbine:pressure_ratio'
[]
[]
(test/tests/problems/verbose_setup/sample.i)
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[u]
initial_condition = 3
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[c]
[]
[]
[AuxKernels]
[copy]
type = ProjectionAux
v = u
variable = c
[]
[]
[Materials]
[unused]
type = GenericConstantMaterial
prop_names = 'f1'
prop_values = '2'
[]
[]
[Functions]
[f]
type = ConstantFunction
value = 1
[]
[]
[Problem]
type = FEProblem
solve = false
verbose_setup = true
[]
[Executioner]
type = Steady
[]
(modules/functional_expansion_tools/test/tests/errors/bc_value_bad_function.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./v]
[../]
[]
[BCs]
[./this_could_be_bad]
type = FXValueBC
boundary = right
function = const
variable = v
[../]
[]
[Functions]
[./const]
type = ConstantFunction
value = -1
[../]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(modules/phase_field/examples/rigidbodymotion/grain_forcedensity_ext.i)
# example showing grain motion due to applied force density on grains
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 20
nz = 0
xmin = 0.0
xmax = 40.0
ymin = 0.0
ymax = 20.0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.0
int_width = 6.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./load]
type = ConstantFunction
value = -0.01
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '1.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = c
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[./force_density]
type = ExternalForceDensityMaterial
c = c
etas = 'eta0 eta1'
k = 1.0
force_y = load
[../]
[]
[AuxVariables]
[./eta0]
[../]
[./eta1]
[../]
[./bnds]
[../]
[./df00]
order = CONSTANT
family = MONOMIAL
[../]
[./df01]
order = CONSTANT
family = MONOMIAL
[../]
[./df10]
order = CONSTANT
family = MONOMIAL
[../]
[./df11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[./df01]
type = MaterialStdVectorRealGradientAux
variable = df01
component = 1
property = force_density_ext
[../]
[./df11]
type = MaterialStdVectorRealGradientAux
variable = df11
index = 1
component = 1
property = force_density_ext
[../]
[./df00]
type = MaterialStdVectorRealGradientAux
variable = df00
property = force_density_ext
[../]
[./df10]
type = MaterialStdVectorRealGradientAux
variable = df10
index = 1
property = force_density_ext
[../]
[]
[ICs]
[./ic_eta0]
int_width = 6.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 6.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
c = c
etas = 'eta0 eta1'
grain_data = grain_center
force_density = force_density_ext
execute_on = 'initial linear nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 5
dt = 0.1
[./Adaptivity]
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 2
initial_adaptivity = 1
[../]
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/moving_interface/cut_mesh_2d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 11
ny = 11
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[block1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 1 0'
input = gen
[]
[block2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.5 0 0'
top_right = '1 1 0'
input = block1
[]
[]
[AuxVariables]
[u]
[]
[]
[UserObjects]
[cut_mesh]
type = InterfaceMeshCut2DUserObject
mesh_file = circle_surface.e
interface_velocity_function = vel_func
heal_always = true
block = 2
[]
[]
[Functions]
[vel_func]
type = ConstantFunction
value = 0.011
[]
[]
[Modules/TensorMechanics/Master]
displacements = 'disp_x disp_y'
[all]
strain = SMALL
add_variables = true
incremental = false
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
displacements = 'disp_x disp_y'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[AuxVariables]
[ls]
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
[]
[]
[BCs]
[box1_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = left
[]
[box1_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = left
[]
[box2_x]
type = FunctionDirichletBC
variable = disp_x
function = '0.01*t'
boundary = right
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 20
l_tol = 1e-3
nl_max_its = 15
nl_abs_tol = 1e-10
nl_rel_tol = 1e-12
start_time = 0.0
dt = 2
end_time = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
[]
(modules/fluid_properties/test/tests/functions/saturation_density_function/saturation_density_function.i)
# Tests SaturationDensityFunction.
# The gold values are computed as follows:
# T = 5
# p_sat = 3 T = 15
# liquid: rho(p_sat, T) = 0.01046369844
# vapor: rho(p_sat, T) = 0.01804085937
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[FluidProperties]
[fp_liquid]
type = IdealGasFluidProperties
[]
[fp_vapor]
type = IdealGasFluidProperties
molar_mass = 0.05
[]
[fp_2phase]
type = TestTwoPhaseFluidProperties
fp_liquid = fp_liquid
fp_vapor = fp_vapor
[]
[]
[Functions]
[T]
type = ConstantFunction
value = 5
[]
[rho_sat_fn]
type = SaturationDensityFunction
T = T
fp_2phase = fp_2phase
use_liquid = true
[]
[]
[Postprocessors]
[rho_sat_pp]
type = FunctionValuePostprocessor
function = rho_sat_fn
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
file_base = liquid
execute_on = 'INITIAL'
[]
(test/tests/functions/constant_function/constant_function_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Functions]
[./bc_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./icfn]
type = ConstantFunction
value = 1
[../]
[./ffn]
type = ConstantFunction
value = -4
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = icfn
[../]
[../]
[]
[Kernels]
# Coupling of nonlinear to Aux
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = bc_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/functormaterials/parsed_functor_material/parsed_functor_material.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 4.0
ymin = 0.0
ymax = 6.0
zmin = 0.0
zmax = 10.0
[]
[Functions]
[fn1]
type = ParsedFunction
# The max value on elements should be:
# 2 * 3 + 0.5 * 4.5 + 7.5 - 4 = 11.75
expression = '2 * x + 0.5 * y + z - t'
[]
[fn2]
type = ConstantFunction
value = 3
[]
[]
[FunctorMaterials]
[parsed_fmat]
type = ParsedFunctorMaterial
expression = 'A * B^2 + 2 + pi + e + t + x + y + z'
functor_names = 'fn1 fn2'
functor_symbols = 'A B'
property_name = 'prop1'
[]
[]
[Postprocessors]
# The value should be:
# 11.75 * 3^2 + 2 + pi + e + 4 + 3 + 4.5 + 7.5 = 132.60987448204884
[get_prop1]
type = ElementExtremeFunctorValue
functor = prop1
value_type = max
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
time = 4.0
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(modules/functional_expansion_tools/test/tests/errors/aux_bad_function.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[AuxVariables]
[./v]
[../]
[]
[AuxKernels]
[./this_could_be_bad]
type = FunctionSeriesToAux
function = const
variable = v
[../]
[]
[Functions]
[./const]
type = ConstantFunction
value = -1
[../]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/cylindrical.i)
T_hs = 300
heat_flux = 1000
t = 0.001
L = 2
D_i = 0.2
thickness = 0.5
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
R_i = ${fparse 0.5 * D_i}
D_o = ${fparse D_i + 2 * thickness}
A = ${fparse pi * D_o * L}
scale = 0.8
power = ${fparse scale * heat_flux * A}
E_change = ${fparse power * t}
[Functions]
[q_fn]
type = ConstantFunction
value = ${heat_flux}
[]
[]
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
rho = ${density}
cp = ${specific_heat_capacity}
k = ${conductivity}
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
orientation = '0 0 1'
position = '0 0 0'
length = ${L}
n_elems = 10
inner_radius = ${R_i}
widths = '${thickness}'
n_part_elems = '10'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
names = 'region'
initial_T = ${T_hs}
[]
[heat_flux_boundary]
type = HSBoundaryHeatFlux
boundary = 'hs:outer'
hs = hs
q = q_fn
scale = ${scale}
[]
[]
[Postprocessors]
[E_hs]
type = ADHeatStructureEnergyRZ
block = 'hs:region'
axis_dir = '0 0 1'
axis_point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[heat_rate_pp_relerr]
type = RelativeDifferencePostprocessor
value1 = heat_flux_boundary_integral
value2 = ${power}
execute_on = 'INITIAL'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr heat_rate_pp_relerr'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/from_file_3d.i)
T_hs = 300
heat_flux = 1000
t = 0.001
# dimensions of the side 'left'
height = 5
depth = 2
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
A = ${fparse height * depth}
scale = 0.8
E_change = ${fparse scale * heat_flux * A * t}
[Functions]
[q_fn]
type = ConstantFunction
value = ${heat_flux}
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'hs:brick'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${density} ${specific_heat_capacity} ${conductivity}'
[]
[]
[Components]
[hs]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = ${T_hs}
[]
[heat_flux_boundary]
type = HSBoundaryHeatFlux
boundary = 'hs:left'
hs = hs
q = q_fn
scale = ${scale}
[]
[]
[Postprocessors]
[E_hs]
type = ADHeatStructureEnergy3D
block = 'hs:brick'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr'
execute_on = 'FINAL'
[]
[]
(test/tests/misc/check_error/function_conflict.i)
# A function name that could be interpreted as a ParsedFunction
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Functions]
[./x]
type = ConstantFunction
[../]
[]
[Variables]
[./var]
[../]
[]
[ICs]
[./dummy]
type = FunctionIC
variable = var
function = x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = var
[../]
[]
[Executioner]
type = Steady
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_appliedforcedensity.i)
# test file for showing grain motion due to applied force density on grains
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 10
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 6.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./load]
type = ConstantFunction
value = 0.01
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = c
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[./force_density_ext]
type = ExternalForceDensityMaterial
c = c
etas = 'eta0 eta1'
k = 1.0
force_y = load
[../]
[]
[AuxVariables]
[./eta0]
[../]
[./eta1]
[../]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[]
[ICs]
[./ic_eta0]
int_width = 6.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 6.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
execute_on = 'linear nonlinear'
grain_data = grain_center
c = c
etas = 'eta0 eta1'
force_density = force_density_ext
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
# Defining a DFEM variable to handle gap discontinuity
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
# Auxvariable containing bulk temperature of gap
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
# DG kernel to represent diffusion accross element faces
[./dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
# Ignoring gap side set because no diffusion accross there
exclude_boundary = 'interface0'
[../]
[]
[InterfaceKernels]
active = 'gap'
# Heat transfer kernel using Tbulk as material
[gap]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
[]
# Heat transfer kernel using Tbulk as auxvariable
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
conductivity = 1.5
gap_length = 1.0
h_primary = 1
h_neighbor = 1
Tbulk = 300
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/solid_mechanics_basic/edge_crack_2d_propagation.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[block]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[]
[UserObjects]
[./cut_mesh]
type = MeshCut2DFunctionUserObject
mesh_file = 2D_edge_crack.e
growth_direction_x = growth_func_x
growth_direction_y = growth_func_y
growth_rate = growth_func_v
[../]
[]
[Functions]
[./growth_func_x]
type = ParsedFunction
expression = 0.4*t
[../]
[./growth_func_y]
type = ParsedFunction
expression = 1.8*(t-1)
[../]
[./growth_func_v]
type = ParsedFunction
expression = 0.1*t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
planar_formulation = plane_strain
add_variables = true
generate_output = 'stress_xx stress_yy vonmises_stress'
[../]
[]
[Functions]
[./top_trac_y]
type = ConstantFunction
value = 10
[../]
[]
[BCs]
[./top_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = top_trac_y
[../]
[./bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
block = 0
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 2.0
max_xfem_update = 2
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[xfemcutter]
type=XFEMCutMeshOutput
xfem_cutter_uo=cut_mesh
[]
[./console]
type = Console
output_linear = true
[../]
[]
(modules/thermal_hydraulics/test/tests/functions/piecewise_function/piecewise_function.i)
# This test tests the PiecewiseFunction, which pieces functions together.
# Piecing together the 2 CosineTransitionFunction functions should yield the
# CosineHumpFunction function. This test samples the PiecewiseFunction and the
# CosineHumpFunction and compares the samples using the
# VectorPostprocessorComparison post-processor.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Functions]
[function_left]
type = CosineTransitionFunction
axis = y
transition_center = 2
transition_width = 2
function1 = 5
function2 = 20
[]
[function_right]
type = CosineTransitionFunction
axis = y
transition_center = 4
transition_width = 2
function1 = 20
function2 = 5
[]
[function_end]
type = ConstantFunction
value = 5
[]
[function_piecewise]
type = PiecewiseFunction
axis = y
axis_coordinates = '3 5'
functions = 'function_left function_right function_end'
[]
[function_gold]
type = CosineHumpFunction
axis = y
hump_center_position = 3
hump_width = 4
hump_begin_value = 5
hump_center_value = 20
[]
[]
[VectorPostprocessors]
[piecewise_function_vpp]
type = LineFunctionSampler
functions = 'function_piecewise function_gold'
sort_by = y
start_point = '0 0 0'
end_point = '0 6 0'
num_points = 20
execute_on = 'initial'
[]
[]
[Postprocessors]
[matches_gold]
type = VectorPostprocessorComparison
comparison_type = equals
vectorpostprocessor_a = piecewise_function_vpp
vectorpostprocessor_b = piecewise_function_vpp
vector_name_a = function_piecewise
vector_name_b = function_gold
execute_on = 'initial'
[]
[]
[Outputs]
csv = true
show = 'matches_gold'
execute_on = 'initial'
[]
(modules/phase_field/test/tests/GrandPotentialPFM/SinteringIdeal.i)
#input file to test the GrandPotentialSinteringMaterial using the ideal energy profile
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 10
xmin = 0
xmax = 660
ymin = 0
ymax = 380
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[./InitialCondition]
type = FunctionIC
variable = w
function = f_w
[../]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 470'
y_positions = '190 190'
z_positions = ' 0 0'
radii = '150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 470
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[./f_w]
type = ParsedFunction
expression = '1.515e-7 * x'
[../]
[]
[Materials]
# Free energy coefficients for parabolic curve
[./kv]
type = ParsedMaterial
property_name = kv
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.025 1571.6'
expression = 'a*T + b'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef Egb kB'
constant_expressions = '2.69 2.1 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2; cb:=exp(-Ef/kB/T); cgb:=exp(-(Ef-Egb)/kB/T);
cb + 4.0*(cgb-cb)*(1.0 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = IDEAL
outputs = exodus
[../]
# Concentration is only meant for output
[./c]
type = ParsedMaterial
property_name = c
material_property_names = 'hs rhos hv rhov'
constant_names = 'Va'
constant_expressions = '0.04092'
expression = 'Va*(hs*rhos + hv*rhov)'
outputs = exodus
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 2
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_material_function_product/ad_material_function_product.i)
# Gold value should be the following:
# product = scale * func
# = 0.5 * 100
# = 50
[GlobalParams]
execute_on = 'initial'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Functions]
[func]
type = ConstantFunction
value = 100
[]
[]
[Materials]
[scale_mat]
type = ADGenericConstantMaterial
prop_names = 'scale'
prop_values = '0.5'
[]
[product_mat]
type = ADMaterialFunctionProductMaterial
mat_prop_product = product
mat_prop_scale = scale
function = func
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Postprocessors]
[product_pp]
type = ADElementAverageMaterialProperty
mat_prop = product
[]
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/SinteringDilute.i)
#input file to test the GrandPotentialSinteringMaterial using the dilute energy profile
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 10
xmin = 0
xmax = 660
ymin = 0
ymax = 380
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[./InitialCondition]
type = FunctionIC
variable = w
function = f_w
[../]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 470'
y_positions = '190 190'
z_positions = ' 0 0'
radii = '150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 470
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[./f_w]
type = ParsedFunction
expression = '1.515e-7 * x'
[../]
[]
[Materials]
# Free energy coefficients for parabolic curve
[./kv]
type = ParsedMaterial
property_name = kv
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.025 1571.6'
expression = 'a*T + b'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef Egb kB'
constant_expressions = '2.69 2.1 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2; cb:=exp(-Ef/kB/T); cgb:=exp(-(Ef-Egb)/kB/T);
cb + 4.0*(cgb-cb)*(1.0 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = DILUTE
outputs = exodus
[../]
# Concentration is only meant for output
[./c]
type = ParsedMaterial
property_name = c
material_property_names = 'hs rhos hv rhov'
constant_names = 'Va'
constant_expressions = '0.04092'
expression = 'Va*(hs*rhos + hv*rhov)'
outputs = exodus
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 2
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/controls/parsed_function_control/test.i)
# This test takes a value of (a) function, (b) postprocessor, (c) scalar variable,
# (d) real-valued control value and (f) bool-valued control value and evaluates it via
# ParsedFunctionControl object
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Functions]
[pps_fn]
type = ConstantFunction
value = 4
[]
[fn]
type = ConstantFunction
value = 5
[]
[]
[AuxVariables]
[sv]
family = SCALAR
order = FIRST
initial_condition = 0
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[AuxScalarKernels]
[sv_ak]
type = ConstantScalarAux
variable = sv
value = 3
execute_on = 'timestep_begin'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Components]
[]
[Postprocessors]
[pps]
type = FunctionValuePostprocessor
function = pps_fn
execute_on = 'timestep_begin'
[]
[result]
type = RealControlDataValuePostprocessor
control_data_name = eval_ctrl:value
execute_on = 'timestep_end'
[]
[]
[ControlLogic]
[ctrl]
type = GetFunctionValueControl
function = 2
[]
[trip]
type = UnitTripControl
condition = 't > 0'
[]
[eval_ctrl]
type = ParsedFunctionControl
function = 'a + b + c + d + f'
symbol_names = 'a b c d f'
symbol_values = 'fn pps sv ctrl:value trip:state'
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
abort_on_solve_fail = true
[]
[Outputs]
csv = true
show = 'result'
[]
(modules/phase_field/test/tests/GrandPotentialPFM/SinteringBase.i)
#input file to test the materials GrandPotentialTensorMaterial and GrandPotentialSinteringMaterial
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 17
xmin = 0
xmax = 680
ymin = 0
ymax = 680
[]
[GlobalParams]
op_num = 4
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 490 190 490'
y_positions = '190 190 490 490'
z_positions = ' 0 0 0 0'
radii = '150 150 150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 490
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr2_IC]
type = SmoothCircleIC
variable = gr2
x1 = 190
y1 = 490
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr3_IC]
type = SmoothCircleIC
variable = gr3
x1 = 490
y1 = 490
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[]
[Materials]
# Free energy coefficients for parabolic curves
[./ks]
type = ParsedMaterial
property_name = ks
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.0025 157.16'
expression = 'a*T + b'
[../]
[./kv]
type = ParsedMaterial
property_name = kv
material_property_names = 'ks'
expression = '10*ks'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
outputs = exodus
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 gr2 gr3 T'
constant_names = 'Ef c_GB kB'
constant_expressions = '2.69 0.189 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2 + gr2^2 + gr3^2; exp(-Ef/kB/T) + 4.0 * c_GB * (1 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
solid_energy_coefficient = ks
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = PARABOLIC
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_gr2]
type = TimeDerivative
variable = gr2
[../]
[./dt_gr3]
type = TimeDerivative
variable = gr3
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/physics/diffusion_fv.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 2'
dy = '2 1'
ix = '2 3'
iy = '3 2'
subdomain_id = '0 1
1 0'
[]
[split_boundaries]
type = BreakBoundaryOnSubdomainGenerator
input = cmg
[]
allow_renumbering = false
[]
[Physics]
[Diffusion]
[FiniteVolume]
[diff]
source_functor = 2
# Test all the ways of setting the boundary conditions
neumann_boundaries = 'left_to_0 right_to_0 top_to_0 bottom_to_0'
boundary_fluxes = '1 flux_pp flux_function flux_variable'
dirichlet_boundaries = 'left_to_1 right_to_1 top_to_1 bottom_to_1'
boundary_values = '2 value_pp value_function value_variable'
[]
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 10
# Output the setup
verbose = true
[]
# To test setting up a boundary condition with a postprocessor
[Postprocessors]
[flux_pp]
type = Receiver
default = 1
outputs = 'none'
[]
[value_pp]
type = Receiver
default = 2
outputs = 'none'
[]
[]
# To test setting up a boundary condition with a function
[Functions]
[flux_function]
type = ConstantFunction
value = 1
[]
[value_function]
type = ConstantFunction
value = 2
[]
[]
# To test setting up a boundary condition with a variable
[AuxVariables]
[flux_variable]
type = MooseVariableFVReal
initial_condition = 1
[]
[value_variable]
type = MooseVariableFVReal
initial_condition = 2
[]
[]
# Form output for testing
[VectorPostprocessors]
[sample]
type = ElementValueSampler
variable = 'u'
sort_by = 'id'
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/special/area.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = TotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = TotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[AuxVariables]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[zstress]
type = PiecewiseLinear
x = '0 1'
y = '0 500'
[]
[constant]
type = ConstantFunction
value = 1.0
[]
[ratio]
type = ParsedFunction
symbol_names = 'sd su'
symbol_values = 's_def s_undef'
expression = 'sd / su'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[boty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[backz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[pull_z]
type = FunctionNeumannBC
boundary = front
variable = disp_z
function = zstress
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000.0
poissons_ratio = 0.25
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[s_undef]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
[]
[s_def]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
use_displaced_mesh = true
[]
[area_calc]
type = FunctionValuePostprocessor
function = ratio
[]
[area]
type = AreaPostprocessor
boundary = front
use_displaced_mesh = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 1.0
[]
[Outputs]
exodus = false
csv = true
[]
(modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_fatigue.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 2
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.2
elem_type = HEX8
[]
[UserObjects]
[./cut_mesh]
type = CrackMeshCut3DUserObject
mesh_file = mesh_edge_crack.xda
growth_dir_method = FUNCTION
size_control = 1
n_step_growth = 1
growth_rate_method = FATIGUE
growth_direction_x = growth_func_x
growth_direction_y = growth_func_y
growth_direction_z = growth_func_z
growth_rate = growth_func_v
crack_front_nodes = '7 6 5 4'
[../]
[]
[Functions]
[./growth_func_x]
type = ParsedFunction
expression = 1
[../]
[./growth_func_y]
type = ParsedFunction
expression = 0
[../]
[./growth_func_z]
type = ParsedFunction
expression = 0
[../]
[./growth_func_v]
type = ParsedFunction
symbol_names = 'dN'
symbol_values = 'fatigue'
expression = dN
[../]
[]
[Postprocessors]
[./fatigue]
type = ParisLaw
max_growth_size = 0.1
paris_law_c = 1e-13
paris_law_m = 2.5
[../]
[]
[DomainIntegral]
integrals = 'Jintegral InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y disp_z'
crack_front_points_provider = cut_mesh
number_points_from_provider = 4
crack_direction_method = CurvedCrackFront
radius_inner = '0.15'
radius_outer = '0.45'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 0
incremental = true
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
[../]
[]
[Functions]
[./top_trac_y]
type = ConstantFunction
value = 10
[../]
[]
[BCs]
[./top_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = top_trac_y
[../]
[./bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
block = 0
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 4.0
max_xfem_update = 1
[]
[Outputs]
file_base = edge_crack_3d_fatigue_out
execute_on = 'timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/heat_transfer/test/tests/radiation_transfer_action/cavity_with_pillar_vf.i)
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 3
dx = '0.1 0.3 0.4 0.3 0.1'
ix = ' 1 3 4 3 1'
dy = '0.1 0.3 0.4 0.3 0.1'
iy = ' 1 3 4 3 1'
dz = '0.1 0.8 0.2 0.1'
iz = ' 1 8 2 1'
subdomain_id = '1 1 1 1 1
1 15 15 15 1
1 15 1 15 1
1 15 15 15 1
1 1 1 1 1
1 12 12 12 1
11 0 103 0 14
11 104 2 102 14
11 0 101 0 14
1 13 13 13 1
1 12 12 12 1
11 0 0 0 14
11 0 105 0 14
11 0 0 0 14
1 13 13 13 1
1 1 1 1 1
1 16 16 16 1
1 16 16 16 1
1 16 16 16 1
1 1 1 1 1'
[]
[left_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 11
paired_block = '0 101 102 103 104 105'
new_boundary = left_interior_wall
input = cartesian
[]
[right_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 14
paired_block = '0 101 102 103 104 105'
new_boundary = right_interior_wall
input = left_interior
[]
[bottom_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 12
paired_block = '0 101 102 103 104 105'
new_boundary = bottom_interior_wall
input = right_interior
[]
[top_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 13
paired_block = '0 101 102 103 104 105'
new_boundary = top_interior_wall
input = bottom_interior
[]
[front_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 15
paired_block = '0 101 102 103 104 105'
new_boundary = front_interior_wall
input = top_interior
[]
[back_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 16
paired_block = '0 101 102 103 104 105'
new_boundary = back_interior_wall
input = front_interior
[]
[pillar_left]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 104
new_boundary = pillar_left
input = 'back_interior'
[]
[pillar_right]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 102
new_boundary = pillar_right
input = 'pillar_left'
[]
[pillar_bottom]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 103
new_boundary = pillar_bottom
input = 'pillar_right'
[]
[pillar_top]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 101
new_boundary = pillar_top
input = 'pillar_bottom'
[]
[pillar_back]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 105
new_boundary = pillar_back
input = 'pillar_top'
[]
[rename_block]
type = RenameBlockGenerator
old_block = '2 11 12 13 14 15 16 101 102 103 104 105'
new_block = '2 1 1 1 1 1 1 0 0 0 0 0'
input = 'pillar_back'
[]
[]
[GrayDiffuseRadiation]
[cavity]
sidesets = '6 7 8 9 10 11 12 13 14 15 16'
emissivity = '0.8 0.8 0.8 0.8 0.8 eps_fn 0.8 0.8 0.8 0.8 0.8'
n_patches = '5 5 5 5 5 5 5 5 5 5 5'
partitioners = 'metis metis metis metis metis metis metis metis metis metis metis'
temperature = temperature
ray_tracing_face_order = SECOND
[]
[]
[Functions]
[eps_fn]
type = ConstantFunction
value = 0.8
[]
[]
[Variables]
[temperature]
initial_condition = 300
block = '1 2'
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = temperature
block = '1 2'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 500
[]
[front]
type = DirichletBC
variable = temperature
boundary = front
value = 300
[]
[]
[Materials]
[hcmat]
type = HeatConductionMaterial
thermal_conductivity = 25.0
specific_heat = 490.0
block = '1 2'
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '80'
block = '1 2'
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
[]
[Outputs]
exodus = true
[]
(modules/fluid_properties/test/tests/functions/saturation_temperature_function/saturation_temperature_function.i)
# TestTwoPhaseFluidProperties has the following saturation temperature function:
# T_sat(p) = 2 p
# Thus for p = 5, T_sat should be 10.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[FluidProperties]
[./fp_liquid]
type = IdealGasFluidProperties
[../]
[./fp_vapor]
type = IdealGasFluidProperties
[../]
[./fp_2phase]
type = TestTwoPhaseFluidProperties
fp_liquid = fp_liquid
fp_vapor = fp_vapor
[../]
[]
[Functions]
[./p]
type = ConstantFunction
value = 5
[../]
[./T_sat]
type = SaturationTemperatureFunction
p = p
fp_2phase = fp_2phase
[../]
[]
[Postprocessors]
[./T_sat_pp]
type = FunctionValuePostprocessor
function = T_sat
execute_on = 'INITIAL'
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/xfem/test/tests/solid_mechanics_basic/penny_crack_cfp.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -1.1
xmax = 1.1
ymin = -1.1
ymax = 1.1
zmin = -1.1
zmax = 1.1
elem_type = HEX8
displacements = 'disp_x disp_y disp_z'
[]
[UserObjects]
[./circle_cut_uo]
type = CircleCutUserObject
cut_data = '0 0 0
0 -0.5 0
-0.5 0 0'
[../]
[]
[AuxVariables]
[./SED]
order = CONSTANT
family = MONOMIAL
[../]
[]
[DomainIntegral]
integrals = 'KfromJIntegral'
crack_direction_method = CurvedCrackFront
radius_inner = '0.3'
radius_outer = '0.6'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 0
crack_front_points_provider = circle_cut_uo
number_points_from_provider = 10
closed_loop = true
incremental = true
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
[../]
[]
[AuxKernels]
[./SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
block = 0
[../]
[]
[Functions]
[./top_trac_z]
type = ConstantFunction
value = 10
[../]
[]
[BCs]
[./top_z]
type = FunctionNeumannBC
boundary = front
variable = disp_z
function = top_trac_z
[../]
[./bottom_x]
type = DirichletBC
boundary = back
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = back
variable = disp_y
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
boundary = back
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 1.0
[]
[Outputs]
execute_on = timestep_end
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/noaction_3d.i)
# 3D test with just mixed stress strain control
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
constraint_types = 'stress strain strain strain stress strain strain strain strain'
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[hvar]
family = SCALAR
order = NINTH
[]
[]
[AuxVariables]
[pk1_stress_xx]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yx]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zx]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_xy]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yy]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zy]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_xz]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yz]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zz]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xx]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yx]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zx]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xy]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yy]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zy]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xz]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yz]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pk1_stress_xx]
type = RankTwoAux
variable = pk1_stress_xx
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[pk1_stress_yx]
type = RankTwoAux
variable = pk1_stress_yx
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[pk1_stress_zx]
type = RankTwoAux
variable = pk1_stress_zx
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[pk1_stress_xy]
type = RankTwoAux
variable = pk1_stress_xy
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[pk1_stress_yy]
type = RankTwoAux
variable = pk1_stress_yy
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[pk1_stress_zy]
type = RankTwoAux
variable = pk1_stress_zy
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[pk1_stress_xz]
type = RankTwoAux
variable = pk1_stress_xz
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[pk1_stress_yz]
type = RankTwoAux
variable = pk1_stress_yz
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[pk1_stress_zz]
type = RankTwoAux
variable = pk1_stress_zz
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[deformation_gradient_xx]
type = RankTwoAux
variable = deformation_gradient_xx
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[deformation_gradient_yx]
type = RankTwoAux
variable = deformation_gradient_yx
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[deformation_gradient_zx]
type = RankTwoAux
variable = deformation_gradient_zx
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[deformation_gradient_xy]
type = RankTwoAux
variable = deformation_gradient_xy
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[deformation_gradient_yy]
type = RankTwoAux
variable = deformation_gradient_yy
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[deformation_gradient_zy]
type = RankTwoAux
variable = deformation_gradient_zy
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[deformation_gradient_xz]
type = RankTwoAux
variable = deformation_gradient_xz
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[deformation_gradient_yz]
type = RankTwoAux
variable = deformation_gradient_yz
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[deformation_gradient_zz]
type = RankTwoAux
variable = deformation_gradient_zz
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
targets = 'stress11 strain21 strain31 strain12 stress22 strain32 strain13 strain23 strain33'
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[stress11]
type = ParsedFunction
expression = '120.0*t'
[]
[stress22]
type = ParsedFunction
expression = '65*t'
[]
[strain33]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain23]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain13]
type = ParsedFunction
expression = '-7.0e-2*t'
[]
[strain12]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain32]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain31]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain21]
type = ParsedFunction
expression = '-1.5e-2*t'
[]
[zero]
type = ConstantFunction
expression = 0
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 20
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
file_base = 3d
exodus = true
[]
(modules/stochastic_tools/test/tests/actions/parameter_study_action/sub_eigen.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = D
[]
[rhs]
type = MatReaction
variable = u
mob_name = L
extra_vector_tags = 'eigen'
[]
[]
[Materials]
[mat]
type = GenericFunctionMaterial
prop_names = 'D L'
prop_values = 'diff_fun react_fun'
[]
[]
[Functions]
[diff_fun]
type = ConstantFunction
value = 1
[]
[react_fun]
type = ConstantFunction
value = 1
[]
[]
[BCs]
[homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[]
[eigen]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[]
[]
[Executioner]
type = Eigenvalue
[]
[VectorPostprocessors]
[eigenvalues]
type = Eigenvalues
[]
[]
[Postprocessors]
[eigenvalue]
type = VectorPostprocessorComponent
vectorpostprocessor = eigenvalues
vector_name = eigen_values_real
index = 0
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/action_3d.i)
# 3D mixed test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = FINITE
add_variables = true
new_system = true
formulation = TOTAL
volumetric_locking_correction = false
constraint_types = 'stress strain strain strain stress strain strain strain strain'
targets = 'stress11 strain21 strain31 strain12 stress22 strain32 strain13 strain23 strain33'
generate_output = 'pk1_stress_xx pk1_stress_xy pk1_stress_xz pk1_stress_yx pk1_stress_yy '
'pk1_stress_yz pk1_stress_zx pk1_stress_zy pk1_stress_zz '
'deformation_gradient_xx deformation_gradient_xy deformation_gradient_xz '
'deformation_gradient_yx deformation_gradient_yy deformation_gradient_yz '
'deformation_gradient_zx deformation_gradient_zy deformation_gradient_zz'
[]
[]
[]
[]
[Functions]
[stress11]
type = ParsedFunction
expression = '120.0*t'
[]
[stress22]
type = ParsedFunction
expression = '65*t'
[]
[strain33]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain23]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain13]
type = ParsedFunction
expression = '-7.0e-2*t'
[]
[strain12]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain32]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain31]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain21]
type = ParsedFunction
expression = '-1.5e-2*t'
[]
[zero]
type = ConstantFunction
value = 0
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
large_kinematics = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 20
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
[out]
type = Exodus
file_base = '3d'
[]
[]
(modules/combined/test/tests/ad_cavity_pressure/additional_volume.i)
#
# Cavity Pressure Test using using automatic differentiation
#
# This test is designed to compute an internal pressure based on
# p = n * R * / (V_cavity / T_cavity + V_add / T_add)
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T_cavity is the temperature in the cavity
# T_add is the temperature of the additional volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7. An additional volume of 2 is added.
#
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V_cavity0 + gamma * t + V_add
# with
# alpha = n0
# beta = T0 / 2
# gamma = -(0.003322259...) * V0
# T0 = 240.54443866068704
# V_cavity0 = 7
# V_add = 2
# T_add = 100
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# An additional volume of 2 with a temperature of 100.0 is included.
#
# So, n0 = p0 * (V_cavity / T_cavity + V_add / T_add) / R
# = 100 * (7 / 240.544439 + 2 / 100) / 8.314472
# = 0.59054
#
# The parameters combined at t = 1 gives p = 249.647.
#
# This test sets the initial temperature to 500, but the CavityPressure
# is told that that initial temperature is T0. Thus, the final solution
# is unchanged.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = 3d.e
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.59054'
[../]
[./additional_volume]
type = ConstantFunction
value = 2
[../]
[./temperature_of_additional_volume]
type = ConstantFunction
value = 100
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 500
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
use_automatic_differentiation = true
[../]
[./heat]
type = ADDiffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = ADDiffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = FunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = ADFunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = ADFunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
initial_temperature = 240.54443866068704
volume = internalVolume
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
additional_volumes = volume1
temperature_of_additional_volumes = temperature1
use_automatic_differentiation = true
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ADComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 1
[../]
[./strain1]
type = ADComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ADComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ADComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 2
[../]
[./strain2]
type = ADComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ADComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[./volume1]
type = FunctionValuePostprocessor
function = additional_volume
execute_on = 'initial linear'
[../]
[./temperature1]
type = FunctionValuePostprocessor
function = temperature_of_additional_volume
execute_on = 'initial linear'
[../]
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/problems/brayton_cycle/closed_brayton_cycle.i)
# This input file is used to demonstrate a simple closed, air Brayton cycle using
# a compressor, turbine, shaft, motor, and generator.
# The flow length is divided into 6 segments as illustrated below, where
# - "(C)" denotes the compressor
# - "(T)" denotes the turbine
# - "*" denotes a fictitious junction
#
# Heated section Cooled section
# *-----(C)-----*--------------*-----(T)-----*--------------*
# 1 2 3 4 5 6
#
# Initially the fluid is at rest at ambient conditions, the shaft speed is zero,
# and no heat transfer occurs with the system.
# The transient is controlled as follows:
# * 0 - 100 s: motor ramps up torque linearly from zero
# * 100 - 200 s: motor ramps down torque linearly to zero, HTC ramps up linearly from zero.
# * 200 - 300 s: (no changes; should approach steady condition)
I_motor = 1.0
motor_torque_max = 400.0
I_generator = 1.0
generator_torque_per_shaft_speed = -0.00025
motor_ramp_up_duration = 100.0
motor_ramp_down_duration = 100.0
post_motor_time = 100.0
t1 = ${motor_ramp_up_duration}
t2 = ${fparse t1 + motor_ramp_down_duration}
t3 = ${fparse t2 + post_motor_time}
D1 = 0.15
D2 = ${D1}
D3 = ${D1}
D4 = ${D1}
D5 = ${D1}
D6 = ${D1}
A1 = ${fparse 0.25 * pi * D1^2}
A2 = ${fparse 0.25 * pi * D2^2}
A3 = ${fparse 0.25 * pi * D3^2}
A4 = ${fparse 0.25 * pi * D4^2}
A5 = ${fparse 0.25 * pi * D5^2}
A6 = ${fparse 0.25 * pi * D6^2}
L1 = 10.0
L2 = ${L1}
L3 = ${L1}
L4 = ${L1}
L5 = ${L1}
L6 = ${L1}
x1 = 0.0
x2 = ${fparse x1 + L1}
x3 = ${fparse x2 + L2}
x4 = ${fparse x3 + L3}
x5 = ${fparse x4 + L4}
x6 = ${fparse x5 + L5}
x2_minus = ${fparse x2 - 0.001}
x2_plus = ${fparse x2 + 0.001}
x5_minus = ${fparse x5 - 0.001}
x5_plus = ${fparse x5 + 0.001}
n_elems1 = 10
n_elems2 = ${n_elems1}
n_elems3 = ${n_elems1}
n_elems4 = ${n_elems1}
n_elems5 = ${n_elems1}
n_elems6 = ${n_elems1}
A_ref_comp = ${fparse 0.5 * (A1 + A2)}
V_comp = ${fparse A_ref_comp * 1.0}
I_comp = 1.0
A_ref_turb = ${fparse 0.5 * (A4 + A5)}
V_turb = ${fparse A_ref_turb * 1.0}
I_turb = 1.0
c0_rated_comp = 351.6925137
rho0_rated_comp = 1.146881112
rated_mfr = 0.25
speed_rated_rpm = 96000
speed_rated = ${fparse speed_rated_rpm * 2 * pi / 60.0}
speed_initial = 0
eff_comp = 0.79
eff_turb = 0.843
T_hot = 1000
T_cold = 300
T_ambient = 300
p_ambient = 1e5
[GlobalParams]
orientation = '1 0 0'
gravity_vector = '0 0 0'
initial_p = ${p_ambient}
initial_T = ${T_ambient}
initial_vel = 0
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
fp = fp_air
closures = closures
f = 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
rdg_slope_reconstruction = none
[]
[Functions]
[motor_torque_fn]
type = PiecewiseLinear
x = '0 ${t1} ${t2}'
y = '0 ${motor_torque_max} 0'
[]
[motor_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'motor_torque shaft:omega'
[]
[generator_torque_fn]
type = ParsedFunction
expression = 'slope * t'
symbol_names = 'slope'
symbol_values = '${generator_torque_per_shaft_speed}'
[]
[generator_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'generator_torque shaft:omega'
[]
[htc_wall_fn]
type = PiecewiseLinear
x = '0 ${t1} ${t2}'
y = '0 0 1e3'
[]
[]
[FluidProperties]
[fp_air]
type = IdealGasFluidProperties
emit_on_nan = none
[]
[]
[Closures]
[closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[shaft]
type = Shaft
connected_components = 'motor compressor turbine generator'
initial_speed = ${speed_initial}
[]
[motor]
type = ShaftConnectedMotor
inertia = ${I_motor}
torque = 0 # controlled
[]
[generator]
type = ShaftConnectedMotor
inertia = ${I_generator}
torque = generator_torque_fn
[]
[pipe1]
type = FlowChannel1Phase
position = '${x1} 0 0'
length = ${L1}
n_elems = ${n_elems1}
A = ${A1}
[]
[compressor]
type = ShaftConnectedCompressor1Phase
position = '${x2} 0 0'
inlet = 'pipe1:out'
outlet = 'pipe2:in'
A_ref = ${A_ref_comp}
volume = ${V_comp}
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
speeds = '0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_comp1 rp_comp2 rp_comp3 rp_comp4 rp_comp5'
eff_functions = 'eff_comp1 eff_comp2 eff_comp3 eff_comp4 eff_comp5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_comp}
inertia_coeff = '${I_comp} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
[pipe2]
type = FlowChannel1Phase
position = '${x2} 0 0'
length = ${L2}
n_elems = ${n_elems2}
A = ${A2}
[]
[junction2_3]
type = JunctionOneToOne1Phase
connections = 'pipe2:out pipe3:in'
[]
[pipe3]
type = FlowChannel1Phase
position = '${x3} 0 0'
length = ${L3}
n_elems = ${n_elems3}
A = ${A3}
[]
[junction3_4]
type = JunctionOneToOne1Phase
connections = 'pipe3:out pipe4:in'
[]
[pipe4]
type = FlowChannel1Phase
position = '${x4} 0 0'
length = ${L4}
n_elems = ${n_elems4}
A = ${A4}
[]
[turbine]
type = ShaftConnectedCompressor1Phase
position = '${x5} 0 0'
inlet = 'pipe4:out'
outlet = 'pipe5:in'
A_ref = ${A_ref_turb}
volume = ${V_turb}
treat_as_turbine = true
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
speeds = '0 0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_turb0 rp_turb1 rp_turb2 rp_turb3 rp_turb4 rp_turb5'
eff_functions = 'eff_turb1 eff_turb1 eff_turb2 eff_turb3 eff_turb4 eff_turb5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_turb}
inertia_coeff = '${I_turb} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
[pipe5]
type = FlowChannel1Phase
position = '${x5} 0 0'
length = ${L5}
n_elems = ${n_elems5}
A = ${A5}
[]
[junction5_6]
type = JunctionOneToOne1Phase
connections = 'pipe5:out pipe6:in'
[]
[pipe6]
type = FlowChannel1Phase
position = '${x6} 0 0'
length = ${L6}
n_elems = ${n_elems6}
A = ${A6}
[]
[junction6_1]
type = JunctionOneToOne1Phase
connections = 'pipe6:out pipe1:in'
[]
[heating]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = pipe3
T_wall = ${T_hot}
Hw = htc_wall_fn
[]
[cooling]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = pipe6
T_wall = ${T_cold}
Hw = htc_wall_fn
[]
[]
[ControlLogic]
[motor_ctrl]
type = TimeFunctionComponentControl
component = motor
parameter = torque
function = motor_torque_fn
[]
[]
[Postprocessors]
[heating_rate]
type = ADHeatRateConvection1Phase
block = 'pipe3'
T = T
T_wall = T_wall
Hw = Hw
P_hf = P_hf
execute_on = 'INITIAL TIMESTEP_END'
[]
[cooling_rate]
type = ADHeatRateConvection1Phase
block = 'pipe6'
T = T
T_wall = T_wall
Hw = Hw
P_hf = P_hf
execute_on = 'INITIAL TIMESTEP_END'
[]
[motor_torque]
type = RealComponentParameterValuePostprocessor
component = motor
parameter = torque
execute_on = 'INITIAL TIMESTEP_END'
[]
[motor_power]
type = FunctionValuePostprocessor
function = motor_power_fn
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'motor_torque shaft:omega'
[]
[generator_torque]
type = ShaftConnectedComponentPostprocessor
quantity = torque
shaft_connected_component_uo = generator:shaftconnected_uo
execute_on = 'INITIAL TIMESTEP_END'
[]
[generator_power]
type = FunctionValuePostprocessor
function = generator_power_fn
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'generator_torque shaft:omega'
[]
[shaft_speed]
type = ScalarVariable
variable = 'shaft:omega'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_in_comp]
type = PointValue
variable = p
point = '${x2_minus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_comp]
type = PointValue
variable = p
point = '${x2_plus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_comp]
type = ParsedPostprocessor
pp_names = 'p_in_comp p_out_comp'
function = 'p_out_comp / p_in_comp'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_in_turb]
type = PointValue
variable = p
point = '${x5_minus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_turb]
type = PointValue
variable = p
point = '${x5_plus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_turb]
type = ParsedPostprocessor
pp_names = 'p_in_turb p_out_turb'
function = 'p_in_turb / p_out_turb'
execute_on = 'INITIAL TIMESTEP_END'
[]
[mfr_comp]
type = ADFlowJunctionFlux1Phase
boundary = pipe1:out
connection_index = 0
equation = mass
junction = compressor
[]
[mfr_turb]
type = ADFlowJunctionFlux1Phase
boundary = pipe4:out
connection_index = 0
equation = mass
junction = turbine
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
end_time = ${t3}
dt = 0.1
abort_on_solve_fail = true
solve_type = NEWTON
nl_rel_tol = 1e-50
nl_abs_tol = 1e-11
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
[csv]
type = CSV
file_base = 'closed_brayton_cycle'
execute_vector_postprocessors_on = 'INITIAL'
[]
[console]
type = Console
show = 'shaft_speed p_ratio_comp p_ratio_turb compressor:pressure_ratio turbine:pressure_ratio'
[]
[]
[Functions]
# compressor pressure ratio
[rp_comp1]
type = PiecewiseLinear
data_file = 'rp_comp1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp2]
type = PiecewiseLinear
data_file = 'rp_comp2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp3]
type = PiecewiseLinear
data_file = 'rp_comp3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp4]
type = PiecewiseLinear
data_file = 'rp_comp4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp5]
type = PiecewiseLinear
data_file = 'rp_comp5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# compressor efficiency
[eff_comp1]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp2]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp3]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp4]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp5]
type = ConstantFunction
value = ${eff_comp}
[]
# turbine pressure ratio
[rp_turb0]
type = ConstantFunction
value = 1
[]
[rp_turb1]
type = PiecewiseLinear
data_file = 'rp_turb1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb2]
type = PiecewiseLinear
data_file = 'rp_turb2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb3]
type = PiecewiseLinear
data_file = 'rp_turb3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb4]
type = PiecewiseLinear
data_file = 'rp_turb4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb5]
type = PiecewiseLinear
data_file = 'rp_turb5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# turbine efficiency
[eff_turb1]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb2]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb3]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb4]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb5]
type = ConstantFunction
value = ${eff_turb}
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/ld-stress.i)
# 2D test with just strain control
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
constraint_types = 'stress strain strain stress stress strain stress stress stress'
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[hvar]
family = SCALAR
order = NINTH
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[]
[hvar]
type = ScalarConstantIC
variable = hvar
value = 0.1
[]
[]
[AuxVariables]
[s11]
family = MONOMIAL
order = CONSTANT
[]
[s21]
family = MONOMIAL
order = CONSTANT
[]
[s31]
family = MONOMIAL
order = CONSTANT
[]
[s12]
family = MONOMIAL
order = CONSTANT
[]
[s22]
family = MONOMIAL
order = CONSTANT
[]
[s32]
family = MONOMIAL
order = CONSTANT
[]
[s13]
family = MONOMIAL
order = CONSTANT
[]
[s23]
family = MONOMIAL
order = CONSTANT
[]
[s33]
family = MONOMIAL
order = CONSTANT
[]
[F11]
family = MONOMIAL
order = CONSTANT
[]
[F21]
family = MONOMIAL
order = CONSTANT
[]
[F31]
family = MONOMIAL
order = CONSTANT
[]
[F12]
family = MONOMIAL
order = CONSTANT
[]
[F22]
family = MONOMIAL
order = CONSTANT
[]
[F32]
family = MONOMIAL
order = CONSTANT
[]
[F13]
family = MONOMIAL
order = CONSTANT
[]
[F23]
family = MONOMIAL
order = CONSTANT
[]
[F33]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s11]
type = RankTwoAux
variable = s11
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[s21]
type = RankTwoAux
variable = s21
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[s31]
type = RankTwoAux
variable = s31
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[s12]
type = RankTwoAux
variable = s12
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[s22]
type = RankTwoAux
variable = s22
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[s32]
type = RankTwoAux
variable = s32
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[s13]
type = RankTwoAux
variable = s13
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[s23]
type = RankTwoAux
variable = s23
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[s33]
type = RankTwoAux
variable = s33
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[F11]
type = RankTwoAux
variable = F11
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[F21]
type = RankTwoAux
variable = F21
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[F31]
type = RankTwoAux
variable = F31
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[F12]
type = RankTwoAux
variable = F12
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[F22]
type = RankTwoAux
variable = F22
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[F32]
type = RankTwoAux
variable = F32
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[F13]
type = RankTwoAux
variable = F13
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[F23]
type = RankTwoAux
variable = F23
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[F33]
type = RankTwoAux
variable = F33
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
targets = 'stress11 zero zero stress12 stress22 zero stress13 stress23 stress33'
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[stress11]
type = ParsedFunction
expression = '4.0e2*t'
[]
[stress22]
type = ParsedFunction
expression = '-2.0e2*t'
[]
[stress33]
type = ParsedFunction
expression = '8.0e2*t'
[]
[stress23]
type = ParsedFunction
expression = '2.0e2*t'
[]
[stress13]
type = ParsedFunction
expression = '-7.0e2*t'
[]
[stress12]
type = ParsedFunction
expression = '1.0e2*t'
[]
[stress32]
type = ParsedFunction
expression = '1.0e2*t'
[]
[stress31]
type = ParsedFunction
expression = '2.0e2*t'
[]
[stress21]
type = ParsedFunction
expression = '-1.5e2*t'
[]
[zero]
type = ConstantFunction
value = 0
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[s11]
type = ElementAverageValue
variable = s11
execute_on = 'initial timestep_end'
[]
[s21]
type = ElementAverageValue
variable = s21
execute_on = 'initial timestep_end'
[]
[s31]
type = ElementAverageValue
variable = s31
execute_on = 'initial timestep_end'
[]
[s12]
type = ElementAverageValue
variable = s12
execute_on = 'initial timestep_end'
[]
[s22]
type = ElementAverageValue
variable = s22
execute_on = 'initial timestep_end'
[]
[s32]
type = ElementAverageValue
variable = s32
execute_on = 'initial timestep_end'
[]
[s13]
type = ElementAverageValue
variable = s13
execute_on = 'initial timestep_end'
[]
[s23]
type = ElementAverageValue
variable = s23
execute_on = 'initial timestep_end'
[]
[s33]
type = ElementAverageValue
variable = s33
execute_on = 'initial timestep_end'
[]
[F11]
type = ElementAverageValue
variable = F11
execute_on = 'initial timestep_end'
[]
[F21]
type = ElementAverageValue
variable = F21
execute_on = 'initial timestep_end'
[]
[F31]
type = ElementAverageValue
variable = F31
execute_on = 'initial timestep_end'
[]
[F12]
type = ElementAverageValue
variable = F12
execute_on = 'initial timestep_end'
[]
[F22]
type = ElementAverageValue
variable = F22
execute_on = 'initial timestep_end'
[]
[F32]
type = ElementAverageValue
variable = F32
execute_on = 'initial timestep_end'
[]
[F13]
type = ElementAverageValue
variable = F13
execute_on = 'initial timestep_end'
[]
[F23]
type = ElementAverageValue
variable = F23
execute_on = 'initial timestep_end'
[]
[F33]
type = ElementAverageValue
variable = F33
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 10
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 0.2
[]
[Outputs]
exodus = false
csv = false
[]
(test/tests/postprocessors/function_value_pps/function_value_pps.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[AuxVariables]
[./v]
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./constant_func]
type = ConstantFunction
value = 2.798
[../]
[]
[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]
[./value1]
type = FunctionValuePostprocessor
function = constant_func
execute_on = 'initial timestep_end'
[../]
[./value2]
type = FunctionValuePostprocessor
function = 2*t
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
csv = true
[]
[Problem]
solve = false
[]
(modules/thermal_hydraulics/test/tests/postprocessors/function_side_integral_rz/function_side_integral_rz.i)
# Tests the FunctionSideIntegralRZ post-processor.
R_o = 0.2
thickness = 0.05
R_i = ${fparse R_o - thickness}
L = 3.0
S = ${fparse 2 * pi * R_o * L}
Q = 5000
q = ${fparse Q / S}
[SolidProperties]
[region1-mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 1
rho = 1
[]
[]
[Functions]
[q_fn]
type = ConstantFunction
value = ${q}
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '1 2 3'
orientation = '1 1 1'
inner_radius = ${R_i}
length = ${L}
n_elems = 50
names = 'region1'
solid_properties = 'region1-mat'
solid_properties_T_ref = '300'
widths = '${thickness}'
n_part_elems = '5'
initial_T = 300
[]
[]
[Postprocessors]
[Q_pp]
type = FunctionSideIntegralRZ
boundary = heat_structure:outer
axis_point = '1 2 3'
axis_dir = '1 1 1'
function = q_fn
execute_on = 'initial'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = 'function_side_integral_rz'
[csv]
type = CSV
precision = 15
execute_on = 'initial'
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/ld-strain.i)
# 2D test with just strain control
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
constraint_types = 'strain strain strain strain strain strain strain strain strain'
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[hvar]
family = SCALAR
order = NINTH
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[]
[hvar]
type = ScalarConstantIC
variable = hvar
value = 0.1
[]
[]
[AuxVariables]
[s11]
family = MONOMIAL
order = CONSTANT
[]
[s21]
family = MONOMIAL
order = CONSTANT
[]
[s31]
family = MONOMIAL
order = CONSTANT
[]
[s12]
family = MONOMIAL
order = CONSTANT
[]
[s22]
family = MONOMIAL
order = CONSTANT
[]
[s32]
family = MONOMIAL
order = CONSTANT
[]
[s13]
family = MONOMIAL
order = CONSTANT
[]
[s23]
family = MONOMIAL
order = CONSTANT
[]
[s33]
family = MONOMIAL
order = CONSTANT
[]
[F11]
family = MONOMIAL
order = CONSTANT
[]
[F21]
family = MONOMIAL
order = CONSTANT
[]
[F31]
family = MONOMIAL
order = CONSTANT
[]
[F12]
family = MONOMIAL
order = CONSTANT
[]
[F22]
family = MONOMIAL
order = CONSTANT
[]
[F32]
family = MONOMIAL
order = CONSTANT
[]
[F13]
family = MONOMIAL
order = CONSTANT
[]
[F23]
family = MONOMIAL
order = CONSTANT
[]
[F33]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s11]
type = RankTwoAux
variable = s11
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[s21]
type = RankTwoAux
variable = s21
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[s31]
type = RankTwoAux
variable = s31
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[s12]
type = RankTwoAux
variable = s12
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[s22]
type = RankTwoAux
variable = s22
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[s32]
type = RankTwoAux
variable = s32
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[s13]
type = RankTwoAux
variable = s13
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[s23]
type = RankTwoAux
variable = s23
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[s33]
type = RankTwoAux
variable = s33
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[F11]
type = RankTwoAux
variable = F11
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[F21]
type = RankTwoAux
variable = F21
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[F31]
type = RankTwoAux
variable = F31
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[F12]
type = RankTwoAux
variable = F12
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[F22]
type = RankTwoAux
variable = F22
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[F32]
type = RankTwoAux
variable = F32
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[F13]
type = RankTwoAux
variable = F13
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[F23]
type = RankTwoAux
variable = F23
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[F33]
type = RankTwoAux
variable = F33
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
targets = 'strain11 strain21 strain31 strain12 strain22 strain32 strain13 strain23 strain33'
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[strain11]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain22]
type = ParsedFunction
expression = '-4.0e-2*t'
[]
[strain33]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain23]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain13]
type = ParsedFunction
expression = '-7.0e-2*t'
[]
[strain12]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain32]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain31]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain21]
type = ParsedFunction
expression = '-1.5e-2*t'
[]
[zero]
type = ConstantFunction
value = 0
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[s11]
type = ElementAverageValue
variable = s11
execute_on = 'initial timestep_end'
[]
[s21]
type = ElementAverageValue
variable = s21
execute_on = 'initial timestep_end'
[]
[s31]
type = ElementAverageValue
variable = s31
execute_on = 'initial timestep_end'
[]
[s12]
type = ElementAverageValue
variable = s12
execute_on = 'initial timestep_end'
[]
[s22]
type = ElementAverageValue
variable = s22
execute_on = 'initial timestep_end'
[]
[s32]
type = ElementAverageValue
variable = s32
execute_on = 'initial timestep_end'
[]
[s13]
type = ElementAverageValue
variable = s13
execute_on = 'initial timestep_end'
[]
[s23]
type = ElementAverageValue
variable = s23
execute_on = 'initial timestep_end'
[]
[s33]
type = ElementAverageValue
variable = s33
execute_on = 'initial timestep_end'
[]
[F11]
type = ElementAverageValue
variable = F11
execute_on = 'initial timestep_end'
[]
[F21]
type = ElementAverageValue
variable = F21
execute_on = 'initial timestep_end'
[]
[F31]
type = ElementAverageValue
variable = F31
execute_on = 'initial timestep_end'
[]
[F12]
type = ElementAverageValue
variable = F12
execute_on = 'initial timestep_end'
[]
[F22]
type = ElementAverageValue
variable = F22
execute_on = 'initial timestep_end'
[]
[F32]
type = ElementAverageValue
variable = F32
execute_on = 'initial timestep_end'
[]
[F13]
type = ElementAverageValue
variable = F13
execute_on = 'initial timestep_end'
[]
[F23]
type = ElementAverageValue
variable = F23
execute_on = 'initial timestep_end'
[]
[F33]
type = ElementAverageValue
variable = F33
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 20
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 0.2
[]
[Outputs]
exodus = false
csv = false
[]
(modules/xfem/test/tests/moving_interface/cut_mesh_3d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y disp_z'
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 11
ny = 11
nz = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.1
elem_type = HEX8
[]
[block1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 1 0.1'
input = gen
[]
[block2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.5 0 0'
top_right = '1 1 0.1'
input = block1
[]
[]
[UserObjects]
[cut_mesh]
type = InterfaceMeshCut3DUserObject
mesh_file = cylinder_surface.e
interface_velocity_function = vel_func
heal_always = true
block = 2
[]
[]
[Functions]
[vel_func]
type = ConstantFunction
value = 0.011
[]
[]
[Modules/TensorMechanics/Master]
displacements = 'disp_x disp_y disp_z'
[all]
strain = SMALL
add_variables = true
incremental = false
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
displacements = 'disp_x disp_y disp_z'
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[ls]
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = 1
[]
[time_deriv]
type = TimeDerivative
variable = u
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[BCs]
[front_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[back_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[box1_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = left
[]
[box1_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = left
[]
[box1_z]
type = DirichletBC
variable = disp_z
value = 0
boundary = left
[]
[box2_x]
type = FunctionDirichletBC
variable = disp_x
function = '0.01*t'
boundary = right
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 20
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
start_time = 0.0
dt = 2
end_time = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
[]
(modules/fluid_properties/test/tests/functions/saturation_pressure_function/saturation_pressure_function.i)
# TestTwoPhaseFluidProperties has the following saturation pressure function:
# p_sat(p) = 3 T
# Thus for T = 5, p_sat should be 15.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[FluidProperties]
[./fp_liquid]
type = IdealGasFluidProperties
[../]
[./fp_vapor]
type = IdealGasFluidProperties
[../]
[./fp_2phase]
type = TestTwoPhaseFluidProperties
fp_liquid = fp_liquid
fp_vapor = fp_vapor
[../]
[]
[Functions]
[./T]
type = ConstantFunction
value = 5
[../]
[./p_sat]
type = SaturationPressureFunction
T = T
fp_2phase = fp_2phase
[../]
[]
[Postprocessors]
[./p_sat_pp]
type = FunctionValuePostprocessor
function = p_sat
execute_on = 'INITIAL'
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/phase_field/examples/rigidbodymotion/AC_CH_Multigrain.i)
# Tests the rigid body motion due to applied force of multiple particles.
# ***COPY AND PASTE THESE AS NEEDED***
# 'gr0 gr1 gr2 gr3 gr4 gr5 gr6 gr7 gr8 gr9 gr10 gr11 gr12 gr13 gr14 gr15 gr16 gr17 gr18 gr19'
# (gr0^2+gr1^2+gr2^2+gr3^2+gr4^2+gr5^2+gr6^2+gr7^2+gr8^2+gr9^2+gr10^2+gr11^2+gr12^2+gr13^2+gr14^2+gr15^2+gr16^2+gr17^2+gr18^2+gr19^2)
# (gr0^3+gr1^3+gr2^3+gr3^3+gr4^3+gr5^3+gr6^3+gr7^3+gr8^3+gr9^3+gr10^3+gr11^3+gr12^3+gr13^3+gr14^3+gr15^3+gr16^3+gr17^3+gr18^3+gr19^3)
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = 0
xmax = 600
ymin = 0
ymax = 600
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./PolycrystalVariables] # Automatically creates order parameter variables
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./force]
order = CONSTANT
family = MONOMIAL
[../]
[./free_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./load_x]
# Defines the force on the grains in the x-direction
type = ParsedFunction
expression = 0.005*cos(x*pi/600)
[../]
[./load_y]
# Defines the force on the grains in the y-direction
type = ConstantFunction
value = 0.002
[../]
[]
[Kernels]
[./RigidBodyMultiKernel]
# Creates all of the necessary Allen Cahn kernels automatically
c = c
f_name = f_loc
mob_name = L
kappa_name = kappa_gr
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
# Cahn Hilliard kernels
[./dt_w]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./CH_wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./CH_Parsed]
type = SplitCHParsed
variable = c
f_name = f_loc
w = w
kappa_name = kappa_c
coupled_variables = 'gr0 gr1 gr2 gr3' # Must be changed as op_num changes. Copy/paste from line 4
[../]
[./CH_RBM]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'gr0 gr1 gr2 gr3'
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
[]
[AuxKernels]
[./force_x]
type = FunctionAux
variable = force
function = load_x
[../]
[./force_y]
type = FunctionAux
variable = force
function = load_y
[../]
[./energy_density]
type = TotalFreeEnergy
variable = free_energy
f_name = f_loc
kappa_names = kappa_c
interfacial_vars = c
[../]
[./bnds]
type = BndsCalcAux
variable = bnds
[../]
[]
[BCs]
[./bcs]
#zero flux BC
type = NeumannBC
value = 0
variable = c
boundary = '0 1 2 3'
[../]
[]
[Materials]
[./constants]
type = GenericConstantMaterial
prop_names = 'kappa_gr kappa_c M L'
prop_values = '250 4000 4.5 60'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = f_loc
constant_names = 'A B'
constant_expressions = '450 1.5'
coupled_variables = 'c gr0 gr1 gr2 gr3' #Must be changed as op_num changes. Copy/paste from line 4
expression = 'A*c^2*(1-c)^2+B*(c^2+6*(1-c)*(gr0^2+gr1^2+gr2^2+gr3^2)
-4*(2-c)*(gr0^3+gr1^3+gr2^3+gr3^3)
+3*(gr0^2+gr1^2+gr2^2+gr3^2)^2)'
#Copy/paste from lines 5-6
derivative_order = 2
[../]
[./force_density]
type = ExternalForceDensityMaterial
c = c
k = 10.0
force_x = load_x
force_y = load_y
[../]
[]
[Postprocessors]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = free_energy
execute_on = 'initial timestep_end'
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
grain_data = grain_center
c = c
etas = 'gr0 gr1 gr2 gr3'
force_density = force_density_ext
execute_on = 'linear nonlinear'
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 2'
l_tol = 1e-05
nl_max_its = 30
l_max_its = 30
nl_rel_tol = 1e-07
nl_abs_tol = 1e-09
start_time = 0.0
end_time = 4
dt = 0.05
[]
[Outputs]
exodus = true
perf_graph = true
[./display]
type = Console
max_rows = 12
[../]
[]
[ICs]
[./concentration_IC]
type = SpecifiedSmoothCircleIC
x_positions = '150 450 150 450'
y_positions = '150 150 450 450'
z_positions = '0 0 0 0'
radii = '120 120 120 120'
variable = c
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 150
y1 = 150
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 450
y1 = 150
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr2_IC]
type = SmoothCircleIC
variable = gr2
x1 = 150
y1 = 450
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr3_IC]
type = SmoothCircleIC
variable = gr3
x1 = 450
y1 = 450
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[]
(test/tests/functions/piecewise_multilinear/oneDa.i)
# PiecewiseMultilinear function tests in 1D
# See [Functions] block for a description of the tests
# All tests yield variable = 1 everywhere, so they are compared using postprocessors
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 2
nx = 10
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./end1_var]
[../]
[./end2_var]
[../]
[./end3_var]
[../]
[./end4_var]
[../]
[./one_pt1_var]
[../]
[./one_pt2_var]
[../]
[./one_pt3_var]
[../]
[./other_axis1_var]
[../]
[./other_axis2_var]
[../]
[./other_axis3_var]
[../]
[]
[AuxKernels]
[./end1_auxK]
type = FunctionAux
variable = end1_var
function = end1_fcn
[../]
[./end2_auxK]
type = FunctionAux
variable = end2_var
function = end2_fcn
[../]
[./end3_auxK]
type = FunctionAux
variable = end3_var
function = end3_fcn
[../]
[./end4_auxK]
type = FunctionAux
variable = end4_var
function = end4_fcn
[../]
[./one_pt1_auxK]
type = FunctionAux
variable = one_pt1_var
function = one_pt1_fcn
[../]
[./one_pt2_auxK]
type = FunctionAux
variable = one_pt2_var
function = one_pt2_fcn
[../]
[./one_pt3_auxK]
type = FunctionAux
variable = one_pt3_var
function = one_pt3_fcn
[../]
[./other_axis1_auxK]
type = FunctionAux
variable = other_axis1_var
function = other_axis1_fcn
[../]
[./other_axis2_auxK]
type = FunctionAux
variable = other_axis2_var
function = other_axis2_fcn
[../]
[./other_axis3_auxK]
type = FunctionAux
variable = other_axis3_var
function = other_axis3_fcn
[../]
[]
[Functions]
# The result (which is unity) that all the functions should yield
[./answer_fcn]
type = ConstantFunction
value = 1
[../]
# Function that is 1 for all x>=0, due to data only being defined on x<0
[./end1_fcn]
type = PiecewiseMultilinear
data_file = end1.txt
[../]
# Function that is 1 for all x>=0, due to data only being defined on x<=0
[./end2_fcn]
type = PiecewiseMultilinear
data_file = end2.txt
[../]
# Function that is 1 for all x<=2, due to data only being defined on x>2
[./end3_fcn]
type = PiecewiseMultilinear
data_file = end3.txt
[../]
# Function that is 1 for all x<=2, due to data only being defined on x>=2
[./end4_fcn]
type = PiecewiseMultilinear
data_file = end4.txt
[../]
# Function that is 1 for all x, due to only one point being defined on X at x=2
[./one_pt1_fcn]
type = PiecewiseMultilinear
data_file = one_pt1.txt
[../]
# Function that is 1 for all x, due to only one point being defined on X at x=1
[./one_pt2_fcn]
type = PiecewiseMultilinear
data_file = one_pt2.txt
[../]
# Function that is 1 for all x, due to only one point being defined on X at x=-1
[./one_pt3_fcn]
type = PiecewiseMultilinear
data_file = one_pt3.txt
[../]
# Function that is 1 for all x, and data is defined on Y axis only
[./other_axis1_fcn]
type = PiecewiseMultilinear
data_file = other_axis1.txt
[../]
# Function that is 1 for all x, and data is defined on T axis only for t>=1
[./other_axis2_fcn]
type = PiecewiseMultilinear
data_file = other_axis2.txt
[../]
# Function that is 1 for all x, and data that is unity and defined on T axis for -1<=t<=1
[./other_axis3_fcn]
type = PiecewiseMultilinear
data_file = other_axis3.txt
[../]
[]
[Postprocessors]
[./end1_pp]
type = NodalL2Error
function = answer_fcn
variable = end1_var
[../]
[./end2_pp]
type = NodalL2Error
function = answer_fcn
variable = end2_var
[../]
[./end3_pp]
type = NodalL2Error
function = answer_fcn
variable = end3_var
[../]
[./one_pt1_pp]
type = NodalL2Error
function = answer_fcn
variable = one_pt1_var
[../]
[./one_pt2_pp]
type = NodalL2Error
function = answer_fcn
variable = one_pt2_var
[../]
[./one_pt3_pp]
type = NodalL2Error
function = answer_fcn
variable = one_pt3_var
[../]
[./other_axis1_pp]
type = NodalL2Error
function = answer_fcn
variable = other_axis1_var
[../]
[./other_axis2_pp]
type = NodalL2Error
function = answer_fcn
variable = other_axis2_var
[../]
[./other_axis3_pp]
type = NodalL2Error
function = answer_fcn
variable = other_axis3_var
[../]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = oneDa
hide = dummy
exodus = false
csv = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialSintering_test.i)
#input file to test the materials GrandPotentialTensorMaterial
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 17
xmin = 0
xmax = 680
ymin = 0
ymax = 680
uniform_refine = 1
[]
[GlobalParams]
op_num = 4
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./T]
order = CONSTANT
family = MONOMIAL
[../]
[./F_loc]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 490 190 490'
y_positions = '190 190 490 490'
z_positions = ' 0 0 0 0'
radii = '150 150 150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 490
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr2_IC]
type = SmoothCircleIC
variable = gr2
x1 = 190
y1 = 490
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr3_IC]
type = SmoothCircleIC
variable = gr3
x1 = 490
y1 = 490
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[]
[Materials]
# Free energy coefficients for parabolic curves
[./ks]
type = ParsedMaterial
property_name = ks
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.0025 157.16'
expression = 'a*T + b'
[../]
[./kv]
type = ParsedMaterial
property_name = kv
material_property_names = 'ks'
expression = '10*ks'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
outputs = exodus
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 gr2 gr3 T'
constant_names = 'Ef c_GB kB'
constant_expressions = '2.69 0.189 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2 + gr2^2 + gr3^2; exp(-Ef/kB/T) + 4.0 * c_GB * (1 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
solid_energy_coefficient = ks
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = PARABOLIC
[../]
# Concentration is only meant for output
[./c]
type = ParsedMaterial
property_name = c
material_property_names = 'hs rhos hv rhov'
constant_names = 'Va'
constant_expressions = '0.04092'
expression = 'Va*(hs*rhos + hv*rhov)'
outputs = exodus
[../]
[./f_bulk]
type = ParsedMaterial
property_name = f_bulk
coupled_variables = 'phi gr0 gr1 gr2 gr3'
material_property_names = 'mu gamma'
expression = 'mu*(phi^4/4-phi^2/2 + gr0^4/4-gr0^2/2 + gr1^4/4-gr1^2/2
+ gr2^4/4-gr2^2/2 + gr3^4/4-gr3^2/2
+ gamma*(phi^2*(gr0^2+gr1^2+gr2^2+gr3^2) + gr0^2*(gr1^2+gr2^2+gr3^2)
+ gr1^2*(gr2^2 + gr3^2) + gr2^2*gr3^2) + 0.25)'
outputs = exodus
[../]
[./f_switch]
type = ParsedMaterial
property_name = f_switch
coupled_variables = 'w'
material_property_names = 'chi'
expression = '0.5*w^2*chi'
outputs = exodus
[../]
[./f0]
type = ParsedMaterial
property_name = f0
material_property_names = 'f_bulk f_switch'
expression = 'f_bulk + f_switch'
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_gr2]
type = TimeDerivative
variable = gr2
[../]
[./dt_gr3]
type = TimeDerivative
variable = gr3
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[./F_aux]
type = TotalFreeEnergy
variable = F_loc
f_name = f0
interfacial_vars = 'phi gr0 gr1 gr2 gr3'
kappa_names = 'kappa kappa kappa kappa kappa'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/coord_type/coord_type_rz_integrated.i)
[Mesh]
type = GeneratedMesh
nx = 10
xmax = 1
ny = 10
ymax = 1
dim = 2
allow_renumbering = false
[]
[Problem]
type = FEProblem
coord_type = RZ
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[]
[BCs]
[./source]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = 'right'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[./vacuum]
boundary = 'top'
type = VacuumBC
variable = u
[../]
[]
[Functions]
[./exact_fn]
type = ConstantFunction
value = 1
[../]
[]
[ICs]
[./u]
type = ConstantIC
value = 1
variable = u
[../]
[]
(modules/xfem/test/tests/solid_mechanics_basic/penny_crack.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
file = quarter_sym.e
[]
[UserObjects]
[./circle_cut_uo]
type = CircleCutUserObject
cut_data = '-0.5 -0.5 0
0.0 -0.5 0
-0.5 0 0'
[../]
[]
[AuxVariables]
[./SED]
order = CONSTANT
family = MONOMIAL
[../]
[]
[DomainIntegral]
integrals = 'Jintegral'
crack_front_points = '-0.5 0.0 0.0
-0.25 -0.07 0
-0.15 -0.15 0
-0.07 -0.25 0
0 -0.5 0'
crack_end_direction_method = CrackDirectionVector
crack_direction_vector_end_1 = '0 1 0'
crack_direction_vector_end_2 = '1 0 0'
crack_direction_method = CurvedCrackFront
intersecting_boundary = '3 4' #It would be ideal to use this, but can't use with XFEM yet
radius_inner = '0.3'
radius_outer = '0.6'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 1
incremental = true
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
[../]
[]
[AuxKernels]
[./SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
block = 1
[../]
[]
[Functions]
[./top_trac_z]
type = ConstantFunction
value = 10
[../]
[]
[BCs]
[./top_z]
type = FunctionNeumannBC
boundary = 2
variable = disp_z
function = top_trac_z
[../]
[./bottom_x]
type = DirichletBC
boundary = 1
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = 1
variable = disp_y
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
boundary = 1
variable = disp_z
value = 0.0
[../]
[./sym_y]
type = DirichletBC
boundary = 3
variable = disp_y
value = 0.0
[../]
[./sym_x]
type = DirichletBC
boundary = 4
variable = disp_x
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 1.0
[]
[Outputs]
file_base = penny_crack_out
execute_on = timestep_end
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_propagation.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 2
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.2
elem_type = HEX8
[]
[UserObjects]
[./cut_mesh]
type = CrackMeshCut3DUserObject
mesh_file = mesh_edge_crack.xda
growth_dir_method = FUNCTION
size_control = 0.1
n_step_growth = 1
growth_direction_x = growth_func_x
growth_direction_y = growth_func_y
growth_direction_z = growth_func_z
growth_rate = growth_func_v
[../]
[]
[Functions]
[./growth_func_x]
type = ParsedFunction
expression = 1
[../]
[./growth_func_y]
type = ParsedFunction
expression = 0
[../]
[./growth_func_z]
type = ParsedFunction
expression = 0
[../]
[./growth_func_v]
type = ParsedFunction
expression = 0.15
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
[../]
[]
[Functions]
[./top_trac_y]
type = ConstantFunction
value = 10
[../]
[]
[BCs]
[./top_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = top_trac_y
[../]
[./bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
block = 0
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 3.0
max_xfem_update = 1
[]
[Outputs]
file_base = edge_crack_3d_propagation_out
execute_on = 'timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/xfem/test/tests/solid_mechanics_basic/elliptical_crack.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
file = quarter_sym.e
[]
[DomainIntegral]
integrals = 'InteractionIntegralKI'
crack_direction_method = CurvedCrackFront
radius_inner = '0.1'
radius_outer = '0.2'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 1
crack_front_points_provider = ellip_cut_uo
number_points_from_provider = 12
closed_loop = true
incremental = true
[]
[UserObjects]
[./ellip_cut_uo]
type = EllipseCutUserObject
cut_data = '-0.5 -0.5 0
-0.5 -0.1 0
0.1 -0.5 0'
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
[../]
[]
[Functions]
[./top_trac_z]
type = ConstantFunction
value = 10
[../]
[]
[BCs]
[./top_z]
type = FunctionNeumannBC
boundary = 2
variable = disp_z
function = top_trac_z
[../]
[./bottom_x]
type = DirichletBC
boundary = 1
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = 1
variable = disp_y
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
boundary = 1
variable = disp_z
value = 0.0
[../]
[./sym_y]
type = DirichletBC
boundary = 3
variable = disp_y
value = 0.0
[../]
[./sym_x]
type = DirichletBC
boundary = 4
variable = disp_x
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 1.0
[]
[Outputs]
file_base = elliptical_crack_out
exodus = true
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(modules/phase_field/examples/multiphase/GrandPotential3Phase_masscons.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase.
# This is a revised version of the model that eliminates small variations in mass
# that have been observed with the original formulation. In this version, rather
# than evolving the chemical potential as a field variable, we evolve the composition
# field using a normal Cahn-Hilliard equation, then relate chemical potential to
# composition using Eq. (22) from the paper (this relationship is derived from the
# grand potential functional and is valid only for parabolic free energies).
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 60
xmin = -15
xmax = 15
ymin = -15
ymax = 15
[]
[Variables]
[w]
[]
[c]
[]
[etaa0]
[]
[etab0]
[]
[etad0]
[]
[]
[ICs]
[IC_etaa0]
type = BoundingBoxIC
variable = etaa0
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 1.0
outside = 0.0
[]
[IC_etad0]
type = BoundingBoxIC
variable = etad0
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 0.0
outside = 1.0
[]
[IC_c]
type = BoundingBoxIC
variable = c
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 0.1
outside = 0.5
[]
[IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[]
[]
[Functions]
[ic_func_w]
type = ConstantFunction
value = 0
[]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etad0'
gamma_names = 'gab gad'
[]
[ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etab0 etad0 w'
[]
[ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[]
[ea0_dot]
type = TimeDerivative
variable = etaa0
[]
# Order parameter eta_beta0
[ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etad0'
gamma_names = 'gab gbd'
[]
[ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etad0 w'
[]
[ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[]
[eb0_dot]
type = TimeDerivative
variable = etab0
[]
# Order parameter eta_delta0
[ACd0_bulk]
type = ACGrGrMulti
variable = etad0
v = 'etaa0 etab0'
gamma_names = 'gad gbd'
[]
[ACd0_sw]
type = ACSwitching
variable = etad0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 w'
[]
[ACd0_int]
type = ACInterface
variable = etad0
kappa_name = kappa
[]
[ed0_dot]
type = TimeDerivative
variable = etad0
[]
#Concentration
[c_dot]
type = TimeDerivative
variable = c
[]
[Diffusion]
type = MatDiffusion
variable = c
v = w
diffusivity = DchiVm
args = ''
[]
#The following relate chemical potential to composition using Eq. (22)
[w_rxn]
type = MatReaction
variable = w
v = c
mob_name = -1
[]
[ca_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_a'
args = 'etaa0 etab0 etad0'
[]
[ca_bodyforce]
type = MaskedBodyForce
variable = w
mask = ha
coupled_variables = 'etaa0 etab0 etad0'
value = 0.1 #caeq
[]
[cb_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_b'
args = 'etaa0 etab0 etad0'
[]
[cb_bodyforce]
type = MaskedBodyForce
variable = w
mask = hb
coupled_variables = 'etaa0 etab0 etad0'
value = 0.9 #cbeq
[]
[cd_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_d'
args = 'etaa0 etab0 etad0'
[]
[cd_bodyforce]
type = MaskedBodyForce
variable = w
mask = hd
coupled_variables = 'etaa0 etab0 etad0'
value = 0.5 #cdeq
[]
[]
[Materials]
[ha_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etaa0'
[]
[hb_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etab0'
[]
[hd_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hd
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etad0'
[]
[omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[]
[omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[]
[omegad]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegad
material_property_names = 'Vm kd cdeq'
expression = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
derivative_order = 2
[]
[rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[]
[rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[]
[rhod]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhod
material_property_names = 'Vm kd cdeq'
expression = 'w/Vm^2/kd + cdeq/Vm'
derivative_order = 2
[]
[const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D Vm ka caeq kb cbeq kd cdeq gab gad gbd mu tgrad_corr_mult'
prop_values = '0 1 1.0 1.0 1.0 10.0 0.1 10.0 0.9 10.0 0.5 1.5 1.5 1.5 1.0 0.0'
[]
[Mobility]
type = DerivativeParsedMaterial
property_name = DchiVm
material_property_names = 'D chi Vm' #Factor of Vm is needed to evolve c instead of rho
expression = 'D*chi*Vm'
derivative_order = 2
[]
[chi]
type = DerivativeParsedMaterial
property_name = chi
material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
expression = '(ha/ka + hb/kb + hd/kd) / Vm^2'
coupled_variables = 'etaa0 etab0 etad0'
derivative_order = 2
[]
[hoverk_a]
type = DerivativeParsedMaterial
material_property_names = 'ha(etaa0,etab0,etad0) Vm ka'
property_name = hoverk_a
expression = 'ha / Vm / ka'
[]
[hoverk_b]
type = DerivativeParsedMaterial
material_property_names = 'hb(etaa0,etab0,etad0) Vm kb'
property_name = hoverk_b
expression = 'hb / Vm / kb'
[]
[hoverk_d]
type = DerivativeParsedMaterial
material_property_names = 'hd(etaa0,etab0,etad0) Vm kd'
property_name = hoverk_d
expression = 'hd / Vm / kd'
[]
[]
[Postprocessors]
[c_total]
type = ElementIntegralVariablePostprocessor
variable = c
[]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = asm
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 20
nl_abs_tol = 1e-10
dt = 1.0
[]
[Outputs]
csv = true
exodus = true
[]
(modules/stochastic_tools/test/tests/multiapps/user_cli_args/sub_transient.i)
[StochasticTools]
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Postprocessors]
[size]
type = AverageElementSize
execute_on = 'initial'
[]
[function_val]
type = FunctionValuePostprocessor
function = fun
scale_factor = 1.0
[]
[]
[Functions/fun]
type = ConstantFunction
value = 1.0
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Controls/receiver]
type = SamplerReceiver
[]
(test/tests/postprocessors/vector_postprocessor_comparison/vector_postprocessor_comparison.i)
# This tests the VectorPostprocessorComparison post-processor, which takes two
# vector post-processors and compares them.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 2
[]
[Functions]
# Sampled values will be [2, 2, 2]
[./a_fn]
type = ConstantFunction
value = 2
[../]
# Sampled values will be [0, 1, 2]
[./b_fn]
type = ParsedFunction
expression = 'x'
[../]
[]
[VectorPostprocessors]
[./a_vpp]
type = LineFunctionSampler
functions = 'a_fn'
num_points = 3
start_point = '0 0 0'
end_point = '2 0 0'
sort_by = x
execute_on = 'initial'
[../]
[./b_vpp]
type = LineFunctionSampler
functions = 'b_fn'
num_points = 3
start_point = '0 0 0'
end_point = '2 0 0'
sort_by = x
execute_on = 'initial'
[../]
[]
[Postprocessors]
[./vpp_comparison]
type = VectorPostprocessorComparison
vectorpostprocessor_a = a_vpp
vectorpostprocessor_b = b_vpp
vector_name_a = a_fn
vector_name_b = b_fn
comparison_type = greater_than_equals
execute_on = 'initial'
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base = greater_than_equals
csv = true
show = 'vpp_comparison'
execute_on = 'initial'
[]
(modules/combined/test/tests/cavity_pressure/additional_volume.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
# p = n * R * / (V_cavity / T_cavity + V_add / T_add)
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T_cavity is the temperature in the cavity
# T_add is the temperature of the additional volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7. An additional volume of 2 is added.
#
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V_cavity0 + gamma * t + V_add
# with
# alpha = n0
# beta = T0 / 2
# gamma = -(0.003322259...) * V0
# T0 = 240.54443866068704
# V_cavity0 = 7
# V_add = 2
# T_add = 100
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# An additional volume of 2 with a temperature of 100.0 is included.
#
# So, n0 = p0 * (V_cavity / T_cavity + V_add / T_add) / R
# = 100 * (7 / 240.544439 + 2 / 100) / 8.314472
# = 0.59054
#
# The parameters combined at t = 1 gives p = 249.647.
#
# This test sets the initial temperature to 500, but the CavityPressure
# is told that that initial temperature is T0. Thus, the final solution
# is unchanged.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = 3d.e
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.59054'
[../]
[./additional_volume]
type = ConstantFunction
value = 2
[../]
[./temperature_of_additional_volume]
type = ConstantFunction
value = 100
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 500
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
[../]
[./heat]
type = Diffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = Diffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = FunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = FunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = FunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
initial_temperature = 240.54443866068704
volume = internalVolume
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
additional_volumes = volume1
temperature_of_additional_volumes = temperature1
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 1
[../]
[./strain1]
type = ComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 2
[../]
[./strain2]
type = ComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
snesmf_reuse_base = false
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[./volume1]
type = FunctionValuePostprocessor
function = additional_volume
execute_on = 'initial linear'
[../]
[./temperature1]
type = FunctionValuePostprocessor
function = temperature_of_additional_volume
execute_on = 'initial linear'
[../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
exclude_boundary = 'interface0'
[]
[]
[InterfaceKernels]
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
# Defining temperature dependent fucntion for conductivity across side set
[kgap]
type = ParsedFunction
expression = 't / 200'
[]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
# Using temperature dependent function for gap conductivity
conductivity_temperature_function = kgap
# Variable to evaluate conductivity with
gap_temperature = Tbulk
gap_length = 1.0
h_primary = 1
h_neighbor = 1
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 1
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '0.1 * t'
[]
[vertical_movement]
type = ConstantFunction
value = '0.0'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
interpolate_normals = false
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist 1e-5 NONZERO 1e-10'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-6
snesmf_reuse_base = false
[]
[Outputs]
exodus = false
csv = true
execute_on = 'FINAL'
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'id'
[]
[]
(modules/functional_expansion_tools/test/tests/errors/bc_value_penalty_bad_function.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./v]
[../]
[]
[BCs]
[./this_could_be_bad]
type = FXValuePenaltyBC
boundary = right
penalty = 1.0
function = const
variable = v
[../]
[]
[Functions]
[./const]
type = ConstantFunction
value = -1
[../]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_action_external_boundary.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
[./cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1.3 1.9'
ix = '3 3 3'
dy = '6'
iy = '9'
subdomain_id = '0 1 2'
[../]
[./inner_left]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 0
paired_block = 1
new_boundary = 'inner_left'
[../]
[./inner_right]
type = SideSetsBetweenSubdomainsGenerator
input = inner_left
primary_block = 2
paired_block = 1
new_boundary = 'inner_right'
[../]
[./inner_top]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y - 6) < 1e-10'
normal = '0 1 0'
included_subdomains = 1
new_sideset_name = 'inner_top'
input = 'inner_right'
[../]
[./inner_bottom]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y) < 1e-10'
normal = '0 -1 0'
included_subdomains = 1
new_sideset_name = 'inner_bottom'
input = 'inner_top'
[../]
[./rename]
type = RenameBlockGenerator
old_block = '2'
new_block = '0'
input = inner_bottom
[../]
[]
[Variables]
[./temperature]
block = 0
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temperature
block = 0
diffusion_coefficient = 5
[../]
[]
[GrayDiffuseRadiation]
[./cavity]
boundary = '4 5 6 7'
emissivity = '0.9 0.8 eps_fn 1'
n_patches = '2 2 2 3'
partitioners = 'centroid centroid centroid centroid'
centroid_partitioner_directions = 'x y y x'
temperature = temperature
adiabatic_boundary = '7'
fixed_temperature_boundary = '6'
fixed_boundary_temperatures = '800'
view_factor_calculator = analytical
[../]
[]
[Functions]
[eps_fn]
type = ConstantFunction
value = 0.4
[]
[]
[BCs]
[./left]
type = DirichletBC
variable = temperature
boundary = left
value = 1000
[../]
[./right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[../]
[]
[Postprocessors]
[./average_T_inner_right]
type = SideAverageValue
variable = temperature
boundary = inner_right
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/multiapps/user_cli_args/sub_steady.i)
[StochasticTools]
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Postprocessors]
[size]
type = AverageElementSize
execute_on = 'initial'
[]
[function_val]
type = FunctionValuePostprocessor
function = fun
scale_factor = 1.0
[]
[]
[Functions/fun]
type = ConstantFunction
value = 1.0
[]
[Controls/receiver]
type = SamplerReceiver
[]
(test/tests/postprocessors/execute_on_final/execute_on_final.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
dt = 1
num_steps = 4
[]
[Functions]
[func]
type = ConstantFunction
value = 5
[]
[]
[Postprocessors]
[timestep_end]
type = FunctionValuePostprocessor
function = 't'
execute_on = 'initial timestep_end'
[]
[final]
type = FunctionValuePostprocessor
function = '2*t'
execute_on = 'final'
[]
[]
[Outputs]
csv = true
[on_final]
type = CSV
execute_on = final
[]
[]
(modules/thermal_hydraulics/test/tests/components/flow_channel_1phase/phy.par_fn.i)
#
# Tests the ability to set the hydraulic diameter by function.
#
D_h = 5
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = 1e6
initial_T = 453.1
initial_vel = 0.0
closures = simple_closures
[]
[Functions]
[dh_fn]
type = ConstantFunction
value = ${D_h}
[]
[]
[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]
[left_wall]
type = SolidWall1Phase
input = pipe:in
[]
[pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 1
A = 1.0e-4
D_h = dh_fn
f = 0.0
fp = eos
[]
[right_wall]
type = SolidWall1Phase
input = pipe:out
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0.0
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-5
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-3
l_max_its = 100
[]
[Postprocessors]
[D_h]
type = ADElementIntegralMaterialProperty
mat_prop = D_h
block = pipe
[]
[]
[Outputs]
csv = true
show = 'D_h'
execute_on = 'timestep_end'
[]
(test/tests/physics/diffusion_cg.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 2'
dy = '2 1'
ix = '2 3'
iy = '3 2'
subdomain_id = '0 1
1 0'
[]
[split_boundaries]
type = BreakBoundaryOnSubdomainGenerator
input = cmg
[]
allow_renumbering = false
[]
[Physics]
[Diffusion]
[ContinuousGalerkin]
[diff]
source_functor = 2
# Test all the ways of setting the boundary conditions
neumann_boundaries = 'left_to_0 right_to_0 top_to_0 bottom_to_0'
boundary_fluxes = '1 flux_pp flux_function flux_variable'
dirichlet_boundaries = 'left_to_1 right_to_1 top_to_1 bottom_to_1'
boundary_values = '2 value_pp value_function value_variable'
[]
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 10
# Output the setup
verbose = true
[]
# To test setting up a boundary condition with a postprocessor
[Postprocessors]
[flux_pp]
type = Receiver
default = 1
outputs = 'none'
[]
[value_pp]
type = Receiver
default = 2
outputs = 'none'
[]
[]
# To test setting up a boundary condition with a function
[Functions]
[flux_function]
type = ConstantFunction
value = 1
[]
[value_function]
type = ConstantFunction
value = 2
[]
[]
# To test setting up a boundary condition with a variable
[AuxVariables]
[flux_variable]
initial_condition = 1
[]
[value_variable]
initial_condition = 2
[]
[]
# Form output for testing
[VectorPostprocessors]
[sample]
type = NodalValueSampler
variable = 'u'
sort_by = 'id'
[]
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.conservation.i)
# Tests energy conservation for HeatGeneration component when a power component is used
n_units = 5
power = 1e5
power_fraction = 0.3
t = 1
energy_change = ${fparse power_fraction * power * t}
[GlobalParams]
scaling_factor_temperature = 1e-3
[]
[Functions]
[power_shape]
type = ConstantFunction
value = 0.4
[]
[]
[SolidProperties]
[main-material]
type = ThermalFunctionSolidProperties
k = 1e4
cp = 500.0
rho = 100.0
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
num_rods = ${n_units}
position = '0 1 0'
orientation = '1 0 0'
length = 0.8
n_elems = 100
names = 'rgn1 rgn2 rgn3'
solid_properties = 'main-material main-material main-material'
solid_properties_T_ref = '300 300 300'
widths = '0.4 0.1 0.5'
n_part_elems = '2 2 2'
initial_T = 300
[]
[heat_generation]
type = HeatSourceFromTotalPower
hs = heat_structure
regions = 'rgn1 rgn2'
power = total_power
power_fraction = ${power_fraction}
[]
[total_power]
type = TotalPower
power = ${power}
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergyRZ
block = 'heat_structure:rgn1 heat_structure:rgn2 heat_structure:rgn3'
n_units = ${n_units}
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
[E_tot_change_rel_err]
type = RelativeDifferencePostprocessor
value1 = E_tot_change
value2 = ${energy_change}
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
line_search = 'basic'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
start_time = 0.0
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
csv = true
show = 'E_tot_change_rel_err'
execute_on = 'final'
[]
(modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_mhs.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 2
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.2
elem_type = HEX8
[]
[UserObjects]
[./cut_mesh]
type = CrackMeshCut3DUserObject
mesh_file = mesh_edge_crack.xda
growth_dir_method = MAX_HOOP_STRESS
size_control = 1
n_step_growth = 1
growth_rate = growth_func_v
crack_front_nodes = '7 6 5 4'
[../]
[]
[Functions]
[./growth_func_v]
type = ParsedFunction
expression = 0.15
[../]
[]
[DomainIntegral]
integrals = 'Jintegral InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y disp_z'
crack_front_points_provider = cut_mesh
number_points_from_provider = 4
crack_direction_method = CurvedCrackFront
radius_inner = '0.15'
radius_outer = '0.45'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 0
incremental = true
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
[../]
[]
[Functions]
[./top_trac_x]
type = ConstantFunction
value = 100
[../]
[./top_trac_y]
type = ConstantFunction
value = 0
[../]
[]
[BCs]
[./top_x]
type = FunctionNeumannBC
boundary = top
variable = disp_x
function = top_trac_x
[../]
[./top_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = top_trac_y
[../]
[./bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
block = 0
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 4.0
max_xfem_update = 1
[]
[Outputs]
file_base = edge_crack_3d_mhs_out
execute_on = 'timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_bad_function_series.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[./AnotherFunction]
type = ConstantFunction
value = -1
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = AnotherFunction
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/multiapps/initial_transfer/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[Problem]
kernel_coverage_check = false
[]
[Variables][dummy][][]
[Functions]
[func]
type = ConstantFunction
value = 1
[]
[]
[Postprocessors]
[c]
type = FunctionValuePostprocessor
function = func
execute_on = initial
# this will force this postprocessor to be evaluated before transfer on initial
force_preic = true
[]
[]
[Executioner]
type = Steady
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = sub.i
execute_on = initial
[../]
[]
[Transfers]
[to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = c
to_postprocessor = receiver
[]
[]