- functionThe initial condition function.
C++ Type:FunctionName
Controllable:No
Description:The initial condition function.
- variableThe variable this initial condition is supposed to provide values for.
C++ Type:VariableName
Controllable:No
Description:The variable this initial condition is supposed to provide values for.
FunctionIC
An initial condition that uses a normal function of x, y, z to produce values (and optionally gradients) for a field variable.
Sets an initial condition via a Function described by parameter "function". It can be restricted to particular blocks and boundaries using the "block" and "boundary" parameters, respectively.
To set a function initial condition that preserves an integral of that function, such as for setting a volumetric quantity (units/m) while satisfying a total volume-integral, see the IntegralPreservingFunctionIC.
Example input syntax
In this example, we set the initial value of variable u
using a ParsedFunction. This particular example shows that information about the gradient of the parsed function is kept in initial condition, using further mesh refinement.
[ICs]
[./u_ic]
type = FunctionIC
variable = 'u'
function = parsed_function
[../]
[]
[Functions]
[./parsed_function]
type = ParsedFunction
expression = 'sin(x)-cos(y/2)'
[../]
[./parsed_grad_function]
type = ParsedGradFunction
expression = 'sin(x)-cos(y/2)'
grad_x = 'cos(x)'
grad_y = 'sin(y/2)/2'
[../]
[./parsed_zerograd_function]
type = ParsedGradFunction
value = 'sin(x)-cos(y/2)'
grad_x = '0'
grad_y = '0'
[../]
[]
(../moose/test/tests/ics/function_ic/parsed_function.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
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- scaling_factor1Scaling factor to apply on the function
Default:1
C++ Type:double
Controllable:No
Description:Scaling factor to apply on the function
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- ignore_uo_dependencyFalseWhen set to true, a UserObject retrieved by this IC will not be executed before the this IC
Default:False
C++ Type:bool
Controllable:No
Description:When set to true, a UserObject retrieved by this IC will not be executed before the this IC