- functionThe analytic solution to compare against
C++ Type:FunctionName
Controllable:No
Description:The analytic solution to compare against
- variableThe name of the variable that this postprocessor operates on
C++ Type:std::vector<VariableName>
Controllable:No
Description:The name of the variable that this postprocessor operates on
NodalL2Error
The L2-norm of the difference between a variable and a function computed at nodes.
This is typically used to compare a nodal variable to a known analytical solution. To compute the error with regards to a variable, instead of a function, you may use a ParsedAux to store the difference in an AuxVariable
, then use the NodalL2Error
or NodalL2Norm postprocessor to compute the norm.
Example input syntax
In this example, variable u
is the solution of a diffusion-source problem. We know the analytical solution of this problem and use the NodalL2Error
postprocessor to examine the quality of the numerical solution.
[Postprocessors]
[./l2_error]
type = NodalL2Error
variable = u
function = Soln
[../]
[]
[Functions]
[./dts]
type = PiecewiseLinear
x = '0.01 0.1'
y = '0.005 0.05'
[../]
[./Soln]
type = ParsedFunction
expression = 't*(x*x+y*y)'
[../]
[./Source]
type = ParsedFunction
expression = '(x*x + y*y) - 4*t'
[../]
[./TopBC]
type = ParsedFunction
expression = 't*(x*x+1)'
[../]
[./BottomBC]
type = ParsedFunction
expression = 't*x*x'
[../]
[./RightBC]
type = ParsedFunction
expression = 't*(y*y+1)'
[../]
[./LeftBC]
type = ParsedFunction
expression = 't*y*y'
[../]
[]
(test/tests/auxkernels/time_integration/time_integration.i)Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, TRANSFER
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- unique_node_executeFalseWhen false (default), block restricted objects will have the execute method called multiple times on a single node if the node lies on a interface between two subdomains.
Default:False
C++ Type:bool
Controllable:No
Description:When false (default), block restricted objects will have the execute method called multiple times on a single node if the node lies on a interface between two subdomains.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- (modules/richards/test/tests/user_objects/uo1.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/ad_2d_steady_state.i)
- (test/tests/utils/spline_interpolation/bicubic_spline_interpolation_x_normal.i)
- (modules/richards/test/tests/user_objects/uo4.i)
- (modules/richards/test/tests/user_objects/uo2.i)
- (modules/misc/test/tests/kernels/thermo_diffusion/ad_thermo_diffusion.i)
- (modules/heat_transfer/test/tests/heat_source_bar/heat_source_bar.i)
- (test/tests/functions/piecewise_multilinear/twoDa.i)
- (test/tests/bcs/nodal_normals/circle_quads.i)
- (python/peacock/tests/common/lcf1.i)
- (test/tests/auxkernels/time_integration/time_integration.i)
- (test/tests/functions/linear_combination_function/lcf1.i)
- (test/tests/kernels/ad_mat_diffusion/2d_steady_state.i)
- (test/tests/kernels/ad_mat_diffusion/ad_2d_steady_state.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/2d_steady_state.i)
- (test/tests/kernels/ad_mat_diffusion/1D_transient.i)
- (python/peacock/tests/input_tab/InputTree/gold/lcf1.i)
- (modules/heat_transfer/test/tests/heat_source_bar/ad_heat_source_bar.i)
- (test/tests/utils/spline_interpolation/bicubic_spline_interpolation_y_normal.i)
- (test/tests/functions/piecewise_multilinear/oneDb.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/ad_1D_transient.i)
- (tutorials/tutorial03_verification/app/test/tests/step03_analytical/1d_analytical.i)
- (modules/richards/test/tests/user_objects/uo3.i)
- (modules/peridynamics/test/tests/heat_conduction/2D_steady_state_BPD.i)
- (test/tests/bcs/nodal_normals/circle_tris.i)
- (test/tests/nodalkernels/high_order_time_integration/high_order_time_integration.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/1D_transient.i)
- (test/tests/functions/piecewise_multilinear/time.i)
- (test/tests/functions/linear_combination_function/except1.i)
- (modules/misc/test/tests/kernels/thermo_diffusion/thermo_diffusion.i)
- (test/tests/utils/spline_interpolation/bicubic_spline_interpolation.i)
- (test/tests/kernels/ad_mat_diffusion/ad_1D_transient.i)
- (test/tests/actions/meta_action_multiple_tasks/circle_quads.i)
- (test/tests/functions/piecewise_multilinear/oneDa.i)
(test/tests/auxkernels/time_integration/time_integration.i)
# This test covers the usage of the VariableTimeIntegrationAux
# kernel. Here we test three different schemes for integrating a field
# variable in time. Midpoint, Trapezoidal, and Simpson's rule are
# used. For this test, we use a manufactured solution and we compare
# the Trapezoidal and Simpson's rule, which must be exact for this
# exact solution, which is a linear function of time.
#
# The set up problem is
#
# du/dt - Laplacian(u) = Q
#
# with exact solution: u = t*(x*x+y*y).
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD9
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[./dts]
type = PiecewiseLinear
x = '0.01 0.1'
y = '0.005 0.05'
[../]
[]
[Variables]
[./u]
initial_condition = 0.0
family = LAGRANGE
order = SECOND
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./timederivative]
type = TimeDerivative
variable = u
[../]
[./sourceterm]
type = BodyForce
variable = u
function = Source
[../]
[]
[AuxVariables]
[./v_midpoint]
[../]
[./v_trapazoid]
[../]
[./v_simpson]
[../]
[]
[AuxKernels]
[./MidpointTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_midpoint
order = 1
[../]
[./TrapazoidalTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_trapazoid
order = 2
[../]
[./SimpsonsTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_simpson
order = 3
[../]
[]
[BCs]
[./RightBC]
type = FunctionDirichletBC
variable = u
function = RightBC
boundary = 'right'
[../]
[./LeftBC]
type = FunctionDirichletBC
variable = u
function = LeftBC
boundary = 'left'
[../]
[./TopBC]
type = FunctionDirichletBC
variable = u
function = TopBC
boundary = 'top'
[../]
[./BottomBC]
type = FunctionDirichletBC
variable = u
function = BottomBC
boundary = 'bottom'
[../]
[]
[Functions]
[./Soln]
type = ParsedFunction
expression = 't*(x*x+y*y)'
[../]
[./Source]
type = ParsedFunction
expression = '(x*x + y*y) - 4*t'
[../]
[./TopBC]
type = ParsedFunction
expression = 't*(x*x+1)'
[../]
[./BottomBC]
type = ParsedFunction
expression = 't*x*x'
[../]
[./RightBC]
type = ParsedFunction
expression = 't*(y*y+1)'
[../]
[./LeftBC]
type = ParsedFunction
expression = 't*y*y'
[../]
[]
[Postprocessors]
[./l2_error]
type = NodalL2Error
variable = u
function = Soln
[../]
[]
[Executioner]
type = Transient
end_time = 0.1
# dt = 0.1
# num_steps = 10
[./TimeStepper]
type = FunctionDT
function = dts
[../]
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/richards/test/tests/user_objects/uo1.i)
# Relative-permeability User objects give the correct value
# (note that here p is x, where x runs between 0.01 and 0.99
# and that seff is p in the aux vars)
#
# If you want to add another test for another UserObject
# then add the UserObject, add a Function defining the expected result,
# add an AuxVariable and AuxKernel that will record the UserObjects value
# and finally add a NodalL2Error that compares this with the Function.
[UserObjects]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermPower5]
type = RichardsRelPermPower
simm = 0.0
n = 5
[../]
[./RelPermVG]
type = RichardsRelPermVG
simm = 0.0
m = 0.8
[../]
[./RelPermVG1]
type = RichardsRelPermVG1
simm = 0.0
m = 0.8
scut = 1E-6 # then we get a cubic
[../]
[./RelPermBW]
type = RichardsRelPermBW
Sn = 0.05
Ss = 0.95
Kn = 0.0
Ks = 1.0
C = 1.5
[../]
[./RelPermMonomial]
type = RichardsRelPermMonomial
simm = 0.0
n = 3
[../]
[./RelPermPowerGas]
type = RichardsRelPermPowerGas
simm = 0.0
n = 5
[../]
[./Q2PRelPermPowerGas]
type = Q2PRelPermPowerGas
simm = 0.0
n = 5
[../]
[./RelPermMonomial_zero]
type = RichardsRelPermMonomial
simm = 0.1
n = 0
zero_to_the_zero = 0
[../]
# following are unimportant in this test
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./SeffVG]
type = RichardsSeff1VG
m = 0.8
al = 1E-6
[../]
[./RelPermPower_unimportant]
type = RichardsRelPermPower
simm = 0.10101
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.054321
sum_s_res = 0.054321
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E5
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = x
[../]
[./answer_RelPermPower]
type = ParsedFunction
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '2'
[../]
[./answer_dRelPermPower]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '2'
[../]
[./answer_d2RelPermPower]
type = Grad2ParsedFunction
direction = '1E-3 0 0'
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '2'
[../]
[./answer_RelPermPower5]
type = ParsedFunction
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_dRelPermPower5]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_d2RelPermPower5]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_RelPermVG]
type = ParsedFunction
expression = (x^(0.5))*(1-(1-(x^(1.0/m)))^m)^2
symbol_names = 'm'
symbol_values = '0.8'
[../]
[./answer_dRelPermVG]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = (x^(0.5))*(1-(1-(x^(1.0/m)))^m)^2
symbol_names = 'm'
symbol_values = '0.8'
[../]
[./answer_d2RelPermVG]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = (x^(0.5))*(1-(1-(x^(1.0/m)))^m)^2
symbol_names = 'm'
symbol_values = '0.8'
[../]
[./answer_RelPermVG1]
type = ParsedFunction
expression = x^3
[../]
[./answer_dRelPermVG1]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = x^3
[../]
[./answer_d2RelPermVG1]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = x^3
[../]
[./answer_RelPermBW]
type = ParsedFunction
expression = if(x>ss,1,if(x<sn,0,kn+(((x-sn)/(ss-sn))^2)*(c-1)*(ks-kn)/(c-((x-sn)/(ss-sn)))))
symbol_names = 'kn ks c sn ss'
symbol_values = '0 1 1.5 0.05 0.95'
[../]
[./answer_dRelPermBW]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = if(x>ss,1,if(x<sn,0,kn+(((x-sn)/(ss-sn))^2)*(c-1)*(ks-kn)/(c-((x-sn)/(ss-sn)))))
symbol_names = 'kn ks c sn ss'
symbol_values = '0 1 1.5 0.05 0.95'
[../]
[./answer_d2RelPermBW]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = if(x>ss,1,if(x<sn,0,kn+(((x-sn)/(ss-sn))^2)*(c-1)*(ks-kn)/(c-((x-sn)/(ss-sn)))))
symbol_names = 'kn ks c sn ss'
symbol_values = '0 1 1.5 0.05 0.95'
[../]
[./answer_RelPermMonomial]
type = ParsedFunction
expression = x^n
symbol_names = 'n'
symbol_values = '3'
[../]
[./answer_dRelPermMonomial]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = x^n
symbol_names = 'n'
symbol_values = '3'
[../]
[./answer_d2RelPermMonomial]
type = Grad2ParsedFunction
direction = '1E-3 0 0'
expression = x^n
symbol_names = 'n'
symbol_values = '3'
[../]
[./answer_RelPermMonomial_zero]
type = ParsedFunction
expression = if(x>simm,1,0)
symbol_names = 'simm'
symbol_values = '0.1'
[../]
[./answer_dRelPermMonomial_zero]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = if(x>simm,1,0)
symbol_names = 'simm'
symbol_values = '0.1'
[../]
[./answer_d2RelPermMonomial_zero]
type = Grad2ParsedFunction
direction = '1E-3 0 0'
expression = if(x>simm,1,0)
symbol_names = 'simm'
symbol_values = '0.1'
[../]
[./answer_RelPermPowerGas]
type = ParsedFunction
expression = 1-((n+1)*((1-x)^n))+(n*((1-x)^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_dRelPermPowerGas]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = 1-((n+1)*((1-x)^n))+(n*((1-x)^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_d2RelPermPowerGas]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = 1-((n+1)*((1-x)^n))+(n*((1-x)^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_Q2PRelPermPowerGas]
type = ParsedFunction
expression = 1-((n+1)*(x^n))+(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_dQ2PRelPermPowerGas]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = 1-((n+1)*(x^n))+(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_d2Q2PRelPermPowerGas]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = 1-((n+1)*(x^n))+(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[]
[AuxVariables]
[./RelPermPower_Aux]
[../]
[./dRelPermPower_Aux]
[../]
[./d2RelPermPower_Aux]
[../]
[./RelPermPower5_Aux]
[../]
[./dRelPermPower5_Aux]
[../]
[./d2RelPermPower5_Aux]
[../]
[./RelPermVG_Aux]
[../]
[./dRelPermVG_Aux]
[../]
[./d2RelPermVG_Aux]
[../]
[./RelPermVG1_Aux]
[../]
[./dRelPermVG1_Aux]
[../]
[./d2RelPermVG1_Aux]
[../]
[./RelPermBW_Aux]
[../]
[./dRelPermBW_Aux]
[../]
[./d2RelPermBW_Aux]
[../]
[./RelPermMonomial_Aux]
[../]
[./dRelPermMonomial_Aux]
[../]
[./d2RelPermMonomial_Aux]
[../]
[./RelPermPowerGas_Aux]
[../]
[./dRelPermPowerGas_Aux]
[../]
[./d2RelPermPowerGas_Aux]
[../]
[./Q2PRelPermPowerGas_Aux]
[../]
[./dQ2PRelPermPowerGas_Aux]
[../]
[./d2Q2PRelPermPowerGas_Aux]
[../]
[./RelPermMonomial_zero_Aux]
[../]
[./dRelPermMonomial_zero_Aux]
[../]
[./d2RelPermMonomial_zero_Aux]
[../]
[./check_Aux]
[../]
[]
[AuxKernels]
[./RelPermPower_AuxK]
type = RichardsRelPermAux
variable = RelPermPower_Aux
relperm_UO = RelPermPower
seff_var = pressure
[../]
[./dRelPermPower_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermPower_Aux
relperm_UO = RelPermPower
seff_var = pressure
[../]
[./d2RelPermPower_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermPower_Aux
relperm_UO = RelPermPower
seff_var = pressure
[../]
[./RelPermPower5_AuxK]
type = RichardsRelPermAux
variable = RelPermPower5_Aux
relperm_UO = RelPermPower5
seff_var = pressure
[../]
[./dRelPermPower5_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermPower5_Aux
relperm_UO = RelPermPower5
seff_var = pressure
[../]
[./d2RelPermPower5_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermPower5_Aux
relperm_UO = RelPermPower5
seff_var = pressure
[../]
[./RelPermVG_AuxK]
type = RichardsRelPermAux
variable = RelPermVG_Aux
relperm_UO = RelPermVG
seff_var = pressure
[../]
[./dRelPermVG_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermVG_Aux
relperm_UO = RelPermVG
seff_var = pressure
[../]
[./d2RelPermVG_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermVG_Aux
relperm_UO = RelPermVG
seff_var = pressure
[../]
[./RelPermVG1_AuxK]
type = RichardsRelPermAux
variable = RelPermVG1_Aux
relperm_UO = RelPermVG1
seff_var = pressure
[../]
[./dRelPermVG1_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermVG1_Aux
relperm_UO = RelPermVG1
seff_var = pressure
[../]
[./d2RelPermVG1_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermVG1_Aux
relperm_UO = RelPermVG1
seff_var = pressure
[../]
[./RelPermBW_AuxK]
type = RichardsRelPermAux
variable = RelPermBW_Aux
relperm_UO = RelPermBW
seff_var = pressure
[../]
[./dRelPermBW_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermBW_Aux
relperm_UO = RelPermBW
seff_var = pressure
[../]
[./d2RelPermBW_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermBW_Aux
relperm_UO = RelPermBW
seff_var = pressure
[../]
[./RelPermMonomial_AuxK]
type = RichardsRelPermAux
variable = RelPermMonomial_Aux
relperm_UO = RelPermMonomial
seff_var = pressure
[../]
[./dRelPermMonomial_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermMonomial_Aux
relperm_UO = RelPermMonomial
seff_var = pressure
[../]
[./d2RelPermMonomial_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermMonomial_Aux
relperm_UO = RelPermMonomial
seff_var = pressure
[../]
[./RelPermPowerGas_AuxK]
type = RichardsRelPermAux
variable = RelPermPowerGas_Aux
relperm_UO = RelPermPowerGas
seff_var = pressure
[../]
[./dRelPermPowerGas_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermPowerGas_Aux
relperm_UO = RelPermPowerGas
seff_var = pressure
[../]
[./d2RelPermPowerGas_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermPowerGas_Aux
relperm_UO = RelPermPowerGas
seff_var = pressure
[../]
[./Q2PRelPermPowerGas_AuxK]
type = RichardsRelPermAux
variable = Q2PRelPermPowerGas_Aux
relperm_UO = Q2PRelPermPowerGas
seff_var = pressure
[../]
[./dQ2PRelPermPowerGas_AuxK]
type = RichardsRelPermPrimeAux
variable = dQ2PRelPermPowerGas_Aux
relperm_UO = Q2PRelPermPowerGas
seff_var = pressure
[../]
[./d2Q2PRelPermPowerGas_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2Q2PRelPermPowerGas_Aux
relperm_UO = Q2PRelPermPowerGas
seff_var = pressure
[../]
[./RelPermMonomial_zero_AuxK]
type = RichardsRelPermAux
variable = RelPermMonomial_zero_Aux
relperm_UO = RelPermMonomial_zero
seff_var = pressure
[../]
[./dRelPermMonomial_zero_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermMonomial_zero_Aux
relperm_UO = RelPermMonomial_zero
seff_var = pressure
[../]
[./d2RelPermMonomial_zero_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermMonomial_zero_Aux
relperm_UO = RelPermMonomial_zero
seff_var = pressure
[../]
[./check_AuxK]
type = FunctionAux
variable = check_Aux
function = answer_RelPermBW
[../]
[]
[Postprocessors]
[./cf_RelPermPower]
type = NodalL2Error
function = answer_RelPermPower
variable = RelPermPower_Aux
[../]
[./cf_dRelPermPower]
type = NodalL2Error
function = answer_dRelPermPower
variable = dRelPermPower_Aux
[../]
[./cf_d2RelPermPower]
type = NodalL2Error
function = answer_d2RelPermPower
variable = d2RelPermPower_Aux
[../]
[./cf_RelPermPower5]
type = NodalL2Error
function = answer_RelPermPower5
variable = RelPermPower5_Aux
[../]
[./cf_dRelPermPower5]
type = NodalL2Error
function = answer_dRelPermPower5
variable = dRelPermPower5_Aux
[../]
[./cf_d2RelPermPower5]
type = NodalL2Error
function = answer_d2RelPermPower5
variable = d2RelPermPower5_Aux
[../]
[./cf_RelPermVG]
type = NodalL2Error
function = answer_RelPermVG
variable = RelPermVG_Aux
[../]
[./cf_dRelPermVG]
type = NodalL2Error
function = answer_dRelPermVG
variable = dRelPermVG_Aux
[../]
[./cf_d2RelPermVG]
type = NodalL2Error
function = answer_d2RelPermVG
variable = d2RelPermVG_Aux
[../]
[./cf_RelPermVG1]
type = NodalL2Error
function = answer_RelPermVG1
variable = RelPermVG1_Aux
[../]
[./cf_dRelPermVG1]
type = NodalL2Error
function = answer_dRelPermVG1
variable = dRelPermVG1_Aux
[../]
[./cf_d2RelPermVG1]
type = NodalL2Error
function = answer_d2RelPermVG1
variable = d2RelPermVG1_Aux
[../]
[./cf_RelPermBW]
type = NodalL2Error
function = answer_RelPermBW
variable = RelPermBW_Aux
[../]
[./cf_dRelPermBW]
type = NodalL2Error
function = answer_dRelPermBW
variable = dRelPermBW_Aux
[../]
[./cf_d2RelPermBW]
type = NodalL2Error
function = answer_d2RelPermBW
variable = d2RelPermBW_Aux
[../]
[./cf_RelPermMonomial]
type = NodalL2Error
function = answer_RelPermMonomial
variable = RelPermMonomial_Aux
[../]
[./cf_dRelPermMonomial]
type = NodalL2Error
function = answer_dRelPermMonomial
variable = dRelPermMonomial_Aux
[../]
[./cf_d2RelPermMonomial]
type = NodalL2Error
function = answer_d2RelPermMonomial
variable = d2RelPermMonomial_Aux
[../]
[./cf_RelPermPowerGas]
type = NodalL2Error
function = answer_RelPermPowerGas
variable = RelPermPowerGas_Aux
[../]
[./cf_dRelPermPowerGas]
type = NodalL2Error
function = answer_dRelPermPowerGas
variable = dRelPermPowerGas_Aux
[../]
[./cf_d2RelPermPowerGas]
type = NodalL2Error
function = answer_d2RelPermPowerGas
variable = d2RelPermPowerGas_Aux
[../]
[./cf_Q2PRelPermPowerGas]
type = NodalL2Error
function = answer_Q2PRelPermPowerGas
variable = Q2PRelPermPowerGas_Aux
[../]
[./cf_dQ2PRelPermPowerGas]
type = NodalL2Error
function = answer_dQ2PRelPermPowerGas
variable = dQ2PRelPermPowerGas_Aux
[../]
[./cf_d2Q2PRelPermPowerGas]
type = NodalL2Error
function = answer_d2Q2PRelPermPowerGas
variable = d2Q2PRelPermPowerGas_Aux
[../]
[./cf_RelPermMonomial_zero]
type = NodalL2Error
function = answer_RelPermMonomial_zero
variable = RelPermMonomial_zero_Aux
[../]
[./cf_dRelPermMonomial_zero]
type = NodalL2Error
function = answer_dRelPermMonomial_zero
variable = dRelPermMonomial_zero_Aux
[../]
[./cf_d2RelPermMonomial_zero]
type = NodalL2Error
function = answer_d2RelPermMonomial_zero
variable = d2RelPermMonomial_zero_Aux
[../]
[]
#############################################################################
#
# Following is largely unimportant as we are not running an actual similation
#
#############################################################################
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0.01
xmax = 0.99
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
richardsVarNames_UO = PPNames
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
richardsVarNames_UO = PPNames
variable = pressure
[../]
[]
[Materials]
[./unimportant_material]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-20 0 0 0 1E-20 0 0 0 1E-20'
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower_unimportant
sat_UO = Saturation
seff_UO = SeffVG
SUPG_UO = SUPGstandard
viscosity = 1E-3
gravity = '0 0 -10'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./does_nothing]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E50 1E50 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 1
dt = 1E-100
[]
[Outputs]
execute_on = 'timestep_end'
active = 'csv'
file_base = uo1
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
hide = pressure
[../]
[]
(modules/heat_transfer/test/tests/verify_against_analytical/ad_2d_steady_state.i)
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution
# Note that the thermal conductivity, specific heat, and density in this problem
# Are set to 1, and need to be changed to the constants of the material being
# Analyzed
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 2
ymax = 2
[]
[Variables]
[./T]
[../]
[]
[Kernels]
[./HeatDiff]
type = ADHeatConduction
variable = T
[../]
[]
[BCs]
[./zero]
type = DirichletBC
variable = T
boundary = 'right bottom left'
value = 0
[../]
[./top]
type = ADFunctionDirichletBC
variable = T
boundary = top
function = '10*sin(pi*x*0.5)'
[../]
[]
[Materials]
[./properties]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1 1 1'
[../]
[]
[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
[../]
[./elemental_error]
type = ElementL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/utils/spline_interpolation/bicubic_spline_interpolation_x_normal.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1 # needed to ensure Z is the problem dimension
ny = 4
nz = 4
ymax = 4
zmax = 4
[]
[Functions]
[./yx1]
type = ParsedFunction
expression = '3*y^2'
[../]
[./yx2]
type = ParsedFunction
expression = '6*z^2'
[../]
[./spline_fn]
type = BicubicSplineFunction
normal_component = 'x'
x1 = '0 2 4'
x2 = '0 2 4 6'
y = '0 16 128 432 8 24 136 440 64 80 192 496'
yx11 = '0 0 0 0'
yx1n = '48 48 48 48'
yx21 = '0 0 0'
yx2n = '216 216 216'
yx1 = 'yx1'
yx2 = 'yx2'
[../]
[./u_func]
type = ParsedFunction
expression = 'y^3 + 2*z^3'
[../]
[./u2_forcing_func]
type = ParsedFunction
expression = '-6*y - 12*z'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./bi_func_value]
order = FIRST
family = LAGRANGE
[../]
[./y_deriv]
order = FIRST
family = LAGRANGE
[../]
[./z_deriv]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./bi_func_value]
type = FunctionAux
variable = bi_func_value
function = spline_fn
[../]
[./deriv_1]
type = FunctionDerivativeAux
function = spline_fn
variable = y_deriv
component = y
[../]
[./deriv_2]
type = FunctionDerivativeAux
function = spline_fn
variable = z_deriv
component = z
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = u2_forcing_func
[../]
[]
[BCs]
[./sides]
type = FunctionDirichletBC
variable = u
boundary = 'left right front back'
function = u_func
[../]
[]
[Postprocessors]
[./nodal_l2_err_spline]
type = NodalL2Error
variable = u
function = spline_fn
execute_on = 'initial timestep_end'
[../]
[./nodal_l2_err_analytic]
type = NodalL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[../]
[./y_deriv_err_analytic]
type = NodalL2Error
variable = y_deriv
function = yx1
execute_on = 'initial timestep_end'
[../]
[./z_deriv_err_analytic]
type = NodalL2Error
variable = z_deriv
function = yx2
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/user_objects/uo4.i)
# Seff 2-phase User objects give the correct value
#
# If you want to add another test for another UserObject
# then add the UserObject, add a Function defining the expected result,
# add an AuxVariable and AuxKernel that will record the UserObjects value
# and finally add a NodalL2Error that compares this with the Function
#
# Here pressure is x where x is between -5 and 5
[UserObjects]
[./Seff2waterVG]
type = RichardsSeff2waterVG
m = 0.8
al = 0.3
[../]
[./Seff2gasVG]
type = RichardsSeff2gasVG
m = 0.8
al = 0.3
[../]
[./Seff2waterVGshifted]
type = RichardsSeff2waterVGshifted
m = 0.8
al = 0.3
shift = 2
[../]
[./Seff2gasVGshifted]
type = RichardsSeff2gasVGshifted
m = 0.8
al = 0.3
shift = 2
[../]
# following are unimportant in this test
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.10101
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.1
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1
[../]
[]
[Functions]
[./initial_pwater]
type = ParsedFunction
expression = x
[../]
[./initial_pgas]
type = ParsedFunction
expression = 5.0
[../]
[./answer_Seff2waterVG]
type = ParsedFunction
expression = (1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_dSeff2waterVG]
type = GradParsedFunction
direction = '1E-5 0 0'
expression = (1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_d2Seff2waterVG]
type = Grad2ParsedFunction
direction = '1E-4 0 0'
expression = (1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_Seff2gasVG]
type = ParsedFunction
expression = 1-(1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_dSeff2gasVG]
type = GradParsedFunction
direction = '1E-5 0 0'
expression = 1-(1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_d2Seff2gasVG]
type = Grad2ParsedFunction
direction = '1E-4 0 0'
expression = 1-(1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_Seff2waterVGshifted]
type = ParsedFunction
expression = ((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[./answer_dSeff2waterVGshifted]
type = GradParsedFunction
direction = '1E-5 0 0'
expression = ((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[./answer_d2Seff2waterVGshifted]
type = Grad2ParsedFunction
direction = '1E-4 0 0'
expression = ((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[./answer_Seff2gasVGshifted]
type = ParsedFunction
expression = 1-((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[./answer_dSeff2gasVGshifted]
type = GradParsedFunction
direction = '1E-5 0 0'
expression = 1-((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[./answer_d2Seff2gasVGshifted]
type = Grad2ParsedFunction
direction = '1E-4 0 0'
expression = 1-((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[]
[AuxVariables]
[./Seff2waterVG_Aux]
[../]
[./dSeff2waterVG_Aux]
[../]
[./d2Seff2waterVG_Aux]
[../]
[./Seff2gasVG_Aux]
[../]
[./dSeff2gasVG_Aux]
[../]
[./d2Seff2gasVG_Aux]
[../]
[./Seff2waterVGshifted_Aux]
[../]
[./dSeff2waterVGshifted_Aux]
[../]
[./d2Seff2waterVGshifted_Aux]
[../]
[./Seff2gasVGshifted_Aux]
[../]
[./dSeff2gasVGshifted_Aux]
[../]
[./d2Seff2gasVGshifted_Aux]
[../]
[./check_Aux]
[../]
[]
[AuxKernels]
[./Seff2waterVG_AuxK]
type = RichardsSeffAux
variable = Seff2waterVG_Aux
seff_UO = Seff2waterVG
pressure_vars = 'pwater pgas'
[../]
[./dSeff2waterVG_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff2waterVG_Aux
seff_UO = Seff2waterVG
pressure_vars = 'pwater pgas'
wrtnum = 0
[../]
[./d2Seff2waterVG_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff2waterVG_Aux
seff_UO = Seff2waterVG
pressure_vars = 'pwater pgas'
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff2gasVG_AuxK]
type = RichardsSeffAux
variable = Seff2gasVG_Aux
seff_UO = Seff2gasVG
pressure_vars = 'pwater pgas'
[../]
[./dSeff2gasVG_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff2gasVG_Aux
seff_UO = Seff2gasVG
pressure_vars = 'pwater pgas'
wrtnum = 0
[../]
[./d2Seff2gasVG_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff2gasVG_Aux
seff_UO = Seff2gasVG
pressure_vars = 'pwater pgas'
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff2waterVGshifted_AuxK]
type = RichardsSeffAux
variable = Seff2waterVGshifted_Aux
seff_UO = Seff2waterVGshifted
pressure_vars = 'pwater pgas'
[../]
[./dSeff2waterVGshifted_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff2waterVGshifted_Aux
seff_UO = Seff2waterVGshifted
pressure_vars = 'pwater pgas'
wrtnum = 0
[../]
[./d2Seff2waterVGshifted_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff2waterVGshifted_Aux
seff_UO = Seff2waterVGshifted
pressure_vars = 'pwater pgas'
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff2gasVGshifted_AuxK]
type = RichardsSeffAux
variable = Seff2gasVGshifted_Aux
seff_UO = Seff2gasVGshifted
pressure_vars = 'pwater pgas'
[../]
[./dSeff2gasVGshifted_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff2gasVGshifted_Aux
seff_UO = Seff2gasVGshifted
pressure_vars = 'pwater pgas'
wrtnum = 0
[../]
[./d2Seff2gasVGshifted_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff2gasVGshifted_Aux
seff_UO = Seff2gasVGshifted
pressure_vars = 'pwater pgas'
wrtnum1 = 0
wrtnum2 = 0
[../]
[./check_AuxK]
type = FunctionAux
variable = check_Aux
function = answer_d2Seff2waterVGshifted
[../]
[]
[Postprocessors]
[./cf_Seff2waterVG]
type = NodalL2Error
function = answer_Seff2waterVG
variable = Seff2waterVG_Aux
[../]
[./cf_dSeff2waterVG]
type = NodalL2Error
function = answer_dSeff2waterVG
variable = dSeff2waterVG_Aux
[../]
[./cf_d2Seff2waterVG]
type = NodalL2Error
function = answer_d2Seff2waterVG
variable = d2Seff2waterVG_Aux
[../]
[./cf_Seff2gasVG]
type = NodalL2Error
function = answer_Seff2gasVG
variable = Seff2gasVG_Aux
[../]
[./cf_dSeff2gasVG]
type = NodalL2Error
function = answer_dSeff2gasVG
variable = dSeff2gasVG_Aux
[../]
[./cf_d2Seff2gasVG]
type = NodalL2Error
function = answer_d2Seff2gasVG
variable = d2Seff2gasVG_Aux
[../]
[./cf_Seff2waterVGshifted]
type = NodalL2Error
function = answer_Seff2waterVGshifted
variable = Seff2waterVGshifted_Aux
[../]
[./cf_dSeff2waterVGshifted]
type = NodalL2Error
function = answer_dSeff2waterVGshifted
variable = dSeff2waterVGshifted_Aux
[../]
[./cf_d2Seff2waterVGshifted]
type = NodalL2Error
function = answer_d2Seff2waterVGshifted
variable = d2Seff2waterVGshifted_Aux
[../]
[./cf_Seff2gasVGshifted]
type = NodalL2Error
function = answer_Seff2gasVGshifted
variable = Seff2gasVGshifted_Aux
[../]
[./cf_dSeff2gasVGshifted]
type = NodalL2Error
function = answer_dSeff2gasVGshifted
variable = dSeff2gasVGshifted_Aux
[../]
[./cf_d2Seff2gasVGshifted]
type = NodalL2Error
function = answer_d2Seff2gasVGshifted
variable = d2Seff2gasVGshifted_Aux
[../]
[]
#############################################################################
#
# Following is largely unimportant as we are not running an actual similation
#
#############################################################################
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -5
xmax = 5
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pwater
[../]
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pgas
[../]
[../]
[]
[Kernels]
active = 'watert gast'
[./watert]
type = RichardsMassChange
richardsVarNames_UO = PPNames
variable = pwater
[../]
[./gast]
type = RichardsMassChange
richardsVarNames_UO = PPNames
variable = pgas
[../]
[]
[Materials]
[./unimportant_material]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-20 0 0 0 1E-20 0 0 0 1E-20'
richardsVarNames_UO = PPNames
density_UO = 'DensityConstBulk DensityConstBulk'
relperm_UO = 'RelPermPower RelPermPower'
sat_UO = 'Saturation Saturation'
seff_UO = 'Seff2waterVG Seff2gasVG'
SUPG_UO = 'SUPGstandard SUPGstandard'
viscosity = '1E-3 1E-5'
gravity = '0 0 -10'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./does_nothing]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E50 1E50 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 1
dt = 1E-100
[]
[Outputs]
execute_on = 'timestep_end'
active = 'csv'
file_base = uo4
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
[../]
[]
(modules/richards/test/tests/user_objects/uo2.i)
# Density User objects give the correct value
#
# If you want to add another test for another UserObject
# then add the UserObject, add a Function defining the expected result,
# add an AuxVariable and AuxKernel that will record the UserObjects value
# and finally add a NodalL2Error that compares this with the Function
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./DensityIdeal]
type = RichardsDensityIdeal
p0 = 33333
slope = 1.1E-2
[../]
[./DensityMethane20degC]
type = RichardsDensityMethane20degC
[../]
[./DensityVDW]
type = RichardsDensityVDW
a = 0.2303
b = 4.31E-4
temperature = 293
molar_mass = 16.04246E-3
infinity_ratio = 10
[../]
[./DensityConstBulkCut]
type = RichardsDensityConstBulkCut
dens0 = 1000
bulk_mod = 2E6
cut_limit = 1E6
zero_point = -1E6
[../]
# following are unimportant in this test
[./SeffVG]
type = RichardsSeff1VG
m = 0.8
al = 1E-6
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.10101
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.054321
sum_s_res = 0.054321
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E5
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = x
[../]
[./answer_DensityConstBulk]
type = ParsedFunction
expression = dens0*exp(x/bulk_mod)
symbol_names = 'dens0 bulk_mod'
symbol_values = '1000 2E6'
[../]
[./answer_dDensityConstBulk]
type = GradParsedFunction
direction = '1 0 0'
expression = dens0*exp(x/bulk_mod)
symbol_names = 'dens0 bulk_mod'
symbol_values = '1000 2E6'
[../]
[./answer_d2DensityConstBulk]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = dens0*exp(x/bulk_mod)
symbol_names = 'dens0 bulk_mod'
symbol_values = '1000 2E6'
[../]
[./answer_DensityIdeal]
type = ParsedFunction
expression = slope*(x-p0)
symbol_names = 'p0 slope'
symbol_values = '33333 1.1E-2'
[../]
[./answer_dDensityIdeal]
type = GradParsedFunction
direction = '1 0 0'
expression = slope*(x-p0)
symbol_names = 'p0 slope'
symbol_values = '33333 1.1E-2'
[../]
[./answer_d2DensityIdeal]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = slope*(x-p0)
symbol_names = 'p0 slope'
symbol_values = '33333 1.1E-2'
[../]
[./answer_DensityMethane20degC]
type = ParsedFunction
expression = if(x>0,(0.00654576947608E-3*x+1.04357716547E-13*x^2),0)+if(x<0,0.1*(e^(6.54576947608E-5*x)-1),0)
[../]
[./answer_dDensityMethane20degC]
type = GradParsedFunction
direction = '1 0 0'
expression = if(x>0,(0.00654576947608E-3*x+1.04357716547E-13*x^2),0)+if(x<0,0.1*(e^(6.54576947608E-5*x)-1),0)
[../]
[./answer_d2DensityMethane20degC]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = if(x>0,(0.00654576947608E-3*x+1.04357716547E-13*x^2),0)+if(x<0,0.1*(e^(6.54576947608E-5*x)-1),0)
[../]
[./answer_DensityVDW]
type = ParsedFunction
expression = if(x>0,-(molar_mass*(-2+(2*pow(2,0.3333333333333333)*(a-3*b*(b*x+rt)))/pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333)+(pow(2,0.6666666666666666)*pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333))/a))/(6.*b)+(molar_mass*(-2+(2*pow(2,0.3333333333333333)*(a-3*b*(b*0+rt)))/pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*0+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*0-rt),2)-4*pow(a-3*b*(b*0+rt),3)),0.5),0.3333333333333333)+(pow(2,0.6666666666666666)*pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*0+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*0-rt),2)-4*pow(a-3*b*(b*0+rt),3)),0.5),0.3333333333333333))/a))/(6.*b),infinityratio*molar_mass*(e^(slope0*x)-1))
symbol_names = 'a b rt molar_mass infinityratio slope0'
symbol_values = '0.2303 0.000431 2436.1403 0.01604246 10 4.10485e-05'
[../]
[./answer_dDensityVDW]
type = GradParsedFunction
direction = '1 0 0'
expression = if(x>0,-(molar_mass*(-2+(2*pow(2,0.3333333333333333)*(a-3*b*(b*x+rt)))/pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333)+(pow(2,0.6666666666666666)*pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333))/a))/(6.*b),infinityratio*molar_mass*(e^(slope0*x)-1))
symbol_names = 'a b rt molar_mass infinityratio slope0'
symbol_values = '0.2303 0.000431 2436.1403 0.01604246 10 4.10485e-05'
[../]
[./answer_d2DensityVDW]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = if(x>0,-(molar_mass*(-2+(2*pow(2,0.3333333333333333)*(a-3*b*(b*x+rt)))/pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333)+(pow(2,0.6666666666666666)*pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333))/a))/(6.*b),infinityratio*molar_mass*(e^(slope0*x)-1))
symbol_names = 'a b rt molar_mass infinityratio slope0'
symbol_values = '0.2303 0.000431 2436.1403 0.01604246 10 4.10485e-05'
[../]
[./answer_DensityConstBulkCut]
type = ParsedFunction
expression = if(x<zero_pt,0,if(x>cut_limit,dens0*exp(x/bulk_mod),(3*cut_limit-2*x-zero_pt)*(x-zero_pt)*(x-zero_pt)*dens0*exp(x/bulk_mod)/(cut_limit-zero_pt)/(cut_limit-zero_pt)/(cut_limit-zero_pt)))
symbol_names = 'dens0 bulk_mod zero_pt cut_limit'
symbol_values = '1000 2E6 -1E6 1E6'
[../]
[./answer_dDensityConstBulkCut]
type = GradParsedFunction
direction = '1 0 0'
expression = if(x<zero_pt,0,if(x>cut_limit,dens0*exp(x/bulk_mod),(3*cut_limit-2*x-zero_pt)*(x-zero_pt)*(x-zero_pt)*dens0*exp(x/bulk_mod)/(cut_limit-zero_pt)/(cut_limit-zero_pt)/(cut_limit-zero_pt)))
symbol_names = 'dens0 bulk_mod zero_pt cut_limit'
symbol_values = '1000 2E6 -1E6 1E6'
[../]
[./answer_d2DensityConstBulkCut]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = if(x<zero_pt,0,if(x>cut_limit,dens0*exp(x/bulk_mod),(3*cut_limit-2*x-zero_pt)*(x-zero_pt)*(x-zero_pt)*dens0*exp(x/bulk_mod)/(cut_limit-zero_pt)/(cut_limit-zero_pt)/(cut_limit-zero_pt)))
symbol_names = 'dens0 bulk_mod zero_pt cut_limit'
symbol_values = '1000 2E6 -1E6 1E6'
[../]
[]
[AuxVariables]
[./DensityConstBulk_Aux]
[../]
[./dDensityConstBulk_Aux]
[../]
[./d2DensityConstBulk_Aux]
[../]
[./DensityIdeal_Aux]
[../]
[./dDensityIdeal_Aux]
[../]
[./d2DensityIdeal_Aux]
[../]
[./DensityMethane20degC_Aux]
[../]
[./dDensityMethane20degC_Aux]
[../]
[./d2DensityMethane20degC_Aux]
[../]
[./DensityVDW_Aux]
[../]
[./dDensityVDW_Aux]
[../]
[./d2DensityVDW_Aux]
[../]
[./DensityConstBulkCut_Aux]
[../]
[./dDensityConstBulkCut_Aux]
[../]
[./d2DensityConstBulkCut_Aux]
[../]
[./check_Aux]
[../]
[]
[AuxKernels]
[./DensityConstBulk_AuxK]
type = RichardsDensityAux
variable = DensityConstBulk_Aux
density_UO = DensityConstBulk
pressure_var = pressure
[../]
[./dDensityConstBulk_AuxK]
type = RichardsDensityPrimeAux
variable = dDensityConstBulk_Aux
density_UO = DensityConstBulk
pressure_var = pressure
[../]
[./d2DensityConstBulk_AuxK]
type = RichardsDensityPrimePrimeAux
variable = d2DensityConstBulk_Aux
density_UO = DensityConstBulk
pressure_var = pressure
[../]
[./DensityIdeal_AuxK]
type = RichardsDensityAux
variable = DensityIdeal_Aux
density_UO = DensityIdeal
pressure_var = pressure
[../]
[./dDensityIdeal_AuxK]
type = RichardsDensityPrimeAux
variable = dDensityIdeal_Aux
density_UO = DensityIdeal
pressure_var = pressure
[../]
[./d2DensityIdeal_AuxK]
type = RichardsDensityPrimePrimeAux
variable = d2DensityIdeal_Aux
density_UO = DensityIdeal
pressure_var = pressure
[../]
[./DensityMethane20degC_AuxK]
type = RichardsDensityAux
variable = DensityMethane20degC_Aux
density_UO = DensityMethane20degC
pressure_var = pressure
[../]
[./dDensityMethane20degC_AuxK]
type = RichardsDensityPrimeAux
variable = dDensityMethane20degC_Aux
density_UO = DensityMethane20degC
pressure_var = pressure
[../]
[./d2DensityMethane20degC_AuxK]
type = RichardsDensityPrimePrimeAux
variable = d2DensityMethane20degC_Aux
density_UO = DensityMethane20degC
pressure_var = pressure
[../]
[./DensityVDW_AuxK]
type = RichardsDensityAux
variable = DensityVDW_Aux
density_UO = DensityVDW
pressure_var = pressure
[../]
[./dDensityVDW_AuxK]
type = RichardsDensityPrimeAux
variable = dDensityVDW_Aux
density_UO = DensityVDW
pressure_var = pressure
[../]
[./d2DensityVDW_AuxK]
type = RichardsDensityPrimePrimeAux
variable = d2DensityVDW_Aux
density_UO = DensityVDW
pressure_var = pressure
[../]
[./DensityConstBulkCut_AuxK]
type = RichardsDensityAux
variable = DensityConstBulkCut_Aux
density_UO = DensityConstBulkCut
pressure_var = pressure
[../]
[./dDensityConstBulkCut_AuxK]
type = RichardsDensityPrimeAux
variable = dDensityConstBulkCut_Aux
density_UO = DensityConstBulkCut
pressure_var = pressure
[../]
[./d2DensityConstBulkCut_AuxK]
type = RichardsDensityPrimePrimeAux
variable = d2DensityConstBulkCut_Aux
density_UO = DensityConstBulkCut
pressure_var = pressure
[../]
[./check_AuxK]
type = FunctionAux
variable = check_Aux
function = answer_d2DensityConstBulkCut
[../]
[]
[Postprocessors]
[./cf_DensityConstBulk]
type = NodalL2Error
function = answer_DensityConstBulk
variable = DensityConstBulk_Aux
[../]
[./cf_dDensityConstBulk]
type = NodalL2Error
function = answer_dDensityConstBulk
variable = dDensityConstBulk_Aux
[../]
[./cf_d2DensityConstBulk]
type = NodalL2Error
function = answer_d2DensityConstBulk
variable = d2DensityConstBulk_Aux
[../]
[./cf_DensityIdeal]
type = NodalL2Error
function = answer_DensityIdeal
variable = DensityIdeal_Aux
[../]
[./cf_dDensityIdeal]
type = NodalL2Error
function = answer_dDensityIdeal
variable = dDensityIdeal_Aux
[../]
[./cf_d2DensityIdeal]
type = NodalL2Error
function = answer_d2DensityIdeal
variable = d2DensityIdeal_Aux
[../]
[./cf_DensityMethane20degC]
type = NodalL2Error
function = answer_DensityMethane20degC
variable = DensityMethane20degC_Aux
[../]
[./cf_dDensityMethane20degC]
type = NodalL2Error
function = answer_dDensityMethane20degC
variable = dDensityMethane20degC_Aux
[../]
[./cf_d2DensityMethane20degC]
type = NodalL2Error
function = answer_d2DensityMethane20degC
variable = d2DensityMethane20degC_Aux
[../]
[./cf_DensityVDW]
type = NodalL2Error
function = answer_DensityVDW
variable = DensityVDW_Aux
[../]
[./cf_dDensityVDW]
type = NodalL2Error
function = answer_dDensityVDW
variable = dDensityVDW_Aux
[../]
[./cf_d2DensityVDW]
type = NodalL2Error
function = answer_d2DensityVDW
variable = d2DensityVDW_Aux
[../]
[./cf_DensityConstBulkCut]
type = NodalL2Error
function = answer_DensityConstBulkCut
variable = DensityConstBulkCut_Aux
[../]
[./cf_dDensityConstBulkCut]
type = NodalL2Error
function = answer_dDensityConstBulkCut
variable = dDensityConstBulkCut_Aux
[../]
[./cf_d2DensityConstBulkCut]
type = NodalL2Error
function = answer_d2DensityConstBulkCut
variable = d2DensityConstBulkCut_Aux
[../]
[]
#############################################################################
#
# Following is largely unimportant as we are not running an actual similation
#
#############################################################################
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -5E6
xmax = 5E6
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[Kernels]
active = 'richardst'
[./richardst]
type = RichardsMassChange
richardsVarNames_UO = PPNames
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
richardsVarNames_UO = PPNames
variable = pressure
[../]
[]
[Materials]
[./unimportant_material]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-20 0 0 0 1E-20 0 0 0 1E-20'
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = SeffVG
SUPG_UO = SUPGstandard
viscosity = 1E-3
gravity = '0 0 -10'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./does_nothing]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E50 1E50 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 1
dt = 1E-100
[]
[Outputs]
execute_on = 'timestep_end'
active = 'csv'
file_base = uo2
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
hide = pressure
[../]
[]
(modules/misc/test/tests/kernels/thermo_diffusion/ad_thermo_diffusion.i)
# Steady-state test for the ThermoDiffusion kernel.
#
# This test applies a constant temperature gradient to drive thermo-diffusion
# in the variable u. At steady state, the thermo-diffusion is balanced by
# diffusion due to Fick's Law, so the total flux is
#
# J = -D ( grad(u) - ( Qstar u / R ) grad(1/T) )
#
# If there are no fluxes at the boundaries, then there is no background flux and
# these two terms must balance each other everywhere:
#
# grad(u) = ( Qstar u / R ) grad(1/T)
#
# The dx can be eliminated to give
#
# d(ln u) / d(1/T) = Qstar / R
#
# This can be solved to give the profile for u as a function of temperature:
#
# u = A exp( Qstar / R T )
#
# Here, we are using simple heat conduction with Dirichlet boundaries on 0 <= x <= 1
# to give a linear profile for temperature: T = x + 1. We also need to apply one
# boundary condition on u, which is u(x=0) = 1. These conditions give:
#
# u = exp( -(Qstar/R) (x/(x+1)) )
#
# This analytical result is tracked by the aux variable "correct_u".
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
[]
[Variables]
[./u]
initial_condition = 1
[../]
[./temp]
initial_condition = 1
[../]
[]
[Kernels]
[./soret]
type = ADThermoDiffusion
variable = u
temperature = temp
[../]
[./diffC]
type = ADDiffusion
variable = u
[../]
# Heat diffusion gives a linear temperature profile to drive the Soret diffusion.
[./diffT]
type = ADDiffusion
variable = temp
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
preset = false
boundary = left
value = 1
[../]
[./leftt]
type = DirichletBC
variable = temp
preset = false
boundary = left
value = 1
[../]
[./rightt]
type = DirichletBC
variable = temp
preset = false
boundary = right
value = 2
[../]
[]
[Materials]
[./ad_soret_coefficient]
type = ADSoretCoeffTest
temperature = temp
coupled_var = u
[../]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = NodalL2Error
variable = u
function = 'exp(-x/(x+1))'
[../]
[]
[Outputs]
execute_on = FINAL
exodus = true
[]
(modules/heat_transfer/test/tests/heat_source_bar/heat_source_bar.i)
# This is a simple 1D test of the volumetric heat source with material properties
# of a representative ceramic material. A bar is uniformly heated, and a temperature
# boundary condition is applied to the left side of the bar.
# Important properties of problem:
# Length: 0.01 m
# Thermal conductivity = 3.0 W/(mK)
# Specific heat = 300.0 J/K
# density = 10431.0 kg/m^3
# Prescribed temperature on left side: 600 K
# When it has reached steady state, the temperature as a function of position is:
# T = -q/(2*k) (x^2 - 2*x*length) + 600
# or
# T = -6.3333e+7 * (x^2 - 0.02*x) + 600
# on left side: T=600, on right side, T=6933.3
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 0.01
nx = 20
[]
[Variables]
[./temp]
initial_condition = 300.0
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./heatsource]
type = HeatSource
function = volumetric_heat
variable = temp
[../]
[]
[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = temp
value = 600
[../]
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = 'density thermal_conductivity'
prop_values = '10431.0 3.0'
[../]
[]
[Functions]
[./volumetric_heat]
type = ParsedFunction
expression = 3.8e+8
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./right]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./error]
type = NodalL2Error
function = '-3.8e+8/(2*3) * (x^2 - 2*x*0.01) + 600'
variable = temp
[../]
[]
[Outputs]
execute_on = FINAL
exodus = true
[]
(test/tests/functions/piecewise_multilinear/twoDa.i)
# PiecewiseMultilinear function tests in 2D
# See [Functions] block for a description of the tests
# The functions are compared with ParsedFunctions using postprocessors
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
nx = 6
ymin = 0
ymax = 1
ny = 6
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./bilinear1_var]
[../]
[]
[AuxKernels]
[./bilinear1_AuxK]
type = FunctionAux
variable = bilinear1_var
function = bilinear1_fcn
[../]
[]
[Functions]
# This is just f = 1 + 2x + 3y
[./bilinear1_fcn]
type = PiecewiseMultilinear
data_file = twoD1.txt
[../]
[./bilinear1_answer]
type = ParsedFunction
expression = 1+2*x+3*y
[../]
[]
[Postprocessors]
[./bilinear1_pp]
type = NodalL2Error
function = bilinear1_answer
variable = bilinear1_var
[../]
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = twoDa
hide = dummy
csv = true
[]
(test/tests/bcs/nodal_normals/circle_quads.i)
[Mesh]
file = circle-quads.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./analytical_normal_x]
type = ParsedFunction
expression = x
[../]
[./analytical_normal_y]
type = ParsedFunction
expression = y
[../]
[]
[NodalNormals]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Postprocessors]
[./nx_pps]
type = NodalL2Error
variable = nodal_normal_x
boundary = '1'
function = analytical_normal_x
[../]
[./ny_pps]
type = NodalL2Error
variable = nodal_normal_y
boundary = '1'
function = analytical_normal_y
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(python/peacock/tests/common/lcf1.i)
# LinearCombinationFunction function test
# See [Functions] block for a description of the tests
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 2
nx = 10
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./the_linear_combo]
[../]
[]
[AuxKernels]
[./the_linear_combo]
type = FunctionAux
variable = the_linear_combo
function = the_linear_combo
[../]
[]
[Functions]
[./xtimes]
type = ParsedFunction
expression = 1.1*x
[../]
[./twoxplus1]
type = ParsedFunction
expression = 2*x+1
[../]
[./xsquared]
type = ParsedFunction
expression = (x-2)*x
[../]
[./tover2]
type = ParsedFunction
expression = 0.5*t
[../]
[./the_linear_combo]
type = LinearCombinationFunction
functions = 'xtimes twoxplus1 xsquared tover2'
w = '3 -1.2 0.4 3'
[../]
[./should_be_answer]
type = ParsedFunction
expression = 3*1.1*x-1.2*(2*x+1)+0.4*(x-2)*x+3*0.5*t
[../]
[]
[Postprocessors]
[./should_be_zero]
type = NodalL2Error
function = should_be_answer
variable = the_linear_combo
[../]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = lcf1
hide = dummy
exodus = false
csv = true
[]
(test/tests/auxkernels/time_integration/time_integration.i)
# This test covers the usage of the VariableTimeIntegrationAux
# kernel. Here we test three different schemes for integrating a field
# variable in time. Midpoint, Trapezoidal, and Simpson's rule are
# used. For this test, we use a manufactured solution and we compare
# the Trapezoidal and Simpson's rule, which must be exact for this
# exact solution, which is a linear function of time.
#
# The set up problem is
#
# du/dt - Laplacian(u) = Q
#
# with exact solution: u = t*(x*x+y*y).
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD9
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[./dts]
type = PiecewiseLinear
x = '0.01 0.1'
y = '0.005 0.05'
[../]
[]
[Variables]
[./u]
initial_condition = 0.0
family = LAGRANGE
order = SECOND
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./timederivative]
type = TimeDerivative
variable = u
[../]
[./sourceterm]
type = BodyForce
variable = u
function = Source
[../]
[]
[AuxVariables]
[./v_midpoint]
[../]
[./v_trapazoid]
[../]
[./v_simpson]
[../]
[]
[AuxKernels]
[./MidpointTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_midpoint
order = 1
[../]
[./TrapazoidalTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_trapazoid
order = 2
[../]
[./SimpsonsTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_simpson
order = 3
[../]
[]
[BCs]
[./RightBC]
type = FunctionDirichletBC
variable = u
function = RightBC
boundary = 'right'
[../]
[./LeftBC]
type = FunctionDirichletBC
variable = u
function = LeftBC
boundary = 'left'
[../]
[./TopBC]
type = FunctionDirichletBC
variable = u
function = TopBC
boundary = 'top'
[../]
[./BottomBC]
type = FunctionDirichletBC
variable = u
function = BottomBC
boundary = 'bottom'
[../]
[]
[Functions]
[./Soln]
type = ParsedFunction
expression = 't*(x*x+y*y)'
[../]
[./Source]
type = ParsedFunction
expression = '(x*x + y*y) - 4*t'
[../]
[./TopBC]
type = ParsedFunction
expression = 't*(x*x+1)'
[../]
[./BottomBC]
type = ParsedFunction
expression = 't*x*x'
[../]
[./RightBC]
type = ParsedFunction
expression = 't*(y*y+1)'
[../]
[./LeftBC]
type = ParsedFunction
expression = 't*y*y'
[../]
[]
[Postprocessors]
[./l2_error]
type = NodalL2Error
variable = u
function = Soln
[../]
[]
[Executioner]
type = Transient
end_time = 0.1
# dt = 0.1
# num_steps = 10
[./TimeStepper]
type = FunctionDT
function = dts
[../]
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/functions/linear_combination_function/lcf1.i)
# LinearCombinationFunction function test
# See [Functions] block for a description of the tests
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 2
nx = 10
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./the_linear_combo]
[../]
[]
[AuxKernels]
[./the_linear_combo]
type = FunctionAux
variable = the_linear_combo
function = the_linear_combo
[../]
[]
[Functions]
[./xtimes]
type = ParsedFunction
expression = 1.1*x
[../]
[./twoxplus1]
type = ParsedFunction
expression = 2*x+1
[../]
[./xsquared]
type = ParsedFunction
expression = (x-2)*x
[../]
[./tover2]
type = ParsedFunction
expression = 0.5*t
[../]
[./the_linear_combo]
type = LinearCombinationFunction
functions = 'xtimes twoxplus1 xsquared tover2'
w = '3 -1.2 0.4 3'
[../]
[./should_be_answer]
type = ParsedFunction
expression = 3*1.1*x-1.2*(2*x+1)+0.4*(x-2)*x+3*0.5*t
[../]
[]
[Postprocessors]
[./should_be_zero]
type = NodalL2Error
function = should_be_answer
variable = the_linear_combo
[../]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = lcf1
hide = dummy
exodus = false
csv = true
[]
(test/tests/kernels/ad_mat_diffusion/2d_steady_state.i)
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution
# Note that the thermal conductivity, specific heat, and density in this problem
# Are set to 1, and need to be changed to the constants of the material being
# Analyzed
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 2
ymax = 2
[]
[Variables]
[./T]
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = T
diffusivity = 1
[../]
[]
[BCs]
[./zero]
type = DirichletBC
variable = T
boundary = 'left right bottom'
value = 0
[../]
[./top]
type = FunctionDirichletBC
variable = T
boundary = top
function = '10*sin(pi*x*0.5)'
[../]
[]
[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
outputs = console
[../]
[./elemental_error]
type = ElementL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
outputs = console
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ad_mat_diffusion/ad_2d_steady_state.i)
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution
# Note that the thermal conductivity, specific heat, and density in this problem
# Are set to 1, and need to be changed to the constants of the material being
# Analyzed
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 2
ymax = 2
[]
[Variables]
[./T]
[../]
[]
[Kernels]
[./HeatDiff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[../]
[]
[BCs]
[./zero]
type = DirichletBC
variable = T
boundary = 'left right bottom'
value = 0
[../]
[./top]
type = ADFunctionDirichletBC
variable = T
boundary = top
function = '10*sin(pi*x*0.5)'
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = diffusivity
prop_values = 1
[../]
[]
[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
outputs = console
[../]
[./elemental_error]
type = ElementL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
outputs = console
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/verify_against_analytical/2d_steady_state.i)
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution
# Note that the thermal conductivity, specific heat, and density in this problem
# Are set to 1, and need to be changed to the constants of the material being
# Analyzed
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 2
ymax = 2
[]
[Variables]
[./T]
[../]
[]
[Kernels]
[./HeatDiff]
type = HeatConduction
variable = T
[../]
[]
[BCs]
[./zero]
type = DirichletBC
variable = T
boundary = 'left right bottom'
value = 0
[../]
[./top]
type = FunctionDirichletBC
variable = T
boundary = top
function = '10*sin(pi*x*0.5)'
[../]
[]
[Materials]
[./properties]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1 1 1'
[../]
[]
[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
[../]
[./elemental_error]
type = ElementL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ad_mat_diffusion/1D_transient.i)
# This test solves a 1D transient heat equation
# The error is calculated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = T
diffusivity = 0.95
[../]
[./dt]
type = CoefTimeDerivative
variable = T
Coefficient = 0.82064
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Executioner]
type = Transient
dt = 1e-2
end_time = 1
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
outputs = console
[../]
[]
[Outputs]
exodus = true
[]
(python/peacock/tests/input_tab/InputTree/gold/lcf1.i)
# LinearCombinationFunction function test
# See [Functions] block for a description of the tests
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 2
nx = 10
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[dummy_u]
type = TimeDerivative
variable = dummy
[]
[]
[AuxVariables]
[the_linear_combo]
[]
[]
[AuxKernels]
[the_linear_combo]
type = FunctionAux
variable = the_linear_combo
function = the_linear_combo
[]
[]
[Functions]
[xtimes]
type = ParsedFunction
expression = '1.1*x'
[]
[twoxplus1]
type = ParsedFunction
expression = '2*x+1'
[]
[xsquared]
type = ParsedFunction
expression = '(x-2)*x'
[]
[tover2]
type = ParsedFunction
expression = '0.5*t'
[]
[the_linear_combo]
type = LinearCombinationFunction
functions = 'xtimes twoxplus1 xsquared tover2'
w = '3 -1.2 0.4 3'
[]
[should_be_answer]
type = ParsedFunction
expression = '3*1.1*x-1.2*(2*x+1)+0.4*(x-2)*x+3*0.5*t'
[]
[]
[Postprocessors]
[should_be_zero]
type = NodalL2Error
function = should_be_answer
variable = 'the_linear_combo'
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = lcf1
hide = 'dummy'
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/heat_source_bar/ad_heat_source_bar.i)
# This is a simple 1D test of the volumetric heat source with material properties
# of a representative ceramic material. A bar is uniformly heated, and a temperature
# boundary condition is applied to the left side of the bar.
# Important properties of problem:
# Length: 0.01 m
# Thermal conductivity = 3.0 W/(mK)
# Specific heat = 300.0 J/K
# density = 10431.0 kg/m^3
# Prescribed temperature on left side: 600 K
# When it has reached steady state, the temperature as a function of position is:
# T = -q/(2*k) (x^2 - 2*x*length) + 600
# or
# T = -6.3333e+7 * (x^2 - 0.02*x) + 600
# on left side: T=600, on right side, T=6933.3
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 0.01
nx = 20
[]
[Variables]
[./temp]
initial_condition = 300.0
[../]
[]
[Kernels]
[./heat]
type = ADHeatConduction
variable = temp
thermal_conductivity = thermal_conductivity
[../]
[./heatsource]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temp
scalar = 10
[../]
[]
[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = temp
value = 600
[../]
[]
[Materials]
[./density]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity volumetric_heat '
prop_values = '10431.0 3.0 3.8e7'
[../]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./right]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./error]
type = NodalL2Error
function = '-3.8e+8/(2*3) * (x^2 - 2*x*0.01) + 600'
variable = temp
[../]
[]
[Outputs]
execute_on = FINAL
exodus = true
[]
(test/tests/utils/spline_interpolation/bicubic_spline_interpolation_y_normal.i)
[Mesh]
type = GeneratedMesh
dim = 3
ny = 1 # needed to ensure Z is the problem dimension
nx = 4
nz = 4
xmax = 4
zmax = 4
[]
[Functions]
[./yx1]
type = ParsedFunction
expression = '3*z^2'
[../]
[./yx2]
type = ParsedFunction
expression = '6*x^2'
[../]
[./spline_fn]
type = BicubicSplineFunction
normal_component = y
x1 = '0 2 4'
x2 = '0 2 4 6'
y = '0 16 128 432 8 24 136 440 64 80 192 496'
yx11 = '0 0 0 0'
yx1n = '48 48 48 48'
yx21 = '0 0 0'
yx2n = '216 216 216'
yx1 = 'yx1'
yx2 = 'yx2'
[../]
[./u_func]
type = ParsedFunction
expression = 'z^3 + 2*x^3'
[../]
[./u2_forcing_func]
type = ParsedFunction
expression = '-6*z - 12*x'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./bi_func_value]
order = FIRST
family = LAGRANGE
[../]
[./x_deriv]
order = FIRST
family = LAGRANGE
[../]
[./z_deriv]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./bi_func_value]
type = FunctionAux
variable = bi_func_value
function = spline_fn
[../]
[./deriv_1]
type = FunctionDerivativeAux
function = spline_fn
variable = z_deriv
component = z
[../]
[./deriv_2]
type = FunctionDerivativeAux
function = spline_fn
variable = x_deriv
component = x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = u2_forcing_func
[../]
[]
[BCs]
[./sides]
type = FunctionDirichletBC
variable = u
boundary = 'left right front back'
function = u_func
[../]
[]
[Postprocessors]
[./nodal_l2_err_spline]
type = NodalL2Error
variable = u
function = spline_fn
execute_on = 'initial timestep_end'
[../]
[./nodal_l2_err_analytic]
type = NodalL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[../]
[./x_deriv_err_analytic]
type = NodalL2Error
variable = x_deriv
function = yx2
execute_on = 'initial timestep_end'
[../]
[./z_deriv_err_analytic]
type = NodalL2Error
variable = z_deriv
function = yx1
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/functions/piecewise_multilinear/oneDb.i)
# PiecewiseMultilinear function tests in 1D
# See [Functions] block for a description of the tests
# The functions are compared with ParsedFunctions using postprocessors
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 2
nx = 10
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./linear1_var]
[../]
[./linear2_var]
[../]
[]
[AuxKernels]
[./linear1_AuxK]
type = FunctionAux
variable = linear1_var
function = linear1_fcn
[../]
[./linear2_AuxK]
type = FunctionAux
variable = linear2_var
function = linear2_fcn
[../]
[]
[Functions]
# This is just f = x
[./linear1_fcn]
type = PiecewiseMultilinear
data_file = linear1.txt
[../]
[./linear1_answer]
type = ParsedFunction
expression = x
[../]
# This is a hat function
[./linear2_fcn]
type = PiecewiseMultilinear
data_file = linear2.txt
[../]
[./linear2_answer]
type = ParsedFunction
expression = min(x,1)+min(2-x,1)-1
[../]
[]
[Postprocessors]
[./linear1_pp]
type = NodalL2Error
function = linear1_answer
variable = linear1_var
[../]
[./linear2_pp]
type = NodalL2Error
function = linear2_answer
variable = linear2_var
[../]
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = oneDb
hide = dummy
csv = true
[]
(modules/heat_transfer/test/tests/verify_against_analytical/ad_1D_transient.i)
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./HeatDiff]
type = ADHeatConduction
variable = T
[../]
[./HeatTdot]
type = ADHeatConductionTimeDerivative
variable = T
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '0.95' #copper in cal/(cm sec C)
[../]
[./cp]
type = ADGenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '0.092' #copper in cal/(g C)
[../]
[./rho]
type = ADGenericConstantMaterial
prop_names = 'density'
prop_values = '8.92' #copper in g/(cm^3)
[../]
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
l_tol = 1e-6
dt = 2
end_time = 100
[]
[Outputs]
exodus = true
[]
(tutorials/tutorial03_verification/app/test/tests/step03_analytical/1d_analytical.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
xmax = 0.03
nx = 200
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_O]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[T_time]
type = HeatConductionTimeDerivative
variable = T
density_name = 7800
specific_heat = 450
[]
[T_cond]
type = HeatConduction
variable = T
diffusion_coefficient = 80.2
[]
[]
[BCs]
[left]
type = NeumannBC
variable = T
boundary = left
value = 7e5
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
dt = 0.01
end_time = 1
[]
[Outputs]
exodus = true
csv = true
[]
[Functions]
[T_exact]
type = ParsedFunction
symbol_names = 'k rho cp T0 qs'
symbol_values = '80.2 7800 450 300 7e5'
expression = 'T0 + '
'qs/k*(2*sqrt(k/(rho*cp)*t/pi)*exp(-x^2/(4*k/(rho*cp)*(t+1e-50))) - '
'x*(1-erf(x/(2*sqrt(k/(rho*cp)*(t+1e-50))))))'
[]
[]
[Postprocessors]
[error]
type = NodalL2Error
variable = T
function = T_exact
[]
[h]
type = AverageElementSize
[]
[]
[VectorPostprocessors]
[T_exact]
type = LineFunctionSampler
functions = T_exact
start_point = '0 0 0'
end_point = '0.03 0 0'
num_points = 200
sort_by = x
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_simulation]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '0.03 0 0'
num_points = 200
sort_by = x
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/richards/test/tests/user_objects/uo3.i)
# Seff User objects give the correct value
# Sat User objects give the correct value
#
# If you want to add another test for another UserObject
# then add the UserObject, add a Function defining the expected result,
# add an AuxVariable and AuxKernel that will record the UserObjects value
# and finally add a NodalL2Error that compares this with the Function
#
# Here pressure is x where x runs between -5E6 and 5E6
[UserObjects]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-6
[../]
[./Seff1BWsmall]
type = RichardsSeff1BWsmall
Sn = 0.0
Ss = 1.0
C = 1.01
las = 1E5
[../]
[./Seff1RSC]
type = RichardsSeff1RSC
oil_viscosity = 4.0
scale_ratio = 1E6
shift = -2E6
[../]
[./Seff1VGcut]
type = RichardsSeff1VGcut
m = 0.8
al = 1E-6
p_cut = -1E6
[../]
# following are unimportant in this test
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.10101
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.054321
sum_s_res = 0.054321
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E5
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = x
[../]
[./answer_Seff1VG]
type = ParsedFunction
expression = (1+max((-x)*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '1E-6 0.8'
[../]
[./answer_dSeff1VG]
type = GradParsedFunction
direction = '1 0 0'
expression = (1+max((-x)*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '1E-6 0.8'
[../]
[./answer_d2Seff1VG]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = (1+max((-x)*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '1E-6 0.8'
[../]
[./answer_Seff1BW]
type = PiecewiseLinear
format = columns
data_file = satBW.csv
axis = x
[../]
[./answer_Seff1BWprime]
type = PiecewiseLinear
format = columns
data_file = satBWprime.csv
axis = x
[../]
[./answer_Seff1BW2prime]
type = PiecewiseLinear
format = columns
data_file = satBW2prime.csv
axis = x
[../]
[./answer_Seff1RSC]
type = ParsedFunction
expression = (1+exp((-x-shift)/scale))^(-0.5)
symbol_names = 'shift scale'
symbol_values = '-2E6 1E6'
[../]
[./answer_dSeff1RSC]
type = GradParsedFunction
direction = '1 0 0'
expression = (1+exp((-x-shift)/scale))^(-0.5)
symbol_names = 'shift scale'
symbol_values = '-2E6 1E6'
[../]
[./answer_d2Seff1RSC]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = (1+exp((-x-shift)/scale))^(-0.5)
symbol_names = 'shift scale'
symbol_values = '-2E6 1E6'
[../]
[./answer_Seff1VGcut]
type = ParsedFunction
expression = if(x<pcut,scut+dscut*(x-pcut),(1+max((-x)*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m pcut scut dscut'
symbol_values = '1E-6 0.8 -1E6 0.574349177498517 1.14869835499703e-06'
[../]
[./answer_dSeff1VGcut]
type = GradParsedFunction
direction = '1 0 0'
expression = if(x<pcut,scut+dscut*(x-pcut),(1+max((-x)*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m pcut scut dscut'
symbol_values = '1E-6 0.8 -1E6 0.574349177498517 1.14869835499703e-06'
[../]
[./answer_d2Seff1VGcut]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = if(x<pcut,scut+dscut*(x-pcut),(1+max((-x)*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m pcut scut dscut'
symbol_values = '1E-6 0.8 -1E6 0.574349177498517 1.14869835499703e-06'
[../]
[./answer_Sat]
type = ParsedFunction
expression = sres+((1-sumsres)*((1+max((-x)*al,0)^(1/(1-m)))^(-m)))
symbol_names = 'al m sres sumsres'
symbol_values = '1E-6 0.8 0.054321 0.054321'
[../]
[./answer_dSat]
type = ParsedFunction
expression = 1-sumsres
symbol_names = 'sumsres'
symbol_values = '0.054321'
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[./dSeff1VG_Aux]
[../]
[./d2Seff1VG_Aux]
[../]
[./Seff1BWsmall_Aux]
[../]
[./dSeff1BWsmall_Aux]
[../]
[./d2Seff1BWsmall_Aux]
[../]
[./Seff1RSC_Aux]
[../]
[./dSeff1RSC_Aux]
[../]
[./d2Seff1RSC_Aux]
[../]
[./Seff1VGcut_Aux]
[../]
[./dSeff1VGcut_Aux]
[../]
[./d2Seff1VGcut_Aux]
[../]
[./Sat_Aux]
[../]
[./dSat_Aux]
[../]
[./check_Aux]
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[./dSeff1VG_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
wrtnum = 0
[../]
[./d2Seff1VG_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff1BWsmall_AuxK]
type = RichardsSeffAux
variable = Seff1BWsmall_Aux
seff_UO = Seff1BWsmall
pressure_vars = pressure
[../]
[./dSeff1BWsmall_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff1BWsmall_Aux
seff_UO = Seff1BWsmall
pressure_vars = pressure
wrtnum = 0
[../]
[./d2Seff1BWsmall_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff1BWsmall_Aux
seff_UO = Seff1BWsmall
pressure_vars = pressure
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff1RSC_AuxK]
type = RichardsSeffAux
variable = Seff1RSC_Aux
seff_UO = Seff1RSC
pressure_vars = pressure
[../]
[./dSeff1RSC_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff1RSC_Aux
seff_UO = Seff1RSC
pressure_vars = pressure
wrtnum = 0
[../]
[./d2Seff1RSC_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff1RSC_Aux
seff_UO = Seff1RSC
pressure_vars = pressure
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff1VGcut_AuxK]
type = RichardsSeffAux
variable = Seff1VGcut_Aux
seff_UO = Seff1VGcut
pressure_vars = pressure
[../]
[./dSeff1VGcut_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff1VGcut_Aux
seff_UO = Seff1VGcut
pressure_vars = pressure
wrtnum = 0
[../]
[./d2Seff1VGcut_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff1VGcut_Aux
seff_UO = Seff1VGcut
pressure_vars = pressure
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Sat_AuxK]
type = RichardsSatAux
sat_UO = Saturation
seff_var = Seff1VG_Aux
variable = Sat_Aux
[../]
[./dSat_AuxK]
type = RichardsSatPrimeAux
sat_UO = Saturation
seff_var = Seff1VG_Aux
variable = dSat_Aux
[../]
[./check_AuxK]
type = FunctionAux
variable = check_Aux
function = answer_Seff1VGcut
[../]
[]
[Postprocessors]
[./cf_Seff1VG]
type = NodalL2Error
function = answer_Seff1VG
variable = Seff1VG_Aux
[../]
[./cf_dSeff1VG]
type = NodalL2Error
function = answer_dSeff1VG
variable = dSeff1VG_Aux
[../]
[./cf_d2Seff1VG]
type = NodalL2Error
function = answer_d2Seff1VG
variable = d2Seff1VG_Aux
[../]
[./cf_Seff1BW]
type = NodalL2Error
function = answer_Seff1BW
variable = Seff1BWsmall_Aux
[../]
[./cf_Seff1BWprime]
type = NodalL2Error
function = answer_Seff1BWprime
variable = dSeff1BWsmall_Aux
[../]
[./cf_Seff1BW2prime]
type = NodalL2Error
function = answer_Seff1BW2prime
variable = d2Seff1BWsmall_Aux
[../]
[./cf_Seff1RSC]
type = NodalL2Error
function = answer_Seff1RSC
variable = Seff1RSC_Aux
[../]
[./cf_dSeff1RSC]
type = NodalL2Error
function = answer_dSeff1RSC
variable = dSeff1RSC_Aux
[../]
[./cf_d2Seff1RSC]
type = NodalL2Error
function = answer_d2Seff1RSC
variable = d2Seff1RSC_Aux
[../]
[./cf_Seff1VGcut]
type = NodalL2Error
function = answer_Seff1VGcut
variable = Seff1VGcut_Aux
[../]
[./cf_dSeff1VGcut]
type = NodalL2Error
function = answer_dSeff1VGcut
variable = dSeff1VGcut_Aux
[../]
[./cf_d2Seff1VGcut]
type = NodalL2Error
function = answer_d2Seff1VGcut
variable = d2Seff1VGcut_Aux
[../]
[./cf_Sat]
type = NodalL2Error
function = answer_Sat
variable = Sat_Aux
[../]
[./cf_dSat]
type = NodalL2Error
function = answer_dSat
variable = dSat_Aux
[../]
[]
#############################################################################
#
# Following is largely unimportant as we are not running an actual similation
#
#############################################################################
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -5E6
xmax = 5E6
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
richardsVarNames_UO = PPNames
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
richardsVarNames_UO = PPNames
variable = pressure
[../]
[]
[Materials]
[./unimportant_material]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-20 0 0 0 1E-20 0 0 0 1E-20'
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
viscosity = 1E-3
gravity = '0 0 -10'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./does_nothing]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E50 1E50 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 1
dt = 1E-100
[]
[Outputs]
execute_on = 'timestep_end'
active = 'csv'
file_base = uo3
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
hide = pressure
[../]
[]
(modules/peridynamics/test/tests/heat_conduction/2D_steady_state_BPD.i)
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[../]
[./gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[../]
[]
[Variables]
[./temp]
[../]
[]
[AuxVariables]
[./bond_status]
order = CONSTANT
family = MONOMIAL
initial_condition = 1
[../]
[]
[Functions]
[./analytical_sol]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConductionBPD
variable = temp
[../]
[./heat_source]
type = HeatSourceBPD
variable = temp
power_density = -4
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = temp
boundary = 1003
function = analytical_sol
[../]
[./bottom]
type = FunctionDirichletBC
variable = temp
boundary = 1000
function = analytical_sol
[../]
[./right]
type = FunctionDirichletBC
variable = temp
boundary = 1001
function = analytical_sol
[../]
[./top]
type = FunctionDirichletBC
variable = temp
boundary = 1002
function = analytical_sol
[../]
[]
[Materials]
[./thermal_mat]
type = ThermalConstantHorizonMaterialBPD
temperature = temp
thermal_conductivity = 1
[../]
[]
[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = 'analytical_sol'
variable = temp
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
start_time = 0.0
end_time = 1.0
[]
[Outputs]
exodus = true
file_base = 2D_steady_state_BPD
[]
(test/tests/bcs/nodal_normals/circle_tris.i)
[Mesh]
file = circle-tris.e
[]
[Functions]
[all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[]
[f_fn]
type = ParsedFunction
expression = -4
[]
[analytical_normal_x]
type = ParsedFunction
expression = x
[]
[analytical_normal_y]
type = ParsedFunction
expression = y
[]
[]
[NodalNormals]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = f_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[]
[]
[Postprocessors]
[nx_pps]
type = NodalL2Error
variable = nodal_normal_x
boundary = '1'
function = analytical_normal_x
[]
[ny_pps]
type = NodalL2Error
variable = nodal_normal_y
boundary = '1'
function = analytical_normal_y
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/nodalkernels/high_order_time_integration/high_order_time_integration.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[AuxVariables]
[./exact_solution]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[NodalKernels]
[./td]
type = TimeDerivativeNodalKernel
variable = v
[../]
[./f]
type = UserForcingFunctionNodalKernel
variable = v
function = t*t*t+4
[../]
[]
[AuxKernels]
[./exact]
type = FunctionAux
variable = exact_solution
function = exact_solution_function
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Functions]
[./exact_solution_function]
type = ParsedFunction
expression = (1.0/4.0)*(16*t+t*t*t*t)
[../]
[]
[Postprocessors]
[./error]
type = NodalL2Error
variable = v
function = exact_solution_function
[../]
[]
[Executioner]
type = Transient
end_time = 10
dt = 1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
scheme = 'crank-nicolson'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/verify_against_analytical/1D_transient.i)
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./HeatDiff]
type = HeatConduction
variable = T
[../]
[./HeatTdot]
type = HeatConductionTimeDerivative
variable = T
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '0.95' #copper in cal/(cm sec C)
[../]
[./cp]
type = GenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '0.092' #copper in cal/(g C)
[../]
[./rho]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '8.92' #copper in g/(cm^3)
[../]
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
l_tol = 1e-6
dt = 2
end_time = 100
[]
[Outputs]
exodus = true
[]
(test/tests/functions/piecewise_multilinear/time.i)
# PiecewiseMultilinear function tests for time-dependent data
# See [Functions] block for a description of the tests
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0
xmax = 1
nx = 1
ymin = 0
ymax = 1
ny = 1
zmin = 0
zmax = 1
nz = 1
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./time1_var]
[../]
[]
[AuxKernels]
[./time1_AuxK]
type = FunctionAux
variable = time1_var
function = time1_fcn
[../]
[]
[Functions]
# This increases linearly: f = t
[./time1_fcn]
type = PiecewiseMultilinear
data_file = time1.txt
[../]
[./time1_answer]
type = ParsedFunction
expression = t
[../]
[]
[Postprocessors]
[./time1_pp]
type = NodalL2Error
function = time1_answer
variable = time1_var
[../]
[]
[Executioner]
type = Transient
dt = 0.1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = time
hide = dummy
csv = true
[]
(test/tests/functions/linear_combination_function/except1.i)
# LinearCombinationFunction function test
# See [Functions] block for a description of the tests
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 2
nx = 10
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./the_linear_combo]
[../]
[]
[AuxKernels]
[./the_linear_combo]
type = FunctionAux
variable = the_linear_combo
function = the_linear_combo
[../]
[]
[Functions]
[./twoxplus1]
type = ParsedFunction
expression = 2*x+1
[../]
[./xsquared]
type = ParsedFunction
expression = x*x
[../]
[./the_linear_combo]
type = LinearCombinationFunction
functions = 'x twoxplus1 xsquared'
w = '0.5 5 0.4 0.3'
[../]
[./should_be_answer]
type = ParsedFunction
expression = 0.5*x+5*(2*x+1)*0.4*x*x+0.3*7
[../]
[]
[Postprocessors]
[./should_be_zero]
type = NodalL2Error
function = should_be_answer
variable = the_linear_combo
[../]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
hide = dummy
exodus = false
csv = true
[]
(modules/misc/test/tests/kernels/thermo_diffusion/thermo_diffusion.i)
# Steady-state test for the ThermoDiffusion kernel.
#
# This test applies a constant temperature gradient to drive thermo-diffusion
# in the variable u. At steady state, the thermo-diffusion is balanced by
# diffusion due to Fick's Law, so the total flux is
#
# J = -D ( grad(u) - ( Qstar u / R ) grad(1/T) )
#
# If there are no fluxes at the boundaries, then there is no background flux and
# these two terms must balance each other everywhere:
#
# grad(u) = ( Qstar u / R ) grad(1/T)
#
# The dx can be eliminated to give
#
# d(ln u) / d(1/T) = Qstar / R
#
# This can be solved to give the profile for u as a function of temperature:
#
# u = A exp( Qstar / R T )
#
# Here, we are using simple heat conduction with Dirichlet boundaries on 0 <= x <= 1
# to give a linear profile for temperature: T = x + 1. We also need to apply one
# boundary condition on u, which is u(x=0) = 1. These conditions give:
#
# u = exp( -(Qstar/R) (x/(x+1)) )
#
# This analytical result is tracked by the aux variable "correct_u".
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
[]
[Variables]
[./u]
initial_condition = 1
[../]
[./temp]
initial_condition = 1
[../]
[]
[Kernels]
[./soret]
type = ThermoDiffusion
variable = u
temp = temp
gas_constant = 1
[../]
[./diffC]
type = Diffusion
variable = u
[../]
# Heat diffusion gives a linear temperature profile to drive the Soret diffusion.
[./diffT]
type = Diffusion
variable = temp
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
preset = false
boundary = left
value = 1
[../]
[./leftt]
type = DirichletBC
variable = temp
preset = false
boundary = left
value = 1
[../]
[./rightt]
type = DirichletBC
variable = temp
preset = false
boundary = right
value = 2
[../]
[]
[Materials]
[./fake_material]
type = GenericConstantMaterial
block = 0
prop_names = 'mass_diffusivity heat_of_transport'
prop_values = '1 1'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = NodalL2Error
variable = u
function = 'exp(-x/(x+1))'
[../]
[]
[Outputs]
execute_on = FINAL
exodus = true
[]
(test/tests/utils/spline_interpolation/bicubic_spline_interpolation.i)
[Mesh]
type = GeneratedMesh
dim = 3
nz = 1
nx = 4
ny = 4
xmax = 4
ymax = 4
[]
[Functions]
[./yx1]
type = ParsedFunction
expression = '3*x^2'
[../]
[./yx2]
type = ParsedFunction
expression = '6*y^2'
[../]
[./spline_fn]
type = BicubicSplineFunction
x1 = '0 2 4'
x2 = '0 2 4 6'
y = '0 16 128 432 8 24 136 440 64 80 192 496'
yx11 = '0 0 0 0'
yx1n = '48 48 48 48'
yx21 = '0 0 0'
yx2n = '216 216 216'
yx1 = 'yx1'
yx2 = 'yx2'
[../]
[./u_func]
type = ParsedFunction
expression = 'x^3 + 2*y^3'
[../]
[./u2_forcing_func]
type = ParsedFunction
expression = '-6*x - 12*y'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./bi_func_value]
order = FIRST
family = LAGRANGE
[../]
[./x_deriv]
order = FIRST
family = LAGRANGE
[../]
[./y_deriv]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./bi_func_value]
type = FunctionAux
variable = bi_func_value
function = spline_fn
[../]
[./deriv_1]
type = FunctionDerivativeAux
function = spline_fn
variable = x_deriv
component = x
[../]
[./deriv_2]
type = FunctionDerivativeAux
function = spline_fn
variable = y_deriv
component = y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = u2_forcing_func
[../]
[]
[BCs]
[./sides]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = u_func
[../]
[]
[Postprocessors]
[./nodal_l2_err_spline]
type = NodalL2Error
variable = u
function = spline_fn
execute_on = 'initial timestep_end'
[../]
[./nodal_l2_err_analytic]
type = NodalL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[../]
[./x_deriv_err_analytic]
type = NodalL2Error
variable = x_deriv
function = yx1
execute_on = 'initial timestep_end'
[../]
[./y_deriv_err_analytic]
type = NodalL2Error
variable = y_deriv
function = yx2
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ad_mat_diffusion/ad_1D_transient.i)
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[../]
[./dt]
type = CoefTimeDerivative
variable = T
Coefficient = 0.82064
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '0.95'
[../]
[]
[Executioner]
type = Transient
dt = 1e-2
end_time = 1
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
outputs = console
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/actions/meta_action_multiple_tasks/circle_quads.i)
[Mesh]
file = circle-quads.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./analytical_normal_x]
type = ParsedFunction
expression = x
[../]
[./analytical_normal_y]
type = ParsedFunction
expression = y
[../]
[]
# An Action that adds an Action that satisfies multiple tasks!
[MetaNodalNormals]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Postprocessors]
[./nx_pps]
type = NodalL2Error
variable = nodal_normal_x
boundary = '1'
function = analytical_normal_x
[../]
[./ny_pps]
type = NodalL2Error
variable = nodal_normal_y
boundary = '1'
function = analytical_normal_y
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(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
[]