-
Notifications
You must be signed in to change notification settings - Fork 0
/
MasterApp.i
126 lines (113 loc) · 2.3 KB
/
MasterApp.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmax = 100
ymax = 100
[]
[Variables]
[./dummy]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./Source_from_App2]
order = FIRST
family = LAGRANGE
[../]
[./Diffusion_field_from_App1]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./zero_IC]
type = ConstantIC
variable = dummy
value = 0
[../]
[]
[BCs]
[./zero_BC]
type = DirichletBC
variable = dummy
value = 0
boundary = 'top bottom left right'
[../]
[]
[Kernels]
[./var_itself]
type = MassEigenKernel
variable = dummy
eigen = false
[../]
[./diffusion_data]
type = BodyForce
variable = dummy
#value = Diffusion_field_from_App1
value = 0
#function = Diffusion_field_from_data
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu '
l_max_its = 30
l_tol = 1e-4
nl_max_its = 50
nl_rel_tol = 1e-8
[./TimeStepper]
type = IterationAdaptiveDT
dt=1
[../]
[]
[Outputs]
exodus = true
[]
# Master app
[MultiApps]
[./sourceterm]
type = TransientMultiApp
app_type = multiapp_dukimApp
execute_on = TIMESTEP_BEGIN
positions = '0 0 0'
input_files = App2_simple_source.i
[../]
[./diffusion]
type = TransientMultiApp
app_type = multiapp_dukimApp
execute_on = TIMESTEP_BEGIN
positions = '0 0 0'
input_files = App1_simple_diffusion.i
[../]
[]
[Transfers]
[./App2_to_master]
type = MultiAppNearestNodeTransfer
direction = from_multiapp
multi_app = sourceterm
source_variable = S # This S is defined in App2_simple_source.i
variable = Source_from_App2
execute_on = SAME_AS_MULTIAPP
[../]
[./master_to_App1]
type = MultiAppNearestNodeTransfer
direction = to_multiapp
multi_app = diffusion
source_variable = Source_from_App2
variable = S # This S is defined in App1_simple_diffusion.i
execute_on = SAME_AS_MULTIAPP
[../]
[./App1_to_master]
type = MultiAppNearestNodeTransfer
direction = from_multiapp
multi_app = diffusion
source_variable = T # T is defined in App1_simple_diffusion.i
variable = Diffusion_field_from_App1
execute_on = SAME_AS_MULTIAPP
[../]
[]