-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathav_magnetostatic.i
More file actions
207 lines (189 loc) · 3.79 KB
/
av_magnetostatic.i
File metadata and controls
207 lines (189 loc) · 3.79 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# Magnetostatic problem solved on a closed conductor subject to
# global loop voltage constraint.
[Mesh]
type = MFEMMesh
file = ../mesh/embedded_concentric_torus.e
[]
[Problem]
type = MFEMProblem
[]
[SubMeshes]
inactive = 'fluxcut'
[fluxcut]
type = MFEMCutTransitionSubMesh
cut_boundary = 'MeasurementPlane'
block = 'TorusCore TorusSheath'
transition_subdomain = transition_dom
transition_subdomain_boundary = transition_bdr
closed_subdomain = coil_dom
[]
[]
[FESpaces]
inactive = 'FluxFESpace'
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[FluxFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
submesh = fluxcut
[]
[]
[Variables]
[a_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxVariables]
inactive = 'flux_e_field'
[b_field]
type = MFEMVariable
fespace = HDivFESpace
[]
[e_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[flux_e_field]
type = MFEMVariable
fespace = FluxFESpace
[]
[]
[AuxKernels]
[curl]
type = MFEMCurlAux
variable = b_field
source = a_field
scale_factor = 1.0
execute_on = TIMESTEP_END
[]
[]
[Functions]
[exact_a_field]
type = ParsedVectorFunction
expression_x = '0'
expression_y = '0'
expression_z = '0'
[]
[]
[BCs]
[tangential_a_bdr]
type = MFEMVectorTangentialDirichletBC
variable = a_field
vector_coefficient = exact_a_field
boundary = 'Exterior'
[]
[]
[FunctorMaterials]
inactive = 'ConductorBoundary'
[Vacuum]
type = MFEMGenericFunctorMaterial
prop_names = reluctivity
prop_values = 1.0
[]
[Conductor]
type = MFEMGenericFunctorMaterial
prop_names = conductivity
prop_values = 1.0
block = 'TorusCore TorusSheath'
[]
[ConductorBoundary]
type = MFEMGenericFunctorMaterial
prop_names = conductivity_boundary
prop_values = 1.0
boundary = 'MeasurementPlane'
[]
[]
[Kernels]
[mass]
type = MFEMVectorFEMassKernel
variable = a_field
coefficient = 1e-10
[]
[curlcurl]
type = MFEMCurlCurlKernel
variable = a_field
coefficient = reluctivity
[]
[source]
type = MFEMMixedVectorMassKernel
variable = a_field
trial_variable = e_field
coefficient = conductivity
block = 'TorusCore TorusSheath'
[]
[]
[Preconditioner]
[ams]
type = MFEMHypreAMS
fespace = HCurlFESpace
[]
[]
[Solver]
type = MFEMHyprePCG
preconditioner = ams
l_tol = 1e-14
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[MultiApps]
[coil]
type = FullSolveMultiApp
input_files = cut_closed_coil.i
execute_on = INITIAL
[]
[]
[Transfers]
inactive = 'submesh_transfer_to_fluxsurface'
[from_coil]
type = MultiAppMFEMCopyTransfer
source_variable = e_field
variable = e_field
from_multi_app = coil
[]
[submesh_transfer_to_fluxsurface]
type = MFEMSubMeshTransfer
from_variable = e_field
to_variable = flux_e_field
execute_on = TIMESTEP_END
[]
[]
[Postprocessors]
inactive = 'CoilCurrent'
[CoilPower]
type = MFEMVectorFEInnerProductIntegralPostprocessor
coefficient = conductivity
dual_variable = e_field
primal_variable = e_field
block = 'TorusCore TorusSheath'
[]
[CoilCurrent]
type = MFEMVectorBoundaryFluxIntegralPostprocessor
coefficient = conductivity_boundary
variable = flux_e_field
boundary = 'MeasurementPlane'
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/MagnetostaticClosedCoil
vtk_format = ASCII
[]
[ReportedPostprocessors]
type = CSV
file_base = OutputData/AVMagnetostaticClosedCoilCSV
[]
[]