- functionThe function to use as the value
C++ Type:FunctionName
Controllable:No
Description:The function to use as the value
- variableThe name of the variable that this object applies to
C++ Type:AuxVariableName
Controllable:No
Description:The name of the variable that this object applies to
Function Series to Aux
AuxKernel to convert a functional expansion (Functions object, type = FunctionSeries) to an AuxVariable
Description
This AuxKernel
expands an FX into the named AuxVariable
before the initial nonlinear solve. It subclasses FunctionAux
to perform the actual work. The only differences in FunctionSeriesToAux
are: 1) it ensures that the provided Function
is a subclass of FunctionSeries
2) it ensures that it is executed at EXEC_TIMESTEP_BEGIN
Example Input File Syntax
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
(modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.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
- check_boundary_restrictedTrueWhether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
Default:True
C++ Type:bool
Controllable:No
Description:Whether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- 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.
- 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/functional_expansion_tools/test/tests/errors/multiapp_bad_user_object.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_incompatible_orders.i)
- (modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/sub.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_direct/sub.i)
- (modules/functional_expansion_tools/test/tests/errors/aux_bad_function.i)
- (modules/functional_expansion_tools/test/tests/standard_use/volume_coupled.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_missing_sub_object.i)
- (modules/functional_expansion_tools/test/tests/standard_use/multiapp_different_physical_boundaries.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/sub.i)
- (modules/functional_expansion_tools/test/tests/standard_use/multiapp_print_coefficients.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_sub.i)
- (modules/functional_expansion_tools/examples/2D_volumetric_Cartesian/main.i)
- (modules/functional_expansion_tools/test/tests/standard_use/volume_sub.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical_subapp_mesh_refine/sub.i)
- (modules/functional_expansion_tools/test/tests/standard_use/volume_coupling_custom_norm_sub.i)
- (modules/functional_expansion_tools/examples/2D_volumetric_Cartesian/sub.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/main.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_missing_local_object.i)
- (modules/functional_expansion_tools/test/tests/standard_use/volume_coupling_custom_norm.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_different_submesh/sub.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_different_submesh/main.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/sub.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/main.i)
- (modules/functional_expansion_tools/test/tests/standard_use/multiapp_sub.i)
- (modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_bad_function_series.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical_subapp_mesh_refine/main.i)
(modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 1D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_bad_user_object.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[./AnotheruserObject]
type = EmptyPostprocessor
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = AnotheruserObject
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_incompatible_orders.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '36'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/sub.i)
# Basic example coupling a master and sub app in a 1D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
# Non-copy transfers only work with AuxVariable, but nothing will be solved without a variable
# defined. The solution is to define an empty variable tha does nothing, but causes MOOSE to solve
# the AuxKernels that we need.
[Variables]
[./empty]
[../]
[]
[AuxVariables]
[./s]
order = FIRST
family = LAGRANGE
[../]
[./m_in]
order = FIRST
family = LAGRANGE
[../]
[]
# We must have a kernel for every variable, hence this null kernel to match the variable 'empty'
[Kernels]
[./null_kernel]
type = NullKernel
variable = empty
[../]
[]
[AuxKernels]
[./reconstruct_m_in]
type = FunctionSeriesToAux
function = FX_Basis_Value_Sub
variable = m_in
[../]
[./calculate_s] # Something to make 's' change each time, but allow a converging solution
type = ParsedAux
variable = s
coupled_variables = m_in
expression = '2*exp(-m_in/0.8)'
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXVolumeUserObject
function = FX_Basis_Value_Sub
variable = s
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_direct/sub.i)
# Derived from the example '3D_volumetric_Cartesian' with the following differences:
#
# 1) The coupling is performed via BodyForce instead of the
# FunctionSeriesToAux+CoupledForce approach
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
# Non-copy transfers only work with AuxVariable, but nothing will be solved without a variable
# defined. The solution is to define an empty variable tha does nothing, but causes MOOSE to solve
# the AuxKernels that we need.
[Variables]
[./empty]
[../]
[]
[AuxVariables]
[./s]
order = FIRST
family = LAGRANGE
[../]
[./m_in]
order = FIRST
family = LAGRANGE
[../]
[]
# We must have a kernel for every variable, hence this null kernel to match the variable 'empty'
[Kernels]
[./null_kernel]
type = NullKernel
variable = empty
[../]
[]
[AuxKernels]
[./reconstruct_m_in]
type = FunctionSeriesToAux
function = FX_Basis_Value_Sub
variable = m_in
[../]
[./calculate_s] # Something to make 's' change each time, but allow a converging solution
type = ParsedAux
variable = s
coupled_variables = m_in
expression = '2*exp(-m_in/0.8)'
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXVolumeUserObject
function = FX_Basis_Value_Sub
variable = s
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/functional_expansion_tools/test/tests/errors/aux_bad_function.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[AuxVariables]
[./v]
[../]
[]
[AuxKernels]
[./this_could_be_bad]
type = FunctionSeriesToAux
function = const
variable = v
[../]
[]
[Functions]
[./const]
type = ConstantFunction
value = -1
[../]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(modules/functional_expansion_tools/test/tests/standard_use/volume_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = volume_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_missing_sub_object.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/test/tests/standard_use/multiapp_different_physical_boundaries.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '1.0 9.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/sub.i)
# Basic example coupling a master and sub app in a 3D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
#
# Note: this problem is not light, and may take a few minutes to solve.
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
# Non-copy transfers only work with AuxVariable, but nothing will be solved without a variable
# defined. The solution is to define an empty variable tha does nothing, but causes MOOSE to solve
# the AuxKernels that we need.
[Variables]
[./empty]
[../]
[]
[AuxVariables]
[./s]
order = FIRST
family = LAGRANGE
[../]
[./m_in]
order = FIRST
family = LAGRANGE
[../]
[]
# We must have a kernel for every variable, hence this null kernel to match the variable 'empty'
[Kernels]
[./null_kernel]
type = NullKernel
variable = empty
[../]
[]
[AuxKernels]
[./reconstruct_m_in]
type = FunctionSeriesToAux
function = FX_Basis_Value_Sub
variable = m_in
[../]
[./calculate_s] # Something to make 's' change each time, but allow a converging solution
type = ParsedAux
variable = s
coupled_variables = m_in
expression = '2*exp(-m_in/0.8)'
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXVolumeUserObject
function = FX_Basis_Value_Sub
variable = s
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/functional_expansion_tools/test/tests/standard_use/multiapp_print_coefficients.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
print_when_set = true # Print coefficients when a MultiAppFXTransfer is executed
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
print_state = true # Print after the FX coefficients are computer
print_when_set = true # Print coefficients when a MultiAppFXTransfer is executed
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./empty]
[../]
[]
[AuxVariables]
[./s]
order = FIRST
family = LAGRANGE
[../]
[./m_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./null_kernel]
type = NullKernel
variable = empty
[../]
[]
[AuxKernels]
[./reconstruct_m_in]
type = FunctionSeriesToAux
function = FX_Basis_Value_Sub
variable = m_in
[../]
[./calculate_s]
type = ParsedAux
variable = s
coupled_variables = m_in
expression = '2*exp(-m_in/0.8)'
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXVolumeUserObject
function = FX_Basis_Value_Sub
variable = s
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/functional_expansion_tools/examples/2D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 2D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4'
physical_bounds = '0.0 10.0 1.0 11.0'
x = Legendre
y = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/test/tests/standard_use/volume_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./empty]
[../]
[]
[AuxVariables]
[./s]
order = FIRST
family = LAGRANGE
[../]
[./m_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./null_kernel]
type = NullKernel
variable = empty
[../]
[]
[AuxKernels]
[./reconstruct_m_in]
type = FunctionSeriesToAux
function = FX_Basis_Value_Sub
variable = m_in
[../]
[./calculate_s]
type = ParsedAux
variable = s
coupled_variables = m_in
expression = '2*exp(-m_in/0.8)'
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXVolumeUserObject
function = FX_Basis_Value_Sub
variable = s
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/functional_expansion_tools/examples/3D_volumetric_cylindrical_subapp_mesh_refine/sub.i)
# Derived from the example '3D_volumetric_cylindrical' with the following differences:
#
# 1) The model mesh is refined in the MasterApp by 1
# 2) Mesh adaptivity is enabled for the SubApp
# 3) Output from the SubApp is enabled so that the mesh changes can be visualized
[Mesh]
type = FileMesh
file = cyl-tet.e
[]
[Adaptivity]
marker = errorfrac
steps = 2
[./Indicators]
[./error]
type = GradientJumpIndicator
variable = s
outputs = none
[../]
[../]
[./Markers]
[./errorfrac]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.1
indicator = error
outputs = none
[../]
[../]
[]
# Non-copy transfers only work with AuxVariable, but nothing will be solved without a variable
# defined. The solution is to define an empty variable tha does nothing, but causes MOOSE to solve
# the AuxKernels that we need.
[Variables]
[./empty]
[../]
[]
[AuxVariables]
[./s]
order = FIRST
family = LAGRANGE
[../]
[./m_in]
order = FIRST
family = LAGRANGE
[../]
[]
# We must have a kernel for every variable, hence this null kernel to match the variable 'empty'
[Kernels]
[./null_kernel]
type = NullKernel
variable = empty
[../]
[]
[AuxKernels]
[./reconstruct_m_in]
type = FunctionSeriesToAux
function = FX_Basis_Value_Sub
variable = m_in
[../]
[./calculate_s] # Something to make 's' change each time, but allow a converging solution
type = ParsedAux
variable = s
coupled_variables = m_in
expression = '2*exp(-m_in/0.8)'
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = CylindricalDuo
orders = '5 3' # Axial first, then (r, t) FX
physical_bounds = '-2.5 2.5 0 0 1' # z_min z_max x_center y_center radius
z = Legendre # Axial in z
disc = Zernike # (r, t) default to unit disc in x-y plane
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXVolumeUserObject
function = FX_Basis_Value_Sub
variable = s
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
file_base = sub
[]
(modules/functional_expansion_tools/test/tests/standard_use/volume_coupling_custom_norm_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./empty]
[../]
[]
[AuxVariables]
[./s]
order = FIRST
family = LAGRANGE
[../]
[./m_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./null_kernel]
type = NullKernel
variable = empty
[../]
[]
[AuxKernels]
[./reconstruct_m_in]
type = FunctionSeriesToAux
function = FX_Basis_Value_Sub
variable = m_in
[../]
[./calculate_s]
type = ParsedAux
variable = s
coupled_variables = m_in
expression = '2*exp(-m_in/0.8)'
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
generation_type = 'sqrt_mu'
expansion_type = 'sqrt_mu'
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXVolumeUserObject
function = FX_Basis_Value_Sub
variable = s
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/functional_expansion_tools/examples/2D_volumetric_Cartesian/sub.i)
# Basic example coupling a master and sub app in a 2D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
[]
# Non-copy transfers only work with AuxVariable, but nothing will be solved without a variable
# defined. The solution is to define an empty variable tha does nothing, but causes MOOSE to solve
# the AuxKernels that we need.
[Variables]
[./empty]
[../]
[]
[AuxVariables]
[./s]
order = FIRST
family = LAGRANGE
[../]
[./m_in]
order = FIRST
family = LAGRANGE
[../]
[]
# We must have a kernel for every variable, hence this null kernel to match the variable 'empty'
[Kernels]
[./null_kernel]
type = NullKernel
variable = empty
[../]
[]
[AuxKernels]
[./reconstruct_m_in]
type = FunctionSeriesToAux
function = FX_Basis_Value_Sub
variable = m_in
[../]
[./calculate_s] # Something to make 's' change each time, but allow a converging solution
type = ParsedAux
variable = s
coupled_variables = m_in
expression = '2*exp(-m_in/0.8)'
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '3 4'
physical_bounds = '0.0 10.0 1.0 11.0'
x = Legendre
y = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXVolumeUserObject
function = FX_Basis_Value_Sub
variable = s
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 3D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
#
# Note: this problem is not light, and may take a few minutes to solve.
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right front back'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_missing_local_object.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/test/tests/standard_use/volume_coupling_custom_norm.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
generation_type = 'sqrt_mu'
expansion_type = 'sqrt_mu'
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
file_base = 'volume_coupled_out'
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = volume_coupling_custom_norm_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_different_submesh/sub.i)
# Derived from the example '3D_volumetric_Cartesian' with the following differences:
#
# 1) The number of x and y divisions in the sub app is not the same as the master app
# 2) The subapp mesh is skewed in x and z
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 23
bias_x = 1.2
ymin = 1.0
ymax = 11.0
ny = 33
zmin = 2.0
zmax = 12.0
nz = 35
bias_z = 0.8
[]
# Non-copy transfers only work with AuxVariable, but nothing will be solved without a variable
# defined. The solution is to define an empty variable tha does nothing, but causes MOOSE to solve
# the AuxKernels that we need.
[Variables]
[./empty]
[../]
[]
[AuxVariables]
[./s]
order = FIRST
family = LAGRANGE
[../]
[./m_in]
order = FIRST
family = LAGRANGE
[../]
[]
# We must have a kernel for every variable, hence this null kernel to match the variable 'empty'
[Kernels]
[./null_kernel]
type = NullKernel
variable = empty
[../]
[]
[AuxKernels]
[./reconstruct_m_in]
type = FunctionSeriesToAux
function = FX_Basis_Value_Sub
variable = m_in
[../]
[./calculate_s] # Something to make 's' change each time, but allow a converging solution
type = ParsedAux
variable = s
coupled_variables = m_in
expression = '2*exp(-m_in/0.8)'
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXVolumeUserObject
function = FX_Basis_Value_Sub
variable = s
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_different_submesh/main.i)
# Derived from the example '3D_volumetric_Cartesian' with the following differences:
#
# 1) The number of x and y divisions in the sub app is not the same as the master app
# 2) The subapp mesh is skewed in x and z
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right front back'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/sub.i)
# Basic example coupling a master and sub app in a 3D cylindrical mesh from an input file
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable, the recommended approach.
#
# Note: this problem is not light, and may take a few minutes to solve.
[Mesh]
type = FileMesh
file = cyl-tet.e
[]
# Non-copy transfers only work with AuxVariable, but nothing will be solved without a variable
# defined. The solution is to define an empty variable tha does nothing, but causes MOOSE to solve
# the AuxKernels that we need.
[Variables]
[./empty]
[../]
[]
[AuxVariables]
[./s]
order = FIRST
family = LAGRANGE
[../]
[./m_in]
order = FIRST
family = LAGRANGE
[../]
[]
# We must have a kernel for every variable, hence this null kernel to match the variable 'empty'
[Kernels]
[./null_kernel]
type = NullKernel
variable = empty
[../]
[]
[AuxKernels]
[./reconstruct_m_in]
type = FunctionSeriesToAux
function = FX_Basis_Value_Sub
variable = m_in
[../]
[./calculate_s] # Something to make 's' change each time, but allow a converging solution
type = ParsedAux
variable = s
coupled_variables = m_in
expression = '2*exp(-m_in/0.8)'
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = CylindricalDuo
orders = '5 3' # Axial first, then (r, t) FX
physical_bounds = '-2.5 2.5 0 0 1' # z_min z_max x_center y_center radius
z = Legendre # Axial in z
disc = Zernike # (r, t) default to unit disc in x-y plane
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXVolumeUserObject
function = FX_Basis_Value_Sub
variable = s
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/main.i)
# Basic example coupling a master and sub app in a 3D cylindrical mesh from an input file
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable, the recommended approach.
#
# Note: this problem is not light, and may take a few minutes to solve.
[Mesh]
type = FileMesh
file = cyl-tet.e
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom outside'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = CylindricalDuo
orders = '5 3' # Axial first, then (r, t) FX
physical_bounds = '-2.5 2.5 0 0 1' # z_min z_max x_center y_center radius
z = Legendre # Axial in z
disc = Zernike # (r, t) default to unit disc in x-y plane
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/test/tests/standard_use/multiapp_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./empty]
[../]
[]
[AuxVariables]
[./s]
order = FIRST
family = LAGRANGE
[../]
[./m_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./null_kernel]
type = NullKernel
variable = empty
[../]
[]
[AuxKernels]
[./reconstruct_m_in]
type = FunctionSeriesToAux
function = FX_Basis_Value_Sub
variable = m_in
[../]
[./calculate_s]
type = ParsedAux
variable = s
coupled_variables = m_in
expression = '2*exp(-m_in/0.8)'
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXVolumeUserObject
function = FX_Basis_Value_Sub
variable = s
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 1D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_bad_function_series.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[./AnotherFunction]
type = ConstantFunction
value = -1
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = AnotherFunction
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/examples/3D_volumetric_cylindrical_subapp_mesh_refine/main.i)
# Derived from the example '3D_volumetric_cylindrical' with the following differences:
#
# 1) The model mesh is refined in the MasterApp by 1
# 2) Mesh adaptivity is enabled for the SubApp
# 3) Output from the SubApp is enabled so that the mesh changes can be visualized
[Mesh]
type = FileMesh
file = cyl-tet.e
uniform_refine = 1
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom outside'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = CylindricalDuo
orders = '5 3' # Axial first, then (r, t) FX
physical_bounds = '-2.5 2.5 0 0 1' # z_min z_max x_center y_center radius
z = Legendre # Axial in z
disc = Zernike # (r, t) default to unit disc in x-y plane
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
output_sub_cycles = true
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]