- input_filesThe input file for each App. If this parameter only contains one input file it will be used for all of the Apps. When using 'positions_from_file' it is also admissable to provide one input_file per file.
C++ Type:std::vector<FileName>
Controllable:No
Description:The input file for each App. If this parameter only contains one input file it will be used for all of the Apps. When using 'positions_from_file' it is also admissable to provide one input_file per file.
TransientMultiApp
MultiApp for performing coupled simulations with the parent and sub-application both progressing in time.
Overview
The TransientMultiApp is designed to perform simulations with sub-applications that progress in time with the main application. A TransientMultiApp
requires that your "sub-apps" use an Executioner
derived from Transient.
Time step size
By default, the time step size used by the main app and the sub-apps is the same and is determined by taking the minimum over the time steps computed in the main app and all sub apps.
Sub-cycling, where sub apps may perform multiple (smaller) time steps for each main app time step, may be enabled using the "sub_cycling" parameter. When performing sub-cycling, transferred auxiliary variables on sub-apps are allowed to be interpolated between the start time and the end time of the main app with "interpolate_transfers" parameter.
Start and end time
The "start_time" of the sub app may differ from that of the main app. If the start time of the sub app is smaller than that of the main app, then if there is sub-cycling, then in the first step, the sub app will take steps until its time becomes synchronized with the main app time (taking a total time step larger than the main app's first step). If there is no sub-cycling, then the sub app will be out of sync with the main app. If the start time of the sub app is larger than the main app's start time, then sub apps will not take steps until their start time is reached, regardless of sub-cycling.
The "end_time" of the sub app may also differ from the main app. If the sub app's end time is smaller than the parent's end time, then the main app will continue to solve past the sub app's end time, but the sub app will not solve anymore. If the sub app's end time is larger than the parent's end time, then the sub app will not reach its end time, since the solve will not go past the parent app's end time.
Time state of TransientMultiApps
TransientMultiApps
are "auto-advanced" by default whenever we are not doing Picard iterations between the main and sub-application. This means that the Transient::endStep
and Transient::postStep
methods of the sub-applications executioner are called, regardless of whether the sub-application solve fails or not. The endStep
method increments the time and also performs EXEC_TIMESTEP_END
output. When sub-applications are auto-advanced, their endStep
call happens before the main application's endStep
call. This has the important benefit that when main application output occurs, the sub-application's and main application's time states are the same, which enables MOOSE restart/recovery capability.
Handling sub-application solve failures
As noted above, the default behavior when running TransientMultiApps
is that their time state is incremented, e.g. they are "auto-advanced", regardless of whether their solve is actually successful. This is undesirable behavior, but we believe that the syncing of main and sub-application states, under normal operation, to enable correct checkpoint output is a good trade. Given the constraints of the elected design, there are still multiple ways to turn a failed sub-application solve from a warning into an exception that will force corrective behavior in either the sub- or main-application:
The user can set
auto_advance = false
in theExecutioner
block of the main application . This will cause the main application to immediately cut its time-step when the sub-application fails. However, setting this parameter tofalse
also eliminates the possibility of doing restart/recover because the main and sub will be out of sync if/when checkpoint output occurs.The user can set
catch_up = true
in theTransientMultiApp
block. This will cause the sub-application to try and catch up to the main application after a sub-app failed solve. If catch-up is unsuccessful, then MOOSE registers this as a true failure of the solve, and the main dt will then get cut. This option has the advantage of keeping the main and sub transient states in sync, enabling accurate restart/recover data.
In general, if the user wants sub-application failed solves to be treated as exceptions, we recommend option 2 over option 1.
Example Input File Syntax
The following input file shows the creation of a TransientMultiApp object with the time step size being governed by the main application.
[MultiApps]
[sub_app]
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'dt_from_parent_sub.i'
positions = '0 0 0
0.5 0.5 0
0.6 0.6 0
0.7 0.7 0'
[]
[]
(test/tests/multiapps/transient_multiapp/dt_from_parent.i)Input Parameters
- app_typeThe type of application to build (applications not registered can be loaded with dynamic libraries. Parent application type will be used if not provided.
C++ Type:MooseEnum
Options:ChemicalReactionsApp, ChemicalReactionsTestApp, CombinedApp, CombinedTestApp, ContactApp, ContactTestApp, ElectromagneticsApp, ElectromagneticsTestApp, ExternalPetscSolverApp, ExternalPetscSolverTestApp, FluidPropertiesApp, FluidPropertiesTestApp, FsiApp, FsiTestApp, FunctionalExpansionToolsApp, FunctionalExpansionToolsTestApp, GeochemistryApp, GeochemistryTestApp, HeatTransferApp, HeatTransferTestApp, LevelSetApp, LevelSetTestApp, MiscApp, MiscTestApp, NavierStokesApp, NavierStokesTestApp, OptimizationApp, OptimizationTestApp, PeridynamicsApp, PeridynamicsTestApp, PhaseFieldApp, PhaseFieldTestApp, PorousFlowApp, PorousFlowTestApp, RayTracingApp, RayTracingTestApp, RdgApp, RdgTestApp, ReactorApp, ReactorTestApp, RichardsApp, RichardsTestApp, ScalarTransportApp, ScalarTransportTestApp, SolidMechanicsApp, SolidMechanicsTestApp, SolidPropertiesApp, SolidPropertiesTestApp, StochasticToolsApp, StochasticToolsTestApp, ThermalHydraulicsApp, ThermalHydraulicsTestApp, XFEMApp, XFEMTestApp
Controllable:No
Description:The type of application to build (applications not registered can be loaded with dynamic libraries. Parent application type will be used if not provided.
- bounding_box_inflation0.01Relative amount to 'inflate' the bounding box of this MultiApp.
Default:0.01
C++ Type:double
Controllable:No
Description:Relative amount to 'inflate' the bounding box of this MultiApp.
- bounding_box_padding0 0 0Additional padding added to the dimensions of the bounding box. The values are added to the x, y and z dimension respectively.
Default:0 0 0
C++ Type:libMesh::Point
Controllable:No
Description:Additional padding added to the dimensions of the bounding box. The values are added to the x, y and z dimension respectively.
- clone_parent_meshFalseTrue to clone parent app mesh and use it for this MultiApp.
Default:False
C++ Type:bool
Controllable:No
Description:True to clone parent app mesh and use it for this MultiApp.
- execute_onTIMESTEP_BEGINThe 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_BEGIN
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
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.
- global_time_offset0The time offset relative to the parent application for the purpose of starting a subapp at a different time from the parent application. The global time will be ahead by the offset specified here.
Default:0
C++ Type:double
Controllable:No
Description:The time offset relative to the parent application for the purpose of starting a subapp at a different time from the parent application. The global time will be ahead by the offset specified here.
Optional Parameters
- catch_upFalseIf true this will allow failed solves to attempt to 'catch up' using smaller timesteps.
Default:False
C++ Type:bool
Controllable:No
Description:If true this will allow failed solves to attempt to 'catch up' using smaller timesteps.
- max_catch_up_steps2Maximum number of steps to allow an app to take when trying to catch back up after a failed solve.
Default:2
C++ Type:double
Controllable:No
Description:Maximum number of steps to allow an app to take when trying to catch back up after a failed solve.
Recovering Failed Solutions Parameters
- cli_argsAdditional command line arguments to pass to the sub apps. If one set is provided the arguments are applied to all, otherwise there must be a set for each sub app.
C++ Type:std::vector<CLIArgString>
Controllable:Yes
Description:Additional command line arguments to pass to the sub apps. If one set is provided the arguments are applied to all, otherwise there must be a set for each sub app.
- cli_args_filesFile names that should be looked in for additional command line arguments to pass to the sub apps. Each line of a file is set to each sub app. If only one line is provided, it will be applied to all sub apps.
C++ Type:std::vector<FileName>
Controllable:No
Description:File names that should be looked in for additional command line arguments to pass to the sub apps. Each line of a file is set to each sub app. If only one line is provided, it will be applied to all sub apps.
Passing Command Line Argument 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.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- 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.
- wait_for_first_app_initFalseCreate the first sub-application on rank 0, then MPI_Barrier before creating the next N-1 apps (on all ranks). This is only needed if your sub-application needs to perform some setup actions in quiet, without other sub-applications working at the same time.
Default:False
C++ Type:bool
Controllable:No
Description:Create the first sub-application on rank 0, then MPI_Barrier before creating the next N-1 apps (on all ranks). This is only needed if your sub-application needs to perform some setup actions in quiet, without other sub-applications working at the same time.
Advanced Parameters
- detect_steady_stateFalseIf true then while sub_cycling a steady state check will be done. In this mode output will only be done once the MultiApp reaches the target time or steady state is reached
Default:False
C++ Type:bool
Controllable:No
Description:If true then while sub_cycling a steady state check will be done. In this mode output will only be done once the MultiApp reaches the target time or steady state is reached
- interpolate_transfersFalseOnly valid when sub_cycling. This allows transferred values to be interpolated over the time frame the MultiApp is executing over when sub_cycling
Default:False
C++ Type:bool
Controllable:No
Description:Only valid when sub_cycling. This allows transferred values to be interpolated over the time frame the MultiApp is executing over when sub_cycling
- max_failures0Maximum number of solve failures tolerated while sub_cycling.
Default:0
C++ Type:unsigned int
Controllable:No
Description:Maximum number of solve failures tolerated while sub_cycling.
- output_sub_cyclesFalseIf true then every sub-cycle will be output.
Default:False
C++ Type:bool
Controllable:No
Description:If true then every sub-cycle will be output.
- print_sub_cyclesTrueToggle the display of sub-cycles on the screen.
Default:True
C++ Type:bool
Controllable:No
Description:Toggle the display of sub-cycles on the screen.
- steady_state_tol1e-08The relative difference between the new solution and the old solution that will be considered to be at steady state
Default:1e-08
C++ Type:double
Controllable:No
Description:The relative difference between the new solution and the old solution that will be considered to be at steady state
- sub_cyclingFalseSet to true to allow this MultiApp to take smaller timesteps than the rest of the simulation. More than one timestep will be performed for each parent application timestep
Default:False
C++ Type:bool
Controllable:No
Description:Set to true to allow this MultiApp to take smaller timesteps than the rest of the simulation. More than one timestep will be performed for each parent application timestep
Sub Cycling Parameters
- keep_solution_during_restoreFalseThis is useful when doing MultiApp coupling iterations. It takes the final solution from the previous coupling iterationand re-uses it as the initial guess for the next coupling iteration
Default:False
C++ Type:bool
Controllable:No
Description:This is useful when doing MultiApp coupling iterations. It takes the final solution from the previous coupling iterationand re-uses it as the initial guess for the next coupling iteration
- relaxation_factor1Fraction of newly computed value to keep.Set between 0 and 2.
Default:1
C++ Type:double
Controllable:No
Description:Fraction of newly computed value to keep.Set between 0 and 2.
- transformed_postprocessorsList of subapp postprocessors to use coupling algorithm on during Multiapp coupling iterations
C++ Type:std::vector<PostprocessorName>
Controllable:No
Description:List of subapp postprocessors to use coupling algorithm on during Multiapp coupling iterations
- transformed_variablesList of subapp variables to use coupling algorithm on during Multiapp coupling iterations
C++ Type:std::vector<std::string>
Controllable:No
Description:List of subapp variables to use coupling algorithm on during Multiapp coupling iterations
Fixed Point Acceleration Of Multiapp Quantities Parameters
- library_load_dependenciesFalseTells MOOSE to manually load library dependencies. This should not be necessary and is here for debugging/troubleshooting.
Default:False
C++ Type:bool
Controllable:No
Description:Tells MOOSE to manually load library dependencies. This should not be necessary and is here for debugging/troubleshooting.
- library_nameThe file name of the library (*.la file) that will be dynamically loaded.
C++ Type:std::string
Controllable:No
Description:The file name of the library (*.la file) that will be dynamically loaded.
- library_pathPath to search for dynamic libraries (please avoid committing absolute paths in addition to MOOSE_LIBRARY_PATH)
C++ Type:std::string
Controllable:No
Description:Path to search for dynamic libraries (please avoid committing absolute paths in addition to MOOSE_LIBRARY_PATH)
Dynamic Loading Parameters
- max_procs_per_app4294967295Maximum number of processors to give to each App in this MultiApp. Useful for restricting small solves to just a few procs so they don't get spread out
Default:4294967295
C++ Type:unsigned int
Controllable:No
Description:Maximum number of processors to give to each App in this MultiApp. Useful for restricting small solves to just a few procs so they don't get spread out
- min_procs_per_app1Minimum number of processors to give to each App in this MultiApp. Useful for larger, distributed mesh solves.
Default:1
C++ Type:unsigned int
Controllable:No
Description:Minimum number of processors to give to each App in this MultiApp. Useful for larger, distributed mesh solves.
Parallelism Parameters
- move_appsApps, designated by their 'numbers' starting with 0 corresponding to the order of the App positions, to be moved at move_time to move_positions
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Apps, designated by their 'numbers' starting with 0 corresponding to the order of the App positions, to be moved at move_time to move_positions
- move_positionsThe positions corresponding to each move_app.
C++ Type:std::vector<libMesh::Point>
Controllable:No
Description:The positions corresponding to each move_app.
- move_time1.79769e+308The time at which Apps designated by move_apps are moved to move_positions.
Default:1.79769e+308
C++ Type:double
Controllable:No
Description:The time at which Apps designated by move_apps are moved to move_positions.
Timed Move Of Multiapps Parameters
- output_in_positionFalseIf true this will cause the output from the MultiApp to be 'moved' by its position vector
Default:False
C++ Type:bool
Controllable:No
Description:If true this will cause the output from the MultiApp to be 'moved' by its position vector
- positionsThe positions of the App locations. Each set of 3 values will represent a Point. This and 'positions_file' cannot be both supplied. If this and 'positions_file'/'_objects' are not supplied, a single position (0,0,0) will be used
C++ Type:std::vector<libMesh::Point>
Controllable:No
Description:The positions of the App locations. Each set of 3 values will represent a Point. This and 'positions_file' cannot be both supplied. If this and 'positions_file'/'_objects' are not supplied, a single position (0,0,0) will be used
- positions_fileFilename(s) that should be looked in for positions. Each set of 3 values in that file will represent a Point. This and 'positions(_objects)' cannot be both supplied
C++ Type:std::vector<FileName>
Controllable:No
Description:Filename(s) that should be looked in for positions. Each set of 3 values in that file will represent a Point. This and 'positions(_objects)' cannot be both supplied
- positions_objectsThe name of a Positions object that will contain the locations of the sub-apps created. This and 'positions(_file)' cannot be both supplied
C++ Type:std::vector<PositionsName>
Controllable:No
Description:The name of a Positions object that will contain the locations of the sub-apps created. This and 'positions(_file)' cannot be both supplied
- run_in_positionFalseIf true this will cause the mesh from the MultiApp to be 'moved' by its position vector
Default:False
C++ Type:bool
Controllable:No
Description:If true this will cause the mesh from the MultiApp to be 'moved' by its position vector
Positions / Transformations Of The Multiapp Frame Of Reference Parameters
- reset_appsThe Apps that will be reset when 'reset_time' is hit. These are the App 'numbers' starting with 0 corresponding to the order of the App positions. Resetting an App means that it is destroyed and recreated, possibly modeling the insertion of 'new' material for that app.
C++ Type:std::vector<unsigned int>
Controllable:No
Description:The Apps that will be reset when 'reset_time' is hit. These are the App 'numbers' starting with 0 corresponding to the order of the App positions. Resetting an App means that it is destroyed and recreated, possibly modeling the insertion of 'new' material for that app.
- reset_timeThe time(s) at which to reset Apps given by the 'reset_apps' parameter. Resetting an App means that it is destroyed and recreated, possibly modeling the insertion of 'new' material for that app.
C++ Type:std::vector<double>
Controllable:No
Description:The time(s) at which to reset Apps given by the 'reset_apps' parameter. Resetting an App means that it is destroyed and recreated, possibly modeling the insertion of 'new' material for that app.
Reset Multiapp Parameters
- tolerate_failureFalseIf true this MultiApp won't participate in dt decisions and will always be fast-forwarded to the current time.
Default:False
C++ Type:bool
Controllable:No
Description:If true this MultiApp won't participate in dt decisions and will always be fast-forwarded to the current time.
Accepting Failed Solutions Parameters
Input Files
- (tutorials/tutorial02_multiapps/step02_transfers/04_parent_multiscale.i)
- (test/tests/multiapps/move_and_reset/parent.i)
- (test/tests/transfers/multiapp_userobject_transfer/two_pipe_parent.i)
- (test/tests/transfers/multiapp_userobject_transfer/tosub_displaced_parent.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_load_multiapp/misc_parent_no_path.i)
- (test/tests/multiapps/picard/function_dt_parent.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/01_parent.i)
- (test/tests/transfers/multiapp_copy_transfer/aux_to_aux/from_sub.i)
- (tutorials/tutorial02_multiapps/step03_coupling/03_parent_subcycling_picard.i)
- (test/tests/multiapps/loose_couple_time_adapt/begin.i)
- (test/tests/multiapps/output_in_position/parent.i)
- (test/tests/multiapps/time_offset/parent.i)
- (test/tests/multiapps/picard_sub_cycling/picard_parent.i)
- (test/tests/transfers/multiapp_interpolation_transfer/fromsub_parent.i)
- (test/tests/transfers/multiapp_copy_transfer/aux_to_primary/to_sub.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/boundary_toparent_parent.i)
- (test/tests/transfers/general_field/nearest_node/subdomain/main.i)
- (test/tests/controls/time_periods/multiapps/parent.i)
- (test/tests/transfers/transfer_once_per_fixed_point/parent.i)
- (test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/to_multiple_boundaries_parent.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/restricted_node_parent.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/to_multiple_boundaries_parent.i)
- (test/tests/outputs/transferred_scalar_variable/transferred_scalar_variable.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/parallel_parent.i)
- (test/tests/multiapps/relaxation/picard_parent.i)
- (test/tests/multiapps/cliargs_from_file/cliargs_parent.i)
- (test/tests/multiapps/auto_diff_auto_scaling/main.i)
- (modules/functional_expansion_tools/test/tests/standard_use/volume_coupled.i)
- (modules/functional_expansion_tools/examples/2D_interface_different_submesh/main.i)
- (modules/external_petsc_solver/test/tests/partition/moose_as_parent.i)
- (test/tests/transfers/general_field/nearest_node/nearest_position/main_between_multiapp.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/fracture_diffusion/matrix_app_dirac.i)
- (test/tests/transfers/multiapp_postprocessor_interpolation_transfer/radial_parent.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/3d_1d_parent.i)
- (test/tests/transfers/multiapp_postprocessor_interpolation_transfer/parent_quad.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/porous_flow.i)
- (test/tests/transfers/multiapp_variable_value_sample_transfer/parent_quad.i)
- (test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/tosub_parent.i)
- (test/tests/parser/cli_multiapp_single/dt_from_parent.i)
- (test/tests/multiapps/restart_multilevel/parent.i)
- (test/tests/multiapps/steffensen/transient_main.i)
- (test/tests/multiapps/multilevel/dt_from_sub_parent.i)
- (test/tests/outputs/perf_graph/multi_app/parent_sub_cycle.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/05_parent_parallel.i)
- (test/tests/multiapps/positions_from_file/dt_from_multi.i)
- (modules/external_petsc_solver/test/tests/external_petsc_problem/moose_as_parent.i)
- (test/tests/multiapps/picard_multilevel/multilevel_dt_rejection/parent.i)
- (test/tests/multiapps/picard_multilevel/picard_parent.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/3dFracture/matrix_app.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/fracture_diffusion/matrix_app_nonconforming.i)
- (test/tests/transfers/multiapp_copy_transfer/aux_to_aux/to_sub.i)
- (tutorials/tutorial02_multiapps/step02_transfers/01_parent_meshfunction.i)
- (test/tests/multiapps/picard_failure/picard_parent.i)
- (test/tests/multiapps/reset/multilevel_sub.i)
- (test/tests/transfers/multiapp_postprocessor_transfer/between_multiapp/main.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_different_submesh/main.i)
- (test/tests/transfers/multiapp_variable_value_sample_transfer/parent_fv.i)
- (test/tests/multiapps/picard/picard_rel_tol_parent.i)
- (test/tests/transfers/multiapp_reporter_transfer/clone_type.i)
- (test/tests/restart/restart_transient_from_transient/pseudo_trans_with_2subs.i)
- (test/tests/multiapps/picard_catch_up/parent.i)
- (test/tests/multiapps/sub_cycling/parent_iteration_adaptive.i)
- (test/tests/multiapps/sub_cycling/parent_short.i)
- (test/tests/transfers/multiapp_postprocessor_to_scalar/parent.i)
- (test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/between_multiapp/main.i)
- (test/tests/positions/creating_multiapps/apps_from_positions.i)
- (test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/fromsub_target_displaced.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/exchanger.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_bad_user_object.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/tosub_displaced_parent.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/04_parent_multiple.i)
- (test/tests/parser/cli_multiapp_all/dt_from_parent.i)
- (modules/functional_expansion_tools/examples/2D_interface_no_material/main.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/02_parent_sublimit.i)
- (modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/parent_non_overlapping.i)
- (test/tests/transfers/multiapp_copy_transfer/block_restriction/bi_direction.i)
- (python/chigger/tests/input/multiapps.i)
- (test/tests/transfers/general_field/nearest_node/between_siblings/main_between_multiapp.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/exchanger_un_quartz.i)
- (test/tests/multiapps/restart_multilevel/parent2.i)
- (test/tests/transfers/multiapp_interpolation_transfer/tosub_parent.i)
- (test/tests/transfers/multiapp_mesh_function_transfer/tosub.i)
- (test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/exec_on_mismatch.i)
- (test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/from_sub/parent_wrong_order.i)
- (test/tests/transfers/multiapp_mesh_function_transfer/fromsub_target_displaced.i)
- (test/tests/multiapps/picard_multilevel/fullsolve_multilevel/sub_level1.i)
- (test/tests/multiapps/picard_postprocessor/transient_main.i)
- (test/tests/multiapps/restart_multilevel/sub.i)
- (tutorials/tutorial02_multiapps/step03_coupling/02_parent_picard.i)
- (test/tests/multiapps/move_and_reset/multilevel_sub.i)
- (test/tests/transfers/multiapp_reporter_transfer/main.i)
- (test/tests/multiapps/transient_multiapp/dt_from_parent.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
- (test/tests/parser/cli_multiapp_group/dt_from_parent.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.q_wall_transfer_3eqn.parent.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_direct/main.i)
- (test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/missing_parent.i)
- (modules/external_petsc_solver/test/tests/external_petsc_problem/petsc_transient_as_parent.i)
- (test/tests/transfers/errors/from_sub.i)
- (test/tests/transfers/general_field/user_object/boundary/main.i)
- (test/tests/multiapps/stateful_material_sub_cycling/material_sub_app_test_parent.i)
- (test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/fromsub_parent.i)
- (test/tests/multiapps/picard_multilevel/picard_sub.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/tosub_parent.i)
- (test/tests/multiapps/steffensen_postprocessor/transient_main.i)
- (modules/functional_expansion_tools/examples/2D_volumetric_Cartesian/main.i)
- (test/tests/multiapps/relaxation/picard_relaxed_parent.i)
- (test/tests/transfers/multiapp_postprocessor_transfer/parent.i)
- (test/tests/outputs/output_if_base_contains/dt_from_parent_sub.i)
- (test/tests/multiapps/slow_sub/parent.i)
- (test/tests/multiapps/secant_postprocessor/transient_main.i)
- (test/tests/transfers/general_field/user_object/subdomain/main.i)
- (test/tests/restart/restart_transient_from_transient/restart_trans_with_2subs.i)
- (test/tests/transfers/multiapp_userobject_transfer/3d_1d_parent.i)
- (test/tests/multiapps/multilevel/dt_from_parent_parent.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/main.i)
- (test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/parallel_parent.i)
- (test/tests/multiapps/picard/picard_parent.i)
- (test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/tosub_target_displaced.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_missing_local_object.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_displaced_parent.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_load_multiapp/misc_parent_bad.i)
- (modules/functional_expansion_tools/examples/2D_interface/main.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_postprocessor/errors/wrong_multi_app.i)
- (modules/combined/examples/optimization/multi-load/single_main.i)
- (test/tests/transfers/multiapp_projection_transfer/fixed_meshes_parent.i)
- (test/tests/userobjects/postprocessor_spatial_user_object/parent.i)
- (test/tests/multiapps/picard/picard_adaptive_parent.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/exchanger.i)
- (test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/fromsub.i)
- (test/tests/transfers/multiapp_mesh_function_transfer/missing_parent.i)
- (test/tests/transfers/multiapp_postprocessor_interpolation_transfer/multilevel_parent.i)
- (test/tests/transfers/multiapp_mesh_function_transfer/tosub_target_displaced.i)
- (test/tests/multiapps/multilevel/dt_from_parent_sub.i)
- (test/tests/multiapps/grid-sequencing/vi-fine.i)
- (test/tests/multiapps/grid-sequencing/vi-coarse.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/fracture_app_heat.i)
- (test/tests/transfers/general_field/user_object/nearest_position/main_between_multiapp.i)
- (modules/combined/test/tests/beam_eigenstrain_transfer/parent_uo_transfer.i)
- (test/tests/multiapps/secant/transient_main.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical_subapp_mesh_refine/main.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_incompatible_orders.i)
- (test/tests/multiapps/catch_up/parent.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/main_nearest_sub_app.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_convection/plate.parent.i)
- (test/tests/transfers/general_field/shape_evaluation/boundary/main.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/06_parent_twoapps.i)
- (test/tests/multiapps/restart_subapp_ic/parent2.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/07_parent_multilevel.i)
- (test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/boundary_tosub_parent.i)
- (test/tests/multiapps/sub_cycling/main_negative.i)
- (test/tests/multiapps/sub_cycling_failure/parent_gold.i)
- (test/tests/transfers/transfer_on_final/parent.i)
- (test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/tosub_displaced_parent.i)
- (test/tests/multiapps/sub_cycling/parent_sub_output.i)
- (test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/fromsub_displaced_parent.i)
- (test/tests/multiapps/application_block_multiapps/application_block_parent.i)
- (test/tests/multiapps/reset/parent.i)
- (test/tests/transfers/multiapp_mesh_function_transfer/fromsub.i)
- (test/tests/transfers/multiapp_userobject_transfer/tosub_parent.i)
- (test/tests/outputs/console/multiapp/picard_parent_both.i)
- (test/tests/transfers/multiapp_userobject_transfer/main_nearest_sub_app.i)
- (test/tests/outputs/console/multiapp/picard_parent.i)
- (test/tests/multiapps/move_and_reset/multilevel_parent.i)
- (test/tests/transfers/general_field/nearest_node/boundary/main.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/porous_flow.i)
- (test/tests/controls/pid_control/pid_pp_control.i)
- (test/tests/transfers/general_field/shape_evaluation/subdomain/main.i)
- (test/tests/transfers/multiapp_userobject_transfer/parent.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/two_way_many_apps_parent.i)
- (test/tests/transfers/multiapp_copy_transfer/vector-variable-transfer/parent_L2_LagrangeVec.i)
- (test/tests/multiapps/multilevel/time_dt_from_parent_sub.i)
- (test/tests/transfers/multiapp_variable_value_sample_transfer/pp_parent.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_missing_sub_object.i)
- (modules/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/master.i)
- (modules/functional_expansion_tools/test/tests/standard_use/multiapp_different_physical_boundaries.i)
- (test/tests/transfers/multiapp_postprocessor_to_scalar/between_multiapp/main.i)
- (modules/functional_expansion_tools/test/tests/standard_use/multiapp_print_coefficients.i)
- (modules/functional_expansion_tools/test/tests/standard_use/interface_coupled.i)
- (test/tests/transfers/multiapp_postprocessor_transfer/parent_from_multiapp.i)
- (test/tests/transfers/multiapp_postprocessor_interpolation_transfer/multilevel_sub.i)
- (test/tests/multiapps/restart_subapp_ic/parent.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/boundary_tosub_parent.i)
- (test/tests/multiapps/initial_intactive/parent.i)
- (test/tests/multiapps/cliargs_from_file/cliargs_parent_inline.i)
- (test/tests/multiapps/picard_multilevel/multilevel_dt_rejection/picard_sub.i)
- (modules/combined/examples/geochem-porous_flow/forge/porous_flow.i)
- (test/tests/transfers/multiapp_conservative_transfer/parent_userobject.i)
- (test/tests/multiapps/multiple_position_files/multiple_position_files.i)
- (test/tests/multiapps/sub_cycling/parent.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/fromsub_fixed_meshes_parent.i)
- (test/tests/transfers/multiapp_postprocessor_interpolation_transfer/parent2_quad.i)
- (test/tests/multiapps/move/multilevel_parent.i)
- (test/tests/multiapps/multilevel/time_dt_from_parent_parent.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_elem_3eqn.parent.i)
- (test/tests/multiapps/grid-sequencing/fine.i)
- (modules/solid_mechanics/test/tests/transfer_from_displaced/parent.i)
- (test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/two_way_many_apps_parent.i)
- (test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/boundary_toparent_parent.i)
- (modules/level_set/test/tests/transfers/markers/multi_level/parent.i)
- (test/tests/transfers/multiapp_variable_value_sample_transfer/parent_array.i)
- (test/tests/transfers/multiapp_mesh_function_transfer/exec_on_mismatch.i)
- (test/tests/transfers/multiapp_mesh_function_transfer/fromsub_source_displaced.i)
- (test/tests/multiapps/restart/parent2.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_load_multiapp/misc_parent.i)
- (test/tests/transfers/multiapp_reporter_transfer/between_multiapp/main.i)
- (test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/to_sub/parent.i)
- (tutorials/tutorial02_multiapps/step03_coupling/01_parent.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/07_sub_multilevel.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/03_parent_subcycle.i)
- (test/tests/transfers/multiapp_mesh_function_transfer/tosub_source_displaced.i)
- (test/tests/transfers/multiapp_interpolation_transfer/fromrestrictedsub_parent.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/two_pipe_parent.i)
- (test/tests/transfers/multiapp_postprocessor_interpolation_transfer/parent.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_bad_function_series.i)
- (test/tests/transfers/general_field/shape_evaluation/between_siblings/main_between_multiapp.i)
- (test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/to_sub/parent_wrong_order.i)
- (test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/tosub_source_displaced.i)
- (test/tests/multiapps/petsc_options/parent.i)
- (test/tests/transfers/transfer_interpolation/parent.i)
- (test/tests/transfers/get_transfers_from_feproblem/parent.i)
- (test/tests/transfers/multiapp_postprocessor_to_scalar/parent2_wrong_positions.i)
- (test/tests/transfers/multiapp_postprocessor_to_scalar/parent2_wrong_order.i)
- (test/tests/multiapps/multilevel/dt_from_sub_sub.i)
- (modules/combined/test/tests/restart-transient-from-ss-with-stateful/parent_tr.i)
- (test/tests/multiapps/reset/multilevel_parent.i)
- (test/tests/transfers/general_field/shape_evaluation/displaced/parent.i)
- (test/tests/multiapps/sub_cycling_failure/parent.i)
- (test/tests/transfers/transfer_once_per_fixed_point/sub.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_3eqn.parent.i)
- (test/tests/multiapps/move/multilevel_sub.i)
- (test/tests/restart/restart_transient_from_steady/restart_trans_with_sub.i)
- (test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/tosub.i)
- (test/tests/outputs/perf_graph/multi_app/parent.i)
- (test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/from_sub/parent.i)
- (test/tests/outputs/output_if_base_contains/dt_from_parent_parent.i)
- (test/tests/multiapps/move/parent.i)
- (test/tests/multiapps/relaxation/sub_relaxed_parent.i)
- (test/tests/transfers/multiapp_postprocessor_transfer/from_one_sub_parent.i)
- (test/tests/multiapps/check_error/check_error.i)
- (test/tests/transfers/transfer_with_reset/parent.i)
- (test/tests/transfers/multiapp_userobject_transfer/restricted_elem_parent.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer/errors/parent_multiapp_type_error.i)
- (test/tests/transfers/multiapp_projection_transfer/tosub_parent.i)
- (test/tests/multiapps/restart/parent.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/fromsub_displaced_parent.i)
- (test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/fromsub_source_displaced.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/single_fracture_heat_transfer/matrix_app.i)
- (test/tests/multiapps/transient_multiapp/dt_from_multi.i)
- (test/tests/transfers/multiapp_userobject_transfer/restricted_node_parent.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_temperature/phy.parent.i)
- (test/tests/multiapps/relaxation/picard_relaxed_array_parent.i)
- (test/tests/multiapps/max_procs_per_app/parent.i)
- (tutorials/tutorial02_multiapps/step02_transfers/03_parent_uot.i)
- (test/tests/controls/time_periods/transfers/parent.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/fracture_app.i)
- (test/tests/transfers/multiapp_vector_pp_transfer/parent.i)
- (test/tests/multiapps/sub_cycling_failure/failure_with_max_procs_set.i)
- (test/tests/multiapps/picard_multilevel/2level_picard/sub_level1.i)
- (test/tests/transfers/multiapp_variable_value_sample_transfer/parent.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_parent.i)
- (test/tests/transfers/multiapp_copy_transfer/aux_to_primary/from_sub.i)
- (tutorials/tutorial02_multiapps/step02_transfers/02_parent_nearestnode.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/fromsub_parent.i)
- (modules/functional_expansion_tools/test/tests/standard_use/volume_coupling_custom_norm.i)
- (modules/combined/examples/optimization/thermomechanical/thermomechanical_main.i)
- (modules/combined/examples/optimization/multi-load/square_main.i)
- (test/tests/transfers/multiapp_projection_transfer/fromsub_parent.i)
- (test/tests/multiapps/output_in_position/multilevel_parent.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/main.i)
- (test/tests/multiapps/picard/picard_abs_tol_parent.i)
- (test/tests/multiapps/relaxation/bad_relax_factor_parent.i)
- (test/tests/transfers/multiapp_copy_transfer/between_multiapps/main.i)
- (modules/geochemistry/test/tests/kinetics/bio_zoning_flow.i)
- (modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/parent.i)
- (test/tests/multiapps/loose_couple_time_adapt/end.i)
- (modules/thermal_hydraulics/test/tests/components/form_loss_from_external_app_1phase/phy.form_loss_1phase.parent.i)
- (test/tests/transfers/general_field/user_object/between_siblings/main_between_multiapp.i)
- (test/tests/transfers/multiapp_reporter_transfer/clone.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/restricted_elem_parent.i)
- (test/tests/multiapps/detect_steady_state/parent.i)
- (test/tests/restart/restart_transient_from_steady/restart_trans_with_2subs.i)
- (tutorials/darcy_thermo_mech/step10_multiapps/problems/step10.i)
- (test/tests/transfers/multiapp_postprocessor_to_scalar/parent2.i)
Child Objects
sub_cycling
Default:False
C++ Type:bool
Controllable:No
Description:Set to true to allow this MultiApp to take smaller timesteps than the rest of the simulation. More than one timestep will be performed for each parent application timestep
interpolate_transfers
Default:False
C++ Type:bool
Controllable:No
Description:Only valid when sub_cycling. This allows transferred values to be interpolated over the time frame the MultiApp is executing over when sub_cycling
start_time
Default:0
C++ Type:double
Controllable:No
Description:The start time of the simulation
end_time
Default:1e+30
C++ Type:double
Controllable:No
Description:The end time of the simulation
(test/tests/multiapps/transient_multiapp/dt_from_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'dt_from_parent_sub.i'
positions = '0 0 0
0.5 0.5 0
0.6 0.6 0
0.7 0.7 0'
[]
[]
(tutorials/tutorial02_multiapps/step02_transfers/04_parent_multiscale.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[vt]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[micro]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '04_sub_multiscale.i'
cli_args = 'BCs/right/value=1 BCs/right/value=2 BCs/right/value=3'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppVariableValueSampleTransfer
to_multi_app = micro
source_variable = u
variable = ut
[]
[pull_v]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = vt
postprocessor = average_v
[]
[]
(test/tests/multiapps/move_and_reset/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0'
input_files = sub.i
reset_apps = 0
reset_time = 0.05
move_time = 0.05
move_positions = '2 2 0'
move_apps = 0
output_in_position = true
[../]
[]
(test/tests/transfers/multiapp_userobject_transfer/two_pipe_parent.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 5
nx = 5
ymin = 0
ymax = 5
ny = 5
zmin = 0
zmax = 5
nz = 5
[]
[./blocks]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '1 1 0'
top_right = '4 4 5'
[../]
[]
[AuxVariables]
[./from_sub_app_var]
order = CONSTANT
family = MONOMIAL
block = 1
initial_condition = 0
[../]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = front
value = -1
[]
[right]
type = DirichletBC
variable = u
boundary = back
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 5
solve_type = 'NEWTON'
l_tol = 1e-8
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
execute_on = final
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = two_pipe_sub.i
app_type = MooseTestApp
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[layered_transfer_from_sub_app]
type = MultiAppUserObjectTransfer
user_object = sub_app_uo
variable = from_sub_app_var
from_multi_app = sub_app
displaced_source_mesh = true
skip_bounding_box_check = true
[]
[]
(test/tests/transfers/multiapp_userobject_transfer/tosub_displaced_parent.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
# The MultiAppUserObjectTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average_value]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
execute_on = timestep_end
positions = '0 0 0'
type = TransientMultiApp
input_files = tosub_displaced_sub.i
app_type = MooseTestApp
[../]
[]
[Transfers]
[./layered_transfer]
user_object = layered_average
variable = multi_layered_average
type = MultiAppUserObjectTransfer
to_multi_app = sub_app
displaced_target_mesh = true
skip_coordinate_collapsing = true
[../]
[./element_layered_transfer]
user_object = layered_average
variable = element_multi_layered_average
type = MultiAppUserObjectTransfer
to_multi_app = sub_app
displaced_target_mesh = true
skip_coordinate_collapsing = true
[../]
[]
(modules/misc/test/tests/dynamic_loading/dynamic_load_multiapp/misc_parent_no_path.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
positions = '0.5 0.5 0'
type = TransientMultiApp
input_files = 'phase_field_sub.i'
# Here we'll attempt to load a different module that's not compiled into this module
app_type = PhaseFieldApp
[]
[]
(test/tests/multiapps/picard/function_dt_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[dts]
type = PiecewiseLinear
x = '0.1 10'
y = '0.1 10'
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
dt = 0.1
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
fixed_point_max_its = 2
start_time = 0
num_steps = 3
[TimeStepper]
type = FunctionDT
function = dts
[]
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'function_dt_sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(tutorials/tutorial02_multiapps/step01_multiapps/01_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = '01_sub.i'
[]
[]
(test/tests/transfers/multiapp_copy_transfer/aux_to_aux/from_sub.i)
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = sub.i
[]
[Transfers/from_sub]
type = MultiAppCopyTransfer
from_multi_app = sub
source_variable = aux
variable = x
[]
[AuxVariables/x]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
execute_on = 'FINAL'
exodus = true
[]
(tutorials/tutorial02_multiapps/step03_coupling/03_parent_subcycling_picard.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[vt]
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ParsedMaterial
property_name = D
coupled_variables = 'vt'
expression = 'vt'
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
fixed_point_max_its = 10
nl_abs_tol = 1e-10
fixed_point_rel_tol = 1e-6
fixed_point_abs_tol = 1e-10
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[micro]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '03_sub_subcycling_picard.i'
execute_on = timestep_end
output_in_position = true
sub_cycling = true
[]
[]
[Transfers]
[push_u]
type = MultiAppVariableValueSampleTransfer
to_multi_app = micro
source_variable = u
variable = ut
[]
[pull_v]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = vt
postprocessor = average_v
[]
[]
(test/tests/multiapps/loose_couple_time_adapt/begin.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[MultiApps]
[./dummy]
type = TransientMultiApp
input_files = adaptiveDT.i
execute_on = timestep_begin
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 0.006
dt = 0.006
nl_abs_tol = 1.0e-8
[]
[Outputs]
exodus = true
file_base = begin
[]
(test/tests/multiapps/output_in_position/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0'
input_files = sub.i
output_in_position = true
[../]
[]
(test/tests/multiapps/time_offset/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
type = TransientMultiApp
input_files = 'sub.i'
global_time_offset = 0.8
[../]
[]
(test/tests/multiapps/picard_sub_cycling/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[./force_u]
type = CoupledForce
variable = u
v = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
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]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
sub_cycling = true
interpolate_transfers = true
[../]
[]
[Transfers]
[./v_from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = v
variable = v
[../]
[./u_to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = u
[../]
[]
(test/tests/transfers/multiapp_interpolation_transfer/fromsub_parent.i)
###########################################################
# This is a test of the Transfer System. This test
# uses the Multiapp System to solve independent problems
# related geometrically. Solutions are then interpolated
# and transferred from a non-aligned domain.
#
# @Requirement F7.20
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
displacements = 'disp_x disp_y'
# The MultiAppGeometricInterpolationTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./from_sub]
[../]
[./elemental_from_sub]
order = CONSTANT
family = MONOMIAL
[../]
[./radial_from_sub]
[../]
[./radial_elemental_from_sub]
order = CONSTANT
family = MONOMIAL
[../]
[./disp_x]
initial_condition = 0.2
[../]
[./disp_y]
[../]
[./displaced_target_from_sub]
[../]
[./displaced_source_from_sub]
[../]
[./nodal_from_sub_elemental]
[../]
[./elemental_from_sub_elemental]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.6 0 0'
input_files = fromsub_sub.i
[../]
[]
[Transfers]
[./fromsub]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = u
variable = from_sub
[../]
[./elemental_fromsub]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = u
variable = elemental_from_sub
[../]
[./radial_fromsub]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = u
variable = radial_from_sub
interp_type = radial_basis
[../]
[./radial_elemental_fromsub]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = u
variable = radial_elemental_from_sub
interp_type = radial_basis
[../]
[./displaced_target_fromsub]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = u
variable = displaced_target_from_sub
displaced_target_mesh = true
[../]
[./displaced_source_fromsub]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = u
variable = displaced_source_from_sub
displaced_source_mesh = true
[../]
[./elemental_from_sub_elemental]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = elemental
variable = elemental_from_sub_elemental
[../]
[./nodal_from_sub_elemental]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = elemental
variable = nodal_from_sub_elemental
[../]
[]
(test/tests/transfers/multiapp_copy_transfer/aux_to_primary/to_sub.i)
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[main]
initial_condition = 1949
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = sub.i
[]
[Transfers/to_sub]
type = MultiAppCopyTransfer
to_multi_app = sub
source_variable = main
variable = sub
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
execute_on = 'FINAL'
exodus = true
[]
(test/tests/transfers/multiapp_nearest_node_transfer/boundary_toparent_parent.i)
# Parent mesh and sub mesh are same with 4x4 quad8 elements.
# parent mesh has top boundary fixed at u=2 and bottom fixed at u=0
# sub mesh has top boundary fixed at u = 0 and bottom fixed at u=1
# The u variable at right boundary of sub mesh is transferred to
# from_sub variable of parent mesh at left boundary
# Result is from_sub at left boundary has linearly increasing value starting
# with 0 at top and ending with 1 at bottom. from_sub is zero everywhere else
# in the parent mesh.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
elem_type = QUAD8
[]
[Variables]
[u]
family = LAGRANGE
order = FIRST
[]
[]
[AuxVariables]
[from_sub]
family = LAGRANGE
order = SECOND
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[top]
type = DirichletBC
variable = u
boundary = top
value = 2.0
[]
[bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0.0
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = boundary_toparent_sub.i
[]
[]
[Transfers]
[from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
source_boundary = right
target_boundary = left
variable = from_sub
[]
[]
(test/tests/transfers/general_field/nearest_node/subdomain/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.6 & y < 0.5'
block_id = 1
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
[]
execute_on = 'TIMESTEP_END'
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# Offsets are added to make sure there are no equidistant nodes / transfer indetermination
positions = '0.00001 0 0 0.4022222 0.281111 0 0.7232323 0.12323 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
from_blocks = 1
to_blocks = 1
[]
[to_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
from_blocks = 1
to_blocks = 1
[]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
from_blocks = 1
to_blocks = 1
[]
[from_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
from_blocks = 1
to_blocks = 1
[]
[]
(test/tests/controls/time_periods/multiapps/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '1. 0. 0.'
input_files = sub.i
execute_on = 'initial timestep_end'
output_in_position = true
[../]
[]
[Controls]
[./multiapp]
type = TimePeriod
disable_objects = 'MultiApps::sub'
start_time = '0'
end_time = '0.25'
execute_on = 'initial timestep_begin'
[../]
[]
(test/tests/transfers/transfer_once_per_fixed_point/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Problem]
type = FEProblem
solve = false
verbose_multiapps = true
[]
[Executioner]
type = Transient
num_steps = 4
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_min_its = 4
fixed_point_max_its = 20
verbose = true
[]
[MultiApps]
# This app is used to trigger fixed point iteration when sub is executed on MULTIAPP_FIXED_POINT_BEGIN/END
[side_app]
type = TransientMultiApp
input_files = sub.i
cli_args = "MultiApps/active='';Outputs/active=''"
execute_on = 'INITIAL TIMESTEP_END'
[]
# This app is used to test the fixed point begin/end execute_on for transfers and multiapps
[sub]
type = TransientMultiApp
input_files = sub.i
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Transfers]
[to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = num_fixed_point_total
to_postprocessor = parent_fp_its
to_multi_app = sub
check_multiapp_execute_on = false
execute_on = 'MULTIAPP_FIXED_POINT_BEGIN'
[]
[from_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = num_fixed_point_its
to_postprocessor = subapp_fp_its
from_multi_app = sub
check_multiapp_execute_on = false
execute_on = 'MULTIAPP_FIXED_POINT_BEGIN'
reduction_type = 'sum'
[]
[]
[Postprocessors]
[num_fixed_point_total]
type = TestPostprocessor
test_type = 'grow'
execute_on = 'INITIAL TIMESTEP_END'
[]
[num_fixed_point_begin]
type = TestPostprocessor
test_type = 'grow'
execute_on = 'MULTIAPP_FIXED_POINT_BEGIN'
[]
[num_fixed_point_end]
type = TestPostprocessor
test_type = 'grow'
execute_on = 'MULTIAPP_FIXED_POINT_END'
[]
[subapp_fp_its]
type = Receiver
[]
[]
[Outputs]
[fp_begin]
type = CSV
execute_on = 'MULTIAPP_FIXED_POINT_BEGIN'
[]
[fp_end]
type = CSV
file_base = 'fp_end'
execute_on = 'MULTIAPP_FIXED_POINT_END'
[]
[]
(test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/to_multiple_boundaries_parent.i)
# Parent mesh and sub mesh are same with 4x4 quad8 elements.
# parent mesh has top boundary fixed at u=2 and bottom fixed at u=-1
# sub mesh has top boundary fixed at v=2 and bottom fixed at v=1
# The u variable is transferred to the left and bottom boundaries of the sub,
# while the v variable is transferred to the right and top boundaries of the parent.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[from_sub]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[top]
type = DirichletBC
variable = u
boundary = top
value = 2.0
[]
[bottom]
type = DirichletBC
variable = u
boundary = bottom
value = -1.0
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
input_files = to_multiple_boundaries_sub.i
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
to_boundaries = 'left bottom'
variable = from_parent
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
to_boundaries = 'right top'
variable = from_sub
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/restricted_node_parent.i)
num_layers = 2
[Mesh]
[box]
type = GeneratedMeshGenerator
dim = 3
nx = ${num_layers}
ny = 3
nz = 3
xmin = 0.25
xmax = 1.25
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[a]
[]
[s]
[]
[]
[AuxKernels]
[s_ak]
type = ParsedAux
variable = s
use_xyzt = true
expression = 'x+(z*z)'
[]
[]
[Functions]
[]
[Postprocessors]
[a_avg]
type = ElementAverageValue
variable = a
[]
[]
[UserObjects]
[S_avg_front]
type = LayeredSideAverage
boundary = front
variable = s
num_layers = ${num_layers}
direction = x
[]
[S_avg_back]
type = LayeredSideAverage
boundary = back
variable = s
num_layers = ${num_layers}
direction = x
[]
[]
[MultiApps]
[ch0]
type = TransientMultiApp
input_files = 'restricted_node_sub.i'
bounding_box_padding = '0 0.5 1'
positions = '0 0.5 -0.1'
output_in_position = true
cli_args = 'yy=0'
[]
[ch1]
type = TransientMultiApp
input_files = 'restricted_node_sub.i'
bounding_box_padding = '0 0.5 1'
positions = '0 0.5 1.1'
output_in_position = true
cli_args = 'yy=1'
[]
[]
[Transfers]
[from_ch0]
type = MultiAppGeneralFieldUserObjectTransfer
to_boundaries = back
from_multi_app = ch0
variable = a
source_user_object = A_avg
fixed_bounding_box_size = '0 1 1.5'
from_app_must_contain_point = false
[]
[from_ch1]
type = MultiAppGeneralFieldUserObjectTransfer
to_boundaries = front
from_multi_app = ch1
variable = a
source_user_object = A_avg
fixed_bounding_box_size = '0 1 1.5'
from_app_must_contain_point = false
[]
[to_ch0]
type = MultiAppGeneralFieldUserObjectTransfer
to_blocks = 20
to_multi_app = ch0
variable = S
source_user_object = S_avg_back
fixed_bounding_box_size = '1.5 1 1.5'
from_app_must_contain_point = false
[]
[to_ch1]
type = MultiAppGeneralFieldUserObjectTransfer
to_blocks = 20
to_multi_app = ch1
variable = S
source_user_object = S_avg_front
fixed_bounding_box_size = '1.5 1 1.5'
from_app_must_contain_point = false
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_nearest_node_transfer/to_multiple_boundaries_parent.i)
# Parent mesh and sub mesh are same with 4x4 quad8 elements.
# parent mesh has top boundary fixed at u=2 and bottom fixed at u=-1
# sub mesh has top boundary fixed at v=2 and bottom fixed at v=1
# The u variable is transferred to the left and bottom boundaries of the sub,
# while the v variable is transferred to the right and top boundaries of the parent.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[from_sub]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[top]
type = DirichletBC
variable = u
boundary = top
value = 2.0
[]
[bottom]
type = DirichletBC
variable = u
boundary = bottom
value = -1.0
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
input_files = to_multiple_boundaries_sub.i
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
target_boundary = 'left bottom'
variable = from_parent
[]
[from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = v
target_boundary = 'right top'
variable = from_sub
[]
[]
(test/tests/outputs/transferred_scalar_variable/transferred_scalar_variable.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./average_scalar]
family = SCALAR
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
csv = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
[../]
[]
[Transfers]
[./average_transfer]
type = MultiAppPostprocessorToAuxScalarTransfer
from_multi_app = sub
from_postprocessor = average
to_aux_scalar = average_scalar
[../]
[]
(test/tests/transfers/multiapp_nearest_node_transfer/parallel_parent.i)
# This test was introduced for Issue #804 which saw data corruption
# during NearestNodeTransfer when running in parallel
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
parallel_type = replicated
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[from_sub]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 1.0 0.0'
input_files = parallel_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
# Surface to volume data transfer
[from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
variable = from_sub
execute_on = 'timestep_end'
[]
[]
(test/tests/multiapps/relaxation/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
initial_condition = 1
[]
[inverse_v]
initial_condition = 1
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = inverse_v
[]
[]
[AuxKernels]
[invert_v]
type = QuotientAux
variable = inverse_v
denominator = v
numerator = 20.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[Neumann_right]
type = NeumannBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 4
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_abs_tol = 1e-14
[]
[Outputs]
exodus = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = picard_relaxed_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/multiapps/cliargs_from_file/cliargs_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1 # This will be constrained by the multiapp
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
positions_file = positions.txt
cli_args_files = cliargs.txt
type = TransientMultiApp
input_files = 'cliargs_sub.i'
app_type = MooseTestApp
[../]
[]
(test/tests/multiapps/auto_diff_auto_scaling/main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = ADDiffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = right
function = 't'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = 'Newton'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
automatic_scaling = true
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'sub.i'
positions = '0 0 0'
[]
[]
(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/examples/2D_interface_different_submesh/main.i)
# Derived from the example '2D_interface' with the following differences:
#
# 1) The number of y divisions in the sub app is not the same as the master app
# 2) The subapp mesh is skewed in y
# 3) The Functional Expansion order for the flux term was increased to 7
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[Materials]
[./Impervium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.00001 50.0 100.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '7'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
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
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(modules/external_petsc_solver/test/tests/partition/moose_as_parent.i)
[Mesh]
[gmg]
type = DistributedRectilinearMeshGenerator
dim = 2
nx = 20
ny = 21
partition = square
[]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v]
[../]
[pid]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pid_aux]
type = ProcessorIDAux
variable = pid
execute_on = 'INITIAL'
[]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./cf]
type = CoupledForce
coef = 10000
variable = u
v=v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
solve_type = 'PJFNK'
fixed_point_max_its = 10
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[./picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[MultiApps]
[./sub_app]
type = TransientMultiApp
input_files = 'petsc_transient_as_sub.i'
app_type = ExternalPetscSolverApp
library_path = '../../../../external_petsc_solver/lib'
[../]
[]
[Transfers]
[./fromsub]
type = MultiAppShapeEvaluationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[../]
[]
(test/tests/transfers/general_field/nearest_node/nearest_position/main_between_multiapp.i)
# Base input for testing between-multiapp transfers. It has the following complexities:
# - multiapps may not be run with the same number of ranks
# - both nodal and elemental variables
# Tests derived from this input may add or remove complexities through command line arguments
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Positions]
[input_app1]
type = InputPositions
positions = '0 0.1 0
0.5 0.5 0'
[]
[input_app2]
type = InputPositions
# offsets to avoid indetermination
# but small enough to remain below to bounding box factor bump
positions = '0.0000001 0.30000000001 0
0.60000000001 0.5003 0'
[]
[]
# This application uses at most 3 processes
[MultiApps/ma1]
type = TransientMultiApp
input_files = sub_between_diffusion.i
max_procs_per_app = 3
positions_objects = 'input_app1'
output_in_position = true
[]
# This application will use as many processes as the main app
[MultiApps/ma2]
type = TransientMultiApp
input_files = sub_between_diffusion.i
positions_objects = 'input_app2'
output_in_position = true
[]
[Transfers]
# Nodal to nodal variables
[app1_to_2_nodal_nodal]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma1
to_multi_app = ma2
source_variable = sent_nodal
variable = received_nodal
use_nearest_position = input_app1
# slight inflation to avoid floating point issues on borders
bbox_factor = 1.000001
search_value_conflicts = true
group_subapps = true
[]
[app2_to_1_nodal_nodal]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma2
to_multi_app = ma1
source_variable = sent_nodal
variable = received_nodal
use_nearest_position = input_app2
bbox_factor = 1.000001
search_value_conflicts = true
group_subapps = true
[]
# Elemental to elemental variables
[app1_to_2_elem_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma1
to_multi_app = ma2
source_variable = sent_elem
variable = received_elem
use_nearest_position = input_app1
bbox_factor = 1.000001
search_value_conflicts = true
group_subapps = true
[]
[app2_to_1_elem_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma2
to_multi_app = ma1
source_variable = sent_elem
variable = received_elem
use_nearest_position = input_app2
bbox_factor = 1.000001
search_value_conflicts = true
group_subapps = true
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/porous_flow/examples/multiapp_fracture_flow/fracture_diffusion/matrix_app_dirac.i)
# A fracture, which is a 1D line of elements, is embedded in a matrix, which is a 2D surface of elements.
# The meshes conform: all fracture nodes are also matrix nodes (the fracture elements are sides of matrix elements).
#
# The heat equation governs temperature in the fracture and matrix system, and heat energy is transferred between the two using a MultiApp approach
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 2
nx = 20
xmin = 0
xmax = 10.0
ny = 20 # anything less than this produces over/under-shoots
ymin = -2
ymax = 2
[]
[]
[Variables]
[matrix_T]
[]
[]
[Kernels]
[dot]
type = TimeDerivative
variable = matrix_T
[]
[matrix_diffusion]
type = AnisotropicDiffusion
variable = matrix_T
tensor_coeff = '1E-3 0 0 0 1E-3 0 0 0 1E-3'
[]
[]
[DiracKernels]
[heat_from_fracture]
type = ReporterPointSource
variable = matrix_T
value_name = heat_transfer_rate/transferred_joules_per_s
x_coord_name = heat_transfer_rate/x
y_coord_name = heat_transfer_rate/y
z_coord_name = heat_transfer_rate/z
[]
[]
[VectorPostprocessors]
[heat_transfer_rate]
type = ConstantVectorPostprocessor
vector_names = 'transferred_joules_per_s x y z'
value = '0; 0; 0; 0'
outputs = none
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
[]
[Outputs]
print_linear_residuals = false
exodus = false
csv=true
[]
[MultiApps]
[fracture_app]
type = TransientMultiApp
input_files = fracture_app_dirac.i
execute_on = TIMESTEP_BEGIN
[]
[]
[Transfers]
[T_to_fracture]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = fracture_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[heat_from_fracture]
type = MultiAppReporterTransfer
from_multi_app = fracture_app
from_reporters = 'heat_transfer_rate/joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
to_reporters = 'heat_transfer_rate/transferred_joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
[]
[]
(test/tests/transfers/multiapp_postprocessor_interpolation_transfer/radial_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./from_sub]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
positions = '0.2 0.2 0 0.7 0.7 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'sub0.i sub1.i'
[../]
[]
[Transfers]
[./pp_transfer]
postprocessor = average
variable = from_sub
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = sub
interp_type = radial_basis
radius = 1.5
[../]
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/3d_1d_parent.i)
# This does a dummy diffusion solve in 3D space, then computes a layered average
# in the z direction. Those values are transferred into a sub-app that has 1D mesh
# in the z-direction (the mesh was displaced so that it is aligned in such a way).
# The sub-app also does a dummy diffusion solve and then computes layered average
# in the z-direction. Those value are transferred back to the parent app.
#
# Physically the 1D sub-app is placed in the center of the 3D mesh and is oriented
# in the z-direction. The bounding box of the sub-app is expanded such that it
# contains the 4 central elements of the 3D mesh (i.e. the values are transferred
# only into a part of parent mesh)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 4
ny = 4
nz = 10
[]
[AuxVariables]
[./from_sub_app_var]
order = CONSTANT
family = MONOMIAL
[../]
[]
[UserObjects]
[main_uo]
type = LayeredAverage
direction = z
num_layers = 10
variable = u
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = front
value = -1
[]
[right]
type = DirichletBC
variable = u
boundary = back
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 5
solve_type = 'NEWTON'
l_tol = 1e-8
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
execute_on = final
[]
[MultiApps]
[sub_app]
positions = '0.5 0.5 0.0'
type = TransientMultiApp
input_files = 3d_1d_sub.i
app_type = MooseTestApp
bounding_box_padding = '0.25 0.25 0'
bounding_box_inflation = 0
use_displaced_mesh = true
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[layered_transfer_to_sub_app]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = main_uo
variable = sub_app_var
to_multi_app = sub_app
displaced_target_mesh = true
# Cover the whole target mesh from the 1D line
fixed_bounding_box_size = '2.1 2.1 0'
from_app_must_contain_point = false
[]
[layered_transfer_from_sub_app]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = sub_app_uo
variable = from_sub_app_var
from_multi_app = sub_app
displaced_source_mesh = true
fixed_bounding_box_size = '0.25 0.25 0'
from_app_must_contain_point = false
[]
[]
(test/tests/transfers/multiapp_postprocessor_interpolation_transfer/parent_quad.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./pp_aux]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./quad]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.1 0.1 0 0.9 0.1 0 0.1 0.9 0 0.9 0.9 0'
input_files = 'quad_sub1.i quad_sub1.i quad_sub2.i quad_sub2.i'
[../]
[]
[Transfers]
[./sub_to_parent_pp]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = quad
variable = pp_aux
postprocessor = pp
[../]
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/porous_flow.i)
# PorousFlow simulation of injection and production in a 2D aquifer
# Much of this file is standard porous-flow stuff. The unusual aspects are:
# - transfer of the rates of changes of each species (kg/s) to the aquifer_geochemistry.i simulation. This is achieved by saving these changes from the PorousFlowMassTimeDerivative residuals
# - transfer of the temperature field to the aquifer_geochemistry.i simulation
# Interesting behaviour can be simulated by this file without its "parent" simulation, exchanger.i. exchanger.i provides mass-fractions injected via the injection_rate_massfrac_* variables, but since these are more-or-less constant throughout the duration of the exchanger.i simulation, the initial_conditions specified below may be used. Similar, exchanger.i provides injection_temperature, but that is also constant.
injection_rate = -1.0 # kg/s/m, negative because injection as a source
production_rate = 1.0 # kg/s/m
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 14 # for better resolution, use 56 or 112
ny = 8 # for better resolution, use 32 or 64
xmin = -70
xmax = 70
ymin = -40
ymax = 40
[]
[injection_node]
input = gen
type = ExtraNodesetGenerator
new_boundary = injection_node
coord = '-30 0 0'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[f0]
initial_condition = 0.002285946
[]
[f1]
initial_condition = 0.0035252
[]
[f2]
initial_condition = 1.3741E-05
[]
[porepressure]
initial_condition = 2E6
[]
[temperature]
initial_condition = 50
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[]
[]
[BCs]
[injection_temperature]
type = MatchedValueBC
variable = temperature
v = injection_temperature
boundary = injection_node
[]
[]
[DiracKernels]
[inject_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_Na
point_file = injection.bh
variable = f0
[]
[inject_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_Cl
point_file = injection.bh
variable = f1
[]
[inject_SiO2]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_SiO2
point_file = injection.bh
variable = f2
[]
[inject_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_H2O
point_file = injection.bh
variable = porepressure
[]
[produce_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Na
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 0
point_file = production.bh
variable = f0
[]
[produce_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Cl
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 1
point_file = production.bh
variable = f1
[]
[produce_SiO2]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SiO2
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 2
point_file = production.bh
variable = f2
[]
[produce_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H2O
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 3
point_file = production.bh
variable = porepressure
[]
[produce_heat]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_heat
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
use_enthalpy = true
point_file = production.bh
variable = temperature
[]
[]
[UserObjects]
[injected_mass]
type = PorousFlowSumQuantity
[]
[produced_mass_Na]
type = PorousFlowSumQuantity
[]
[produced_mass_Cl]
type = PorousFlowSumQuantity
[]
[produced_mass_SiO2]
type = PorousFlowSumQuantity
[]
[produced_mass_H2O]
type = PorousFlowSumQuantity
[]
[produced_heat]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
execute_on = TIMESTEP_BEGIN
[]
[tot_kg_injected_this_timestep]
type = PorousFlowPlotQuantity
uo = injected_mass
[]
[kg_Na_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Na
[]
[kg_Cl_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Cl
[]
[kg_SiO2_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SiO2
[]
[kg_H2O_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H2O
[]
[mole_rate_Na_produced]
type = FunctionValuePostprocessor
function = moles_Na
indirect_dependencies = 'kg_Na_produced_this_timestep dt'
[]
[mole_rate_Cl_produced]
type = FunctionValuePostprocessor
function = moles_Cl
indirect_dependencies = 'kg_Cl_produced_this_timestep dt'
[]
[mole_rate_SiO2_produced]
type = FunctionValuePostprocessor
function = moles_SiO2
indirect_dependencies = 'kg_SiO2_produced_this_timestep dt'
[]
[mole_rate_H2O_produced]
type = FunctionValuePostprocessor
function = moles_H2O
indirect_dependencies = 'kg_H2O_produced_this_timestep dt'
[]
[heat_joules_extracted_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_heat
[]
[production_temperature]
type = PointValue
point = '30 0 0'
variable = temperature
[]
[]
[Functions]
[moles_Na]
type = ParsedFunction
symbol_names = 'kg_Na dt'
symbol_values = 'kg_Na_produced_this_timestep dt'
expression = 'kg_Na * 1000 / 22.9898 / dt'
[]
[moles_Cl]
type = ParsedFunction
symbol_names = 'kg_Cl dt'
symbol_values = 'kg_Cl_produced_this_timestep dt'
expression = 'kg_Cl * 1000 / 35.453 / dt'
[]
[moles_SiO2]
type = ParsedFunction
symbol_names = 'kg_SiO2 dt'
symbol_values = 'kg_SiO2_produced_this_timestep dt'
expression = 'kg_SiO2 * 1000 / 60.0843 / dt'
[]
[moles_H2O]
type = ParsedFunction
symbol_names = 'kg_H2O dt'
symbol_values = 'kg_H2O_produced_this_timestep dt'
expression = 'kg_H2O * 1000 / 18.0152 / dt'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000
cv = 4000.0
cp = 4000.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
mass_fraction_vars = 'f0 f1 f2'
save_component_rate_in = 'rate_Na rate_Cl rate_SiO2 rate_H2O' # change in kg at every node / dt
fp = the_simple_fluid
temperature_unit = Celsius
[]
[AuxVariables]
[injection_temperature]
initial_condition = 200
[]
[injection_rate_massfrac_Na]
initial_condition = 0.002285946
[]
[injection_rate_massfrac_Cl]
initial_condition = 0.0035252
[]
[injection_rate_massfrac_SiO2]
initial_condition = 1.3741E-05
[]
[injection_rate_massfrac_H2O]
initial_condition = 0.994175112
[]
[rate_H2O]
[]
[rate_Na]
[]
[rate_Cl]
[]
[rate_SiO2]
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[]
[Preconditioning]
active = typically_efficient
[typically_efficient]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = ' hypre boomeramg'
[]
[strong]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm ilu NONZERO 2'
[]
[probably_too_strong]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
dt = 1E5
[]
[Outputs]
exodus = true
[]
[MultiApps]
[react]
type = TransientMultiApp
input_files = aquifer_geochemistry.i
clone_master_mesh = true
execute_on = 'timestep_end'
[]
[]
[Transfers]
[changes_due_to_flow]
type = MultiAppCopyTransfer
source_variable = 'rate_H2O rate_Na rate_Cl rate_SiO2 temperature'
variable = 'pf_rate_H2O pf_rate_Na pf_rate_Cl pf_rate_SiO2 temperature'
to_multi_app = react
[]
[massfrac_from_geochem]
type = MultiAppCopyTransfer
source_variable = 'massfrac_Na massfrac_Cl massfrac_SiO2'
variable = 'f0 f1 f2'
from_multi_app = react
[]
[]
(test/tests/transfers/multiapp_variable_value_sample_transfer/parent_quad.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./parent_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./func]
type = ParsedFunction
expression = x*y*t
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[AuxKernels]
[./func_aux]
type = FunctionAux
variable = parent_aux
function = func
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./quad]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.05 0.05 0 0.95 0.05 0 0.05 0.95 0 0.95 0.95 0'
input_files = quad_sub.i
[../]
[]
[Transfers]
[./parent_to_sub]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = quad
source_variable = parent_aux
postprocessor = pp
[../]
[]
(test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/tosub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
[u]
family = LAGRANGE
order = FIRST
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[u_elemental]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[fun_aux]
type = FunctionAux
function = 'x + y'
variable = u_elemental
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0.48 0.01 0'
input_files = tosub_sub.i
[]
[]
[Transfers]
[to_sub_nodal_to_nodal]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = nodal_source_from_parent_nodal
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[to_sub_nodal_to_elemental]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = nodal_source_from_parent_elemental
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[to_sub_elemental_to_nodal]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u_elemental
variable = elemental_source_from_parent_nodal
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[to_sub_elemental_to_elemental]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u_elemental
variable = elemental_source_from_parent_elemental
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[]
(test/tests/parser/cli_multiapp_single/dt_from_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[MultiApps]
[./sub_app]
positions = '0 0 0 0.5 0.5 0 0.6 0.6 0 0.7 0.7 0'
type = TransientMultiApp
input_files = 'dt_from_parent_sub.i'
app_type = MooseTestApp
[../]
[]
(test/tests/multiapps/restart_multilevel/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
checkpoint = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(test/tests/multiapps/steffensen/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'steffensen'
fixed_point_max_its = 30
transformed_variables = 'u'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
execute_on = 'timestep_begin'
[]
[]
(test/tests/multiapps/multilevel/dt_from_sub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.5 0.5 0'
input_files = dt_from_sub_sub.i
[../]
[]
(test/tests/outputs/perf_graph/multi_app/parent_sub_cycle.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
perf_graph = true
[]
[MultiApps]
[./sub_app]
positions = '0 0 0'
type = TransientMultiApp
input_files = 'sub_sub_cycle.i'
app_type = MooseTestApp
sub_cycling = true
[../]
[]
(tutorials/tutorial02_multiapps/step01_multiapps/05_parent_parallel.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 40
nz = 40
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
perf_graph = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0 1 0 0 2 0 0'
input_files = '05_sub_parallel.i'
[]
[]
(test/tests/multiapps/positions_from_file/dt_from_multi.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1 # This will be constrained by the multiapp
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
positions_file = positions.txt
type = TransientMultiApp
input_files = 'dt_from_multi_sub.i'
app_type = MooseTestApp
[../]
[]
(modules/external_petsc_solver/test/tests/external_petsc_problem/moose_as_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./cf]
type = CoupledForce
coef = 10000
variable = u
v=v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
solve_type = 'PJFNK'
fixed_point_max_its = 10
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[./picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[MultiApps]
[./sub_app]
type = TransientMultiApp
input_files = 'petsc_transient_as_sub.i'
app_type = ExternalPetscSolverApp
library_path = '../../../../external_petsc_solver/lib'
[../]
[]
[Transfers]
[./fromsub]
type = MultiAppShapeEvaluationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[../]
[]
(test/tests/multiapps/picard_multilevel/multilevel_dt_rejection/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[AuxKernels]
[set_v]
type = FunctionAux
variable = v
function = 't'
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[coupled_force]
type = CoupledForce
variable = u
v = v
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
num_steps = 2
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 1
auto_advance = false
[]
[MultiApps]
[sub1]
type = TransientMultiApp
positions = '0 0 0'
input_files = picard_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[u_to_v2]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub1
source_variable = u
variable = v2
[]
[time_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = time
to_postprocessor = parent_time
to_multi_app = sub1
[]
[dt_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = dt
to_postprocessor = parent_dt
to_multi_app = sub1
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[dt]
type = TimestepSize
execute_on = 'timestep_end'
[]
[]
(test/tests/multiapps/picard_multilevel/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[coupled_force]
type = CoupledForce
variable = u
v = v
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 1
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]
[sub1]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[v]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub1
source_variable = v
variable = v
[]
[]
(modules/porous_flow/examples/multiapp_fracture_flow/3dFracture/matrix_app.i)
# 3D matrix app doing thermo-hydro PorousFlow and receiving heat energy via a VectorPostprocessor from the 2D fracture App
[Mesh]
uniform_refine = 0
[generate]
type = GeneratedMeshGenerator
dim = 3
nx = 11
xmin = -10
xmax = 210
ny = 9
ymin = -10
ymax = 160
nz = 11
zmin = -10
zmax = 210
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[matrix_P]
scaling = 1E6
[]
[matrix_T]
initial_condition = 473
[]
[]
[ICs]
[frac_P]
type = FunctionIC
variable = matrix_P
function = insitu_pp
[]
[]
[Functions]
[insitu_pp]
type = ParsedFunction
expression = '10 - 0.847E-2 * z' # Approximate hydrostatic in MPa
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = matrix_P
temperature = matrix_T
fp = water
gravity = '0 0 -9.81E-6' # Note the value, because of pressure_unit
pressure_unit = MPa
[]
[DiracKernels]
[heat_from_fracture]
type = ReporterPointSource
variable = matrix_T
value_name = heat_transfer_rate/transferred_joules_per_s
x_coord_name = heat_transfer_rate/x
y_coord_name = heat_transfer_rate/y
z_coord_name = heat_transfer_rate/z
[]
[]
[FluidProperties]
[water]
type = SimpleFluidProperties # this is largely irrelevant here since we care about heat conduction only
thermal_expansion = 0 # to prevent depressurization as the reservoir is cooled
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1E-3 # small porosity of rock
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-18 0 0 0 1E-18 0 0 0 1E-18'
[]
[internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2700 # kg/m^3
specific_heat_capacity = 800 # rough guess at specific heat capacity
[]
[aq_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '5 0 0 0 5 0 0 0 5'
[]
[]
[VectorPostprocessors]
[heat_transfer_rate]
type = ConstantVectorPostprocessor
vector_names = 'transferred_joules_per_s x y z'
value = '0; 0; 0; 0'
outputs = none
[]
[]
[AuxVariables]
[normal_thermal_conductivity]
family = MONOMIAL
order = CONSTANT
[]
[fracture_normal_x]
family = MONOMIAL
order = CONSTANT
initial_condition = 0
[]
[fracture_normal_y]
family = MONOMIAL
order = CONSTANT
initial_condition = 1
[]
[fracture_normal_z]
family = MONOMIAL
order = CONSTANT
initial_condition = 0
[]
[element_normal_length]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[normal_thermal_conductivity_auxk]
type = ConstantAux
variable = normal_thermal_conductivity
value = 5 # very simple in this case
[]
[element_normal_length_auxk]
type = PorousFlowElementLength
variable = element_normal_length
direction = 'fracture_normal_x fracture_normal_y fracture_normal_z'
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
growth_factor = 1.1
optimal_iterations = 4
[]
dtmax = 1E8
end_time = 1E8
nl_abs_tol = 1E-2
[]
[Outputs]
print_linear_residuals = false
exodus = false
[]
[MultiApps]
[fracture_app]
type = TransientMultiApp
input_files = fracture_only_aperture_changing.i
cli_args = 'Outputs/ex/sync_only=false'
execute_on = TIMESTEP_BEGIN
sub_cycling = true
### catch_up = true
### max_catch_up_steps = 100
[]
[]
[Transfers]
[element_normal_length_to_fracture]
type = MultiAppNearestNodeTransfer
to_multi_app = fracture_app
source_variable = element_normal_length
variable = enclosing_element_normal_length
[]
[element_normal_thermal_cond_to_fracture]
type = MultiAppNearestNodeTransfer
to_multi_app = fracture_app
source_variable = normal_thermal_conductivity
variable = enclosing_element_normal_thermal_cond
[]
[T_to_fracture]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = fracture_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[normal_x_from_fracture]
type = MultiAppNearestNodeTransfer
from_multi_app = fracture_app
source_variable = normal_dirn_x
variable = fracture_normal_x
[]
[normal_y_from_fracture]
type = MultiAppNearestNodeTransfer
from_multi_app = fracture_app
source_variable = normal_dirn_y
variable = fracture_normal_y
[]
[normal_z_from_fracture]
type = MultiAppNearestNodeTransfer
from_multi_app = fracture_app
source_variable = normal_dirn_z
variable = fracture_normal_z
[]
[heat_from_fracture]
type = MultiAppReporterTransfer
from_multi_app = fracture_app
from_reporters = 'heat_transfer_rate/joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
to_reporters = 'heat_transfer_rate/transferred_joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
[]
[]
(modules/porous_flow/examples/multiapp_fracture_flow/fracture_diffusion/matrix_app_nonconforming.i)
# A fracture, which is a 1D line of elements, is embedded in a matrix, which is a 2D surface of elements.
# The meshes conform: all fracture nodes are also matrix nodes (the fracture elements are sides of matrix elements).
#
# The heat equation governs temperature in the fracture and matrix system, and heat energy is transferred between the two using a MultiApp approach
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 2
nx = 20
xmin = 0
xmax = 10.0
ny = 20
ymin = -1.9
ymax = 2.1
[]
[]
[Variables]
[matrix_T]
[]
[]
[Kernels]
[dot]
type = TimeDerivative
variable = matrix_T
[]
[matrix_diffusion]
type = AnisotropicDiffusion
variable = matrix_T
tensor_coeff = '1E-3 0 0 0 1E-3 0 0 0 1E-3'
[]
[]
[DiracKernels]
[heat_from_fracture]
type = ReporterPointSource
variable = matrix_T
value_name = heat_transfer_rate/transferred_joules_per_s
x_coord_name = heat_transfer_rate/x
y_coord_name = heat_transfer_rate/y
z_coord_name = heat_transfer_rate/z
[]
[]
[VectorPostprocessors]
[heat_transfer_rate]
type = ConstantVectorPostprocessor
vector_names = 'transferred_joules_per_s x y z'
value = '0; 0; 0; 0'
outputs = none
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
[]
[Outputs]
print_linear_residuals = false
exodus = false
[]
[MultiApps]
[fracture_app]
type = TransientMultiApp
input_files = fracture_app_dirac.i
cli_args = 'Kernels/toMatrix/transfer_coefficient=0.01'
execute_on = TIMESTEP_BEGIN
[]
[]
[Transfers]
[T_to_fracture]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = fracture_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[heat_from_fracture]
type = MultiAppReporterTransfer
from_multi_app = fracture_app
from_reporters = 'heat_transfer_rate/joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
to_reporters = 'heat_transfer_rate/transferred_joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
[]
[]
(test/tests/transfers/multiapp_copy_transfer/aux_to_aux/to_sub.i)
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = sub.i
[]
[Transfers/from_sub]
type = MultiAppCopyTransfer
to_multi_app = sub
source_variable = x
variable = aux
[]
[AuxVariables/x]
initial_condition = 1949
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
execute_on = 'FINAL'
exodus = true
[]
(tutorials/tutorial02_multiapps/step02_transfers/01_parent_meshfunction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[tv]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = '01_sub_meshfunction.i'
[]
[]
[Transfers]
[pull_v]
type = MultiAppShapeEvaluationTransfer
# Transfer from the sub-app to this app
from_multi_app = sub_app
# The name of the variable in the sub-app
source_variable = v
# The name of the auxiliary variable in this app
variable = tv
[]
[push_u]
type = MultiAppShapeEvaluationTransfer
# Transfer to the sub-app from this app
to_multi_app = sub_app
# The name of the variable in this app
source_variable = u
# The name of the auxiliary variable in the sub-app
variable = tu
[]
[]
(test/tests/multiapps/picard_failure/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[]
[Outputs]
exodus = true
[]
[MultiApps]
active = 'sub' # will be modified by CLI overrides
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
[]
[sub_no_fail]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub_no_fail.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/multiapps/reset/multilevel_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0'
input_files = multilevel_sub_sub.i
output_in_position = true
[../]
[]
(test/tests/transfers/multiapp_postprocessor_transfer/between_multiapp/main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.01
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 5
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
[]
[MultiApps]
[pp_sub_0]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub0.i
[]
[pp_sub_1]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub1.i
[]
[]
[Transfers]
[pp_transfer_1]
type = MultiAppPostprocessorTransfer
from_multi_app = pp_sub_0
to_multi_app = pp_sub_1
from_postprocessor = average_0
to_postprocessor = from_0
[]
[pp_transfer_2]
type = MultiAppPostprocessorTransfer
from_multi_app = pp_sub_1
to_multi_app = pp_sub_0
from_postprocessor = average_1
to_postprocessor = from_1
[]
[]
(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
[../]
[]
(test/tests/transfers/multiapp_variable_value_sample_transfer/parent_fv.i)
[Mesh]
type = GeneratedMesh
dim = 2
# Yes we want a slightly irregular grid
nx = 11
ny = 11
# We will transfer data to the sub app, and that is currently only
# supported from a replicated mesh
parallel_type = replicated
[]
[Variables]
[u]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = 1
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FVDirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub.i
[]
[pp_sub]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = pp_sub.i
[]
[]
[Transfers]
[sample_transfer]
source_variable = u
variable = from_parent
type = MultiAppVariableValueSampleTransfer
to_multi_app = sub
[]
[sample_pp_transfer]
source_variable = u
postprocessor = from_parent
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = pp_sub
[]
[]
[Problem]
parallel_barrier_messaging = false
[]
(test/tests/multiapps/picard/picard_rel_tol_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
fixed_point_max_its = 10
fixed_point_rel_tol = 1e-7
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/transfers/multiapp_reporter_transfer/clone_type.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Reporters]
[receiver]
type = ConstantReporter
[]
[]
[MultiApps]
[multi_reporter]
type = TransientMultiApp
input_files = 'sub0.i sub0.i sub0.i sub0.i'
positions = '0 0 0
0 0 0
0 0 0
0 0 0'
cli_args = 'Postprocessors/from_sub_pp/default=3.1415926;Reporters/from_sub_rep/integer_values=10;Reporters/from_sub_rep/string_values=ten;Outputs/active=""
Postprocessors/from_sub_pp/default=1.5707963;Reporters/from_sub_rep/integer_values=11;Reporters/from_sub_rep/string_values=twenty;Outputs/active=""
Postprocessors/from_sub_pp/default=1.0471975;Reporters/from_sub_rep/integer_values=12;Reporters/from_sub_rep/string_values=thirty;Outputs/active=""
Postprocessors/from_sub_pp/default=0.7853981;Reporters/from_sub_rep/integer_values=13;Reporters/from_sub_rep/string_values=forty;Outputs/active=""'
max_procs_per_app = 1
[]
[]
[Transfers]
[multi_rep]
type = MultiAppCloneReporterTransfer
from_reporters = 'from_sub_pp/value from_sub_rep/int from_sub_rep/str'
to_reporter = receiver
from_multi_app = multi_reporter
reporter_type = 'real integer string'
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/restart/restart_transient_from_transient/pseudo_trans_with_2subs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = 'replicated'
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 50
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
end_time = 20
dt = 2.0
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0
0.5 0 0'
input_files = pseudo_trans_with_2subs_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppProjectionTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppGeometricInterpolationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
checkpoint = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(test/tests/multiapps/picard_catch_up/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = 'v'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
preset = false
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
preset = false
boundary = 'right'
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub.i'
max_catch_up_steps = 100
max_failures = 100
catch_up = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/multiapps/sub_cycling/parent_iteration_adaptive.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0 0 0 0'
input_files = sub.i
sub_cycling = true
[../]
[]
(test/tests/multiapps/sub_cycling/parent_short.i)
# The parent app will do 4 timesteps, while sub app only 2. This tests that the sub app will not
# do anything during the inactive period.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
end_time = 0.4
dt = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub_short.i
sub_cycling = true
[../]
[]
(test/tests/transfers/multiapp_postprocessor_to_scalar/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.01
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 5
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
[MultiApps]
[pp_sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
input_files = sub.i
[]
[]
[Transfers]
[pp_transfer]
type = MultiAppPostprocessorToAuxScalarTransfer
to_multi_app = pp_sub
from_postprocessor = average
to_aux_scalar = from_parent_app
[]
[]
(test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/between_multiapp/main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.01
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
[]
[MultiApps]
[pp_sub_0]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub0.i
[]
[pp_sub_1]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub1.i
[]
[]
[Transfers]
[pp_transfer_1]
type = MultiAppScalarToAuxScalarTransfer
from_multi_app = pp_sub_0
to_multi_app = pp_sub_1
source_variable = base_0
to_aux_scalar = from_0
[]
[pp_transfer_2]
type = MultiAppScalarToAuxScalarTransfer
from_multi_app = pp_sub_1
to_multi_app = pp_sub_0
source_variable = base_1
to_aux_scalar = from_1
[]
[]
(test/tests/positions/creating_multiapps/apps_from_positions.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dx = 1
dim = 1
[]
[]
[AuxVariables]
[u]
[]
[]
[Positions]
[input]
type = InputPositions
positions = '0 1 0
1 0 2'
outputs = none
[]
[file]
type = FilePositions
files = '../../multiapps/positions_from_file/positions.txt'
outputs = none
[]
[reporter_forward]
type = ReporterPositions
reporters = 'file/positions_1d'
outputs = none
[]
[mesh]
type = ElementCentroidPositions
outputs = none
[]
[results_m1]
type = MultiAppPositions
multiapps = 'm1'
[]
[results_m2]
type = MultiAppPositions
multiapps = 'm2'
[]
[results_m3]
type = MultiAppPositions
multiapps = 'm3'
[]
[results_m4]
type = MultiAppPositions
multiapps = 'm4'
[]
[]
[MultiApps]
[m1]
type = FullSolveMultiApp
input_files = 'apps_from_positions.i'
cli_args = "MultiApps/active='';Positions/active='';Outputs/active=''"
positions_objects = input
[]
[m2]
type = FullSolveMultiApp
input_files = 'apps_from_positions.i'
cli_args = "MultiApps/active='';Positions/active='';Outputs/active=''"
positions_objects = 'input file'
[]
# Those Positions are executed too late
[m3]
type = TransientMultiApp
input_files = 'apps_from_positions.i'
cli_args = "MultiApps/active='';Positions/active='';Outputs/active=''"
positions_objects = reporter_forward
[]
[m4]
type = TransientMultiApp
input_files = 'apps_from_positions.i'
cli_args = "MultiApps/active='';Positions/active='';Outputs/active=''"
positions_objects = mesh
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
execute_on = FINAL
execute_system_information_on = none
[]
[]
(test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/fromsub_target_displaced.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
displacements = 'x_disp y_disp'
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./transferred_u]
[../]
[./elemental_transferred_u]
order = CONSTANT
family = MONOMIAL
[../]
[./x_disp]
initial_condition = -0.1
[../]
[./y_disp]
initial_condition = -0.1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
positions = '.099 .099 0 .599 .599 0 0.599 0.099 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = fromsub_sub.i
[../]
[]
[Transfers]
[./from_sub]
source_variable = sub_u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
displaced_target_mesh = true
[../]
[./elemental_from_sub]
source_variable = sub_u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
displaced_target_mesh = true
[../]
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/exchanger.i)
# Model of the heat-exchanger
# The input fluid to the heat exchanger is determined by AuxVariables called production_temperature, production_rate_Na, production_rate_Cl, production_rate_SiO2 and production_rate_H2O. These come from Postprocessors in the porous-flow simulation that measure the fluid composition at the production well.
# Given the input fluid, the exchanger cools/heats the fluid, removing any precipitates, and injects fluid back to the porous-flow simulation at temperature output_temperature and composition given by massfrac_Na, etc.
# In the absence of data concerning Quartz precipitation rates in heat exchangers, do not treat Quartz as kinetic
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[TimeDependentReactionSolver]
model_definition = definition
include_moose_solve = false
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
swap_out_of_basis = "SiO2(aq)"
swap_into_basis = "QuartzLike"
constraint_species = "H2O Na+ Cl- QuartzLike"
constraint_value = " 1.0E-2 0.1E-2 0.1E-2 1E-10"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_mineral"
constraint_unit = " kg moles moles moles"
initial_temperature = 50.0
mode = 4
temperature = 200
cold_temperature = 40.0
source_species_names = 'H2O Na+ Cl- SiO2(aq)'
source_species_rates = 'production_rate_H2O production_rate_Na production_rate_Cl production_rate_SiO2'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
add_aux_pH = false # there is no H+ in this system
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
execute_console_output_on = '' # only CSV output used in this example
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "small_database.json"
basis_species = "H2O SiO2(aq) Na+ Cl-"
equilibrium_minerals = "QuartzLike"
[]
[]
[Executioner]
type = Transient
dt = 1E5
end_time = 2E6 #7.76E6 # 90 days
[]
[AuxVariables]
[production_temperature]
initial_condition = 50 # the production_T Transfer lags one timestep behind for some reason, so give this a reasonable initial condition
[]
[transported_H2O]
[]
[transported_Na]
[]
[transported_Cl]
[]
[transported_SiO2]
[]
[transported_mass]
[]
[massfrac_H2O]
[]
[massfrac_Na]
[]
[massfrac_Cl]
[]
[massfrac_SiO2]
[]
[dumped_quartz]
[]
[production_rate_H2O]
initial_condition = 5.518533e+01 # the production_H2O Transfer lags one timestep behind for some reason (when the porous_flow simulation has finished, it correctly computes mole_rate_H2O_produced, but the Transfer gets the mole_rate_H2O_produced from the previous timestep), so give this a reasonable initial condition, otherwise this will be zero at the start of the simulation!
[]
[production_rate_Na]
initial_condition = 9.943302e-02
[]
[production_rate_Cl]
initial_condition = 9.943302e-02
[]
[production_rate_SiO2]
initial_condition = 2.340931e-04
[]
[]
[AuxKernels]
[transported_H2O_auxk]
type = GeochemistryQuantityAux
variable = transported_H2O
species = H2O
quantity = transported_moles_in_original_basis
[]
[transported_Na]
type = GeochemistryQuantityAux
variable = transported_Na
species = Na+
quantity = transported_moles_in_original_basis
[]
[transported_Cl]
type = GeochemistryQuantityAux
variable = transported_Cl
species = Cl-
quantity = transported_moles_in_original_basis
[]
[transported_SiO2]
type = GeochemistryQuantityAux
variable = transported_SiO2
species = 'SiO2(aq)'
quantity = transported_moles_in_original_basis
[]
[transported_mass_auxk]
type = ParsedAux
coupled_variables = 'transported_H2O transported_Na transported_Cl transported_SiO2'
variable = transported_mass
expression = 'transported_H2O * 18.0152 + transported_Na * 22.9898 + transported_Cl * 35.453 + transported_SiO2 * 60.0843'
[]
[massfrac_H2O]
type = ParsedAux
coupled_variables = 'transported_mass transported_H2O'
variable = massfrac_H2O
expression = '18.0152 * transported_H2O / transported_mass'
[]
[massfrac_Na]
type = ParsedAux
coupled_variables = 'transported_mass transported_Na'
variable = massfrac_Na
expression = '22.9898 * transported_Na / transported_mass'
[]
[massfrac_Cl]
type = ParsedAux
coupled_variables = 'transported_mass transported_Cl'
variable = massfrac_Cl
expression = '35.453 * transported_Cl / transported_mass'
[]
[massfrac_SiO2]
type = ParsedAux
coupled_variables = 'transported_mass transported_SiO2'
variable = massfrac_SiO2
expression = '60.0843 * transported_SiO2 / transported_mass'
[]
[dumped_quartz]
type = GeochemistryQuantityAux
variable = dumped_quartz
species = QuartzLike
quantity = moles_dumped
[]
[]
[Postprocessors]
[cumulative_moles_precipitated_quartz]
type = PointValue
variable = dumped_quartz
[]
[production_temperature]
type = PointValue
variable = production_temperature
[]
[mass_heated_this_timestep]
type = PointValue
variable = transported_mass
[]
[]
[Outputs]
csv = true
[]
[MultiApps]
[porous_flow_sim]
type = TransientMultiApp
input_files = porous_flow.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[injection_T]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'solution_temperature'
variable = 'injection_temperature'
[]
[injection_Na]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Na'
variable = 'injection_rate_massfrac_Na'
[]
[injection_Cl]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Cl'
variable = 'injection_rate_massfrac_Cl'
[]
[injection_SiO2]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_SiO2'
variable = 'injection_rate_massfrac_SiO2'
[]
[injection_H2O]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_H2O'
variable = 'injection_rate_massfrac_H2O'
[]
[production_T]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = production_temperature
variable = production_temperature
[]
[production_Na]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Na_produced
variable = production_rate_Na
[]
[production_Cl]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Cl_produced
variable = production_rate_Cl
[]
[production_SiO2]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_SiO2_produced
variable = production_rate_SiO2
[]
[production_H2O]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_H2O_produced
variable = production_rate_H2O
[]
[]
(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
[../]
[]
(test/tests/transfers/multiapp_nearest_node_transfer/tosub_displaced_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0.48 0 0'
input_files = tosub_displaced_sub.i
[]
[]
[Transfers]
[to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = from_parent
displaced_target_mesh = true
[]
[elemental_to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = elemental_from_parent
displaced_target_mesh = true
[]
[]
(tutorials/tutorial02_multiapps/step01_multiapps/04_parent_multiple.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0 1 0 0 2 0 0'
# positions_file = 04_positions.txt
input_files = '04_sub1_multiple.i'
# input_files = '04_sub1_multiple.i 04_sub2_multiple.i 04_sub3_multiple.i'
# output_in_position = true
[]
[]
(test/tests/parser/cli_multiapp_all/dt_from_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[MultiApps]
[./sub_left]
positions = '0 0 0 0.5 0.5 0 0.6 0.6 0 0.7 0.7 0'
type = TransientMultiApp
input_files = 'dt_from_parent_sub.i'
app_type = MooseTestApp
[../]
[./sub_right]
positions = '0 0 0 0.5 0.5 0 0.6 0.6 0 0.7 0.7 0'
type = TransientMultiApp
input_files = 'dt_from_parent_sub.i'
app_type = MooseTestApp
[../]
[]
(modules/functional_expansion_tools/examples/2D_interface_no_material/main.i)
# Derived from the example '2D_interface' with the following differences:
#
# 1) No materials are used
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = 0.1
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = 0.1
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
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
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(tutorials/tutorial02_multiapps/step01_multiapps/02_parent_sublimit.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = '02_sub_sublimit.i'
[]
[]
(modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/parent_non_overlapping.i)
# inlet temperature
T_in = 523.0
mdot = 10
pout = 7e6
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1.5
xmax = 1.5
ymin = -1.5
ymax = 1.5
zmin = 0
zmax = 10
nx = 3
ny = 3
nz = 10
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
[]
[]
[Postprocessors]
[core_outlet_pressure]
type = Receiver
default = ${pout}
[]
[core_inlet_mdot]
type = Receiver
default = ${mdot}
[]
[core_inlet_temperature]
type = Receiver
default = ${T_in}
[]
[core_inlet_pressure]
type = FunctionValuePostprocessor
function = compute_inlet_pressure_fn
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_outlet_mdot]
type = ScalePostprocessor
value = core_inlet_mdot
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[bypass_mdot]
type = Receiver
[]
[inlet_mdot]
type = Receiver
[]
[outlet_mdot]
type = Receiver
[]
[core_outlet_temperature]
type = FunctionValuePostprocessor
function = compute_outlet_temperature_fn
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_pressure_drop]
type = DifferencePostprocessor
value1 = core_inlet_pressure
value2 = core_outlet_pressure
[]
[]
[Functions]
[compute_outlet_temperature_fn]
type = ParsedFunction
symbol_values = 'core_inlet_mdot core_inlet_temperature 1000'
symbol_names = 'mdot Tin Q'
expression = 'Tin + Q / mdot'
[]
[compute_inlet_pressure_fn]
type = ParsedFunction
symbol_values = 'core_inlet_mdot core_outlet_pressure 5000'
symbol_names = 'mdot pout C'
expression = 'pout + C * mdot'
[]
[]
[MultiApps]
[thm]
type = TransientMultiApp
input_files = thm_non_overlapping.i
sub_cycling = true
max_procs_per_app = 1
print_sub_cycles = false
[]
[]
[Transfers]
#### thm Transfers ####
## transfers from thm
[core_inlet_mdot]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_inlet_mdot
to_postprocessor = core_inlet_mdot
reduction_type = maximum
from_multi_app = thm
[]
[core_inlet_temperature]
type = MultiAppPostprocessorTransfer
to_postprocessor = core_inlet_temperature
from_postprocessor = core_inlet_temperature
reduction_type = maximum
from_multi_app = thm
[]
[core_outlet_pressure]
type = MultiAppPostprocessorTransfer
to_postprocessor = core_outlet_pressure
from_postprocessor = core_outlet_pressure
reduction_type = maximum
from_multi_app = thm
[]
[bypass_mdot]
type = MultiAppPostprocessorTransfer
to_postprocessor = bypass_mdot
from_postprocessor = bypass_mdot
reduction_type = maximum
from_multi_app = thm
[]
[inlet_mdot]
type = MultiAppPostprocessorTransfer
to_postprocessor = inlet_mdot
from_postprocessor = inlet_mdot
reduction_type = maximum
from_multi_app = thm
[]
[outlet_mdot]
type = MultiAppPostprocessorTransfer
to_postprocessor = outlet_mdot
from_postprocessor = outlet_mdot
reduction_type = maximum
from_multi_app = thm
[]
## transfers to thm
[core_outlet_mdot]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_outlet_mdot
to_postprocessor = core_outlet_mdot
to_multi_app = thm
[]
[core_outlet_temperature]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_outlet_temperature
to_postprocessor = core_outlet_temperature
to_multi_app = thm
[]
[core_inlet_pressure]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_inlet_pressure
to_postprocessor = core_inlet_pressure
to_multi_app = thm
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_copy_transfer/block_restriction/bi_direction.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 2
nx = 4
ny = 4
# Designed to have non-complete overlap
subdomain_ids = '1 1 1 1
2 2 2 1
1 2 2 1
1 1 2 1'
[]
[]
[Variables]
[to_sub]
family = MONOMIAL
order = CONSTANT
initial_condition = 1
[]
[from_sub]
family = MONOMIAL
order = CONSTANT
initial_condition = 2
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 2
[]
[MultiApps]
[sub]
type = TransientMultiApp
input_files = sub.i
[]
[]
[Transfers]
[to_sub]
type = MultiAppCopyTransfer
source_variable = to_sub
variable = from_main
to_multi_app = sub
[]
[from_sub]
type = MultiAppCopyTransfer
source_variable = to_main
variable = from_sub
from_multi_app = sub
[]
[]
[Outputs]
exodus = true
[]
(python/chigger/tests/input/multiapps.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
[]
[MultiApps]
[./sub]
app_type = MooseTestApp
type = TransientMultiApp
input_files = sub.i
output_in_position = true
positions = '0 0 0
0 0 0.25
0 0 0.5
0 0 0.75
0 0 1'
[../]
[]
(test/tests/transfers/general_field/nearest_node/between_siblings/main_between_multiapp.i)
# Base input for testing between-multiapp transfers. It has the following complexities:
# - multiapps may not be run with the same number of ranks
# - both nodal and elemental variables
# - transfers between mixes of nodal and elemental variables
# Tests derived from this input may add or remove complexities through command line arguments
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
[]
# This application use at most 3 processes
[MultiApps/ma1]
type = TransientMultiApp
input_files = sub_between_diffusion1.i
max_procs_per_app = 3
[]
# This application will use as many processes as the main app
[MultiApps/ma2]
type = TransientMultiApp
input_files = sub_between_diffusion2.i
[]
[Transfers]
# Nodal to nodal variables
[app1_to_2_nodal_nodal]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma1
to_multi_app = ma2
source_variable = sent_nodal
variable = received_nodal
[]
[app2_to_1_nodal_nodal]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma2
to_multi_app = ma1
source_variable = sent_nodal
variable = received_nodal
[]
# Elemental to elemental variables
[app1_to_2_elem_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma1
to_multi_app = ma2
source_variable = sent_elem
variable = received_elem
[]
[app2_to_1_elem_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma2
to_multi_app = ma1
source_variable = sent_elem
variable = received_elem
[]
# Elemental to nodal variables
[app1_to_2_elem_nodal]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma1
to_multi_app = ma2
source_variable = sent_elem
variable = received_nodal
[]
[app2_to_1_elem_nodal]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma2
to_multi_app = ma1
source_variable = sent_elem
variable = received_nodal
[]
# Nodal to elemental variables
[app1_to_2_nodal_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma1
to_multi_app = ma2
source_variable = sent_nodal
variable = received_elem
[]
[app2_to_1_nodal_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = ma2
to_multi_app = ma1
source_variable = sent_nodal
variable = received_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/exchanger_un_quartz.i)
# Model of the heat-exchanger
# The input fluid to the heat exchanger is determined by AuxVariables called production_temperature, production_rate_Na, production_rate_Cl, production_rate_SiO2 and production_rate_H2O. These come from Postprocessors in the porous-flow simulation that measure the fluid composition at the production well.
# Given the input fluid, the exchanger cools/heats the fluid, removing any precipitates, and injects fluid back to the porous-flow simulation at temperature output_temperature and composition given by massfrac_Na, etc.
# In the absence of data concerning Quartz precipitation rates in heat exchangers, do not treat Quartz as kinetic
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[TimeDependentReactionSolver]
model_definition = definition
include_moose_solve = false
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
swap_out_of_basis = "SiO2(aq)"
swap_into_basis = "QuartzUnlike"
constraint_species = "H2O Na+ Cl- QuartzUnlike"
constraint_value = " 1.0E-2 0.1E-2 0.1E-2 1E-10"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_mineral"
constraint_unit = " kg moles moles moles"
initial_temperature = 50.0
mode = 4
temperature = 200
cold_temperature = 40.0
source_species_names = 'H2O Na+ Cl- SiO2(aq)'
source_species_rates = 'production_rate_H2O production_rate_Na production_rate_Cl production_rate_SiO2'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
add_aux_pH = false # there is no H+ in this system
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
execute_console_output_on = '' # only CSV output used in this example
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "small_database.json"
basis_species = "H2O SiO2(aq) Na+ Cl-"
equilibrium_minerals = "QuartzUnlike"
[]
[]
[Executioner]
type = Transient
dt = 1E5
end_time = 2E6 #7.76E6 # 90 days
[]
[AuxVariables]
[production_temperature]
initial_condition = 50 # the production_T Transfer lags one timestep behind for some reason, so give this a reasonable initial condition
[]
[transported_H2O]
[]
[transported_Na]
[]
[transported_Cl]
[]
[transported_SiO2]
[]
[transported_mass]
[]
[massfrac_H2O]
[]
[massfrac_Na]
[]
[massfrac_Cl]
[]
[massfrac_SiO2]
[]
[dumped_quartz]
[]
[production_rate_H2O]
initial_condition = 5.518533e+01 # the production_H2O Transfer lags one timestep behind for some reason (when the porous_flow simulation has finished, it correctly computes mole_rate_H2O_produced, but the Transfer gets the mole_rate_H2O_produced from the previous timestep), so give this a reasonable initial condition, otherwise this will be zero at the start of the simulation!
[]
[production_rate_Na]
initial_condition = 9.943302e-02
[]
[production_rate_Cl]
initial_condition = 9.943302e-02
[]
[production_rate_SiO2]
initial_condition = 2.340931e-04
[]
[]
[AuxKernels]
[transported_H2O]
type = GeochemistryQuantityAux
variable = transported_H2O
species = H2O
quantity = transported_moles_in_original_basis
[]
[transported_Na]
type = GeochemistryQuantityAux
variable = transported_Na
species = Na+
quantity = transported_moles_in_original_basis
[]
[transported_Cl]
type = GeochemistryQuantityAux
variable = transported_Cl
species = Cl-
quantity = transported_moles_in_original_basis
[]
[transported_SiO2]
type = GeochemistryQuantityAux
variable = transported_SiO2
species = 'SiO2(aq)'
quantity = transported_moles_in_original_basis
[]
[transported_mass]
type = ParsedAux
coupled_variables = 'transported_H2O transported_Na transported_Cl transported_SiO2'
variable = transported_mass
expression = 'transported_H2O * 18.0152 + transported_Na * 22.9898 + transported_Cl * 35.453 + transported_SiO2 * 60.0843'
[]
[massfrac_H2O]
type = ParsedAux
coupled_variables = 'transported_mass transported_H2O'
variable = massfrac_H2O
expression = '18.0152 * transported_H2O / transported_mass'
[]
[massfrac_Na]
type = ParsedAux
coupled_variables = 'transported_mass transported_Na'
variable = massfrac_Na
expression = '22.9898 * transported_Na / transported_mass'
[]
[massfrac_Cl]
type = ParsedAux
coupled_variables = 'transported_mass transported_Cl'
variable = massfrac_Cl
expression = '35.453 * transported_Cl / transported_mass'
[]
[massfrac_SiO2]
type = ParsedAux
coupled_variables = 'transported_mass transported_SiO2'
variable = massfrac_SiO2
expression = '60.0843 * transported_SiO2 / transported_mass'
[]
[dumped_quartz]
type = GeochemistryQuantityAux
variable = dumped_quartz
species = QuartzUnlike
quantity = moles_dumped
[]
[]
[Postprocessors]
[cumulative_moles_precipitated_quartz]
type = PointValue
variable = dumped_quartz
[]
[production_temperature]
type = PointValue
variable = production_temperature
[]
[mass_heated_this_timestep]
type = PointValue
variable = transported_mass
[]
[]
[Outputs]
csv = true
[]
[MultiApps]
[porous_flow_sim]
type = TransientMultiApp
input_files = porous_flow.i
cli_args = 'MultiApps/react/input_files=aquifer_un_quartz_geochemistry.i'
execute_on = 'timestep_end'
[]
[]
[Transfers]
[injection_T]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'solution_temperature'
variable = 'injection_temperature'
[]
[injection_Na]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Na'
variable = 'injection_rate_massfrac_Na'
[]
[injection_Cl]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Cl'
variable = 'injection_rate_massfrac_Cl'
[]
[injection_SiO2]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_SiO2'
variable = 'injection_rate_massfrac_SiO2'
[]
[injection_H2O]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_H2O'
variable = 'injection_rate_massfrac_H2O'
[]
[production_T]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = production_temperature
variable = production_temperature
[]
[production_Na]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Na_produced
variable = production_rate_Na
[]
[production_Cl]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Cl_produced
variable = production_rate_Cl
[]
[production_SiO2]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_SiO2_produced
variable = production_rate_SiO2
[]
[production_H2O]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_H2O_produced
variable = production_rate_H2O
[]
[]
(test/tests/multiapps/restart_multilevel/parent2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
[Problem]
restart_file_base = parent_out_cp/0005
[]
(test/tests/transfers/multiapp_interpolation_transfer/tosub_parent.i)
###########################################################
# This is a test of the Transfer System. This test
# uses the Multiapp System to solve independent problems
# related geometrically. Solutions are then interpolated
# and transferred to a non-aligned domain.
#
# @Requirement F7.20
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = .21
xmax = .79
displacements = 'disp_x disp_y'
# The MultiAppGeometricInterpolationTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./disp_x]
initial_condition = 0.4
[../]
[./disp_y]
[../]
[./elemental]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./x_func]
type = ParsedFunction
expression = x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./x_func_aux]
type = FunctionAux
variable = elemental
function = x_func
execute_on = initial
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0.2 0 0'
input_files = tosub_sub.i
[../]
[]
[Transfers]
[./tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = from_parent
[../]
[./elemental_tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = elemental_from_parent
[../]
[./radial_tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = radial_from_parent
interp_type = radial_basis
[../]
[./radial_elemental_tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = radial_elemental_from_parent
interp_type = radial_basis
[../]
[./displaced_target_tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = displaced_target_from_parent
displaced_target_mesh = true
[../]
[./displaced_source_tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = displaced_source_from_parent
displaced_source_mesh = true
[../]
[./elemental_to_sub_elemental]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = elemental
variable = elemental_from_parent_elemental
[../]
[./elemental_to_sub_nodal]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = elemental
variable = nodal_from_parent_elemental
[../]
[]
(test/tests/transfers/multiapp_mesh_function_transfer/tosub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
positions = '.1 .1 0 0.6 0.6 0 0.6 0.1 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = tosub_sub.i
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
source_variable = u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
[]
[elemental_to_sub]
source_variable = u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
[]
[]
(test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/exec_on_mismatch.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[transferred_u]
[]
[elemental_transferred_u]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
positions = '.099 .099 0 .599 .599 0 0.599 0.099 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = fromsub_sub.i
execute_on = 'initial timestep_begin'
[]
[]
[Transfers]
[from_sub]
source_variable = sub_u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
execute_on = 'initial timestep_end'
[]
[elemental_from_sub]
source_variable = sub_u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
[]
[]
(test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/from_sub/parent_wrong_order.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[./a]
family = SCALAR
order = SIXTH
[../]
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy]
type = Diffusion
variable = dummy
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[MultiApps]
[./sub]
type = TransientMultiApp
positions = '0 0 0'
input_files = 'sub_wrong_order.i'
[../]
[]
[Transfers]
[./from_sub]
type = MultiAppScalarToAuxScalarTransfer
from_multi_app = sub
source_variable = 'b'
to_aux_scalar = 'a'
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_mesh_function_transfer/fromsub_target_displaced.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
displacements = 'x_disp y_disp'
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[transferred_u]
[]
[elemental_transferred_u]
order = CONSTANT
family = MONOMIAL
[]
[x_disp]
initial_condition = -0.1
[]
[y_disp]
initial_condition = -0.1
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
positions = '.099 .099 0 .599 .599 0 0.599 0.099 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = fromsub_sub.i
[]
[]
[Transfers]
[from_sub]
source_variable = sub_u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
displaced_target_mesh = true
[]
[elemental_from_sub]
source_variable = sub_u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
displaced_target_mesh = true
[]
[]
(test/tests/multiapps/picard_multilevel/fullsolve_multilevel/sub_level1.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[w]
[]
[]
[Kernels]
[time_derivative]
type = TimeDerivative
variable = v
[]
[diffusion]
type = Diffusion
variable = v
[]
[source]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[dirichlet0]
type = DirichletBC
variable = v
boundary = '0'
value = 0
[]
[dirichlet]
type = DirichletBC
variable = v
boundary = '2'
value = 100
[]
[]
[Postprocessors]
[avg_u]
type = ElementAverageValue
variable = u
execute_on = 'initial linear'
[]
[avg_v]
type = ElementAverageValue
variable = v
execute_on = 'initial linear'
[]
[avg_w]
type = ElementAverageValue
variable = w
execute_on = 'initial linear'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
end_time = 0.1
dt = 0.02
[]
[MultiApps]
[level2-]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_level2.i
execute_on = 'timestep_end'
# sub_cycling = true
[]
[]
[Transfers]
[v_to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = v
variable = v
to_multi_app = level2-
execute_on = 'timestep_end'
[]
[w_from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = w
variable = w
from_multi_app = level2-
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
# print_linear_residuals = false
[]
(test/tests/multiapps/picard_postprocessor/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_max_its = 30
relaxation_factor = 0.8
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(test/tests/multiapps/restart_multilevel/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[fn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'subsub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(tutorials/tutorial02_multiapps/step03_coupling/02_parent_picard.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[vt]
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ParsedMaterial
property_name = D
coupled_variables = 'vt'
expression = 'vt'
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
fixed_point_max_its = 10
nl_abs_tol = 1e-10
fixed_point_rel_tol = 1e-6
fixed_point_abs_tol = 1e-10
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[micro]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '02_sub_picard.i'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppVariableValueSampleTransfer
to_multi_app = micro
source_variable = u
variable = ut
[]
[pull_v]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = vt
postprocessor = average_v
[]
[]
(test/tests/multiapps/move_and_reset/multilevel_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0'
input_files = multilevel_sub_sub.i
output_in_position = true
[../]
[]
(test/tests/transfers/multiapp_reporter_transfer/main.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[VectorPostprocessors]
[from_main_vpp]
type = ConstantVectorPostprocessor
vector_names = 'a b c'
value = '1 1 1; 2 2 2; 3 3 3'
execute_on = initial
#outputs = none
[]
[to_main_vpp]
type = ConstantVectorPostprocessor
vector_names = 'a b c'
value = '4 4 4; 5 5 5; 6 6 6'
#outputs = none
[]
[]
[Reporters]
[from_main_rep]
type = ConstantReporter
integer_names = int
integer_values = 1
real_names = num
real_values = 2.0
real_vector_names = vec
real_vector_values = '3 4'
string_names = str
string_values = 'five'
[]
[to_main_rep]
type = ConstantReporter
integer_names = int
integer_values = 0
real_names = num
real_values = 0.0
real_vector_names = vec
real_vector_values = '0'
string_names = str
string_values = 'foo'
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = 'sub0.i sub1.i'
positions = '0 0 0 0 0 0'
[]
[Transfers]
# VPP transfers
[vpp_to_vpp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_vpp/a to_sub_vpp/b'
from_reporters = 'from_main_vpp/a from_main_vpp/b'
to_multi_app = sub
[]
[vpp_from_vpp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_vpp/a to_main_vpp/b'
from_reporters = 'from_sub_vpp/a from_sub_vpp/b'
from_multi_app = sub
subapp_index = 0
[]
# Vector-VPP transfers
[vector_to_vpp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_vpp/a'
from_reporters = 'from_main_rep/vec'
to_multi_app = sub
subapp_index = 0
[]
[vector_from_vpp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/vec'
from_reporters = 'from_sub_vpp/a'
from_multi_app = sub
subapp_index = 0
[]
# Real-PP transfers
[real_to_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_pp/value'
from_reporters = 'from_main_rep/num'
to_multi_app = sub
subapp_index = 0
[]
[real_from_pp]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/num'
from_reporters = 'from_sub_pp/value'
from_multi_app = sub
subapp_index = 0
[]
# Int-Int transfers
[int_to_int]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/int'
from_reporters = 'from_main_rep/int'
to_multi_app = sub
subapp_index = 0
[]
[int_from_int]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/int'
from_reporters = 'from_sub_rep/int'
from_multi_app = sub
subapp_index = 0
[]
# String-String transfers
[string_to_string]
type = MultiAppReporterTransfer
to_reporters = 'to_sub_rep/str'
from_reporters = 'from_main_rep/str'
to_multi_app = sub
subapp_index = 0
[]
[string_from_string]
type = MultiAppReporterTransfer
to_reporters = 'to_main_rep/str'
from_reporters = 'from_sub_rep/str'
from_multi_app = sub
subapp_index = 0
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/multiapps/transient_multiapp/dt_from_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'dt_from_parent_sub.i'
positions = '0 0 0
0.5 0.5 0
0.6 0.6 0
0.7 0.7 0'
[]
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
# Main input file.
#
# Run mesh.i first to produce a mesh file that this input uses:
#
# thermal_hydraulics-opt -i mesh.i --mesh-only mesh.e
length = 5.0
n_elems_axial = 10
rho_name = density
cp_name = specific_heat
k_name = thermal_conductivity
rho = 8000.0
cp = 500.0
k = 15.0
T_initial = 500.0
power = 1000.0
[Mesh]
type = FileMesh
file = mesh.e
[]
[Variables]
[T_solid]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T_solid
value = ${T_initial}
[]
[]
[Kernels]
[time_derivative]
type = ADHeatConductionTimeDerivative
variable = T_solid
density_name = ${rho_name}
specific_heat = ${cp_name}
[]
[heat_conduction]
type = ADHeatConduction
variable = T_solid
thermal_conductivity = ${k_name}
[]
[]
[BCs]
[bc]
type = FunctorNeumannBC
variable = T_solid
boundary = 'inner'
functor = heat_flux_fn
flux_is_inward = false
[]
[]
[Materials]
[ad_constant_mat]
type = ADGenericConstantMaterial
prop_names = '${rho_name} ${cp_name} ${k_name}'
prop_values = '${rho} ${cp} ${k}'
[]
[]
[Functions]
[heat_flux_fn]
type = ParsedFunction
symbol_names = 'S'
symbol_values = 'inner_surface_area'
expression = '${power} / S'
[]
[]
[Postprocessors]
[inner_surface_area]
type = AreaPostprocessor
boundary = 'inner'
execute_on = 'INITIAL'
[]
[inner_perimeter]
type = ParsedPostprocessor
pp_names = 'inner_surface_area'
expression = 'inner_surface_area / ${length}'
execute_on = 'INITIAL'
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = 'sub.i'
positions = '0 0 0'
max_procs_per_app = 1
output_in_position = true
execute_on = 'TIMESTEP_END'
[]
[]
[UserObjects]
[layered_average_heat_flux]
type = NearestPointLayeredSideAverageFunctor
direction = z
points='0 0 0'
num_layers = ${n_elems_axial}
functor = heat_flux_fn
boundary = 'inner'
execute_on = 'TIMESTEP_END'
[]
[]
[Transfers]
[heat_flux_transfer]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = layered_average_heat_flux
variable = q_ext
error_on_miss = true
[]
[perimeter_transfer]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = inner_perimeter
to_postprocessor = P_ext
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 10.0
num_steps = 1
abort_on_solve_fail = true
solve_type = NEWTON
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
[]
(test/tests/parser/cli_multiapp_group/dt_from_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[MultiApps]
[./sub_left]
positions = '0 0 0 0.5 0.5 0 0.6 0.6 0 0.7 0.7 0'
type = TransientMultiApp
input_files = 'dt_from_parent_sub.i'
app_type = MooseTestApp
[../]
[./sub_right]
positions = '0 0 0 0.5 0.5 0 0.6 0.6 0 0.7 0.7 0'
type = TransientMultiApp
input_files = 'dt_from_parent_sub.i'
app_type = MooseTestApp
[../]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.q_wall_transfer_3eqn.parent.i)
# This tests a heat flux transfer using the MultiApp system. Simple heat
# conduction problem is solved, then the heat flux is picked up by the child
# side of the solve, child side solves and transfers its variables back to the
# master
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[sin_fn]
type = ParsedFunction
expression = '1000*t*sin(pi*x)'
[]
[]
[Variables]
[T]
[]
[]
[AuxVariables]
[q_wall]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[q_wal_ak]
type = FunctionAux
variable = q_wall
function = sin_fn
execute_on = 'initial timestep_end'
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[BCs]
[left]
type = DirichletBC
variable = T
boundary = 'left right'
value = 300
[]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 2
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.q_wall_transfer_3eqn.child.i
execute_on = 'initial timestep_end'
[]
[]
[Transfers]
[q_to_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = q_wall
variable = q_wall
[]
[]
[Outputs]
exodus = true
show = 'q_wall'
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_direct/main.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
[]
[Variables]
[./m]
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 = BodyForce
variable = m
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
enable_cache = true
[../]
[]
[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
[../]
[]
(test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/missing_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
positions = '0.9 0.5 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = tosub_sub.i
execute_on = timestep_end
[../]
[]
[Transfers]
[./to_sub]
source_variable = u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
error_on_miss = true
[../]
[./elemental_to_sub]
source_variable = u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
error_on_miss = true
[../]
[]
(modules/external_petsc_solver/test/tests/external_petsc_problem/petsc_transient_as_parent.i)
[Mesh]
# It is a mirror of PETSc mesh (DMDA)
type = PETScDMDAMesh
[]
[AuxVariables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Problem]
type = ExternalPETScProblem
sync_variable = u
[]
[Executioner]
type = Transient
num_steps = 10
[./TimeStepper]
type = ExternalPetscTimeStepper
[../]
[]
[AuxVariables]
[pid]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pid_aux]
type = ProcessorIDAux
variable = pid
execute_on = 'INITIAL'
[]
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
type = TransientMultiApp
input_files = 'moose_as_sub.i'
app_type = ExternalPetscSolverTestApp
[../]
[]
[Transfers]
[./tosub]
type = MultiAppShapeEvaluationTransfer
to_multi_app = sub_app
source_variable = u
variable = v
[../]
[]
(test/tests/transfers/errors/from_sub.i)
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = sub.i
[]
[Transfers/from_sub]
type = MultiAppCopyTransfer
direction = from_multiapp
source_variable = aux
variable = x
[]
[AuxVariables/x]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
execute_on = 'FINAL'
[]
(test/tests/transfers/general_field/user_object/boundary/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.5 & y < 0.5'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_sub]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub
[]
[to_sub_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# The subapp mesh is a 0.3-sized cube, no overlap
positions = '0.2222 0 0 0.61111 0.311111 0.31111 0.76666 0.111111 0.81111'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
# Facilitates debugging
output_in_position = true
[]
[]
[Transfers]
# Boundary restrictions are added in the tests specification
[to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub
variable = from_main
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub_elem
variable = from_main_elem
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main
variable = from_sub
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main_elem
variable = from_sub_elem
extrapolation_constant = -1
[]
[]
(test/tests/multiapps/stateful_material_sub_cycling/material_sub_app_test_parent.i)
[Problem]
solve = false
[]
[Mesh] #dummy
type = GeneratedMesh
dim = 2
[]
[Executioner]
type = Transient
start_time = 0.0
dt = 1
end_time = 10.0
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
input_files = material_sub_app_test_sub.i
# Test that stateful material properties
# are updated properly with subcycling
sub_cycling = true
[../]
[]
[Outputs]
csv = false
exodus = false
[]
(test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/fromsub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
elem_type = QUAD8
[]
[Variables]
[u]
family = LAGRANGE
order = FIRST
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[nodal_source_from_sub_nodal]
family = LAGRANGE
order = FIRST
[]
[nodal_source_from_sub_elemental]
family = MONOMIAL
order = CONSTANT
[]
[elemental_source_from_sub_nodal]
family = LAGRANGE
order = FIRST
[]
[elemental_source_from_sub_elemental]
family = MONOMIAL
order = CONSTANT
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.48 0.01 0 -1.01 0.01 0'
input_files = fromsub_sub.i
output_in_position = true
[]
[]
[Transfers]
[from_sub_nodal_from_nodal]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = u
variable = nodal_source_from_sub_nodal
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[from_sub_nodal_from_elemental]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = u
variable = nodal_source_from_sub_elemental
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[from_sub_elemental_from_nodal]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = u_elemental
variable = elemental_source_from_sub_nodal
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[from_sub_elemental_from_elemental]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = u_elemental
variable = elemental_source_from_sub_elemental
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[]
(test/tests/multiapps/picard_multilevel/picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v2]
[]
[]
[Kernels]
[diff_v]
type = Diffusion
variable = v
[]
[coupled_force]
type = CoupledForce
variable = v
v = v2
[]
[td_v]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Postprocessors]
# Accumulate the number of times 'timestep_end' is reached
# (which is an indicator of the number of Picard iterations)
[cumulative_picard_its_pp]
type = TestPostprocessor
test_type = custom_execute_on
execute_on = 'timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 1
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]
[sub2]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub2.i
sub_cycling = true
execute_on = timestep_end
[]
[]
[Transfers]
[v2]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub2
source_variable = v
variable = v2
[]
[]
(test/tests/transfers/multiapp_nearest_node_transfer/tosub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
elem_type = QUAD8
[]
[Variables]
[u]
family = LAGRANGE
order = FIRST
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[u_elemental]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[fun_aux]
type = FunctionAux
function = 'x + y'
variable = u_elemental
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0.48 0.01 0'
input_files = tosub_sub.i
[]
[]
[Transfers]
[to_sub_nodal_to_nodal]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = nodal_source_from_parent_nodal
[]
[to_sub_nodal_to_elemental]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = nodal_source_from_parent_elemental
[]
[to_sub_elemental_to_nodal]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u_elemental
variable = elemental_source_from_parent_nodal
[]
[to_sub_elemental_to_elemental]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u_elemental
variable = elemental_source_from_parent_elemental
[]
[]
(test/tests/multiapps/steffensen_postprocessor/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_algorithm = 'steffensen'
fixed_point_max_its = 30
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(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
[../]
[]
(test/tests/multiapps/relaxation/picard_relaxed_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
initial_condition = 1
[]
[inverse_v]
initial_condition = 1
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = inverse_v
[]
[]
[AuxKernels]
[invert_v]
type = QuotientAux
variable = inverse_v
denominator = v
numerator = 20.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[Neumann_right]
type = NeumannBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 4
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_abs_tol = 1e-14
relaxation_factor = 0.95
transformed_variables = u
[]
[Outputs]
exodus = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = picard_relaxed_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/transfers/multiapp_postprocessor_transfer/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.01
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 5
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
[MultiApps]
[pp_sub]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub.i
[]
[]
[Transfers]
[pp_transfer]
type = MultiAppPostprocessorTransfer
to_multi_app = pp_sub
from_postprocessor = average
to_postprocessor = from_parent
[]
[]
(test/tests/outputs/output_if_base_contains/dt_from_parent_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.5 0.5 0'
input_files = dt_from_parent_subsub.i
[../]
[]
(test/tests/multiapps/slow_sub/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[pg]
type = PerfGraphOutput
level = 3
[]
[]
[MultiApps]
[really_slow]
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'sub.i'
positions = '0 0 0'
[]
[]
(test/tests/multiapps/secant_postprocessor/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_algorithm = 'secant'
fixed_point_max_its = 30
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(test/tests/transfers/general_field/user_object/subdomain/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.6 & y < 0.5'
block_id = 1
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_sub]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub
[]
[to_sub_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
[]
execute_on = 'TIMESTEP_END'
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# Offsets are added to make sure there are no equidistant nodes / transfer indetermination
positions = '0 0 0 0.41111 0.28111 0 0.7232323 0.12323 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub
variable = from_main
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub_elem
variable = from_main_elem
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main
variable = from_sub
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main_elem
variable = from_sub_elem
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[]
(test/tests/restart/restart_transient_from_transient/restart_trans_with_2subs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = 'replicated'
[]
[Problem]
restart_file_base = pseudo_trans_with_2subs_out_cp/LATEST
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2' # increase this function to drive transient
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 50
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 3
dt = 1.0
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
line_search = none
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0
0.5 0 0'
input_files = restart_trans_with_2subs_sub.i
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[p_to_sub]
type = MultiAppProjectionTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppGeometricInterpolationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/transfers/multiapp_userobject_transfer/3d_1d_parent.i)
# This does a dummy diffusion solve in 3D space, then computes a layered average
# in the z direction. Those values are transferred into a sub-app that has 1D mesh
# in the z-direction (the mesh was displaced so that it is aligned in such a way).
# The sub-app also does a dummy diffusion solve and then computes layered average
# in the z-direction. Those value are transferred back to the parent app.
#
# Physically the 1D sub-app is placed in the center of the 3D mesh and is oriented
# in the z-direction. The bounding box of the sub-app is expanded such that it
# contains the 4 central elements of the 3D mesh (i.e. the values are transferred
# only into a part of parent mesh)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 4
ny = 4
nz = 10
# The MultiAppUserObjectTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[AuxVariables]
[./from_sub_app_var]
order = CONSTANT
family = MONOMIAL
[../]
[]
[UserObjects]
[main_uo]
type = LayeredAverage
direction = z
num_layers = 10
variable = u
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = front
value = -1
[]
[right]
type = DirichletBC
variable = u
boundary = back
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 5
solve_type = 'NEWTON'
l_tol = 1e-8
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
execute_on = final
[]
[MultiApps]
[sub_app]
positions = '0.5 0.5 0.0'
type = TransientMultiApp
input_files = 3d_1d_sub.i
app_type = MooseTestApp
bounding_box_padding = '0.25 0.25 0'
bounding_box_inflation = 0
use_displaced_mesh = true
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[layered_transfer_to_sub_app]
type = MultiAppUserObjectTransfer
user_object = main_uo
variable = sub_app_var
to_multi_app = sub_app
displaced_target_mesh = true
[]
[layered_transfer_from_sub_app]
type = MultiAppUserObjectTransfer
user_object = sub_app_uo
variable = from_sub_app_var
from_multi_app = sub_app
displaced_source_mesh = true
[]
[]
(test/tests/multiapps/multilevel/dt_from_parent_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.25
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[./out]
type = Console
output_file = true
[../]
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.5 0.5 0'
input_files = dt_from_parent_sub.i
[../]
[]
(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
[../]
[]
(test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/parallel_parent.i)
# This test was introduced for Issue #804 which saw data corruption
# during NearestNodeTransfer when running in parallel
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
parallel_type = replicated
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./from_sub]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 1.0 0.0'
input_files = parallel_sub.i
execute_on = 'timestep_end'
[../]
[]
[Transfers]
# Surface to volume data transfer
# This extrapolates, so we inflate the bounding box size
[./from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = u
variable = from_sub
execute_on = 'timestep_end'
fixed_bounding_box_size = '1 1 0'
[../]
[]
(test/tests/multiapps/picard/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
clone_parent_mesh = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/tosub_target_displaced.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
positions = '.1 .1 0 0.6 0.6 0 0.6 0.1 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = tosub_sub.i
execute_on = timestep_end
[../]
[]
[Transfers]
[./to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = u
variable = transferred_u
to_multi_app = sub
displaced_target_mesh = true
[../]
[./elemental_to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = u
variable = elemental_transferred_u
to_multi_app = sub
displaced_target_mesh = true
[../]
[]
(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
[../]
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_displaced_parent.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average_value]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
execute_on = timestep_end
positions = '0 0 0'
type = TransientMultiApp
input_files = tosub_displaced_sub.i
app_type = MooseTestApp
[../]
[]
[Transfers]
[./layered_transfer]
source_user_object = layered_average
variable = multi_layered_average
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub_app
displaced_target_mesh = true
skip_coordinate_collapsing = true
[../]
[./element_layered_transfer]
source_user_object = layered_average
variable = element_multi_layered_average
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub_app
displaced_target_mesh = true
skip_coordinate_collapsing = true
[../]
[]
(modules/misc/test/tests/dynamic_loading/dynamic_load_multiapp/misc_parent_bad.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
positions = '0 0 0 0.5 0.5 0 0.6 0.6 0 0.7 0.7 0'
type = TransientMultiApp
input_files = 'phase_field_sub.i'
# Here we'll attempt to load a different module that's not compiled into this module
app_type = InvalidApp
# Here we set an input file specific relative library path instead of using MOOSE_LIBRARY_PATH
library_path = '../../../../../phase_field/lib'
[../]
[]
(modules/functional_expansion_tools/examples/2D_interface/main.i)
# Basic example coupling a master and sub app at an interface in a 2D model.
# The master app provides a flux term to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's interface conditions, both value and flux, are transferred back
# to the master app
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[Materials]
[./Impervium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.00001 50.0 100.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
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
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(modules/stochastic_tools/test/tests/transfers/sampler_postprocessor/errors/wrong_multi_app.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform_left uniform_right'
execute_on = INITIAL # create random numbers on initial and use them for each timestep
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
input_files = sub.i
positions = '0 0 0'
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
execute_on = INITIAL
check_multiapp_execute_on = false
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = storage
from_postprocessor = avg
execute_on = timestep_end
check_multiapp_execute_on = false
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
(modules/combined/examples/optimization/multi-load/single_main.i)
vol_frac = 0.3
power = 1.1
E0 = 1.0
Emin = 1.0e-6
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
# final_generator = 'MoveRight'
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 80
ny = 40
xmin = 0
xmax = 150
ymin = 0
ymax = 75
[]
[left_load]
type = ExtraNodesetGenerator
input = Bottom
new_boundary = left_load
coord = '37.5 75 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '112.5 75 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.02
[]
[sensitivity_one]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[sensitivity_two]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[total_sensitivity]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[]
[AuxKernels]
[total_sensitivity]
type = ParsedAux
variable = total_sensitivity
expression = '0.5*sensitivity_one + 0.5*sensitivity_two'
coupled_variables = 'sensitivity_one sensitivity_two'
execute_on = 'LINEAR TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.0
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
# We do filtering in the subapps
[update]
type = DensityUpdate
density_sensitivity = total_sensitivity
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = MULTIAPP_FIXED_POINT_BEGIN
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 25
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
expression = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralVariablePostprocessor
variable = total_sensitivity
[]
[]
[MultiApps]
[sub_app_one]
type = TransientMultiApp
input_files = single_subapp_one.i
[]
[sub_app_two]
type = TransientMultiApp
input_files = single_subapp_two.i
[]
[]
[Transfers]
# First SUB-APP
# To subapp densities
[subapp_one_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_one
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_one_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_one
source_variable = Dc # sensitivity_var
variable = sensitivity_one # Here
[]
# Second SUB-APP
# To subapp densities
[subapp_two_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_two
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_two_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_two
source_variable = Dc # sensitivity_var
variable = sensitivity_two # Here
[]
[]
(test/tests/transfers/multiapp_projection_transfer/fixed_meshes_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 5
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./from_sub]
[../]
[./elemental_from_sub]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.01
solve_type = NEWTON
[]
[Outputs]
exodus = true
#
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.0 0.0 0'
input_files = fixed_meshes_sub.i
[../]
[]
[Transfers]
[./from_sub]
type = MultiAppProjectionTransfer
from_multi_app = sub
source_variable = u
variable = from_sub
fixed_meshes = true
[../]
[./elemental_from_sub]
type = MultiAppProjectionTransfer
from_multi_app = sub
source_variable = u
variable = elemental_from_sub
fixed_meshes = true
[../]
[./to_sub]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = u
variable = from_parent
fixed_meshes = true
[../]
[./elemental_to_sub]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = u
variable = elemental_from_parent
fixed_meshes = true
[../]
[]
(test/tests/userobjects/postprocessor_spatial_user_object/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Functions]
[./ic_fn]
type = ParsedFunction
expression = 'x * y'
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = ic_fn
[../]
[./a_ic]
type = ConstantIC
variable = a
value = 1
[../]
[]
[AuxVariables]
[./a]
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./rhs]
type = BodyForce
variable = u
function = 1
[../]
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'sub.i'
positions = '
0.25 0.25 0
0.75 0.75 0'
execute_on = 'initial timestep_end'
[../]
[]
[Transfers]
[./master_to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = a
[../]
[./sub_to_master]
type = MultiAppUserObjectTransfer
from_multi_app = sub
user_object = fn_uo
variable = a
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 10
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/picard/picard_adaptive_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1
# cutback_factor, growth_factor, optimal_iterations, time_dt and time_t added through CLI args
[]
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_adaptive_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/exchanger.i)
#########################################
# #
# File written by create_input_files.py #
# #
#########################################
# Model of the heat-exchanger
# The input fluid to the heat exchanger is determined by AuxVariables called production_temperature, production_rate_H, production_rate_Cl, production_rate_SO4, production_rate_HCO3, production_rate_SiO2aq, production_rate_Al, production_rate_Ca, production_rate_Mg, production_rate_Fe, production_rate_K, production_rate_Na, production_rate_Sr, production_rate_F, production_rate_BOH, production_rate_Br, production_rate_Ba, production_rate_Li, production_rate_NO3, production_rate_O2aq, production_rate_H2O. These come from Postprocessors in the porous_flow.i simulation that measure the fluid composition at the production well.
# Given the input fluid, the exchanger cools/heats the fluid, removing any precipitates, and injects fluid back to porous_flow.i at temperature output_temperature and composition given by massfrac_H, etc.
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NO3- O2(aq)'
equilibrium_minerals = 'Siderite Pyrrhotite Dolomite Illite Anhydrite Calcite Quartz K-feldspar Kaolinite Barite Celestite Fluorite Albite Chalcedony Goethite'
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
include_moose_solve = false
geochemistry_reactor_name = reactor
swap_out_of_basis = 'NO3- O2(aq)'
swap_into_basis = ' NH3 HS-'
charge_balance_species = 'Cl-'
# initial conditions are unimportant because in exchanger mode all existing fluid is flushed from the system before adding the produced water
constraint_species = 'H2O H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NH3 HS-'
constraint_value = '1.0 1E-6 1E-6 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18'
constraint_meaning = 'kg_solvent_water bulk_composition bulk_composition free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration'
constraint_unit = "kg moles moles molal molal molal molal molal molal molal molal molal molal molal molal molal molal molal molal molal"
prevent_precipitation = 'Fluorite Albite Goethite'
initial_temperature = 92
mode = 4
temperature = ramp_temperature # ramp up to 160degC over ~1 day so that aquifer geochemistry simulation can easily converge
cold_temperature = 92
heating_increments = 10
source_species_names = ' H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NO3- O2(aq) H2O'
source_species_rates = ' production_rate_H production_rate_Cl production_rate_SO4 production_rate_HCO3 production_rate_SiO2aq production_rate_Al production_rate_Ca production_rate_Mg production_rate_Fe production_rate_K production_rate_Na production_rate_Sr production_rate_F production_rate_BOH production_rate_Br production_rate_Ba production_rate_Li production_rate_NO3 production_rate_O2aq production_rate_H2O'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
[]
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[AuxVariables]
[ramp_temperature]
initial_condition = 92
[]
[production_temperature]
initial_condition = 92 # the production_T Transfer lags one timestep behind for some reason, so give this a reasonable initial condition
[]
[transported_H]
[]
[transported_Cl]
[]
[transported_SO4]
[]
[transported_HCO3]
[]
[transported_SiO2aq]
[]
[transported_Al]
[]
[transported_Ca]
[]
[transported_Mg]
[]
[transported_Fe]
[]
[transported_K]
[]
[transported_Na]
[]
[transported_Sr]
[]
[transported_F]
[]
[transported_BOH]
[]
[transported_Br]
[]
[transported_Ba]
[]
[transported_Li]
[]
[transported_NO3]
[]
[transported_O2aq]
[]
[transported_H2O]
[]
[transported_mass]
[]
[massfrac_H]
[]
[massfrac_Cl]
[]
[massfrac_SO4]
[]
[massfrac_HCO3]
[]
[massfrac_SiO2aq]
[]
[massfrac_Al]
[]
[massfrac_Ca]
[]
[massfrac_Mg]
[]
[massfrac_Fe]
[]
[massfrac_K]
[]
[massfrac_Na]
[]
[massfrac_Sr]
[]
[massfrac_F]
[]
[massfrac_BOH]
[]
[massfrac_Br]
[]
[massfrac_Ba]
[]
[massfrac_Li]
[]
[massfrac_NO3]
[]
[massfrac_O2aq]
[]
[massfrac_H2O]
[]
[dumped_Siderite]
[]
[dumped_Pyrrhotite]
[]
[dumped_Dolomite]
[]
[dumped_Illite]
[]
[dumped_Anhydrite]
[]
[dumped_Calcite]
[]
[dumped_Quartz]
[]
[dumped_K-feldspar]
[]
[dumped_Kaolinite]
[]
[dumped_Barite]
[]
[dumped_Celestite]
[]
[dumped_Fluorite]
[]
[dumped_Albite]
[]
[dumped_Chalcedony]
[]
[dumped_Goethite]
[]
# The production_* Transfers lag one timestep behind for some reason (when the porous_flow simulation has finished, it correctly computes mole_rate_*_produced, but the Transfer gets the mole_rate_*_produced from the previous timestep), so give the production_rate_* reasonable initial conditions, otherwise they will be zero at the start of the simulation.
[production_rate_H]
initial_condition = -0.00058596786807342
[]
[production_rate_Cl]
initial_condition = 0.274767413291287
[]
[production_rate_SO4]
initial_condition = 0.012567456786868922
[]
[production_rate_HCO3]
initial_condition = 0.0001668295857850308
[]
[production_rate_SiO2aq]
initial_condition = 0.00010068057668449495
[]
[production_rate_Al]
initial_condition = 2.4224219572143877e-07
[]
[production_rate_Ca]
initial_condition = 0.0040997718654983036
[]
[production_rate_Mg]
initial_condition = 0.00015261342984691217
[]
[production_rate_Fe]
initial_condition = 0.0001550375425863269
[]
[production_rate_K]
initial_condition = 0.0003500651859998926
[]
[production_rate_Na]
initial_condition = 0.2896767602995328
[]
[production_rate_Sr]
initial_condition = 2.915285700108879e-05
[]
[production_rate_F]
initial_condition = 5.8582680830041476e-05
[]
[production_rate_BOH]
initial_condition = 0.0012157199878760335
[]
[production_rate_Br]
initial_condition = 0.00022605948665165203
[]
[production_rate_Ba]
initial_condition = 2.2773554030672105e-07
[]
[production_rate_Li]
initial_condition = 0.0023920780265869763
[]
[production_rate_NO3]
initial_condition = 0.000353470613973057
[]
[production_rate_O2aq]
initial_condition = -0.00044255942331181803
[]
[production_rate_H2O]
initial_condition = 10.10458252764496
[]
[]
[AuxKernels]
[ramp_temperature]
type = FunctionAux
variable = ramp_temperature
function = 'min(160, max(92, 92 + (160 - 92) * t / 1E5))'
[]
[transported_H_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_H
species = 'H+'
[]
[transported_Cl_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Cl
species = 'Cl-'
[]
[transported_SO4_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_SO4
species = 'SO4--'
[]
[transported_HCO3_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_HCO3
species = 'HCO3-'
[]
[transported_SiO2aq_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_SiO2aq
species = 'SiO2(aq)'
[]
[transported_Al_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Al
species = 'Al+++'
[]
[transported_Ca_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Ca
species = 'Ca++'
[]
[transported_Mg_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Mg
species = 'Mg++'
[]
[transported_Fe_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Fe
species = 'Fe++'
[]
[transported_K_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_K
species = 'K+'
[]
[transported_Na_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Na
species = 'Na+'
[]
[transported_Sr_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Sr
species = 'Sr++'
[]
[transported_F_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_F
species = 'F-'
[]
[transported_BOH_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_BOH
species = 'B(OH)3'
[]
[transported_Br_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Br
species = 'Br-'
[]
[transported_Ba_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Ba
species = 'Ba++'
[]
[transported_Li_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Li
species = 'Li+'
[]
[transported_NO3_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_NO3
species = 'NO3-'
[]
[transported_O2aq_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_O2aq
species = 'O2(aq)'
[]
[transported_H2O_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_H2O
species = 'H2O'
[]
[transported_mass_auxk]
type = ParsedAux
coupled_variables = ' transported_H transported_Cl transported_SO4 transported_HCO3 transported_SiO2aq transported_Al transported_Ca transported_Mg transported_Fe transported_K transported_Na transported_Sr transported_F transported_BOH transported_Br transported_Ba transported_Li transported_NO3 transported_O2aq transported_H2O'
variable = transported_mass
expression = ' transported_H * 1.0079 + transported_Cl * 35.453 + transported_SO4 * 96.0576 + transported_HCO3 * 61.0171 + transported_SiO2aq * 60.0843 + transported_Al * 26.9815 + transported_Ca * 40.08 + transported_Mg * 24.305 + transported_Fe * 55.847 + transported_K * 39.0983 + transported_Na * 22.9898 + transported_Sr * 87.62 + transported_F * 18.9984 + transported_BOH * 61.8329 + transported_Br * 79.904 + transported_Ba * 137.33 + transported_Li * 6.941 + transported_NO3 * 62.0049 + transported_O2aq * 31.9988 + transported_H2O * 18.01801802'
[]
[massfrac_H_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_H'
variable = massfrac_H
expression = '1.0079 * transported_H / transported_mass'
[]
[massfrac_Cl_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Cl'
variable = massfrac_Cl
expression = '35.453 * transported_Cl / transported_mass'
[]
[massfrac_SO4_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_SO4'
variable = massfrac_SO4
expression = '96.0576 * transported_SO4 / transported_mass'
[]
[massfrac_HCO3_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_HCO3'
variable = massfrac_HCO3
expression = '61.0171 * transported_HCO3 / transported_mass'
[]
[massfrac_SiO2aq_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_SiO2aq'
variable = massfrac_SiO2aq
expression = '60.0843 * transported_SiO2aq / transported_mass'
[]
[massfrac_Al_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Al'
variable = massfrac_Al
expression = '26.9815 * transported_Al / transported_mass'
[]
[massfrac_Ca_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Ca'
variable = massfrac_Ca
expression = '40.08 * transported_Ca / transported_mass'
[]
[massfrac_Mg_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Mg'
variable = massfrac_Mg
expression = '24.305 * transported_Mg / transported_mass'
[]
[massfrac_Fe_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Fe'
variable = massfrac_Fe
expression = '55.847 * transported_Fe / transported_mass'
[]
[massfrac_K_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_K'
variable = massfrac_K
expression = '39.0983 * transported_K / transported_mass'
[]
[massfrac_Na_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Na'
variable = massfrac_Na
expression = '22.9898 * transported_Na / transported_mass'
[]
[massfrac_Sr_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Sr'
variable = massfrac_Sr
expression = '87.62 * transported_Sr / transported_mass'
[]
[massfrac_F_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_F'
variable = massfrac_F
expression = '18.9984 * transported_F / transported_mass'
[]
[massfrac_BOH_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_BOH'
variable = massfrac_BOH
expression = '61.8329 * transported_BOH / transported_mass'
[]
[massfrac_Br_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Br'
variable = massfrac_Br
expression = '79.904 * transported_Br / transported_mass'
[]
[massfrac_Ba_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Ba'
variable = massfrac_Ba
expression = '137.33 * transported_Ba / transported_mass'
[]
[massfrac_Li_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Li'
variable = massfrac_Li
expression = '6.941 * transported_Li / transported_mass'
[]
[massfrac_NO3_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_NO3'
variable = massfrac_NO3
expression = '62.0049 * transported_NO3 / transported_mass'
[]
[massfrac_O2aq_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_O2aq'
variable = massfrac_O2aq
expression = '31.9988 * transported_O2aq / transported_mass'
[]
[massfrac_H2O_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_H2O'
variable = massfrac_H2O
expression = '18.01801802 * transported_H2O / transported_mass'
[]
[dumped_Siderite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Siderite
species = Siderite
quantity = moles_dumped
[]
[dumped_Pyrrhotite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Pyrrhotite
species = Pyrrhotite
quantity = moles_dumped
[]
[dumped_Dolomite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Dolomite
species = Dolomite
quantity = moles_dumped
[]
[dumped_Illite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Illite
species = Illite
quantity = moles_dumped
[]
[dumped_Anhydrite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Anhydrite
species = Anhydrite
quantity = moles_dumped
[]
[dumped_Calcite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Calcite
species = Calcite
quantity = moles_dumped
[]
[dumped_Quartz_auxk]
type = GeochemistryQuantityAux
variable = dumped_Quartz
species = Quartz
quantity = moles_dumped
[]
[dumped_K-feldspar_auxk]
type = GeochemistryQuantityAux
variable = dumped_K-feldspar
species = K-feldspar
quantity = moles_dumped
[]
[dumped_Kaolinite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Kaolinite
species = Kaolinite
quantity = moles_dumped
[]
[dumped_Barite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Barite
species = Barite
quantity = moles_dumped
[]
[dumped_Celestite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Celestite
species = Celestite
quantity = moles_dumped
[]
[dumped_Fluorite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Fluorite
species = Fluorite
quantity = moles_dumped
[]
[dumped_Albite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Albite
species = Albite
quantity = moles_dumped
[]
[dumped_Chalcedony_auxk]
type = GeochemistryQuantityAux
variable = dumped_Chalcedony
species = Chalcedony
quantity = moles_dumped
[]
[dumped_Goethite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Goethite
species = Goethite
quantity = moles_dumped
[]
[]
[Postprocessors]
[cumulative_moles_precipitated_Siderite]
type = PointValue
variable = dumped_Siderite
[]
[cumulative_moles_precipitated_Pyrrhotite]
type = PointValue
variable = dumped_Pyrrhotite
[]
[cumulative_moles_precipitated_Dolomite]
type = PointValue
variable = dumped_Dolomite
[]
[cumulative_moles_precipitated_Illite]
type = PointValue
variable = dumped_Illite
[]
[cumulative_moles_precipitated_Anhydrite]
type = PointValue
variable = dumped_Anhydrite
[]
[cumulative_moles_precipitated_Calcite]
type = PointValue
variable = dumped_Calcite
[]
[cumulative_moles_precipitated_Quartz]
type = PointValue
variable = dumped_Quartz
[]
[cumulative_moles_precipitated_K-feldspar]
type = PointValue
variable = dumped_K-feldspar
[]
[cumulative_moles_precipitated_Kaolinite]
type = PointValue
variable = dumped_Kaolinite
[]
[cumulative_moles_precipitated_Barite]
type = PointValue
variable = dumped_Barite
[]
[cumulative_moles_precipitated_Celestite]
type = PointValue
variable = dumped_Celestite
[]
[cumulative_moles_precipitated_Fluorite]
type = PointValue
variable = dumped_Fluorite
[]
[cumulative_moles_precipitated_Albite]
type = PointValue
variable = dumped_Albite
[]
[cumulative_moles_precipitated_Chalcedony]
type = PointValue
variable = dumped_Chalcedony
[]
[cumulative_moles_precipitated_Goethite]
type = PointValue
variable = dumped_Goethite
[]
[production_temperature]
type = PointValue
variable = production_temperature
[]
[mass_heated_this_timestep]
type = PointValue
variable = transported_mass
[]
[]
[Outputs]
csv = true
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
[TimeStepper]
type = FunctionDT
function = 'min(3E4, max(1E4, 0.2 * t))'
[]
[]
[MultiApps]
[porous_flow_sim]
type = TransientMultiApp
input_files = porous_flow.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[injection_T]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'solution_temperature'
variable = 'injection_temperature'
[]
[injection_H]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_H'
variable = 'injection_rate_massfrac_H'
[]
[injection_Cl]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Cl'
variable = 'injection_rate_massfrac_Cl'
[]
[injection_SO4]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_SO4'
variable = 'injection_rate_massfrac_SO4'
[]
[injection_HCO3]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_HCO3'
variable = 'injection_rate_massfrac_HCO3'
[]
[injection_SiO2aq]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_SiO2aq'
variable = 'injection_rate_massfrac_SiO2aq'
[]
[injection_Al]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Al'
variable = 'injection_rate_massfrac_Al'
[]
[injection_Ca]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Ca'
variable = 'injection_rate_massfrac_Ca'
[]
[injection_Mg]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Mg'
variable = 'injection_rate_massfrac_Mg'
[]
[injection_Fe]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Fe'
variable = 'injection_rate_massfrac_Fe'
[]
[injection_K]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_K'
variable = 'injection_rate_massfrac_K'
[]
[injection_Na]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Na'
variable = 'injection_rate_massfrac_Na'
[]
[injection_Sr]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Sr'
variable = 'injection_rate_massfrac_Sr'
[]
[injection_F]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_F'
variable = 'injection_rate_massfrac_F'
[]
[injection_BOH]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_BOH'
variable = 'injection_rate_massfrac_BOH'
[]
[injection_Br]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Br'
variable = 'injection_rate_massfrac_Br'
[]
[injection_Ba]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Ba'
variable = 'injection_rate_massfrac_Ba'
[]
[injection_Li]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Li'
variable = 'injection_rate_massfrac_Li'
[]
[injection_NO3]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_NO3'
variable = 'injection_rate_massfrac_NO3'
[]
[injection_O2aq]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_O2aq'
variable = 'injection_rate_massfrac_O2aq'
[]
[injection_H2O]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_H2O'
variable = 'injection_rate_massfrac_H2O'
[]
[production_T]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = production_temperature
variable = production_temperature
[]
[production_H]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_H_produced
variable = production_rate_H
[]
[production_Cl]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Cl_produced
variable = production_rate_Cl
[]
[production_SO4]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_SO4_produced
variable = production_rate_SO4
[]
[production_HCO3]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_HCO3_produced
variable = production_rate_HCO3
[]
[production_SiO2aq]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_SiO2aq_produced
variable = production_rate_SiO2aq
[]
[production_Al]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Al_produced
variable = production_rate_Al
[]
[production_Ca]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Ca_produced
variable = production_rate_Ca
[]
[production_Mg]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Mg_produced
variable = production_rate_Mg
[]
[production_Fe]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Fe_produced
variable = production_rate_Fe
[]
[production_K]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_K_produced
variable = production_rate_K
[]
[production_Na]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Na_produced
variable = production_rate_Na
[]
[production_Sr]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Sr_produced
variable = production_rate_Sr
[]
[production_F]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_F_produced
variable = production_rate_F
[]
[production_BOH]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_BOH_produced
variable = production_rate_BOH
[]
[production_Br]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Br_produced
variable = production_rate_Br
[]
[production_Ba]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Ba_produced
variable = production_rate_Ba
[]
[production_Li]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Li_produced
variable = production_rate_Li
[]
[production_NO3]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_NO3_produced
variable = production_rate_NO3
[]
[production_O2aq]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_O2aq_produced
variable = production_rate_O2aq
[]
[production_H2O]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_H2O_produced
variable = production_rate_H2O
[]
[]
(test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/fromsub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[transferred_u]
[]
[elemental_transferred_u]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
positions = '.099 .099 0 .599 .599 0 0.599 0.099 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = fromsub_sub.i
[]
[]
[Transfers]
[from_sub]
source_variable = 'sub_u sub_u'
variable = 'transferred_u elemental_transferred_u'
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
[]
[]
(test/tests/transfers/multiapp_mesh_function_transfer/missing_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
positions = '0.9 0.5 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = tosub_sub.i
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
source_variable = u
variable = transferred_u
type = MultiAppShapeEvaluationTransfer
to_multi_app = sub
error_on_miss = true
[]
[elemental_to_sub]
source_variable = u
variable = elemental_transferred_u
type = MultiAppShapeEvaluationTransfer
to_multi_app = sub
error_on_miss = true
[]
[]
(test/tests/transfers/multiapp_postprocessor_interpolation_transfer/multilevel_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./sub_average]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.5 0.5 0'
input_files = multilevel_sub.i
[../]
[]
[Transfers]
[./sub_average]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = sub
variable = sub_average
postprocessor = sub_average
[../]
[]
(test/tests/transfers/multiapp_mesh_function_transfer/tosub_target_displaced.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
positions = '.1 .1 0 0.6 0.6 0 0.6 0.1 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = tosub_sub.i
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
source_variable = u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
displaced_target_mesh = true
[]
[elemental_to_sub]
source_variable = u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
displaced_target_mesh = true
[]
[]
(test/tests/multiapps/multilevel/dt_from_parent_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.5 0.5 0'
input_files = dt_from_parent_subsub.i
[../]
[]
(test/tests/multiapps/grid-sequencing/vi-fine.i)
l = 10
nx = 80
num_steps = 2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds]
[]
[]
[Bounds]
[u_upper_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[]
[u_lower_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = '${fparse 10+1e-8}'
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
[MultiApps]
[coarse]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = vi-coarse.i
[]
[]
[Transfers]
[mesh_function_begin]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = coarse
source_variable = u
variable = u
execute_on = timestep_begin
[]
[]
(test/tests/multiapps/grid-sequencing/vi-coarse.i)
l = 10
nx = 40
num_steps = 2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds]
[]
[]
[Bounds]
[u_upper_bound]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[]
[u_lower_bound]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = '${fparse 10+1e-8}'
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
[MultiApps]
[coarser]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = vi-coarser.i
[]
[]
[Transfers]
[mesh_function_begin]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = coarser
source_variable = u
variable = u
execute_on = timestep_begin
[]
[]
(modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/fracture_app_heat.i)
# Heat energy from this fracture app is transferred to the matrix app
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmin = 0
xmax = 50.0
[]
[]
[Variables]
[frac_T]
[]
[]
[ICs]
[frac_T]
type = FunctionIC
variable = frac_T
function = 'if(x<1E-6, 2, 0)' # delta function
[]
[]
[AuxVariables]
[transferred_matrix_T]
[]
[heat_to_matrix]
[]
[]
[Kernels]
[dot]
type = TimeDerivative
variable = frac_T
[]
[fracture_diffusion]
type = Diffusion
variable = frac_T
[]
[toMatrix]
type = PorousFlowHeatMassTransfer
variable = frac_T
v = transferred_matrix_T
transfer_coefficient = 0.004
[]
[]
[AuxKernels]
[heat_to_matrix]
type = ParsedAux
variable = heat_to_matrix
coupled_variables = 'frac_T transferred_matrix_T'
expression = '0.004 * (frac_T - transferred_matrix_T)'
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
[]
[VectorPostprocessors]
[final_results]
type = LineValueSampler
start_point = '0 0 0'
end_point = '50 0 0'
num_points = 11
sort_by = x
variable = frac_T
outputs = final_csv
[]
[]
[Outputs]
print_linear_residuals = false
[final_csv]
type = CSV
sync_times = 100
sync_only = true
[]
[]
[MultiApps]
[matrix_app]
type = TransientMultiApp
input_files = matrix_app_heat.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[heat_to_matrix]
type = MultiAppCopyTransfer
to_multi_app = matrix_app
source_variable = heat_to_matrix
variable = heat_from_frac
[]
[T_from_matrix]
type = MultiAppCopyTransfer
from_multi_app = matrix_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[]
(test/tests/transfers/general_field/user_object/nearest_position/main_between_multiapp.i)
# Base input for testing between-multiapp transfers. It has the following complexities:
# - multiapps may not be run with the same number of ranks
# - both nodal and elemental variables
# Tests derived from this input may add or remove complexities through command line arguments
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Positions]
[input_app1]
type = InputPositions
positions = '0 0.1 0
0.5 0.5 0'
[]
[input_app2]
type = InputPositions
# offsets to avoid indetermination
# but small enough to remain below to bounding box factor bump
positions = '0 0.5000000000001 0
0.60000000001 0.5 0'
[]
[]
# This application uses at most 3 processes
[MultiApps/ma1]
type = TransientMultiApp
input_files = sub_between_diffusion.i
max_procs_per_app = 3
positions_objects = 'input_app1'
output_in_position = true
[]
# This application will use as many processes as the main app
[MultiApps/ma2]
type = TransientMultiApp
input_files = sub_between_diffusion.i
positions_objects = 'input_app2'
output_in_position = true
[]
[Transfers]
# Nodal to nodal variables
[app1_to_2_nodal_nodal]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma1
to_multi_app = ma2
source_user_object = sent_nodal
variable = received_nodal
extrapolation_constant = -1
use_nearest_position = input_app1
# slight inflation to avoid floating point issues on borders
bbox_factor = 1.001
[]
[app2_to_1_nodal_nodal]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma2
to_multi_app = ma1
source_user_object = sent_nodal
variable = received_nodal
extrapolation_constant = -1
use_nearest_position = input_app2
bbox_factor = 1.001
[]
# Elemental to elemental variables
[app1_to_2_elem_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma1
to_multi_app = ma2
source_user_object = sent_elem
variable = received_elem
extrapolation_constant = -1
use_nearest_position = input_app1
bbox_factor = 1.001
[]
[app2_to_1_elem_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma2
to_multi_app = ma1
source_user_object = sent_elem
variable = received_elem
extrapolation_constant = -1
use_nearest_position = input_app2
bbox_factor = 1.001
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/combined/test/tests/beam_eigenstrain_transfer/parent_uo_transfer.i)
# Test for multi app vector postprocessor to aux variable transfer
# Master App contains 2 beams, one starting at (1.5, 2.0, 2.0) and
# another starting at (2.5, 0.0, 3.0). Both beams extend for
# 0.150080 m along the y direction.
# Each subApp contains a 2D model of width 0.5 m and height 0.150080 m.
# A time varying temperature profile is assigned to each 2D model and
# the resulting yy strain along the right boundary (x = 0.5) is
# transferred to the beam model using the multi app transfer. The subApps
# are positioned in the [MultiApp] block such that the origin of the beams
# coincides with the origin of the subApp.
# For each master beam node/element, the MultiAppUserObjectTransfer finds
# the subApp where this node belongs, projects this node to the right
# boundary of the subApp and assigns the value corresponding to the
# projected point.
# Result: The y displacement of the beam should equal the y
# displacement along the right boundary of the 2D model.
[Mesh]
type = FileMesh
file = 2_beams_new.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./rot_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_y]
order = FIRST
family = LAGRANGE
[../]
[./rot_z]
order = FIRST
family = LAGRANGE
[../]
[]
[BCs]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./fixy1]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./fixz1]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[./fixr1]
type = DirichletBC
variable = rot_x
boundary = 1
value = 0.0
[../]
[./fixr2]
type = DirichletBC
variable = rot_y
boundary = 1
value = 0.0
[../]
[./fixr3]
type = DirichletBC
variable = rot_z
boundary = 1
value = 0.0
[../]
[]
[Kernels]
[./solid_disp_x]
type = StressDivergenceBeam
block = '1'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 0
variable = disp_x
[../]
[./solid_disp_y]
type = StressDivergenceBeam
block = '1'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 1
variable = disp_y
[../]
[./solid_disp_z]
type = StressDivergenceBeam
block = '1'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 2
variable = disp_z
[../]
[./solid_rot_x]
type = StressDivergenceBeam
block = '1'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 3
variable = rot_x
[../]
[./solid_rot_y]
type = StressDivergenceBeam
block = '1'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 4
variable = rot_y
[../]
[./solid_rot_z]
type = StressDivergenceBeam
block = '1'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 5
variable = rot_z
[../]
[]
[Materials]
[./elasticity]
type = ComputeElasticityBeam
youngs_modulus = 1e9
poissons_ratio = 0.3
shear_coefficient = 1.0
block = 1
[../]
[./strain]
type = ComputeIncrementalBeamStrain
block = '1'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
area = 0.5
Ay = 0.0
Az = 0.0
Iy = 0.01
Iz = 0.01
y_orientation = '0.0 0.0 1.0'
eigenstrain_names = 'thermal'
[../]
[./stress]
type = ComputeBeamResultants
block = 1
[../]
[./thermal]
type = ComputeEigenstrainBeamFromVariable
displacement_eigenstrain_variables = 'zero1 to_var zero2'
eigenstrain_name = thermal
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[AuxVariables]
[./to_var]
[../]
[./zero1]
[../]
[./zero2]
[../]
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = CombinedApp
positions = '1.5 2.0 2.0 2.5 0.0 3.0'
input_files = 'subapp1_uo_transfer.i subapp2_uo_transfer.i'
[../]
[]
[Transfers]
[./fromsub]
type = MultiAppUserObjectTransfer
user_object = axial_str
from_multi_app = sub
variable = to_var
all_master_nodes_contained_in_sub_app = true
[../]
[]
[Postprocessors]
[./pos1]
type = PointValue
variable = disp_y
point = '1.5 2.150080 2.0'
[../]
[./pos2]
type = PointValue
variable = disp_y
point = '2.5 0.150080 3.0'
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/secant/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'secant'
fixed_point_max_its = 30
transformed_variables = 'u'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
execute_on = 'timestep_begin'
[]
[]
(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
[../]
[]
(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
[../]
[]
(test/tests/multiapps/catch_up/parent.i)
# ##########################################################
# This is a test of the Multiapp System. This test solves
# four independent applications spaced throughout a
# parent domain interleaved with a parent solve.
#
# @Requirement F7.10
# ##########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 0.2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
type = TransientMultiApp
positions = '0 0 0 0.5 0.5 0'
input_files = 'sub.i failing_sub.i'
app_type = MooseTestApp
execute_on = 'timestep_end'
max_catch_up_steps = 100
max_failures = 100
catch_up = true
[../]
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/main_nearest_sub_app.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./multi_layered_average]
[../]
[./element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001 # This will be constrained by the multiapp
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_tol = 1e-8
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
positions = '0.3 0.1 0.3 0.7 0.1 0.3'
type = TransientMultiApp
input_files = sub.i
app_type = MooseTestApp
[../]
[]
[Transfers]
[./layered_transfer]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = layered_average
variable = multi_layered_average
from_multi_app = sub_app
# nearest_sub_app = true
[../]
[./element_layered_transfer]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = layered_average
variable = element_multi_layered_average
from_multi_app = sub_app
# nearest_sub_app = true
[../]
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_convection/plate.parent.i)
# This tests a temperature and heat transfer coefficient using the MultiApp system.
# Simple heat conduction problem with heat source is solved,
# to obtain an analytical solution:
# T(x,t) = 300 + 20t(x-1)^2
# The temperature is picked up by the child
# side of the solve, to use as ambiant temperature in a convective BC.
htc = 100
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[left_bc_fn]
type = PiecewiseLinear
x = '0 10'
y = '300 500'
[]
[]
[Variables]
[T]
[]
[]
[AuxVariables]
[htc_ext]
initial_condition = ${htc}
[]
[]
[Functions]
[source_term]
type = ParsedFunction
expression = '20 * x * x - 40 * x + 20 - 40 * t'
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADDiffusion
variable = T
[]
[source]
type = BodyForce
function = 'source_term'
variable = T
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = left
function = left_bc_fn
[]
[right]
type = NeumannBC
variable = T
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 10
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = plate.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[T_to_child]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = T
variable = T_ext
[]
[htc_to_child]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = htc_ext
variable = htc_ext
[]
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/general_field/shape_evaluation/boundary/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.5 & y < 0.5'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# The subapp mesh is a 0.3-sized cube, no overlap
positions = '0.2222 0 0 0.61111 0.311111 0.31111 0.76666 0.111111 0.81111'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
# Facilitates debugging
output_in_position = true
[]
[]
[Transfers]
# Boundary restrictions are added in the tests specification
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
extrapolation_constant = -1
[]
[]
(tutorials/tutorial02_multiapps/step01_multiapps/06_parent_twoapps.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 40
nz = 40
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
perf_graph = true
[]
[MultiApps]
[app1]
type = TransientMultiApp
positions = '0 0 0 1 0 0 2 0 0'
input_files = '06_sub_twoapps.i'
[]
[app2]
type = TransientMultiApp
positions = '0 0 0 1 0 0'
input_files = '06_sub_twoapps.i'
[]
[]
(test/tests/multiapps/restart_subapp_ic/parent2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub2.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
[Problem]
restart_file_base = parent_out_cp/0005
[]
(tutorials/tutorial02_multiapps/step01_multiapps/07_parent_multilevel.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 40
nz = 40
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
perf_graph = true
[]
[MultiApps]
[uno]
type = TransientMultiApp
positions = '0 0 0 1 0 0'
input_files = '07_sub_multilevel.i'
[]
[]
(test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/boundary_tosub_parent.i)
[Mesh]
file = 2blk.e
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left_1]
type = DirichletBC
variable = u
boundary = '1'
value = 4
[]
[left_2]
type = DirichletBC
variable = u
boundary = '2'
value = 3
[]
[right_3]
type = DirichletBC
variable = u
boundary = '3'
value = 2
[]
[right_4]
type = DirichletBC
variable = u
boundary = '4'
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 -4 0'
input_files = boundary_tosub_sub.i
[]
[]
[Transfers]
[to_sub_1]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
from_boundaries = '1'
variable = from_parent_1
[]
[to_sub_2]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
from_boundaries = '2'
variable = from_parent_2
[]
[to_sub_3]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
from_boundaries = '3'
variable = from_parent_3
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[to_sub_4]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
from_boundaries = '4'
variable = from_parent_4
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[]
(test/tests/multiapps/sub_cycling/main_negative.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = -1.0
end_time = 0
dt = 0.5
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
sub_cycling = true
[../]
[]
(test/tests/multiapps/sub_cycling_failure/parent_gold.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Functions]
# These mimic the behavior of the failing solve
[./dts]
type = PiecewiseLinear
x = '0 0.1 0.15'
y = '0.1 0.05 0.1'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.1
[./TimeStepper]
type = FunctionDT
function = dts
[../]
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub_gold.i
sub_cycling = true
[../]
[]
(test/tests/transfers/transfer_on_final/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
initial_condition = 1234
[]
[v]
initial_condition = 2458
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 4
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[sub]
type = TransientMultiApp
input_files = sub.i
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Transfers]
[from_sub]
type = MultiAppCopyTransfer
source_variable = u
variable = u
from_multi_app = sub
check_multiapp_execute_on = false
execute_on = 'FINAL'
[]
[to_sub]
type = MultiAppCopyTransfer
source_variable = v
variable = v
to_multi_app = sub
check_multiapp_execute_on = false
execute_on = 'FINAL'
[]
[]
[Outputs]
exodus = true
[final]
type = Exodus
execute_on = 'FINAL'
execute_input_on = 'NONE' # This is needed to avoid problems with creating a file w/o data during --recover testing
[]
[]
(test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/tosub_displaced_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0.48 0 0'
input_files = tosub_displaced_sub.i
[../]
[]
[Transfers]
[./to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = from_parent
displaced_target_mesh = true
[../]
[./elemental_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = elemental_from_parent
displaced_target_mesh = true
[../]
[]
(test/tests/multiapps/sub_cycling/parent_sub_output.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
sub_cycling = true
output_sub_cycles = true
[../]
[]
(test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/fromsub_displaced_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[from_sub]
[]
[elemental_from_sub]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.48 0 0 -1.01 0 0'
input_files = fromsub_displaced_sub.i
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = u
variable = from_sub
displaced_source_mesh = true
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[elemental_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = u
variable = elemental_from_sub
displaced_source_mesh = true
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[]
(test/tests/multiapps/application_block_multiapps/application_block_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0'
input_files = application_block_sub.i
output_in_position = true
move_time = 0.05
move_positions = '2 2 0'
move_apps = 0
[]
[]
(test/tests/multiapps/reset/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
reset_apps = 0
reset_time = 0.05
[../]
[]
(test/tests/transfers/multiapp_mesh_function_transfer/fromsub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[transferred_u]
[]
[elemental_transferred_u]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
positions = '.099 .099 0 .599 .599 0 0.599 0.099 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = fromsub_sub.i
[]
[]
[Transfers]
[from_sub]
source_variable = 'sub_u sub_u'
variable = 'transferred_u elemental_transferred_u'
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
[]
[]
(test/tests/transfers/multiapp_userobject_transfer/tosub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
# The MultiAppUserObjectTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average_value]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
execute_on = timestep_end
positions = '0.3 0.1 0.3 0.7 0.1 0.3'
type = TransientMultiApp
input_files = tosub_sub.i
app_type = MooseTestApp
[../]
[]
[Transfers]
[./layered_transfer]
user_object = layered_average
variable = multi_layered_average
type = MultiAppUserObjectTransfer
to_multi_app = sub_app
skip_coordinate_collapsing = true
[../]
[./element_layered_transfer]
user_object = layered_average
variable = element_multi_layered_average
type = MultiAppUserObjectTransfer
to_multi_app = sub_app
skip_coordinate_collapsing = true
[../]
[]
(test/tests/outputs/console/multiapp/picard_parent_both.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v_begin]
[]
[v_end]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u_begin]
type = CoupledForce
variable = u
v = v_begin
[]
[force_u_end]
type = CoupledForce
variable = u
v = v_end
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[]
[MultiApps]
[sub_begin]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
[]
[sub_end]
type = TransientMultiApp
app_type = MooseTestApp
positions = '1 1 1'
input_files = picard_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[v_from_sub_begin]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_begin
source_variable = v
variable = v_begin
[]
[u_to_sub_begin]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub_begin
source_variable = u
variable = u
[]
[v_from_sub_end]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_end
source_variable = v
variable = v_end
[]
[u_to_sub_end]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub_end
source_variable = u
variable = u
[]
[]
(test/tests/transfers/multiapp_userobject_transfer/main_nearest_sub_app.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
# The MultiAppUserObjectTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./multi_layered_average]
[../]
[./element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001 # This will be constrained by the multiapp
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_tol = 1e-8
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
positions = '0.3 0.1 0.3 0.7 0.1 0.3'
type = TransientMultiApp
input_files = sub.i
app_type = MooseTestApp
[../]
[]
[Transfers]
[./layered_transfer]
direction = from_multiapp
user_object = layered_average
variable = multi_layered_average
type = MultiAppUserObjectTransfer
multi_app = sub_app
nearest_sub_app = true
[../]
[./element_layered_transfer]
direction = from_multiapp
user_object = layered_average
variable = element_multi_layered_average
type = MultiAppUserObjectTransfer
multi_app = sub_app
nearest_sub_app = true
[../]
[]
(test/tests/outputs/console/multiapp/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/multiapps/move_and_reset/multilevel_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0'
input_files = multilevel_sub.i
output_in_position = true
reset_apps = 0
reset_time = 0.05
move_time = 0.05
move_positions = '2 2 0'
move_apps = 0
[../]
[]
(test/tests/transfers/general_field/nearest_node/boundary/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.5 & y < 0.5'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# The subapp mesh is a 0.3-sized cube, no overlap
positions = '0.2222 0.00002 0.0001 0.61111 0.311111 0.31211 0.76666 0.111114 0.81111'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
# Facilitates debugging
output_in_position = true
[]
[]
[Transfers]
# Boundary restrictions are added in the tests specification
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
[]
[to_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
[]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
[]
[from_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
[]
[]
(modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/porous_flow.i)
#########################################
# #
# File written by create_input_files.py #
# #
#########################################
# PorousFlow simulation of injection and production in a simplified GeoTES aquifer
# Much of this file is standard porous-flow stuff. The unusual aspects are:
# - transfer of the rates of changes of each species (kg.s) to the aquifer_geochemistry.i simulation. This is achieved by saving these changes from the PorousFlowMassTimeDerivative residuals
# - transfer of the temperature field to the aquifer_geochemistry.i simulation
# Interesting behaviour can be simulated by this file without its 'parent' simulation, exchanger.i. exchanger.i provides mass-fractions injected via the injection_rate_massfrac_* variables, but since these are more-or-less constant throughout the duration of the exchanger.i simulation, the initial_conditions specified below may be used. Similar, exchanger.i provides injection_temperature, but that is also constant.
injection_rate = -0.02 # kg/s/m, negative because injection as a source
production_rate = 0.02 # kg/s/m, this is about the maximum that can be sustained by the aquifer, with its fairly low permeability, without porepressure becoming negative
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -75
xmax = 75
ymin = 0
ymax = 40
zmin = -25
zmax = 25
nx = 15
ny = 4
nz = 5
[]
[aquifer]
type = ParsedSubdomainMeshGenerator
input = gen
block_id = 1
block_name = aquifer
combinatorial_geometry = 'z >= -5 & z <= 5'
[]
[injection_nodes]
input = aquifer
type = ExtraNodesetGenerator
new_boundary = injection_nodes
coord = '-25 0 -5; -25 0 5'
[]
[production_nodes]
input = injection_nodes
type = ExtraNodesetGenerator
new_boundary = production_nodes
coord = '25 0 -5; 25 0 5'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 -10'
[]
[BCs]
[injection_temperature]
type = MatchedValueBC
variable = temperature
v = injection_temperature
boundary = injection_nodes
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000
cv = 4000.0
cp = 4000.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
mass_fraction_vars = 'f_H f_Cl f_SO4 f_HCO3 f_SiO2aq f_Al f_Ca f_Mg f_Fe f_K f_Na f_Sr f_F f_BOH f_Br f_Ba f_Li f_NO3 f_O2aq '
save_component_rate_in = 'rate_H rate_Cl rate_SO4 rate_HCO3 rate_SiO2aq rate_Al rate_Ca rate_Mg rate_Fe rate_K rate_Na rate_Sr rate_F rate_BOH rate_Br rate_Ba rate_Li rate_NO3 rate_O2aq rate_H2O' # change in kg at every node / dt
fp = the_simple_fluid
temperature_unit = Celsius
[]
[Materials]
[porosity_caps]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
block = 0
porosity = 0.01
[]
[porosity_aquifer]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
block = aquifer
porosity = 0.063
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = 0
permeability = '1E-18 0 0 0 1E-18 0 0 0 1E-18'
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1.7E-15 0 0 0 1.7E-15 0 0 0 4.1E-16'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[]
[Preconditioning]
active = typically_efficient
[typically_efficient]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = ' hypre boomeramg'
[]
[strong]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm ilu NONZERO 2'
[]
[probably_too_strong]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
[TimeStepper]
type = FunctionDT
function = 'min(3E4, max(1E4, 0.2 * t))'
[]
[]
[Outputs]
exodus = true
[]
[Variables]
[f_H]
initial_condition = -2.952985071156e-06
[]
[f_Cl]
initial_condition = 0.04870664551708
[]
[f_SO4]
initial_condition = 0.0060359986852517
[]
[f_HCO3]
initial_condition = 5.0897287594019e-05
[]
[f_SiO2aq]
initial_condition = 3.0246609868421e-05
[]
[f_Al]
initial_condition = 3.268028901929e-08
[]
[f_Ca]
initial_condition = 0.00082159428184586
[]
[f_Mg]
initial_condition = 1.8546347062146e-05
[]
[f_Fe]
initial_condition = 4.3291908204093e-05
[]
[f_K]
initial_condition = 6.8434768308898e-05
[]
[f_Na]
initial_condition = 0.033298053919671
[]
[f_Sr]
initial_condition = 1.2771866652177e-05
[]
[f_F]
initial_condition = 5.5648860174073e-06
[]
[f_BOH]
initial_condition = 0.0003758574621917
[]
[f_Br]
initial_condition = 9.0315286107068e-05
[]
[f_Ba]
initial_condition = 1.5637460875161e-07
[]
[f_Li]
initial_condition = 8.3017067912701e-05
[]
[f_NO3]
initial_condition = 0.00010958455036169
[]
[f_O2aq]
initial_condition = -7.0806852373351e-05
[]
[porepressure]
initial_condition = 30E6
[]
[temperature]
initial_condition = 92
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[]
[]
[DiracKernels]
[inject_H]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_H
point_file = injection.bh
variable = f_H
[]
[inject_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Cl
point_file = injection.bh
variable = f_Cl
[]
[inject_SO4]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_SO4
point_file = injection.bh
variable = f_SO4
[]
[inject_HCO3]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_HCO3
point_file = injection.bh
variable = f_HCO3
[]
[inject_SiO2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_SiO2aq
point_file = injection.bh
variable = f_SiO2aq
[]
[inject_Al]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Al
point_file = injection.bh
variable = f_Al
[]
[inject_Ca]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Ca
point_file = injection.bh
variable = f_Ca
[]
[inject_Mg]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Mg
point_file = injection.bh
variable = f_Mg
[]
[inject_Fe]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Fe
point_file = injection.bh
variable = f_Fe
[]
[inject_K]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_K
point_file = injection.bh
variable = f_K
[]
[inject_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Na
point_file = injection.bh
variable = f_Na
[]
[inject_Sr]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Sr
point_file = injection.bh
variable = f_Sr
[]
[inject_F]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_F
point_file = injection.bh
variable = f_F
[]
[inject_BOH]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_BOH
point_file = injection.bh
variable = f_BOH
[]
[inject_Br]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Br
point_file = injection.bh
variable = f_Br
[]
[inject_Ba]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Ba
point_file = injection.bh
variable = f_Ba
[]
[inject_Li]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Li
point_file = injection.bh
variable = f_Li
[]
[inject_NO3]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_NO3
point_file = injection.bh
variable = f_NO3
[]
[inject_O2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_O2aq
point_file = injection.bh
variable = f_O2aq
[]
[inject_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_H2O
point_file = injection.bh
variable = porepressure
[]
[produce_H]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 0
point_file = production.bh
variable = f_H
[]
[produce_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Cl
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 1
point_file = production.bh
variable = f_Cl
[]
[produce_SO4]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SO4
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 2
point_file = production.bh
variable = f_SO4
[]
[produce_HCO3]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_HCO3
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 3
point_file = production.bh
variable = f_HCO3
[]
[produce_SiO2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SiO2aq
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 4
point_file = production.bh
variable = f_SiO2aq
[]
[produce_Al]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Al
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 5
point_file = production.bh
variable = f_Al
[]
[produce_Ca]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Ca
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 6
point_file = production.bh
variable = f_Ca
[]
[produce_Mg]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Mg
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 7
point_file = production.bh
variable = f_Mg
[]
[produce_Fe]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Fe
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 8
point_file = production.bh
variable = f_Fe
[]
[produce_K]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_K
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 9
point_file = production.bh
variable = f_K
[]
[produce_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Na
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 10
point_file = production.bh
variable = f_Na
[]
[produce_Sr]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Sr
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 11
point_file = production.bh
variable = f_Sr
[]
[produce_F]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_F
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 12
point_file = production.bh
variable = f_F
[]
[produce_BOH]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_BOH
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 13
point_file = production.bh
variable = f_BOH
[]
[produce_Br]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Br
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 14
point_file = production.bh
variable = f_Br
[]
[produce_Ba]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Ba
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 15
point_file = production.bh
variable = f_Ba
[]
[produce_Li]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Li
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 16
point_file = production.bh
variable = f_Li
[]
[produce_NO3]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_NO3
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 17
point_file = production.bh
variable = f_NO3
[]
[produce_O2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_O2aq
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 18
point_file = production.bh
variable = f_O2aq
[]
[produce_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H2O
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 19
point_file = production.bh
variable = porepressure
[]
[produce_heat]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_heat
fluxes = ${production_rate}
p_or_t_vals = 0.0
use_enthalpy = true
point_file = production.bh
variable = temperature
[]
[]
[UserObjects]
[injected_mass]
type = PorousFlowSumQuantity
[]
[produced_mass_H]
type = PorousFlowSumQuantity
[]
[produced_mass_Cl]
type = PorousFlowSumQuantity
[]
[produced_mass_SO4]
type = PorousFlowSumQuantity
[]
[produced_mass_HCO3]
type = PorousFlowSumQuantity
[]
[produced_mass_SiO2aq]
type = PorousFlowSumQuantity
[]
[produced_mass_Al]
type = PorousFlowSumQuantity
[]
[produced_mass_Ca]
type = PorousFlowSumQuantity
[]
[produced_mass_Mg]
type = PorousFlowSumQuantity
[]
[produced_mass_Fe]
type = PorousFlowSumQuantity
[]
[produced_mass_K]
type = PorousFlowSumQuantity
[]
[produced_mass_Na]
type = PorousFlowSumQuantity
[]
[produced_mass_Sr]
type = PorousFlowSumQuantity
[]
[produced_mass_F]
type = PorousFlowSumQuantity
[]
[produced_mass_BOH]
type = PorousFlowSumQuantity
[]
[produced_mass_Br]
type = PorousFlowSumQuantity
[]
[produced_mass_Ba]
type = PorousFlowSumQuantity
[]
[produced_mass_Li]
type = PorousFlowSumQuantity
[]
[produced_mass_NO3]
type = PorousFlowSumQuantity
[]
[produced_mass_O2aq]
type = PorousFlowSumQuantity
[]
[produced_mass_H2O]
type = PorousFlowSumQuantity
[]
[produced_heat]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
execute_on = TIMESTEP_BEGIN
[]
[tot_kg_injected_this_timestep]
type = PorousFlowPlotQuantity
uo = injected_mass
[]
[kg_H_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H
[]
[kg_Cl_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Cl
[]
[kg_SO4_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SO4
[]
[kg_HCO3_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_HCO3
[]
[kg_SiO2aq_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SiO2aq
[]
[kg_Al_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Al
[]
[kg_Ca_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Ca
[]
[kg_Mg_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Mg
[]
[kg_Fe_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Fe
[]
[kg_K_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_K
[]
[kg_Na_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Na
[]
[kg_Sr_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Sr
[]
[kg_F_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_F
[]
[kg_BOH_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_BOH
[]
[kg_Br_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Br
[]
[kg_Ba_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Ba
[]
[kg_Li_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Li
[]
[kg_NO3_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_NO3
[]
[kg_O2aq_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_O2aq
[]
[kg_H2O_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H2O
[]
[mole_rate_H_produced]
type = FunctionValuePostprocessor
function = moles_H
indirect_dependencies = 'kg_H_produced_this_timestep dt'
[]
[mole_rate_Cl_produced]
type = FunctionValuePostprocessor
function = moles_Cl
indirect_dependencies = 'kg_Cl_produced_this_timestep dt'
[]
[mole_rate_SO4_produced]
type = FunctionValuePostprocessor
function = moles_SO4
indirect_dependencies = 'kg_SO4_produced_this_timestep dt'
[]
[mole_rate_HCO3_produced]
type = FunctionValuePostprocessor
function = moles_HCO3
indirect_dependencies = 'kg_HCO3_produced_this_timestep dt'
[]
[mole_rate_SiO2aq_produced]
type = FunctionValuePostprocessor
function = moles_SiO2aq
indirect_dependencies = 'kg_SiO2aq_produced_this_timestep dt'
[]
[mole_rate_Al_produced]
type = FunctionValuePostprocessor
function = moles_Al
indirect_dependencies = 'kg_Al_produced_this_timestep dt'
[]
[mole_rate_Ca_produced]
type = FunctionValuePostprocessor
function = moles_Ca
indirect_dependencies = 'kg_Ca_produced_this_timestep dt'
[]
[mole_rate_Mg_produced]
type = FunctionValuePostprocessor
function = moles_Mg
indirect_dependencies = 'kg_Mg_produced_this_timestep dt'
[]
[mole_rate_Fe_produced]
type = FunctionValuePostprocessor
function = moles_Fe
indirect_dependencies = 'kg_Fe_produced_this_timestep dt'
[]
[mole_rate_K_produced]
type = FunctionValuePostprocessor
function = moles_K
indirect_dependencies = 'kg_K_produced_this_timestep dt'
[]
[mole_rate_Na_produced]
type = FunctionValuePostprocessor
function = moles_Na
indirect_dependencies = 'kg_Na_produced_this_timestep dt'
[]
[mole_rate_Sr_produced]
type = FunctionValuePostprocessor
function = moles_Sr
indirect_dependencies = 'kg_Sr_produced_this_timestep dt'
[]
[mole_rate_F_produced]
type = FunctionValuePostprocessor
function = moles_F
indirect_dependencies = 'kg_F_produced_this_timestep dt'
[]
[mole_rate_BOH_produced]
type = FunctionValuePostprocessor
function = moles_BOH
indirect_dependencies = 'kg_BOH_produced_this_timestep dt'
[]
[mole_rate_Br_produced]
type = FunctionValuePostprocessor
function = moles_Br
indirect_dependencies = 'kg_Br_produced_this_timestep dt'
[]
[mole_rate_Ba_produced]
type = FunctionValuePostprocessor
function = moles_Ba
indirect_dependencies = 'kg_Ba_produced_this_timestep dt'
[]
[mole_rate_Li_produced]
type = FunctionValuePostprocessor
function = moles_Li
indirect_dependencies = 'kg_Li_produced_this_timestep dt'
[]
[mole_rate_NO3_produced]
type = FunctionValuePostprocessor
function = moles_NO3
indirect_dependencies = 'kg_NO3_produced_this_timestep dt'
[]
[mole_rate_O2aq_produced]
type = FunctionValuePostprocessor
function = moles_O2aq
indirect_dependencies = 'kg_O2aq_produced_this_timestep dt'
[]
[mole_rate_H2O_produced]
type = FunctionValuePostprocessor
function = moles_H2O
indirect_dependencies = 'kg_H2O_produced_this_timestep dt'
[]
[heat_joules_extracted_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_heat
[]
[production_temperature]
type = AverageNodalVariableValue
boundary = production_nodes
variable = temperature
[]
[]
[Functions]
[moles_H]
type = ParsedFunction
symbol_names = 'kg_H dt'
symbol_values = 'kg_H_produced_this_timestep dt'
expression = 'kg_H * 1000 / 1.0079 / dt'
[]
[moles_Cl]
type = ParsedFunction
symbol_names = 'kg_Cl dt'
symbol_values = 'kg_Cl_produced_this_timestep dt'
expression = 'kg_Cl * 1000 / 35.453 / dt'
[]
[moles_SO4]
type = ParsedFunction
symbol_names = 'kg_SO4 dt'
symbol_values = 'kg_SO4_produced_this_timestep dt'
expression = 'kg_SO4 * 1000 / 96.0576 / dt'
[]
[moles_HCO3]
type = ParsedFunction
symbol_names = 'kg_HCO3 dt'
symbol_values = 'kg_HCO3_produced_this_timestep dt'
expression = 'kg_HCO3 * 1000 / 61.0171 / dt'
[]
[moles_SiO2aq]
type = ParsedFunction
symbol_names = 'kg_SiO2aq dt'
symbol_values = 'kg_SiO2aq_produced_this_timestep dt'
expression = 'kg_SiO2aq * 1000 / 60.0843 / dt'
[]
[moles_Al]
type = ParsedFunction
symbol_names = 'kg_Al dt'
symbol_values = 'kg_Al_produced_this_timestep dt'
expression = 'kg_Al * 1000 / 26.9815 / dt'
[]
[moles_Ca]
type = ParsedFunction
symbol_names = 'kg_Ca dt'
symbol_values = 'kg_Ca_produced_this_timestep dt'
expression = 'kg_Ca * 1000 / 40.08 / dt'
[]
[moles_Mg]
type = ParsedFunction
symbol_names = 'kg_Mg dt'
symbol_values = 'kg_Mg_produced_this_timestep dt'
expression = 'kg_Mg * 1000 / 24.305 / dt'
[]
[moles_Fe]
type = ParsedFunction
symbol_names = 'kg_Fe dt'
symbol_values = 'kg_Fe_produced_this_timestep dt'
expression = 'kg_Fe * 1000 / 55.847 / dt'
[]
[moles_K]
type = ParsedFunction
symbol_names = 'kg_K dt'
symbol_values = 'kg_K_produced_this_timestep dt'
expression = 'kg_K * 1000 / 39.0983 / dt'
[]
[moles_Na]
type = ParsedFunction
symbol_names = 'kg_Na dt'
symbol_values = 'kg_Na_produced_this_timestep dt'
expression = 'kg_Na * 1000 / 22.9898 / dt'
[]
[moles_Sr]
type = ParsedFunction
symbol_names = 'kg_Sr dt'
symbol_values = 'kg_Sr_produced_this_timestep dt'
expression = 'kg_Sr * 1000 / 87.62 / dt'
[]
[moles_F]
type = ParsedFunction
symbol_names = 'kg_F dt'
symbol_values = 'kg_F_produced_this_timestep dt'
expression = 'kg_F * 1000 / 18.9984 / dt'
[]
[moles_BOH]
type = ParsedFunction
symbol_names = 'kg_BOH dt'
symbol_values = 'kg_BOH_produced_this_timestep dt'
expression = 'kg_BOH * 1000 / 61.8329 / dt'
[]
[moles_Br]
type = ParsedFunction
symbol_names = 'kg_Br dt'
symbol_values = 'kg_Br_produced_this_timestep dt'
expression = 'kg_Br * 1000 / 79.904 / dt'
[]
[moles_Ba]
type = ParsedFunction
symbol_names = 'kg_Ba dt'
symbol_values = 'kg_Ba_produced_this_timestep dt'
expression = 'kg_Ba * 1000 / 137.33 / dt'
[]
[moles_Li]
type = ParsedFunction
symbol_names = 'kg_Li dt'
symbol_values = 'kg_Li_produced_this_timestep dt'
expression = 'kg_Li * 1000 / 6.941 / dt'
[]
[moles_NO3]
type = ParsedFunction
symbol_names = 'kg_NO3 dt'
symbol_values = 'kg_NO3_produced_this_timestep dt'
expression = 'kg_NO3 * 1000 / 62.0049 / dt'
[]
[moles_O2aq]
type = ParsedFunction
symbol_names = 'kg_O2aq dt'
symbol_values = 'kg_O2aq_produced_this_timestep dt'
expression = 'kg_O2aq * 1000 / 31.9988 / dt'
[]
[moles_H2O]
type = ParsedFunction
symbol_names = 'kg_H2O dt'
symbol_values = 'kg_H2O_produced_this_timestep dt'
expression = 'kg_H2O * 1000 / 18.01801802 / dt'
[]
[]
[AuxVariables]
[injection_temperature]
initial_condition = 92
[]
[injection_rate_massfrac_H]
initial_condition = -2.952985071156e-06
[]
[injection_rate_massfrac_Cl]
initial_condition = 0.04870664551708
[]
[injection_rate_massfrac_SO4]
initial_condition = 0.0060359986852517
[]
[injection_rate_massfrac_HCO3]
initial_condition = 5.0897287594019e-05
[]
[injection_rate_massfrac_SiO2aq]
initial_condition = 3.0246609868421e-05
[]
[injection_rate_massfrac_Al]
initial_condition = 3.268028901929e-08
[]
[injection_rate_massfrac_Ca]
initial_condition = 0.00082159428184586
[]
[injection_rate_massfrac_Mg]
initial_condition = 1.8546347062146e-05
[]
[injection_rate_massfrac_Fe]
initial_condition = 4.3291908204093e-05
[]
[injection_rate_massfrac_K]
initial_condition = 6.8434768308898e-05
[]
[injection_rate_massfrac_Na]
initial_condition = 0.033298053919671
[]
[injection_rate_massfrac_Sr]
initial_condition = 1.2771866652177e-05
[]
[injection_rate_massfrac_F]
initial_condition = 5.5648860174073e-06
[]
[injection_rate_massfrac_BOH]
initial_condition = 0.0003758574621917
[]
[injection_rate_massfrac_Br]
initial_condition = 9.0315286107068e-05
[]
[injection_rate_massfrac_Ba]
initial_condition = 1.5637460875161e-07
[]
[injection_rate_massfrac_Li]
initial_condition = 8.3017067912701e-05
[]
[injection_rate_massfrac_NO3]
initial_condition = 0.00010958455036169
[]
[injection_rate_massfrac_O2aq]
initial_condition = -7.0806852373351e-05
[]
[injection_rate_massfrac_H2O]
initial_condition = 0.91032275033842
[]
[rate_H]
[]
[rate_Cl]
[]
[rate_SO4]
[]
[rate_HCO3]
[]
[rate_SiO2aq]
[]
[rate_Al]
[]
[rate_Ca]
[]
[rate_Mg]
[]
[rate_Fe]
[]
[rate_K]
[]
[rate_Na]
[]
[rate_Sr]
[]
[rate_F]
[]
[rate_BOH]
[]
[rate_Br]
[]
[rate_Ba]
[]
[rate_Li]
[]
[rate_NO3]
[]
[rate_O2aq]
[]
[rate_H2O]
[]
[]
[MultiApps]
[react]
type = TransientMultiApp
input_files = aquifer_geochemistry.i
clone_master_mesh = true
execute_on = 'timestep_end'
[]
[]
[Transfers]
[changes_due_to_flow]
type = MultiAppCopyTransfer
source_variable = 'rate_H rate_Cl rate_SO4 rate_HCO3 rate_SiO2aq rate_Al rate_Ca rate_Mg rate_Fe rate_K rate_Na rate_Sr rate_F rate_BOH rate_Br rate_Ba rate_Li rate_NO3 rate_O2aq rate_H2O temperature'
variable = 'pf_rate_H pf_rate_Cl pf_rate_SO4 pf_rate_HCO3 pf_rate_SiO2aq pf_rate_Al pf_rate_Ca pf_rate_Mg pf_rate_Fe pf_rate_K pf_rate_Na pf_rate_Sr pf_rate_F pf_rate_BOH pf_rate_Br pf_rate_Ba pf_rate_Li pf_rate_NO3 pf_rate_O2aq pf_rate_H2O temperature'
to_multi_app = react
[]
[massfrac_from_geochem]
type = MultiAppCopyTransfer
source_variable = 'massfrac_H massfrac_Cl massfrac_SO4 massfrac_HCO3 massfrac_SiO2aq massfrac_Al massfrac_Ca massfrac_Mg massfrac_Fe massfrac_K massfrac_Na massfrac_Sr massfrac_F massfrac_BOH massfrac_Br massfrac_Ba massfrac_Li massfrac_NO3 massfrac_O2aq '
variable = 'f_H f_Cl f_SO4 f_HCO3 f_SiO2aq f_Al f_Ca f_Mg f_Fe f_K f_Na f_Sr f_F f_BOH f_Br f_Ba f_Li f_NO3 f_O2aq '
from_multi_app = react
[]
[]
(test/tests/controls/pid_control/pid_pp_control.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
inactive = 'exception'
[diff]
type = CoefDiffusion
variable = u
coef = 1
[]
[exception]
type = NanKernel
variable = 'u'
timestep_to_nan = 2
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = 3
postprocessor = received_bc
[]
[right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Functions]
[conditional_function]
type = ParsedFunction
expression = 't >= 1.9 & t < 2.1'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 20
dt = 1
nl_abs_tol = 1e-10
line_search = 'none'
# For picard tests
picard_abs_tol = 1e-3
[]
[Postprocessors]
[integral]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[]
[received_bc]
type = Receiver
default = 0
[]
[]
[Controls]
inactive = 'make_crash'
[integral_value]
type = PIDTransientControl
postprocessor = integral
target = 1.5
parameter_pp = 'received_bc'
K_integral = -1
K_proportional = -1
K_derivative = -0.1
execute_on = 'initial timestep_begin'
[]
[make_crash]
type = ConditionalFunctionEnableControl
enable_objects = 'Kernels::exception'
conditional_function = 'conditional_function'
execute_on = 'timestep_begin'
[]
[]
[MultiApps]
inactive = 'shortest_app'
[shortest_app]
type = TransientMultiApp
input_files = 'pid_pp_control_subapp.i'
[]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(test/tests/transfers/general_field/shape_evaluation/subdomain/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.6 & y < 0.5'
block_id = 1
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
[]
execute_on = 'TIMESTEP_END'
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# Offsets are added to make sure there are no equidistant nodes / transfer indetermination
positions = '0 0 0 0.41111 0.28111 0 0.7232323 0.12323 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[]
(test/tests/transfers/multiapp_userobject_transfer/parent.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
# The MultiAppUserObjectTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./multi_layered_average]
[../]
[./element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001 # This will be constrained by the multiapp
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_tol = 1e-8
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
positions = '0.3 0.1 0.3 0.7 0.1 0.3'
type = TransientMultiApp
input_files = sub.i
app_type = MooseTestApp
[../]
[]
[Transfers]
[./layered_transfer]
user_object = layered_average
variable = multi_layered_average
type = MultiAppUserObjectTransfer
from_multi_app = sub_app
skip_coordinate_collapsing = true
[../]
[./element_layered_transfer]
user_object = layered_average
variable = element_multi_layered_average
type = MultiAppUserObjectTransfer
from_multi_app = sub_app
skip_coordinate_collapsing = true
[../]
[]
(test/tests/transfers/multiapp_nearest_node_transfer/two_way_many_apps_parent.i)
# In this test, the parent App is a 10x10 grid on the unit square, and
# there are 5 Sub Apps which correspond to each vertex of the unit square
# and the center, arranged in the following order:
# 3 4
# 2
# 0 1
# Sub Apps 0, 1, 3, and 4 currently overlap with a single element in
# each corner of the parent App, while Sub App 2 overlaps with 4
# parent App elements in the center. Note that we move the corner Sub
# Apps "outward" slightly along the diagonals to avoid ambiguity with
# which child app is "nearest" to a given parent App element centroid.
# This makes it easier to visually verify that the Transfers are
# working correctly.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[from_sub]
[]
[elemental_from_sub]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
# Note, in case you want to modify this test. It is important that there are
# an odd number of apps because this way we will catch errors caused by load
# imbalances with our -p 2 tests.
type = TransientMultiApp
app_type = MooseTestApp
positions = '-0.11 -0.11 0.0
0.91 -0.11 0.0
0.4 0.4 0.0
-0.11 0.91 0.0
0.91 0.91 0.0'
input_files = two_way_many_apps_sub.i
execute_on = timestep_end
[]
[]
[Transfers]
[from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
variable = from_sub
[]
[elemental_from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
variable = elemental_from_sub
[]
[to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = from_parent
[]
[elemental_to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = elemental_from_parent
[]
[]
(test/tests/transfers/multiapp_copy_transfer/vector-variable-transfer/parent_L2_LagrangeVec.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
[]
[Problem]
solve = false
[]
[AuxVariables]
[sent_vector]
family = LAGRANGE_VEC
order = FIRST
[]
[]
[Functions]
[set_sent_vector]
type = ParsedVectorFunction
expression_x = '100*x*x'
expression_y = '100*y*y'
expression_z = '100*z*z'
[]
[]
[ICs]
# Set sent vector. We will check this in the subapp.
[set_sent_vector]
type = VectorFunctionIC
variable = sent_vector
function = set_sent_vector
[]
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = 'sub_L2_LagrangeVec.i'
execute_on = timestep_begin
[]
[]
[Transfers]
[push]
type = MultiAppCopyTransfer
to_multi_app = sub_app
source_variable = 'sent_vector'
variable = 'received_vector'
[]
[]
[Executioner]
type = Transient
dt = 1.0
start_time = 0.0
end_time = 1.0
[]
(test/tests/multiapps/multilevel/time_dt_from_parent_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 100
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[./console]
type = Console
output_file = true
[../]
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.5 0.5 0'
input_files = time_dt_from_parent_subsub.i
[../]
[]
(test/tests/transfers/multiapp_variable_value_sample_transfer/pp_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./pp_sub]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = pp_sub.i
[../]
[]
[Transfers]
[./sample_pp_transfer]
source_variable = u
postprocessor = from_parent
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = pp_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/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/master.i)
# This tests an action used to exchange T_wall, T_fluid and HTC between
# a heat conduction simulation and a THM simulation
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 0.1
nx = 2
ymax = 1
ny = 10
parallel_type = replicated
coord_type = RZ
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[AuxVariables]
[T_fluid]
family = MONOMIAL
order = CONSTANT
initial_condition = 300
[]
[htc]
family = MONOMIAL
order = CONSTANT
initial_condition = 0
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[CoupledHeatTransfers]
[right]
boundary = right
T_fluid = 'T_fluid'
T = T
T_wall = T_wall
htc = 'htc'
multi_app = thm
T_fluid_user_objects = 'T_uo'
htc_user_objects = 'Hw_uo'
position = '0 0 0'
orientation = '0 1 0'
length = 1
n_elems = 10
skip_coordinate_collapsing = true
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 10
nl_abs_tol = 1e-10
abort_on_solve_fail = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = sub.i
execute_on = 'TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[T_wall_avg]
type = SideAverageValue
variable = T
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_fluid_avg]
type = ElementAverageValue
variable = T_fluid
execute_on = 'INITIAL TIMESTEP_END'
[]
[htc_avg]
type = ElementAverageValue
variable = htc
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(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
[../]
[]
(test/tests/transfers/multiapp_postprocessor_to_scalar/between_multiapp/main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.01
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
[]
[MultiApps]
[pp_sub_0]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub0.i
[]
[pp_sub_1]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub1.i
[]
[]
[Transfers]
[pp_transfer_1]
type = MultiAppPostprocessorToAuxScalarTransfer
from_multi_app = pp_sub_0
to_multi_app = pp_sub_1
from_postprocessor = average_0
to_aux_scalar = from_0
[]
[pp_transfer_2]
type = MultiAppPostprocessorToAuxScalarTransfer
from_multi_app = pp_sub_1
to_multi_app = pp_sub_0
from_postprocessor = average_1
to_aux_scalar = from_1
[]
[]
(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/standard_use/interface_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = 0.1
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = 0.1
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1.0
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 = interface_sub.i
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(test/tests/transfers/multiapp_postprocessor_transfer/parent_from_multiapp.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./from_sub]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./sub_average]
type = Receiver
[../]
[./sub_sum]
type = Receiver
[../]
[./sub_maximum]
type = Receiver
[../]
[./sub_minimum]
type = Receiver
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
positions = '0.2 0.2 0 0.7 0.7 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'sub0.i sub1.i'
[../]
[]
[Transfers]
[./pp_transfer_ave]
type = MultiAppPostprocessorTransfer
reduction_type = average
from_multi_app = sub
from_postprocessor = average
to_postprocessor = sub_average
[../]
[./pp_transfer_sum]
type = MultiAppPostprocessorTransfer
reduction_type = sum
from_multi_app = sub
from_postprocessor = average
to_postprocessor = sub_sum
[../]
[./pp_transfer_min]
type = MultiAppPostprocessorTransfer
reduction_type = minimum
from_multi_app = sub
from_postprocessor = average
to_postprocessor = sub_minimum
[../]
[./pp_transfer_max]
type = MultiAppPostprocessorTransfer
reduction_type = maximum
from_multi_app = sub
from_postprocessor = average
to_postprocessor = sub_maximum
[../]
[]
(test/tests/transfers/multiapp_postprocessor_interpolation_transfer/multilevel_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./subsub_average]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = CoupledForce
variable = u
v = subsub_average
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./sub_average]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.3
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.5 0.5 0'
input_files = multilevel_subsub.i
[../]
[]
[Transfers]
[./subsub_average]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = sub
variable = subsub_average
postprocessor = subsub_average
[../]
[]
(test/tests/multiapps/restart_subapp_ic/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
checkpoint = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(test/tests/transfers/multiapp_nearest_node_transfer/boundary_tosub_parent.i)
[Mesh]
file = 2blk.e
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left_1]
type = DirichletBC
variable = u
boundary = '1'
value = 4
[]
[left_2]
type = DirichletBC
variable = u
boundary = '2'
value = 3
[]
[right_3]
type = DirichletBC
variable = u
boundary = '3'
value = 2
[]
[right_4]
type = DirichletBC
variable = u
boundary = '4'
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 -4 0'
input_files = boundary_tosub_sub.i
[]
[]
[Transfers]
[to_sub_1]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
source_boundary = 1
variable = from_parent_1
[]
[to_sub_2]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
source_boundary = 2
variable = from_parent_2
[]
[to_sub_3]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
source_boundary = 3
variable = from_parent_3
[]
[to_sub_4]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
source_boundary = 4
variable = from_parent_4
[]
[]
(test/tests/multiapps/initial_intactive/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
positions = '0 0 0'
type = TransientMultiApp
input_files = 'sub.i'
app_type = MooseTestApp
enable = false # Start with a multiapp that's disabled up front
sub_cycling = true
[../]
[]
[Controls]
[./multiapp_enable]
type = TimePeriod
disable_objects = 'MultiApps::sub'
start_time = 0
end_time = 1.3
execute_on = 'timestep_begin'
reverse_on_false = true
[../]
[]
(test/tests/multiapps/cliargs_from_file/cliargs_parent_inline.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1 # This will be constrained by the multiapp
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
positions = '0 0 0 0.5 0.5 0
0.6 0.6 0 0.7 0.7 0'
cli_args_files = cliargs.txt
type = TransientMultiApp
input_files = 'cliargs_sub.i'
app_type = MooseTestApp
[../]
[]
(test/tests/multiapps/picard_multilevel/multilevel_dt_rejection/picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v2]
[]
[v3]
[]
[w]
[]
[]
[AuxKernels]
[set_w]
type = NormalizationAux
variable = w
source_variable = v
normal_factor = 0.1
[]
[]
[Kernels]
[diff_v]
type = Diffusion
variable = v
[]
[coupled_force]
type = CoupledForce
variable = v
v = v2
[]
[coupled_force2]
type = CoupledForce
variable = v
v = v3
[]
[td_v]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[left_v]
type = FunctionDirichletBC
variable = v
boundary = left
function = func
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'if(t < 2.5, 1, 1 / t)'
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[parent_time]
type = Receiver
execute_on = 'timestep_end'
[]
[parent_dt]
type = Receiver
execute_on = 'timestep_end'
[]
[time]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[dt]
type = TimestepSize
execute_on = 'timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 2 # deliberately make it fail at 2 to test the time step rejection behavior
nl_rel_tol = 1e-5 # loose enough to force multiple Picard iterations on this example
l_tol = 1e-5 # loose enough to force multiple Picard iterations on this example
fixed_point_rel_tol = 1e-8
num_steps = 2
[]
[MultiApps]
[sub2]
type = TransientMultiApp
positions = '0 0 0'
input_files = picard_sub2.i
execute_on = timestep_end
[]
[]
[Transfers]
[v_to_v3]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub2
source_variable = v
variable = v3
[]
[w]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub2
source_variable = w
variable = w
[]
[time_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = time
to_postprocessor = sub_time
to_multi_app = sub2
[]
[dt_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = dt
to_postprocessor = sub_dt
to_multi_app = sub2
[]
[matser_time_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = time
to_postprocessor = parent_time
to_multi_app = sub2
[]
[parent_dt_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = dt
to_postprocessor = parent_dt
to_multi_app = sub2
[]
[]
(modules/combined/examples/geochem-porous_flow/forge/porous_flow.i)
# Input file modified from RobPodgorney version
# - 2D instead of 3D with different resolution. Effectively this means a 1m height of RobPodgorney aquifer is simulated. RobPodgorney total mass flux is 2.5kg/s meaning 0.25kg/s is appropriate here
# - Celsius instead of Kelvin
# - no use of PorousFlowPointEnthalpySourceFromPostprocessor since that is not yet merged into MOOSE: a DirichletBC is used instead
# - Use of PorousFlowFullySaturated instead of PorousFlowUnsaturated, and the save_component_rate_in feature to record the change in kg of each species at each node for passing to the Geochem simulation
# - MultiApps and Transfers to transfer information between this simulation and the aquifer_geochemistry.i simulation
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 225
ny = 200
xmin = -400
xmax = 500
ymin = -400
ymax = 400
[]
[injection_node]
input = gen
type = ExtraNodesetGenerator
new_boundary = injection_node
coord = '0 0 0'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[f_H]
initial_condition = 8.201229858451E-07
[]
[f_Na]
initial_condition = 2.281094143525E-03
[]
[f_K]
initial_condition = 2.305489507836E-04
[]
[f_Ca]
initial_condition = 5.818776782059E-04
[]
[f_Mg]
initial_condition = 1.539513498238E-07
[]
[f_SiO2]
initial_condition = 2.691822196469E-04
[]
[f_Al]
initial_condition = 4.457519474122E-08
[]
[f_Cl]
initial_condition = 4.744309776594E-03
[]
[f_SO4]
initial_condition = 9.516650880811E-06
[]
[f_HCO3]
initial_condition = 5.906126982324E-05
[]
[porepressure]
initial_condition = 20E6
[]
[temperature]
initial_condition = 220 # degC
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[]
[]
[BCs]
[source_temperature]
type = DirichletBC
boundary = injection_node
variable = temperature
value = 70 # degC
[]
[]
[DiracKernels]
[inject_H]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 4.790385871045E-08
variable = f_H
[]
[inject_Na]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 7.586252963780E-07
variable = f_Na
[]
[inject_K]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 2.746517625125E-07
variable = f_K
[]
[inject_Ca]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 7.775129478597E-07
variable = f_Ca
[]
[inject_Mg]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 1.749872109005E-07
variable = f_Mg
[]
[inject_SiO2]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 4.100547515915E-06
variable = f_SiO2
[]
[inject_Al]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 2.502408592080E-08
variable = f_Al
[]
[inject_Cl]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 1.997260386272E-06
variable = f_Cl
[]
[inject_SO4]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 2.497372164191E-07
variable = f_SO4
[]
[inject_HCO3]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 5.003150992902E-06
variable = f_HCO3
[]
[inject_H2O]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 2.499865905987E-01
variable = porepressure
[]
[produce_H]
type = PorousFlowPeacemanBorehole
variable = f_H
SumQuantityUO = produced_mass_H
mass_fraction_component = 0
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_Na]
type = PorousFlowPeacemanBorehole
variable = f_Na
SumQuantityUO = produced_mass_Na
mass_fraction_component = 1
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_K]
type = PorousFlowPeacemanBorehole
variable = f_K
SumQuantityUO = produced_mass_K
mass_fraction_component = 2
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_Ca]
type = PorousFlowPeacemanBorehole
variable = f_Ca
SumQuantityUO = produced_mass_Ca
mass_fraction_component = 3
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_Mg]
type = PorousFlowPeacemanBorehole
variable = f_Mg
SumQuantityUO = produced_mass_Mg
mass_fraction_component = 4
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_SiO2]
type = PorousFlowPeacemanBorehole
variable = f_SiO2
SumQuantityUO = produced_mass_SiO2
mass_fraction_component = 5
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_Al]
type = PorousFlowPeacemanBorehole
variable = f_Al
SumQuantityUO = produced_mass_Al
mass_fraction_component = 6
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_Cl]
type = PorousFlowPeacemanBorehole
variable = f_Cl
SumQuantityUO = produced_mass_Cl
mass_fraction_component = 7
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_SO4]
type = PorousFlowPeacemanBorehole
variable = f_SO4
SumQuantityUO = produced_mass_SO4
mass_fraction_component = 8
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_HCO3]
type = PorousFlowPeacemanBorehole
variable = f_HCO3
SumQuantityUO = produced_mass_HCO3
mass_fraction_component = 9
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_H2O]
type = PorousFlowPeacemanBorehole
variable = porepressure
SumQuantityUO = produced_mass_H2O
mass_fraction_component = 10
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[remove_heat_at_production_well]
type = PorousFlowPeacemanBorehole
variable = temperature
SumQuantityUO = produced_heat
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
use_enthalpy = true
character = 1
[]
[]
[UserObjects]
[produced_mass_H]
type = PorousFlowSumQuantity
[]
[produced_mass_Na]
type = PorousFlowSumQuantity
[]
[produced_mass_K]
type = PorousFlowSumQuantity
[]
[produced_mass_Ca]
type = PorousFlowSumQuantity
[]
[produced_mass_Mg]
type = PorousFlowSumQuantity
[]
[produced_mass_SiO2]
type = PorousFlowSumQuantity
[]
[produced_mass_Al]
type = PorousFlowSumQuantity
[]
[produced_mass_Cl]
type = PorousFlowSumQuantity
[]
[produced_mass_SO4]
type = PorousFlowSumQuantity
[]
[produced_mass_HCO3]
type = PorousFlowSumQuantity
[]
[produced_mass_H2O]
type = PorousFlowSumQuantity
[]
[produced_heat]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[heat_extracted]
type = PorousFlowPlotQuantity
uo = produced_heat
[]
[approx_production_temperature]
type = PointValue
point = '100 0 0'
variable = temperature
[]
[mass_extracted_H]
type = PorousFlowPlotQuantity
uo = produced_mass_H
execute_on = 'initial timestep_end'
[]
[mass_extracted_Na]
type = PorousFlowPlotQuantity
uo = produced_mass_Na
execute_on = 'initial timestep_end'
[]
[mass_extracted_K]
type = PorousFlowPlotQuantity
uo = produced_mass_K
execute_on = 'initial timestep_end'
[]
[mass_extracted_Ca]
type = PorousFlowPlotQuantity
uo = produced_mass_Ca
execute_on = 'initial timestep_end'
[]
[mass_extracted_Mg]
type = PorousFlowPlotQuantity
uo = produced_mass_Mg
execute_on = 'initial timestep_end'
[]
[mass_extracted_SiO2]
type = PorousFlowPlotQuantity
uo = produced_mass_SiO2
execute_on = 'initial timestep_end'
[]
[mass_extracted_Al]
type = PorousFlowPlotQuantity
uo = produced_mass_Al
execute_on = 'initial timestep_end'
[]
[mass_extracted_Cl]
type = PorousFlowPlotQuantity
uo = produced_mass_Cl
execute_on = 'initial timestep_end'
[]
[mass_extracted_SO4]
type = PorousFlowPlotQuantity
uo = produced_mass_SO4
execute_on = 'initial timestep_end'
[]
[mass_extracted_HCO3]
type = PorousFlowPlotQuantity
uo = produced_mass_HCO3
execute_on = 'initial timestep_end'
[]
[mass_extracted_H2O]
type = PorousFlowPlotQuantity
uo = produced_mass_H2O
execute_on = 'initial timestep_end'
[]
[mass_extracted]
type = LinearCombinationPostprocessor
pp_names = 'mass_extracted_H mass_extracted_Na mass_extracted_K mass_extracted_Ca mass_extracted_Mg mass_extracted_SiO2 mass_extracted_Al mass_extracted_Cl mass_extracted_SO4 mass_extracted_HCO3 mass_extracted_H2O'
pp_coefs = '1 1 1 1 1 1 1 1 1 1 1'
execute_on = 'initial timestep_end'
[]
[dt]
type = TimestepSize
execute_on = 'timestep_begin'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 2E-4
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 980
cv = 4000.0
cp = 4000.0
porepressure_coefficient = 0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
mass_fraction_vars = 'f_H f_Na f_K f_Ca f_Mg f_SiO2 f_Al f_Cl f_SO4 f_HCO3'
save_component_rate_in = 'rate_H rate_Na rate_K rate_Ca rate_Mg rate_SiO2 rate_Al rate_Cl rate_SO4 rate_HCO3 rate_H2O' # change in kg at every node / dt
fp = the_simple_fluid
temperature_unit = Celsius
[]
[AuxVariables]
[rate_H]
[]
[rate_Na]
[]
[rate_K]
[]
[rate_Ca]
[]
[rate_Mg]
[]
[rate_SiO2]
[]
[rate_Al]
[]
[rate_Cl]
[]
[rate_SO4]
[]
[rate_HCO3]
[]
[rate_H2O]
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.01
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '2.5 0 0 0 2.5 0 0 0 2.5'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2750.0
specific_heat_capacity = 900.0
[]
[]
[Preconditioning]
active = typically_efficient
[typically_efficient]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = ' hypre boomeramg'
[]
[strong]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm ilu NONZERO 2'
[]
[probably_too_strong]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 31536000 #1 year
[TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 500
[]
[]
[Outputs]
exodus = true
csv = true
[]
[MultiApps]
[react]
type = TransientMultiApp
input_files = aquifer_geochemistry.i
clone_master_mesh = true
execute_on = 'timestep_end'
[]
[]
[Transfers]
[changes_due_to_flow]
type = MultiAppCopyTransfer
source_variable = 'rate_H rate_Na rate_K rate_Ca rate_Mg rate_SiO2 rate_Al rate_Cl rate_SO4 rate_HCO3 rate_H2O temperature'
variable = 'pf_rate_H pf_rate_Na pf_rate_K pf_rate_Ca pf_rate_Mg pf_rate_SiO2 pf_rate_Al pf_rate_Cl pf_rate_SO4 pf_rate_HCO3 pf_rate_H2O temperature'
to_multi_app = react
[]
[massfrac_from_geochem]
type = MultiAppCopyTransfer
source_variable = 'massfrac_H massfrac_Na massfrac_K massfrac_Ca massfrac_Mg massfrac_SiO2 massfrac_Al massfrac_Cl massfrac_SO4 massfrac_HCO3'
variable = 'f_H f_Na f_K f_Ca f_Mg f_SiO2 f_Al f_Cl f_SO4 f_HCO3'
from_multi_app = react
[]
[]
(test/tests/transfers/multiapp_conservative_transfer/parent_userobject.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
# The MultiAppUserObjectTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[multi_layered_average]
[]
[element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001 # This will be constrained by the multiapp
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_tol = 1e-8
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
csv = true
[]
[VectorPostprocessors]
[to_nearest_point]
type = NearestPointIntegralVariablePostprocessor
variable = multi_layered_average
points = '0.3 0.1 0.3 0.7 0.1 0.3'
execute_on = 'transfer'
[]
[to_nearest_point_element]
type = NearestPointIntegralVariablePostprocessor
variable = element_multi_layered_average
points = '0.3 0.1 0.3 0.7 0.1 0.3'
execute_on = 'transfer'
[]
[]
[MultiApps]
[sub_app]
positions = '0.3 0.1 0.3 0.7 0.1 0.3'
type = TransientMultiApp
input_files = sub_userobject.i
app_type = MooseTestApp
[]
[]
[Transfers]
[layered_transfer]
source_user_object = layered_average
variable = multi_layered_average
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub_app
skip_coordinate_collapsing = true
from_postprocessors_to_be_preserved = 'from_postprocessor'
to_postprocessors_to_be_preserved = 'to_nearest_point'
[]
[element_layered_transfer]
source_user_object = layered_average
variable = element_multi_layered_average
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub_app
skip_coordinate_collapsing = true
from_postprocessors_to_be_preserved = 'from_postprocessor'
to_postprocessors_to_be_preserved = 'to_nearest_point_element'
[]
[]
(test/tests/multiapps/multiple_position_files/multiple_position_files.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./multi]
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'sub1.i sub2.i'
positions_file = 'position1.txt position2.txt'
output_in_position = true
[../]
[]
(test/tests/multiapps/sub_cycling/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
sub_cycling = true
[../]
[]
(test/tests/transfers/multiapp_nearest_node_transfer/fromsub_fixed_meshes_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[from_sub]
[]
[elemental_from_sub]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.01
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.1 0.45 0'
input_files = fromsub_fixed_meshes_sub.i
[]
[]
[Transfers]
# Note: it's not generally advised to use "fixed_meshes = true" with displaced
# meshes. We only do that for this test to make sure the test will fail if
# "fixed_meshes" isn't working properly.
[from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
variable = from_sub
fixed_meshes = true
displaced_source_mesh = true
[]
[elemental_from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
variable = elemental_from_sub
fixed_meshes = true
displaced_source_mesh = true
[]
[]
(test/tests/transfers/multiapp_postprocessor_interpolation_transfer/parent2_quad.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./pp_aux]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./quad]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.1 0.1 0 0.9 0.1 0 0.1 0.9 0 0.9 0.9 0'
input_files = 'quad_sub1.i'
[../]
[]
[Transfers]
[./sub_to_parent_pp]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = quad
variable = pp_aux
postprocessor = pp
[../]
[]
(test/tests/multiapps/move/multilevel_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0'
input_files = multilevel_sub.i
output_in_position = true
move_time = 0.05
move_positions = '2 2 0'
move_apps = 0
[../]
[]
(test/tests/multiapps/multilevel/time_dt_from_parent_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 100
[]
[Functions]
[./dts]
type = PiecewiseLinear
x = '0 1'
y = '0.25 1'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 4
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
dt = 0.25
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
exodus = true
[./out]
type = Console
output_file = true
[../]
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.5 0.5 0'
input_files = time_dt_from_parent_sub.i
[../]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_elem_3eqn.parent.i)
# This tests a temperature transfer using the MultiApp system. Simple heat
# conduction problem is solved, then the layered average is computed and
# transferred into the child side of the solve
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
parallel_type = replicated
[]
[Functions]
[left_bc_fn]
type = PiecewiseLinear
x = '0 1'
y = '300 310'
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = left
function = left_bc_fn
[]
[]
[UserObjects]
[T_avg_uo]
type = LayeredAverage
variable = T
direction = x
num_layers = 5
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 5
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.T_wall_transfer_elem_3eqn.child.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[T_to_child]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = thm
source_user_object = T_avg_uo
variable = T_wall
greedy_search = true
use_bounding_boxes = false
error_on_miss = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/grid-sequencing/fine.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 40
[]
[Variables]
[u]
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[rxn]
type = Reaction
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
solve_type = 'PJFNK'
petsc_options = '-snes_monitor_solution'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[coarse]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = coarse.i
[]
[]
[Transfers]
[mesh_function_begin]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = coarse
source_variable = u
variable = u
execute_on = timestep_begin
[]
[]
(modules/solid_mechanics/test/tests/transfer_from_displaced/parent.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 3.0
ymin = 0.0
ymax = 1.0
nx = 100
ny = 25
elem_type = QUAD4
[]
[]
[Problem]
kernel_coverage_check = false
skip_nl_system_check = true
solve = false
verbose_multiapps = true
[]
[AuxVariables]
[indicator]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = Exodus
execute_on = 'timestep_end'
[]
[]
[MultiApps]
[solid_domain]
type = TransientMultiApp
input_files = child.i
execute_on = 'initial timestep_begin'
[]
[]
[Transfers]
[pull_indicator]
type = MultiAppShapeEvaluationTransfer
from_multi_app = solid_domain
source_variable = solid_indicator
variable = indicator
displaced_source_mesh = true
execute_on = 'initial timestep_begin'
[]
[]
(test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/two_way_many_apps_parent.i)
# In this test, the parent App is a 10x10 grid on the unit square, and
# there are 5 Sub Apps which correspond to each vertex of the unit square
# and the center, arranged in the following order:
# 3 4
# 2
# 0 1
# Sub Apps 0, 1, 3, and 4 currently overlap with a single element in
# each corner of the parent App, while Sub App 2 overlaps with 4
# parent App elements in the center. Note that we move the corner Sub
# Apps "outward" slightly along the diagonals to avoid ambiguity with
# which child app is "nearest" to a given parent App element centroid.
# This makes it easier to visually verify that the Transfers are
# working correctly.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[from_sub]
[]
[elemental_from_sub]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
# Note, in case you want to modify this test. It is important that there are
# an odd number of apps because this way we will catch errors caused by load
# imbalances with our -p 2 tests.
# The tiny offsets are to remove indetermination on nodal variable transfers
type = TransientMultiApp
app_type = MooseTestApp
positions = '-0.1100001 -0.1100001 0.0
0.9100001 -0.1100001 0.0
0.400001 0.400001 0.0
-0.1100001 0.9100001 0.0
0.9100001 0.9100001 0.0'
input_files = two_way_many_apps_sub.i
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = u
variable = from_sub
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[elemental_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = u_elem
variable = elemental_from_sub
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
greedy_search = true
[]
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = from_parent
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[elemental_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = elemental_from_parent
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[]
(test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/boundary_toparent_parent.i)
# Parent mesh and sub mesh are same with 4x4 quad8 elements.
# parent mesh has top boundary fixed at u=2 and bottom fixed at u=0
# sub mesh has top boundary fixed at u = 0 and bottom fixed at u=1
# The u variable at right boundary of sub mesh is transferred to
# from_sub variable of parent mesh at left boundary
# Result is from_sub at left boundary has linearly increasing value starting
# with 0 at top and ending with 1 at bottom. from_sub is zero everywhere else
# in the parent mesh.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
elem_type = QUAD8
[]
[Variables]
[u]
family = LAGRANGE
order = FIRST
[]
[]
[AuxVariables]
[from_sub]
family = LAGRANGE
order = SECOND
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[top]
type = DirichletBC
variable = u
boundary = top
value = 2.0
[]
[bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0.0
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = boundary_toparent_sub.i
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = u
from_boundaries = 'right'
to_boundaries = 'left'
variable = from_sub
[]
[]
(modules/level_set/test/tests/transfers/markers/multi_level/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
uniform_refine = 2
[]
[Adaptivity]
marker = marker
max_h_level = 2
cycles_per_step = 2
[./Indicators]
[./error]
type = GradientJumpIndicator
variable = u
[../]
[../]
[./Markers]
[./marker]
type = ErrorFractionMarker
coarsen = 0.4
refine = 0.5
indicator = error
[../]
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Problem]
type = LevelSetProblem
[]
[Executioner]
type = Transient
dt = 0.02
num_steps = 4
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[./sub]
type = TransientMultiApp
input_files = 'sub.i'
execute_on = TIMESTEP_END
[../]
[]
[Transfers]
[./marker_to_sub]
type = LevelSetMeshRefinementTransfer
to_multi_app = sub
source_variable = marker
variable = marker
check_multiapp_execute_on = false
[../]
[]
[Outputs]
hide = u
exodus = true
[]
(test/tests/transfers/multiapp_variable_value_sample_transfer/parent_array.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
components = 2
[]
[]
[Kernels]
[diff]
type = ArrayDiffusion
variable = u
diffusion_coefficient = dc
[]
[source]
type = ArrayBodyForce
variable = u
function = '1 x'
[]
[]
[BCs]
[left]
type = ArrayDirichletBC
variable = u
boundary = 'left right bottom top'
values = '0 0'
[]
[]
[Materials]
[dc]
type = GenericConstantArray
prop_name = dc
prop_value = '1 1'
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[pp_sub0]
type = TransientMultiApp
input_files = pp_sub.i
execute_on = timestep_end
positions = '0.5 0.5 0 0.7 0.7 0'
[]
[pp_sub1]
type = TransientMultiApp
input_files = pp_sub.i
execute_on = timestep_end
positions = '0.5 0.5 0 0.7 0.7 0'
[]
[]
[Transfers]
[sample_pp_transfer0]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = pp_sub0
postprocessor = from_parent
source_variable = u
source_variable_component = 0
[]
[sample_pp_transfer1]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = pp_sub1
postprocessor = from_parent
source_variable = u
source_variable_component = 1
[]
[]
(test/tests/transfers/multiapp_mesh_function_transfer/exec_on_mismatch.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[transferred_u]
[]
[elemental_transferred_u]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
active = 'sub'
[sub]
positions = '.099 .099 0 .599 .599 0 0.599 0.099 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = fromsub_sub.i
execute_on = 'initial timestep_begin'
[]
[sub_sibling_1]
type = TransientMultiApp
app_type = MooseTestApp
input_files = fromsub_sub.i
execute_on = 'initial timestep_begin'
[]
[sub_sibling_2]
type = TransientMultiApp
app_type = MooseTestApp
input_files = fromsub_sub.i
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
source_variable = sub_u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
execute_on = 'initial timestep_end'
[]
[elemental_from_sub]
source_variable = sub_u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
[]
[]
(test/tests/transfers/multiapp_mesh_function_transfer/fromsub_source_displaced.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[transferred_u]
[]
[elemental_transferred_u]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
positions = '.099 .099 0 .599 .599 0 0.599 0.099 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = fromsub_sub.i
[]
[]
[Transfers]
[from_sub]
source_variable = sub_u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
displaced_source_mesh = true
[]
[elemental_from_sub]
source_variable = sub_u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
displaced_source_mesh = true
[]
[]
(test/tests/multiapps/restart/parent2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub2.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
[Problem]
restart_file_base = parent_out_cp/0005
[]
(modules/misc/test/tests/dynamic_loading/dynamic_load_multiapp/misc_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
positions = '0.5 0.5 0'
type = TransientMultiApp
input_files = 'phase_field_sub.i'
# Here we'll attempt to load a different module that's not compiled into this module
app_type = PhaseFieldApp
# Here we set an input file specific relative library path instead of using MOOSE_LIBRARY_PATH
library_path = '../../../../../phase_field/lib'
[../]
[]
(test/tests/transfers/multiapp_reporter_transfer/between_multiapp/main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.01
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
[]
[MultiApps]
[pp_sub_0]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub0.i
[]
[pp_sub_1]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub1.i
[]
[]
[Transfers]
[pp_transfer_1]
type = MultiAppReporterTransfer
from_multi_app = pp_sub_0
to_multi_app = pp_sub_1
from_reporters = 'base_sub0_vpp/a base_sub0_vpp/b'
to_reporters = 'from_sub0_vpp/a from_sub0_vpp/b'
[]
[pp_transfer_2]
type = MultiAppReporterTransfer
from_multi_app = pp_sub_1
to_multi_app = pp_sub_0
from_reporters = 'base_sub1_vpp/a base_sub1_vpp/b'
to_reporters = 'from_sub1_vpp/a from_sub1_vpp/b'
[]
[]
(test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/to_sub/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[a]
family = SCALAR
order = SIXTH
[]
[]
[ICs]
[ic]
type = ScalarComponentIC
variable = a
values = '1.0 2.0 3.0 4.0 5.0 6.0'
[]
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = dummy
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[MultiApps]
[sub]
type = TransientMultiApp
positions = '0 0 0'
input_files = 'sub.i'
[]
[]
[Transfers]
[to_sub]
type = MultiAppScalarToAuxScalarTransfer
to_multi_app = sub
source_variable = 'a'
to_aux_scalar = 'b'
[]
[]
[Outputs]
exodus = true
[]
(tutorials/tutorial02_multiapps/step03_coupling/01_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[vt]
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ParsedMaterial
property_name = D
coupled_variables = 'vt'
expression = 'vt'
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[micro]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '01_sub.i'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppVariableValueSampleTransfer
to_multi_app = micro
source_variable = u
variable = ut
[]
[pull_v]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = vt
postprocessor = average_v
[]
[]
(tutorials/tutorial02_multiapps/step01_multiapps/07_sub_multilevel.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 40
nz = 40
[]
[Variables]
[v]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = v
[]
[td]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = v
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[dos]
type = TransientMultiApp
positions = '0 0 0 1 0 0'
input_files = '07_sub_sub_multilevel.i'
[]
[]
(tutorials/tutorial02_multiapps/step01_multiapps/03_parent_subcycle.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = '03_sub_subcycle.i'
sub_cycling = true
# output_sub_cycles = true
[]
[]
(test/tests/transfers/multiapp_mesh_function_transfer/tosub_source_displaced.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
displacements = 'x_disp y_disp'
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[x_disp]
initial_condition = -0.1
[]
[y_disp]
initial_condition = -0.1
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
positions = '.1 .1 0 0.6 0.6 0 0.6 0.1 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = tosub_sub.i
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
source_variable = u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
#displaced_source_mesh = true
[]
[elemental_to_sub]
source_variable = u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
#displaced_source_mesh = true
[]
[]
(test/tests/transfers/multiapp_interpolation_transfer/fromrestrictedsub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
# The MultiAppGeometricInterpolationTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[elemental_from_sub]
order = CONSTANT
family = MONOMIAL
[]
[nodal_from_sub]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.05 0.5 0 0.55 0.5 0'
input_files = fromrestrictedsub_sub.i
output_in_position = true
[]
[]
[Transfers]
[elemental_fromsub]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = elemental
variable = elemental_from_sub
[]
[nodal_fromsub]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = nodal
variable = nodal_from_sub
[]
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/two_pipe_parent.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 5
nx = 5
ymin = 0
ymax = 5
ny = 5
zmin = 0
zmax = 5
nz = 5
[]
[./blocks]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '1 1 0'
top_right = '4 4 5'
[../]
[]
[AuxVariables]
[./from_sub_app_var]
order = CONSTANT
family = MONOMIAL
block = 1
initial_condition = 0
[../]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = front
value = -1
[]
[right]
type = DirichletBC
variable = u
boundary = back
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 5
solve_type = 'NEWTON'
l_tol = 1e-8
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
execute_on = final
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = two_pipe_sub.i
app_type = MooseTestApp
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[layered_transfer_from_sub_app]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = sub_app_uo
variable = from_sub_app_var
from_multi_app = sub_app
# Bounding box checks miss the right locations because of mismatch of coordinates
fixed_bounding_box_size = '100 100 100'
from_app_must_contain_point = false
[]
[]
(test/tests/transfers/multiapp_postprocessor_interpolation_transfer/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[from_sub]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
positions = '0.2 0.2 0 0.7 0.7 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'sub0.i sub1.i'
[]
[]
[Transfers]
[pp_transfer]
postprocessor = average
variable = from_sub
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = 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
[../]
[]
(test/tests/transfers/general_field/shape_evaluation/between_siblings/main_between_multiapp.i)
# Base input for testing between-multiapp transfers. It has the following complexities:
# - multiapps may not be run with the same number of ranks
# - both nodal and elemental variables
# - transfers between mixes of nodal and elemental variables
# Tests derived from this input may add or remove complexities through command line arguments
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
[]
# This application use at most 3 processes
[MultiApps/ma1]
type = TransientMultiApp
input_files = sub_between_diffusion1.i
max_procs_per_app = 3
output_in_position = true
[]
# This application will use as many processes as the main app
[MultiApps/ma2]
type = TransientMultiApp
input_files = sub_between_diffusion2.i
output_in_position = true
[]
[Transfers]
# Nodal to nodal variables
[app1_to_2_nodal_nodal]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = ma1
to_multi_app = ma2
source_variable = sent_nodal
variable = received_nodal
extrapolation_constant = -1
[]
[app2_to_1_nodal_nodal]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = ma2
to_multi_app = ma1
source_variable = sent_nodal
variable = received_nodal
extrapolation_constant = -1
[]
# Elemental to elemental variables
[app1_to_2_elem_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = ma1
to_multi_app = ma2
source_variable = sent_elem
variable = received_elem
extrapolation_constant = -1
[]
[app2_to_1_elem_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = ma2
to_multi_app = ma1
source_variable = sent_elem
variable = received_elem
extrapolation_constant = -1
[]
# Elemental to nodal variables
[app1_to_2_elem_nodal]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = ma1
to_multi_app = ma2
source_variable = sent_elem
variable = received_nodal
extrapolation_constant = -1
[]
[app2_to_1_elem_nodal]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = ma2
to_multi_app = ma1
source_variable = sent_elem
variable = received_nodal
extrapolation_constant = -1
[]
# Nodal to elemental variables
[app1_to_2_nodal_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = ma1
to_multi_app = ma2
source_variable = sent_nodal
variable = received_elem
extrapolation_constant = -1
[]
[app2_to_1_nodal_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = ma2
to_multi_app = ma1
source_variable = sent_nodal
variable = received_elem
extrapolation_constant = -1
[]
[]
# To create multiple subapps for the 1 to N and N to M tests
# The subapps should not overlap for shape evaluation transfers
# or at least, the block restriction of the source variables between
# applications should not overlap
[Positions]
[app1_locs]
type = InputPositions
positions = '0 0 0
0 1.01 0'
[]
# Keep in mind app2's mesh is offset
[app2_locs]
type = InputPositions
positions = '-0.7 -0.45 0
0.7 0.3 0
-0.5 0.5 0'
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
(test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/to_sub/parent_wrong_order.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[./a]
family = SCALAR
order = FIFTH
[../]
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy]
type = Diffusion
variable = dummy
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[MultiApps]
[./sub]
type = TransientMultiApp
positions = '0 0 0'
input_files = 'sub_wrong_order.i'
[../]
[]
[Transfers]
[./to_sub]
type = MultiAppScalarToAuxScalarTransfer
to_multi_app = sub
source_variable = 'a'
to_aux_scalar = 'b'
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/tosub_source_displaced.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
displacements = 'x_disp y_disp'
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./x_disp]
initial_condition = -0.1
[../]
[./y_disp]
initial_condition = -0.1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
positions = '.1 .1 0 0.6 0.6 0 0.6 0.1 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = tosub_sub.i
execute_on = timestep_end
[../]
[]
[Transfers]
[./to_sub]
source_variable = u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
#displaced_source_mesh = true
[../]
[./elemental_to_sub]
source_variable = u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
#displaced_source_mesh = true
[../]
[]
(test/tests/multiapps/petsc_options/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
l_max_its = 4
nl_max_its = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
petsc_options = '-test'
l_tol = 1e-12
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
[../]
[]
(test/tests/transfers/transfer_interpolation/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
# This test currently diffs when run in parallel with DistributedMesh enabled,
# most likely due to the fact that it uses some geometric search stuff.
# For more information, see #2121.
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[UserObjects]
[layered_average]
type = LayeredAverage
variable = u
direction = x
num_layers = 3
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
nl_rel_tol = 1e-10
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
sub_cycling = true
interpolate_transfers = true
output_sub_cycles = true
[]
[]
[Transfers]
[nearest_node]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = nearest_node
[]
[mesh_function]
type = MultiAppShapeEvaluationTransfer
to_multi_app = sub
source_variable = u
variable = mesh_function
[]
[user_object]
type = MultiAppUserObjectTransfer
to_multi_app = sub
variable = user_object
user_object = layered_average
[]
[interpolation]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = interpolation
[]
[]
(test/tests/transfers/get_transfers_from_feproblem/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
# This test currently diffs when run in parallel with DistributedMesh enabled,
# most likely due to the fact that it uses some geometric search stuff.
# For more information, see #2121.
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[UserObjects]
[layered_average]
type = GetTransferUserObject
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
nl_rel_tol = 1e-10
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
[]
[]
[Transfers]
[nearest_node]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = nearest_node
[]
[mesh_function]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = u
variable = mesh_function
[]
[]
(test/tests/transfers/multiapp_postprocessor_to_scalar/parent2_wrong_positions.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./from_sub_app]
order = THIRD
family = SCALAR
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.01
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./average]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
num_steps = 5
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./pp_sub]
app_type = MooseTestApp
positions = '0.5 0.5 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub2.i
[../]
[]
[Transfers]
[./pp_transfer]
type = MultiAppPostprocessorToAuxScalarTransfer
from_multi_app = pp_sub
from_postprocessor = point_value
to_aux_scalar = from_sub_app
[../]
[]
(test/tests/transfers/multiapp_postprocessor_to_scalar/parent2_wrong_order.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./from_sub_app]
order = FOURTH
family = SCALAR
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.01
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./average]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
num_steps = 5
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./pp_sub]
app_type = MooseTestApp
positions = '0.5 0.5 0
0.7 0.7 0
0.8 0.8 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub2.i
[../]
[]
[Transfers]
[./pp_transfer]
type = MultiAppPostprocessorToAuxScalarTransfer
from_multi_app = pp_sub
from_postprocessor = point_value
to_aux_scalar = from_sub_app
[../]
[]
(test/tests/multiapps/multilevel/dt_from_sub_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.3
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.5 0.5 0'
input_files = dt_from_sub_subsub.i
[../]
[]
(modules/combined/test/tests/restart-transient-from-ss-with-stateful/parent_tr.i)
[Problem]
restart_file_base = parent_ss_checkpoint_cp/LATEST
force_restart = true
# The auxiliary field has an initial condition
allow_initial_conditions_with_restart = true
[]
[Mesh]
file = parent_ss_checkpoint_cp/LATEST
[]
[Variables]
[temp]
# no initial condition for restart.
[]
[]
[AuxVariables]
[power]
order = FIRST
family = L2_LAGRANGE
initial_condition = 350
[]
[]
[Kernels]
[heat]
type = HeatConduction
variable = temp
[]
[heat_ie]
type = HeatConductionTimeDerivative
variable = temp
[]
[heat_source_fuel]
type = CoupledForce
variable = temp
v = 'power'
[]
[]
[BCs]
[all]
type = DirichletBC
variable = temp
boundary = 'bottom top left right'
value = 300
[]
[]
[Materials]
[heat_material]
type = HeatConductionMaterial
temp = temp
specific_heat = 1000
thermal_conductivity = 500
[]
[density]
type = Density
density = 2000
[]
[]
[Postprocessors]
[avg_temp]
type = ElementAverageValue
variable = temp
execute_on = 'timestep_end'
[]
[avg_power]
type = ElementAverageValue
variable = power
execute_on = 'timestep_end'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 300'
line_search = 'none'
l_tol = 1e-02
nl_rel_tol = 5e-05
nl_abs_tol = 5e-05
l_max_its = 50
nl_max_its = 25
start_time = 0
end_time = 40
dt = 10
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
color = true
exodus = true
[]
[MultiApps]
[bison]
type = TransientMultiApp
positions = '0 0 0'
input_files = 'sub_tr.i'
execute_on = 'timestep_end'
[]
[]
[Transfers]
[to_bison_mechanics]
type = MultiAppProjectionTransfer
to_multi_app = bison
variable = temp
source_variable = temp
execute_on = 'timestep_end'
[]
[]
(test/tests/multiapps/reset/multilevel_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0'
input_files = multilevel_sub.i
output_in_position = true
reset_apps = 0
reset_time = 0.05
[../]
[]
(test/tests/transfers/general_field/shape_evaluation/displaced/parent.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.5
xmax = 1.5
ymin = 0.0
ymax = 0.5
nx = 50
ny = 3
elem_type = QUAD9
[]
[]
[Problem]
kernel_coverage_check = false
skip_nl_system_check = true
solve = false
verbose_multiapps = true
[]
[AuxVariables]
[indicator_const_mon]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.0
[]
[indicator_nodal]
initial_condition = 0.0
[]
[indicator_higher_order]
family = MONOMIAL
order = THIRD
initial_condition = 0.0
[]
[]
[Executioner]
type = Transient
dt = 0.05
num_steps = 10
[]
[Outputs]
[out]
type = Exodus
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[MultiApps]
[solid_domain]
type = TransientMultiApp
input_files = child.i
execute_on = 'initial timestep_begin'
[]
[]
[Transfers]
[pull_indicator_constmon]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = solid_domain
source_variable = solid_indicator
variable = indicator_const_mon
displaced_source_mesh = true
execute_on = 'initial timestep_begin'
[]
[pull_indicator_nodal]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = solid_domain
source_variable = solid_indicator
variable = indicator_nodal
displaced_source_mesh = true
execute_on = 'initial timestep_begin'
[]
[pull_indicator_higher]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = solid_domain
source_variable = solid_indicator
variable = indicator_higher_order
displaced_source_mesh = true
execute_on = 'initial timestep_begin'
[]
[]
(test/tests/multiapps/sub_cycling_failure/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
sub_cycling = true
[../]
[]
(test/tests/transfers/transfer_once_per_fixed_point/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Problem]
solve = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
input_files = sub.i
execute_on = 'INITIAL TIMESTEP_END'
cli_args = "MultiApps/active='';Outputs/active=''"
[]
[]
[Executioner]
type = Transient
num_steps = 4
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_min_its = 3
fixed_point_max_its = 10
[]
[Postprocessors]
[num_fixed_point_its]
type = NumFixedPointIterations
[]
[parent_fp_its]
type = Receiver
[]
[]
[Outputs]
[fp]
type = CSV
execute_on = 'TIMESTEP_END'
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_3eqn.parent.i)
# This tests a temperature transfer using the MultiApp system. Simple heat
# conduction problem is solved, then the temperature is picked up by the child
# side of the solve, child side solves and transfers its variables back to the
# master
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[left_bc_fn]
type = PiecewiseLinear
x = '0 1'
y = '300 310'
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = left
function = left_bc_fn
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 5
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.T_wall_transfer_3eqn.child.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[T_to_child]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = T
variable = T_wall
[]
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/move/multilevel_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0'
input_files = sub.i
output_in_position = true
[../]
[]
(test/tests/restart/restart_transient_from_steady/restart_trans_with_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Problem]
restart_file_base = steady_with_sub_out_cp/LATEST
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2' # increase this function to drive transient
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 3
dt = 1.0
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-7
fixed_point_rel_tol = 1e-7
fixed_point_abs_tol = 1e-07
fixed_point_max_its = 4
line_search = none
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = restart_trans_with_sub_sub.i
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[p_to_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/tosub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
positions = '.1 .1 0 0.6 0.6 0 0.6 0.1 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = tosub_sub.i
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
source_variable = u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
[]
[elemental_to_sub]
source_variable = u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
[]
[]
(test/tests/outputs/perf_graph/multi_app/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
perf_graph = true
[]
[MultiApps]
[./sub_app]
positions = '0 0 0'
type = TransientMultiApp
input_files = 'sub.i'
app_type = MooseTestApp
[../]
[]
(test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/from_sub/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[a]
family = SCALAR
order = SIXTH
[]
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = dummy
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[MultiApps]
[sub]
type = TransientMultiApp
positions = '0 0 0'
input_files = 'sub.i'
[]
[]
[Transfers]
[from_sub]
type = MultiAppScalarToAuxScalarTransfer
from_multi_app = sub
source_variable = 'b'
to_aux_scalar = 'a'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/output_if_base_contains/dt_from_parent_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.25
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.5 0.5 0'
input_files = dt_from_parent_sub.i
[../]
[]
(test/tests/multiapps/move/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0'
input_files = sub.i
output_in_position = true
move_time = 0.05
move_positions = '2 2 0'
move_apps = 0
[../]
[]
(test/tests/multiapps/relaxation/sub_relaxed_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
initial_condition = 1
[]
[inverse_v]
initial_condition = 1
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = inverse_v
[]
[]
[AuxKernels]
[invert_v]
type = QuotientAux
variable = inverse_v
denominator = v
numerator = 20.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[Neumann_right]
type = NeumannBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 4
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_abs_tol = 1e-14
[]
[Outputs]
exodus = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = sub_relaxed_sub.i
transformed_variables = v
relaxation_factor = 0.94
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/transfers/multiapp_postprocessor_transfer/from_one_sub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./from_sub]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./sub_average]
type = Receiver
[../]
[./sub_sum]
type = Receiver
[../]
[./sub_maximum]
type = Receiver
[../]
[./sub_minimum]
type = Receiver
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
positions = '0.2 0.2 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'sub0.i'
[../]
[]
[Transfers]
[./pp_transfer_ave]
type = MultiAppPostprocessorTransfer
reduction_type = average
from_multi_app = sub
from_postprocessor = average
to_postprocessor = sub_average
[../]
[./pp_transfer_sum]
type = MultiAppPostprocessorTransfer
reduction_type = sum
from_multi_app = sub
from_postprocessor = average
to_postprocessor = sub_sum
[../]
[./pp_transfer_min]
type = MultiAppPostprocessorTransfer
reduction_type = minimum
from_multi_app = sub
from_postprocessor = average
to_postprocessor = sub_minimum
[../]
[./pp_transfer_max]
type = MultiAppPostprocessorTransfer
reduction_type = maximum
from_multi_app = sub
from_postprocessor = average
to_postprocessor = sub_maximum
[../]
[]
(test/tests/multiapps/check_error/check_error.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[./multi]
type = TransientMultiApp
app_type = MooseTestApp
[../]
[]
(test/tests/transfers/transfer_with_reset/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
# This test currently diffs when run in parallel with DistributedMesh enabled,
# most likely due to the fact that it uses some geometric search stuff.
# For more information, see #2121.
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[t]
[]
[u_from_sub]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
reset_apps = 0
reset_time = 0.05
[]
[]
[Transfers]
[t_from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = t
variable = t
[]
[u_from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
variable = u_from_sub
[]
[u_to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = u_from_master
[]
[]
(test/tests/transfers/multiapp_userobject_transfer/restricted_elem_parent.i)
num_layers = 2
[Mesh]
[box]
type = GeneratedMeshGenerator
dim = 3
nx = ${num_layers}
ny = 3
nz = 3
[]
# The MultiAppUserObjectTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[a]
family = MONOMIAL
order = CONSTANT
[]
[s]
[]
[]
[AuxKernels]
[s_ak]
type = ParsedAux
variable = s
use_xyzt = true
expression = 'x+(z*z)'
[]
[]
[Functions]
[]
[Postprocessors]
[a_avg]
type = ElementAverageValue
variable = a
[]
[]
[UserObjects]
[S_avg_front]
type = LayeredSideAverage
boundary = front
variable = s
num_layers = ${num_layers}
direction = x
[]
[S_avg_back]
type = LayeredSideAverage
boundary = back
variable = s
num_layers = ${num_layers}
direction = x
[]
[]
[MultiApps]
[ch0]
type = TransientMultiApp
input_files = 'restricted_elem_sub.i'
bounding_box_padding = '0 0.5 1'
positions = '0 0.5 -0.1'
output_in_position = true
cli_args = 'yy=0'
[]
[ch1]
type = TransientMultiApp
input_files = 'restricted_elem_sub.i'
bounding_box_padding = '0 0.5 1'
positions = '0 0.5 1.1'
output_in_position = true
cli_args = 'yy=1'
[]
[]
[Transfers]
[from_ch0]
type = MultiAppUserObjectTransfer
boundary = back
from_multi_app = ch0
variable = a
user_object = A_avg
[]
[from_ch1]
type = MultiAppUserObjectTransfer
boundary = front
from_multi_app = ch1
variable = a
user_object = A_avg
[]
[to_ch0]
type = MultiAppUserObjectTransfer
block = 20
to_multi_app = ch0
variable = S
user_object = S_avg_back
[]
[to_ch1]
type = MultiAppUserObjectTransfer
block = 20
to_multi_app = ch1
variable = S
user_object = S_avg_front
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/transfers/sampler_transfer/errors/parent_multiapp_type_error.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform'
execute_on = INITIAL # create random numbers on initial and use them for each timestep
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
input_files = sub.i
positions = '0 0 0'
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
[]
(test/tests/transfers/multiapp_projection_transfer/tosub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 9
ymin = 0
ymax = 9
nx = 9
ny = 9
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[x]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[x_func]
type = ParsedFunction
expression = x
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxKernels]
[x_func_aux]
type = FunctionAux
variable = x
function = x_func
execute_on = initial
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
[Debug]
# show_actions = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0 5 5 0'
input_files = tosub_sub.i
[]
[]
[Transfers]
[tosub]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = u
variable = u_nodal
[]
[elemental_tosub]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = u
variable = u_elemental
[]
[elemental_to_sub_elemental]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = x
variable = x_elemental
[]
[elemental_to_sub_nodal]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = x
variable = x_nodal
[]
[]
(test/tests/multiapps/restart/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
checkpoint = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(test/tests/transfers/multiapp_nearest_node_transfer/fromsub_displaced_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[from_sub]
[]
[elemental_from_sub]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.48 0 0 -1.01 0 0'
input_files = fromsub_displaced_sub.i
[]
[]
[Transfers]
[from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
variable = from_sub
displaced_source_mesh = true
[]
[elemental_from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
variable = elemental_from_sub
displaced_source_mesh = true
[]
[]
(test/tests/transfers/general_field/shape_evaluation/duplicated_shape_evaluation_tests/fromsub_source_displaced.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./transferred_u]
[../]
[./elemental_transferred_u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
positions = '.099 .099 0 .599 .599 0 0.599 0.099 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = fromsub_sub.i
[../]
[]
[Transfers]
[./from_sub]
source_variable = sub_u
variable = transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
displaced_source_mesh = true
[../]
[./elemental_from_sub]
source_variable = sub_u
variable = elemental_transferred_u
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
displaced_source_mesh = true
[../]
[]
(modules/porous_flow/examples/multiapp_fracture_flow/single_fracture_heat_transfer/matrix_app.i)
# Matrix physics, which is just heat conduction. Heat energy comes from the fracture App
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 2
nx = 20
xmin = 0
xmax = 100.0
ny = 9
ymin = -9
ymax = 9
[]
[]
[Variables]
[matrix_T]
initial_condition = 40 # degC
[]
[]
[Kernels]
[dot]
type = CoefTimeDerivative
variable = matrix_T
Coefficient = 1E5
[]
[matrix_diffusion]
type = AnisotropicDiffusion
variable = matrix_T
tensor_coeff = '1 0 0 0 1 0 0 0 1'
[]
[]
[DiracKernels]
[heat_from_fracture]
type = ReporterPointSource
variable = matrix_T
value_name = heat_transfer_rate/transferred_joules_per_s
x_coord_name = heat_transfer_rate/x
y_coord_name = heat_transfer_rate/y
z_coord_name = heat_transfer_rate/z
[]
[]
[VectorPostprocessors]
[heat_transfer_rate]
type = ConstantVectorPostprocessor
vector_names = 'transferred_joules_per_s x y z'
value = '0; 0; 0; 0'
outputs = none
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 100
nl_abs_tol = 1E-3
[]
[Outputs]
print_linear_residuals = false
exodus = true
csv=true
[]
[MultiApps]
[fracture_app]
type = TransientMultiApp
input_files = fracture_app.i
execute_on = TIMESTEP_BEGIN
[]
[]
[Transfers]
[T_to_fracture]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = fracture_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[heat_from_fracture]
type = MultiAppReporterTransfer
from_multi_app = fracture_app
from_reporters = 'heat_transfer_rate/joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
to_reporters = 'heat_transfer_rate/transferred_joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
[]
[]
(test/tests/multiapps/transient_multiapp/dt_from_multi.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1 # This will be constrained by the multiapp
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
positions = '0 0 0 0.5 0.5 0 0.6 0.6 0 0.7 0.7 0'
type = TransientMultiApp
input_files = 'dt_from_multi_sub.i'
app_type = MooseTestApp
[../]
[]
(test/tests/transfers/multiapp_userobject_transfer/restricted_node_parent.i)
num_layers = 2
[Mesh]
[box]
type = GeneratedMeshGenerator
dim = 3
nx = ${num_layers}
ny = 3
nz = 3
xmin = 0.25
xmax = 1.25
[]
# The MultiAppUserObjectTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[a]
[]
[s]
[]
[]
[AuxKernels]
[s_ak]
type = ParsedAux
variable = s
use_xyzt = true
expression = 'x+(z*z)'
[]
[]
[Functions]
[]
[Postprocessors]
[a_avg]
type = ElementAverageValue
variable = a
[]
[]
[UserObjects]
[S_avg_front]
type = LayeredSideAverage
boundary = front
variable = s
num_layers = ${num_layers}
direction = x
[]
[S_avg_back]
type = LayeredSideAverage
boundary = back
variable = s
num_layers = ${num_layers}
direction = x
[]
[]
[MultiApps]
[ch0]
type = TransientMultiApp
input_files = 'restricted_node_sub.i'
bounding_box_padding = '0 0.5 1'
positions = '0 0.5 -0.1'
output_in_position = true
cli_args = 'yy=0'
[]
[ch1]
type = TransientMultiApp
input_files = 'restricted_node_sub.i'
bounding_box_padding = '0 0.5 1'
positions = '0 0.5 1.1'
output_in_position = true
cli_args = 'yy=1'
[]
[]
[Transfers]
[from_ch0]
type = MultiAppUserObjectTransfer
boundary = back
from_multi_app = ch0
variable = a
user_object = A_avg
[]
[from_ch1]
type = MultiAppUserObjectTransfer
boundary = front
from_multi_app = ch1
variable = a
user_object = A_avg
[]
[to_ch0]
type = MultiAppUserObjectTransfer
block = 20
to_multi_app = ch0
variable = S
user_object = S_avg_back
[]
[to_ch1]
type = MultiAppUserObjectTransfer
block = 20
to_multi_app = ch1
variable = S
user_object = S_avg_front
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_temperature/phy.parent.i)
# This tests a transfer of temperature values computed by master app and used by a child app
# as a heat structure boundary condition
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[T_bc_fn]
type = ParsedFunction
expression = '300+t*x*10'
[]
[T_ffn]
type = ParsedFunction
expression = 'x*10'
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADDiffusion
variable = T
[]
[ffn]
type = BodyForce
variable = T
function = T_ffn
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = 'left right'
function = T_bc_fn
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
nl_abs_tol = 1e-10
abort_on_solve_fail = true
solve_type = NEWTON
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.child.i
execute_on = 'initial timestep_end'
[]
[]
[Transfers]
[T_to_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = T
variable = T_ext
to_boundaries = 'hs:outer'
[]
[]
[Outputs]
exodus = true
show = 'T'
[]
(test/tests/multiapps/relaxation/picard_relaxed_array_parent.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
[Variables]
[u]
components = 2
[]
[]
[AuxVariables]
[v]
components = 2
initial_condition = '1 1'
[]
[inverse_v]
components = 2
initial_condition = '1 1'
[]
[]
[Kernels]
[diff]
type = ArrayDiffusion
variable = u
diffusion_coefficient = dc
[]
[time]
type = ArrayTimeDerivative
variable = u
time_derivative_coefficient = tc
[]
[force_u]
type = ArrayCoupledForce
variable = u
v = inverse_v
is_v_array = true
coef = '1 1'
[]
[]
[AuxKernels]
[invert_v]
type = ArrayQuotientAux
variable = inverse_v
denominator = v
numerator = '20 20'
[]
[]
[BCs]
[left]
type = ArrayDirichletBC
variable = u
boundary = left
values = '0 0'
[]
[Neumann_right]
type = ArrayNeumannBC
variable = u
boundary = right
value = '1 1'
[]
[]
[Materials]
[dc]
type = GenericConstantArray
prop_name = dc
prop_value = '0.1 0.1'
[]
[tc]
type = GenericConstantArray
prop_name = tc
prop_value = '1 1'
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 4
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_abs_tol = 1e-14
relaxation_factor = 0.8
transformed_variables = u
[]
[Outputs]
exodus = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[MultiApps]
[sub]
type = TransientMultiApp
execute_on = timestep_begin
input_files = picard_relaxed_array_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppCopyTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppCopyTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/multiapps/max_procs_per_app/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
max_procs_per_app = 1
[../]
[]
(tutorials/tutorial02_multiapps/step02_transfers/03_parent_uot.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
zmax = 3
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[front]
type = DirichletBC
variable = u
boundary = front
value = 0
[]
[back]
type = DirichletBC
variable = u
boundary = back
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[UserObjects]
[layered_integral]
type = NearestPointLayeredIntegral
points = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
direction = z
num_layers = 4
variable = u
[]
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '03_sub_uot.i'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppUserObjectTransfer
to_multi_app = sub_app
variable = u_integral
user_object = layered_integral
[]
[pull_v]
type = MultiAppUserObjectTransfer
from_multi_app = sub_app
variable = v_average
user_object = layered_average
[]
[]
(test/tests/controls/time_periods/transfers/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.01
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./average]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
num_steps = 5
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./pp_sub]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./pp_transfer]
type = MultiAppPostprocessorToAuxScalarTransfer
to_multi_app = pp_sub
from_postprocessor = average
to_aux_scalar = from_master_app
[../]
[]
[Controls]
[./transfers]
type = TimePeriod
enable_objects = Transfer::pp_transfer
start_time = 2
execute_on = 'initial timestep_begin'
[../]
[]
(modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/fracture_app.i)
# Temperature is transferred between the fracture and matrix apps
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmin = 0
xmax = 50.0
[]
[]
[Variables]
[frac_T]
[]
[]
[ICs]
[frac_T]
type = FunctionIC
variable = frac_T
function = 'if(x<1E-6, 2, 0)' # delta function
[]
[]
[AuxVariables]
[transferred_matrix_T]
[]
[]
[Kernels]
[dot]
type = TimeDerivative
variable = frac_T
[]
[fracture_diffusion]
type = Diffusion
variable = frac_T
[]
[toMatrix]
type = PorousFlowHeatMassTransfer
variable = frac_T
v = transferred_matrix_T
transfer_coefficient = 0.004
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
[]
[VectorPostprocessors]
[final_results]
type = LineValueSampler
start_point = '0 0 0'
end_point = '50 0 0'
num_points = 11
sort_by = x
variable = frac_T
outputs = final_csv
[]
[]
[Outputs]
print_linear_residuals = false
[final_csv]
type = CSV
sync_times = 100
sync_only = true
[]
[]
[MultiApps]
[matrix_app]
type = TransientMultiApp
input_files = matrix_app.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[T_to_matrix]
type = MultiAppCopyTransfer
to_multi_app = matrix_app
source_variable = frac_T
variable = transferred_frac_T
[]
[T_from_matrix]
type = MultiAppCopyTransfer
from_multi_app = matrix_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[]
(test/tests/transfers/multiapp_vector_pp_transfer/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 1
ymax = 2
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v]
[./InitialCondition]
type = FunctionIC
function = set_v
[../]
[../]
[]
[Functions]
[./set_v]
type = ParsedFunction
expression = 'x + 2 * y'
[../]
[]
[VectorPostprocessors]
[./sample_points]
type = PointValueSampler
variable = v
points = '0.25 1.25 0 0.5 1.5 0'
sort_by = x
execute_on = 'initial timestep_end'
[../]
[./receive_values]
type = PointValueSampler
variable = v
points = '0.25 1.25 0 0.5 1.5 0'
sort_by = x
execute_on = initial
[../]
[]
[MultiApps]
[./sub]
type = TransientMultiApp
input_files = 'sub.i'
positions = '0.25 1.25 0 0.5 1.5 0'
[../]
[]
[Transfers]
[./send]
type = MultiAppVectorPostprocessorTransfer
vector_postprocessor = sample_points
postprocessor = receive
vector_name = v
to_multi_app = sub
[../]
[./receive]
type = MultiAppVectorPostprocessorTransfer
vector_postprocessor = receive_values
postprocessor = send
vector_name = v
from_multi_app = sub
[../]
[]
[Executioner]
type = Transient
nl_abs_tol = 1e-10
num_steps = 1
[]
[Outputs]
csv = true
[]
(test/tests/multiapps/sub_cycling_failure/failure_with_max_procs_set.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.1
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist '
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
sub_cycling = true
max_procs_per_app = 1
[../]
[]
(test/tests/multiapps/picard_multilevel/2level_picard/sub_level1.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[w]
[]
[]
[Kernels]
[time_derivative]
type = TimeDerivative
variable = v
[]
[diffusion]
type = Diffusion
variable = v
[]
[source]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[dirichlet0]
type = DirichletBC
variable = v
boundary = '0'
value = 0
[]
[dirichlet]
type = DirichletBC
variable = v
boundary = '2'
value = 100
[]
[]
[Postprocessors]
[avg_u]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_begin timestep_end'
[]
[avg_v]
type = ElementAverageValue
variable = v
execute_on = 'initial timestep_begin timestep_end'
[]
[avg_w]
type = ElementAverageValue
variable = w
execute_on = 'initial timestep_begin timestep_end'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
end_time = 0.1
dt = 0.02
[]
[MultiApps]
[level2-]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_level2.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[v_to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = v
variable = v
to_multi_app = level2-
execute_on = 'timestep_end'
[]
[w_from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = w
variable = w
from_multi_app = level2-
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[screen]
type = Console
execute_postprocessors_on = "timestep_end timestep_begin"
[]
[]
(test/tests/transfers/multiapp_variable_value_sample_transfer/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
# Yes we want a slightly irregular grid
nx = 11
ny = 11
# We will transfer data to the sub app, and that is currently only
# supported from a replicated mesh
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
app_type = MooseTestApp
positions = '0.5 0.5 0 0.7 0.7 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub.i
[]
[]
[Transfers]
[sample_transfer]
source_variable = u
variable = from_parent
type = MultiAppVariableValueSampleTransfer
to_multi_app = sub
[]
[]
[Problem]
parallel_barrier_messaging = false
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average_value]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
execute_on = timestep_end
positions = '0.3 0.1 0.3 0.7 0.1 0.3'
type = TransientMultiApp
input_files = tosub_sub.i
app_type = MooseTestApp
[../]
[]
[Transfers]
[./layered_transfer]
source_user_object = layered_average
variable = multi_layered_average
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub_app
skip_coordinate_collapsing = true
[../]
[./element_layered_transfer]
source_user_object = layered_average
variable = element_multi_layered_average
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub_app
skip_coordinate_collapsing = true
[../]
[]
(test/tests/transfers/multiapp_copy_transfer/aux_to_primary/from_sub.i)
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[main]
initial_condition = 1938
[]
[]
[MultiApps/sub]
type = TransientMultiApp
input_files = sub.i
[]
[Transfers/from_sub]
type = MultiAppCopyTransfer
from_multi_app = sub
source_variable = sub
variable = main
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
execute_on = 'FINAL'
exodus = true
[]
(tutorials/tutorial02_multiapps/step02_transfers/02_parent_nearestnode.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[tv]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0.1 0.1 0 0.4 0.4 0 0.7 0.7 0'
input_files = '02_sub_nearestnode.i'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppNearestNodeTransfer
# Transfer to the sub-app from this app
to_multi_app = sub_app
# The name of the variable in this app
source_variable = u
# The name of the auxiliary variable in the sub-app
variable = tu
[]
[]
(test/tests/transfers/multiapp_nearest_node_transfer/fromsub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
elem_type = QUAD8
[]
[Variables]
[u]
family = LAGRANGE
order = FIRST
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[nodal_source_from_sub_nodal]
family = LAGRANGE
order = FIRST
[]
[nodal_source_from_sub_elemental]
family = MONOMIAL
order = CONSTANT
[]
[elemental_source_from_sub_nodal]
family = LAGRANGE
order = FIRST
[]
[elemental_source_from_sub_elemental]
family = MONOMIAL
order = CONSTANT
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.48 0.01 0 -1.01 0.01 0'
input_files = fromsub_sub.i
[]
[]
[Transfers]
[from_sub_nodal_from_nodal]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
variable = nodal_source_from_sub_nodal
[]
[from_sub_nodal_from_elemental]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
variable = nodal_source_from_sub_elemental
[]
[from_sub_elemental_from_nodal]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u_elemental
variable = elemental_source_from_sub_nodal
[]
[from_sub_elemental_from_elemental]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u_elemental
variable = elemental_source_from_sub_elemental
[]
[]
(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/combined/examples/optimization/thermomechanical/thermomechanical_main.i)
vol_frac = 0.4
power = 2.0
E0 = 1.0e-6
E1 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '16 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '24 0 0'
[]
[extra]
type = SideSetsFromBoundingBoxGenerator
input = push_center
bottom_left = '-0.01 17.999 0'
top_right = '5 22.001 0'
boundary_new = n1
boundaries_old = left
[]
[dirichlet_bc]
type = SideSetsFromNodeSetsGenerator
input = extra
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = FIRST
initial_condition = 0.02
[]
[sensitivity_one]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[sensitivity_two]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[total_sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[]
[AuxKernels]
[total_sensitivity]
type = ParsedAux
variable = total_sensitivity
expression = '(1-1.0e-7)*sensitivity_one + 1.0e-7*sensitivity_two'
coupled_variables = 'sensitivity_one sensitivity_two'
execute_on = 'LINEAR TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${E1} + (mat_den ^ ${power}) * (${E1}-${E0})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
# We do filtering in the subapps
[update]
type = DensityUpdate
density_sensitivity = total_sensitivity
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = MULTIAPP_FIXED_POINT_BEGIN
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 2
[]
[Outputs]
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
exodus = true
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
expression = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralVariablePostprocessor
variable = total_sensitivity
[]
[]
[MultiApps]
[sub_app_one]
type = TransientMultiApp
input_files = structural_sub.i
[]
[sub_app_two]
type = TransientMultiApp
input_files = thermal_sub.i
[]
[]
[Transfers]
# First SUB-APP: STRUCTURAL
# To subapp densities
[subapp_one_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_one
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_one_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_one
source_variable = Dc # sensitivity_var
variable = sensitivity_one # Here
[]
# Second SUB-APP: HEAT CONDUCTIVITY
# To subapp densities
[subapp_two_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_two
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_two_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_two
source_variable = Tc # sensitivity_var
variable = sensitivity_two # Here
[]
[]
(modules/combined/examples/optimization/multi-load/square_main.i)
# This example is intended to reproduce a 2D example with opposing horizontal
# loads (see [1]). This test has an undefined solution if reguar SIMP is applied.
# Using multi-loads SIMP, on the other hand, generates a structure that optimizes
# the response to both loads individually,
# [1]. Lat. Am. j. solids struct. 12 (5), May 2015
# Topological derivative-based topology optimization of structures subject to multiple load-cases
vol_frac = 0.5
power = 1.0
E0 = 1.0
Emin = 1.0e-6
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmin = 0
xmax = 150
ymin = 0
ymax = 150
[]
[left_load]
type = ExtraNodesetGenerator
input = Bottom
new_boundary = left_load
coord = '0 150 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '150 150 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = CONSTANT
[]
[sensitivity_one]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[sensitivity_two]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[total_sensitivity]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[]
[ICs]
[mat_den]
type = RandomIC
seed = 7
variable = mat_den
max = '${fparse vol_frac+0.35}'
min = '${fparse vol_frac-0.35}'
[]
[]
[AuxKernels]
[total_sensitivity]
type = ParsedAux
variable = total_sensitivity
expression = '0.5*sensitivity_one + 0.5*sensitivity_two'
coupled_variables = 'sensitivity_one sensitivity_two'
execute_on = 'LINEAR TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[no_x_right]
type = DirichletBC
variable = disp_x
boundary = right_support
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = total_sensitivity
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = MULTIAPP_FIXED_POINT_BEGIN
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 10
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
expression = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralVariablePostprocessor
variable = total_sensitivity
[]
[]
[MultiApps]
[sub_app_one]
type = TransientMultiApp
input_files = square_subapp_one.i
[]
[sub_app_two]
type = TransientMultiApp
input_files = square_subapp_two.i
[]
[]
[Transfers]
# First SUB-APP
# To subapp densities
[subapp_one_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_one
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_one_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_one
source_variable = Dc # sensitivity_var
variable = sensitivity_one # Here
[]
# Second SUB-APP
# To subapp densities
[subapp_two_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_two
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_two_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_two
source_variable = Dc # sensitivity_var
variable = sensitivity_two # Here
[]
[]
(test/tests/transfers/multiapp_projection_transfer/fromsub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 9
ymax = 9
nx = 9
ny = 9
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v_nodal]
[]
[v_elemental]
order = CONSTANT
family = MONOMIAL
[]
[x_nodal]
[]
[x_elemental]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'NEWTON'
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '1 1 0 5 5 0'
input_files = fromsub_sub.i
[]
[]
[Transfers]
[v_nodal_tr]
type = MultiAppProjectionTransfer
from_multi_app = sub
source_variable = v
variable = v_nodal
[]
[v_elemental_tr]
type = MultiAppProjectionTransfer
from_multi_app = sub
source_variable = v
variable = v_elemental
[]
[x_elemental_tr]
type = MultiAppProjectionTransfer
from_multi_app = sub
source_variable = x
variable = x_elemental
[]
[x_nodal_tr]
type = MultiAppProjectionTransfer
from_multi_app = sub
source_variable = x
variable = x_nodal
[]
[]
(test/tests/multiapps/output_in_position/multilevel_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0'
input_files = parent.i
output_in_position = true
[../]
[]
(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
[../]
[]
(test/tests/multiapps/picard/picard_abs_tol_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
fixed_point_max_its = 10
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/multiapps/relaxation/bad_relax_factor_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
initial_condition = 1
[]
[inverse_v]
initial_condition = 1
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = inverse_v
[]
[]
[AuxKernels]
[invert_v]
type = QuotientAux
variable = inverse_v
denominator = v
numerator = 20.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[Neumann_right]
type = NeumannBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 4
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_abs_tol = 1e-14
relaxation_factor = 2.0
transformed_variables = u
[]
[Outputs]
exodus = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = picard_relaxed_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/transfers/multiapp_copy_transfer/between_multiapps/main.i)
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
[]
[MultiApps/sub1]
type = TransientMultiApp
input_files = sub1.i
[]
[MultiApps/sub2]
type = TransientMultiApp
input_files = sub2.i
[]
[Transfers/from_sub1_to_sub2]
type = MultiAppCopyTransfer
from_multi_app = sub1
to_multi_app = sub2
source_variable = x1
variable = x2
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/geochemistry/test/tests/kinetics/bio_zoning_flow.i)
# groundwater velocity is 10m.yr^-1 divided by porosity of 0.3
# The following are the mole numbers of the species in the groundwater
# The numerical values can be obtained by running the geochemistry simulation with a very small timestep so no kinetics are active (use the transported_bulk_moles values)
eqm_H2O = 55.49986252429319
eqm_CH3COO = 1e-9
eqm_CH4 = 1e-9
eqm_HS = 1e-9
eqm_Ca = 1e-3
eqm_SO4 = 4e-5
eqm_Fe = 1.386143651587732e-05
# The following are scalings used in calculating the residual. Eg, because the concentration of CH3COO is so low, its residual is always tiny, so to get better accuracy it should be scaled
scale_H2O = ${fparse 1.0 / eqm_H2O}
scale_CH3COO = ${fparse 1.0 / eqm_CH3COO}
scale_CH4 = ${fparse 1.0 / eqm_CH4}
scale_HS = ${fparse 1.0 / eqm_HS}
scale_Ca = ${fparse 1.0 / eqm_Ca}
scale_SO4 = ${fparse 1.0 / eqm_SO4}
scale_Fe = ${fparse 1.0 / eqm_Fe}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 500
xmin = 0
xmax = 200000
[]
[]
[UserObjects]
[nodal_void_volume_uo]
type = NodalVoidVolume
porosity = 1.0
execute_on = 'initial'
[]
[]
[Variables]
[conc_H2O]
initial_condition = ${eqm_H2O}
scaling = ${scale_H2O}
[]
[conc_CH3COO]
initial_condition = ${eqm_CH3COO}
scaling = ${scale_CH3COO}
[]
[conc_CH4]
initial_condition = ${eqm_CH4}
scaling = ${scale_CH4}
[]
[conc_HS]
initial_condition = ${eqm_HS}
scaling = ${scale_HS}
[]
[conc_Ca]
initial_condition = ${eqm_Ca}
scaling = ${scale_Ca}
[]
[conc_SO4]
initial_condition = ${eqm_SO4}
scaling = ${scale_SO4}
[]
[conc_Fe]
initial_condition = ${eqm_Fe}
scaling = ${scale_Fe}
[]
[]
[Kernels]
[dot_H2O]
type = GeochemistryTimeDerivative
variable = conc_H2O
save_in = rate_H2O_times_vv
[]
[dot_CH3COO]
type = GeochemistryTimeDerivative
variable = conc_CH3COO
save_in = rate_CH3COO_times_vv
[]
[dot_CH4]
type = GeochemistryTimeDerivative
variable = conc_CH4
save_in = rate_CH4_times_vv
[]
[dot_HS]
type = GeochemistryTimeDerivative
variable = conc_HS
save_in = rate_HS_times_vv
[]
[dot_Ca]
type = GeochemistryTimeDerivative
variable = conc_Ca
save_in = rate_Ca_times_vv
[]
[dot_SO4]
type = GeochemistryTimeDerivative
variable = conc_SO4
save_in = rate_SO4_times_vv
[]
[dot_Fe]
type = GeochemistryTimeDerivative
variable = conc_Fe
save_in = rate_Fe_times_vv
[]
[adv_H2O]
type = ConservativeAdvection
velocity = velocity
upwinding_type = full
variable = conc_H2O
[]
[adv_CH3COO]
type = ConservativeAdvection
velocity = velocity
upwinding_type = full
variable = conc_CH3COO
[]
[adv_CH4]
type = ConservativeAdvection
velocity = velocity
upwinding_type = full
variable = conc_CH4
[]
[adv_HS]
type = ConservativeAdvection
velocity = velocity
upwinding_type = full
variable = conc_HS
[]
[adv_Ca]
type = ConservativeAdvection
velocity = velocity
upwinding_type = full
variable = conc_Ca
[]
[adv_SO4]
type = ConservativeAdvection
velocity = velocity
upwinding_type = full
variable = conc_SO4
[]
[adv_Fe]
type = ConservativeAdvection
velocity = velocity
upwinding_type = full
variable = conc_Fe
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL_VEC
order = CONSTANT
[]
[nodal_void_volume]
[]
[rate_H2O_times_vv]
[]
[rate_CH3COO_times_vv]
[]
[rate_CH4_times_vv]
[]
[rate_HS_times_vv]
[]
[rate_Ca_times_vv]
[]
[rate_SO4_times_vv]
[]
[rate_Fe_times_vv]
[]
[rate_H2O]
[]
[rate_CH3COO]
[]
[rate_CH4]
[]
[rate_HS]
[]
[rate_Ca]
[]
[rate_SO4]
[]
[rate_Fe]
[]
[]
[AuxKernels]
[velocity]
type = VectorFunctionAux
function = vel_fcn
variable = velocity
[]
[nodal_void_volume_auxk]
type = NodalVoidVolumeAux
variable = nodal_void_volume
nodal_void_volume_uo = nodal_void_volume_uo
execute_on = 'initial timestep_end' # "initial" to ensure it is properly evaluated for the first timestep
[]
[rate_H2O_auxk]
type = ParsedAux
variable = rate_H2O
args = 'rate_H2O_times_vv nodal_void_volume'
function = 'rate_H2O_times_vv / nodal_void_volume'
[]
[rate_CH3COO]
type = ParsedAux
variable = rate_CH3COO
args = 'rate_CH3COO_times_vv nodal_void_volume'
function = 'rate_CH3COO_times_vv / nodal_void_volume'
[]
[rate_CH4]
type = ParsedAux
variable = rate_CH4
args = 'rate_CH4_times_vv nodal_void_volume'
function = 'rate_CH4_times_vv / nodal_void_volume'
[]
[rate_HS]
type = ParsedAux
variable = rate_HS
args = 'rate_HS_times_vv nodal_void_volume'
function = 'rate_HS_times_vv / nodal_void_volume'
[]
[rate_Ca]
type = ParsedAux
variable = rate_Ca
args = 'rate_Ca_times_vv nodal_void_volume'
function = 'rate_Ca_times_vv / nodal_void_volume'
[]
[rate_SO4]
type = ParsedAux
variable = rate_SO4
args = 'rate_SO4_times_vv nodal_void_volume'
function = 'rate_SO4_times_vv / nodal_void_volume'
[]
[rate_Fe]
type = ParsedAux
variable = rate_Fe
args = 'rate_Fe_times_vv nodal_void_volume'
function = 'rate_Fe_times_vv / nodal_void_volume'
[]
[]
[Functions]
[vel_fcn]
type = ParsedVectorFunction
expression_x = 33.333333
expression_y = 0
expression_z = 0
[]
[]
[BCs]
[inject_H2O]
type = DirichletBC
boundary = 'left right'
variable = conc_H2O
value = ${eqm_H2O}
[]
[inject_CH3COO]
type = DirichletBC
boundary = 'left right'
variable = conc_CH3COO
value = ${eqm_CH3COO}
[]
[inject_CH4]
type = DirichletBC
boundary = 'left right'
variable = conc_CH4
value = ${eqm_CH4}
[]
[inject_HS]
type = DirichletBC
boundary = 'left right'
variable = conc_HS
value = ${eqm_HS}
[]
[inject_Ca]
type = DirichletBC
boundary = 'left right'
variable = conc_Ca
value = ${eqm_Ca}
[]
[inject_SO4]
type = DirichletBC
boundary = 'left right'
variable = conc_SO4
value = ${eqm_SO4}
[]
[]
[Preconditioning]
[typically_efficient]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = ' hypre boomeramg'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
[TimeStepper]
type = FunctionDT
function = 'min(0.1 * (t + 1), 100)'
[]
end_time = 20000
nl_abs_tol = 1E-5
[]
[Outputs]
csv = true
[]
[MultiApps]
[react]
type = TransientMultiApp
input_files = bio_zoning_conc.i
clone_parent_mesh = true
execute_on = 'timestep_end' # This is critical
[]
[]
[Transfers]
[changes_due_to_flow]
type = MultiAppCopyTransfer
to_multi_app = react
source_variable = 'rate_H2O rate_CH3COO rate_CH4 rate_HS rate_Ca rate_SO4 rate_Fe' # change in mole number at every node / dt
variable = 'rate_H2O_per_1l rate_CH3COO_per_1l rate_CH4_per_1l rate_HS_per_1l rate_Ca_per_1l rate_SO4_per_1l rate_Fe_per_1l' # change in moles at every node / dt
[]
[transported_moles_from_geochem]
type = MultiAppCopyTransfer
from_multi_app = react
source_variable = 'transported_H2O transported_CH3COO transported_CH4 transported_HS transported_Ca transported_SO4 transported_Fe'
variable = 'conc_H2O conc_CH3COO conc_CH4 conc_HS conc_Ca conc_SO4 conc_Fe'
[]
[]
(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
[../]
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/parent.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[multi_layered_average]
[]
[element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001 # This will be constrained by the multiapp
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_tol = 1e-8
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
positions = '0.3 0.1 0.3 0.7 0.1 0.3'
type = TransientMultiApp
input_files = sub.i
app_type = MooseTestApp
[]
[]
[Transfers]
[layered_transfer]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = layered_average
variable = multi_layered_average
from_multi_app = sub_app
skip_coordinate_collapsing = true
from_app_must_contain_point = false
bbox_factor = 1.0000001
[]
[element_layered_transfer]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = layered_average
variable = element_multi_layered_average
from_multi_app = sub_app
skip_coordinate_collapsing = true
from_app_must_contain_point = false
bbox_factor = 1.0000001
[]
[]
(test/tests/multiapps/loose_couple_time_adapt/end.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[MultiApps]
[./dummy]
type = TransientMultiApp
input_files = adaptiveDT.i
execute_on = timestep_end
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 0.006
dt = 0.006
nl_abs_tol = 1.0e-8
[]
[Outputs]
exodus = true
file_base = end
[]
(modules/thermal_hydraulics/test/tests/components/form_loss_from_external_app_1phase/phy.form_loss_1phase.parent.i)
# This tests a form loss transfer using the MultiApp system. A dummy heat
# conduction problem is solved, then the form loss evaluated and transferred
# to the child app side of the solve, then the child app solves and then the
# parent continues solving
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 2
nx = 10
[]
[Functions]
[left_bc_fn]
type = PiecewiseLinear
x = '0 1'
y = '300 310'
[]
[K_prime_fn]
type = ParsedFunction
expression = 't*(2-x)*x'
[]
[]
[AuxVariables]
[K_prime]
[]
[]
[AuxKernels]
[K_prime_ak]
type = FunctionAux
variable = K_prime
function = K_prime_fn
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = left
function = left_bc_fn
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 5
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[child]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.form_loss_1phase.child.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[K_to_s]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = child
source_variable = K_prime
variable = K_prime
[]
[]
(test/tests/transfers/general_field/user_object/between_siblings/main_between_multiapp.i)
# Base input for testing between-multiapp transfers. It has the following complexities:
# - multiapps may not be run with the same number of ranks
# - both nodal and elemental variables
# - transfers between mixes of nodal and elemental variables
# Tests derived from this input may add or remove complexities through command line arguments
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
[]
# This application use at most 3 processes
[MultiApps/ma1]
type = TransientMultiApp
input_files = sub_between_diffusion1.i
max_procs_per_app = 3
[]
# This application will use as many processes as the main app
[MultiApps/ma2]
type = TransientMultiApp
input_files = sub_between_diffusion2.i
[]
[Transfers]
# Nodal to nodal variables
[app1_to_2_nodal_nodal]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma1
to_multi_app = ma2
source_user_object = sent_nodal
variable = received_nodal
extrapolation_constant = -1
[]
[app2_to_1_nodal_nodal]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma2
to_multi_app = ma1
source_user_object = sent_nodal
variable = received_nodal
extrapolation_constant = -1
[]
# Elemental to elemental variables
[app1_to_2_elem_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma1
to_multi_app = ma2
source_user_object = sent_elem
variable = received_elem
extrapolation_constant = -1
[]
[app2_to_1_elem_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma2
to_multi_app = ma1
source_user_object = sent_elem
variable = received_elem
extrapolation_constant = -1
[]
# Elemental to nodal variables
[app1_to_2_elem_nodal]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma1
to_multi_app = ma2
source_user_object = sent_elem
variable = received_nodal
extrapolation_constant = -1
[]
[app2_to_1_elem_nodal]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma2
to_multi_app = ma1
source_user_object = sent_elem
variable = received_nodal
extrapolation_constant = -1
[]
# Nodal to elemental variables
[app1_to_2_nodal_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma1
to_multi_app = ma2
source_user_object = sent_nodal
variable = received_elem
extrapolation_constant = -1
[]
[app2_to_1_nodal_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = ma2
to_multi_app = ma1
source_user_object = sent_nodal
variable = received_elem
extrapolation_constant = -1
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
(test/tests/transfers/multiapp_reporter_transfer/clone.i)
[Mesh/generate]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Reporters]
[receiver]
type = ConstantReporter
[]
[]
[MultiApps]
[multi_vector]
type = TransientMultiApp
input_files = 'sub0.i sub0.i sub1.i sub1.i'
positions = '0 0 0
0 0 0
0 0 0
0 0 0'
cli_args = 'Outputs/active="" Outputs/active="" Outputs/active="" Outputs/active=""'
[]
[multi_reporter]
type = TransientMultiApp
input_files = 'sub0.i sub0.i sub0.i sub0.i'
positions = '0 0 0
0 0 0
0 0 0
0 0 0'
cli_args = 'Postprocessors/from_sub_pp/default=3.1415926;Reporters/from_sub_rep/integer_values=10;Reporters/from_sub_rep/string_values=ten;Outputs/active=""
Postprocessors/from_sub_pp/default=1.5707963;Reporters/from_sub_rep/integer_values=11;Reporters/from_sub_rep/string_values=twenty;Outputs/active=""
Postprocessors/from_sub_pp/default=1.0471975;Reporters/from_sub_rep/integer_values=12;Reporters/from_sub_rep/string_values=thirty;Outputs/active=""
Postprocessors/from_sub_pp/default=0.7853981;Reporters/from_sub_rep/integer_values=13;Reporters/from_sub_rep/string_values=forty;Outputs/active=""'
[]
[single_app]
type = TransientMultiApp
input_files = 'sub0.i'
cli_args = 'Outputs/active=""'
[]
[]
[Transfers]
[multi_vpp]
type = MultiAppCloneReporterTransfer
from_reporters = 'from_sub_vpp/a from_sub_vpp/b'
to_reporter = receiver
from_multi_app = multi_vector
[]
[multi_rep]
type = MultiAppCloneReporterTransfer
from_reporters = 'from_sub_pp/value from_sub_rep/int from_sub_rep/str'
to_reporter = receiver
from_multi_app = multi_reporter
[]
[single]
type = MultiAppCloneReporterTransfer
from_reporters = 'from_sub_pp/value from_sub_rep/int from_sub_rep/str'
to_reporter = receiver
from_multi_app = single_app
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
vectorpostprocessors_as_reporters = true
[]
execute_on = timestep_end
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/restricted_elem_parent.i)
num_layers = 2
[Mesh]
[box]
type = GeneratedMeshGenerator
dim = 3
nx = ${num_layers}
ny = 3
nz = 3
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[a]
family = MONOMIAL
order = CONSTANT
[]
[s]
[]
[]
[AuxKernels]
[s_ak]
type = ParsedAux
variable = s
use_xyzt = true
expression = 'x+(z*z)'
[]
[]
[Functions]
[]
[Postprocessors]
[a_avg]
type = ElementAverageValue
variable = a
[]
[]
[UserObjects]
[S_avg_front]
type = LayeredSideAverage
boundary = front
variable = s
num_layers = ${num_layers}
direction = x
[]
[S_avg_back]
type = LayeredSideAverage
boundary = back
variable = s
num_layers = ${num_layers}
direction = x
[]
[]
[MultiApps]
[ch0]
type = TransientMultiApp
input_files = 'restricted_elem_sub.i'
bounding_box_padding = '0 0.5 1'
positions = '0 0.5 -0.1'
output_in_position = true
cli_args = 'yy=0'
[]
[ch1]
type = TransientMultiApp
input_files = 'restricted_elem_sub.i'
bounding_box_padding = '0 0.5 1'
positions = '0 0.5 1.1'
output_in_position = true
cli_args = 'yy=1'
[]
[]
[Transfers]
[from_ch0]
type = MultiAppGeneralFieldUserObjectTransfer
to_boundaries = back
from_multi_app = ch0
variable = a
source_user_object = A_avg
# Bounding box padding is not obeyed
fixed_bounding_box_size = '0 1 1.5'
from_app_must_contain_point = false
[]
[from_ch1]
type = MultiAppGeneralFieldUserObjectTransfer
to_boundaries = front
from_multi_app = ch1
variable = a
source_user_object = A_avg
fixed_bounding_box_size = '0 1 1.5'
from_app_must_contain_point = false
[]
[to_ch0]
type = MultiAppGeneralFieldUserObjectTransfer
to_blocks = 20
to_multi_app = ch0
variable = S
source_user_object = S_avg_back
fixed_bounding_box_size = '0 1 1.5'
from_app_must_contain_point = false
[]
[to_ch1]
type = MultiAppGeneralFieldUserObjectTransfer
to_blocks = 20
to_multi_app = ch1
variable = S
source_user_object = S_avg_front
fixed_bounding_box_size = '0 1 1.5'
from_app_must_contain_point = false
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/detect_steady_state/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmax = 10
ymax = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub.i
sub_cycling = true
steady_state_tol = 1e-5
detect_steady_state = true
[../]
[]
(test/tests/restart/restart_transient_from_steady/restart_trans_with_2subs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = 'replicated'
[]
[Problem]
restart_file_base = steady_with_2subs_out_cp/LATEST
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2' # increase this function to drive transient
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 50
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 3
dt = 1.0
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-7
fixed_point_rel_tol = 1e-7
fixed_point_abs_tol = 1e-07
fixed_point_max_its = 4
line_search = none
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0
0.5 0 0'
input_files = restart_trans_with_sub_sub.i
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[p_to_sub]
type = MultiAppProjectionTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppGeometricInterpolationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(tutorials/darcy_thermo_mech/step10_multiapps/problems/step10.i)
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 100
ymax = 0.304 # Length of test chamber
xmax = 0.0257 # Test chamber radius
[]
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[k_eff]
initial_condition = 15.0 # water at 20C
[]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
# This block adds all of the proper Kernels, strain calculators, and Variables
# for SolidMechanics in the correct coordinate system (autodetected)
add_variables = true
strain = FINITE
eigenstrain_names = eigenstrain
use_automatic_differentiation = true
generate_output = 'vonmises_stress elastic_strain_xx elastic_strain_yy strain_xx strain_yy'
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = bottom
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = top
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = bottom
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = top
[]
[hold_inlet]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[hold_center]
type = DirichletBC
variable = disp_r
boundary = left
value = 0
[]
[hold_outside]
type = DirichletBC
variable = disp_r
boundary = right
value = 0
[]
[]
[Materials]
viscosity_file = data/water_viscosity.csv
density_file = data/water_density.csv
specific_heat_file = data/water_specific_heat.csv
thermal_expansion_file = data/water_thermal_expansion.csv
[column]
type = PackedColumn
temperature = temperature
radius = 1
thermal_conductivity = k_eff # Use the AuxVariable instead of calculating
fluid_viscosity_file = ${viscosity_file}
fluid_density_file = ${density_file}
fluid_specific_heat_file = ${specific_heat_file}
fluid_thermal_expansion_file = ${thermal_expansion_file}
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200e9 # (Pa) from wikipedia
poissons_ratio = .3 # from wikipedia
[]
[elastic_stress]
type = ADComputeFiniteStrainElasticStress
[]
[thermal_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1e-6
eigenstrain_name = eigenstrain
temperature = temperature
[]
[]
[Postprocessors]
[average_temperature]
type = ElementAverageValue
variable = temperature
[]
[]
[Executioner]
type = Transient
start_time = -1
end_time = 200
steady_state_tolerance = 1e-7
steady_state_detection = true
dt = 0.25
solve_type = PJFNK
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 500'
line_search = none
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,0.25)'
[]
[]
[MultiApps]
[micro]
type = TransientMultiApp
app_type = DarcyThermoMechApp
positions = '0.01285 0.0 0
0.01285 0.0608 0
0.01285 0.1216 0
0.01285 0.1824 0
0.01285 0.2432 0
0.01285 0.304 0'
input_files = step10_micro.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[keff_from_sub]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = k_eff
power = 1
postprocessor = k_eff
execute_on = 'timestep_end'
[]
[temperature_to_sub]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = micro
source_variable = temperature
postprocessor = temperature_in
execute_on = 'timestep_end'
[]
[]
[Controls]
[multiapp]
type = TimePeriod
disable_objects = 'MultiApps::micro Transfers::keff_from_sub Transfers::temperature_to_sub'
start_time = '0'
execute_on = 'initial'
[]
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
[]
[]
(test/tests/transfers/multiapp_postprocessor_to_scalar/parent2.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./from_sub_app]
order = THIRD
family = SCALAR
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.01
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./average]
type = ElementAverageValue
variable = u
[../]
[./point_value_0]
type = ScalarVariable
variable = from_sub_app
component = 0
[../]
[./point_value_1]
type = ScalarVariable
variable = from_sub_app
component = 1
[../]
[./point_value_2]
type = ScalarVariable
variable = from_sub_app
component = 2
[../]
[]
[Executioner]
type = Transient
num_steps = 5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
hide = from_sub_app
[]
[MultiApps]
[./pp_sub]
app_type = MooseTestApp
positions = '0.5 0.5 0
0.7 0.7 0
0.8 0.8 0'
execute_on = timestep_end
type = TransientMultiApp
input_files = sub2.i
[../]
[]
[Transfers]
[./pp_transfer]
type = MultiAppPostprocessorToAuxScalarTransfer
from_multi_app = pp_sub
from_postprocessor = point_value
to_aux_scalar = from_sub_app
[../]
[]
(modules/stochastic_tools/include/multiapps/SamplerTransientMultiApp.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
// MOOSE includes
#include "TransientMultiApp.h"
#include "SamplerInterface.h"
#include "StochasticToolsTypes.h"
class Sampler;
class StochasticToolsTransfer;
class SamplerTransientMultiApp : public TransientMultiApp, public SamplerInterface
{
public:
static InputParameters validParams();
SamplerTransientMultiApp(const InputParameters & parameters);
/**
* Override solveStep to allow for batch execution.
*/
virtual bool solveStep(Real dt, Real target_time, bool auto_advance = true) override;
/**
* Override to initialize batch backups.
*/
virtual void initialSetup() override;
protected:
/// Sampler to utilize for creating MultiApps
Sampler & _sampler;
/// The Sup-application solve mode
const StochasticTools::MultiAppMode _mode;
/// Counter for extracting command line arguments in batch mode
dof_id_type _local_batch_app_index;
/// Override to allow to get correct cli_args
virtual std::string getCommandLineArgsParamHelper(unsigned int local_app) override;
private:
/**
* Helper method for running in mode='batch'
* */
bool solveStepBatch(Real dt, Real target_time, bool auto_advance = true);
/**
* Helper function for updating _row_data and _local_row_index.
* This allows multiple calls to the same row index
*/
void updateRowData(dof_id_type local_index);
/**
* Helper for getting StochasticToolsTransfer objects.
*
* This is a copy from SamplerFullSolveMultiapp, but the alternative is to create an intermediate
* base. But, given the inheritance difference between these object that gets rather complex, so
* a few lines of copied code is better for now.
*/
std::vector<std::shared_ptr<StochasticToolsTransfer>>
getActiveStochasticToolsTransfers(Transfer::DIRECTION direction);
/// Store the number of rows initialized, if this changes error because it doesn't make sense
const dof_id_type _number_of_sampler_rows;
/// Storage for batch-restore mode; the outer vector if for the local stochastic data and the
/// inner vector is for the number of sub-apps. The later is 1 for this object, but it is included
/// in case that changes in the future or in child classes
std::vector<std::vector<std::unique_ptr<Backup>>> _batch_backup;
/// Current row of data updated by updateRowData. Used by transfers and setting command line args
std::vector<Real> _row_data;
/// Current local index representing _row_data
dof_id_type _local_row_index = std::numeric_limits<dof_id_type>::max();
};
(framework/include/multiapps/CentroidMultiApp.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "TransientMultiApp.h"
#include "BlockRestrictable.h"
/**
* Automatically generates Sub-App positions from centroids of elements in the master mesh.
*/
class CentroidMultiApp : public TransientMultiApp, public BlockRestrictable
{
public:
static InputParameters validParams();
CentroidMultiApp(const InputParameters & parameters);
protected:
/**
* fill in _positions with the positions of the sub-aps
*/
virtual void fillPositions() override;
};
(framework/include/multiapps/QuadraturePointMultiApp.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "TransientMultiApp.h"
#include "BlockRestrictable.h"
/**
* Automatically generates sub-App positions with elemental quadrature points of the parent mesh.
*/
class QuadraturePointMultiApp : public TransientMultiApp, public BlockRestrictable
{
public:
static InputParameters validParams();
QuadraturePointMultiApp(const InputParameters & parameters);
protected:
void fillPositions() override;
};