1!--------------------------------------------------------------------
2! Test case for 3D nonconforming mortar elements using the AV solver.
3!
4! This case includes 4-fold symmetry in the rotations and
5! an optional skew of 20 degrees in the rotor.
6! Increse number of extruded layers for better accuracy.
7!
8! This test case uses a generic projector which does not make
9! any assumptions on the characteristics of the 2D mesh.
10!
11! It seems that combination with strong nodal projector and weak
12! edge projector converges better than all-weak projector.
13!
14! P.R. / 28.11.2014
15!---------------------------------------------------------------------
16
17$skew=3.0
18$omega=20.0
19$t0=1.0
20
21Header
22  CHECK KEYWORDS Warn
23  Mesh DB "." "mortar3d"
24  Include Path ""
25  Results Directory ""
26End
27
28Simulation
29  Max Output Level = 5
30  Coordinate System = Cartesian
31  Coordinate Mapping(3) = 1 2 3
32  Simulation Type = Transient
33  Steady State Max Iterations = 1
34  Output Intervals = 1
35
36  Timestepping Method = BDF
37  BDF Order = 1
38  Timestep Sizes = 0.1
39  Output Intervals = 1
40  Timestep Intervals = 1
41
42  Simulation Timing = Logical True
43End
44
45Constants
46  Gravity(4) = 0 -1 0 9.82
47  Stefan Boltzmann = 5.67e-08
48  Permittivity of Vacuum = 8.8542e-12
49  Boltzmann Constant = 1.3807e-23
50  Unit Charge = 1.602e-19
51End
52
53Body 1
54  Target Bodies(1) = 3
55  Name = "Stator"
56  Equation = 1
57  Material = 1
58  Body Force = 1
59  Initial Condition = 1
60End
61
62Body 2
63  Target Bodies(1) = 1
64  Name = "Rotor-Hot"
65  Equation = 1
66  Material = 2
67  Body Force = 2
68  Initial Condition = 1
69End
70
71Body 3
72  Target Bodies(1) = 2
73  Name = "Rotor-Cold"
74  Equation = 1
75  Material = 3
76  Body Force = 3
77  Initial Condition = 1
78End
79
80
81Solver 1
82  Exec Solver = Before Timestep
83  Equation = MeshDeform
84  Procedure = "RigidMeshMapper" "RigidMeshMapper"
85  Translate Before Rotate = Logical True
86  Cumulative Displacements = Logical False
87End
88
89
90Solver 2
91  Equation = "MGDynamics"
92  Variable = "P"
93  Procedure = "MagnetoDynamics" "WhitneyAVSolver"
94
95! Fix Input Current Density = Logical True
96!  Use Piola Transform = Logical True
97
98  Linear System Solver = "Iterative"
99  Linear System Preconditioning = ILU2
100  Linear System Residual Output = 20
101  Linear System Max Iterations = 500
102  Linear System Iterative Method = GCR
103  BicGStabL Polynomial Degree = 4
104  Linear System GCR Restart = 600
105  Linear System Convergence Tolerance = 1e-14
106  Linear System Abort Not Converged = False
107
108  Steady State Convergence Tolerance = 1e-10
109
110  Linear System Normwise Backward Error = Logical True
111!  Linear System Row Equilibration = True
112
113  Edge Basis = Logical True
114  Apply Mortar BCs = Logical True
115  Optimize Bandwidth = False
116End
117
118Solver 3
119!  Exec Solver = never
120  Equation = "MGDynamicsCalc"
121
122  Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
123  Linear System Symmetric = True
124  Potential Variable = String "P"
125
126  Calculate Current Density = Logical True
127  Calculate Electric Field = Logical True
128  Calculate Magnetic Field Strength = Logical True
129  Calculate Magnetic Vector Potential = Logical True
130
131  Steady State Convergence Tolerance = 0
132  Linear System Solver = "Iterative"
133  Linear System Preconditioning = None
134  Linear System Residual Output = 0
135  Linear System Max Iterations = 5000
136  Linear System Iterative Method = CG
137  Linear System Convergence Tolerance = 1.0e-8
138
139  Calculate Nodal Fields = False
140  Discontinuous Bodies = True
141End
142
143
144Solver 4
145! Settings mainly for timing and verification
146  Exec Solver = never
147
148  Equation = SaveScalars
149  Procedure = "SaveData" "SaveScalars"
150  Filename = scalars.dat
151
152  Variable 1 = P
153  Operator 1 = dofs
154  Operator 2 = min
155  Operator 3 = max
156  Operator 4 = norm
157  Operator 5 = cpu time
158  Operator 6 = wall time
159
160!  File Append = Logical True
161
162! Reduce just to one file when parallel
163  Parallel Reduce = Logical True
164  Default Parallel Operator = String max
165  Parallel Operator 1 = String sum
166End
167
168
169Solver 5
170  Exec Solver = never
171
172  Equation = "SaveLine"
173  Procedure = "SaveData" "SaveLine"
174  Filename = line.dat
175
176! Put all data in the same file
177!  File Append = True
178
179! Number the files [1,2,...] starting from 1st free number
180  Filename Numbering = True
181
182  Coordinate Transformation = String "cartesian to cylindrical"
183  Coordinate Transformation Use Degrees = Logical True
184  Polyline Coordinates(2,3) = 0.99 -360.0 0.5 0.99 360.0 0.99
185End
186
187
188Solver 6
189!  Exec Solver = never
190  Equation = VtuOutput
191  Procedure = "ResultOutputSolve" "ResultOutputSolver"
192  Output File Name = case
193  Vtu Format = True
194  Single Precision = True
195  Save Geometry Ids = True
196
197  Discontinuous Bodies = True
198End
199
200Equation 1
201  Name = "MagFields"
202  Active Solvers(3) = 2 3 6
203End
204
205Material 1
206  Reluctivity  = Real 1.0
207  Electric Conductivity = Real 1.0e-6
208End
209
210Material 2
211  Reluctivity  = Real 1.0
212  Electric Conductivity = Real 1.0
213End
214
215Material 3
216  Reluctivity  = Real 1.0
217  Electric Conductivity = Real 1.0e-6
218End
219
220Body Force 1
221  Name = "MoveToLeft"
222  Mesh Translate 1 = -4.0
223!  Mesh Scale 3 = Real 1.1
224!  Mesh Translate 3 = -0.05
225
226  Mesh Rotate 3 = Variable Coordinate 3
227    Real MATC "-skew*tx"
228End
229
230Body Force 2
231  Name = "Hot Move"
232  Mesh Rotate 3 = Variable time, Coordinate 3
233    Real MATC "omega*(t0+tx(0))+skew*tx(1)"
234!  Electric Potential = Equals "Coordinate 3"
235End
236
237Body Force 3
238  Name = "Cold Move"
239  Mesh Rotate 3 = Variable time, Coordinate 3
240    Real MATC "omega*(t0+tx(0))+skew*tx(1)"
241End
242
243Boundary Condition 1
244  Target Boundaries(2) = 8 9
245  Name = "Ambient"
246  P {e} = Real 0
247End
248
249Boundary Condition 2
250  Target Boundaries(1) = 6
251  Name = "Mortar Outside"
252End
253
254$pcoeff = 1.0
255Boundary Condition 3
256  Target Boundaries(2) = 1 2
257  Name = "Mortar Inside"
258
259  Mortar BC =  Integer 2
260  Rotational Projector = Logical True
261  Rotational Projector Periods = Integer 4
262
263  Level Projector = Logical True
264  Level Projector Generic = Logical True
265! electric conductivity zero so we can skip this
266  Projector Skip Nodes = Logical True
267
268!  Save Projector = Logical True
269End
270
271Boundary Condition 4
272  Name = "Periodic Rotor Master"
273  Target Boundaries(1) = 4
274
275  Mortar BC = 5
276  Radial Projector = Logical True
277
278  Level Projector = Logical True
279  Level Projector Generic = Logical True
280  Level Projector Nodes Strong = Logical True
281
282!  Save Projector = Logical True
283End
284
285Boundary Condition 5
286  Name = "Periodic Rotor Target"
287  Target Boundaries(1) = 3
288End
289
290Boundary Condition 6
291  Name = "Periodic Stator Master"
292  Target Boundaries(1) = 10
293
294  Mortar BC = 7
295  Radial Projector = Logical True
296
297  Level Projector = Logical True
298  Level Projector Generic = Logical True
299
300  Projector Skip Nodes = Logical True
301!  Save Projector = Logical True
302!  Projector Set Rowsum = Logical True
303End
304
305Boundary Condition 7
306  Name = "Periodic Stator Target"
307  Target Boundaries(1) = 7
308End
309
310Boundary Condition 8
311  Target Boundaries(1) = 5
312  Name = "DummyBC"
313End
314
315Boundary Condition 9
316  Name = "Start-Stator"
317  Target Boundaries(1) = 13
318  P {e} = Real 0
319!  P = Real 0.0
320End
321
322Boundary Condition 10
323  Name = "Start-Hot"
324  Target Boundaries(1) = 12
325  P {e} = Real 0
326  P = Real 0.0
327End
328
329Boundary Condition 11
330  Name = "Start-Cold"
331  Target Boundaries(1) = 11
332  P {e} = Real 0
333  P = Real 0.0
334End
335
336Boundary Condition 12
337  Name = "EndZS-Stator"
338  Target Boundaries(1) = 16
339  P {e} = real 0
340!  P = Real 1.0
341End
342
343Boundary Condition 13
344  Name = "EndZ-Hot"
345  Target Boundaries(1) = 15
346  P {e} = real 0
347  P = Real 1.0
348!  Electric Current Density = 1.0
349End
350
351Boundary Condition 14
352  Name = "EndZ-Cold"
353  Target Boundaries(1) = 14
354  P {e} = real 0
355  P = Real 1.0
356!  Electric Current Density = 1.0
357End
358
359
360Solver 2 :: Reference Norm = 4.12190519E-03
361Solver 2 :: Reference Norm Tolerance = 1E-04
362
363